aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README2
-rw-r--r--catalyst/arch/riscv.py13
-rw-r--r--catalyst/base/stagebase.py2
-rw-r--r--catalyst/targets/stage1.py14
-rw-r--r--catalyst/version.py2
-rw-r--r--doc/catalyst-config.5.txt25
-rw-r--r--etc/catalyst.conf16
-rw-r--r--examples/generic_stage_template.spec2
-rw-r--r--examples/grp_template.spec2
-rw-r--r--examples/livecd-stage1_template.spec2
-rw-r--r--examples/livecd-stage2_template.spec6
-rw-r--r--examples/netboot_template.spec2
-rw-r--r--examples/stage4_template.spec4
-rw-r--r--examples/tinderbox_template.spec2
-rw-r--r--livecd/files/livecd-local.start4
-rwxr-xr-xtargets/stage1/stage1-preclean-chroot.sh2
-rwxr-xr-xtargets/support/chroot-functions.sh4
-rwxr-xr-xtargets/support/create-iso.sh2
18 files changed, 65 insertions, 41 deletions
diff --git a/README b/README
index 7be176c..6315637 100644
--- a/README
+++ b/README
@@ -52,7 +52,7 @@ distribution tarball's files directory.
Example catalyst.conf:
-distdir="/usr/portage/distfiles"
+distdir="/var/cache/distfiles"
options="pkgcache kerncache"
sharedir="/usr/share/catalyst"
diff --git a/catalyst/arch/riscv.py b/catalyst/arch/riscv.py
new file mode 100644
index 0000000..6f5695f
--- /dev/null
+++ b/catalyst/arch/riscv.py
@@ -0,0 +1,13 @@
+
+from catalyst import builder
+
+class arch_riscv(builder.generic):
+ "builder class for riscv"
+ def __init__(self,myspec):
+ builder.generic.__init__(self,myspec)
+ self.settings["COMMON_FLAGS"]="-O2 -pipe"
+ self.settings["CHOST"]="riscv64-unknown-linux-gnu"
+
+def register():
+ "Inform main catalyst program of the contents of this plugin."
+ return ({ "riscv":arch_riscv }, ("rv64","riscv64","riscv"))
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 54a1f38..4e81a9b 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1020,7 +1020,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
ouch = 1
log.warning("Couldn't umount bind mount: %s", target)
- if "snapcache" in self.settings["options"] and x == "/usr/portage":
+ if "snapcache" in self.settings["options"] and x == "/var/db/repos/gentoo":
try:
# It's possible the snapshot lock object isn't created yet.
# This is because mount safety check calls unbind before the
diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py
index cc4366b..59d6d49 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -38,11 +38,17 @@ class stage1(StageBase):
"/usr/share/zoneinfo", self.settings["port_conf"] + "/package*"])
# XXX: How do these override_foo() functions differ from the ones in StageBase and why aren't they in stage3_target?
+ # XXY: It appears the difference is that these functions are actually doing something and the ones in stagebase don't :-(
+ # XXZ: I have a wierd suspicion that it's the difference in capitolization
def override_chost(self):
if "chost" in self.settings:
self.settings["CHOST"] = self.settings["chost"]
+ def override_common_flags(self):
+ if "common_flags" in self.settings:
+ self.settings["COMMON_FLAGS"] = self.settings["common_flags"]
+
def override_cflags(self):
if "cflags" in self.settings:
self.settings["CFLAGS"] = self.settings["cflags"]
@@ -51,6 +57,14 @@ class stage1(StageBase):
if "cxxflags" in self.settings:
self.settings["CXXFLAGS"] = self.settings["cxxflags"]
+ def override_fcflags(self):
+ if "fcflags" in self.settings:
+ self.settings["FCFLAGS"] = self.settings["fcflags"]
+
+ def override_fflags(self):
+ if "fflags" in self.settings:
+ self.settings["FFLAGS"] = self.settings["fflags"]
+
def override_ldflags(self):
if "ldflags" in self.settings:
self.settings["LDFLAGS"] = self.settings["ldflags"]
diff --git a/catalyst/version.py b/catalyst/version.py
index fbbef17..eac78fe 100644
--- a/catalyst/version.py
+++ b/catalyst/version.py
@@ -12,7 +12,7 @@ import os
from snakeoil.version import get_git_version as get_ver
-__version__= "3.0.4"
+__version__= "3.0.5"
_ver = None
diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 957ab0e..76ac4a2 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -31,14 +31,14 @@ envscript="/etc/catalyst/catalystrc"
options="autoresume bindist kerncache pkgcache seedcache snapcache"
# source repo settings
-distdir="/usr/portage/distfiles"
-portdir="/usr/portage"
+distdir="/var/cache/distfiles"
+portdir="/var/db/repos/gentoo"
# target repo info
-repo_basedir="/usr"
-repo_name="portage"
-target_distdir="/usr/portage/distfiles"
-target_pkgdir="/usr/portage/packages"
+repo_basedir="/var/db/repos"
+repo_name="gentoo"
+target_distdir="/var/cache/distfiles"
+target_pkgdir="/var/cache/binpkgs"
# other catalyst settings
sharedir="/usr/share/catalyst"
@@ -156,17 +156,16 @@ Repository settings
*distdir*::
Source distfiles location used in generation of the stages. This is usually the
-hosts distfiles location. `/usr/portage/distfiles` should work for most
+hosts distfiles location. `/var/cache/distfiles` should work for most
default installations, but it should be set to match your hosts configuration.
*portdir*::
-Source Gentoo tree location (primary repo). `/usr/portage/` should work for most
+Source Gentoo tree location (primary repo). `/var/db/repos/gentoo/` should work for most
default installations.
*repo_basedir*::
-The target repository directory to contain the rimary repo (gentoo repo) and
-any overlays. `/usr` is the historical location. But that is in the process of
-changing. `/var/gentoo/repos` is an option.
+The target repository directory to contain the primary repo (gentoo repo) and
+any overlays. The default location is `/var/db/repos`.
*repo_name*::
The name of the main repository (ie: gentoo). This has had a directory name
@@ -180,12 +179,12 @@ internal repo_name value should be the same.
This is the target distfiles directory location for the stage being created.
This is important because this value will be stored in the stage's make.conf
and will become the default location used if it is not edited by users.
-The default location is `/usr/portage/distfiles`.
+The default location is `/var/cache/distfiles`.
*target_pkgdir*::
This is the target packages directory for storing binpkgs in the stage being
built. This location is stored in the make.conf of the stage being built.
-The default location for this has typically been `/usr/portage/packages`
+The default location for this has typically been `/var/cache/binpkgs`
Other settings
~~~~~~~~~~~~~~
diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index c22cd43..5a5eedb 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -28,7 +28,7 @@ contents="auto"
# distdir specifies where your distfiles are located. This setting should
# work fine for most default installations.
-distdir="/usr/portage/distfiles"
+distdir="/var/cache/distfiles"
# envscript allows users to set options such as http proxies, MAKEOPTS,
# GENTOO_MIRRORS, or any other environment variables needed for building.
@@ -74,7 +74,7 @@ hash_function="crc32"
# WARNING: moving parts of the portage tree from within fsscript *will* break
# your cache. The cache is unlinked before any empty or rm processing, though.
# sticky-config = enables the code that will keep any internal 'catalyst_use' flags
-# added to the USE= for building the stage. These ae usually added for legal
+# added to the USE= for building the stage. These are usually added for legal
# or specific needs in building the the early stage. Mostly it is the
# 'bindist' USE flag option that is used for legal reasons, please see its
# specific definition. It will also keep any /etc/portage/package.*
@@ -84,18 +84,18 @@ hash_function="crc32"
options="autoresume bindist kerncache pkgcache seedcache snapcache"
# Source portdir specifies the source portage tree used by the snapshot target.
-portdir="/usr/portage"
+portdir="/var/db/repos/gentoo"
# Target portdir setting. It needs to be in 2 parts.
# They will be used separately, then added together where needed.
# eg:
-# repo_basedir="/var/lib/repos"
+# repo_basedir="/var/db/repos"
# repo_name="gentoo"
#
-repo_basedir="/usr"
-repo_name="portage"
-target_distdir="/usr/portage/distfiles"
-target_pkgdir="/usr/portage/packages"
+repo_basedir="/var/db/repos"
+repo_name="gentoo"
+target_distdir="/var/cache/distfiles"
+target_pkgdir="/var/cache/binpkgs"
# sharedir specifies where all of the catalyst runtime executables
# and other shared lib objects are.
diff --git a/examples/generic_stage_template.spec b/examples/generic_stage_template.spec
index 40a3d5c..01c3778 100644
--- a/examples/generic_stage_template.spec
+++ b/examples/generic_stage_template.spec
@@ -28,7 +28,7 @@ target:
rel_type:
# This is the system profile to be used by catalyst to build this target. It is
-# specified as a relative path from /usr/portage/profiles.
+# specified as a relative path from /var/db/repos/gentoo/profiles.
# example:
# profile: default-linux/x86/2006.1
profile:
diff --git a/examples/grp_template.spec b/examples/grp_template.spec
index 7116026..3a0e15a 100644
--- a/examples/grp_template.spec
+++ b/examples/grp_template.spec
@@ -28,7 +28,7 @@ target: grp
rel_type:
# This is the system profile to be used by catalyst to build this target. It is
-# specified as a relative path from /usr/portage/profiles.
+# specified as a relative path from /var/db/repos/gentoo/profiles.
# example:
# profile: default-linux/x86/2006.1
profile:
diff --git a/examples/livecd-stage1_template.spec b/examples/livecd-stage1_template.spec
index 90ae199..c7086c9 100644
--- a/examples/livecd-stage1_template.spec
+++ b/examples/livecd-stage1_template.spec
@@ -28,7 +28,7 @@ target:
rel_type:
# This is the system profile to be used by catalyst to build this target. It is
-# specified as a relative path from /usr/portage/profiles.
+# specified as a relative path from /var/db/repos/gentoo/profiles.
# example:
# profile: default-linux/x86/2006.1
profile:
diff --git a/examples/livecd-stage2_template.spec b/examples/livecd-stage2_template.spec
index 419f480..cc5cf00 100644
--- a/examples/livecd-stage2_template.spec
+++ b/examples/livecd-stage2_template.spec
@@ -28,7 +28,7 @@ target:
rel_type:
# This is the system profile to be used by catalyst to build this target. It is
-# specified as a relative path from /usr/portage/profiles.
+# specified as a relative path from /var/db/repos/gentoo/profiles.
# example:
# profile: default-linux/x86/2006.1
profile:
@@ -354,11 +354,11 @@ livecd/unmerge:
# rid of files that don't belong to a particular package, or removing files from
# a package that you wish to keep, but won't need the full functionality.
# example:
-# livecd/empty: /var/tmp /var/cache /var/db /var/empty /var/lock /var/log /var/run /var/spool /var/state /tmp /usr/portage /usr/share/man /usr/share/info /usr/share/unimaps /usr/include /usr/share/zoneinfo /usr/share/dict /usr/share/doc /usr/share/ss /usr/share/state /usr/share/texinfo /usr/lib/python2.2 /usr/lib/portage /usr/share/gettext /usr/share/i18n /usr/share/rfc /usr/lib/X11/config /usr/lib/X11/etc /usr/lib/X11/doc /usr/src /usr/share/doc /usr/share/man /etc/cron.daily /etc/cron.hourly /etc/cron.monthly /etc/cron.weekly /etc/logrotate.d /etc/rsync /usr/lib/awk /usr/lib/ccache /usr/lib/gcc-config /usr/lib/nfs /usr/local /usr/diet/include /usr/diet/man /usr/share/consolefonts/partialfonts /usr/share/consoletrans /usr/share/emacs /usr/share/gcc-data /usr/share/genkernel /etc/bootsplash/gentoo /etc/bootsplash/gentoo-highquality /etc/splash/gentoo /etc/splash/emergence /usr/share/gnuconfig /usr/share/lcms /usr/share/locale /etc/skel
+# livecd/empty: /var/tmp /var/cache /var/db /var/empty /var/lock /var/log /var/run /var/spool /var/state /tmp /var/db/repos/gentoo /usr/share/man /usr/share/info /usr/share/unimaps /usr/include /usr/share/zoneinfo /usr/share/dict /usr/share/doc /usr/share/ss /usr/share/state /usr/share/texinfo /usr/lib/python2.2 /usr/lib/portage /usr/share/gettext /usr/share/i18n /usr/share/rfc /usr/lib/X11/config /usr/lib/X11/etc /usr/lib/X11/doc /usr/src /usr/share/doc /usr/share/man /etc/cron.daily /etc/cron.hourly /etc/cron.monthly /etc/cron.weekly /etc/logrotate.d /etc/rsync /usr/lib/awk /usr/lib/ccache /usr/lib/gcc-config /usr/lib/nfs /usr/local /usr/diet/include /usr/diet/man /usr/share/consolefonts/partialfonts /usr/share/consoletrans /usr/share/emacs /usr/share/gcc-data /usr/share/genkernel /etc/bootsplash/gentoo /etc/bootsplash/gentoo-highquality /etc/splash/gentoo /etc/splash/emergence /usr/share/gnuconfig /usr/share/lcms /usr/share/locale /etc/skel
livecd/empty:
# 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.
+# very useful 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/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:
diff --git a/examples/netboot_template.spec b/examples/netboot_template.spec
index 0cffc66..c172610 100644
--- a/examples/netboot_template.spec
+++ b/examples/netboot_template.spec
@@ -28,7 +28,7 @@ target:
rel_type:
# This is the system profile to be used by catalyst to build this target. It is
-# specified as a relative path from /usr/portage/profiles.
+# specified as a relative path from /var/db/repos/gentoo/profiles.
# example:
# profile: default-linux/x86/2006.1
profile:
diff --git a/examples/stage4_template.spec b/examples/stage4_template.spec
index 4066bf5..fe394f3 100644
--- a/examples/stage4_template.spec
+++ b/examples/stage4_template.spec
@@ -28,7 +28,7 @@ target:
rel_type:
# This is the system profile to be used by catalyst to build this target. It is
-# specified as a relative path from /usr/portage/profiles.
+# specified as a relative path from /var/db/repos/gentoo/profiles.
# example:
# profile: default-linux/x86/2006.1
profile:
@@ -252,7 +252,7 @@ stage4/unmerge:
# rid of files that don't belong to a particular package, or removing files from
# a package that you wish to keep, but won't need the full functionality.
# example:
-# stage4/empty: /var/tmp /var/cache /var/db /var/empty /var/lock /var/log /var/run /var/spool /var/state /tmp /usr/portage /usr/share/man /usr/share/info /usr/share/unimaps /usr/include /usr/share/zoneinfo /usr/share/dict /usr/share/doc /usr/share/ss /usr/share/state /usr/share/texinfo /usr/lib/python2.2 /usr/lib/portage /usr/share/gettext /usr/share/i18n /usr/share/rfc /usr/lib/X11/config /usr/lib/X11/etc /usr/lib/X11/doc /usr/src /usr/share/doc /usr/share/man /etc/cron.daily /etc/cron.hourly /etc/cron.monthly /etc/cron.weekly /etc/logrotate.d /etc/rsync /usr/lib/awk /usr/lib/ccache /usr/lib/gcc-config /usr/lib/nfs /usr/local /usr/diet/include /usr/diet/man /usr/share/consolefonts/partialfonts /usr/share/consoletrans /usr/share/emacs /usr/share/gcc-data /usr/share/genkernel /etc/splash/gentoo /etc/splash/emergence /usr/share/gnuconfig /usr/share/lcms /usr/share/locale /etc/skel
+# stage4/empty: /var/tmp /var/cache /var/db /var/empty /var/lock /var/log /var/run /var/spool /var/state /tmp /var/db/repos/gentoo /usr/share/man /usr/share/info /usr/share/unimaps /usr/include /usr/share/zoneinfo /usr/share/dict /usr/share/doc /usr/share/ss /usr/share/state /usr/share/texinfo /usr/lib/python2.2 /usr/lib/portage /usr/share/gettext /usr/share/i18n /usr/share/rfc /usr/lib/X11/config /usr/lib/X11/etc /usr/lib/X11/doc /usr/src /usr/share/doc /usr/share/man /etc/cron.daily /etc/cron.hourly /etc/cron.monthly /etc/cron.weekly /etc/logrotate.d /etc/rsync /usr/lib/awk /usr/lib/ccache /usr/lib/gcc-config /usr/lib/nfs /usr/local /usr/diet/include /usr/diet/man /usr/share/consolefonts/partialfonts /usr/share/consoletrans /usr/share/emacs /usr/share/gcc-data /usr/share/genkernel /etc/splash/gentoo /etc/splash/emergence /usr/share/gnuconfig /usr/share/lcms /usr/share/locale /etc/skel
stage4/empty:
# This option tells catalyst to clean specific files from the filesystem and is
diff --git a/examples/tinderbox_template.spec b/examples/tinderbox_template.spec
index f1af09c..d5575b4 100644
--- a/examples/tinderbox_template.spec
+++ b/examples/tinderbox_template.spec
@@ -26,7 +26,7 @@ target: tinderbox
rel_type:
# This is the system profile to be used by catalyst to build this target. It is
-# specified as a relative path from /usr/portage/profiles.
+# specified as a relative path from /var/db/repos/gentoo/profiles.
# example:
# profile: default-linux/x86/2006.1
profile:
diff --git a/livecd/files/livecd-local.start b/livecd/files/livecd-local.start
index 11a7d28..3615569 100644
--- a/livecd/files/livecd-local.start
+++ b/livecd/files/livecd-local.start
@@ -16,10 +16,10 @@
if [ -d /usr/livecd/profiles ]
then
- ln -sf /usr/livecd/profiles /usr/portage/profiles
+ ln -sf /usr/livecd/profiles /var/db/repos/gentoo/profiles
fi
if [ -d /usr/livecd/eclass ]
then
- ln -sf /usr/livecd/eclass /usr/portage/eclass
+ ln -sf /usr/livecd/eclass /var/db/repos/gentoo/eclass
fi
diff --git a/targets/stage1/stage1-preclean-chroot.sh b/targets/stage1/stage1-preclean-chroot.sh
index 1b623f1..ea9056e 100755
--- a/targets/stage1/stage1-preclean-chroot.sh
+++ b/targets/stage1/stage1-preclean-chroot.sh
@@ -8,8 +8,6 @@ source /tmp/chroot-functions.sh
update_env_settings
show_debug
-# Right now these will parse the unpacked stage3 but change things
-# inside of /tmp/stage1root due to ROOT env variable
setup_gcc
setup_binutils
diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 506d43f..05f311c 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -159,7 +159,7 @@ setup_myemergeopts(){
setup_binutils(){
if [ -x /usr/bin/binutils-config ]
then
- my_binutils=$( cd /etc/env.d/binutils; ls ${clst_CHOST}-* | head -n 1 )
+ my_binutils=$( cd ${ROOT}/etc/env.d/binutils; ls ${clst_CHOST}-* | head -n 1 )
if [ -z "${my_binutils}" ]
then
my_binutils=1
@@ -171,7 +171,7 @@ setup_binutils(){
setup_gcc(){
if [ -x /usr/bin/gcc-config ]
then
- my_gcc=$( cd /etc/env.d/gcc; ls ${clst_CHOST}-* | head -n 1 )
+ my_gcc=$( cd ${ROOT}/etc/env.d/gcc; ls ${clst_CHOST}-* | head -n 1 )
if [ -z "${my_gcc}" ]
then
my_gcc=1
diff --git a/targets/support/create-iso.sh b/targets/support/create-iso.sh
index 1b0f05e..8338e30 100755
--- a/targets/support/create-iso.sh
+++ b/targets/support/create-iso.sh
@@ -261,7 +261,7 @@ case ${clst_hostarch} in
mkdir "${clst_target_path}/gentoo.efimg.mountPoint"
echo "Mounting FAT16 loopback file"
mount -t vfat -o loop "${clst_target_path}/gentoo.efimg" \
- "${clst_target_path}/gentoo.efimg.mountPoint"
+ "${clst_target_path}/gentoo.efimg.mountPoint" || die "Failed to mount EFI image file"
echo "Populating EFI image file from ${clst_target_path}/boot/EFI"
cp -rv "${clst_target_path}"/boot/EFI/ \