From 1daf71c2980b1920bbdc2f07af669ebf6f0f82d6 Mon Sep 17 00:00:00 2001 From: davidovski Date: Sat, 12 Mar 2022 23:00:02 +0000 Subject: added patches for broken files --- repo/devel/distcc.xibuild | 18 +- repo/meta/all.xibuild | 2 +- repo/meta/base-build.xibuild | 2 +- repo/meta/base.xibuild | 2 +- repo/meta/repo-devel.xibuild | 2 +- repo/meta/repo-system.xibuild | 2 +- repo/meta/repo-util.xibuild | 2 +- repo/meta/repo-xi.xibuild | 2 +- repo/system/bzip2.xibuild | 2 +- repo/system/elogind.xibuild | 2 +- repo/system/mkinitramfs.xibuild | 370 ---------------------------------------- repo/system/sbase.xibuild | 5 +- repo/system/shadow.xibuild | 41 ++++- repo/system/ubase.xibuild | 9 +- repo/util/net-tools.xibuild | 18 +- repo/xi/mkinitramfs.xibuild | 15 ++ repo/xi/xipkg.xibuild | 2 +- repo/xi/xiutils.xibuild | 4 +- 18 files changed, 103 insertions(+), 397 deletions(-) delete mode 100644 repo/system/mkinitramfs.xibuild create mode 100644 repo/xi/mkinitramfs.xibuild (limited to 'repo') diff --git a/repo/devel/distcc.xibuild b/repo/devel/distcc.xibuild index d7ceaf2..f333ed6 100644 --- a/repo/devel/distcc.xibuild +++ b/repo/devel/distcc.xibuild @@ -1,16 +1,30 @@ #!/bin/sh -MAKEDEPS="python make " +MAKEDEPS="python make automake autoconf" DEPS="gcc python popt musl-obstack" PKG_VER=3.4 SOURCE=https://github.com/distcc/distcc/releases/download/v$PKG_VER/distcc-$PKG_VER.tar.gz +ADDITIONAL=" + gcc-10.patch + dcc_gcc_rewrite_fqn-avoid-heap-corruption.patch + distcc-hardened.patch +" DESC="Distributed compiler for C, C++ and Objective-C" +prepare () { + apply_patches +} + build () { - ./configure --prefix=/usr + ./configure --prefix=/usr \ + --without-libiberty \ + --disable-Werror \ + --without-gtk \ + + make } diff --git a/repo/meta/all.xibuild b/repo/meta/all.xibuild index deb8f04..ad7a162 100644 --- a/repo/meta/all.xibuild +++ b/repo/meta/all.xibuild @@ -2,4 +2,4 @@ # This file was automatically generated, do not edit! DESC="AlL tHe pacKageS!!" -DEPS=" feh lynx rxvt-unicode vim xterm asciidoc autoconf2-13 autoconf-archive autoconf automake bc bison check clang cmake-extra cmake-modules cmake dejagnu distcc docbook4-xml docbook-dtd docbook-xml docbook-xsl expect flex gcc gdb git go gtk-doc help2man icecream itstool llvm m4 make meson mpc nasm ninja patch pkg-config rustc sgml-common texinfo xmlto encodings font-adobe-utopia-type1 font-alias font-bh-ttf font-bh-type1 fontconfig font-ibm-type1 font-misc-ethiopic font-util font-xfree86-type1 linux-firmware linux-headers linux alsa-firmware alsa-lib alsa-plugins alsa-tools alsa-utils audiofile faac faad2 fdk-aac flac libogg libsamplerate libsndfile libtheora libvorbis libvpx opus pipewire pulseaudio python-alabaster python-appdirs python-babel python-certifi python-chardet python-docutils python-html5lib python-idna python-imagesize python-Jinja2 python-jinja python-lxml python-mach python-mako python-markupsafe python-packaging python-pip python-pygments python-pyparsing python-pytz python-requests python-six python-snowballstemmer python-sphinx-alabaster-theme python-sphinxcontrib-applehelp python-sphinxcontrib-devhelp python-sphinxcontrib-htmlhelp python-sphinxcontrib-jsmath python-sphinxcontrib-qthelp python-sphinxcontrib-serializinghtml python-sphinx python-urllib3 python-webencodings python alsa-oss cacert-utils fakechroot fakeroot icecream-sundae polybar xf86-video-qxl xf86-video-vga acl acpid argp-standalone attr binutils bootscripts brotli bzip2 cacerts dbus dhcp efibootmgr efivar elfutils elogind eudev execline expat findutils freetype2 gc gdbm gettext glib gmp gnutls gobject-introspection gperf grub guile gzip iana-etc icu imlib2 intltool js78 kbd kmod krb5 ldns libarchive libcap-ng libcap libdwarf libelf libffi libgudev libidn libldap liblinear libndp libnghttp libnl libp11-kit libpcap libpipeline libpng libpsl libptytty libsasl libseccomp libsigsegv libssh2 libtasn1 libtirpc libtool libunistring libusb libxcrypt libxml2 libxslt lua lz4 lzo mkinitramfs mpfr mtdev musl-fts musl-legacy-compat musl-obstack musl ncurses nettle networkmanager newt nspr nsss nss openssl pahole pam pcre2 pcre perl perl-xml-parser polkit popt psmisc queue-standalone readline rtmpdump s6-linux-init s6-linux-utils s6-portable-utils s6-rc s6 sbase sed shadow skalibs slang sqlite3 sysklogd tar tcl tomlc99 ubase utmps xxhash xz zip zlib zstd acpi bash cpio curl dash diffutils dosfstools dracut e2fsprogs file fzf gawk genfstab grep groff htop inetutils iproute2 iw keyutils less lm-sensors man-db neofetch nmap openssh pciutils pm-utils procps-ng rsync sudo unzip usbutils util-linux webfs wget which wireless-tools wpa_supplicant bspwm iceauth intel-vaapi-driver libdmx libdrm libepoxy libevdev libfontenc libfs libice libinput libpciaccess libsm libva libvdpau-va-gl libvdpau libwacom libx11 libxau libxaw libxcb libxcomposite libxcursor libxcvt libxdamage libxdmcp libxext libxfixes libxfont2 libxft libxinerama libxi libxkbfile libxmu libxpm libxrandr libxrender libxres libxscrnsaver libxshmfence libxtst libxt libxvmc libxv libxxf86dga libxxf86vm luit mesa mkfontscale pixman sessreg setxkbmap smproxy sxhkd wayland-protocols wayland x11perf xauth xbacklight xbitmaps xcb-proto xcb-util-cursor xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm xcb-util xclock xcmsdb xcursorgen xcursor-themes xdpyinfo xdriinfo xev xeyes xf86-input-evdev xf86-input-libinput xf86-input-synaptics xf86-input-wacom xf86-video-amdgpu xf86-video-ati xf86-video-fbdev xf86-video-intel xf86-video-nouveau xf86-video-vmware xgamma xhost xinput xkbcomp xkbevd xkbutils xkeyboardconfig xkill xlsatoms xlsclients xmessage xmodmap xorg-libs xorgproto xorg-server xorg-util-macros xorg-xinit xprop xpr xrandr xrdb xrefresh xsetroot xset xtrans xvinfo xwd xwininfo xwud sysconfigs xib xichroot xipkg xiutils" +DEPS=" feh lynx rxvt-unicode vim xterm asciidoc autoconf2-13 autoconf-archive autoconf automake bc bison check clang cmake-extra cmake-modules cmake dejagnu distcc docbook4-xml docbook-dtd docbook-xml docbook-xsl expect flex gcc gdb git go gtk-doc help2man icecream itstool llvm m4 make meson mpc nasm ninja patch pkg-config rustc sgml-common swig texinfo xmlto encodings font-adobe-utopia-type1 font-alias font-bh-ttf font-bh-type1 fontconfig font-ibm-type1 font-misc-ethiopic font-util font-xfree86-type1 linux-firmware linux-headers linux alsa-firmware alsa-lib alsa-plugins alsa-tools alsa-utils audiofile faac faad2 fdk-aac flac libogg libsamplerate libsndfile libtheora libvorbis libvpx opus pipewire pulseaudio python-alabaster python-appdirs python-babel python-certifi python-chardet python-docutils python-html5lib python-idna python-imagesize python-Jinja2 python-jinja python-lxml python-mach python-mako python-markupsafe python-packaging python-pip python-pygments python-pyparsing python-pytz python-requests python-six python-snowballstemmer python-sphinx-alabaster-theme python-sphinxcontrib-applehelp python-sphinxcontrib-devhelp python-sphinxcontrib-htmlhelp python-sphinxcontrib-jsmath python-sphinxcontrib-qthelp python-sphinxcontrib-serializinghtml python-sphinx python-urllib3 python-webencodings python alsa-oss audit cacert-utils fakechroot fakeroot icecream-sundae polybar xf86-video-qxl xf86-video-vga acl acpid argp-standalone attr binutils bootscripts brotli bzip2 cacerts dbus dhcp efibootmgr efivar elfutils elogind eudev execline expat findutils freetype2 gc gdbm gettext glib gmp gnutls gobject-introspection gperf grub guile gzip iana-etc icu imlib2 intltool js78 jsoncpp kbd kmod krb5 ldns libarchive libcap-ng libcap libdwarf libedit libelf libffi libgcrypt libgpg-error libgudev libidn libldap liblinear libndp libnghttp libnl libnsl libp11-kit libpcap libpipeline libpng libpsl libptytty libsasl libseccomp libsigsegv libssh2 libtasn1 libtirpc libtool libunistring libusb libuv libxcrypt libxml2 libxslt lua lz4 lzo mpfr mtdev musl-fts musl-legacy-compat musl-obstack musl ncurses nettle networkmanager newt nspr nsss nss openssl pahole pam pcre2 pcre perl perl-xml-parser polkit popt psmisc queue-standalone readline rtmpdump s6-linux-init s6-linux-utils s6-portable-utils s6-rc s6 sbase sed shadow sh skalibs slang sqlite3 sysklogd tar tcl tomlc99 ubase utmps xxhash xz zip zlib zstd acpi bash cpio curl dash diffutils dosfstools dracut e2fsprogs file fzf gawk genfstab grep groff htop inetutils iproute2 iw keyutils less lm-sensors man-db neofetch net-tools nmap openssh pciutils pm-utils procps-ng rhash rsync sudo unzip usbutils util-linux webfs wget which wireless-tools wpa_supplicant bspwm iceauth intel-vaapi-driver libdmx libdrm libepoxy libevdev libfontenc libfs libice libinput libpciaccess libsm libva libvdpau-va-gl libvdpau libwacom libx11 libxau libxaw libxcb libxcomposite libxcursor libxcvt libxdamage libxdmcp libxext libxfixes libxfont2 libxft libxinerama libxi libxkbfile libxmu libxpm libxrandr libxrender libxres libxscrnsaver libxshmfence libxtst libxt libxvmc libxv libxxf86dga libxxf86vm luit mesa mkfontscale pixman sessreg setxkbmap smproxy sxhkd wayland-protocols wayland x11perf xauth xbacklight xbitmaps xcb-proto xcb-util-cursor xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm xcb-util xclock xcmsdb xcursorgen xcursor-themes xdpyinfo xdriinfo xev xeyes xf86-input-evdev xf86-input-libinput xf86-input-synaptics xf86-input-wacom xf86-video-amdgpu xf86-video-ati xf86-video-fbdev xf86-video-intel xf86-video-nouveau xf86-video-vmware xgamma xhost xinput xkbcomp xkbevd xkbutils xkeyboardconfig xkill xlsatoms xlsclients xmessage xmodmap xorg-libs xorgproto xorg-server xorg-util-macros xorg-xinit xprop xpr xrandr xrdb xrefresh xsetroot xset xtrans xvinfo xwd xwininfo xwud mkinitramfs sysconfigs xib xichroot xipkg xiutils" diff --git a/repo/meta/base-build.xibuild b/repo/meta/base-build.xibuild index 1daf0a8..dfe8ac1 100644 --- a/repo/meta/base-build.xibuild +++ b/repo/meta/base-build.xibuild @@ -1,4 +1,4 @@ #!/bin/sh -DEPS="musl binutils gcc linux-headers tcl expect dejagnu m4 ncurses dash bison bzip2 sbase ubase diffutils file findutils gawk grep sed gzip make patch perl tar texinfo xz flex" +DEPS="musl binutils gcc linux-headers tcl expect dejagnu m4 ncurses dash bison bzip2 sbase diffutils file findutils gawk grep sed gzip make patch perl tar texinfo xz flex" DESC="Base toolchain used to build other packages" diff --git a/repo/meta/base.xibuild b/repo/meta/base.xibuild index b13a24b..14f3f98 100644 --- a/repo/meta/base.xibuild +++ b/repo/meta/base.xibuild @@ -1,5 +1,5 @@ #!/bin/sh -DEPS="bash bzip2 sbase ubase s6 bootscripts findutils iana-etc file gawk gettext musl grep gzip iproute2 iputils xipkg pciutils procps-ng psmisc sed shadow tar util-linux xz linux-headers sysconfigs inetutils" +DEPS="bash bzip2 sbase s6 bootscripts findutils iana-etc file gawk gettext musl grep gzip iproute2 iputils xipkg pciutils procps-ng psmisc sed shadow tar util-linux xz linux-headers sysconfigs inetutils mkinitramfs genfstab" MAKEDEPS="grep python" DESC="The base system to be installed" diff --git a/repo/meta/repo-devel.xibuild b/repo/meta/repo-devel.xibuild index 639c4ad..5226f32 100644 --- a/repo/meta/repo-devel.xibuild +++ b/repo/meta/repo-devel.xibuild @@ -2,4 +2,4 @@ # This file was automatically generated, do not edit! DESC="All the the packages available in devel" -DEPS=" asciidoc autoconf2-13 autoconf-archive autoconf automake bc bison check clang cmake-extra cmake-modules cmake dejagnu distcc docbook4-xml docbook-dtd docbook-xml docbook-xsl expect flex gcc gdb git go gtk-doc help2man icecream itstool llvm m4 make meson mpc nasm ninja patch pkg-config rustc sgml-common texinfo xmlto" +DEPS=" asciidoc autoconf2-13 autoconf-archive autoconf automake bc bison check clang cmake-extra cmake-modules cmake dejagnu distcc docbook4-xml docbook-dtd docbook-xml docbook-xsl expect flex gcc gdb git go gtk-doc help2man icecream itstool llvm m4 make meson mpc nasm ninja patch pkg-config rustc sgml-common swig texinfo xmlto" diff --git a/repo/meta/repo-system.xibuild b/repo/meta/repo-system.xibuild index c1326e9..ae37f0c 100644 --- a/repo/meta/repo-system.xibuild +++ b/repo/meta/repo-system.xibuild @@ -2,4 +2,4 @@ # This file was automatically generated, do not edit! DESC="All the the packages available in system" -DEPS=" acl acpid argp-standalone attr binutils bootscripts brotli bzip2 cacerts dbus dhcp efibootmgr efivar elfutils elogind eudev execline expat findutils freetype2 gc gdbm gettext glib gmp gnutls gobject-introspection gperf grub guile gzip iana-etc icu imlib2 intltool js78 kbd kmod krb5 ldns libarchive libcap-ng libcap libdwarf libelf libffi libgudev libidn libldap liblinear libndp libnghttp libnl libp11-kit libpcap libpipeline libpng libpsl libptytty libsasl libseccomp libsigsegv libssh2 libtasn1 libtirpc libtool libunistring libusb libxcrypt libxml2 libxslt lua lz4 lzo mkinitramfs mpfr mtdev musl-fts musl-legacy-compat musl-obstack musl ncurses nettle networkmanager newt nspr nsss nss openssl pahole pam pcre2 pcre perl perl-xml-parser polkit popt psmisc queue-standalone readline rtmpdump s6-linux-init s6-linux-utils s6-portable-utils s6-rc s6 sbase sed shadow skalibs slang sqlite3 sysklogd tar tcl tomlc99 ubase utmps xxhash xz zip zlib zstd" +DEPS=" acl acpid argp-standalone attr binutils bootscripts brotli bzip2 cacerts dbus dhcp efibootmgr efivar elfutils elogind eudev execline expat findutils freetype2 gc gdbm gettext glib gmp gnutls gobject-introspection gperf grub guile gzip iana-etc icu imlib2 intltool js78 jsoncpp kbd kmod krb5 ldns libarchive libcap-ng libcap libdwarf libedit libelf libffi libgcrypt libgpg-error libgudev libidn libldap liblinear libndp libnghttp libnl libnsl libp11-kit libpcap libpipeline libpng libpsl libptytty libsasl libseccomp libsigsegv libssh2 libtasn1 libtirpc libtool libunistring libusb libuv libxcrypt libxml2 libxslt lua lz4 lzo mpfr mtdev musl-fts musl-legacy-compat musl-obstack musl ncurses nettle networkmanager newt nspr nsss nss openssl pahole pam pcre2 pcre perl perl-xml-parser polkit popt psmisc queue-standalone readline rtmpdump s6-linux-init s6-linux-utils s6-portable-utils s6-rc s6 sbase sed shadow sh skalibs slang sqlite3 sysklogd tar tcl tomlc99 ubase utmps xxhash xz zip zlib zstd" diff --git a/repo/meta/repo-util.xibuild b/repo/meta/repo-util.xibuild index 7d425b5..e89983a 100644 --- a/repo/meta/repo-util.xibuild +++ b/repo/meta/repo-util.xibuild @@ -2,4 +2,4 @@ # This file was automatically generated, do not edit! DESC="All the the packages available in util" -DEPS=" acpi bash cpio curl dash diffutils dosfstools dracut e2fsprogs file fzf gawk genfstab grep groff htop inetutils iproute2 iw keyutils less lm-sensors man-db neofetch nmap openssh pciutils pm-utils procps-ng rsync sudo unzip usbutils util-linux webfs wget which wireless-tools wpa_supplicant" +DEPS=" acpi bash cpio curl dash diffutils dosfstools dracut e2fsprogs file fzf gawk genfstab grep groff htop inetutils iproute2 iw keyutils less lm-sensors man-db neofetch net-tools nmap openssh pciutils pm-utils procps-ng rhash rsync sudo unzip usbutils util-linux webfs wget which wireless-tools wpa_supplicant" diff --git a/repo/meta/repo-xi.xibuild b/repo/meta/repo-xi.xibuild index 4d74fc9..a3b3160 100644 --- a/repo/meta/repo-xi.xibuild +++ b/repo/meta/repo-xi.xibuild @@ -2,4 +2,4 @@ # This file was automatically generated, do not edit! DESC="All the the packages available in xi" -DEPS=" sysconfigs xib xichroot xipkg xiutils" +DEPS=" mkinitramfs sysconfigs xib xichroot xipkg xiutils" diff --git a/repo/system/bzip2.xibuild b/repo/system/bzip2.xibuild index f775eee..d0d42f6 100644 --- a/repo/system/bzip2.xibuild +++ b/repo/system/bzip2.xibuild @@ -28,7 +28,7 @@ package () { cp -a libbz2.so.$PKG_VER $PKG_DEST/usr/lib/libbz2.so cp bzip2-shared $PKG_DEST/usr/bin/bzip2 - for i in $PKG_DEST/usr/bin/{bzcat,bunzip2}; do + for i in $PKG_DEST/usr/bin/bzcat $PKG_DEST/usr/bin/bunzip2; do ln -sf bzip2 $i done diff --git a/repo/system/elogind.xibuild b/repo/system/elogind.xibuild index 64be2c1..9ecc089 100644 --- a/repo/system/elogind.xibuild +++ b/repo/system/elogind.xibuild @@ -1,6 +1,6 @@ #!/bin/sh -MAKEDEPS="make docbook4-xml docbook-xsl docbook-dtd libxslt ubase glib acl m4" +MAKEDEPS="make docbook4-xml docbook-xsl docbook-dtd libxslt util-linux glib acl m4" DEPS="pam gperf eudev" PKG_VER=246.10 diff --git a/repo/system/mkinitramfs.xibuild b/repo/system/mkinitramfs.xibuild deleted file mode 100644 index 7fa414f..0000000 --- a/repo/system/mkinitramfs.xibuild +++ /dev/null @@ -1,370 +0,0 @@ -#!/bin/sh - -MAKEDEPS="make " -DEPS="sh" - -PKG_VER=0.1 -DESC="Scripts to make initramfs" - -package () { - mkdir -pv $PKG_DEST/usr/sbin/ - cat > $PKG_DEST/usr/sbin/mkinitramfs << "EOF" -#!/bin/sh -# This file based in part on the mkinitramfs script for the LFS LiveCD -# written by Alexander E. Patrakov and Jeremy Huntwork. - -copy() -{ - local file - - if [ "$2" = "lib" ]; then - file=$(PATH=/usr/lib type -p $1) - else - file=$(type -p $1) - fi - - if [ -n "$file" ] ; then - cp $file $WDIR/usr/$2 - else - echo "Missing required file: $1 for directory $2" - rm -rf $WDIR - exit 1 - fi -} - -if [ -z $1 ] ; then - INITRAMFS_FILE=initrd.img-no-kmods -else - KERNEL_VERSION=$1 - INITRAMFS_FILE=initrd.img-$KERNEL_VERSION -fi - -if [ -n "$KERNEL_VERSION" ] && [ ! -d "/usr/lib/modules/$1" ] ; then - echo "No modules directory named $1" - exit 1 -fi - -printf "Creating $INITRAMFS_FILE... " - -binfiles="sh cat cp dd killall ls mkdir mknod mount " -binfiles="$binfiles umount sed sleep ln rm uname" -binfiles="$binfiles readlink basename" - -# Systemd installs udevadm in /bin. Other udev implementations have it in /sbin -if [ -x /usr/bin/udevadm ] ; then binfiles="$binfiles udevadm"; fi - -sbinfiles="modprobe blkid switch_root" - -# Optional files and locations -for f in mdadm mdmon udevd udevadm; do - if [ -x /usr/sbin/$f ] ; then sbinfiles="$sbinfiles $f"; fi -done - -# Add lvm if present (cannot be done with the others because it -# also needs dmsetup -if [ -x /usr/sbin/lvm ] ; then sbinfiles="$sbinfiles lvm dmsetup"; fi - -unsorted=$(mktemp /tmp/unsorted.XXXXXXXXXX) - -DATADIR=/usr/share/mkinitramfs -INITIN=init.in - -# Create a temporary working directory -WDIR=$(mktemp -d /tmp/initrd-work.XXXXXXXXXX) - -# Create base directory structure -mkdir -p $WDIR/{dev,run,sys,proc,usr/{bin,lib/{firmware,modules},sbin}} -mkdir -p $WDIR/etc/{modprobe.d,udev/rules.d} -touch $WDIR/etc/modprobe.d/modprobe.conf -ln -s usr/bin $WDIR/bin -ln -s usr/lib $WDIR/lib -ln -s usr/sbin $WDIR/sbin -ln -s lib $WDIR/lib64 - -# Create necessary device nodes -mknod -m 640 $WDIR/dev/console c 5 1 -mknod -m 664 $WDIR/dev/null c 1 3 - -# Install the udev configuration files -if [ -f /etc/udev/udev.conf ]; then - cp /etc/udev/udev.conf $WDIR/etc/udev/udev.conf -fi - -for file in $(find /etc/udev/rules.d/ -type f) ; do - cp $file $WDIR/etc/udev/rules.d -done - -# Install any firmware present -cp -a /usr/lib/firmware $WDIR/usr/lib - -# Copy the RAID configuration file if present -if [ -f /etc/mdadm.conf ] ; then - cp /etc/mdadm.conf $WDIR/etc -fi - -# Install the init file -install -m0755 $DATADIR/$INITIN $WDIR/init - -if [ -n "$KERNEL_VERSION" ] ; then - if [ -x /usr/bin/kmod ] ; then - binfiles="$binfiles kmod" - else - binfiles="$binfiles lsmod" - sbinfiles="$sbinfiles insmod" - fi -fi - -# Install basic binaries -for f in $binfiles ; do - ldd /usr/bin/$f | sed "s/\t//" | cut -d " " -f1 >> $unsorted - copy /usr/bin/$f bin -done - -for f in $sbinfiles ; do - ldd /usr/sbin/$f | sed "s/\t//" | cut -d " " -f1 >> $unsorted - copy $f sbin -done - -# Add udevd libraries if not in /usr/sbin -if [ -x /usr/lib/udev/udevd ] ; then - ldd /usr/lib/udev/udevd | sed "s/\t//" | cut -d " " -f1 >> $unsorted -elif [ -x /usr/lib/systemd/systemd-udevd ] ; then - ldd /usr/lib/systemd/systemd-udevd | sed "s/\t//" | cut -d " " -f1 >> $unsorted -fi - -# Add module symlinks if appropriate -if [ -n "$KERNEL_VERSION" ] && [ -x /usr/bin/kmod ] ; then - ln -s kmod $WDIR/usr/bin/lsmod - ln -s kmod $WDIR/usr/bin/insmod -fi - -# Add lvm symlinks if appropriate -# Also copy the lvm.conf file -if [ -x /usr/sbin/lvm ] ; then - ln -s lvm $WDIR/usr/sbin/lvchange - ln -s lvm $WDIR/usr/sbin/lvrename - ln -s lvm $WDIR/usr/sbin/lvextend - ln -s lvm $WDIR/usr/sbin/lvcreate - ln -s lvm $WDIR/usr/sbin/lvdisplay - ln -s lvm $WDIR/usr/sbin/lvscan - - ln -s lvm $WDIR/usr/sbin/pvchange - ln -s lvm $WDIR/usr/sbin/pvck - ln -s lvm $WDIR/usr/sbin/pvcreate - ln -s lvm $WDIR/usr/sbin/pvdisplay - ln -s lvm $WDIR/usr/sbin/pvscan - - ln -s lvm $WDIR/usr/sbin/vgchange - ln -s lvm $WDIR/usr/sbin/vgcreate - ln -s lvm $WDIR/usr/sbin/vgscan - ln -s lvm $WDIR/usr/sbin/vgrename - ln -s lvm $WDIR/usr/sbin/vgck - # Conf file(s) - cp -a /etc/lvm $WDIR/etc -fi - -# Install libraries -sort $unsorted | uniq | while read library ; do -# linux-vdso and linux-gate are pseudo libraries and do not correspond to a file -# libsystemd-shared is in /lib/systemd, so it is not found by copy, and -# it is copied below anyway - if [[ "$library" == linux-vdso.so.1 ]] || - [[ "$library" == linux-gate.so.1 ]] || - [[ "$library" == libsystemd-shared* ]]; then - continue - fi - - copy $library lib -done - -if [ -d /usr/lib/udev ]; then - cp -a /usr/lib/udev $WDIR/usr/lib -fi -if [ -d /usr/lib/systemd ]; then - cp -a /usr/lib/systemd $WDIR/usr/lib -fi -if [ -d /usr/lib/elogind ]; then - cp -a /usr/lib/elogind $WDIR/usr/lib -fi - -# Install the kernel modules if requested -if [ -n "$KERNEL_VERSION" ]; then - find \ - /usr/lib/modules/$KERNEL_VERSION/kernel/{crypto,fs,lib} \ - /usr/lib/modules/$KERNEL_VERSION/kernel/drivers/{block,ata,md,firewire} \ - /usr/lib/modules/$KERNEL_VERSION/kernel/drivers/{scsi,message,pcmcia,virtio} \ - /usr/lib/modules/$KERNEL_VERSION/kernel/drivers/usb/{host,storage} \ - -type f 2> /dev/null | cpio --make-directories -p --quiet $WDIR - - cp /usr/lib/modules/$KERNEL_VERSION/modules.{builtin,order} \ - $WDIR/usr/lib/modules/$KERNEL_VERSION - - depmod -b $WDIR $KERNEL_VERSION -fi - -( cd $WDIR ; find . | cpio -o -H newc --quiet | gzip -9 ) > $INITRAMFS_FILE - -# Prepare early loading of microcode if available -if ls /usr/lib/firmware/intel-ucode/* >/dev/null 2>&1 || - ls /usr/lib/firmware/amd-ucode/* >/dev/null 2>&1; then - -# first empty WDIR to reuse it - rm -r $WDIR/* - - DSTDIR=$WDIR/kernel/x86/microcode - mkdir -p $DSTDIR - - if [ -d /usr/lib/firmware/amd-ucode ]; then - cat /usr/lib/firmware/amd-ucode/microcode_amd*.bin > $DSTDIR/AuthenticAMD.bin - fi - - if [ -d /usr/lib/firmware/intel-ucode ]; then - cat /usr/lib/firmware/intel-ucode/* > $DSTDIR/GenuineIntel.bin - fi - - ( cd $WDIR; find . | cpio -o -H newc --quiet ) > microcode.img - cat microcode.img $INITRAMFS_FILE > tmpfile - mv tmpfile $INITRAMFS_FILE - rm microcode.img -fi - -# Remove the temporary directories and files -rm -rf $WDIR $unsorted -printf "done.\n" - -EOF - - chmod 0755 $PKG_DEST/usr/sbin/mkinitramfs - - mkdir -p $PKG_DEST/usr/share/mkinitramfs && - cat > $PKG_DEST/usr/share/mkinitramfs/init.in << "EOF" -#!/bin/sh - -PATH=/usr/bin:/usr/sbin -export PATH - -problem() -{ - printf "Encountered a problem!\n\nDropping you to a shell.\n\n" - sh -} - -no_device() -{ - printf "The device %s, which is supposed to contain the\n" $1 - printf "root file system, does not exist.\n" - printf "Please fix this problem and exit this shell.\n\n" -} - -no_mount() -{ - printf "Could not mount device %s\n" $1 - printf "Sleeping forever. Please reboot and fix the kernel command line.\n\n" - printf "Maybe the device is formatted with an unsupported file system?\n\n" - printf "Or maybe filesystem type autodetection went wrong, in which case\n" - printf "you should add the rootfstype=... parameter to the kernel command line.\n\n" - printf "Available partitions:\n" -} - -do_mount_root() -{ - mkdir /.root - [ -n "$rootflags" ] && rootflags="$rootflags," - rootflags="$rootflags$ro" - - case "$root" in - /dev/* ) device=$root ;; - UUID=* ) eval $root; device="/dev/disk/by-uuid/$UUID" ;; - PARTUUID=*) eval $root; device="/dev/disk/by-partuuid/$PARTUUID" ;; - LABEL=* ) eval $root; device="/dev/disk/by-label/$LABEL" ;; - "" ) echo "No root device specified." ; problem ;; - esac - - while [ ! -b "$device" ] ; do - no_device $device - problem - done - - if ! mount -n -t "$rootfstype" -o "$rootflags" "$device" /.root ; then - no_mount $device - cat /proc/partitions - while true ; do sleep 10000 ; done - else - echo "Successfully mounted device $root" - fi -} - -do_try_resume() -{ - case "$resume" in - UUID=* ) eval $resume; resume="/dev/disk/by-uuid/$UUID" ;; - LABEL=*) eval $resume; resume="/dev/disk/by-label/$LABEL" ;; - esac - - if $noresume || ! [ -b "$resume" ]; then return; fi - - ls -lH "$resume" | ( read x x x x maj min x - echo -n ${maj%,}:$min > /sys/power/resume ) -} - -init=/sbin/init -root= -rootdelay= -rootfstype=auto -ro="ro" -rootflags= -device= -resume= -noresume=false - -mount -n -t devtmpfs devtmpfs /dev -mount -n -t proc proc /proc -mount -n -t sysfs sysfs /sys -mount -n -t tmpfs tmpfs /run - -read -r cmdline < /proc/cmdline - -for param in $cmdline ; do - case $param in - init=* ) init=${param#init=} ;; - root=* ) root=${param#root=} ;; - rootdelay=* ) rootdelay=${param#rootdelay=} ;; - rootfstype=*) rootfstype=${param#rootfstype=} ;; - rootflags=* ) rootflags=${param#rootflags=} ;; - resume=* ) resume=${param#resume=} ;; - noresume ) noresume=true ;; - ro ) ro="ro" ;; - rw ) ro="rw" ;; - esac -done - -# udevd location depends on version -if [ -x /sbin/udevd ]; then - UDEVD=/sbin/udevd -elif [ -x /lib/udev/udevd ]; then - UDEVD=/lib/udev/udevd -elif [ -x /lib/systemd/systemd-udevd ]; then - UDEVD=/lib/systemd/systemd-udevd -else - echo "Cannot find udevd nor systemd-udevd" - problem -fi - -${UDEVD} --daemon --resolve-names=never -udevadm trigger -udevadm settle - -if [ -f /etc/mdadm.conf ] ; then mdadm -As ; fi -if [ -x /sbin/vgchange ] ; then /sbin/vgchange -a y > /dev/null ; fi -if [ -n "$rootdelay" ] ; then sleep "$rootdelay" ; fi - -do_try_resume # This function will not return if resuming from disk -do_mount_root - -killall -w ${UDEVD##*/} - -exec switch_root /.root "$init" "$@" - -EOF - -} diff --git a/repo/system/sbase.xibuild b/repo/system/sbase.xibuild index 03e8f86..38559f8 100644 --- a/repo/system/sbase.xibuild +++ b/repo/system/sbase.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="make " -DEPS="musl acl attr gmp" +DEPS="musl acl attr gmp ubase" SOURCE=https://git.suckless.org/sbase @@ -22,7 +22,8 @@ build () { package () { make PREFIX=/usr DESTDIR=$PKG_DEST install - for p in tar sed find; do + # these are provided by other utils + for p in tar sed find xargs; do rm $PKG_DEST/usr/bin/$p rm $PKG_DEST/usr/share/man/man1/$p.1 done diff --git a/repo/system/shadow.xibuild b/repo/system/shadow.xibuild index 9441221..9d490c4 100644 --- a/repo/system/shadow.xibuild +++ b/repo/system/shadow.xibuild @@ -181,9 +181,48 @@ EOF } postinstall () { + + [ ! -f /etc/passwd ] && + cat > /etc/passwd << "EOF" +root:x:0:0:root:/root:/bin/bash +bin:x:1:1:bin:/dev/null:/usr/bin/false +daemon:x:6:6:Daemon User:/dev/null:/usr/bin/false +messagebus:x:18:18:D-Bus Message Daemon User:/run/dbus:/usr/bin/false +uuidd:x:80:80:UUID Generation Daemon User:/dev/null:/usr/bin/false +nobody:x:99:99:Unprivileged User:/dev/null:/usr/bin/false +EOF + + [ ! -f /etc/group ] && + cat > /etc/group << "EOF" +root:x:0:root +bin:x:1:daemon +sys:x:2: +kmem:x:3: +tape:x:4: +tty:x:5: +daemon:x:6: +floppy:x:7: +disk:x:8: +lp:x:9: +dialout:x:10: +audio:x:11: +video:x:12: +utmp:x:13: +usb:x:14: +cdrom:x:15: +adm:x:16: +messagebus:x:18: +input:x:24: +mail:x:34: +kvm:x:61: +uuidd:x:80: +wheel:x:97: +nogroup:x:99: +users:x:999: +EOF /usr/sbin/pwconv /usr/sbin/grpconv mkdir -p /etc/default - /usr/sbin/useradd -D --gid 999 + } diff --git a/repo/system/ubase.xibuild b/repo/system/ubase.xibuild index 2e029a7..6b21576 100644 --- a/repo/system/ubase.xibuild +++ b/repo/system/ubase.xibuild @@ -16,10 +16,9 @@ build () { } package () { - make PREFIX=/usr DESTDIR=$PKG_DEST install + install -d $PKG_DEST/usr/bin + install -m755 stat $PKG_DEST/usr/bin - #for p in todo; do - # rm $PKG_DEST/usr/bin/$p - # rm $PKG_DEST/usr/share/man/man1/$p.1 - #done + install -d $PKG_DEST/usr/share/man + install -m644 stat.1 $PKG_DEST/usr/share/man/stat.1 } diff --git a/repo/util/net-tools.xibuild b/repo/util/net-tools.xibuild index af7cf61..bc232dc 100644 --- a/repo/util/net-tools.xibuild +++ b/repo/util/net-tools.xibuild @@ -4,16 +4,23 @@ MAKEDEPS="make " DEPS="pam libcap readline ncurses libxcrypt utmps iana-etc net-tools" PKG_VER=2.10 -SOURCE=https://downloads.sourceforge.net/project/net-tools/net-tools-$PKG_VER.tar.xz +SOURCE=https://github.com/ecki/net-tools ADDITIONAL=" - musl-fixes.patch " DESC="Linux networking base tools" prepare () { - apply_patches - cat > config.make </a #include " + sed -i netstat.c \ + -e "/#include /a #include " + + sed -i slattach.c \ + -e "/#include /a #include " + + + cat > config.make < config.h + } build () { - make + yes "" | make } package () { diff --git a/repo/xi/mkinitramfs.xibuild b/repo/xi/mkinitramfs.xibuild new file mode 100644 index 0000000..a50a14e --- /dev/null +++ b/repo/xi/mkinitramfs.xibuild @@ -0,0 +1,15 @@ +#!/bin/sh + +MAKEDEPS="make " +DEPS="sh cpio sbase findutils gzip util-linux" + +PKG_VER=1.2 +SOURCE=https://git.davidovski.xyz/xilinux/xiutils.git +BRANCH="v$PKG_VER" + +DESC="Scripts to make initramfs" + +package () { + mkdir -p $PKG_DEST/usr/bin + make DESTDIR=$PKG_DEST install-mkinitramfs +} diff --git a/repo/xi/xipkg.xibuild b/repo/xi/xipkg.xibuild index f98ab19..7b74c0c 100644 --- a/repo/xi/xipkg.xibuild +++ b/repo/xi/xipkg.xibuild @@ -3,7 +3,7 @@ MAKEDEPS="make" DEPS="openssl curl dash xiutils findutils diffutils sed xichroot grep" -PKG_VER=1.1.0 +PKG_VER=1.1.2 SOURCE=https://git.davidovski.xyz/xilinux/xipkg.git BRANCH="v$PKG_VER" diff --git a/repo/xi/xiutils.xibuild b/repo/xi/xiutils.xibuild index b052226..9a0ab06 100644 --- a/repo/xi/xiutils.xibuild +++ b/repo/xi/xiutils.xibuild @@ -4,9 +4,9 @@ MAKEDEPS="make gcc" DEPS="musl sh" # Use master -#PKG_VER=1.1.2 +PKG_VER=1.2 SOURCE=https://git.davidovski.xyz/xilinux/xiutils.git -#BRANCH="v$PKG_VER" +BRANCH="v$PKG_VER" DESC="Utilities required by various components of the xilinux system" -- cgit v1.2.1