From e8213fac46bfcb8068a883cb88b2bb1587f190f9 Mon Sep 17 00:00:00 2001 From: davidovski Date: Tue, 1 Mar 2022 21:25:54 +0000 Subject: made packages work with musl --- repo/system/argp-standalone.xibuild | 12 ++++--- repo/system/attr.xibuild | 12 +++++-- repo/system/binutils.xibuild | 64 ++++++++++++++++++++++++++----------- repo/system/bzip2.xibuild | 10 +++--- repo/system/cacerts.xibuild | 10 ++++-- repo/system/coreutils.xibuild | 22 ++++++------- repo/system/eudev.xibuild | 4 +-- repo/system/expat.xibuild | 3 +- repo/system/gmp.xibuild | 6 ++-- repo/system/gperf.xibuild | 4 --- repo/system/iana-etc.xibuild | 15 ++++----- repo/system/icu.xibuild | 7 ++-- repo/system/krb5.xibuild | 36 ++++++++++++--------- repo/system/ldns.xibuild | 1 + repo/system/libcap.xibuild | 4 ++- repo/system/libelf.xibuild | 32 +++++++++++++++++++ repo/system/libidn.xibuild | 14 +++++--- repo/system/libnl.xibuild | 6 ++-- repo/system/libp11-kit.xibuild | 2 +- repo/system/libressl.xibuild | 35 ++++++++++++++++---- repo/system/libtool.xibuild | 10 +++--- repo/system/libxcrypt.xibuild | 7 ++-- repo/system/libxslt.xibuild | 3 -- repo/system/musl-fts.xibuild | 4 +-- repo/system/ncurses.xibuild | 7 +++- repo/system/nss.xibuild | 31 +++++++++--------- repo/system/nsss.xibuild | 28 ++++++++++++++++ repo/system/pahole.xibuild | 2 +- repo/system/pam.xibuild | 6 ++-- repo/system/perl.xibuild | 31 +++++++++++++++--- repo/system/python.xibuild | 25 ++++++++++++--- repo/system/readline.xibuild | 10 +++--- repo/system/sed.xibuild | 6 ++-- repo/system/shadow.xibuild | 2 +- repo/system/tcl.xibuild | 5 +-- repo/system/utmps.xibuild | 11 +++---- repo/system/zlib.xibuild | 2 +- 37 files changed, 326 insertions(+), 163 deletions(-) create mode 100644 repo/system/libelf.xibuild create mode 100644 repo/system/nsss.xibuild (limited to 'repo/system') diff --git a/repo/system/argp-standalone.xibuild b/repo/system/argp-standalone.xibuild index c393169..4c2a722 100644 --- a/repo/system/argp-standalone.xibuild +++ b/repo/system/argp-standalone.xibuild @@ -1,10 +1,10 @@ #!/bin/sh MAKEDEPS="" -DEPS="" +DEPS="musl" -PKG_VER= -SOURCE=https://github.com/ericonr/argp-standalone/archive/$PKG_VER.tar.gz +PKG_VER=1.3 +SOURCE=https://www.lysator.liu.se/~nisse/misc/argp-standalone-$PKG_VER.tar.gz DESC="Standalone implementation for the argp interface" @@ -18,7 +18,9 @@ build () { } package () { - cp -v libargp.a $PKG_DEST/usr/lib/ - cp -v argp.h $PKG_DEST/usr/include/ + install -d $PKG_DEST/usr/lib + install -d $PKG_DEST/usr/include + cp libargp.a $PKG_DEST/usr/lib/ + cp argp.h $PKG_DEST/usr/include/ } diff --git a/repo/system/attr.xibuild b/repo/system/attr.xibuild index 1598e77..bbd9a27 100644 --- a/repo/system/attr.xibuild +++ b/repo/system/attr.xibuild @@ -1,6 +1,6 @@ #!/bin/sh -MAKEDEPS="make " +MAKEDEPS="make" DEPS="musl" PKG_VER=2.5.1 @@ -9,11 +9,17 @@ SOURCE=http://download.savannah.nongnu.org/releases/attr/attr-$PKG_VER.tar.xz DESC="Extended attribute support library for ACL support" build () { - ./configure --prefix=/usr --disable-static --sysconfdir=/etc --docdir=/usr/share/doc/attr-$PKG_VER + ./configure \ + --prefix=/usr \ + --bindir=/usr/bin \ + --disable-static \ + --sysconfdir=/etc \ + --docdir=/usr/share/doc/attr-$PKG_VER make } -check () { +# skip these tests since they require perl +NO_check () { make check } diff --git a/repo/system/binutils.xibuild b/repo/system/binutils.xibuild index 1c85301..d57d538 100644 --- a/repo/system/binutils.xibuild +++ b/repo/system/binutils.xibuild @@ -1,49 +1,77 @@ #!/bin/sh MAKEDEPS="make dejagnu bzip2 xz zlib zstd patch" -DEPS="musl zlib elfutils" +DEPS="musl zlib libelf" PKG_VER=2.37 SOURCE=https://ftp.gnu.org/gnu/binutils/binutils-$PKG_VER.tar.xz + +PATCH_SOURCE="https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/patches/binutils-alpine" ADDITIONAL=" - https://www.linuxfromscratch.org/patches/lfs/development/binutils-$PKG_VER-upstream_fix-1.patch + $PATCH_SOURCE/0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch + $PATCH_SOURCE/bfd-close-file-desriptor-if-there-is-no-archive-fd.patch + $PATCH_SOURCE/binutils-ld-fix-static-linking.patch + $PATCH_SOURCE/defang-no-split.patch " -DESC="tools for handling object files" +DESC="Tools for handling object files" prepare () { - /usr/bin/patch -Np1 -i binutils-$PKG_VER-upstream_fix-1.patch - - # An error in the building system causes the shipped man pages to be empty. Workaround the issue and remove the shipped man pages, so the man pages will be regenerated correctly: + for p in *.patch; do + patch -Np1 -i $p || true + done - sed -i '63d' etc/texi2pod.pl - find -name \*.1 -delete + find . -name '[a-z]*\.[0-9]*' -empty -exec rm -f {} \; } build () { - mkdir -v build + mkdir build cd build + case $(uname -m) in + x86_64) export EXTRA_CONFIG=" --enable-targets=x86_64-pep " + ;; + i686) export EXTRA_CONFIG=" --disable-separate-code --enable-targets=x86_64-linux-gnu,x86_64-pep" + ;; + esac + ../configure --prefix=/usr \ --enable-gold \ --enable-ld=default \ - --enable-install-libiberty \ --enable-plugins \ --enable-shared \ --disable-werror \ + --with-system-zlib \ + --enable-relro \ + --enable-lto \ + --disable-nls \ + --enable-deterministic-archives \ + --enable-default-hash-style=gnu \ + --enable-threads \ + --disable-multilib \ + --with-mmap \ + --with-pic \ --enable-64-bit-bfd \ - --with-system-zlib + --with-pic $EXTRA_CONFIG make tooldir=/usr } -check () { - make -k check || true -} +#check () { + #make -k check || true +#} package() { - make -j1 DESTDIR=$PKG_DEST -j1 install - cp ../include/libiberty.h $PKG_DEST/usr/include - rm -fv $PKG_DEST/usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.a - [ -e $PKG_DEST/usr/bin/ld ] || ln -sv ld.gold $PKG_DEST/usr/bin/ld + make -j1 tooldir=/usr DESTDIR=$PKG_DEST install + cd .. + + # how about we use binutils ld? + #rm -f $PKG_DEST/usr/bin/ld + #ln -sf /usr/bin/ld.bfd $PKG_DEST/usr/bin/ld + + install -m 644 include/libiberty.h $PKG_DEST/usr/include + install -m 644 include/demangle.h $PKG_DEST/usr/include + for f in dlltool nlmconv windres windmc; do + rm -f $PKG_DEST/usr/share/man/man1/${f}.1 + done } diff --git a/repo/system/bzip2.xibuild b/repo/system/bzip2.xibuild index 1e448b4..f775eee 100644 --- a/repo/system/bzip2.xibuild +++ b/repo/system/bzip2.xibuild @@ -24,15 +24,15 @@ build () { package () { make PREFIX=$PKG_DEST/usr install - cp -av libbz2.so* $PKG_DEST/usr/lib - cp -av libbz2.so.$PKG_VER $PKG_DEST/usr/lib/libbz2.so + cp -a libbz2.so* $PKG_DEST/usr/lib + cp -a libbz2.so.$PKG_VER $PKG_DEST/usr/lib/libbz2.so - cp -v bzip2-shared $PKG_DEST/usr/bin/bzip2 + cp bzip2-shared $PKG_DEST/usr/bin/bzip2 for i in $PKG_DEST/usr/bin/{bzcat,bunzip2}; do - ln -sfv bzip2 $i + ln -sf bzip2 $i done # remove a useless static library - rm -fv $PKG_DEST/usr/lib/libbz2.a + rm -f $PKG_DEST/usr/lib/libbz2.a } diff --git a/repo/system/cacerts.xibuild b/repo/system/cacerts.xibuild index 74bc535..320e986 100644 --- a/repo/system/cacerts.xibuild +++ b/repo/system/cacerts.xibuild @@ -1,15 +1,19 @@ #!/bin/sh -MAKEDEPS="make-ca" -DEPS="make-ca libnghttp" +MAKEDEPS="coreutils sed" +DEPS="libnghttp" PKG_VER=1.7 SOURCE=https://github.com/djlucas/make-ca/releases/download/v$PKG_VER/make-ca-$PKG_VER.tar.xz DESC="Root certificates needed by ssl built using make-ca" +prepare () { + sed -i "s/grep/ggrep/g" make-ca +} + package () { # TODO check why this doesnt package /etc/ssl/certs the first time in some occasions - bash make-ca -g --force -D $PKG_DEST + mkdir -p $PKG_DEST/etc/ssl/certs bash make-ca -g --force -D $PKG_DEST chmod -R 777 $PKG_DEST || echo "couldnt change permissions for $PKG_DEST" } diff --git a/repo/system/coreutils.xibuild b/repo/system/coreutils.xibuild index d026617..150787b 100644 --- a/repo/system/coreutils.xibuild +++ b/repo/system/coreutils.xibuild @@ -1,24 +1,20 @@ #!/bin/sh MAKEDEPS="make " -DEPS="musl acl attr gmp libcap libressl libiconv" +DEPS="musl acl attr gmp" -PKG_VER=9.0 -SOURCE=https://ftp.gnu.org/gnu/coreutils/coreutils-$PKG_VER.tar.xz -DESC="The GNU coreutilities" +SOURCE=https://git.suckless.org/sbase +DESC="sbase from suckless.org" build () { - autoreconf -fiv - - FORCE_UNSAFE_CONFIGURE=1 ./configure \ - --prefix=/usr \ - --enable-no-install-program=kill,uptime make } package () { - make DESTDIR=$PKG_DEST install - mkdir -pv $PKG_DEST/usr/share/man/man8/chroot.8 - mkdir -pv $PKG_DEST/usr/sbin - mv -v $PKG_DEST/usr/bin/chroot $PKG_DEST/usr/sbin + make PREFIX=/usr DESTDIR=$PKG_DEST install + + for p in tar sed; do + rm $PKG_DEST/usr/bin/$p + rm $PKG_DEST/usr/share/man/man1/$p.1 + done } diff --git a/repo/system/eudev.xibuild b/repo/system/eudev.xibuild index 87eec78..d4cd523 100644 --- a/repo/system/eudev.xibuild +++ b/repo/system/eudev.xibuild @@ -17,8 +17,8 @@ build () { } package () { - mkdir -pv $PKG_DEST/usr/lib/udev/rules.d - mkdir -pv $PKG_DEST/etc/udev/rules.d + mkdir -p $PKG_DEST/usr/lib/udev/rules.d + mkdir -p $PKG_DEST/etc/udev/rules.d make DESTDIR=$PKG_DEST install diff --git a/repo/system/expat.xibuild b/repo/system/expat.xibuild index 98f410c..d921e1b 100644 --- a/repo/system/expat.xibuild +++ b/repo/system/expat.xibuild @@ -18,6 +18,5 @@ check () { package () { make DESTDIR=$PKG_DEST install - - install -v -m644 doc/*{.html,png,css} $PKG_DEST/usr/share/doc/expat-$PKG_VER + install -m644 doc/* $PKG_DEST/usr/share/doc/expat-$PKG_VER } diff --git a/repo/system/gmp.xibuild b/repo/system/gmp.xibuild index f8166d9..c3f14ee 100644 --- a/repo/system/gmp.xibuild +++ b/repo/system/gmp.xibuild @@ -1,6 +1,6 @@ #!/bin/sh -MAKEDEPS="make " +MAKEDEPS="make perl" DEPS="bash procps-ng" PKG_VER=6.2.1 @@ -8,8 +8,8 @@ SOURCE=https://gmplib.org/download/gmp/gmp-$PKG_VER.tar.xz DESC="a collection of mathematical libraries" prepare () { - cp -v configfsf.guess config.guess - cp -v configfsf.sub config.sub + cp configfsf.guess config.guess + cp configfsf.sub config.sub } build () { diff --git a/repo/system/gperf.xibuild b/repo/system/gperf.xibuild index b661199..eebb471 100644 --- a/repo/system/gperf.xibuild +++ b/repo/system/gperf.xibuild @@ -12,10 +12,6 @@ build () { make } -check () { - make -j1 check -} - package () { make DESTDIR=$PKG_DEST install } diff --git a/repo/system/iana-etc.xibuild b/repo/system/iana-etc.xibuild index bcc1c81..812ed14 100644 --- a/repo/system/iana-etc.xibuild +++ b/repo/system/iana-etc.xibuild @@ -1,18 +1,15 @@ #!/bin/sh -MAKEDEPS="python " +MAKEDEPS="" DEPS="" -SOURCE=https://github.com/Mic92/iana-etc +PKG_VER=20210611 +SOURCE=https://github.com/Mic92/iana-etc/releases/download/$PKG_VER/iana-etc-$PKG_VER.tar.gz DESC="A set of data from the internet assigned numbers authority providing data for network services and protocols" -build () { - python update.py out -} - package () { - mkdir -vp $PKG_DEST/etc - cp -v out/dist/protocols $PKG_DEST/etc/ - cp -v out/dist/services $PKG_DEST/etc/ + mkdir -p $PKG_DEST/etc + cp protocols $PKG_DEST/etc/ + cp services $PKG_DEST/etc/ } diff --git a/repo/system/icu.xibuild b/repo/system/icu.xibuild index f578298..918982f 100644 --- a/repo/system/icu.xibuild +++ b/repo/system/icu.xibuild @@ -1,15 +1,18 @@ #!/bin/sh -MAKEDEPS="python" +MAKEDEPS="python gcc" DEPS="bash" PKG_VER=70.1 SOURCE=https://github.com/unicode-org/icu/releases/download/release-$(echo $PKG_VER | sed 's/\./-/g')/icu4c-$(echo $PKG_VER | sed 's/\./_/g')-src.tgz DESC="International Components for Unicode library" -build () { +prepare () { cd source && + sed -i -e 's,DU_HAVE_STRTOD_L=1,DU_HAVE_STRTOD_L=0,' configure +} +build () { ./configure --prefix=/usr && make diff --git a/repo/system/krb5.xibuild b/repo/system/krb5.xibuild index ada3f55..03492c5 100644 --- a/repo/system/krb5.xibuild +++ b/repo/system/krb5.xibuild @@ -1,14 +1,20 @@ #!/bin/sh MAKEDEPS="make " -DEPS="musl e2fsprogs libldap keyutils" +DEPS="musl e2fsprogs libldap keyutils gdbm" PKG_VER=1.19.2 -SOURCE=https://github.com/krb5/krb5 -#SOURCE=https://kerberos.org/dist/krb5/$(echo $PKG_VER | cut -d. -f-2)/krb5-$PKG_VER.tar.gz +SOURCE=http://web.mit.edu/kerberos/dist/krb5/${PKG_VER%.*}/krb5-${PKG_VER}.tar.gz + +ADDITIONAL=" +https://cgit.freebsd.org/ports/plain/security/krb5-119/files/patch-plugins_preauth_pkinit_pkinit__crypto__openssl.c +https://cgit.freebsd.org/ports/plain/security/krb5-119/files/patch-plugins_preauth_pkinit_pkinit__crypto__openssl.h +" + DESC="The Kerberos network authentication system" prepare () { + # fix denial of service vulnerability sed -i '210a if (sprinc == NULL) {\ status = "NULL_SERVER";\ @@ -16,8 +22,12 @@ prepare () { goto cleanup;\ }' src/kdc/do_tgs_req.c + cd src && + patch -Np0 -i ../patch-plugins_preauth_pkinit_pkinit__crypto__openssl.c + patch -Np0 -i ../patch-plugins_preauth_pkinit_pkinit__crypto__openssl.h + sed -e "/LDFLAGS=/d" -i build-tools/krb5-config.in sed -i -e 's@\^u}@^u cols 300}@' tests/dejagnu/config/default.exp || true sed -i -e '/eq 0/{N;s/12 //}' plugins/kdb/db2/libdb2/test/run.test || true sed -i '/t_iprop.py/d' tests/Makefile.in || true @@ -25,22 +35,18 @@ prepare () { build () { # would be ideal to use libressl rather than builtin library - autoreconf - ./configure --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var/lib \ - --runstatedir=/run \ - --with-system-et \ - --with-system-ss \ - --with-system-verto=no \ - --with-crypto-impl=builtin \ - --enable-dns-for-realm && + ./configure ${configure_args} --sbindir=/usr/bin \ + --disable-rpath --with-system-et --without-system-verto --with-ldap \ + --with-system-ss --enable-shared --without-tcl \ + ac_cv_func_pthread_once=yes ac_cv_func_pthread_rwlock_init=yes \ + acx_pthread_ok=yes ac_cv_func_regcomp=yes ac_cv_printf_positional=yes \ + krb5_cv_attr_constructor_destructor=yes,yes make } package () { make DESTDIR=$PKG_DEST install - install -v -dm755 $PKG_DEST/usr/share/doc/krb5-$PKG_VER && - cp -vfr ../doc/* $PKG_DEST/usr/share/doc/krb5-$PKG_VER + install -dm755 $PKG_DEST/usr/share/doc/krb5-$PKG_VER && + cp -fr ../doc/* $PKG_DEST/usr/share/doc/krb5-$PKG_VER } diff --git a/repo/system/ldns.xibuild b/repo/system/ldns.xibuild index 372b9da..d6799fe 100644 --- a/repo/system/ldns.xibuild +++ b/repo/system/ldns.xibuild @@ -14,6 +14,7 @@ build () { --localstatedir=/var \ --disable-rpath \ --with-drill \ + --disable-dane-verify \ --with-examples \ --with-trust-anchor=/etc/trusted-key.key \ diff --git a/repo/system/libcap.xibuild b/repo/system/libcap.xibuild index ba9c19a..f3a5ee3 100644 --- a/repo/system/libcap.xibuild +++ b/repo/system/libcap.xibuild @@ -22,5 +22,7 @@ check () { package() { make prefix=/usr lib=lib DESTDIR=$PKG_DEST install - chmod -v 755 $PKG_DEST/usr/lib/lib{cap,psx}.so.* + chmod 755 $PKG_DEST/usr/lib/libcap.so.* + chmod 755 $PKG_DEST/usr/lib/libpsx.so.* + } diff --git a/repo/system/libelf.xibuild b/repo/system/libelf.xibuild new file mode 100644 index 0000000..52d9f7c --- /dev/null +++ b/repo/system/libelf.xibuild @@ -0,0 +1,32 @@ +#!/bin/sh + +MAKEDEPS="make " +DEPS="musl-fts musl-obstack argp-standalone" + +SOURCE=https://sourceware.org/elfutils/ftp/elfutils-latest.tar.bz2 +DESC="Handle ELF object files and DWARF debugging information" + +ADDITIONAL=" + https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/files/elfutils-void/error.h +" + +prepare() { + cp error.h lib/ + cp error.h src/ + + autoreconf -ifv + +} + +build () { + CFLAGS="-DFNM_EXTMATCH=0 -Wno-error -Wno-error=null-dereference -Wl,-z,stack-size=2097152" \ + ./configure --prefix=/usr --disable-debuginfod \ + --enable-libdebuginfod=dummy + make -C lib && make -C libelf +} + +package () { + make -C libelf DESTDIR=$PKG_DEST install + + install -d -m644 config/libelf.pc $PKG_DEST/usr/lib/pkgconfig +} diff --git a/repo/system/libidn.xibuild b/repo/system/libidn.xibuild index 7e33935..f592955 100644 --- a/repo/system/libidn.xibuild +++ b/repo/system/libidn.xibuild @@ -1,6 +1,6 @@ #!/bin/sh -MAKEDEPS="make " +MAKEDEPS="make findutils" DEPS="musl libunistring" PKG_VER=2.3.2 @@ -15,8 +15,12 @@ build () { package () { make DESTDIR=$PKG_DEST install - find doc -name "Makefile*" -delete && - rm -rf -v doc/{gdoc,idn.1,stamp-vti,man,texi} && - mkdir -pv $PKG_DEST/usr/share/doc/libidn-$PKG_VER && - cp -r -v doc/* $PKG_DEST/usr/share/doc/libidn-$PKG_VER + find ./doc -name "Makefile*" -delete && + rm -rf doc/gdoc && + rm -rf doc/idn.1 && + rm -rf doc/stamp-vti && + rm -rf doc/man && + rm -rf doc/texi && + mkdir -p $PKG_DEST/usr/share/doc/libidn-$PKG_VER && + cp -r doc/* $PKG_DEST/usr/share/doc/libidn-$PKG_VER } diff --git a/repo/system/libnl.xibuild b/repo/system/libnl.xibuild index 2a01c88..7ea18ba 100644 --- a/repo/system/libnl.xibuild +++ b/repo/system/libnl.xibuild @@ -1,6 +1,6 @@ #!/bin/sh -MAKEDEPS="" +MAKEDEPS="make tar gzip" DEPS="musl" PKG_VER=3.5.0 @@ -21,7 +21,7 @@ build () { package () { make DESTDIR=$PKG_DEST install - mkdir -vp $PKG_DEST/usr/share/doc/libnl-$PKG_VER && - tar -xf libnl-doc-$PKG_VER.tar.gz --strip-components=1 --no-same-owner \ + mkdir -p $PKG_DEST/usr/share/doc/libnl-$PKG_VER && + /usr/bin/tar -xf libnl-doc-$PKG_VER.tar.gz --strip-components=1 --no-same-owner \ -C $PKG_DEST/usr/share/doc/libnl-$PKG_VER } diff --git a/repo/system/libp11-kit.xibuild b/repo/system/libp11-kit.xibuild index ad12ec7..11d33be 100644 --- a/repo/system/libp11-kit.xibuild +++ b/repo/system/libp11-kit.xibuild @@ -27,7 +27,7 @@ build () { package () { make DESTDIR=$PKG_DEST install - ln -sfv $PKG_DEST/usr/libexec/p11-kit/trust-extract-compat \ + ln -sf $PKG_DEST/usr/libexec/p11-kit/trust-extract-compat \ $PKG_DEST/usr/bin/update-ca-certificates } diff --git a/repo/system/libressl.xibuild b/repo/system/libressl.xibuild index 972b884..72834f3 100644 --- a/repo/system/libressl.xibuild +++ b/repo/system/libressl.xibuild @@ -3,18 +3,41 @@ MAKEDEPS="make " DEPS="musl" -PKG_VER=3.0.1 -SOURCE=https://github.com/libressl/libressl/archive/refs/tags/libressl-$PKG_VER.tar.gz +PKG_VER=3.4.2 +SOURCE=https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-$PKG_VER.tar.gz DESC="The open source management tools and libraries for cryptography" +prepare () { + autoreconf -vif + case $(uname -m) in + x86_64) export EXTRACONFIG="" + export TRUPLE="x86_64-linux-musl" + ;; + i686) export EXTRACONFIG="--disable-hardening" + export TRUPLE="i686-linux-musl" + ;; + armv7l) export TRUPLE="armv7l-linux-musleabihf" + ;; + armv6l) export TRUPLE="armv6l-linux-musleabihf" + ;; + aarch64) export TRUPLE="aarch64-linux-musleabihf" + ;; + esac +} + build () { - ./config --prefix=/usr --libressldir=/etc/ssl --libdir=lib shared zlib-dynamic + CFLAGS="-L/usr/lib $CFLAGS" \ + ./configure \ + --build=$TRUPLE \ + --host=$TRUPLE \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var $EXTRACONFIG + unset EXTRACONFIG TRUPLE make } package () { - sed -i '/INSTALL_LIBS/s/libcrypto.a libssl.a//' Makefile make MANSUFFIX=ssl DESTDIR=$PKG_DEST install - mkdir -pv $PKG_DEST/usr/share/doc/libressl - cp -vfr doc/* $PKG_DEST/usr/share/doc/libressl } diff --git a/repo/system/libtool.xibuild b/repo/system/libtool.xibuild index ea7dc0e..c97257c 100644 --- a/repo/system/libtool.xibuild +++ b/repo/system/libtool.xibuild @@ -12,12 +12,12 @@ build () { make } -check () { - # one test with older libltdl interfaces failed - make check || true -} +#check () { + ## one test with older libltdl interfaces failed + #make check || true +#} package () { make DESTDIR=$PKG_DEST install - rm -fv $PKG_DEST/usr/lib/libltdl.a + rm -f $PKG_DEST/usr/lib/libltdl.a } diff --git a/repo/system/libxcrypt.xibuild b/repo/system/libxcrypt.xibuild index 2cb545f..ec931e1 100644 --- a/repo/system/libxcrypt.xibuild +++ b/repo/system/libxcrypt.xibuild @@ -1,7 +1,7 @@ #!/bin/sh -MAKEDEPS="make " -DEPS="musl" +MAKEDEPS="make" +DEPS="musl perl" PKG_VER=4.4.26 SOURCE=https://github.com/besser82/libxcrypt/releases/download/v$PKG_VER/libxcrypt-$PKG_VER.tar.xz @@ -14,9 +14,6 @@ build () { package () { make DESTDIR=$PKG_DEST install - - # this is probably wrong - ln $PKG_DEST/usr/lib/libcrypt.so $PKG_DEST/usr/lib/libcrypt.so.2 } diff --git a/repo/system/libxslt.xibuild b/repo/system/libxslt.xibuild index 3e456f9..d6dacc6 100644 --- a/repo/system/libxslt.xibuild +++ b/repo/system/libxslt.xibuild @@ -16,9 +16,6 @@ prepare () { build () { ./configure --prefix=/usr --disable-static --without-python && make - #sed -e 's@http://cdn.docbook.org/release/xsl@https://cdn.docbook.org/release/xsl-nons@' \ - #-e 's@\$Date\$@31 October 2019@' -i doc/xsltproc.xml && - #xsltproc/xsltproc --nonet doc/xsltproc.xml -o doc/xsltproc.1 } package () { diff --git a/repo/system/musl-fts.xibuild b/repo/system/musl-fts.xibuild index daf4841..508f84c 100644 --- a/repo/system/musl-fts.xibuild +++ b/repo/system/musl-fts.xibuild @@ -1,10 +1,10 @@ #!/bin/sh -MAKEDEPS="" +MAKEDEPS="libtool" DEPS="musl" PKG_VER=1.2.7 -SOURCE=https://github.com/pullmoll/musl-fts/archive/v$PKG_DEST.tar.gz +SOURCE=https://github.com/pullmoll/musl-fts/archive/v$PKG_VER.tar.gz DESC="Libraries implementing the set of fts functions missing in musl libc" diff --git a/repo/system/ncurses.xibuild b/repo/system/ncurses.xibuild index a5e820b..f34211b 100644 --- a/repo/system/ncurses.xibuild +++ b/repo/system/ncurses.xibuild @@ -9,7 +9,12 @@ SOURCE=https://invisible-mirror.net/archives/ncurses/ncurses-$PKG_VER.tar.gz DESC="curses emulation library" build () { - ./configure --prefix=/usr --mandir=/usr/share/man --with-shared --without-debug --without-normal --enable-pc-files --enable-widec + ./configure --prefix=/usr \ + --mandir=/usr/share/man \ + --with-shared \ + --without-debug \ + --without-normal \ + --enable-widec \ make } diff --git a/repo/system/nss.xibuild b/repo/system/nss.xibuild index 182b452..06b70d0 100644 --- a/repo/system/nss.xibuild +++ b/repo/system/nss.xibuild @@ -6,16 +6,9 @@ DEPS="nspr libp11-kit bash zlib" PKG_VER=3.74 SOURCE=https://archive.mozilla.org/pub/security/nss/releases/NSS_$(echo $PKG_VER | sed 's/\./_/g')_RTM/src/nss-$PKG_VER.tar.gz -ADDITIONAL=" - https://www.linuxfromscratch.org/patches/blfs/svn/nss-$PKG_VER-standalone-1.patch - " DESC="Network Security Services" -prepare () { - patch -Np1 -i nss-$PKG_VER-standalone-1.patch -} - build () { cd nss && @@ -31,20 +24,26 @@ build () { package () { cd ../dist - mkdir -pv $PKG_DEST/usr/{lib/pkgconfig,bin,include/nss,} - install -v -m755 Linux*/lib/*.so $PKG_DEST/usr/lib - install -v -m644 Linux*/lib/{*.chk,libcrmf.a} $PKG_DEST/usr/lib + for p in lib/pkgconfig bin include/nss; do + mkdir -p $PKG_DEST/usr/$p + done - install -v -m755 -d $PKG_DEST/usr/include/nss - cp -v -RL {public,private}/nss/* $PKG_DEST/usr/include/nss - chmod -v 644 $PKG_DEST/usr/include/nss/* + install -m755 Linux*/lib/*.so $PKG_DEST/usr/lib + install -m644 Linux*/lib/*.chk $PKG_DEST/usr/lib + install -m644 Linux*/lib/libcrmf.a $PKG_DEST/usr/lib - install -v -m755 Linux*/bin/{certutil,nss-config,pk12util} $PKG_DEST/usr/bin + install -m755 -d $PKG_DEST/usr/include/nss + cp -RL public/nss/* $PKG_DEST/usr/include/nss + cp -RL private/nss/* $PKG_DEST/usr/include/nss + chmod 644 $PKG_DEST/usr/include/nss/* - install -v -m644 Linux*/lib/pkgconfig/nss.pc $PKG_DEST/usr/lib/pkgconfig - ln -sfv ./pkcs11/p11-kit-trust.so $PKG_DEST/usr/lib/libnssckbi.so + for p in certutil nss-config pk12util; do + install -m755 Linux*/bin/$p $PKG_DEST/usr/bin + done + install -m644 Linux*/lib/pkgconfig/nss.pc $PKG_DEST/usr/lib/pkgconfig + ln -sf ./pkcs11/p11-kit-trust.so $PKG_DEST/usr/lib/libnssckbi.so } diff --git a/repo/system/nsss.xibuild b/repo/system/nsss.xibuild new file mode 100644 index 0000000..dc3fb07 --- /dev/null +++ b/repo/system/nsss.xibuild @@ -0,0 +1,28 @@ +#!/bin/sh + +MAKEDEPS="make" +DEPS="skalibs" + +PKG_VER=0.2.0.1 + +SOURCE=https://skarnet.org/software/nsss/nsss-$PKG_VER.tar.gz + +DESC="Minimal competing implementation of glibc's Name Switch Service" + +build () { + ./configure --prefix=/usr \ + --exec-prefix=/usr \ + --with-dynlib=/usr/lib \ + --libexecdir=/usr/lib/nsss \ + --libdir=/usr/lib \ + --with-dynlib=/usr/lib \ + --enable-shared \ + --static-static + + make +} + +package () { + make DESTDIR=$PKG_DEST install + +} diff --git a/repo/system/pahole.xibuild b/repo/system/pahole.xibuild index f537077..e9b4f99 100644 --- a/repo/system/pahole.xibuild +++ b/repo/system/pahole.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="cmake python make " -DEPS="elfutils python" +DEPS="libelf python" PKG_VER=1.23 SOURCE=https://git.kernel.org/pub/scm/devel/pahole/pahole.git diff --git a/repo/system/pam.xibuild b/repo/system/pam.xibuild index 0091605..7fdccff 100644 --- a/repo/system/pam.xibuild +++ b/repo/system/pam.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="make automake" -DEPS="musl libtirpc audit libxcrypt" +DEPS="musl audit libxcrypt" PKG_VER=1.5.2 SOURCE=https://github.com/linux-pam/linux-pam/releases/download/v$PKG_VER/Linux-PAM-$PKG_VER.tar.xz @@ -27,9 +27,9 @@ build () { package () { make DESTDIR=$PKG_DEST install - install -v -m755 -d $PKG_DEST/etc/pam.d + install -m755 -d $PKG_DEST/etc/pam.d - install -vdm755 $PKG_DEST/etc/pam.d + install -dm755 $PKG_DEST/etc/pam.d cat > $PKG_DEST/etc/pam.d/system-account << "EOF" # Begin /etc/pam.d/system-account diff --git a/repo/system/perl.xibuild b/repo/system/perl.xibuild index ac52519..821a1f5 100644 --- a/repo/system/perl.xibuild +++ b/repo/system/perl.xibuild @@ -1,7 +1,7 @@ #!/bin/sh -MAKEDEPS="make" -DEPS="gdbm musl libxcrypt bzip2 zlib" +MAKEDEPS="make sed" +DEPS="gdbm musl bzip2 zlib tar" PKG_VER=5.34.0 SOURCE=https://www.cpan.org/src/5.0/perl-$PKG_VER.tar.gz @@ -10,12 +10,34 @@ DESC="The Practical Extraction and Report Language" prepare () { export BUILD_ZLIB=False export BUILD_BZIP2=0 + export CF_OLD=$CFLAGS + export CFLAGS+=" -DNO_POSIX_2008_LOCALE" + export CFLAGS+=" -D_GNU_SOURCE" - sh Configure -des -Dprefix=/usr -Dlibs=-lm -Uloclibpth -Ulocincpth + rm -rf cpan/Compress-Raw-Zlib/zlib-src + sed -i '/\(bzip2\|zlib\)-src/d' MANIFEST + + rm -rf cpan/Compress-Raw-Bzip2/bzip2-src + sed -i '/\(bzip2\|zzz\)-src/d' MANIFEST + + sh Configure -des -Dprefix=/usr \ + -Dvendorprefix=/usr \ + -Dprivlib=/usr/lib/perl5/5.34/core_perl \ + -Darchlib=/usr/lib/perl5/5.34/core_perl \ + -Dsitelib=/usr/lib/perl5/5.34/site_perl \ + -Dsitearch=/usr/lib/perl5/5.34/site_perl \ + -Dvendorlib=/usr/lib/perl5/5.34/vendor_perl \ + -Dvendorarch=/usr/lib/perl5/5.34/vendor_perl \ + -Dman1dir=/usr/share/man/man1 \ + -Dman3dir=/usr/share/man/man3 \ + -Dpager="/usr/bin/less -isR" \ + -Duseshrplib \ + -Dusethreads \ + -Dcccdlflags='-fPIC' -Dccdlflags='-rdynamic' } build () { - make + make } check () { @@ -27,3 +49,4 @@ package () { for f in $(find /export -maxdepth 1 -type f); do echo $f; rm $f; done unset BUILD_ZLIB BUILD_BZIP2 } + diff --git a/repo/system/python.xibuild b/repo/system/python.xibuild index d3c7fe8..2a71dea 100644 --- a/repo/system/python.xibuild +++ b/repo/system/python.xibuild @@ -1,14 +1,31 @@ #!/bin/sh -MAKEDEPS="make" -DEPS="bzip2 expat gdbm libffi libnsl libxcrypt libressl zlib" -PKG_VER=3.10.0 +MAKEDEPS="make autoconf automake autoconf-archive" +DEPS="bzip2 expat gdbm libffi libnsl libxcrypt libressl zlib grep" + +PKG_VER=3.10.2 SOURCE=https://www.python.org/ftp/python/$PKG_VER/Python-$PKG_VER.tgz DESC="The Python development environment" +prepare () { + rm -r Modules/expat + rm -r Modules/_ctypes/darwin* + rm -r Modules/_ctypes/libffi* +} + build () { - ./configure --prefix=/usr --enable-shared --with-system-expat --with-system-ffi --with-ensurepip=yes --enable-optimizations --with-ssl --with-requests + CFLAGS="-flto" + autoreconf -i + GREP="/usr/bin/ggrep" ./configure --prefix=/usr \ + --enable-shared \ + --with-system-expat \ + --with-system-ffi \ + --with-ensurepip=yes \ + --with-pip=yes \ + --enable-ipv6 \ + --enable-loadable-sqlite-extensions \ + --with-computed-gotos make } diff --git a/repo/system/readline.xibuild b/repo/system/readline.xibuild index 4757abd..5b93318 100644 --- a/repo/system/readline.xibuild +++ b/repo/system/readline.xibuild @@ -1,6 +1,6 @@ #!/bin/sh -MAKEDEPS="make " +MAKEDEPS="make sed" DEPS="musl ncurses" PKG_VER=8.1 @@ -16,15 +16,15 @@ prepare () { build () { ./configure --prefix=/usr \ - --disable-static \ - --with-curses \ - --docdir=/usr/share/doc/readline-8.1 + --disable-static \ + --with-curses \ + --docdir=/usr/share/doc/readline-$PKG_VER make SHLIB_LIBS="-lncursesw" } package () { make SHLIB_LIBS="-lncursesw" DESTDIR=$PKG_DEST install - install -v -m644 doc/*.{ps,pdf,html,dvi} $PKG_DEST/usr/share/doc/readline-8.1 + install -m644 doc/* $PKG_DEST/usr/share/doc/readline-$PKG_VER } diff --git a/repo/system/sed.xibuild b/repo/system/sed.xibuild index 1ddd84c..a5b2297 100644 --- a/repo/system/sed.xibuild +++ b/repo/system/sed.xibuild @@ -10,12 +10,12 @@ DESC="GNU stream editor" build () { ./configure --prefix=/usr make - make html + #make html } package () { make DESTDIR=$PKG_DEST install - install -d -m755 $PKG_DEST/usr/share/doc/sed-$PKG_VER - install -m644 doc/sed.html $PKG_DEST/usr/share/doc/sed-$PKG_VER + #install -d -m755 $PKG_DEST/usr/share/doc/sed-$PKG_VER + #install -m644 doc/sed.html $PKG_DEST/usr/share/doc/sed-$PKG_VER } diff --git a/repo/system/shadow.xibuild b/repo/system/shadow.xibuild index b528110..94b4efa 100644 --- a/repo/system/shadow.xibuild +++ b/repo/system/shadow.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="make " -DEPS="pam acl audit libcap libxcrypt" +DEPS="acl audit libcap libxcrypt" PKG_VER=4.11.1 diff --git a/repo/system/tcl.xibuild b/repo/system/tcl.xibuild index 1ab5d34..6495948 100644 --- a/repo/system/tcl.xibuild +++ b/repo/system/tcl.xibuild @@ -40,13 +40,14 @@ check () { package () { make DESTDIR=$PKG_DEST install - chmod -v u+w $PKG_DEST/usr/lib/libtcl$(echo $PKG_DEST | cut -d. -f-2).so + chmod u+w $PKG_DEST/usr/lib/libtcl$(echo $PKG_DEST | cut -d. -f-2).so make DESTDIR=$PKG_DEST install-private-headers ln $PKG_DEST/usr/bin/tclsh* $PKG_DEST/usr/bin/tclsh cp -f tclsh9 $PKG_DEST/usr/bin/tclsh - mv $PKG_DEST/usr/share/man/man3/{Thread,Tcl_Thread}.3 + mv $PKG_DEST/usr/share/man/man3/Thread.3 \ + $PKG_DEST/usr/share/man/man3/Tcl_Thread.3 } diff --git a/repo/system/utmps.xibuild b/repo/system/utmps.xibuild index 28b358f..0d45319 100644 --- a/repo/system/utmps.xibuild +++ b/repo/system/utmps.xibuild @@ -1,17 +1,13 @@ #!/bin/sh MAKEDEPS="" -DEPS="skalib" +DEPS="skalibs" PKG_VER=0.1.1.0 SOURCE=https://skarnet.org/software/utmps/utmps-0.1.1.0.tar.gz DESC="Library implementing utmpx.h family of functions" -prepare () { - sed -i -e "s/@@VERSION@@/0.1.1.0/g" -- /tmp/*.pc -} - build () { ./configure \ --enable-shared \ @@ -24,13 +20,14 @@ build () { package () { make DESTDIR=$PKG_DEST install - ln -sv utmps/utmpx.h $PKG_DEST/usr/include/utmpx.h + ln -s utmps/utmpx.h $PKG_DEST/usr/include/utmpx.h + install -d $PKG_DEST/usr/lib/pkgconfig cat > $PKG_DEST/usr/lib/pkgconfig/utmps.pc << EOF Name: utmps Description: A secure implementation of the utmp mechanism. URL: https://skarnet.org/software/utmps/ -Version: @@VERSION@@ +Version: $PKG_VER Requires.private: skalibs Libs: -lutmps Cflags: -I/usr/include/utmps diff --git a/repo/system/zlib.xibuild b/repo/system/zlib.xibuild index d86e791..15dbe59 100644 --- a/repo/system/zlib.xibuild +++ b/repo/system/zlib.xibuild @@ -19,6 +19,6 @@ check () { package () { make DESTDIR=$PKG_DEST install - rm -fv $PKG_DEST/usr/lib/libz.a + rm -f $PKG_DEST/usr/lib/libz.a } -- cgit v1.2.1