Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornl6720 <nl6720@gmail.com>2024-05-02 10:51:08 +0300
committernl6720 <nl6720@gmail.com>2024-05-09 17:30:03 +0300
commite567a2ab268e340be608ac442eb13c54c566fbff (patch)
tree7879e2289f0d5cc2139dbb327768b2ffcaabc74a
parent969b91f700fab2f8b9c80fbf31cce0f8a1b248e5 (diff)
mkarchiso: do not place the pkglist.x86_64.txt file inside the bootstrap tarball's root.x86_64 directoryupstreamMaster
Keep it inside the archive, but separate from the `root.x86_64` directory to avoid polluting it.
-rwxr-xr-x.gitlab/ci/build_archiso.sh2
-rw-r--r--CHANGELOG.rst3
-rwxr-xr-xarchiso/mkarchiso11
3 files changed, 9 insertions, 7 deletions
diff --git a/.gitlab/ci/build_archiso.sh b/.gitlab/ci/build_archiso.sh
index eec8d75..24112b6 100755
--- a/.gitlab/ci/build_archiso.sh
+++ b/.gitlab/ci/build_archiso.sh
@@ -152,7 +152,7 @@ create_metrics() {
"$(du -m -- "${output}/"*.tar*(.gz|.xz|.zst) | cut -f1)"
printf 'bootstrap_package_count{image="%s"} %s\n' \
"${profile}" \
- "$(sort -u -- "${tmpdir}/"*/bootstrap/root.*/pkglist.*.txt | wc -l)"
+ "$(sort -u -- "${tmpdir}/"*/bootstrap/pkglist.*.txt | wc -l)"
;;
esac
} >"${_metrics}"
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index a54b169..8bb001f 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -11,6 +11,9 @@ Added
Changed
-------
+- Moved the ``pkglist.x86_64.txt`` file outside the bootstrap tarball's ``root.x86_64`` directly to avoid polluting the
+ root file system.
+
Deprecated
----------
diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index 98bc248..cd00c9d 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -33,6 +33,7 @@ arch=""
pacman_conf=""
packages=""
bootstrap_packages=""
+bootstrap_parent=""
pacstrap_dir=""
search_filename=""
declare -i rm_work_dir=0
@@ -1702,16 +1703,13 @@ _build_bootstrap_image() {
*) _msg_error 'Unsupported compression!' 1 ;;
esac
- local _bootstrap_parent
- _bootstrap_parent="$(dirname -- "${pacstrap_dir}")"
-
[[ -d "${out_dir}" ]] || install -d -- "${out_dir}"
- cd -- "${_bootstrap_parent}"
+ cd -- "${bootstrap_parent}"
_msg_info "Creating bootstrap image..."
rm -f -- "${out_dir:?}/${image_name:?}${tarball_ext}"
- bsdtar -cf - "root.${arch}" | "${bootstrap_tarball_compression[@]}" >"${out_dir}/${image_name}${tarball_ext}"
+ bsdtar -cf - "root.${arch}" "pkglist.${arch}.txt" | "${bootstrap_tarball_compression[@]}" >"${out_dir}/${image_name}${tarball_ext}"
_msg_info "Done!"
du -h -- "${out_dir}/${image_name}${tarball_ext}"
cd -- "${OLDPWD}"
@@ -1961,7 +1959,7 @@ _make_pkglist() {
_msg_info "Creating a list of installed packages on live-enviroment..."
case "${buildmode}" in
"bootstrap")
- pacman -Q --sysroot "${pacstrap_dir}" >"${pacstrap_dir}/pkglist.${arch}.txt"
+ pacman -Q --sysroot "${pacstrap_dir}" >"${bootstrap_parent}/pkglist.${arch}.txt"
;;
"iso"|"netboot")
install -d -m 0755 -- "${isofs_dir}/${install_dir}"
@@ -2024,6 +2022,7 @@ _build_buildmode_bootstrap() {
# Set up essential directory paths
pacstrap_dir="${work_dir}/${arch}/bootstrap/root.${arch}"
+ bootstrap_parent="$(dirname -- "${pacstrap_dir}")"
[[ -d "${work_dir}" ]] || install -d -- "${work_dir}"
install -d -m 0755 -o 0 -g 0 -- "${pacstrap_dir}"