diff options
-rwxr-xr-x | configs/profile/build.sh | 12 | ||||
-rw-r--r-- | configs/profile/packages/packages-gui.all | 4 | ||||
-rw-r--r-- | configs/profile/root-image/etc/motd | 2 | ||||
-rw-r--r-- | configs/profile/root-image/etc/pacman.conf | 25 | ||||
-rwxr-xr-x | configs/profile/root-image/root/customize_root_image.sh | 9 | ||||
-rwxr-xr-x | parabolaiso/mkparabolaiso | 35 |
6 files changed, 34 insertions, 53 deletions
diff --git a/configs/profile/build.sh b/configs/profile/build.sh index c26982a..49d5fb2 100755 --- a/configs/profile/build.sh +++ b/configs/profile/build.sh @@ -17,6 +17,7 @@ iso_version=$(date +%Y.%m.%d) iso_label="PARA_$(date +%Y%m)" iso_dirname='parabola' enable_offline_install='false' +offline_switch='' work_dir=./work out_dir=./out target='' @@ -137,7 +138,7 @@ make_packages() { if [[ "$enable_offline_install" == 'true' ]]; then if [[ -n ${_cache_packages} ]]; then # 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 + setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} -C ${pacman_conf} -D ${iso_dirname} -p "${_cache_packages}" ${offline_switch} cache fi # create 'isorepo' for offline install pushd ${work_dir}/${arch}/root-image/isorepo > /dev/null @@ -164,7 +165,6 @@ make_setup_mkinitcpio() { # Customize installation (root-image) make_customize_root_image() { - [[ "$enable_offline_install" == 'true' ]] && offline='-O' || offline='' cp -af ${releng_dir}/root-image ${work_dir}/${arch} @@ -177,7 +177,7 @@ make_customize_root_image() { setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} \ -C ${pacman_conf} \ -D ${iso_dirname} \ - ${offline} \ + ${offline_switch} \ -r /root/customize_root_image.sh \ run rm ${work_dir}/${arch}/root-image/root/customize_root_image* @@ -310,11 +310,9 @@ make_aitab() { # Build all filesystem images specified in aitab (.fs.sfs .sfs) make_prepare() { - [[ "$enable_offline_install" == 'true' ]] && offline='-O' || offline='' - 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} -C ${pacman_conf} ${offline} prepare + setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir} -D ${iso_dirname} -C ${pacman_conf} ${offline_switch} prepare rm -rf ${work_dir}/root-image # rm -rf ${work_dir}/${arch}/root-image (if low space, this helps) @@ -337,7 +335,7 @@ while getopts 'E:T:V:L:D:OC:w:o:vh' arg; do V) iso_version="${OPTARG}" ;; L) iso_label="${OPTARG}" ;; D) iso_dirname="${OPTARG}" ;; - O) enable_offline_install='true' ;; + O) enable_offline_install='true' offline_switch='-O' ;; C) pacman_conf="${OPTARG}" ;; w) work_dir="${OPTARG}" ;; o) out_dir="${OPTARG}" ;; diff --git a/configs/profile/packages/packages-gui.all b/configs/profile/packages/packages-gui.all index 777e9e6..7231c04 100644 --- a/configs/profile/packages/packages-gui.all +++ b/configs/profile/packages/packages-gui.all @@ -45,7 +45,7 @@ octopi-notifier octopi-repoeditor pidgin qtox -ring-client-gnome +ring-gnome smplayer @@ -63,7 +63,7 @@ wbar # Xserver ttf-dejavu +xf86-video-sisusb xorg-drivers xorg-server -xf86-video-sisusb xorg-xinit diff --git a/configs/profile/root-image/etc/motd b/configs/profile/root-image/etc/motd index 02d05ef..67330df 100644 --- a/configs/profile/root-image/etc/motd +++ b/configs/profile/root-image/etc/motd @@ -7,7 +7,7 @@ [1;34m #### [1;37m|_| \__,_|_| \___,_|_,__/ \___/|_|\__,_| [1;34;44mlibre[0m [1;34m ### [1;34m ### -[1;34m ## Free as in freedom +[1;34m ## Free as in Freedom [1;34m #[0m [01;34m========================================================================[0m diff --git a/configs/profile/root-image/etc/pacman.conf b/configs/profile/root-image/etc/pacman.conf deleted file mode 100644 index d77556f..0000000 --- a/configs/profile/root-image/etc/pacman.conf +++ /dev/null @@ -1,25 +0,0 @@ - -[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 1c979e8..ebccf50 100755 --- a/configs/profile/root-image/root/customize_root_image.sh +++ b/configs/profile/root-image/root/customize_root_image.sh @@ -17,15 +17,6 @@ chmod 440 /etc/sudoers.d/g_wheel # configure pacman sed -i "s|#Server|Server|" /etc/pacman.d/mirrorlist -# KLUDGE begin # FIXME: https://labs.parabola.nu/issues/1527 -if [[ "${arch}" == "i686" ]] -then echo "Server = https://repo.parabola.nu/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist -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 -sed -i 's|requiredStorage:.*|requiredStorage: 8.9|' /usr/share/calamares/modules/welcome.conf -# KLUDGE end # configure services if [[ "${iso_init}" == 'systemd' ]] diff --git a/parabolaiso/mkparabolaiso b/parabolaiso/mkparabolaiso index f13b0ba..14ba4bb 100755 --- a/parabolaiso/mkparabolaiso +++ b/parabolaiso/mkparabolaiso @@ -192,7 +192,7 @@ _usage () } # Shows configuration according to command mode. -# $1: init | install | run | prepare | checksum | iso +# $1: init | install | cache | run | prepare | checksum | iso _show_config () { local _mode="$1" echo @@ -211,6 +211,10 @@ _show_config () { _msg_info " Offline install: ${enable_offline_install}" _msg_info " Packages: ${pkg_list}" ;; + cache) + _msg_info " Pacman config file: ${pacman_conf}" + _msg_info " Packages: ${pkg_list}" + ;; run) _msg_info " Run command: ${run_cmd}" _msg_info " Offline install: ${enable_offline_install}" @@ -251,9 +255,7 @@ _pacman () _msg_info "Packages installed successfully!" } -# 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. +# Cache uninstalled packages in offline /isorepo and prune obsolete packages. _pacman_cache () { _msg_info "Caching packages to '${work_dir}/root-image/'..." @@ -573,15 +575,30 @@ command_install () { if [[ -f "${work_dir}/install.${_pkg_list_hash}" ]]; then _msg_info "These packages are already installed, skipping." else - if [[ "${cache_only:-}" == 'true' ]]; then - _pacman_cache "${pkg_list}" - else - _pacman "${pkg_list}" - fi + _pacman "${pkg_list}" : > "${work_dir}/install.${_pkg_list_hash}" fi } +# Cache uninstalled packages in offline /isorepo and prune obsolete packages. +# Optimally, this function should be called only once after all packages are installed +command_cache () { + if [[ ! -f "${pacman_conf}" ]]; then + _msg_error "Pacman config file '${pacman_conf}' does not exist" 1 + fi + + #trim spaces + pkg_list="$(echo ${pkg_list})" + + if [[ -z ${pkg_list} ]]; then + _msg_error "Packages must be specified" 0 + _usage 1 + fi + + _show_config cache + _pacman_cache "${pkg_list}" +} + command_init() { _show_config init _chroot_init |