galeb

Једноставна статичка дистрибуција заснована на musl-у
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување 543d4697be3e6e569b9eca800c31c0529cc830a6
родитељ cdeae9e4e3616ff06661fe6da3ebaded84ac491a
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Mon,  1 Aug 2022 10:29:18 +0200

Add libxml2 and libxslt, prerequisites for PRoot's documentation; use my fork of sbase for tar

Signed-off-by: Страхиња Радић <contact@strahinja.org>

Diffstat:
M03-packages.sh | 97++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
M04-finale.sh | 13+++++--------
MTODO | 4++--
Mlib/fun.sh | 4++--
Mlib/pkgs.tsv | 12+++++++-----
Apat/libxml2-adelie/python-segfault-fix.patch | 36++++++++++++++++++++++++++++++++++++
измењених датотека: 6, додавања: 138(+), брисања: 28(-)

diff --git a/03-packages.sh b/03-packages.sh @@ -1300,6 +1300,90 @@ mkpk_install() fi end_substep +# Needed for libxslt +begin_substep libxml2-2.9.12 +if [ -e /sucks/lib/libxml2.so.2.9.12 ]; then + msg info "%s exists, skipping %s" /sucks/lib/libxml2.so.2.9.12 ${pkg} +elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then + unpack_pkg ${pkg} / +else + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz + ( + cd_or_fail ${G_SRC}/${pkg} + + apply_patch packages -Np1 -i \ + ${G_PAT}/libxml2-adelie/python-segfault-fix.patch + + cat <<! >MKPK +mkpk_name() +{ + printf "%s" "${pkg}" +} + +mkpk_install() +{ + CFLAGS='-Os -pipe' + LDFLAGS='-s' + DESTDIR=/build + export CFLAGS DESTDIR LDFLAGS + + autoreconf -vif + + ./configure --prefix=/sucks \\ + --with-history \\ + --with-python=/sucks/bin/python3 \\ + --with-icu \\ + --with-threads + + make ${JN} DESTDIR=\${DESTDIR} install || exit 1 +} +! + mkpk ${pkg} + remove_dir ${G_SRC}/${pkg} + unpack_pkg ${pkg} / + ) || exit 1 +fi +end_substep + +# Needed for PRoot +begin_substep libxslt-1.1.35 +if [ -e /sucks/lib/libxslt.so.1.1.35 ]; then + msg info "%s exists, skipping %s" /sucks/lib/libxslt.so.1.1.35 ${pkg} +elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then + unpack_pkg ${pkg} / +else + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz + ( + cd_or_fail ${G_SRC}/${pkg} + + cat <<! >MKPK +mkpk_name() +{ + printf "%s" "${pkg}" +} + +mkpk_install() +{ + CFLAGS='-Os -pipe' + LDFLAGS='-s' + DESTDIR=/build + export CFLAGS DESTDIR LDFLAGS + + /${TLD}/bin/sed -i s/3000/5000/ libxslt/transform.c doc/xsltproc.1 \\ + doc/xsltproc.xml + + ./configure --prefix=/sucks + + make ${JN} DESTDIR=\${DESTDIR} install || exit 1 +} +! + mkpk ${pkg} + remove_dir ${G_SRC}/${pkg} + unpack_pkg ${pkg} / + ) || exit 1 +fi +end_substep + begin_substep psmisc-23.4 if [ -x /bin/killall ]; then msg info "%s exists, skipping %s" /bin/killall ${pkg} @@ -3284,7 +3368,6 @@ mkpk_install() do ln -s \${py##*/} \${py%%.py} done - sh } ! mkpk ${pkg} @@ -3848,10 +3931,9 @@ mkpk_install() fi end_substep -if false; then begin_substep proot-5.3.1 -if [ -e /sucks/bin/proot ]; then - msg info "%s exists, skipping %s" /sucks/lib/libtalloc.so.2.3.4 ${pkg} +if [ -x /sucks/bin/proot ]; then + msg info "%s exists, skipping %s" /sucks/bin/proot ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else @@ -3883,12 +3965,6 @@ mkpk_install() install -Dm644 doc/proot/man.1 /build/sucks/share/man/man1/proot.1 install -Dm644 doc/proot/index.html \\ /build/sucks/share/doc/${pkg}/index.html - install -Dm644 doc/proot/changelog.txt \\ - /build/sucks/share/doc/${pkg}/changelog.txt - install -Dm644 doc/proot/manual.txt \\ - /build/sucks/share/doc/${pkg}/manual.txt - install -Dm644 doc/proot/roadmap.txt \\ - /build/sucks/share/doc/${pkg}/roadmap.txt install -dm755 /build/sucks/share/doc/${pkg}/stylesheets install -m644 doc/proot/stylesheets/* \\ /build/sucks/share/doc/${pkg}/stylesheets/ @@ -3900,7 +3976,6 @@ mkpk_install() ) || exit 1 fi end_substep -fi begin_substep texinfo-6.8 if [ -x /sucks/bin/texi2dvi ]; then diff --git a/04-finale.sh b/04-finale.sh @@ -121,9 +121,7 @@ mkpk_install() fi end_substep -HOST_TAR=0 -export HOST_TAR -begin_substep sbase-20220709 +begin_substep sbase-20220801 if [ -e /bin/ls ] && [ ! -L /bin/ls ]; then msg info "%s exists, skipping %s" /bin/ls ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -132,8 +130,10 @@ else ( cd_or_fail ${G_SRC}/${pkg} - apply_patch finale -Np1 -i \ - ${G_PAT}/sbase-galeb/sbase-tar-n.patch + git apply patches/0001-Split-path-into-prefix-name-on-c.patch \ + || exit 1 + git apply patches/0001-Add-n-equivalent-of-no-recursion.patch \ + || exit 1 cat <<! >MKPK mkpk_name() @@ -171,9 +171,6 @@ mkpk_install() fi end_substep -HOST_TAR=1 -export HOST_TAR - begin_substep ubase-20220709 if [ -x /bin/id ]; then msg info "%s exists, skipping %s" /bin/id ${pkg} diff --git a/TODO b/TODO @@ -5,8 +5,6 @@ TODO [ ] Add sacc [ ] Add neomutt -[ ] Fix sbase tar - split long names into prefix + name instead of choking - Low priority ------------ @@ -27,6 +25,8 @@ Low priority Done ---- +[x] Fix sbase tar - split long names into prefix + name instead of choking + [x] Add packages [x] Add gpm [x] Add smdev diff --git a/lib/fun.sh b/lib/fun.sh @@ -249,7 +249,7 @@ extract_pkg() if [ "${touch}" = "touch" ]; then mopt=-m fi - if ! ${prog} "${G_PKG}/${tarball}" | g_tar -x ${mopt} -f - + if ! ${prog} "${G_PKG}/${tarball}" | g_tar -x -v ${mopt} -f - then msg err "Extracting %s failed" "${tarball}" exit 1 @@ -584,5 +584,5 @@ unpack_pkg() fi cd_or_fail $1 msg info "Unpacking %s" ${G_SPKG}/${pkg}.tar.xz - xz -dc ${G_SPKG}/${pkg}.tar.xz | g_tar -xf - + xz -dc ${G_SPKG}/${pkg}.tar.xz | tar -xf - } diff --git a/lib/pkgs.tsv b/lib/pkgs.tsv @@ -2,6 +2,7 @@ URL Directory/Tarball MD5 Sum ftp://ftp.vim.org/pub/vim/unix/vim-8.1.tar.bz2 1739a1df312305155285f0cfa6118294 git+https://git.adelielinux.org/adelie/musl-locales.git musl-locales-20220708 git+https://git.sr.ht/~strahinja/reflow reflow-20220716 +git+https://git.sr.ht/~strahinja/sbase sbase-20220801 git+https://git.sr.ht/~strahinja/svc svc-20220720 git+https://github.com/cpeuvrel/usleep-aur usleep-20220718 git+https://github.com/mirbsd/mksh mksh-20220709 @@ -10,7 +11,6 @@ git://git.2f30.org/pass pass-20220723 git://git.2f30.org/sdhcp sdhcp-20220716 git://git.suckless.org/9base 9base-20220706 git://git.suckless.org/farbfeld farbfeld-20220722 -git://git.suckless.org/sbase sbase-20220709 git://git.suckless.org/sinit sinit-20220713 git://git.suckless.org/smdev smdev-20220715 git://git.suckless.org/ubase ubase-20220709 @@ -19,6 +19,7 @@ git://repo.or.cz/tinycc.git tinycc-20220708 http://mama.indstate.edu/users/ice/tree/src/tree-2.0.2.tgz bc4b2e2c8726c6156d52a00b52de6b1d http://www.jimpryor.net/linux/releases/dcron-4.5.tar.gz 078833f3281f96944fc30392b1888326 http://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.xz 1c9802446d7341c41c21eb98c7859064 +http://xmlsoft.org/sources/libxml2-2.9.12.tar.gz f433a39be087a9f0b197eb2307ad9f75 https://astron.com/pub/file/file-5.41.tar.gz 18233bb0a0089dfdc7dfbc93b96f231b https://cmake.org/files/v3.23/cmake-3.23.2.tar.gz ab3c9ed9578cdb496a252c6733989d78 https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.46.tar.gz 80bb18a8e6240fcf7ec2f7b57601c170 @@ -27,8 +28,10 @@ https://dev.alpinelinux.org/archive/posixtz/posixtz-0.5.tar.xz 80f8ae1df19dd28e https://dev.gentoo.org/~xen0n/distfiles/pax-utils-1.3.4.tar.xz b9cdbc70fdd4e377dcf17eeff28c5ade https://dist.libuv.org/dist/v1.44.1/libuv-v1.44.1.tar.gz libuv-1.44.1.tar.gz c09e81ebac8c4cdb9ef3adada0257350 https://distfiles.dereferenced.org/pkgconf/pkgconf-1.8.0.tar.xz 823212dc241793df8ff1d097769a3473 +https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.35.tar.xz 5b3a634b77effd8a6268c21173575053 https://download.savannah.gnu.org/releases/acl/acl-2.3.1.tar.xz 95ce715fe09acca7c12d3306d0f076b2 https://download.savannah.gnu.org/releases/attr/attr-2.5.1.tar.gz ac1c5a7a084f0f83b8cace34211f64d8 +https://downloads.sourceforge.net/docutils/docutils-0.19.tar.gz 0afa992a6e93db892107c3f087d0d9df https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-2.1.3.tar.gz 85244dedeaf06f636a9e7ddea6d236d8 https://downloads.sourceforge.net/libpng/libpng-1.6.37.tar.xz 015e8e15db1eecde5f2eb9eb5b6e59e9 https://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.46.5/e2fsprogs-1.46.5.tar.gz 3da91854c960ad8a819b48b2a404eb43 @@ -78,6 +81,7 @@ https://github.com/ericonr/argp-standalone/archive/refs/tags/1.4.1.tar.gz argp-s https://github.com/facebook/zstd/releases/download/v1.5.0/zstd-1.5.0.tar.gz a6eb7fb1f2c21fa80030a47993853e92 https://github.com/gavinhoward/bc/releases/download/5.0.0/bc-5.0.0.tar.xz 8345bb81c576ddfc8c27e0842370603c https://github.com/hvisage/metalog/archive/refs/tags/metalog-20220214.tar.gz fdc00a7b41dbb7f18375352e4e3a37d5 +https://github.com/libarchive/libarchive/releases/download/v3.6.1/libarchive-3.6.1.tar.xz 9465f7995649c9ea84854a7fd8c76f30 https://github.com/libcheck/check/releases/download/0.15.2/check-0.15.2.tar.gz 50fcafcecde5a380415b12e9c574e0b2 https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz libevent-2.1.12.tar.gz b5333f021f880fe76490d8a799cd79f4 https://github.com/libffi/libffi/releases/download/v3.4.2/libffi-3.4.2.tar.gz 294b921e6cf9ab0fbaea4b639f8fdbe8 @@ -97,6 +101,7 @@ https://github.com/tmux/tmux/releases/download/3.3a/tmux-3.3a.tar.gz 8eee5883b9 https://github.com/util-linux/util-linux/archive/refs/tags/v2.38.tar.gz util-linux-2.38.tar.gz d6f945e504db53c9cdea43a38c226d94 https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz 2882e3179748cc9f9c23ec593d6adc8d https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.0.6.tar.gz zlib-ng-2.0.6.tar.gz 4ba0da231291632799948c5568906ce4 +https://gitlab.com/proot/proot/-/archive/v5.3.1/proot-v5.3.1.tar.bz2 proot-5.3.1.tar.bz2 1000e9eb93c14688359dfd2e7a549d81 https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.3.7.tar.bz2 1c6a6722b9cececcf10ca4e24106e34b https://gnupg.org/ftp/gcrypt/gpgme/gpgme-1.17.1.tar.bz2 4d3c7699e1cdd4095d103f7a6833ae3a https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.5.tar.bz2 7194453152bb67e3d45da698762b5d6f @@ -136,8 +141,5 @@ https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-5.17.0.tar.xz 8ade https://www.leonerd.org.uk/code/libtermkey/libtermkey-0.22.tar.gz 08bf514d59660391c3a21b3977a16c8c https://www.nico.schottelius.org/software/gpm/archives/gpm-1.20.7.tar.bz2 bf84143905a6a903dbd4d4b911a2a2b8 https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tar.xz 11d12076311563252a995201248d17e5 -https://www.zlib.net/pigz/pigz-2.7.tar.gz 2d084221ba829d29f344305845a313f3 -https://github.com/libarchive/libarchive/releases/download/v3.6.1/libarchive-3.6.1.tar.xz 9465f7995649c9ea84854a7fd8c76f30 https://www.samba.org/ftp/talloc/talloc-2.3.4.tar.gz ffdaf52a6572307cc3b6487b9e99cd61 -https://gitlab.com/proot/proot/-/archive/v5.3.1/proot-v5.3.1.tar.bz2 proot-5.3.1.tar.bz2 1000e9eb93c14688359dfd2e7a549d81 -https://downloads.sourceforge.net/docutils/docutils-0.19.tar.gz 0afa992a6e93db892107c3f087d0d9df +https://www.zlib.net/pigz/pigz-2.7.tar.gz 2d084221ba829d29f344305845a313f3 diff --git a/pat/libxml2-adelie/python-segfault-fix.patch b/pat/libxml2-adelie/python-segfault-fix.patch @@ -0,0 +1,36 @@ +Upstream: https://bugzilla.gnome.org/show_bug.cgi?id=791691 + +From d1ea6250dd00a3b7a92b52a743ec53f7751196e5 Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> +Date: Sat, 16 Dec 2017 19:22:23 -0600 +Subject: [PATCH] Python: if message is NULL, use Py_None instead + +If the error message is malformed / invalid UTF-8, and the Python 3 +binding is being used, then message may be NULL. This will cause the +Python interpreter to crash (Segmentation fault) trying to unpack the +argument list into local variables. + +This uses Py_None for message if message is NULL, so that the +interpreter does not crash. +--- + python/libxml.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/python/libxml.c b/python/libxml.c +index 5b1ff6e8..dae77b88 100644 +--- a/python/libxml.c ++++ b/python/libxml.c +@@ -1640,6 +1640,10 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, const char *msg, + PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt); + Py_XINCREF(libxml_xmlPythonErrorFuncCtxt); + message = libxml_charPtrConstWrap(str); ++ if (message == NULL) { ++ Py_INCREF(Py_None); ++ message = Py_None; ++ } + PyTuple_SetItem(list, 1, message); + result = PyEval_CallObject(libxml_xmlPythonErrorFuncHandler, list); + Py_XDECREF(list); +-- +2.14.1 +