Compare commits

..

No commits in common. "odin" and "6f7db66683980b6beb3e43aad8139e72c428c192" have entirely different histories.

204 changed files with 6445 additions and 7221 deletions

3
.gitignore vendored
View File

@ -25,6 +25,3 @@ proctab.c
*.so *.so
*.so.* *.so.*
libbz2.so.* libbz2.so.*
tags
tags.temp
tags.lock

View File

@ -69,7 +69,7 @@ $(build)/.built: $(tooldir)/.built $(build)/.skeleton.built
find $(build)/lib $(build)/usr/lib $(build)/usr/lib64 -name '*.la' -delete find $(build)/lib $(build)/usr/lib $(build)/usr/lib64 -name '*.la' -delete
touch $@ touch $@
buildkernel: $(build)/.kernel.built $(build)/.firmware.built buildkernel: $(build)/.kernel.built
$(info $(grn)=== Kernel build complete ===$(reset)) $(info $(grn)=== Kernel build complete ===$(reset))
.PHONY: buildkernel .PHONY: buildkernel
@ -78,10 +78,6 @@ $(build)/.kernel.built:
$(MAKE) -C kernel $(MAKE) -C kernel
touch $@ touch $@
$(build)/.firmware.built:
$(MAKE) -C firmware
touch $@
strip: $(build)/.stripped strip: $(build)/.stripped
.PHONY: strip .PHONY: strip

View File

@ -63,7 +63,6 @@ libressl-${libressl_version}.tar.gz \
libtool-${libtool_version}.tar.xz \ libtool-${libtool_version}.tar.xz \
libz-${libz_version}.tar.gz \ libz-${libz_version}.tar.gz \
linux-${linux_version}.tar.xz \ linux-${linux_version}.tar.xz \
linux-firmware-$(linux-firmware_version).tar.xz \
m4-${m4_version}.tar.xz \ m4-${m4_version}.tar.xz \
make-${make_version}.tar.gz \ make-${make_version}.tar.gz \
mandoc-${mandoc_version}.tar.gz \ mandoc-${mandoc_version}.tar.gz \
@ -73,7 +72,6 @@ mpc-${mpc_version}.tar.gz \
mpfr-${mpfr_version}.tar.xz \ mpfr-${mpfr_version}.tar.xz \
musl-$(musl_version).tar.gz \ musl-$(musl_version).tar.gz \
musl-fts-$(musl-fts_version).tar.gz \ musl-fts-$(musl-fts_version).tar.gz \
openssl-${openssl_version}.tar.gz \
ncurses-${ncurses_version}.tar.gz \ ncurses-${ncurses_version}.tar.gz \
netbsd-curses-${netbsd-curses_version}.tar.xz \ netbsd-curses-${netbsd-curses_version}.tar.xz \
ninja-${ninja_version}.tar.gz \ ninja-${ninja_version}.tar.gz \
@ -204,7 +202,7 @@ elfutils-${elfutils_version}.tar.bz2:
eudev: eudev-${eudev_version}.tar.gz eudev: eudev-${eudev_version}.tar.gz
eudev-${eudev_version}.tar.gz: eudev-${eudev_version}.tar.gz:
wget -c $(github)/eudev-project/eudev/releases/download/v$(eudev_version)/$@ wget -c https://dev.gentoo.org/~blueness/eudev/$@
execline: execline-{execline_version}.tar.gz execline: execline-{execline_version}.tar.gz
@ -214,7 +212,7 @@ execline-${execline_version}.tar.gz:
expat: expat-${expat_version}.tar.xz expat: expat-${expat_version}.tar.xz
expat-${expat_version}.tar.xz: expat-${expat_version}.tar.xz:
wget -c $(github)/libexpat/libexpat/releases/download/R_2_4_8/$@ wget -c $(github)/libexpat/libexpat/releases/download/R_2_2_10/$@
file: file-${file_version}.tar.gz file: file-${file_version}.tar.gz
@ -349,7 +347,7 @@ libelf-compat-${libelf-compat_version}.tar.xz:
libffi: libffi-${libffi_version}.tar.gz libffi: libffi-${libffi_version}.tar.gz
libffi-${libffi_version}.tar.gz: libffi-${libffi_version}.tar.gz:
wget -c $(github)/libffi/libffi/releases/download/v$(libffi_version)/$@ wget -c ftp://sourceware.org/pub/libffi/$@
libnl: libnl-${libnl_version}.tar.gz libnl: libnl-${libnl_version}.tar.gz
@ -374,12 +372,7 @@ libz-${libz_version}.tar.gz:
linux: linux-${linux_version}.tar.xz linux: linux-${linux_version}.tar.xz
linux-${linux_version}.tar.xz: linux-${linux_version}.tar.xz:
wget -c ${kernel}/kernel/v6.x/$@ wget -c ${kernel}/kernel/v5.x/$@
linux-firmware: linux-formware-$(linux-firmware_version).tar.xz
linux-firmware-$(linux-firmware_version).tar.xz:
wget -c https://mirrors.edge.kernel.org/pub/linux/kernel/firmware/$@
linux_rpi: linux_rpi-${linux_rpi_version}.tar.xz linux_rpi: linux_rpi-${linux_rpi_version}.tar.xz
@ -447,11 +440,6 @@ ninja: ninja-${ninja_version}.tar.gz
ninja-${ninja_version}.tar.gz: ninja-${ninja_version}.tar.gz:
wget -c ${github}/ninja-build/ninja/archive/v${ninja_version}/$@ wget -c ${github}/ninja-build/ninja/archive/v${ninja_version}/$@
openssl: openssl-${openssl_version}.tar.gz
openssl-${openssl_version}.tar.gz:
wget -c https://www.openssl.org/source/$@
patch: patch-${patch_version}.tar.xz patch: patch-${patch_version}.tar.xz
patch-${patch_version}.tar.xz: patch-${patch_version}.tar.xz:
@ -605,7 +593,7 @@ zsh-${zsh_version}.tar.xz:
zsh-doc: zsh-${zsh_version}-doc.tar.xz zsh-doc: zsh-${zsh_version}-doc.tar.xz
zsh-${zsh_version}-doc.tar.xz: zsh-${zsh_version}-doc.tar.xz:
wget -c https://www.zsh.org/pub/$@ wget -c http://www.zsh.org/pub/$@
zstd: zstd-${zstd_version}.tar.gz zstd: zstd-${zstd_version}.tar.gz

View File

@ -1,23 +0,0 @@
# Makefile - hhl - /usr/src/world/linux-firmware
# Copyright 2022 Nathan Fisher <nfisher.sr@gmail.com>
#
distname = linux-firmware
default_goal = install_firmware
include world.mk
objdir = $(srcdir)
install_firmware: $(objdir)/.installed
$(objdir)/.installed: $(srcdir)/.dirstamp | $(DESTDIR)/lib/firmware
$(MAKE) DESTDIR=$(DESTDIR) -C $(srcdir) install
$(DESTDIR)/lib/firmware:
install -d $@
$(srcdir)/.dirstamp: $(distlocal)
$(info $(grn)=== Extracting $(distlocal) ===$(reset))
tar -xf $(distlocal) -C $(basedir)/build/src-world-$(arch)
touch $@
$(distlocal):
$(MAKE) -C ../distfiles $(distfile)

View File

@ -31,10 +31,10 @@ ${pkgdbdir}/plist:
find usr/src -name '.built' -exec rm -rf {} + || true find usr/src -name '.built' -exec rm -rf {} + || true
find usr/src -name '.installed' -exec rm -rf {} + || true find usr/src -name '.installed' -exec rm -rf {} + || true
find ${dirs} -type f | while read f ; \ find ${dirs} -type f | while read f ; \
do echo file\|$$(stat -c %n\|%a\|root:root $${f})\|$$(file -b -e elf $${f}) ; \ do echo file\|$$(stat -c %n\|%a\|%u:%g $${f})\|$$(file -b -e elf $${f}) ; \
done > $@.in done > $@.in
find ${dirs} -type d | while read d ; \ find ${dirs} -type d | while read d ; \
do echo directory\|$$(stat -c %n\|%a\|root:root $${d}) ; \ do echo directory\|$$(stat -c %n\|%a\|%u:%g $${d}) ; \
done >> $@.in done >> $@.in
find ${dirs} -type c | while read c ; \ find ${dirs} -type c | while read c ; \
do echo device\|$${c}\|$$(file -b $${c}) ; \ do echo device\|$${c}\|$$(file -b $${c}) ; \
@ -44,10 +44,10 @@ ${pkgdbdir}/plist:
${pkgdbdir}/etc.plist: ${pkgdbdir}/etc.plist:
if [ ! -d ${pkgdbdir} ] ; then install -d ${pkgdbdir} ; fi if [ ! -d ${pkgdbdir} ] ; then install -d ${pkgdbdir} ; fi
find etc -type f | while read f ; \ find etc -type f | while read f ; \
do echo file\|$$(stat -c %n\|%a\|root:root $${f})\|$$(file -b -e elf $${f}) ; \ do echo file\|$$(stat -c %n\|%a\|%u:%g $${f})\|$$(file -b -e elf $${f}) ; \
done > $@.in done > $@.in
find etc -type d | while read d ; \ find etc -type d | while read d ; \
do echo directory\|$$(stat -c %n\|%a\|root:root $${d}) ; \ do echo directory\|$$(stat -c %n\|%a\|%u:%g $${d}) ; \
done >> $@.in done >> $@.in
mv -v $@.in $@ mv -v $@.in $@

View File

@ -1,18 +1,18 @@
# hhl.script.mk - hhl - /usr/include/mk # hhl.script.mk - hhl - /usr/include/mk
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com> # Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
# #
internal = true internal = true
src ?= src/${progname}.sh src ?= src/${progname}.sh
include world.mk include world.mk
include hhl.doc.mk include hhl.doc.mk
include hhl.colors.mk include hhl.colors.mk
ifeq (${sbin},1) ifneq (${sbin},true)
installdirs = ${sbindir}
binprog = ${sbindir}/${progname}
else
installdirs = ${bindir} installdirs = ${bindir}
binprog = ${bindir}/${progname} binprog = ${bindir}/${progname}
else
installdirs = ${sbindir}
binprog = ${sbindir}/${progname}
endif endif
bins = ${binprog} ${binlinks} bins = ${binprog} ${binlinks}

View File

@ -12,7 +12,7 @@ cflags += -fPIC
liblinks = $(libdir)/$(libmajor) $(libdir)/$(libbase) liblinks = $(libdir)/$(libmajor) $(libdir)/$(libbase)
install: $(libdir)/$(libminor) | $(liblinks) install: $(libdir)/$(libminor) | $(liblinks)
@echo -e "$(grn)=== Finished Building $(libminor) ===$(reset)" @echo -e "$(grn)=== Finished Building $(libminor) ===$(unset)"
all: $(libminor) all: $(libminor)
@ -30,11 +30,11 @@ $(objdir)/%.o: $(src)/%.c | $(objdir)
$(CC) $(cppflags) $(cflags) $(ldflags) -o $@ -c $< $(CC) $(cppflags) $(cflags) $(ldflags) -o $@ -c $<
$(objdir): $(objdir):
@echo -e "$(grn)=== Building for $(libname) ===$(reset)" @echo -e "$(grn)=== Building for $(libname) ===$(unset)"
install -d $(objdir) install -d $(objdir)
clean: clean:
@echo -e "$(grn)=== Cleaning for $(libname) ===$(reset)" @echo -e "$(grn)=== Cleaning for $(libname) ===$(unset)"
rm -rf $(objdir) $(libminor) $(libmajor) rm -rf $(objdir) $(libminor) $(libmajor)
.PHONY: all clean .PHONY: all clean

View File

@ -26,7 +26,6 @@ $(libdir)/$(staticlib): $(staticlib) | $(libdir)
install $< $@ install $< $@
clean: clean:
$(info $(grn)=== Cleaning for $(staticlib) ===$(reset))
rm -rf $(objdir) $(staticlib) rm -rf $(objdir) $(staticlib)
.PHONY: all clean .PHONY: all clean

View File

@ -4,7 +4,7 @@
include versions.mk include versions.mk
os_name = Hitch Hiker Linux os_name = Hitch Hiker Linux
os_abbrev = hhl os_abbrev = hhl
os_version = 2022q3 os_version = 2021q2
basedir = /src basedir = /src
include $(basedir)/config.mk include $(basedir)/config.mk
@ -68,7 +68,7 @@ objdir ?= $(global_objdir)/$(distfullname)
tooldir = $(basedir)/build/toolchain-$(arch) tooldir = $(basedir)/build/toolchain-$(arch)
export LC_ALL = POSIX export LC_ALL = POSIX
export PATH = $(tooldir)/bin:$(tooldir)/sbin:/usr/bin:/usr/bin/core_perl:/usr/sbin:/bin:/sbin export PATH = $(tooldir)/bin:$(tooldir)/sbin:/usr/bin:/usr/sbin:/bin:/sbin
_dhcpcd ?= 1 _dhcpcd ?= 1
_wireless ?= 1 _wireless ?= 1

View File

@ -3,102 +3,100 @@
# #
# package versions - hhl base # package versions - hhl base
acl_version = 2.3.1 acl_version = 2.2.53
argp-standalone_version = 1.4.1 argp-standalone_version = 1.4.1
attr_version = 2.5.1 attr_version = 2.4.48
autoconf_version = 2.71 autoconf_version = 2.71
automake_version = 1.16.5 automake_version = 1.16.3
bc_version = 6.0.1 bc_version = 3.2.5
binutils_version = 2.39 binutils_version = 2.36.1
bison_version = 3.8.2 bison_version = 3.7.5
busybox_version = 1.31.1 busybox_version = 1.31.1
bzip2_version = 1.0.8 bzip2_version = 1.0.8
cmake_version = 3.18.1 cmake_version = 3.18.1
coreutils_version = 8.32 coreutils_version = 8.32
curl_version = 7.84.0 curl_version = 7.71.0
dash_version = 0.5.11 dash_version = 0.5.11
dbus_version = 1.12.18 dbus_version = 1.12.18
diffutils_version = 3.8 diffutils_version = 3.7
dhcpcd_version = 9.4.1 dhcpcd_version = 8.1.6
e2fsprogs_version = 1.46.5 e2fsprogs_version = 1.46.0
elfutils_version = 0.187 elfutils_version = 0.182
eudev_version = 3.2.11 eudev_version = 3.2.9
execline_version = 2.9.0.1 execline_version = 2.7.0.1
expat_version = 2.4.8 expat_version = 2.2.10
file_version = 5.43 file_version = 5.39
findutils_version = 4.9.0 findutils_version = 4.8.0
flex_version = 2.6.4 flex_version = 2.6.4
gawk_version = 5.1.1 gawk_version = 5.1.0
gcc_version = 12.2.0 gcc_version = 10.2.0
gdbm_version = 1.23 gdbm_version = 1.19
gettext_version = 0.21 gettext_version = 0.21
gettext-tiny_version = 0.3.2 gettext-tiny_version = 0.3.2
glibc_version = 2.36 glibc_version = 2.33
gmp_version = 6.2.1 gmp_version = 6.2.1
gperf_version = 3.1 gperf_version = 3.1
grep_version = 3.7 grep_version = 3.6
groff_version = 1.22.4 groff_version = 1.22.4
grub_version = 2.06 grub_version = 2.04
gzip_version = 1.12 gzip_version = 1.10
haveged_version = 1.9.18 haveged_version = 1.9.14
iana-etc_version = 20220812 iana-etc_version = 20210115
inetutils_version = 2.3 inetutils_version = 1.9.4
intltool_version = 0.51.0 intltool_version = 0.51.0
iproute2_version = 5.19.0 iproute2_version = 5.10.0
kbd_version = 2.5.1 kbd_version = 2.4.0
kmod_version = 30 kmod_version = 28
less_version = 590 less_version = 563
libcap_version = 2.65 libcap_version = 2.47
libedit_version = 20191231-3.1 libedit_version = 20191231-3.1
libelf-compat_version = 0.152 libelf-compat_version = 0.152
libffi_version = 3.4.2 libffi_version = 3.3
libnl_version = 3.5.0 libnl_version = 3.5.0
libressl_version = 3.0.2 libressl_version = 3.0.2
libtool_version = 2.4.7 libtool_version = 2.4.6
libz_version = 1.2.8.2015.12.26 libz_version = 1.2.8.2015.12.26
linux_version = 6.1.1 linux_version = 5.11.5
linux-firmware_version = 20220815
linux_rpi_version = 5.4.45 linux_rpi_version = 5.4.45
m4_version = 1.4.19 m4_version = 1.4.18
make_version = 4.3 make_version = 4.3
man-pages_version = 5.13 man-pages_version = 5.10
mandoc_version = 1.14.5 mandoc_version = 1.14.5
meson_version = 0.61.1 meson_version = 0.56.2
mpc_version = 1.2.1 mpc_version = 1.2.1
mpfr_version = 4.1.0 mpfr_version = 4.1.0
musl_version = 1.2.2 musl_version = 1.2.2
musl-fts_version = 1.2.7 musl-fts_version = 1.2.7
ncurses_version = 6.3 ncurses_version = 6.2
netbsd-curses_version = 0.3.1 netbsd-curses_version = 0.3.1
ninja_version = 1.11.0 ninja_version = 1.10.2
openssl_version = 3.0.5
patch_version = 2.7.6 patch_version = 2.7.6
pcre_version = 8.45 pcre_version = 8.44
perl_version = 5.36.0 perl_version = 5.32.1
perl-cross_version = 1.3.5 perl-cross_version = 1.3.5
pkg-config_version = 0.29.2 pkg-config_version = 0.29.2
pkgsrc_version = 2022Q2 pkgsrc_version = 2020Q2
procps-ng_version = 3.3.16 procps-ng_version = 3.3.16
psmisc_version = 23.5 psmisc_version = 23.3
python_version = 3.10.6 python_version = 3.9.1
s6_version = 2.11.1.2 s6_version = 2.10.0.1
s6-linux-init_version = 1.0.8.0 s6-linux-init_version = 1.0.6.0
s6-rc_version = 0.5.3.2 s6-rc_version = 0.5.2.1
sed_version = 4.8 sed_version = 4.8
shadow_version = 4.12.2 shadow_version = 4.8.1
skalibs_version = 2.12.0.1 skalibs_version = 2.10.0.1
sysklogd_version = 1.5.1 sysklogd_version = 1.5.1
tar_version = 1.34 tar_version = 1.33
texinfo_version = 6.8 texinfo_version = 6.7
tzdata_version = 2022c tzdata_version = 2021a
u-boot_version = 2021.01 u-boot_version = 2021.01
udev-lfs_version = 20171102 udev-lfs_version = 20171102
util-linux_version = 2.36.1 util-linux_version = 2.36.1
vim_version = 8.2.2433 vim_version = 8.2.2433
wget_version = 1.21.3 wget_version = 1.21.1
wireless_tools_version = 29 wireless_tools_version = 29
wpa_supplicant_version = 2.9 wpa_supplicant_version = 2.9
XML-Parser_version = 2.46 XML-Parser_version = 2.46
xz_version = 5.2.6 xz_version = 5.2.5
zsh_version = 5.8.1 zsh_version = 5.8
zstd_version = 1.5.2 zstd_version = 1.4.8

View File

@ -43,6 +43,7 @@
#define STDERR_FILENO 2 /* standard error file descriptor */ #define STDERR_FILENO 2 /* standard error file descriptor */
int execvpe(const char *, char *const *, char *const *); int execvpe(const char *, char *const *, char *const *);
int closefrom(int);
int crypt_newhash(const char *, const char *, char *, size_t); int crypt_newhash(const char *, const char *, char *, size_t);
int getdtablecount(void); int getdtablecount(void);
int getentropy(void *, size_t); int getentropy(void *, size_t);

View File

@ -17,9 +17,6 @@ endif
ifeq ($(build_python), 1) ifeq ($(build_python), 1)
subdirs += python subdirs += python
endif endif
ifeq ($(build_file), 1)
subdirs += file
endif
subdirs += binutils subdirs += binutils
subdirs += gcc-pass1 subdirs += gcc-pass1
subdirs += linux-headers subdirs += linux-headers

View File

@ -1,8 +0,0 @@
# Makefile - hhl - /usr/src/world/gawk
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
#
distname = file
distext = gz
include toolchain.mk
config_opts += --disable-nls
include targets.mk

View File

@ -5,7 +5,7 @@ distname = glibc
patches += glibc-2.31-fhs-1.patch patches += glibc-2.31-fhs-1.patch
patches += glibc-no-test-installation.patch patches += glibc-no-test-installation.patch
patches += glibc-ldd-bash-in.patch patches += ldd-rewrite-nobash.patch
include world.mk include world.mk
-include locales.mk -include locales.mk
@ -22,10 +22,7 @@ define makelinks
ln -sfv ../lib/ld-linux-x86-64.so.2 $(DESTDIR)/lib64/ld-lsb-x86-64.so.3 ln -sfv ../lib/ld-linux-x86-64.so.2 $(DESTDIR)/lib64/ld-lsb-x86-64.so.3
endef endef
else ifeq ($(arch),armv7l) else ifeq ($(arch),armv7l)
define makelinks makelinks = ln -sfv ld-$(glibc_version).so $(DESTDIR)/lib/ld-linux.so.3
install $(objdir)/elf/ld.so $(DESTDIR)/lib/ld-$(glibc_version).so
ln -sfv ld-$(glibc_version).so $(DESTDIR)/lib/ld-linux.so.3
endef
else ifeq ($(arch),riscv64) else ifeq ($(arch),riscv64)
makelinks = ln -sfv ../lib/ld-linux-riscv64-lp64d.so.1 $(DESTDIR)/lib64 makelinks = ln -sfv ../lib/ld-linux-riscv64-lp64d.so.1 $(DESTDIR)/lib64
endif endif

View File

@ -1,9 +0,0 @@
diff -Naur glibc-2.36.orig/elf/ldd.bash.in glibc-2.36/elf/ldd.bash.in
--- glibc-2.36.orig/elf/ldd.bash.in 2022-08-25 16:05:09.631944502 -0400
+++ glibc-2.36/elf/ldd.bash.in 2022-08-25 16:05:36.539082495 -0400
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (C) 1996-2022 Free Software Foundation, Inc.
# This file is part of the GNU C Library.

View File

@ -8,7 +8,6 @@ include src-config.mk
subdirs += fs_skeleton subdirs += fs_skeleton
subdirs += man-pages subdirs += man-pages
subdirs += iana-etc subdirs += iana-etc
subdirs += tzdata
subdirs += libz subdirs += libz
subdirs += libbz2_static subdirs += libbz2_static
subdirs += libbz2_shared subdirs += libbz2_shared
@ -45,12 +44,10 @@ subdirs += expat
subdirs += kmod subdirs += kmod
subdirs += gettext subdirs += gettext
# for musl # for musl
#subdirs += argp-standalone subdirs += argp-standalone
subdirs += elfutils subdirs += elfutils
subdirs += libffi subdirs += libffi
subdirs += gawk subdirs += libressl
#subdirs += libressl
subdirs += openssl
subdirs += wget subdirs += wget
#subdirs += python #subdirs += python
#subdirs += ninja #subdirs += ninja
@ -68,9 +65,11 @@ subdirs += texinfo
subdirs += procps-ng subdirs += procps-ng
subdirs += util-linux subdirs += util-linux
# for musl # for musl
#subdirs += argp-standalone
# for musl
#subdirs += musl-fts #subdirs += musl-fts
subdirs += e2fsprogs subdirs += e2fsprogs
#subdirs += haveged subdirs += haveged
subdirs += eudev subdirs += eudev
subdirs += skalibs subdirs += skalibs
subdirs += execline subdirs += execline

View File

@ -1,12 +1,14 @@
# Makefile - hhl - /usr/src/world/bc # Makefile - hhl - /usr/src/world/bc
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com> # Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
# #
distname = bc distname = bc
patches += bc-configure.patch
no_objdir = 1
include world.mk include world.mk
export PREFIX = /usr export PREFIX = /usr
export CC = $(tgt)-gcc export CC = $(tgt)-gcc
export HOSTCC = gcc export HOSTCC = gcc
export HOSTCFLAGS = -std=c99 export HOSTCFLAGS = -std=c99
export CFLAGS = -std=c99 --sysroot=$(DESTDIR) export CFLAGS = -std=c99 --sysroot=$(DESTDIR)
config_cmd = cd $(objdir) && $(srcdir)/configure -G -O3 config_cmd = $(srcdir)/configure.sh -G -O3
include targets.mk include targets.mk

View File

@ -0,0 +1,11 @@
diff -Naur bc-3.2.5.orig/configure bc-3.2.5/configure
--- bc-3.2.5.orig/configure.sh 2021-01-30 19:35:41.000000000 -0500
+++ bc-3.2.5/configure.sh 2021-02-02 11:45:45.393574823 -0500
@@ -609,7 +609,6 @@
help* | bc-only* | dc-only* | coverage* | debug*)
usage "No arg allowed for --$arg option" ;;
disable-bc* | disable-dc* | disable-clean*)
- disable-extra-math*)
usage "No arg allowed for --$arg option" ;;
disable-generated-tests* | disable-history*)
usage "No arg allowed for --$arg option" ;;

View File

@ -0,0 +1,49 @@
# $NetBSD: Makefile,v 1.10 2018/08/12 09:03:21 christos Exp $
# $FreeBSD: head/usr.bin/grep/Makefile 210389 2010-07-22 19:11:57Z gabor $
# $OpenBSD: Makefile,v 1.6 2003/06/25 15:00:04 millert Exp $
PROG= grep
SRCS= fastgrep.c file.c grep.c queue.c util.c
LINKS= ${BINDIR}/grep ${BINDIR}/egrep \
${BINDIR}/grep ${BINDIR}/fgrep \
${BINDIR}/grep ${BINDIR}/zgrep \
${BINDIR}/grep ${BINDIR}/zegrep \
${BINDIR}/grep ${BINDIR}/zfgrep
MLINKS= grep.1 egrep.1 \
grep.1 fgrep.1 \
grep.1 zgrep.1 \
grep.1 zegrep.1 \
grep.1 zfgrep.1
.if empty(HOST_CPPFLAGS:M*-DWITHOUT_GZIP*)
LDADD+= -lz
DPADD+= ${LIBZ}
.endif
.if empty(HOST_CPPFLAGS:M*-DWITHOUT_BZ2*)
LDADD+= -lbz2
DPADD+= ${LIBBZ2}
.endif
.if empty(HOST_CPPFLAGS:M*-DWITHOUT_NLS*)
.PATH: ${.CURDIR}/nls
NLS= C.msg \
es_ES.ISO8859-1.msg \
gl_ES.ISO8859-1.msg \
hu_HU.ISO8859-2.msg \
ja_JP.eucJP.msg \
ja_JP.SJIS.msg \
ja_JP.UTF-8.msg \
pt_BR.ISO8859-1.msg \
ru_RU.KOI8-R.msg \
uk_UA.UTF-8.msg \
zh_CN.UTF-8.msg
.endif
COPTS.grep.c += -Wno-format-nonliteral
COPTS.util.c += -Wno-format-nonliteral
.include <bsd.prog.mk>

View File

@ -29,8 +29,7 @@
#define _GNU_SOURCE // getline, getopt #define _GNU_SOURCE // getline, getopt
#include <ctype.h> // isprint #include <ctype.h> // isprint
#include <err.h> // err, perror #include <err.h> // err
#include <errno.h> // errno
#include <inttypes.h> // uint*_t #include <inttypes.h> // uint*_t
#include <libgen.h> // basename #include <libgen.h> // basename
#include <stdio.h> // fclose, fopen, getline, nread, perror, printf #include <stdio.h> // fclose, fopen, getline, nread, perror, printf
@ -88,23 +87,6 @@ void _head(char *file) {
} }
} }
long parselong(char *buf) {
errno = 0;
char *endptr;
int num = strtol(optarg, &endptr, 10);
if (errno != 0) {
perror("Error parsing integer from input: ");
exit(EXIT_FAILURE);
} else if (num == 0 && endptr == optarg) {
fprintf(stderr, "Error: invalid input: %s\n", optarg);
exit(EXIT_FAILURE);
} else if (*endptr != '\0') {
fprintf(stderr, "Error: invalid input: %s\n", optarg);
exit(EXIT_FAILURE);
}
return num;
}
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
int c, index; int c, index;
__progname = basename(argv[0]); __progname = basename(argv[0]);
@ -127,7 +109,7 @@ int main(int argc, char *argv[]) {
switch (c) { switch (c) {
case 'c': case 'c':
cflag = 1; cflag = 1;
chars = (int)parselong(optarg); chars = (int)strtol(optarg, NULL, 10);
break; break;
case 'q': case 'q':
qflag = 1; qflag = 1;
@ -142,7 +124,7 @@ int main(int argc, char *argv[]) {
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
case 'n': case 'n':
nflag = 1; nflag = 1;
lines = (int)parselong(optarg); lines = (int)strtol(optarg, NULL, 10);
break; break;
case '0': case '0':
case '1': case '1':

View File

@ -28,13 +28,13 @@
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <sys/param.h> // HOST_NAME_MAX #include <sys/param.h>
#include <libgen.h> // basename #include <libgen.h>
#include <stdio.h> // printf, fprintf #include <stdio.h>
#include <stdlib.h> // exit #include <stdlib.h>
#include <string.h> // strlen #include <string.h>
#include <unistd.h> // gethostname, sethostname, getopt #include <unistd.h>
static const char *__progname; static const char *__progname;

View File

@ -3,7 +3,7 @@
# #
distname = elfutils distname = elfutils
distext = bz2 distext = bz2
#patches += elfutils-wnoerror.patch patches += elfutils-wnoerror.patch
#patches += elfutils-musl-no-error.patch #patches += elfutils-musl-no-error.patch
#patches += elfutils-musl-no-cdefs.patch #patches += elfutils-musl-no-cdefs.patch
include world.mk include world.mk

View File

@ -14,6 +14,7 @@ define post_install
install -d $(docdir)/expat/$(expat_version) install -d $(docdir)/expat/$(expat_version)
install -m644 $(srcdir)/doc/*.html $(docdir)/expat/$(expat_version) install -m644 $(srcdir)/doc/*.html $(docdir)/expat/$(expat_version)
install -m644 $(srcdir)/doc/*.css $(docdir)/expat/$(expat_version) install -m644 $(srcdir)/doc/*.css $(docdir)/expat/$(expat_version)
install -m644 $(srcdir)/doc/*.png $(docdir)/expat/$(expat_version)
endef endef
include targets.mk include targets.mk

View File

@ -22,4 +22,3 @@ kvm:x:61:
wheel:x:97: wheel:x:97:
nogroup:x:99: nogroup:x:99:
users:x:999: users:x:999:
s6log:x:963:

View File

@ -3,5 +3,4 @@ bin:x:1:1:bin:/dev/null:/bin/false
daemon:x:6:6:Daemon User:/dev/null:/bin/false daemon:x:6:6:Daemon User:/dev/null:/bin/false
messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
_file:x:964:964::/dev/null:/sbin/nologin _file:x:964:964::/home/_file:/usr/sbin/nologin
s6log:x:963:963::/dev/null:/sbin/nologin

View File

@ -1,8 +1,8 @@
# Setup for /bin/ls and /bin/grep to support color, the alias is in /etc/bashrc. # Setup for /bin/ls and /bin/grep to support color, the alias is in /etc/bashrc.
if [ -f "/etc/dircolors" ] if [ -f "/etc/dircolors" ] ; then
then eval $(dircolors -b /etc/dircolors) eval $(dircolors -b /etc/dircolors)
fi fi
if [ -f "$HOME/.dircolors" ] if [ -f "$HOME/.dircolors" ] ; then
then eval $(dircolors -b $HOME/.dircolors) eval $(dircolors -b $HOME/.dircolors)
fi fi

View File

@ -15,10 +15,8 @@ fi
if [ -x /usr/pkg/share/man ] if [ -x /usr/pkg/share/man ]
then MANPATH=/usr/pkg/share/man:${MANPATH} then MANPATH=/usr/pkg/share/man:${MANPATH}
fi fi
if [ -x /usr/pkg/man ]
then MANPATH=/usr/pkg/man:${MANPATH}
fi
if [ -x /usr/pkg/share/info ] if [ -x /usr/pkg/share/info ]
then INFOPATH=/usr/pkg/share/info:${INFOPATH} then INFOPATH=/usr/pkg/share/info:${INFOPATH}
fi fi
export PATH PKG_CONFIG_PATH MANPATH INFOPATH PKG_PATH=https://hitchhiker-linux.org/pub/${OS_VERSION}/${arch}/packages
export PATH PKG_CONFIG_PATH MANPATH INFOPATH PKG_PATH

View File

@ -1,6 +0,0 @@
if [ -r "/etc/tz" ]
then source /etc/tz
else
TZ="America/New_York"
fi
export TZ

View File

@ -1,27 +1,14 @@
if [ $UID = 0 ] if [ $UID = 0 ]
then PATH=/usr/bin:/usr/sbin:/bin:/sbin then PATH=/usr/bin:/usr/sbin:/bin:/sbin
if [ -d /usr/local/bin ] ; then PATH=/usr/local/bin:/usr/local/sbin:${PATH} ; fi if [ -d /usr/local/bin ] ; then PATH=/usr/local/bin:/usr/local/sbin:${PATH} ; fi
else else
PATH=/usr/bin:/bin PATH=/usr/bin:/bin
if [ -d /usr/local/bin ] ; then PATH=/usr/local/bin:${PATH} ; fi if [ -d /usr/local/bin ] ; then PATH=/usr/local/bin:${PATH} ; fi
fi fi
if [ -d ${HOME}/bin ] ; then PATH=${HOME}/bin:${PATH} ; fi if [ -d ${HOME}/bin ]
PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig then PATH=${HOME}/bin:PATH
MANPATH=/usr/share/man
INFOPATH=/usr/share/info
if [ -d /usr/local/lib/pkgconfig ]
then PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH}
fi fi
if [ -d /usr/local/share/pkgconfig ] export PATH
then PKG_CONFIG_PATH=/usr/local/share/pkgconfig:${PKG_CONFIG_PATH}
fi
if [ -d /usr/local/share/man ]
then MANPATH=/usr/local/share/man:${MANPATH}
fi
if [ -d /usr/local/share/info ]
then INFOPATH=/usr/local/share/info:${INFOPATH}
fi
export PATH PKG_CONFIG_PATH MANPATH INFOPATH
for script in /etc/zshenv.d/*.zsh for script in /etc/zshenv.d/*.zsh
do source ${script} do source ${script}
done done

View File

@ -1,8 +1,8 @@
# Setup for /bin/ls and /bin/grep to support color, the alias is in /etc/bashrc. # Setup for /bin/ls and /bin/grep to support color, the alias is in /etc/bashrc.
if [ -f "/etc/dircolors" ] if [ -f "/etc/dircolors" ] ; then
then eval $(dircolors -b /etc/dircolors) eval $(dircolors -b /etc/dircolors)
fi fi
if [ -f "$HOME/.dircolors" ] if [ -f "$HOME/.dircolors" ] ; then
then eval $(dircolors -b $HOME/.dircolors) eval $(dircolors -b $HOME/.dircolors)
fi fi

View File

@ -15,9 +15,6 @@ fi
if [ -x /usr/pkg/share/man ] if [ -x /usr/pkg/share/man ]
then MANPATH=/usr/pkg/share/man:${MANPATH} then MANPATH=/usr/pkg/share/man:${MANPATH}
fi fi
if [ -x /usr/pkg/man ]
then MANPATH=/usr/pkg/man:${MANPATH}
fi
if [ -x /usr/pkg/share/info ] if [ -x /usr/pkg/share/info ]
then INFOPATH=/usr/pkg/share/info:${INFOPATH} then INFOPATH=/usr/pkg/share/info:${INFOPATH}
fi fi

View File

@ -1,6 +0,0 @@
if [ -r "/etc/tz" ]
then source /etc/tz
else
TZ="America/New_York"
fi
export TZ

View File

@ -1,10 +0,0 @@
# Makefile - hhl - /usr/src/world/gawk
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
#
distname = gawk
include world.mk
config_opts += --host=$(tgt)
config_opts += --with-sysroot=$(build)
include targets.mk

View File

@ -2,7 +2,6 @@
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com> # Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
# #
distname = gcc distname = gcc
patches = gcc-nostdinc.patch
include world.mk include world.mk
ifeq ($(arch),x86_64) ifeq ($(arch),x86_64)

View File

@ -1,11 +0,0 @@
--- gcc-11.2.0.orig/configure 2021-07-28 02:55:06.628278148 -0400
+++ gcc-11.2.0.new/configure 2021-10-19 11:51:51.300514740 -0400
@@ -16478,7 +16478,7 @@
fi
-RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
+RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET -nostdinc++"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ar" >&5
$as_echo_n "checking where to find the target ar... " >&6; }

View File

@ -5,7 +5,7 @@ distname = glibc
patches += glibc-2.31-fhs-1.patch patches += glibc-2.31-fhs-1.patch
patches += glibc-no-test-installation.patch patches += glibc-no-test-installation.patch
patches += glibc-fix-interpreter.patch patches += ldd-rewrite-nobash.patch
include world.mk include world.mk
-include locales.mk -include locales.mk

View File

@ -1,18 +0,0 @@
diff '--color=auto' -Naur glibc-2.36.orig/elf/ldd.bash.in glibc-2.36/elf/ldd.bash.in
--- glibc-2.36.orig/elf/ldd.bash.in 2022-08-25 16:05:09.631944502 -0400
+++ glibc-2.36/elf/ldd.bash.in 2022-09-06 11:36:31.356744917 -0400
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (C) 1996-2022 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
diff '--color=auto' -Naur glibc-2.36.orig/timezone/tzselect.ksh glibc-2.36/timezone/tzselect.ksh
--- glibc-2.36.orig/timezone/tzselect.ksh 2022-08-25 16:05:10.408624969 -0400
+++ glibc-2.36/timezone/tzselect.ksh 2022-09-06 11:42:46.123011925 -0400
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Ask the user about the time zone, and output the resulting TZ value to stdout.
# Interact with the user via stderr and stdin.

View File

@ -0,0 +1,12 @@
diff -Naur glibc-2.31.orig/elf/Makefile glibc-2.31/elf/Makefile
--- glibc-2.31.orig/elf/Makefile 2020-02-01 06:52:50.000000000 -0500
+++ glibc-2.31/elf/Makefile 2020-07-13 10:21:19.374415161 -0400
@@ -594,7 +594,7 @@
-e 's%@VERSION@%$(version)%g' \
-e 's|@PKGVERSION@|$(PKGVERSION)|g' \
-e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g' \
- -e 's%@BASH@%$(BASH)%g' \
+ -e 's%@BASH@%/bin/sh%g' \
-e 's%@TEXTDOMAINDIR@%$(localedir)%g'
ifeq ($(ldd-rewrite-script),no)

View File

@ -23,11 +23,8 @@ PKG_CONFIG:=pkg-config
AR:=$(tgt)-ar AR:=$(tgt)-ar
CC:=$(tgt)-gcc CC:=$(tgt)-gcc
YACC:=bison YACC:=bison
TC_CONFIG_IPSET:=y
LIBDIR:=/usr/lib
IP_CONFIG_SETNS:=y IP_CONFIG_SETNS:=y
CFLAGS += -DHAVE_SETNS CFLAGS += -DHAVE_SETNS
CFLAGS += -DHAVE_HANDLE_AT
HAVE_ELF:=y HAVE_ELF:=y
CFLAGS += -DHAVE_ELF CFLAGS += -DHAVE_ELF
LDLIBS += -lelf LDLIBS += -lelf

View File

@ -3,7 +3,7 @@
# compat sources # compat sources
VPATH+= ${LIBCSRCDIR}/compat VPATH+= ${LIBCSRCDIR}/compat
SRCS+= fgetwln.c open.c setproctitle.c pledge-noop.c SRCS+= fgetwln.c open.c setproctitle.c pledge-noop.c closefrom.c
include ${.TOPDIR}/config.mk include ${.TOPDIR}/config.mk

View File

@ -0,0 +1,109 @@
/*
* Copyright (c) 2004-2005 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef HAVE_CLOSEFROM
#include <sys/types.h>
#include <sys/param.h>
#include <unistd.h>
#include <stdio.h>
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
#include <limits.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <unistd.h>
#ifdef HAVE_DIRENT_H
# include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
#else
# define dirent direct
# define NAMLEN(dirent) (dirent)->d_namlen
# ifdef HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif
# ifdef HAVE_SYS_DIR_H
# include <sys/dir.h>
# endif
# ifdef HAVE_NDIR_H
# include <ndir.h>
# endif
#endif
#ifndef OPEN_MAX
# define OPEN_MAX 256
#endif
#if 0
__unused static const char rcsid[] = "$Sudo: closefrom.c,v 1.11 2006/08/17 15:26:54 millert Exp $";
#endif /* lint */
/*
* Close all file descriptors greater than or equal to lowfd.
*/
#ifdef HAVE_FCNTL_CLOSEM
int
closefrom(int lowfd)
{
(void) fcntl(lowfd, F_CLOSEM, 0);
return 0;
}
#else
int
closefrom(int lowfd)
{
long fd, maxfd;
#if defined(HAVE_DIRFD) && defined(HAVE_PROC_PID)
char fdpath[PATH_MAX], *endp;
struct dirent *dent;
DIR *dirp;
int len;
/* Check for a /proc/$$/fd directory. */
len = snprintf(fdpath, sizeof(fdpath), "/proc/%ld/fd", (long)getpid());
if (len > 0 && (size_t)len <= sizeof(fdpath) && (dirp = opendir(fdpath))) {
while ((dent = readdir(dirp)) != NULL) {
fd = strtol(dent->d_name, &endp, 10);
if (dent->d_name != endp && *endp == '\0' &&
fd >= 0 && fd < INT_MAX && fd >= lowfd && fd != dirfd(dirp))
(void) close((int) fd);
}
(void) closedir(dirp);
} else
#endif
{
/*
* Fall back on sysconf() or getdtablesize(). We avoid checking
* resource limits since it is possible to open a file descriptor
* and then drop the rlimit such that it is below the open fd.
*/
#ifdef HAVE_SYSCONF
maxfd = sysconf(_SC_OPEN_MAX);
#else
maxfd = getdtablesize();
#endif /* HAVE_SYSCONF */
if (maxfd < 0)
maxfd = OPEN_MAX;
for (fd = lowfd; fd < maxfd; fd++)
(void) close((int) fd);
}
return 0;
}
#endif /* !HAVE_FCNTL_CLOSEM */
#endif /* HAVE_CLOSEFROM */

View File

@ -121,6 +121,7 @@ objs += $(objdir)/fgetwln.o
objs += $(objdir)/open.o objs += $(objdir)/open.o
objs += $(objdir)/setproctitle.o objs += $(objdir)/setproctitle.o
objs += $(objdir)/pledge-noop.o objs += $(objdir)/pledge-noop.o
objs += $(objdir)/closefrom.o
objs += $(objdir)/fgetln.o objs += $(objdir)/fgetln.o
objs += $(objdir)/freezero.o objs += $(objdir)/freezero.o
objs += $(objdir)/getdtablecount.o objs += $(objdir)/getdtablecount.o

View File

@ -43,6 +43,7 @@
#define STDERR_FILENO 2 /* standard error file descriptor */ #define STDERR_FILENO 2 /* standard error file descriptor */
int execvpe(const char *, char *const *, char *const *); int execvpe(const char *, char *const *, char *const *);
int closefrom(int);
int crypt_newhash(const char *, const char *, char *, size_t); int crypt_newhash(const char *, const char *, char *, size_t);
int getdtablecount(void); int getdtablecount(void);
int getentropy(void *, size_t); int getentropy(void *, size_t);

View File

@ -11,6 +11,6 @@ makeflags += lib=lib
export BUILD_CC = gcc export BUILD_CC = gcc
export SYSROOT = $(DESTDIR) export SYSROOT = $(DESTDIR)
export CROSS_COMPILE = $(tgt)- export CROSS_COMPILE = $(tgt)-
export COPTS = -O2 export COPTS = -O2 --sysroot=$(DESTDIR)
post_install = chmod 755 $(DESTDIR)/lib/libcap.so.$(libcap_version) post_install = chmod 755 $(DESTDIR)/lib/libcap.so.$(libcap_version)
include targets.mk include targets.mk

View File

@ -1,17 +1,17 @@
diff -Naur libcap-2.65.orig/Make.Rules libcap-2.65/Make.Rules diff -Naur libcap-2.47.orig/Make.Rules libcap-2.47/Make.Rules
--- libcap-2.65.orig/Make.Rules 2022-08-25 21:32:12.478981513 -0400 --- libcap-2.47.orig/Make.Rules 2021-01-23 21:06:05.000000000 -0500
+++ libcap-2.65/Make.Rules 2022-08-25 21:33:55.027444454 -0400 +++ libcap-2.47/Make.Rules 2021-02-02 23:53:56.595677007 -0500
@@ -63,7 +63,7 @@ @@ -76,7 +76,7 @@
KERNEL_HEADERS := $(topdir)/libcap/include/uapi
LIBCAP_INCLUDES = -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes)
DEFINES := -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-SYSTEM_HEADERS = /usr/include -SYSTEM_HEADERS = /usr/include
+SYSTEM_HEADERS = $(SYSROOT)/usr/include +SYSTEM_HEADERS = $(SYSROOT)/usr/include
INCS=$(topdir)/libcap/include/sys/capability.h
SUDO := sudo LDFLAGS += -L$(topdir)/libcap
CC := $(CROSS_COMPILE)gcc CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
@@ -121,7 +121,7 @@ @@ -89,7 +89,7 @@
# Force enabled with "make DYNAMIC=yes ...". # DYNAMIC controls how capsh etc are linked - to shared or static libraries
DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo $(SHARED); else echo no ; fi) DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo $(SHARED); else echo no ; fi)
-PAM_CAP ?= $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo $(SHARED) ; else echo no ; fi) -PAM_CAP ?= $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo $(SHARED) ; else echo no ; fi)

View File

@ -1,7 +1,8 @@
# Makefile - hhl - /usr/src/world/m4 # Makefile - hhl - /usr/src/world/m4
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com> # Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
# #
distname = m4 distname = m4
patches = m4-glibc-fixes.patch
include world.mk include world.mk
config_opts += --host=$(tgt) config_opts += --host=$(tgt)
CFLAGS += --sysroot=$(DESTDIR) CFLAGS += --sysroot=$(DESTDIR)

View File

@ -0,0 +1,107 @@
diff -Naur m4-1.4.18.orig/lib/fflush.c m4-1.4.18/lib/fflush.c
--- m4-1.4.18.orig/lib/fflush.c 2016-12-31 08:54:41.000000000 -0500
+++ m4-1.4.18/lib/fflush.c 2020-05-19 16:21:43.578036277 -0400
@@ -33,7 +33,7 @@
#undef fflush
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
/* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
static void
@@ -72,7 +72,7 @@
#endif
-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
# if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
@@ -148,7 +148,7 @@
if (stream == NULL || ! freading (stream))
return fflush (stream);
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
clear_ungetc_buffer_preserving_position (stream);
diff -Naur m4-1.4.18.orig/lib/fpending.c m4-1.4.18/lib/fpending.c
--- m4-1.4.18.orig/lib/fpending.c 2016-12-31 08:54:41.000000000 -0500
+++ m4-1.4.18/lib/fpending.c 2020-05-19 16:21:43.578036277 -0400
@@ -32,7 +32,7 @@
/* Most systems provide FILE as a struct and the necessary bitmask in
<stdio.h>, because they need it for implementing getc() and putc() as
fast macros. */
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
return fp->_IO_write_ptr - fp->_IO_write_base;
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
diff -Naur m4-1.4.18.orig/lib/fpurge.c m4-1.4.18/lib/fpurge.c
--- m4-1.4.18.orig/lib/fpurge.c 2016-12-31 08:54:41.000000000 -0500
+++ m4-1.4.18/lib/fpurge.c 2020-05-19 16:21:43.578036277 -0400
@@ -62,7 +62,7 @@
/* Most systems provide FILE as a struct and the necessary bitmask in
<stdio.h>, because they need it for implementing getc() and putc() as
fast macros. */
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
fp->_IO_read_end = fp->_IO_read_ptr;
fp->_IO_write_ptr = fp->_IO_write_base;
/* Avoid memory leak when there is an active ungetc buffer. */
diff -Naur m4-1.4.18.orig/lib/freadahead.c m4-1.4.18/lib/freadahead.c
--- m4-1.4.18.orig/lib/freadahead.c 2016-12-31 08:54:41.000000000 -0500
+++ m4-1.4.18/lib/freadahead.c 2020-05-19 16:21:43.578036277 -0400
@@ -25,7 +25,7 @@
size_t
freadahead (FILE *fp)
{
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
if (fp->_IO_write_ptr > fp->_IO_write_base)
return 0;
return (fp->_IO_read_end - fp->_IO_read_ptr)
diff -Naur m4-1.4.18.orig/lib/freading.c m4-1.4.18/lib/freading.c
--- m4-1.4.18.orig/lib/freading.c 2016-12-31 08:54:41.000000000 -0500
+++ m4-1.4.18/lib/freading.c 2020-05-19 16:21:43.578036277 -0400
@@ -31,7 +31,7 @@
/* Most systems provide FILE as a struct and the necessary bitmask in
<stdio.h>, because they need it for implementing getc() and putc() as
fast macros. */
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
return ((fp->_flags & _IO_NO_WRITES) != 0
|| ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
&& fp->_IO_read_base != NULL));
diff -Naur m4-1.4.18.orig/lib/fseeko.c m4-1.4.18/lib/fseeko.c
--- m4-1.4.18.orig/lib/fseeko.c 2016-12-31 08:54:41.000000000 -0500
+++ m4-1.4.18/lib/fseeko.c 2020-05-19 16:21:43.578036277 -0400
@@ -47,7 +47,7 @@
#endif
/* These tests are based on fpurge.c. */
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
if (fp->_IO_read_end == fp->_IO_read_ptr
&& fp->_IO_write_ptr == fp->_IO_write_base
&& fp->_IO_save_base == NULL)
@@ -123,7 +123,7 @@
return -1;
}
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
fp->_flags &= ~_IO_EOF_SEEN;
fp->_offset = pos;
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
diff -Naur m4-1.4.18.orig/lib/stdio-impl.h m4-1.4.18/lib/stdio-impl.h
--- m4-1.4.18.orig/lib/stdio-impl.h 2016-12-31 08:54:42.000000000 -0500
+++ m4-1.4.18/lib/stdio-impl.h 2020-05-19 16:21:43.601369662 -0400
@@ -138,3 +138,4 @@
# define _IOERR 0x10
#endif
+#define _IO_IN_BACKUP 0x100

View File

@ -2,9 +2,8 @@
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com> # Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
# #
distname = man-pages distname = man-pages
patches += man-pages-destdir.patch
no_objdir = 1 no_objdir = 1
use_configure = 0 use_configure = 0
include world.mk include world.mk
build_cmd =
install_cmd = $(MAKE) DESTDIR=$(DESTDIR) prefix=/usr -C $(objdir) install
include targets.mk include targets.mk

View File

@ -0,0 +1,22 @@
diff -Naur man-pages-5.10.orig/Makefile man-pages-5.10/Makefile
--- man-pages-5.10.orig/Makefile 2020-12-21 10:20:40.000000000 -0500
+++ man-pages-5.10/Makefile 2021-02-01 15:42:12.024004277 -0500
@@ -1,6 +1,5 @@
-DESTDIR=
prefix?=/usr
-MANDIR=$(prefix)/share/man
+MANDIR=$(DESTDIR)$(prefix)/share/man
all: remove install
@@ -24,8 +23,8 @@
install:
for i in man?; do \
- install -d -m 755 $(DESTDIR)$(MANDIR)/"$$i" || exit $$?; \
- install -m 644 "$$i"/* $(DESTDIR)$(MANDIR)/"$$i" || exit $$?; \
+ install -d -m 755 $(MANDIR)/"$$i" || exit $$?; \
+ install -m 644 "$$i"/* $(MANDIR)/"$$i" || exit $$?; \
done
# Check if groff reports warnings (may be words of sentences not displayed)

View File

@ -1,11 +1,11 @@
diff -Naur ncurses-6.3.orig/configure ncurses-6.3/configure diff -Naur ncurses-6.2.orig/configure ncurses-6.2/configure
--- ncurses-6.3.orig/configure 2021-10-17 11:12:23.000000000 -0400 --- ncurses-6.2.orig/configure 2020-02-08 16:06:19.000000000 -0500
+++ ncurses-6.3/configure 2022-05-10 13:31:50.225046310 -0400 +++ ncurses-6.2/configure 2021-02-02 23:19:21.212696811 -0500
@@ -16501,12 +16501,7 @@ @@ -15348,12 +15348,7 @@
echo "$as_me:16501: result: $enable_stripping" >&5 echo "$as_me:15348: result: $with_stripping" >&5
echo "${ECHO_T}$enable_stripping" >&6 echo "${ECHO_T}$with_stripping" >&6
-if test "$enable_stripping" = yes -if test "$with_stripping" = yes
-then -then
- INSTALL_OPT_S="-s" - INSTALL_OPT_S="-s"
-else -else
@ -13,5 +13,5 @@ diff -Naur ncurses-6.3.orig/configure ncurses-6.3/configure
-fi -fi
+INSTALL_OPT_S= +INSTALL_OPT_S=
: "${INSTALL:=install}" : ${INSTALL:=install}
echo "$as_me:16512: checking if install accepts -p option" >&5 echo "$as_me:15359: checking if install accepts -p option" >&5

View File

@ -1,37 +0,0 @@
# Makefile - hhl - /usr/src/world/openssl
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
#
distname = openssl
distext = gz
include world.mk
config_cmd = cd $(objdir) && $(srcdir)/Configure $(config_opts)
export CFLAGS = --sysroot=$(DESTDIR)
ifeq (aarch64, $(arch))
config_opts += linux-aarch64
endif
ifeq (riscv64, $(arch))
config_opts += linux64-riscv64
endif
ifeq (x86_64, $(arch))
config_opts += linux-x86_64
endif
ifeq ($(filter i486 i586 i686, $(arch)), $(arch))
config_opts += linux-x86
endif
ifeq (i486, $(arch))
export CFLAGS = -latomic
endif
ifeq (armv7l, $(arch))
config_opts += linux-generic32
export CFLAGS = -latomic
endif
config_opts += --cross-compile-prefix=$(tgt)-
config_opts += --openssldir=/etc/ssl
config_opts += --libdir=/usr/lib
config_opts += shared
consif_opts += zlib-dynamic
include targets.mk

View File

@ -2,6 +2,7 @@
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com> # Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
# #
distname = psmisc distname = psmisc
patches += psmisc-malloc.patch
include world.mk include world.mk
config_opts += --host=$(tgt) config_opts += --host=$(tgt)
export CFLAGS = --sysroot=$(DESTDIR) export CFLAGS = --sysroot=$(DESTDIR)

View File

@ -0,0 +1,55 @@
diff -Naur psmisc-23.3.orig/configure psmisc-23.3/configure
--- psmisc-23.3.orig/configure 2019-10-24 06:25:15.231547509 -0400
+++ psmisc-23.3/configure 2021-02-03 00:15:16.265839933 -0500
@@ -9658,25 +9658,9 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
-if test $ac_cv_func_malloc_0_nonnull = yes; then :
$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
-else
- $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
-
- case " $LIBOBJS " in
- *" malloc.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
- ;;
-esac
-
-
-$as_echo "#define malloc rpl_malloc" >>confdefs.h
-
-fi
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
$as_echo_n "checking for working memcmp... " >&6; }
if ${ac_cv_func_memcmp_working+:} false; then :
@@ -9787,25 +9771,9 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
-if test $ac_cv_func_realloc_0_nonnull = yes; then :
$as_echo "#define HAVE_REALLOC 1" >>confdefs.h
-else
- $as_echo "#define HAVE_REALLOC 0" >>confdefs.h
-
- case " $LIBOBJS " in
- *" realloc.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS realloc.$ac_objext"
- ;;
-esac
-
-
-$as_echo "#define realloc rpl_realloc" >>confdefs.h
-
-fi
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5
$as_echo_n "checking whether stat accepts an empty string... " >&6; }
if ${ac_cv_func_stat_empty_string_bug+:} false; then :

View File

@ -1,21 +1,12 @@
# Makefile - hhl - /src/world/bin/s6-scripts # Makefile - hhl - /src/world/bin/s6-scripts
# Copyright 2021 Nathan Fisher <nfisher.sr@gmail.com> # Copyright 2021 Nathan Fisher <nfisher.sr@gmail.com>
# #
progname = init progname = init
export exec_prefix = $(DESTDIR)
export sbin = 1
include hhl.script.mk include hhl.script.mk
VPATH += bin
scripts += halt sysctl_libdir = $(DESTDIR)/usr/lib/sysctl.d
scripts += poweroff
scripts += reboot
scripts += shutdown
scripts += telinit
sysctl_libdir = $(DESTDIR)/usr/lib/sysctl.d install: $(sysctl_libdir)/50-default.conf install_conf
install: $(sysctl_libdir)/50-default.conf install_conf install_scripts
$(sysctl_libdir)/50-default.conf: data/50-default.conf | $(sysctl_libdir) $(sysctl_libdir)/50-default.conf: data/50-default.conf | $(sysctl_libdir)
install -m644 $< $@ install -m644 $< $@
@ -23,11 +14,7 @@ $(sysctl_libdir)/50-default.conf: data/50-default.conf | $(sysctl_libdir)
install_conf: install_conf:
cp -R etc $(DESTDIR) cp -R etc $(DESTDIR)
install_scripts: $(scripts)
for script in $(scripts) ; \
do install -m755 bin/$$script $(DESTDIR)/sbin ; done
$(sysctl_libdir): $(sysctl_libdir):
install -d $@ install -d $@
.PHONY: install_conf install_scripts .PHONY: install_conf

View File

@ -1,3 +0,0 @@
#!/bin/execlineb -S0
s6-linux-init-hpr -h $@

View File

@ -1,3 +0,0 @@
#!/bin/execlineb -S0
s6-linux-init-hpr -p $@

View File

@ -1,3 +0,0 @@
#!/bin/execlineb -S0
s6-linux-init-hpr -r $@

View File

@ -1,3 +0,0 @@
#!/bin/execlineb -S0
s6-linux-init-shutdown $@

View File

@ -1,3 +0,0 @@
#!/bin/execlineb -S0
s6-linux-init-telinit $@

View File

@ -1,3 +1,3 @@
#!/bin/execlineb -P #!/sbin/execlineb -P
s6-linux-init-shutdown -a -r -- now s6-linux-init-shutdown -a -r -- now

View File

@ -1,3 +1,3 @@
#!/bin/execlineb -P #!/sbin/execlineb -P
s6-linux-init-shutdown -a -p -- now s6-linux-init-shutdown -a -p -- now

View File

@ -1,2 +1,2 @@
#!/bin/execlineb -P #!/sbin/execlineb -P

View File

@ -1,2 +1,2 @@
#!/bin/execlineb -P #!/sbin/execlineb -P

View File

@ -1,3 +1,3 @@
#!/bin/execlineb -P #!/sbin/execlineb -P
s6-linux-init-shutdown -a -p -- now s6-linux-init-shutdown -a -p -- now

View File

@ -1,3 +1,3 @@
#!/bin/execlineb -P #!/sbin/execlineb -P
s6-linux-init-shutdown -a -h -- now s6-linux-init-shutdown -a -h -- now

View File

@ -1,2 +1,2 @@
#!/bin/execlineb -P #!/sbin/execlineb -P

View File

@ -1,4 +1,4 @@
#!/bin/execlineb -P #!/sbin/execlineb -P
redirfd -w 2 /dev/console redirfd -w 2 /dev/console
fdmove -c 1 2 fdmove -c 1 2

View File

@ -1,4 +1,4 @@
#!/bin/execlineb -P #!/sbin/execlineb -P
redirfd -w 2 /dev/console redirfd -w 2 /dev/console
fdmove -c 1 2 fdmove -c 1 2

View File

@ -1,3 +1,3 @@
#!/bin/execlineb -P #!/sbin/execlineb -P
/bin/getty tty1 /sbin/agetty -L -8 tty1 115200

View File

@ -1,4 +1,4 @@
#!/bin/execlineb -P #!/sbin/execlineb -P
fdmove -c 2 1 fdmove -c 2 1
fdmove 1 3 fdmove 1 3

View File

@ -1,3 +1,3 @@
#!/bin/execlineb -P #!/sbin/execlineb -P
s6-linux-init-shutdownd -c "/etc/s6/current" -g 3000 s6-linux-init-shutdownd -c "/etc/s6/current" -g 3000

View File

@ -1,4 +1,4 @@
#!/bin/execlineb -P #!/sbin/execlineb -P
fdmove -c 1 2 fdmove -c 1 2
redirfd -rnb 0 fifo redirfd -rnb 0 fifo

View File

@ -1,5 +0,0 @@
#!/bin/execlineb -P
if { pipeline { redirfd -w 2 /dev/null s6-rc -a list } grep -qFx mount-filesystems }
envfile /etc/s6/sv/getty-tty1/conf
importas -iu SPAWN SPAWN
exec getty /dev/tty1

View File

@ -1,5 +0,0 @@
#!/bin/execlineb -P
if { pipeline { redirfd -w 2 /dev/null s6-rc -a list } grep -qFx mount-filesystems }
envfile /etc/s6/sv/getty-tty2/conf
importas -iu SPAWN SPAWN
exec getty /dev/tty2

View File

@ -1,5 +0,0 @@
#!/bin/execlineb -P
if { pipeline { redirfd -w 2 /dev/null s6-rc -a list } grep -qFx mount-filesystems }
envfile /etc/s6/sv/getty-tty3/conf
importas -iu SPAWN SPAWN
exec getty /dev/tty3

View File

@ -1,5 +0,0 @@
#!/bin/execlineb -P
if { pipeline { redirfd -w 2 /dev/null s6-rc -a list } grep -qFx mount-filesystems }
envfile /etc/s6/sv/getty-tty4/conf
importas -iu SPAWN SPAWN
exec getty /dev/tty4

View File

@ -1,5 +0,0 @@
#!/bin/execlineb -P
if { pipeline { redirfd -w 2 /dev/null s6-rc -a list } grep -qFx mount-filesystems }
envfile /etc/s6/sv/getty-tty5/conf
importas -iu SPAWN SPAWN
exec getty /dev/tty5

View File

@ -1,5 +0,0 @@
#!/bin/execlineb -P
if { pipeline { redirfd -w 2 /dev/null s6-rc -a list } grep -qFx mount-filesystems }
envfile /etc/s6/sv/getty-tty6/conf
importas -iu SPAWN SPAWN
exec getty /dev/tty6

Some files were not shown because too many files have changed in this diff Show More