Skip to content

Commit f9f9fd5

Browse files
author
2b57
committed
restructure; tweak base profile
1 parent 913dd1a commit f9f9fd5

File tree

13 files changed

+310
-14
lines changed

13 files changed

+310
-14
lines changed
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
# Copyright 1999-2021 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
#
4+
# System-wide defaults for the Portage system
5+
# See portage(5) manpage
6+
7+
# Profile IUSE injection (applies only to ebuilds which use EAPI 5 or later)
8+
IUSE_IMPLICIT="prefix prefix-guest prefix-stack"
9+
USE_EXPAND_IMPLICIT="ELIBC TOOLCHAIN BINUTILS KERNEL USERLAND"
10+
USE_EXPAND_VALUES_TOOLCHAIN="Clang GCC"
11+
USE_EXPAND_VALUES_BINUTILS="LLVM GNU"
12+
USE_EXPAND_VALUES_ELIBC="AIX bionic Cygwin Darwin DragonFly FreeBSD glibc HPUX Interix mingw mintlib musl NetBSD OpenBSD SunOS uclibc Winnt"
13+
USE_EXPAND_VALUES_KERNEL="AIX Darwin FreeBSD freemint HPUX linux NetBSD OpenBSD SunOS Winnt"
14+
USE_EXPAND_VALUES_USERLAND="BSD GNU"
15+
16+
# Env vars to expand into USE vars. Modifying this requires prior
17+
# discussion on [email protected].
18+
USE_EXPAND="ABI_MIPS ABI_PPC ABI_S390 ABI_X86 ADA_TARGET ALSA_CARDS APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CPU_FLAGS_ARM CPU_FLAGS_PPC CPU_FLAGS_X86 CURL_SSL ELIBC FFTOOLS GPSD_PROTOCOLS GRUB_PLATFORMS INPUT_DEVICES KERNEL L10N LCD_DEVICES LIBREOFFICE_EXTENSIONS LLVM_TARGETS LUA_SINGLE_TARGET LUA_TARGETS MONKEYD_PLUGINS NGINX_MODULES_HTTP NGINX_MODULES_MAIL NGINX_MODULES_STREAM OFED_DRIVERS OFFICE_IMPLEMENTATION OPENMPI_FABRICS OPENMPI_OFED_FEATURES OPENMPI_RM PHP_TARGETS POSTGRES_TARGETS PYTHON_SINGLE_TARGET PYTHON_TARGETS QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS ROS_MESSAGES RUBY_TARGETS SANE_BACKENDS USERLAND UWSGI_PLUGINS VIDEO_CARDS VOICEMAIL_STORAGE XTABLES_ADDONS"
19+
20+
# USE_EXPAND variables whose contents are not shown in package manager
21+
# output. Changes need discussion on gentoo-dev.
22+
USE_EXPAND_HIDDEN="USERLAND KERNEL ELIBC TOOLCHAIN BINUTILS ABI_MIPS ABI_PPC ABI_S390 ABI_X86 CPU_FLAGS_ARM CPU_FLAGS_PPC CPU_FLAGS_X86"
23+
24+
CONFIG_PROTECT="/etc"
25+
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf"
26+
27+
# EAPI 7 environment variable blacklist.
28+
#
29+
# DBUS_SESSION_BUS_ADDRESS to avoid trying to access the user's session
30+
# bus.
31+
#
32+
# DISPLAY and XAUTHORITY to avoid trying to access the user's X11.
33+
#
34+
# CARGO_HOME may leak to build env if package is not using cargo.eclass
35+
# such leak will result in sandbox violations
36+
#
37+
# XDG_* since the values coming from user environment can collide with
38+
# ebuild-set ${HOME} (e.g. by referring to user's home directory).
39+
# We exclude XDG_DATA_DIRS & XDG_CONFIG_DIRS as those are set in env.d.
40+
#
41+
# PERL_MM_OPT PERL5LIB PERL5OPT PERL_MB_OPT PERL_CORE PERLPREFIX:
42+
# These are guaranteed to confuse perl module installation. Pre-EAPI7
43+
# the Perl eclasses bail out if they are set. Now we declare them here.
44+
#
45+
# GOBIN needs to be cleaned as random values in GOBIN can affect the
46+
# building of some packages:
47+
# https://archives.gentoo.org/gentoo-dev/message/163010f83ae7819d80c0cfdf797cbfe0
48+
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY CARGO_HOME XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR PERL_MM_OPT PERL5LIB PERL5OPT PERL_MB_OPT PERL_CORE PERLPREFIX GOBIN GOPATH"
49+
50+
# Variables that are set exclusively by the profile
51+
# and not by user configuration files.
52+
PROFILE_ONLY_VARIABLES="${PROFILE_ONLY_VARIABLES} ELIBC IUSE_IMPLICIT KERNEL USERLAND TOOLCHAIN BINUTILS USE_EXPAND_IMPLICIT USE_EXPAND_UNPREFIXED USE_EXPAND_VALUES_ELIBC USE_EXPAND_VALUES_KERNEL USE_EXPAND_VALUES_USERLAND"
53+
54+
# 'Sane' defaults
55+
ELIBC="glibc"
56+
KERNEL="linux"
57+
USERLAND="GNU"
58+
INPUT_DEVICES="libinput"
59+
TOOLCHAIN="GCC"
60+
BINUTILS="GNU"
61+
62+
# Accept only licenses in the FREE license group, i.e., with
63+
# the freedom to use, share, modify and share modifications
64+
ACCEPT_LICENSE="-* @FREE"
65+
66+
# Tomáš Chvátal <[email protected]> (2013-03-23)
67+
# By default enable libreoffice implementation only.
68+
OFFICE_IMPLEMENTATION="libreoffice"
69+
70+
# Tomáš Chvátal <[email protected]> (2011-08-12)
71+
# By default do not build any grub platform and let it guess.
72+
GRUB_PLATFORMS=""
73+
74+
# Tomáš Chvátal <[email protected]> (2013-05-05)
75+
# By default enable all extensions with no dependencies
76+
LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer"
77+
78+
# Andreas K. Hüttel <[email protected]> (2011-08-19, 2012-03-25)
79+
# Johannes Huber <[email protected]> (2018-04-15)
80+
# Andreas Sturmlechner <[email protected]> (2019-01-01)
81+
# By default build all calligra features (except unmaintained: stage).
82+
CALLIGRA_FEATURES="karbon sheets words"
83+
84+
# Andreas K. Huettel <[email protected]> (2010-09-28)
85+
# Small default list of enabled plugins for collectd
86+
COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog"
87+
88+
# Tomáš Chvátal <[email protected]> (2010-10-26)
89+
# By default enable all protocols for average GPS user
90+
GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx"
91+
92+
# Benedikt Böhm <[email protected]> (2007-11-27)
93+
# Sane defaults for built-in apache modules
94+
# Patrick Lauer <[email protected]> (2012-10-12)
95+
# extend for apache 2.4
96+
APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias"
97+
98+
# Peter Volkov <[email protected]> (2010-04-29)
99+
# Set some defaults or package will fail to build (Check mconfig in package sources)
100+
XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
101+
102+
# Robert Buchholz <[email protected]> (2006-01-17)
103+
# Some common lcd devices
104+
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
105+
106+
# Manuel Rüger <[email protected]> (2015-09-09)
107+
# Default Ruby build target(s)
108+
# Updated to include ruby27 on 2021-10-10
109+
RUBY_TARGETS="ruby26 ruby27"
110+
111+
# Enable extended filesystem attribute support by default.
112+
# https://archives.gentoo.org/gentoo-dev/message/ba0e3457e4b807e79816f0df03566af0
113+
USE="${USE} xattr"
114+
115+
# Mike Gilbert <[email protected]> (2019-07-14)
116+
# Enable split-usr by default to keep existing installs as-is.
117+
USE="${USE} split-usr"
118+
119+
# Tiziano Müller <[email protected]> (2010-01-24)
120+
# We usually don't want python to (re)write .py[co] files during phase runs
121+
# since it could cause sandbox violations
122+
PYTHONDONTWRITEBYTECODE="1"
123+
124+
# Jorge Manuel B. S. Vicetto <[email protected]> (2011-11-16)
125+
# Add default USE value for bootstrap and rename it from STAGE1_USE to BOOTSTRAP_USE
126+
# Add in expanded PYTHON_TARGETS or stage1 builds break because of USE="-* ${BOOTSTRAP_USE}"
127+
# This MUST be kept in sync with the PYTHON_TARGETS below
128+
# Mike Gilbert <[email protected]> (2018-05-23)
129+
# sys-apps/baselayout-2.5 needs split-usr enabled.
130+
BOOTSTRAP_USE="unicode internal-glib pkg-config split-usr xml python_targets_python3_9"
131+
132+
# Mike Gilbert <[email protected]> (2012-05-15)
133+
# Default target(s) for python-r1.eclass
134+
# Michał Górny <[email protected]> (2021-06-01)
135+
# Updated to python3.9
136+
PYTHON_TARGETS="python3_9"
137+
PYTHON_SINGLE_TARGET="python3_9"
138+
139+
# Michał Górny <[email protected]> (2013-08-10)
140+
# Moved from portage's make.globals.
141+
# 1) do not uninstall kernel modules and therefore allow replacing them,
142+
# 2,3) removed wrt bug #663170,
143+
# 4) protect /var/{run,lock} symlinks for bug 519620
144+
COLLISION_IGNORE="/lib/modules/*"
145+
UNINSTALL_IGNORE="/lib/modules/* /var/run /var/lock"
146+
147+
# Andreas K. Hüttel <[email protected]> (2013-08-23)
148+
# Make emerge messages default to English as per Council decision
149+
LC_MESSAGES="C"
150+
151+
# Brian Dolbec <[email protected]> (2017-06-16)
152+
# disable twisted's plugin cache update to prevent access violations
153+
# call /usr/bin/twisted-regen-cache in pkg_postinst()
154+
TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE="1"
155+
156+
# Aaron W. Swenson <[email protected]> (2017-07-09)
157+
# Default target(s) for postgres{,-multi}.eclass
158+
POSTGRES_TARGETS="postgres12 postgres13"
159+
160+
# Michael Orlitzky <[email protected]> (2017-11-17)
161+
#
162+
# Default PHP targets, used only for extensions at the moment.
163+
#
164+
# The value of this variable should be chosen to be "least annoying by
165+
# default." For example, some packages support only php-5.x and some
166+
# only php-7.x. By having both "php5-6" and php7-0" in PHP_TARGETS, we
167+
# ensure that users who don't care one way or the other don't have to
168+
# mess with this variable in order to install those packages.
169+
#
170+
# Moreover, it should only contain targets that have a stable version
171+
# of PHP, to avoid pulling in an unstable PHP on stable systems.
172+
#
173+
PHP_TARGETS="php7-3 php7-4"
174+
175+
# Alfredo Tupone <[email protected]> (2019-09-03)
176+
#
177+
# Default ADA target
178+
ADA_TARGET="gnat_2020"
179+
180+
# Marek Szuba <[email protected]> (2020-10-15)
181+
# Default targets for lua{,-single}.eclass
182+
LUA_SINGLE_TARGET="lua5-1"
183+
LUA_TARGETS="lua5-1"
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Copyright 1999-2020 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License, v2
3+
4+
# Gentoo Base Profile
5+
6+
# NOTE: THIS IS THE BASE PROFILE FOR *ANY* GENTOO BASED OPERATING SYSTEM.
7+
# NO MODIFICATIONS MAY BE MADE TO THIS FILE WITHOUT PRIOR DISCUSSION. IF
8+
# YOU ARE CREATING A NEW PROFILE, YOU SIMPLY NEED TO INHERIT THIS BASE
9+
# PROFILE IN YOUR PROFILE DIRECTORY'S "parent" FILE.
10+
11+
12+
# OK, you're staring at this file and you have no idea what these stars are
13+
# for. Here's the scoop. An initial "*" marks a package that is part of
14+
# the official BASE system profile. If there is a "*" then `emerge system`
15+
# will use the line in its calculations of what should be installed for the
16+
# base profile. Lines without a "*" prefix will be ignored for profile
17+
# system calculations.
18+
19+
# Please note that this file is rarely used as a package inclusion mask
20+
# file, because it affects EVERY SINGLE gentoo profile. As can be seen,
21+
# we've limited the inclusion mask to a version of portage which supports
22+
# cascaded profiles, but apart from that, there should be no version
23+
# specific information in here. This file serves as a high level description
24+
# of the minimum set of packages needed for any Gentoo based system.
25+
26+
*>=sys-apps/baselayout-2
27+
*app-admin/eselect
28+
*app-arch/bzip2
29+
*app-arch/gzip
30+
*app-arch/tar
31+
*app-arch/xz-utils
32+
*app-shells/bash:0
33+
*net-misc/iputils
34+
*net-misc/rsync
35+
*net-misc/wget
36+
*sys-apps/coreutils
37+
*sys-apps/diffutils
38+
*sys-apps/file
39+
# Much of the tree relies on newer features like "-exec +".
40+
# Force a recent stable version so people stay up-to-date.
41+
*>=sys-apps/findutils-4.4
42+
*sys-apps/gawk
43+
*sys-apps/grep
44+
*sys-apps/kbd
45+
*sys-apps/kmod
46+
# temporary bugfix for #398295
47+
*sys-apps/less
48+
*sys-process/procps
49+
*sys-process/psmisc
50+
*sys-apps/sed
51+
*sys-apps/shadow
52+
*sys-apps/which
53+
# let's try to go virtual
54+
*virtual/binutils
55+
*virtual/toolchain
56+
*sys-devel/gnuconfig
57+
*sys-devel/make
58+
*>=sys-devel/patch-2.7
59+
*sys-fs/e2fsprogs
60+
*virtual/dev-manager
61+
*virtual/editor
62+
*virtual/libc
63+
*virtual/man
64+
*virtual/os-headers
65+
*virtual/package-manager
66+
*virtual/pager
67+
*virtual/service-manager
68+
*virtual/ssh
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright 1999-2019 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
# Matt Turner <[email protected]> (2020-08-11)
5+
# Force USE=libglvnd in order to mask app-eselect/eselect-opengl for removal.
6+
# This USE flag will be removed completely in the near future. Bug #728286
7+
libglvnd
8+
9+
# Mike Gilbert <[email protected]> (2019-07-20)
10+
# Disabling this requires a migration to be performed.
11+
split-usr
12+
13+
# Force the GNU/Linux ELIBC, KERNEL, and USERLAND
14+
# flags that apply to the majority of profiles.
15+
elibc_glibc
16+
kernel_linux
17+
userland_GNU
18+
19+
# Force GCC GNU toolchain by default
20+
toolchain_GCC
21+
binutils_GNU
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright 2021 2b57
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
# This file contains descriptions of BINUTILS USE_EXPAND flags.
5+
6+
# Keep it sorted.
7+
8+
GNU - BINUTILS setting for systems that use GNU binutils
9+
LLVM - BINUTILS setting for systems that use LLVM binutils
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright 2021 2b57
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
# This file contains descriptions of TOOLCHAIN USE_EXPAND flags.
5+
6+
# Keep it sorted.
7+
8+
GCC - TOOLCHAIN setting for systems that use GNU GCC compiler
9+
Clang - TOOLCHAIN setting for systems that use Clang compiler
File renamed without changes.
File renamed without changes.

scripts/stage-builder.sh renamed to assets/scripts/stage-builder.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 1999-2021 Gentoo Authors
2+
# Copyright 2021 2b57
33
# Distributed under the terms of the GNU General Public License v2
44
#
55
# This script attempts to be a universal stage builder
@@ -51,6 +51,7 @@ mkdir -p "/var/tmp/catalyst/snapshot_cache/$TIMESTAMP"
5151

5252
# create portage overlay
5353
THIS_OVERLAY_DIR="$REPO_BASEDIR/toolchain-clang"
54+
SRC_OVERLAY_DIR="$THIS_OVERLAY_DIR/assets/baserepo_overlay"
5455
DEFAULT_REPO_DIR="$REPO_BASEDIR/gentoo"
5556
MOUNT_JUNKDIR=$(mktemp -d)
5657
MOUNT_UPPERDIR="$MOUNT_JUNKDIR/overlay-upper"
@@ -68,7 +69,7 @@ if [ $(grep -q "$MOUNT_OVERLAY" /proc/mounts; echo $?) -eq 0 ]; then
6869
fi
6970

7071
eval "rm -rf $MOUNT_JUNKDIR/* && mkdir -p $MOUNT_OVERLAY $MOUNT_WORKDIR $MOUNT_UPPERDIR" || exit 1
71-
eval "mkdir -p $MOUNT_UPPERDIR/scripts && cp -f $THIS_OVERLAY_DIR/scripts/bootstrap.sh $MOUNT_UPPERDIR/scripts/bootstrap.sh" || exit 1
72+
eval "cp -rf $SRC_OVERLAY_DIR/* $MOUNT_UPPERDIR/" || exit 1
7273
eval "mount -t overlay overlay -o lowerdir=\"$DEFAULT_REPO_DIR\",upperdir=\"$MOUNT_UPPERDIR\",workdir=\"$MOUNT_WORKDIR\" $MOUNT_OVERLAY" || exit 1
7374

7475
einfo "Portage overlay is located at $MOUNT_OVERLAY"
@@ -77,7 +78,7 @@ einfo "Portage overlay is located at $MOUNT_OVERLAY"
7778
# available, so stick to the bundled one
7879
if [ -z "$CATALYST" ]; then
7980
einfo "Tweaking catalyst config to use just created portage overlay"
80-
cp -f "$THIS_OVERLAY_DIR/scripts/catalyst.conf" "$CONFTEMP/catalyst.conf" || exit 1
81+
cp -f "$THIS_OVERLAY_DIR/assets/config/catalyst.conf" "$CONFTEMP/catalyst.conf" || exit 1
8182
sed -i "s:@PORTDIR@:$MOUNT_OVERLAY:g" "$CONFTEMP/catalyst.conf" || exit 1
8283
CATALYST="$CONFTEMP/catalyst.conf"
8384
fi
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
PYTHON_SINGLE_TARGET="python3_9"
2+
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1-
virtual/toolchain
2-
virtual/binutils
1+
*sys-devel/lld
2+
*sys-devel/llvm
3+
*sys-devel/clang
4+
*sys-libs/libcxx
5+
*sys-libs/libcxxabi
6+
*sys-libs/compiler-rt
7+
*sys-libs/llvm-libunwind

0 commit comments

Comments
 (0)