galeb

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

чување 24f64234a926565f6dc7d22bb8285ac445c4e7dc
родитељ ad58fe504ceec846c125970b652a2055bb5dfd92
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Tue, 19 Jul 2022 19:04:21 +0200

Add tmux and the first X package

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

Diffstat:
M01-cross.sh | 1+
M02-chroot.sh | 2--
M03-packages.sh | 130+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
M04-finale.sh | 1+
MTODO | 1+
Mfil/rc.d/rc.init | 3+++
Mfil/rc.d/rc.svc | 3---
Mlib/fun.sh | 11++++++++---
Mlib/pkgs.tsv | 5+++--
измењених датотека: 9, додавања: 145(+), брисања: 12(-)

diff --git a/01-cross.sh b/01-cross.sh @@ -42,6 +42,7 @@ check_dir ${TL}/bin check_dir ${TL}/lib check_dir ${G_SPKG} +check_dir ${G_SPKG}/X msg info "Creating directories" ./lib/createdirs 01-cross.sh || exit 1 diff --git a/02-chroot.sh b/02-chroot.sh @@ -159,8 +159,6 @@ msg info "Creating symlinks" msg info "Setting permissions" ./lib/setperms -chmod 755 ${GR}/bin/svc.d/avail/* - msg info "Cleaning up" ./lib/rmfiles 02-chroot.sh-end diff --git a/03-packages.sh b/03-packages.sh @@ -25,7 +25,7 @@ fi export JN=-j1 -totalsteps=1 +totalsteps=3 step=1 msg info "Creating symlinks" @@ -4423,7 +4423,7 @@ mkpk_name() mkpk_install() { - CFLAGS='-Os ' + CFLAGS='-Os -pipe' LDFLAGS='' DESTDIR=/build EFI_LOADER='grubx64.efi' @@ -4469,6 +4469,132 @@ if [ ! -x /bin/umountall ]; then fi end_substep +begin_substep libevent-2.1.12 +if [ -x /sucks/lib/libevent-2.1.so.7.0.1 ]; then + msg info "%s exists, skipping %s" /sucks/lib/libevent-2.1.so.7.0.1 \ + ${pkg} +elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then + unpack_pkg ${pkg} / +else + extract_pkg ${G_SRC} libevent-2.1.12-stable ${pkg}.tar.gz ${pkg} + ( + cd_or_fail ${G_SRC}/${pkg} + + cat <<! >MKPK +mkpk_name() +{ + printf "%s" "${pkg}" +} + +mkpk_install() +{ + CFLAGS='-Os -pipe' + LDFLAGS='' + DESTDIR=/build + export CFLAGS LDFLAGS DESTDIR + + ./configure --prefix=/sucks || exit 1 + + make ${JN} || exit 1 + make install +} +! + mkpk ${pkg} + remove_dir ${G_SRC}/${pkg} + unpack_pkg ${pkg} / + ) || exit 1 +fi +end_substep + +begin_substep tmux-3.3a +if [ -x /bin/tmux/ ]; then + msg info "%s exists, skipping %s" /bin/tmux ${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} + + cat <<! >MKPK +mkpk_name() +{ + printf "%s" "${pkg}" +} + +mkpk_install() +{ + CFLAGS='-Os -pipe -static --static -fcommon' + LDFLAGS='-static --static -fcommon' + DESTDIR=/build + export CFLAGS LDFLAGS DESTDIR + + ./configure --prefix=/ || exit 1 + + make ${JN} || exit 1 + make install-strip +} +! + mkpk ${pkg} + remove_dir ${G_SRC}/${pkg} + unpack_pkg ${pkg} / + ) || exit 1 +fi +end_substep + +end_step # packages + +begin_step X + +totalsubsteps=100 +substep=1 + +begin_substep pixman-0.40.0 +if [ -x /sucks/lib/libpixman-1.so.0.40.0 ]; then + msg info "%s exists, skipping %s" /sucks/lib/libpixman-1.so.0.40.0 \ + ${pkg} +elif [ -e ${G_SPKG}/X/${pkg}.tar.xz ]; then + unpack_pkg X/${pkg} / +else + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz + ( + cd_or_fail ${G_SRC}/${pkg} + + cat <<! >MKPK +mkpk_name() +{ + printf "%s" "${pkg}" +} + +mkpk_install() +{ + CFLAGS='-Os -pipe' + LDFLAGS='' + DESTDIR=/build + export CFLAGS LDFLAGS DESTDIR + + mkdir b + cd b + meson --prefix=/sucks .. || exit 1 + ninja ${JN} || exit 1 + ninja install +} +! + mkpk ${pkg} + mv_or_fail ${G_SPKG}/${pkg}.* ${G_SPKG}/X/ + remove_dir ${G_SRC}/${pkg} + unpack_pkg X/${pkg} / + ) || exit 1 +fi +end_substep + +end_step # X + +begin_step Linux + +totalsubsteps=1 +substep=1 + begin_substep linux-5.17.13 extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz remove_file ${G_SRC}/linux diff --git a/04-finale.sh b/04-finale.sh @@ -248,6 +248,7 @@ mkpk_install() cp README.md ../build/share/doc/${pkg}/ mkdir -p ../build/bin/svc.d/avail cp -r /svc.d/avail/* ../build/bin/svc.d/avail/ + chmod 755 ../build/bin/svc.d/avail/* mkdir -p ../build/bin/svc.d/default cp -r /svc.d/default/* ../build/bin/svc.d/default/ } diff --git a/TODO b/TODO @@ -21,6 +21,7 @@ TODO [ ] git://r-36.net/nlmon [ ] git://r-36.net/rfkilld [ ] Add ssh(d) + [x] Add tmux [x] fsck.vfat [x] Add curl (needed for git?) - needed [/] git://git.suckless.org/utmp - n/a here diff --git a/fil/rc.d/rc.init b/fil/rc.d/rc.init @@ -60,6 +60,9 @@ mount -a ln -sf /proc/mounts /etc/mtab +msg info "Configure svc" +svc -c + service start metalog if [ -n "${FONT}" ]; then diff --git a/fil/rc.d/rc.svc b/fil/rc.d/rc.svc @@ -5,9 +5,6 @@ umask 022 . /etc/rc.conf . /lib/g_fun.sh -msg info "Configure svc" -svc -c - for service in $(find /bin/svc.d/run -type l) do msg serv "Starting %s\t\t\t" ${service##*/} diff --git a/lib/fun.sh b/lib/fun.sh @@ -560,9 +560,14 @@ unpack_pkg() { local pkg=$1 shift - cd_or_fail ${G_SPKG} - if ! g_md5sum -c ${pkg}.md5 >/dev/null 2>&1; then - msg err "md5sum -c %s failed" ${G_SPKG}/${pkg}.tar.xz + dir=${G_SPKG} + case "${pkg}" in + */*) dir=${dir}/${pkg%/*};; + *) ;; + esac + cd_or_fail ${dir} + if ! g_md5sum -c ${pkg##*/}.md5 >/dev/null 2>&1; then + msg err "md5sum -c %s failed" ${dir}/${pkg##*/}.tar.xz exit 1 fi cd_or_fail $1 diff --git a/lib/pkgs.tsv b/lib/pkgs.tsv @@ -69,6 +69,7 @@ https://github.com/facebook/zstd/releases/download/v1.5.0/zstd-1.5.0.tar.gz a6e 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/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 https://github.com/martanne/vis/releases/download/v0.7/vis-0.7.tar.gz a45ba03d1fa4785ee5693f9619f22e85 https://github.com/mesonbuild/meson/releases/download/0.61.3/meson-0.61.3.tar.gz 8998d77313d753a0c474d9bdf1738b2e @@ -80,6 +81,7 @@ https://github.com/rhboot/efivar/releases/download/37/efivar-37.tar.bz2 9f06727 https://github.com/rpm-software-management/popt/archive/refs/tags/popt-1.18-release.tar.gz popt-1.18.tar.gz 154ca2966af91352d2129b33d855a91e https://github.com/shadow-maint/shadow/releases/download/v4.11.1/shadow-4.11.1.tar.xz 5a95ec069aa91508167d02fecafaa912 https://github.com/strace/strace/releases/download/v5.18/strace-5.18.tar.xz a563875472463638c19d6639e1c14875 +https://github.com/tmux/tmux/releases/download/3.3a/tmux-3.3a.tar.gz 8eee5883b9f6550fa4efaad0c9ec38f3 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 @@ -99,16 +101,15 @@ https://sourceforge.net/projects/tcl/files/Tcl/8.6.12/tcl8.6.12-src.tar.gz 87ea https://sourceware.org/ftp/elfutils/0.186/elfutils-0.186.tar.bz2 libelf-0.186.tar.bz2 2c095e31e35d6be7b3718477b6d52702 https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz 67e051268d0c475ea773822f7500d0e5 https://tukaani.org/xz/xz-5.2.5.tar.xz aa1621ec7013a19abab52a8aff04fe5b +https://www.cairographics.org/releases/pixman-0.40.0.tar.gz 73858c0862dd9896fb5f62ae267084a4 https://www.cpan.org/src/5.0/perl-5.32.1.tar.xz 7f104064b906ad8c7329ca5e409a32d7 https://www.greenwoodsoftware.com/less/less-590.tar.gz f029087448357812fba450091a1172ab https://www.iana.org/time-zones/repository/releases/tzcode2022a.tar.gz fdc790effd7b01d29837fb27b3e81672 https://www.iana.org/time-zones/repository/releases/tzdata2022a.tar.gz 081662184f3b902f8e5d96816568432e https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.17.13.tar.xz 1f0478b27e1ec649e33b6c3dc0f6a583 -https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.17.13.tar.xz 1f0478b27e1ec649e33b6c3dc0f6a583 https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.62.tar.xz 342c7560ed2103899f6914d1de75a89f https://www.kernel.org/pub/linux/utils/kbd/kbd-2.4.0.tar.xz 3cac5be0096fcf7b32dcbd3c53831380 https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-29.tar.xz e81e63acd80697d001c8d85c1acb38a0 https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-5.17.0.tar.xz 8ade96ee93f37fba7e1beec89f1a54bf https://www.leonerd.org.uk/code/libtermkey/libtermkey-0.22.tar.gz 08bf514d59660391c3a21b3977a16c8c https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tar.xz 11d12076311563252a995201248d17e5 -https://www.xach.com/snarf/download/source/snarf-7.0.tar.gz 7470d8457bc0d347b5cd8668c9e735c4