# This option tells catalyst to clean specific files from the filesystem and is
# very usefu in cleaning up stray files in /etc left over after livecd/unmerge.
# example:
-# livecd/rm: /lib/*.a /usr/lib/*.a /usr/lib/gcc-lib/*/*/libgcj* /etc/dispatch-conf.conf /etc/etc-update.conf /etc/*- /etc/issue* /etc/make.conf /etc/man.conf /etc/*.old /root/.viminfo /usr/sbin/bootsplash* /usr/sbin/fb* /usr/sbin/fsck.cramfs /usr/sbin/fsck.minix /usr/sbin/mkfs.minix /usr/sbin/mkfs.bfs /usr/sbin/mkfs.cramfs /lib/security/pam_access.so /lib/security/pam_chroot.so /lib/security/pam_debug.so /lib/security/pam_ftp.so /lib/security/pam_issue.so /lib/security/pam_mail.so /lib/security/pam_motd.so /lib/security/pam_mkhomedir.so /lib/security/pam_postgresok.so /lib/security/pam_rhosts_auth.so /lib/security/pam_userdb.so /usr/share/consolefonts/1* /usr/share/consolefonts/7* /usr/share/consolefonts/8* /usr/share/consolefonts/9* /usr/share/consolefonts/A* /usr/share/consolefonts/C* /usr/share/consolefonts/E* /usr/share/consolefonts/G* /usr/share/consolefonts/L* /usr/share/consolefonts/M* /usr/share/consolefonts/R* /usr/share/consolefonts/a* /usr/share/consolefonts/c* /usr/share/consolefonts/dr* /usr/share/consolefonts/g* /usr/share/consolefonts/i* /usr/share/consolefonts/k* /usr/share/consolefonts/l* /usr/share/consolefonts/r* /usr/share/consolefonts/s* /usr/share/consolefonts/t* /usr/share/consolefonts/v* /etc/splash/livecd-2006.1/16* /etc/splash/livecd-2006.1/12* /etc/splash/livecd-2006.1/6* /etc/splash/livecd-2006.1/8* /etc/splash/livecd-2006.1/images/silent-16* /etc/splash/livecd-2006.1/images/silent-12* /etc/splash/livecd-2006.1/images/silent-6* /etc/splash/livecd-2006.1/images/silent-8* /etc/splash/livecd-2006.1/images/verbose-16* /etc/splash/livecd-2006.1/images/verbose-12* /etc/splash/livecd-2006.1/images/verbose-6* /etc/splash/livecd-2006.1/images/verbose-8* /etc/make.conf.example /etc/make.globals /etc/resolv.conf
+# livecd/rm: /lib/*.a /usr/lib/*.a /usr/lib/gcc-lib/*/*/libgcj* /etc/dispatch-conf.conf /etc/etc-update.conf /etc/*- /etc/issue* /etc/portage/make.conf /etc/man.conf /etc/*.old /root/.viminfo /usr/sbin/bootsplash* /usr/sbin/fb* /usr/sbin/fsck.cramfs /usr/sbin/fsck.minix /usr/sbin/mkfs.minix /usr/sbin/mkfs.bfs /usr/sbin/mkfs.cramfs /lib/security/pam_access.so /lib/security/pam_chroot.so /lib/security/pam_debug.so /lib/security/pam_ftp.so /lib/security/pam_issue.so /lib/security/pam_mail.so /lib/security/pam_motd.so /lib/security/pam_mkhomedir.so /lib/security/pam_postgresok.so /lib/security/pam_rhosts_auth.so /lib/security/pam_userdb.so /usr/share/consolefonts/1* /usr/share/consolefonts/7* /usr/share/consolefonts/8* /usr/share/consolefonts/9* /usr/share/consolefonts/A* /usr/share/consolefonts/C* /usr/share/consolefonts/E* /usr/share/consolefonts/G* /usr/share/consolefonts/L* /usr/share/consolefonts/M* /usr/share/consolefonts/R* /usr/share/consolefonts/a* /usr/share/consolefonts/c* /usr/share/consolefonts/dr* /usr/share/consolefonts/g* /usr/share/consolefonts/i* /usr/share/consolefonts/k* /usr/share/consolefonts/l* /usr/share/consolefonts/r* /usr/share/consolefonts/s* /usr/share/consolefonts/t* /usr/share/consolefonts/v* /etc/splash/livecd-2006.1/16* /etc/splash/livecd-2006.1/12* /etc/splash/livecd-2006.1/6* /etc/splash/livecd-2006.1/8* /etc/splash/livecd-2006.1/images/silent-16* /etc/splash/livecd-2006.1/images/silent-12* /etc/splash/livecd-2006.1/images/silent-6* /etc/splash/livecd-2006.1/images/silent-8* /etc/splash/livecd-2006.1/images/verbose-16* /etc/splash/livecd-2006.1/images/verbose-12* /etc/splash/livecd-2006.1/images/verbose-6* /etc/splash/livecd-2006.1/images/verbose-8* /etc/portage/make.conf.example /etc/make.globals /etc/resolv.conf
livecd/rm:
# This option tells catalyst to clean specific files from the filesystem and is
# very usefu in cleaning up stray files in /etc left over after stage4/unmerge.
# example:
-# stage4/rm: /lib/*.a /usr/lib/*.a /usr/lib/gcc-lib/*/*/libgcj* /etc/dispatch-conf.conf /etc/etc-update.conf /etc/*- /etc/issue* /etc/make.conf /etc/man.conf /etc/*.old /root/.viminfo /usr/sbin/fb* /usr/sbin/fsck.cramfs /usr/sbin/fsck.minix /usr/sbin/mkfs.minix /usr/sbin/mkfs.bfs /usr/sbin/mkfs.cramfs /lib/security/pam_access.so /lib/security/pam_chroot.so /lib/security/pam_debug.so /lib/security/pam_ftp.so /lib/security/pam_issue.so /lib/security/pam_mail.so /lib/security/pam_motd.so /lib/security/pam_mkhomedir.so /lib/security/pam_postgresok.so /lib/security/pam_rhosts_auth.so /lib/security/pam_userdb.so /usr/share/consolefonts/1* /usr/share/consolefonts/7* /usr/share/consolefonts/8* /usr/share/consolefonts/9* /usr/share/consolefonts/A* /usr/share/consolefonts/C* /usr/share/consolefonts/E* /usr/share/consolefonts/G* /usr/share/consolefonts/L* /usr/share/consolefonts/M* /usr/share/consolefonts/R* /usr/share/consolefonts/a* /usr/share/consolefonts/c* /usr/share/consolefonts/dr* /usr/share/consolefonts/g* /usr/share/consolefonts/i* /usr/share/consolefonts/k* /usr/share/consolefonts/l* /usr/share/consolefonts/r* /usr/share/consolefonts/s* /usr/share/consolefonts/t* /usr/share/consolefonts/v* /etc/splash/livecd-2006.1/16* /etc/splash/livecd-2006.1/12* /etc/splash/livecd-2006.1/6* /etc/splash/livecd-2006.1/8* /etc/splash/livecd-2006.1/images/silent-16* /etc/splash/livecd-2006.1/images/silent-12* /etc/splash/livecd-2006.1/images/silent-6* /etc/splash/livecd-2006.1/images/silent-8* /etc/splash/livecd-2006.1/images/verbose-16* /etc/splash/livecd-2006.1/images/verbose-12* /etc/splash/livecd-2006.1/images/verbose-6* /etc/splash/livecd-2006.1/images/verbose-8* /etc/make.conf.example /etc/make.globals /etc/resolv.conf
+# stage4/rm: /lib/*.a /usr/lib/*.a /usr/lib/gcc-lib/*/*/libgcj* /etc/dispatch-conf.conf /etc/etc-update.conf /etc/*- /etc/issue* /etc/portage/make.conf /etc/man.conf /etc/*.old /root/.viminfo /usr/sbin/fb* /usr/sbin/fsck.cramfs /usr/sbin/fsck.minix /usr/sbin/mkfs.minix /usr/sbin/mkfs.bfs /usr/sbin/mkfs.cramfs /lib/security/pam_access.so /lib/security/pam_chroot.so /lib/security/pam_debug.so /lib/security/pam_ftp.so /lib/security/pam_issue.so /lib/security/pam_mail.so /lib/security/pam_motd.so /lib/security/pam_mkhomedir.so /lib/security/pam_postgresok.so /lib/security/pam_rhosts_auth.so /lib/security/pam_userdb.so /usr/share/consolefonts/1* /usr/share/consolefonts/7* /usr/share/consolefonts/8* /usr/share/consolefonts/9* /usr/share/consolefonts/A* /usr/share/consolefonts/C* /usr/share/consolefonts/E* /usr/share/consolefonts/G* /usr/share/consolefonts/L* /usr/share/consolefonts/M* /usr/share/consolefonts/R* /usr/share/consolefonts/a* /usr/share/consolefonts/c* /usr/share/consolefonts/dr* /usr/share/consolefonts/g* /usr/share/consolefonts/i* /usr/share/consolefonts/k* /usr/share/consolefonts/l* /usr/share/consolefonts/r* /usr/share/consolefonts/s* /usr/share/consolefonts/t* /usr/share/consolefonts/v* /etc/splash/livecd-2006.1/16* /etc/splash/livecd-2006.1/12* /etc/splash/livecd-2006.1/6* /etc/splash/livecd-2006.1/8* /etc/splash/livecd-2006.1/images/silent-16* /etc/splash/livecd-2006.1/images/silent-12* /etc/splash/livecd-2006.1/images/silent-6* /etc/splash/livecd-2006.1/images/silent-8* /etc/splash/livecd-2006.1/images/verbose-16* /etc/splash/livecd-2006.1/images/verbose-12* /etc/splash/livecd-2006.1/images/verbose-6* /etc/splash/livecd-2006.1/images/verbose-8* /etc/portage/make.conf.example /etc/make.globals /etc/resolv.conf
stage4/rm:
def chroot_setup(self):
self.makeconf=read_makeconf(self.settings["chroot_path"]+\
- "/etc/make.conf")
+ "/etc/portage/make.conf")
self.override_cbuild()
self.override_chost()
self.override_cflags()
else:
print "Setting up chroot..."
- #self.makeconf=read_makeconf(self.settings["chroot_path"]+"/etc/make.conf")
+ #self.makeconf=read_makeconf(self.settings["chroot_path"]+"/etc/portage/make.conf")
cmd("cp /etc/resolv.conf "+self.settings["chroot_path"]+"/etc",\
"Could not copy resolv.conf into place.",env=self.env)
"Could not copy /etc/hosts",env=self.env)
""" Modify and write out make.conf (for the chroot) """
- cmd("rm -f "+self.settings["chroot_path"]+"/etc/make.conf",\
+ cmd("rm -f "+self.settings["chroot_path"]+"/etc/portage/make.conf",\
"Could not remove "+self.settings["chroot_path"]+\
- "/etc/make.conf",env=self.env)
- myf=open(self.settings["chroot_path"]+"/etc/make.conf","w")
+ "/etc/portage/make.conf",env=self.env)
+ myf=open(self.settings["chroot_path"]+"/etc/portage/make.conf","w")
myf.write("# These settings were set by the catalyst build script that automatically\n# built this stage.\n")
myf.write("# Please consult /usr/share/portage/config/make.conf.example for a more\n# detailed example.\n")
if self.settings.has_key("CFLAGS"):
myf.write('PORTDIR_OVERLAY="/usr/local/portage"\n')
myf.close()
- cmd("cp "+self.settings["chroot_path"]+"/etc/make.conf "+\
- self.settings["chroot_path"]+"/etc/make.conf.catalyst",\
- "Could not backup /etc/make.conf",env=self.env)
+ cmd("cp "+self.settings["chroot_path"]+"/etc/portage/make.conf "+\
+ self.settings["chroot_path"]+"/etc/portage/make.conf.catalyst",\
+ "Could not backup /etc/portage/make.conf",env=self.env)
touch(self.settings["autoresume_path"]+"chroot_setup")
def fsscript(self):
cmd("rm -rf "+self.settings["chroot_path"]+"/usr/local/portage",\
"Could not remove /usr/local/portage",env=self.env)
cmd("sed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\
- "/etc/make.conf",\
+ "/etc/portage/make.conf",\
"Could not remove PORTDIR_OVERLAY from make.conf",env=self.env)
""" Clean up old and obsoleted files in /etc """
## START BUILD
# First, we drop in a known-good baselayout
-[ -e /etc/make.conf ] && \
- echo 'USE="${USE} -build"' >> /etc/make.conf
+[ -e /etc/portage/make.conf ] && \
+ echo 'USE="${USE} -build"' >> /etc/portage/make.conf
run_merge "--oneshot --nodeps sys-apps/baselayout"
-sed -i '/USE="${USE} -build"/d' /etc/make.conf
+sed -i '/USE="${USE} -build"/d' /etc/portage/make.conf
# Next, we install the package manager
clst_root_path=/ setup_pkgmgr
make_destpath /tmp/stage1root
# Now, we install our packages
-[ -e /etc/make.conf ] && \
+[ -e /etc/portage/make.conf ] && \
echo "USE=\"-* bindist build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"" \
- >> /etc/make.conf
+ >> /etc/portage/make.conf
run_merge "--oneshot ${clst_buildpkgs}"
sed -i "/USE=\"-* bindist build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"/d" \
- /etc/make.conf
+ /etc/portage/make.conf
install -d ${clst_chroot_path}/${clst_root_path}/etc
# Setup make.conf and make.profile link in "ROOT in chroot":
- copy_to_chroot ${clst_chroot_path}/etc/make.conf /${clst_root_path}/etc
+ copy_to_chroot ${clst_chroot_path}/etc/portage/make.conf /${clst_root_path}/etc
copy_to_chroot ${clst_chroot_path}/etc/portage/make.profile \
/${clst_root_path}/etc
then
export clst_myfeatures="${clst_myfeatures} distcc"
export DISTCC_HOSTS="${clst_distcc_hosts}"
- [ -e /etc/make.conf ] && \
- echo 'USE="${USE} -avahi -gtk -gnome"' >> /etc/make.conf
+ [ -e /etc/portage/make.conf ] && \
+ echo 'USE="${USE} -avahi -gtk -gnome"' >> /etc/portage/make.conf
# We install distcc to / on stage1, then use --noreplace, so we need to
# have some way to check if we need to reinstall distcc without being
# able to rely on USE, so we check for the distcc user and force a
else
clst_root_path=/ run_merge --oneshot --nodeps --noreplace sys-devel/distcc || exit 1
fi
- sed -i '/USE="${USE} -avahi -gtk -gnome"/d' /etc/make.conf
+ sed -i '/USE="${USE} -avahi -gtk -gnome"/d' /etc/portage/make.conf
mkdir -p /etc/distcc
echo "${clst_distcc_hosts}" > /etc/distcc/hosts
setup_pkgmgr(){
# We need to merge our package manager with USE="build" set in case it is
- # portage to avoid frying our /etc/make.conf file. Otherwise, we could
+ # portage to avoid frying our /etc/portage/make.conf file. Otherwise, we could
# just let emerge system could merge it.
# Use --update or portage won't reinstall the same version.
- [ -e /etc/make.conf ] && echo 'USE="${USE} build"' >> /etc/make.conf
+ [ -e /etc/portage/make.conf ] && echo 'USE="${USE} build"' >> /etc/portage/make.conf
run_merge --oneshot --nodeps --update sys-apps/portage
- sed -i '/USE="${USE} build"/d' /etc/make.conf
+ sed -i '/USE="${USE} build"/d' /etc/portage/make.conf
}
cleanup_distcc() {
make_destpath() {
# ROOT is / by default, so remove any ROOT= settings from make.conf
- sed -i '/ROOT=/d' /etc/make.conf
+ sed -i '/ROOT=/d' /etc/portage/make.conf
export ROOT=/
if [ "${1}" != "/" -a -n "${1}" ]
then
- echo "ROOT=\"${1}\"" >> /etc/make.conf
+ echo "ROOT=\"${1}\"" >> /etc/portage/make.conf
export ROOT=${1}
fi
if [ ! -d ${ROOT} ]
fi
fi
-[ -e /etc/make.conf ] && \
- echo "USE=\"\${USE} ${clst_kernel_use} build\"" >> /etc/make.conf
+[ -e /etc/portage/make.conf ] && \
+ echo "USE=\"\${USE} ${clst_kernel_use} build\"" >> /etc/portage/make.conf
if [ -n "${clst_KERNCACHE}" ]
then
fi
build_kernel
-sed -i "/USE=\"\${USE} ${clst_kernel_use} build\"/d" /etc/make.conf
+sed -i "/USE=\"\${USE} ${clst_kernel_use} build\"/d" /etc/portage/make.conf
# grep out the kernel version so that we can do our modules magic
VER=`grep ^VERSION\ \= /usr/src/linux/Makefile | awk '{ print $3 };'`
PAT=`grep ^PATCHLEVEL\ \= /usr/src/linux/Makefile | awk '{ print $3 };'`
# Tweak the livecd make.conf so that users know not to edit it
# http://bugs.gentoo.org/show_bug.cgi?id=144647
-mv /etc/make.conf /etc/make.conf.old
-echo "####################################################" >> /etc/make.conf
-echo "## ATTENTION: THIS IS THE MAKE.CONF ON THE LIVECD ##" >> /etc/make.conf
-echo "## PLEASE EDIT /mnt/gentoo/etc/make.conf INSTEAD ##" >> /etc/make.conf
-echo "####################################################" >> /etc/make.conf
-cat /etc/make.conf.old >> /etc/make.conf
+mv /etc/portage/make.conf /etc/portage/make.conf.old
+echo "####################################################" >> /etc/portage/make.conf
+echo "## ATTENTION: THIS IS THE MAKE.CONF ON THE LIVECD ##" >> /etc/portage/make.conf
+echo "## PLEASE EDIT /mnt/gentoo/etc/portage/make.conf INSTEAD ##" >> /etc/portage/make.conf
+echo "####################################################" >> /etc/portage/make.conf
+cat /etc/portage/make.conf.old >> /etc/portage/make.conf
# devfs tweaks
[ -e /etc/devfsd.conf ] && sed -i '/dev-state/ s:^:#:' /etc/devfsd.conf