diff --git a/scripts/inner_chroot_script.sh b/scripts/inner_chroot_script.sh index a4427d6..5b6a247 100755 --- a/scripts/inner_chroot_script.sh +++ b/scripts/inner_chroot_script.sh @@ -94,9 +94,9 @@ echo "inet_interfaces = localhost" >> /etc/postfix/main.cf # turn bashlogin shells to actual login shells sed -i 's:exec -l /bin/bash:exec -l /bin/bash -l:' /bin/bashlogin -# setup /etc/hosts, add sabayon as default hostname (required by Xfce) -sed -i "/^127.0.0.1/ s/localhost/localhost sabayon/" /etc/hosts -sed -i "/^::1/ s/localhost/localhost sabayon/" /etc/hosts +# setup /etc/hosts, add sablink as default hostname (required by Xfce) +sed -i "/^127.0.0.1/ s/localhost/localhost sablink/" /etc/hosts +sed -i "/^::1/ s/localhost/localhost sablink/" /etc/hosts # setup postfix local mail aliases newaliases @@ -161,9 +161,17 @@ umount /proc equo deptest --pretend emaint --fix world -# copy Portage config from sabayonlinux.org entropy repo to system +# copy entropy repositories config +# the one in chroots is optimized to use Garr mirror +cp /etc/entropy/repositories.conf.example /etc/entropy/repositories.conf -p +for repo_conf in /etc/entropy/repositories.conf.d/entropy_*.example; do + new_repo_conf="${repo_conf%.example}" + cp "${repo_conf}" "${new_repo_conf}" +done + +# copy Portage config from sablink.nas-central.org entropy repo to system for conf in package.mask package.unmask package.keywords make.conf package.use; do - repo_path=/var/lib/entropy/client/database/*/sabayonlinux.org/standard + repo_path=/var/lib/entropy/client/database/*/sablink.nas-central.org/standard repo_conf=$(ls -1 ${repo_path}/*/*/${conf} | sort | tail -n 1 2>/dev/null) if [ -n "${repo_conf}" ]; then target_path="/etc/portage/${conf}" @@ -172,10 +180,9 @@ for conf in package.mask package.unmask package.keywords make.conf package.use; fi fi done -# split config files -for conf in 00-sabayon.package.use 00-sabayon.package.mask \ - 00-sabayon.package.unmask 00-sabayon.package.keywords; do - repo_path=/var/lib/entropy/client/database/*/sabayonlinux.org/standard +# split config file +for conf in 00-sabayon.package.use; do + repo_path=/var/lib/entropy/client/database/*/sablink.nas-central.org/standard repo_conf=$(ls -1 ${repo_path}/*/*/${conf} | sort | tail -n 1 2>/dev/null) if [ -n "${repo_conf}" ]; then target_path="/etc/portage/${conf/00-sabayon.}/${conf}" @@ -191,6 +198,15 @@ for conf in 00-sabayon.package.use 00-sabayon.package.mask \ fi done +# Update sabayon overlay +layman -d sabayon +rm -rf /var/lib/layman/sabayon +layman -d sabayon-distro +rm -rf /var/lib/layman/sabayon-distro +layman -d sablink +rm -rf /var/lib/layman/sablink + + # Reset users' password # chpasswd doesn't work anymore root_zeropass="root::$(cat /etc/shadow | grep "root:" | cut -d":" -f3-)" @@ -215,7 +231,7 @@ if [ -x "/usr/bin/fluxbox-generate_menu" ]; then fluxbox-generate_menu -o /etc/skel/.fluxbox/menu fi -equo query list installed -qv > /etc/sabayon-pkglist +equo query list installed -qv > /etc/sablink-pkglist rm -rf /var/tmp/entropy/* rm -rf /var/lib/entropy/logs diff --git a/scripts/inner_source_chroot_update.sh b/scripts/inner_source_chroot_update.sh index 20aa959..e50364a 100755 --- a/scripts/inner_source_chroot_update.sh +++ b/scripts/inner_source_chroot_update.sh @@ -148,7 +148,7 @@ done rm -rf /var/lib/entropy/client/packages -# copy Portage config from sabayonlinux.org entropy repo to system +# copy Portage config from sablink.nas-central.org entropy repo to system for conf in package.mask package.unmask package.keywords make.conf package.use; do repo_path=/var/lib/entropy/client/database/*/sabayonlinux.org/standard repo_conf=$(ls -1 ${repo_path}/*/*/${conf} | sort | tail -n 1 2>/dev/null) @@ -173,10 +173,24 @@ for conf in 00-sabayon.package.use 00-sabayon.package.mask \ fi mkdir -p "${target_dir}" # ignore failure cp "${repo_conf}" "${target_path}" # ignore - fi done +# NAS addon: overlay Portage config from sablink.nas-central.org if available +for conf in package.mask package.unmask package.keywords make.conf package.use; do + repo_path=/var/lib/entropy/client/database/*/sablink.nas-central.org/standard + repo_conf=$(ls -1 ${repo_path}/*/*/${conf} | sort | tail -n 1 2>/dev/null) + if [ -n "${repo_conf}" ]; then + target_path="/etc/portage/${conf}" + if [ "${conf}" = "make.conf" ]; then + target_path="/etc/make.conf" + fi + if [ ! -d "${target_path}" ]; then # do not touch dirs + cp "${repo_conf}" "${target_path}" # ignore + fi + fi +done + if [ -n "${DRACUT}" ]; then # Dracut initramfs generation for livecd # XXX: If you are reading this ..beware! @@ -208,4 +222,4 @@ RSYNC_URI="rsync://rsync.at.gentoo.org/gentoo-portage/profiles" PROFILES_DIR="/usr/portage/profiles" safe_run rsync -av -H -A -X --delete-during "${RSYNC_URI}/" "${PROFILES_DIR}/" -equo query list installed -qv > /etc/sabayon-pkglist +equo query list installed -qv > /etc/sablink-pkglist