pthbs_genpkgpy

Template engine for producing packages for pthbs written using Python and Jinja
git clone https://ccx.te2000.cz/git/pthbs_genpkgpy
Log | Files | Refs | Submodules | README

commit c20c64b6d10b7beef23913842736c7b021cadf35
parent e66e3feb59021312a33dbc9231e907449d7d2020
Author: Jan Pobříslo <ccx@te2000.cz>
Date:   Fri, 23 Feb 2024 18:41:14 +0100

Test executable first before putting it into envdir

Diffstat:
Mpackages/default.environment | 2+-
Mpackages/pthbs-enter | 14++++++++------
Mpackages/userspace.environment | 2+-
Mtemplates/pkg/pthbs-enter | 14++++++++------
4 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/packages/default.environment b/packages/default.environment @@ -18,7 +18,7 @@ #+s6-networking.d30d0310f70a9af097cc2d98e7a97e329a626b005cb0b49247ce6cdaec251956 #+zsh.841d7010e0fe14991eb6173c03fd35eecda23c9693da65d121af20615e0dc5a0 #+pthbs-banginstall.849e1bc924bc7d9eff0c2ce1c3a44bf38afbf6b2a5f1dfbea7c077f886646e7b -#+pthbs-enter.c407c11fa255630d6dca118f0416ef390862a39f34fbffcca0fbf0ae19c64686 +#+pthbs-enter.a31f8035a3711788e9d3132a7ca4829bfc0b3b34717d0886a50c7baeb3abe203 #+aat.9da7c8dd0936f2dcfd534a0473da1b730e29946cdd4db133659a1a35f0b53144 #+confz.4d0086594f647e7ab869714ca88253442d1b40f5f66312579521708a9e7cf24e #+containers.b5344393dbacc75ea943cf9119959cad0fc7c7272f7760b99ca67f3d48f7cf09 diff --git a/packages/pthbs-enter b/packages/pthbs-enter @@ -16,19 +16,21 @@ test -x "$envpath/s6-envdir" || exit $? envdir=$(dirname "$envpath")/env test -f "$envdir/PATH" -installdir="$pthbs_destdir//home/ccx/versions/$pthbs_package" -mkdir -p "$installdir/command" -cat >"$installdir/command/pthbs-enter" <<EOF +cat >pthbs-enter <<EOF #!$envpath/execlineb -S0 "$envpath/s6-envdir" "$envdir" "$envpath/exec" "$0" EOF -chmod +x "$installdir/command/pthbs-enter" -"$installdir/command/pthbs-enter" true +chmod +x pthbs-enter +./pthbs-enter true + +installdir="$pthbs_destdir//home/ccx/versions/$pthbs_package" +mkdir -p "$installdir/command" +mv pthbs-enter "$installdir/command/" cd "$pthbs_destdir/home/ccx/versions/$pthbs_package" find -type d -o -print | awk -F/ ' BEGIN { - x["./command/pthbs-banginstall"]=1 + x["./command/pthbs-enter"]=1 } function r1(s) { diff --git a/packages/userspace.environment b/packages/userspace.environment @@ -18,7 +18,7 @@ #+s6-networking.d30d0310f70a9af097cc2d98e7a97e329a626b005cb0b49247ce6cdaec251956 #+zsh.841d7010e0fe14991eb6173c03fd35eecda23c9693da65d121af20615e0dc5a0 #+pthbs-banginstall.849e1bc924bc7d9eff0c2ce1c3a44bf38afbf6b2a5f1dfbea7c077f886646e7b -#+pthbs-enter.c407c11fa255630d6dca118f0416ef390862a39f34fbffcca0fbf0ae19c64686 +#+pthbs-enter.a31f8035a3711788e9d3132a7ca4829bfc0b3b34717d0886a50c7baeb3abe203 #+aat.9da7c8dd0936f2dcfd534a0473da1b730e29946cdd4db133659a1a35f0b53144 #+confz.4d0086594f647e7ab869714ca88253442d1b40f5f66312579521708a9e7cf24e #+containers.b5344393dbacc75ea943cf9119959cad0fc7c7272f7760b99ca67f3d48f7cf09 diff --git a/templates/pkg/pthbs-enter b/templates/pkg/pthbs-enter @@ -17,15 +17,17 @@ test -x "$envpath/s6-envdir" || exit $? envdir=$(dirname "$envpath")/env test -f "$envdir/PATH" -installdir="$pthbs_destdir/{{versions}}/$pthbs_package" -mkdir -p "$installdir/command" -cat >"$installdir/command/pthbs-enter" <<EOF +cat >pthbs-enter <<EOF #!$envpath/execlineb -S0 "$envpath/s6-envdir" "$envdir" "$envpath/exec" "$0" EOF -chmod +x "$installdir/command/pthbs-enter" -"$installdir/command/pthbs-enter" true +chmod +x pthbs-enter +./pthbs-enter true + +installdir="$pthbs_destdir/{{versions}}/$pthbs_package" +mkdir -p "$installdir/command" +mv pthbs-enter "$installdir/command/" {% endblock %} {% block genlinks_begin %} - x["./command/pthbs-banginstall"]=1 + x["./command/pthbs-enter"]=1 {% endblock %}