mrrl

Minimal Reliable Reproducible Linux
git clone https://ccx.te2000.cz/git/mrrl
Log | Files | Refs | Submodules | README

commit f4fb5117efcda35c8ab9a212c1a99ab68c4a17aa
parent a5aae30348c6a1ca088bdb9cc0090d0443f3820b
Author: Jan Pobrislo <ccx@te2000.cz>
Date:   Fri,  4 Jul 2025 13:22:17 +0000

Abduco package

Diffstat:
M.gitmodules | 3+++
Mcommitlist.sha1 | 8+++++++-
Asources/abduco | 1+
Atemplates/pkg/abduco | 15+++++++++++++++
Avariants/ccx-x86_64/abduco | 116+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Avariants/root-x86_64/abduco | 116+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 258 insertions(+), 1 deletion(-)

diff --git a/.gitmodules b/.gitmodules @@ -114,3 +114,6 @@ [submodule "sources/mlog"] path = sources/mlog url = git://git.vuxu.org/mlog +[submodule "sources/abduco"] + path = sources/abduco + url = git://git.sr.ht/martanne/abduco diff --git a/commitlist.sha1 b/commitlist.sha1 @@ -1,4 +1,11 @@ 5ce6a6a1224101ce5b0dfec1544a98c94d233ae0 sources/aat +0757469fa92d76bb8471383d642088c03d835440 sources/abduco +19b08c2afb0617245acd76baca0bc7e221eaf9e6 sources/abduco +2e0a15f6b64c1f0ae70f290e344b98fcf4940704 sources/abduco +442d5cc83eb2a784acea100e7d42f8c7add6a5d1 sources/abduco +8b07e224892e4f56bcfe3d94c54dff2e093cc5c1 sources/abduco +8c32909a159aaa9484c82b71f05b7a73321eb491 sources/abduco +be303aa59618ec055fa2557ec22c11ddfdb4f0e5 sources/abduco c7b36ed27103ee3f9aa01905ba1fac2d606079cf sources/alpine-keys 013dba1c7c7a25b100e1c0081ba600550beb6635 sources/apk-tools 02ae8709ac7a2d12743db99463871394d56db930 sources/apk-tools @@ -355,7 +362,6 @@ c6aef8098d37a1773439117a5674bfc8662ef62b sources/confz 48755aaf2de3d0652d02b49a28da8360286a94fe sources/containers 5d2b98a3c54b6f142b80773e4a18dea3749bfea6 sources/containers 6f1870365d2a7e410b48f3fe633d6f1b658738ba sources/containers -7f5a7ac26d4cb5300e4c574e86c55d5fd5c177a3 sources/containers e8dfe8dcb4396ac0f12f0d0017f9836fa113e3a6 sources/containers 94422be00da71ff44c8ad1fe3455587c62ca29d3 sources/easyseccomp 02de9565862052afc290b6848b4ebd799d8f9f37 sources/execline diff --git a/sources/abduco b/sources/abduco @@ -0,0 +1 @@ +Subproject commit 8c32909a159aaa9484c82b71f05b7a73321eb491 diff --git a/templates/pkg/abduco b/templates/pkg/abduco @@ -0,0 +1,15 @@ +{% extends "autotools" %} +{%- block extra_deps %} +#@git:{{submodule.current[name]}}:{{name}} +{%- endblock %} +{% block at_script %} + +autotools_static abduco + +check_static command/abduco + +{% endblock %} +{% block genlinks_begin %} + x["./command/abduco"] +{%- endblock %} + diff --git a/variants/ccx-x86_64/abduco b/variants/ccx-x86_64/abduco @@ -0,0 +1,116 @@ +#!/usr/bin/env pthbs-build +#+musl-cross-make.98979eb41109d371f19d0637d51116db18c7aeef61fbf804a68094c22a302a78 +#+gnu-make.ba8d7c64a23885182fc1c9dc0331d52adcdbc45df6000fb81e8e1dd3ee05694b +#+busybox.ee3440974794767b833fd3299226771f170d3f8601cf225cb884f0a513db8ab3 +#+busybox-diffutils.c2ebcfcad050ad71b8e30322a463b5c009f254c7a42e95c627d32665e17134dc +#+m4.46e121f61e0af52abf876bf2688ecfe70eeb04185028d6adde0085e865fdfe75 +#@git:8c32909a159aaa9484c82b71f05b7a73321eb491:abduco + +build_env_static() { + export LD_LIBRARY_PATH="$pthbs_build_environment/library" + export CPATH="$pthbs_build_environment/include" + export LDFLAGS="-static -L$pthbs_build_environment/library $LDFLAGS" +} +autotools_config() { + prefix=/home/ccx/versions/$pthbs_package + ./configure -C \ + --prefix="$prefix" \ + --build="$(${CC:-gcc} -dumpmachine)" \ + --bindir="$prefix/command" \ + --sbindir="$prefix/command" \ + --infodir="$prefix/info" \ + --localedir="$prefix/locale" \ + --mandir="$prefix/man" \ + --libdir="$prefix/library" \ + --docdir="$prefix/doc/abduco" \ + --datadir="$prefix/data" \ + --datarootdir="$prefix/data" \ + --localstatedir='/var/pthbs' \ + "$@" + +} + +autotools() { + cd "$1" + shift + autotools_config "$@" + make -j${JOBS:-1} -l$((1+${JOBS:-1})) + make DESTDIR="$pthbs_destdir" install +} + +autotools_static() { + build_env_static + autotools "$@" --enable-static --disable-shared +} +check_static() { + local exe || true + exe=$pthbs_destdir/'/home/ccx/versions'/$pthbs_package/$1 + if ! test -f $exe; then + printf '%s\n' "Error: file '$1' doesn't exist!" + exit 1 + fi + interp_info=$(readelf --string-dump=.interp "$exe") || exit $? + if test x '!=' "x$interp_info"; then + printf '%s\n' "Error: '$1' is a dynamic binary!" + exit 1 + fi +} + + +autotools_static abduco + +check_static command/abduco + + + +cd "$pthbs_destdir/home/ccx/versions/$pthbs_package" +find -type d -o -print | awk -F/ ' +BEGIN { + x["./command/abduco"]} + +function r1(s) { + sub("^[.]/[^/]*", ".", s) + return s +} +function s1(repl, s) { + sub("^[.]/[^/]*", "./"repl, s) + return s +} +function link(src) { + x[$0]=0 + printf "%s\t%s\n", $0, src + printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" +} +$1!="."{exit 1} + + +$2 == "command" { link($0); next } +$2 == "bin" { link(s1("command", $0)); next } + +$2 == "library.so" { link($0); next } +$2 == "library" { link($0); next } +$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } +$2 == "lib" && $NF ~ /\.so(|\..*)$/ { link(s1("library.so", $0)); next } + +$2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next } + +$2 == "man" { link($0); next } +$2 == "info" { link($0); next } +$2 == "doc" { link($0); next } +$2 == "icons" { link($0); next } +$2 == "terminfo" { link($0); next } +$2 == "data" { link($0); next } +$2 == "include" { link($0); next } + +{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } + +END { + for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } + for(fname in x) { + if(x[fname]) { + printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" + exit 3 + } + } +}' >.install-links.new +mv .install-links.new .install-links diff --git a/variants/root-x86_64/abduco b/variants/root-x86_64/abduco @@ -0,0 +1,116 @@ +#!/usr/bin/env pthbs-build +#+musl-cross-make.d0431fc0def788be03da43136972361827de52c8e6f0a6f3890dc57fe32e8ecc +#+gnu-make.444e811a68f4f16724e21354b710fad3592e53a2dbf7c0c78658f3d4e7c8e465 +#+busybox.f4ef3d511c029095beda8d21dd48f7730bec63fb09792ca951402d6620338089 +#+busybox-diffutils.4a0933977737282afcd82b39d435b50946a700fe13472d24e4580a41fa852123 +#+m4.3cffaef6909a65493ddc9aba4c53f77dc594ff5ab8b58c57acaa34c654b09ff3 +#@git:8c32909a159aaa9484c82b71f05b7a73321eb491:abduco + +build_env_static() { + export LD_LIBRARY_PATH="$pthbs_build_environment/library" + export CPATH="$pthbs_build_environment/include" + export LDFLAGS="-static -L$pthbs_build_environment/library $LDFLAGS" +} +autotools_config() { + prefix=/versions/$pthbs_package + ./configure -C \ + --prefix="$prefix" \ + --build="$(${CC:-gcc} -dumpmachine)" \ + --bindir="$prefix/command" \ + --sbindir="$prefix/command" \ + --infodir="$prefix/info" \ + --localedir="$prefix/locale" \ + --mandir="$prefix/man" \ + --libdir="$prefix/library" \ + --docdir="$prefix/doc/abduco" \ + --datadir="$prefix/data" \ + --datarootdir="$prefix/data" \ + --localstatedir='/var/pthbs' \ + "$@" + +} + +autotools() { + cd "$1" + shift + autotools_config "$@" + make -j${JOBS:-1} -l$((1+${JOBS:-1})) + make DESTDIR="$pthbs_destdir" install +} + +autotools_static() { + build_env_static + autotools "$@" --enable-static --disable-shared +} +check_static() { + local exe || true + exe=$pthbs_destdir/'/versions'/$pthbs_package/$1 + if ! test -f $exe; then + printf '%s\n' "Error: file '$1' doesn't exist!" + exit 1 + fi + interp_info=$(readelf --string-dump=.interp "$exe") || exit $? + if test x '!=' "x$interp_info"; then + printf '%s\n' "Error: '$1' is a dynamic binary!" + exit 1 + fi +} + + +autotools_static abduco + +check_static command/abduco + + + +cd "$pthbs_destdir/versions/$pthbs_package" +find -type d -o -print | awk -F/ ' +BEGIN { + x["./command/abduco"]} + +function r1(s) { + sub("^[.]/[^/]*", ".", s) + return s +} +function s1(repl, s) { + sub("^[.]/[^/]*", "./"repl, s) + return s +} +function link(src) { + x[$0]=0 + printf "%s\t%s\n", $0, src + printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" +} +$1!="."{exit 1} + + +$2 == "command" { link($0); next } +$2 == "bin" { link(s1("command", $0)); next } + +$2 == "library.so" { link($0); next } +$2 == "library" { link($0); next } +$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } +$2 == "lib" && $NF ~ /\.so(|\..*)$/ { link(s1("library.so", $0)); next } + +$2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next } + +$2 == "man" { link($0); next } +$2 == "info" { link($0); next } +$2 == "doc" { link($0); next } +$2 == "icons" { link($0); next } +$2 == "terminfo" { link($0); next } +$2 == "data" { link($0); next } +$2 == "include" { link($0); next } + +{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } + +END { + for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } + for(fname in x) { + if(x[fname]) { + printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" + exit 3 + } + } +}' >.install-links.new +mv .install-links.new .install-links