Packagemanager-LFS-PackageUser-System git · main
Package-user based package manager for LFS/BLFS
Shell 63.7% Markdown 35.8%git clone https://git.christianimmanuel.de/linux-from-scratch/Packagemanager-LFS-PackageUser-System.gitwget https://git.christianimmanuel.de/linux-from-scratch/Packagemanager-LFS-PackageUser-System/archive/Packagemanager-LFS-PackageUser-System.tar.gzDont pull git sobmodules if not required?
HANDOFF.md | 32 ++++++++++++++++++++++++++------ blfs | 2 +- lfs | 2 +- lfs-helper | 2 +- lfs-phases | 12 ++++++++---- packagemanager | 11 ++++++++++- stacks/sway.stack | 10 ++++++---- 7 files changed, 53 insertions(+), 18 deletions(-) diff --git a/HANDOFF.md b/HANDOFF.md index 66dd4aa..0b84f84 100644 --- a/HANDOFF.md +++ b/HANDOFF.md @@ -11,12 +11,12 @@ book, because BLFS published no SysV edition for 13.0. CORRECTED reads it (`from-book svn`), which for this machine is the better match: its pages carry SysV commands, not systemctl. - all six tools at 1.14.370 (lfs-backup has its own: 1.3.0) - lfs d3a1e85 - lfs-helper 281f7c9 - packagemanager f142812 - blfs 03457ff - lfs-phases f299492 + all six tools at 1.14.371 (lfs-backup has its own: 1.3.0) + lfs 63bf9b6 + lfs-helper d59f095 + packagemanager c96b7ee + blfs 8995b35 + lfs-phases b640eb0 lfs-kernel f74f161 (no version line of its own) lfs-backup c73acaa (1.3.0; replaces lfs-config) lfs-sysvbook 62ebe64 (1.0.0; untouched since it was written) @@ -3781,6 +3781,26 @@ nested-repo-path to flat-request, absent), the ownership failure, and blocks - Not run: the regression suite (sandbox slot). `bash -n` / `py_compile` and `--version` only. +## 1.14.371 -- `submodules=no` for git entries + +The first sdl3-mixer clone pulled eleven submodules (flac, fluidsynth, +libgme, libxmp, mpg123, ogg, opus, opusfile, tremor, vorbis, wavpack). +They are SDL_mixer's copies for platforms without those libraries +(SDLMIXER_VENDORED is ON only on Android/MSVC); here they are cloned and +never built. + +- Stack option `submodules=no` -> the generated script carries + git_submodules="0" (on its own line after git_ref=); lfs-phases then + clones without --recurse-submodules and skips both `submodule update + --init --recursive` calls. Default unchanged (wl-mirror's protocols ARE + its submodules). +- sway.stack: submodules=no on sdl3-image, sdl3-ttf, sdl3-mixer (all three + ship external/ copies; vendoring is off on Linux). +- Tested: generated scripts (wl-mirror without the line, sdl3-mixer with + it; both pass bash -n); a repo with one submodule cloned with the + lfs-phases lines -- default clones it, git_submodules=0 does not. +- An existing clone keeps what it already downloaded. + ## 1.14.370 -- SDL3_mixer - sway.stack: `git sdl3-mixer` (libsdl-org/SDL_mixer, ref=release-3.2.4 -- diff --git a/blfs b/blfs index 92372cd..58ef8ff 100755 --- a/blfs +++ b/blfs @@ -130,7 +130,7 @@ CACHE_VERSION = 56 # v56: a skipped build variant does not keep its install st # tool + generated-script format versions. Bump SCRIPT_VERSION when the shape # of generated install scripts changes (phases, dispatcher, ...), and # CACHE_VERSION when the parsed/cached data structure changes. -BLFS_VERSION = "1.14.370" +BLFS_VERSION = "1.14.371" def _build_id(): diff --git a/lfs b/lfs index 4c2ab93..998c3c8 100755 --- a/lfs +++ b/lfs @@ -60,7 +60,7 @@ except ImportError: " packagemanager pip install beautifulsoup4\n") sys.exit(2) -LFS_VERSION = "1.14.370" +LFS_VERSION = "1.14.371" def _build_id(): diff --git a/lfs-helper b/lfs-helper index 45265f7..7565ab7 100755 --- a/lfs-helper +++ b/lfs-helper @@ -49,7 +49,7 @@ set -u # Bump on every change that alters behaviour. `lfs-helper --version` makes it # possible to tell at a glance whether the copy inside the chroot is the one # that was just fixed -- guessing at that has wasted a lot of time. -LFS_HELPER_VERSION="1.14.370" +LFS_HELPER_VERSION="1.14.371" # A fingerprint of this file's own contents. A hand-maintained version number # goes stale the moment someone forgets to bump it -- and the reason for diff --git a/lfs-phases b/lfs-phases index cfe249f..6e4a36d 100755 --- a/lfs-phases +++ b/lfs-phases @@ -34,7 +34,7 @@ # scripts are also SOURCED by lfs-helper to read their metadata, and this file # comes along -- it must not shadow anything in the sourcing shell. -PKGUSR_LIB_VERSION="1.14.370" +PKGUSR_LIB_VERSION="1.14.371" _pp_build_id() { local f="${BASH_SOURCE[0]}" @@ -316,7 +316,11 @@ _pp_unpack() { git "${_pp_gc[@]}" -C "$pkg_dir" fetch --all --tags --prune else rm -rf "$pkg_dir" - if ! git "${_pp_gc[@]}" clone "${_pp_cl[@]}" --recurse-submodules "$link" "$pkg_dir"; then + # git_submodules="0" (stack: submodules=no): the project's + # vendored copies are not needed here, so they are not cloned + _pp_rs=(--recurse-submodules) + [ "${git_submodules:-1}" = 0 ] && _pp_rs=() + if ! git "${_pp_gc[@]}" clone "${_pp_cl[@]}" "${_pp_rs[@]}" "$link" "$pkg_dir"; then _pp_fail "could not clone $link" echo " git was refused, and was not allowed to ask for a" >&2 echo " password (this is a build). On a public URL that" >&2 @@ -407,7 +411,7 @@ _pp_unpack() { else _pp_say "# $_pp_ref is already at $_pp_after" fi - git -C "$pkg_dir" submodule update --init --recursive + [ "${git_submodules:-1}" = 0 ] || git -C "$pkg_dir" submodule update --init --recursive echo "$pkg_dir" > "$_pp_dir_marker" _pp_say "checked out into $BUILD_ROOT/$pkg_dir" return 0 @@ -437,7 +441,7 @@ _pp_unpack() { echo " or set git_ref= in this script, then run it again." >&2 return 1 fi - git -C "$pkg_dir" submodule update --init --recursive + [ "${git_submodules:-1}" = 0 ] || git -C "$pkg_dir" submodule update --init --recursive echo "$pkg_dir" > "$_pp_dir_marker" _pp_say "checked out into $BUILD_ROOT/$pkg_dir" return 0 diff --git a/packagemanager b/packagemanager index b1505fc..4c7bbcc 100755 --- a/packagemanager +++ b/packagemanager @@ -188,7 +188,7 @@ TMP_DIR = "/tmp/packagemanager" CONFIG_PATH = os.environ.get("PKGUSR_CONFIG", "/etc/pkgusr/packagemanager.conf") # Version stamps. Bump PLAN_VERSION when the cached dry-run plan structure # changes (so stale plans are ignored); TOOL_VERSION is the program version. -TOOL_VERSION = "1.14.370" +TOOL_VERSION = "1.14.371" def _build_id(): @@ -14130,6 +14130,15 @@ def _stack_git_script(entry, script_dir): collector=collector_prefix().rstrip("_")) # pin the ref and the doneness signal into the generated header text = text.replace('git_ref=""', 'git_ref="%s"' % opts.get("ref", ""), 1) + # SUBMODULES ARE THE PROJECT'S SPARE COPIES, NOT ALWAYS ITS NEEDS. + # SDL_mixer registers eleven (flac, opus, vorbis, mpg123, ...) for builds + # that vendor them -- Android, MSVC -- and on this system every one of + # them is cloned and then ignored. `submodules=no` clones without them; + # wl-mirror, whose protocols ARE its submodules, keeps the default. + if str(opts.get("submodules", "")).lower() in ("no", "0", "off", "false"): + text = re.sub(r'(?m)^(git_ref="[^"\n]*".*)$', + lambda m: m.group(1) + '\ngit_submodules="0" # stack: submodules=no', + text, count=1) text = text.replace('installed_program=""', 'installed_program="%s"' % prog, 1) # ...and `have=` is the entry's OWN statement of what proves it installed # -- the stack already uses it to skip an entry that is done. It is the diff --git a/stacks/sway.stack b/stacks/sway.stack index 744c055..bb671d1 100644 --- a/stacks/sway.stack +++ b/stacks/sway.stack @@ -1,5 +1,5 @@ # sway.stack -- the Sway desktop: the compositor, its tools, your programs. -# stack-version: 1.14.370 +# stack-version: 1.14.371 # # WHAT THIS MACHINE NEVER BUILDS is in avoid.stack, included by every stack # here: the exclusions are a property of the machine, not of one stack. @@ -196,14 +196,16 @@ tar dejavu-fonts url=https://downloads.sourceforge.net/dejavu/dejavu-fonts-tt # YOUR OWN PROGRAMS: the Sw* tools and the browser. SDL3's image and font # libraries are here because only these use them. # --------------------------------------------------------------------- -git sdl3-image url=https://github.com/libsdl-org/SDL_image ref=release-3.2.4 have=/usr/lib/libSDL3_image.so build="cmake -B build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release; cmake --build build" install="cmake --install build" -git sdl3-ttf url=https://github.com/libsdl-org/SDL_ttf ref=release-3.2.2 have=/usr/lib/libSDL3_ttf.so build="cmake -B build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release; cmake --build build" install="cmake --install build" +git sdl3-image url=https://github.com/libsdl-org/SDL_image ref=release-3.2.4 submodules=no have=/usr/lib/libSDL3_image.so build="cmake -B build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release; cmake --build build" install="cmake --install build" +git sdl3-ttf url=https://github.com/libsdl-org/SDL_ttf ref=release-3.2.2 submodules=no have=/usr/lib/libSDL3_ttf.so build="cmake -B build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release; cmake --build build" install="cmake --install build" # SDL3_mixer: sound and music for SDL3 programs. WAV/AIFF/VOC/AU, FLAC # (dr_flac), MP3 (dr_mp3), Ogg Vorbis (stb_vorbis) and MIDI (timidity) are # built in; libFLAC, mpg123, vorbisfile, opusfile, libxmp, game-music-emu, # fluidsynth and wavpack are used if they are installed and quietly left out # if not (only SDLMIXER_STRICT=ON makes a missing one an error). -git sdl3-mixer url=https://github.com/libsdl-org/SDL_mixer ref=release-3.2.4 have=/usr/lib/libSDL3_mixer.so build="cmake -B build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DSDLMIXER_TESTS=OFF -DSDLMIXER_EXAMPLES=OFF; cmake --build build" install="cmake --install build" +# submodules=no on all three: their external/ folders are copies of those +# libraries for platforms without them (Android, MSVC), never built here. +git sdl3-mixer url=https://github.com/libsdl-org/SDL_mixer ref=release-3.2.4 submodules=no have=/usr/lib/libSDL3_mixer.so build="cmake -B build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DSDLMIXER_TESTS=OFF -DSDLMIXER_EXAMPLES=OFF; cmake --build build" install="cmake --install build" # Browser builds two programs, browser-mini and browser-big. It was the # entry `minibrowser` until 1.14.357; an existing p_minibrowser is renamed # with: packagemanager rename minibrowser browser --run