galeb

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

чување 56df38a997e7a2bea78b6746e9652e8c3067721e
родитељ b41ce54cc93ee16a7c631554289525ac088164f1
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Fri, 28 Apr 2023 15:24:59 +0200

* Add util-linux manpages (read mkfile for instructions on building)
* Hardcode -T value in 05-mkbootimage.sh to 2 by default (override by editing
  that script)

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

Diffstat:
M.gitignore | 3+++
M03-packages.sh | 16++++++++++++----
M05-mkbootimage.sh | 5++++-
MTODO | 12------------
MTODO.done | 15+++++++++++++++
Afil/util-linux-galeb/blacklist | 32++++++++++++++++++++++++++++++++
Afil/util-linux-galeb/mkfile | 37+++++++++++++++++++++++++++++++++++++
измењених датотека: 7, додавања: 103(+), брисања: 17(-)

diff --git a/.gitignore b/.gitignore @@ -11,5 +11,8 @@ *.rej *.swp *.session +fil/util-linux-galeb/man +fil/util-linux-galeb/man-common +fil/util-linux-galeb/*.adoc src/remountroot src/umountall diff --git a/03-packages.sh b/03-packages.sh @@ -5253,12 +5253,15 @@ else ( cd_or_fail ${G_SRC}/${pkg} + if [ -d "${G_FIL}/util-linux-galeb/man" ]; then + cp_or_fail -R ${G_FIL}/util-linux-galeb/man . + fi apply_patch packages -Np0 -i \ ${G_PAT}/util-linux-void/fix-musl.patch - apply_patch packages -Np1 -i \ - ${G_PAT}/util-linux-mlfs/use-tiparm-when-compiling-\ -with-netbsd_curses.patch +# apply_patch packages -Np1 -i \ +# ${G_PAT}/util-linux-mlfs/use-tiparm-when-compiling-\ +# with-netbsd_curses.patch cp ${G_FIL}/util-linux-adelie/ttydefaults.h \ include/ttydefaults.h @@ -5325,8 +5328,13 @@ mkpk_install() for prog in blkdiscard ctrlaltdel dmesg flock fsfreeze look mkswap \\ renice rev setsid swaplabel swapoff umount do - find /build -name \${prog} -exec rm {} \\; + find "\${DESTDIR}" -name \${prog} -exec rm {} \\; done + + # Copy manpages + if [ -d man ]; then + cp -R man "\${DESTDIR}/share/" + fi } ! mkpk ${pkg} diff --git a/05-mkbootimage.sh b/05-mkbootimage.sh @@ -8,7 +8,10 @@ fi . ./lib/env.sh . ./lib/fun.sh -T=$(echo $JN | sed 's,[^0-9]*\([0-9]\+\)[^0-9]*,\1,g') +# Max threads for xz (compression) +# To use max recommended value, uncomment next line and comment the one after: +#T=$(echo $JN | sed 's,[^0-9]*\([0-9]\+\)[^0-9]*,\1,g') +T=2 if [ "$(id -u)" -ne 0 ]; then msg err "You must run this script as root" diff --git a/TODO b/TODO @@ -9,22 +9,10 @@ High priority [ ] Continue work on X.Org [x] Add and test wpa_supplicant -<~> Wireless support - needs testing! - [ ] git://r-36.net/conn - [ ] git://r-36.net/rfkilld - [/] git://r-36.net/nldev - requires busybox mdev? - replaced by smdev - (still needs testing) - [/] git://r-36.net/nlmon - requires busybox mdev? - ditto - [x] Add wpa_supplicant (DBus stripped - untested! Commented out by - default) - Low priority ------------ -[ ] Add mount(8) manpage; since we switched to util-linux mount, and util-linux - manpages are not installed, currently there is no mount manpage - [ ] Add ghostscript (for groff) < > Add busybox for initramfs? diff --git a/TODO.done b/TODO.done @@ -4,6 +4,21 @@ Done todos 2.2 --- +[x] Add mount(8) manpage; since we switched to util-linux mount, and util-linux + manpages are not installed, currently there is no mount manpage + +<x> Wireless support - needs testing! + [/] git://r-36.net/conn - requires dhcpcd, and we already have + wpa_supplicant service for svc; we use sdhcp for DHCP (for now... + consider switching to dhcpcd because it allows MAC spoofing? TODO) + [/] git://r-36.net/rfkilld - maybe, as mkfiles package -> moved there + [/] git://r-36.net/nldev - requires busybox mdev? - replaced by smdev + (still needs testing) + [/] git://r-36.net/nlmon - requires busybox mdev? - ditto + [x] Add wpa_supplicant (DBus stripped - untested! Commented out by + default) - Uncommented, tested, runs fine without DBus + - Done! + [x] Adjust output of svc to account for service names longer than 8 chars (have one \t less in output in such a case) diff --git a/fil/util-linux-galeb/blacklist b/fil/util-linux-galeb/blacklist @@ -0,0 +1,32 @@ +blkdiscard +cal +chfn +chsh +ctrlaltdel +dmesg +eject +fallocate +flock +fsfreeze +kill +last +logger +login +look +mesg +mkswap +mountpoint +nologin +pivot_root +renice +rev +runuser +setpriv +setsid +su +swaplabel +swapoff +swapon +switch_root +umount +unshare diff --git a/fil/util-linux-galeb/mkfile b/fil/util-linux-galeb/mkfile @@ -0,0 +1,37 @@ +# Requirements for generation of manpages on the host: +# - asciidoctor (and Ruby, etc...) +# - Plan9 mk in path +# - util-linux sources fetched with 01-cross.sh +# +# Generating manpages and making them available for installation scripts: +# 0. Fetch sources if not already with 01-cross.sh +# 1. Set GR (export GR=...) to the location from lib/env.sh, then: +# (cd $GR/src; gunzip -dc pkg/util-linux-*.tar.gz | tar -xf -) +# 2. find $GR/src/util-linux-* -name '*.adoc' -exec \ +# cp {} fil/util-linux-galeb/ \; +# 3. cp -R $GR/src/util-linux-*/man-common fil/util-linux-galeb/ +# 4. cd fil/util-linux-galeb; mk +# 5. Rerun 01-cross.sh, then 02-chroot.sh, etc as normal +# +adocs=`{find . -name '*.adoc' | grep -vf blacklist | sed 's,^./,,g'} +outputdirs=man/man1 man/man3 man/man8 +manpages1=${adocs:%.1.adoc=man/man1/%.1} +manpages3=${adocs:%.3.adoc=man/man3/%.3} +manpages8=${adocs:%.8.adoc=man/man8/%.8} + +man/man1/%.1: %.1.adoc + asciidoctor -b manpage -D man/man1 $stem.1.adoc + +man/man3/%.3: %.3.adoc + asciidoctor -b manpage -D man/man3 $stem.3.adoc + +man/man8/%.8: %.8.adoc + asciidoctor -b manpage -D man/man8 $stem.8.adoc + +generate:V: dirs $manpages1 $manpages3 $manpages8 + +dirs:QV: + mkdir -p $outputdirs + +clean:V: + rm -fr man