summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2017-12-24 20:09:39 -0500
committerbill-auger <mr.j.spam.me@gmail.com>2018-01-01 00:53:50 -0500
commit795b8df7108a65e836acffb093747b333927dbb8 (patch)
tree9d9ad2bdaa2558eec845c5888b29cad2b42d9441
parentf119f660183875f5e525d263db91347e7a55e45f (diff)
stash
-rwxr-xr-xconfigs/profile/build.sh9
-rw-r--r--configs/profile/packages/cache-all.all6
-rw-r--r--[l---------]configs/profile/root-image/etc/pacman.conf26
-rwxr-xr-xconfigs/profile/root-image/root/customize_root_image.sh2
-rwxr-xr-xparabolaiso/mkparabolaiso16
5 files changed, 47 insertions, 12 deletions
diff --git a/configs/profile/build.sh b/configs/profile/build.sh
index ecd1351..8922ed1 100755
--- a/configs/profile/build.sh
+++ b/configs/profile/build.sh
@@ -136,8 +136,8 @@ make_packages() {
# create live environment local repo or stash package cache
if [[ "$enable_offline_install" == 'true' ]]; then
if [[ -n ${_cache_packages} ]]; then
- # download cache packages
- setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} -C ${pacman_conf} -D ${iso_dirname} -p "${_cache_packages}" -O install
+ # download any cache packages and prune obsolete packages
+ cache_only='true' setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} -C ${pacman_conf} -D ${iso_dirname} -p "${_cache_packages}" -O install
fi
# create 'isorepo' for offline install
pushd ${work_dir}/${arch}/root-image/isorepo > /dev/null
@@ -145,14 +145,15 @@ make_packages() {
popd > /dev/null
else
# stash package cache for next build
- mv ${work_dir}/${arch}/root-image/isorepo ${work_dir}/../isorepo-${arch}
+ mv ${work_dir}/${arch}/root-image/isorepo ${work_dir}/../isorepo-${arch} || true
fi
-
+echo "diff IN" ; ls -al ${work_dir}/${arch}/root-image/etc/pacman.d/gnupg/ ; diff -r /etc/pacman.d/gnupg/ ${work_dir}/${arch}/root-image/etc/pacman.d/gnupg/
# refresh pacman keyring in chroot
arch-chroot ${work_dir}/${arch}/root-image pacman-key --init && \
pacman-key --populate archlinux archlinux32 \
archlinuxarm parabola && \
pacman-key --refresh
+echo "diff OUT" ; ls -al ${work_dir}/${arch}/root-image/etc/pacman.d/gnupg/ ; diff -r /etc/pacman.d/gnupg/ ${work_dir}/${arch}/root-image/etc/pacman.d/gnupg/
}
# Copy mkinitcpio parabolaiso hooks and build initramfs (root-image)
diff --git a/configs/profile/packages/cache-all.all b/configs/profile/packages/cache-all.all
new file mode 100644
index 0000000..e692cee
--- /dev/null
+++ b/configs/profile/packages/cache-all.all
@@ -0,0 +1,6 @@
+# this file specifies the packages that are to be downloaded
+# and cached in the /isorepo directory for offline install in all live environments
+# regardless of the architecture, init system, or graphical environment
+
+
+mkinitcpio-openswap
diff --git a/configs/profile/root-image/etc/pacman.conf b/configs/profile/root-image/etc/pacman.conf
index cec8b80..d77556f 120000..100644
--- a/configs/profile/root-image/etc/pacman.conf
+++ b/configs/profile/root-image/etc/pacman.conf
@@ -1 +1,25 @@
-root-image/etc/pacman-online.conf \ No newline at end of file
+
+[options]
+HoldPkg = pacman glibc
+Architecture = auto
+CheckSpace
+SigLevel = Required DatabaseOptional
+LocalFileSigLevel = Optional
+
+[libre]
+Include = /etc/pacman.d/mirrorlist
+
+[core]
+Include = /etc/pacman.d/mirrorlist
+
+[extra]
+Include = /etc/pacman.d/mirrorlist
+
+[community]
+Include = /etc/pacman.d/mirrorlist
+
+[pcr]
+Include = /etc/pacman.d/mirrorlist
+
+[pcr-testing]
+Include = /etc/pacman.d/mirrorlist
diff --git a/configs/profile/root-image/root/customize_root_image.sh b/configs/profile/root-image/root/customize_root_image.sh
index ba890b6..1c979e8 100755
--- a/configs/profile/root-image/root/customize_root_image.sh
+++ b/configs/profile/root-image/root/customize_root_image.sh
@@ -23,7 +23,7 @@ then echo "Server = https://repo.parabola.nu/\$repo/os/\$arch" > /etc/pacman.d/m
fi
# KLUDGE end
# KLUDGE begin temp until next calamares rebuild # FIXME:
-cp /etc/pacman.conf /etc/pacman-offline.conf ; cp /etc/pacman.conf /etc/pacman-online.conf
+# cp /etc/pacman.conf /etc/pacman-offline.conf ; cp /etc/pacman.conf /etc/pacman-online.conf
sed -i 's|requiredStorage:.*|requiredStorage: 8.9|' /usr/share/calamares/modules/welcome.conf
# KLUDGE end
diff --git a/parabolaiso/mkparabolaiso b/parabolaiso/mkparabolaiso
index a7eb760..f13b0ba 100755
--- a/parabolaiso/mkparabolaiso
+++ b/parabolaiso/mkparabolaiso
@@ -251,7 +251,9 @@ _pacman ()
_msg_info "Packages installed successfully!"
}
-# Cache uninstalled packages in offline /isorepo
+# Cache uninstalled packages in offline /isorepo and prune un-needed packages packages.
+# Optimally, this function should be called only once after all packages are installed
+# and even if there are no 'cache-only' packages.
_pacman_cache ()
{
_msg_info "Caching packages to '${work_dir}/root-image/'..."
@@ -280,10 +282,12 @@ _pacman_cache ()
popd > /dev/null
# download any missing packages
- if [[ "${quiet}" = "y" ]]; then
- pacman -Sw --root "${work_dir}/root-image" --config "${pacman_conf}" --noconfirm $* &> /dev/null
- else
- pacman -Sw --root "${work_dir}/root-image" --config "${pacman_conf}" --noconfirm $*
+ if [[ "${_package_files}" ]]; then
+ if [[ "${quiet}" = "y" ]]; then
+ pacman -Sw --root "${work_dir}/root-image" --config "${pacman_conf}" --noconfirm $* &> /dev/null
+ else
+ pacman -Sw --root "${work_dir}/root-image" --config "${pacman_conf}" --noconfirm $*
+ fi
fi
_chroot_umount
@@ -569,7 +573,7 @@ command_install () {
if [[ -f "${work_dir}/install.${_pkg_list_hash}" ]]; then
_msg_info "These packages are already installed, skipping."
else
- if [[ "${enable_offline_install}" == 'true' ]]; then
+ if [[ "${cache_only:-}" == 'true' ]]; then
_pacman_cache "${pkg_list}"
else
_pacman "${pkg_list}"