diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2017-11-16 09:29:16 -0500 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2018-01-01 00:53:10 -0500 |
commit | 29d6684b62948101a46ba0baa10fd322242101f5 (patch) | |
tree | bac76fffbb5bfe33671a3bc9d94ae514376549f7 /configs/profile | |
parent | ba318b2df7904523a9792fea37263103c5905353 (diff) |
add cached packages list
Diffstat (limited to 'configs/profile')
-rwxr-xr-x | configs/profile/build.sh | 34 | ||||
-rw-r--r-- | configs/profile/packages/packages-cache-lxde.both | 9 |
2 files changed, 30 insertions, 13 deletions
diff --git a/configs/profile/build.sh b/configs/profile/build.sh index 830a760..8748efa 100755 --- a/configs/profile/build.sh +++ b/configs/profile/build.sh @@ -3,11 +3,10 @@ set -e -u # edition-specific strings -iso_edition="SystemD/CLI" # default init/wm pair iso_title="Parabola GNU/Linux-libre Live" # $iso_edition and $iso_version appended -base_group='base' # default base package group # CLI option defaults +iso_edition="SystemD/CLI" archs='i686 x86_64' iso_arch='dual' iso_version=$(date +%Y.%m.%d) @@ -67,7 +66,7 @@ run_once() { fi } -# Setup custom pacman.conf with current cache directories. +# Setup custom pacman.conf to cache packages on the target filesystem. make_pacman_conf() { sed -r "s|^#?\\s*CacheDir.+|CacheDir = ${work_dir}/${arch}/root-image/isorepo/|g" ${releng_dir}/pacman.conf > ${pacman_conf} } @@ -80,14 +79,21 @@ make_basefs() { # Additional packages (root-image) make_packages() { - packages=$(grep -h -v ^# ${packages_dir}/packages-{${iso_init},${iso_gui},${iso_wm}}.{both,${arch}} 2> /dev/null || true) - setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} -C ${pacman_conf} -D ${iso_dirname} -p "${packages}" install + local _install_packages=$(grep -h -v ^# ${packages_dir}/packages-{${iso_init},${iso_gui},${iso_wm}}.{both,${arch}} 2> /dev/null || true) + local _cache_packages=$(grep -h -v ^# ${packages_dir}/packages-cache-{${iso_init},${iso_gui},${iso_wm}}.{both,${arch}} 2> /dev/null || true) + + setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} -C ${pacman_conf} -D ${iso_dirname} -p "${_install_packages}" install # create live environment local repo if [[ "$enable_offline_install" == 'true' ]]; then - local iso_repo_dir=${work_dir}/${arch}/root-image/isorepo - - setarch ${arch} repo-add ${iso_repo_dir}/isorepo.db.tar.gz ${iso_repo_dir}/* + if [[ -n ${_cache_packages} ]]; then + setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} -C ${pacman_conf} -D ${iso_dirname} -p "${_cache_packages}" -O install + fi + pushd ${work_dir}/${arch}/root-image/isorepo > /dev/null + setarch ${arch} repo-add --new isorepo.db.tar.gz ./* + popd > /dev/null + else + mv ${work_dir}/${arch}/root-image/isorepo ${work_dir}/../isorepo-${arch} fi } @@ -111,6 +117,7 @@ make_customize_root_image() { cp -af ${releng_dir}/root-image ${work_dir}/${arch} echo "Customizing root image" + arch="${arch}" \ iso_title="${iso_title}" \ iso_init="${iso_init}" \ iso_wm="${iso_wm}" \ @@ -193,7 +200,7 @@ make_efi() { # Prepare efiboot.img::/EFI for "El Torito" EFI boot mode make_efiboot() { - # cleanup from previous runs + # Cleanup in case of previous aborted run while mount | grep ${work_dir}/efiboot; do umount ${work_dir}/efiboot; sleep 1; done; rm ${work_dir}/iso/EFI/parabolaiso/efiboot.img 2> /dev/null || true @@ -250,7 +257,7 @@ make_prepare() { cp -a -l -f ${work_dir}/${arch}/root-image ${work_dir} setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir} -D ${iso_dirname} pkglist - setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir} -D ${iso_dirname} ${offline} prepare + setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir} -D ${iso_dirname} -C ${pacman_conf} ${offline} prepare rm -rf ${work_dir}/root-image # rm -rf ${work_dir}/${arch}/root-image (if low space, this helps) @@ -304,13 +311,14 @@ else iso_arch="${iso_arch}-netinstall" launch_msg="${launch_msg} (net-install only)" fi -iso_title="${iso_title}${iso_edition} Edition ${iso_version}" +iso_title="${iso_title} ${iso_edition} Edition ${iso_version}" iso_filename="parabola-${iso_edition}-${iso_arch}-${iso_version}.iso" iso_filename=$(echo ${iso_filename} | tr '[:upper:]/' '[:lower:]-') iso_init=$(echo ${iso_edition} | cut -d '/' -f 1 | tr '[:upper:]' '[:lower:]') iso_wm=$( echo ${iso_edition} | cut -d '/' -f 2 | tr '[:upper:]' '[:lower:]') -[[ "${iso_wm}" == 'cli' ]] && iso_gui='' || iso_gui='gui' -[[ "${archs}" == 'i686' ]] && arch='i686' || arch='x86_64' +[[ "${iso_init}" == 'openrc' ]] && base_group='base-openrc' || base_group='base' +[[ "${iso_wm}" == 'cli' ]] && iso_gui='' || iso_gui='gui' +[[ "${archs}" == 'i686' ]] && arch='i686' || arch='x86_64' ## sanity checks ## diff --git a/configs/profile/packages/packages-cache-lxde.both b/configs/profile/packages/packages-cache-lxde.both new file mode 100644 index 0000000..3ee77a3 --- /dev/null +++ b/configs/profile/packages/packages-cache-lxde.both @@ -0,0 +1,9 @@ +# this file specifies the packages that are to be downloaded +# and cached in the /isorepo for offline install +# in all live environments regardless of the init system and graphical environment + + +lightdm-gtk-greeter-settings +mate +mate-extra +volumeicon |