Merge pull request #2502 from flatcar/krnowak/no-lib-symlink

profiles: Switch to 17.1, do some cleanups
This commit is contained in:
Krzesimir Nowak 2023-03-09 15:17:45 +01:00 committed by GitHub
commit 21396b1521
22 changed files with 75 additions and 219 deletions

View File

@ -0,0 +1,30 @@
#!/bin/bash
set -euo pipefail
stage1_repo="${1}"
new_repo="${2}"
good_version="3.6.8-r9"
stage1_version=''
for f in "${stage1_repo}/sys-apps/baselayout/baselayout-"*'.ebuild'; do
f="${f##*/}"
if [[ "${f}" = *9999* ]]; then continue; fi
f="${f%.ebuild}"
f="${f#baselayout-}"
stage1_version="${f}"
done
if [[ -z "${stage1_version}" ]]; then exit 1; fi
older_version=$(printf '%s\n' "${stage1_version}" "${good_version}" | sort -V | head -n 1)
if [[ "${older_version}" = "${good_version}" ]]; then
# Stage1 version is equal or newer than the good version, nothing
# to do.
exit 0
fi
rm -rf "${stage1_repo}/sys-apps/baselayout"
cp -a "${new_repo}/sys-apps/baselayout" "${stage1_repo}/sys-apps/baselayout"

View File

@ -0,0 +1,25 @@
#!/bin/bash
set -x
set -euo pipefail
stage1_repo="${1}"
new_repo="${2}"
parent_file='profiles/coreos/amd64/parent'
old_parent_line='portage-stable:default/linux/amd64/17.0/no-multilib/hardened'
stage1_parent="${stage1_repo}/${parent_file}"
new_parent="${new_repo}/${parent_file}"
if [[ ! -e "${new_parent}" ]]; then
echo "no file '${parent_file}' in new repo, nothing to do"
exit 0
fi
if [[ ! -e "${stage1_parent}" ]]; then
echo "no file '${parent_file}' in stage1 repo, nothing to do"
exit 0
fi
if grep --quiet --fixed-strings --line-regexp --regexp="${old_parent_line}" -- "${stage1_parent}"; then
rm -f "${stage1_parent}"
cp -a "${new_parent}" "${stage1_parent}"
fi

View File

@ -0,0 +1,6 @@
The scripts there are called when setting up the portage-stable and
coreos-overlay repos for the stage1 build. When the scripts are
invoked, they receive a path to the repository as a parameter. The
script for portage-stable should end with `-portage-stable.sh`, and
the script for coreos-overlay with '-coreos-overlay.sh`. For example
`0000-replace-ROOTPATH-coreos-overlay.sh`.

View File

@ -1,158 +1,3 @@
app-accessibility
app-admin
app-antivirus
app-arch
app-backup
app-benchmarks
app-cdr
app-crypt
app-dicts
app-doc
app-editors
app-emacs
app-emulation
app-forensics
app-i18n
app-laptop
app-misc
app-mobilephone
app-office
app-pda
app-portage
app-shells
app-text
app-torcx app-torcx
app-vim
app-xemacs
chromeos-base
coreos-base coreos-base
coreos-devel coreos-devel
dev-ada
dev-cpp
dev-db
dev-dotnet
dev-embedded
dev-games
dev-haskell
dev-java
dev-lang
dev-libs
dev-lisp
dev-ml
dev-perl
dev-php
dev-php5
dev-python
dev-ruby
dev-scheme
dev-tcltk
dev-tex
dev-texlive
dev-tinyos
dev-util
games-action
games-arcade
games-board
games-emulation
games-engines
games-fps
games-kids
games-misc
games-mud
games-puzzle
games-roguelike
games-rpg
games-server
games-simulation
games-sports
games-strategy
games-util
gnome-base
gnome-extra
gnustep-apps
gnustep-base
gnustep-libs
gpe-base
gpe-utils
java-virtuals
kde-base
kde-misc
lxde-base
mail-client
mail-filter
mail-mta
media-fonts
media-gfx
media-libs
media-plugins
media-radio
media-sound
media-tv
media-video
net-analyzer
net-dialup
net-dns
net-firewall
net-fs
net-ftp
net-im
net-irc
net-libs
net-mail
net-misc
net-nds
net-news
net-nntp
net-p2p
net-print
net-proxy
net-voip
net-wireless
net-zope
perl-core
rox-base
rox-extra
sci-astronomy
sci-biology
sci-calculators
sci-chemistry
sci-electronics
sci-geosciences
sci-libs
sci-mathematics
sci-misc
sci-physics
sci-visualization
sec-policy
sys-apps
sys-auth
sys-block
sys-boot
sys-cluster
sys-devel
sys-firmware
sys-freebsd
sys-fs
sys-kernel
sys-libs
sys-power
sys-process
www-apache
www-apps
www-client
www-misc
www-plugins
www-servers
x11-apps
x11-base
x11-drivers
x11-libs
x11-misc
x11-plugins
x11-proto
x11-terms
x11-themes
x11-wm
xfce-base
xfce-extra
virtual

View File

@ -1,2 +1,2 @@
portage-stable:default/linux/amd64/17.0/no-multilib/hardened portage-stable:default/linux/amd64/17.1/no-multilib/hardened
:coreos/base :coreos/base

View File

@ -53,10 +53,13 @@ POLICY_TYPES="targeted mcs mls"
ACCEPT_RESTRICT="* -bindist" ACCEPT_RESTRICT="* -bindist"
USE="${USE} bindist" USE="${USE} bindist"
# Default licenses that are accepted for ChromiumOS builds. # Additional licenses accepted for Flatcar builds.
# If you want to accept more, use the --accept_licenses flag #
# when running setup_board. # netperf - license for net-analyzer/netperf
ACCEPT_LICENSE="* -@EULA -@CHROMEOS" # no-source-code - license for sys-kernel/coreos-firmware
# freedist - license for sys-kernel/coreos-kernel
# BSD-2-Clause-Patent - license for sys-firmware/edk2-aarch64
ACCEPT_LICENSE="${ACCEPT_LICENSE} netperf no-source-code freedist BSD-2-Clause-Patent"
# Favor our own mirrors over Gentoo's # Favor our own mirrors over Gentoo's
GENTOO_MIRRORS=" GENTOO_MIRRORS="

View File

@ -107,6 +107,3 @@ ACCT_USER_SYSTEMD_RESOLVE_ID=245
# tss seems to be one of those users with a mismatching UID/GID # tss seems to be one of those users with a mismatching UID/GID
ACCT_GROUP_TSS_ID=252 ACCT_GROUP_TSS_ID=252
ACCT_USER_TSS_ID=236 ACCT_USER_TSS_ID=236
# Disable creation of /usr/lib as symlink
SYMLINK_LIB="no"

View File

@ -1 +0,0 @@
coreos:coreos/amd64/generic

View File

@ -1 +0,0 @@
coreos:coreos/amd64/sdk

View File

@ -1,2 +0,0 @@
virtual/linux-sources kernel_next
virtual/perf kernel_next

View File

@ -1,7 +0,0 @@
# This lists groups of licenses by short names. If you want to
# modify the licenses that you accept, use the --accept_licenses
# flag when running setup_board.
# List of all the non-free licenses that we use in ChromeOS.
# People building ChromiumOS have to accept these themselves.
CHROMEOS Google-TOS NVIDIA NVIDIA-codecs

View File

@ -2,8 +2,6 @@ amd64 coreos/amd64/generic dev
amd64 coreos/amd64/generic/dev dev amd64 coreos/amd64/generic/dev dev
amd64 coreos/amd64/generic/prod dev amd64 coreos/amd64/generic/prod dev
amd64 coreos/amd64/sdk dev amd64 coreos/amd64/sdk dev
amd64 default/linux/amd64/10.0 dev
amd64 default/linux/amd64/10.0/coreos dev
arm64 coreos/arm64/generic dev arm64 coreos/arm64/generic dev
arm64 coreos/arm64/generic/dev dev arm64 coreos/arm64/generic/dev dev

View File

@ -1,3 +0,0 @@
move virtual/kernel virtual/linux-sources
slotmove =media-libs/jpeg-6b-r9 62 0
slotmove <media-libs/libpng-1.2.45-r2 1.2 0

View File

@ -1 +0,0 @@
move sys-apps/parted sys-block/parted

View File

@ -1 +0,0 @@
move coreos-base/bootengine sys-kernel/bootengine

View File

@ -1,2 +0,0 @@
move app-emulation/rocket app-emulation/rkt
move coreos-base/vboot_reference sys-apps/seismograph

View File

@ -1 +0,0 @@
move dev-python/socksipy-branch dev-python/socksipy

View File

@ -1 +0,0 @@
slotmove =sys-libs/ncurses-5.9-r5 5 0

View File

@ -1,7 +0,0 @@
move dev-python/pymox dev-python/mox
move dev-util/cvs dev-vcs/cvs
move dev-util/cvsps dev-vcs/cvsps
move dev-util/subversion dev-vcs/subversion
move dev-util/git dev-vcs/git
move net-misc/neon net-libs/neon
move app-editors/gentoo-editor app-misc/editor-wrapper

View File

@ -42,7 +42,6 @@ MOUNT_POINTS=(
/sys /sys
) )
declare -A LIB_SYMS # list of /lib->lib64 symlinks
declare -A USR_SYMS # list of /foo->usr/foo symlinks declare -A USR_SYMS # list of /foo->usr/foo symlinks
declare -a BASE_DIRS # list of absolute paths that should be directories declare -a BASE_DIRS # list of absolute paths that should be directories
@ -57,24 +56,16 @@ check_sym() {
} }
pkg_setup() { pkg_setup() {
local libdirs=$(get_all_libdirs) def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI) local libdirs=$(get_all_libdirs)
if [[ -z "${libdirs}" || -z "${def_libdir}" ]]; then if [[ -z "${libdirs}" ]]; then
die "your DEFAULT_ABI=$DEFAULT_ABI appears to be invalid" die "your DEFAULT_ABI=$DEFAULT_ABI appears to be invalid"
fi fi
# figure out which paths should be symlinks and which should be directories # figure out which paths should be symlinks and which should be directories
local d local d
for d in bin sbin ${libdirs} ; do for d in bin sbin ${libdirs} ; do
if [[ "${SYMLINK_LIB}" == "yes" && "${d}" == "lib" ]] ; then
if use symlink-usr; then if use symlink-usr; then
USR_SYMS["/lib"]="usr/${def_libdir}"
else
LIB_SYMS["/lib"]="${def_libdir}"
fi
LIB_SYMS["/usr/lib"]="${def_libdir}"
LIB_SYMS["/usr/local/lib"]="${def_libdir}"
elif use symlink-usr; then
USR_SYMS["/$d"]="usr/$d" USR_SYMS["/$d"]="usr/$d"
BASE_DIRS+=( "/usr/$d" "/usr/local/$d" ) BASE_DIRS+=( "/usr/$d" "/usr/local/$d" )
else else
@ -84,9 +75,6 @@ pkg_setup() {
# make sure any pre-existing symlinks map to the expected locations. # make sure any pre-existing symlinks map to the expected locations.
local sym local sym
for sym in "${!LIB_SYMS[@]}" ; do
check_sym "${sym}" "${LIB_SYMS[$sym]}"
done
if use symlink-usr; then if use symlink-usr; then
for sym in "${!USR_SYMS[@]}" ; do for sym in "${!USR_SYMS[@]}" ; do
check_sym "${sym}" "${USR_SYMS[$sym]}" check_sym "${sym}" "${USR_SYMS[$sym]}"
@ -108,12 +96,7 @@ src_compile() {
} }
src_install() { src_install() {
# lib symlinks must be in place before make install
dodir "${BASE_DIRS[@]}" dodir "${BASE_DIRS[@]}"
local sym
for sym in "${!LIB_SYMS[@]}" ; do
dosym "${LIB_SYMS[$sym]}" "${sym}"
done
if use cros_host; then if use cros_host; then
# Since later systemd-tmpfiles --root is used only users from # Since later systemd-tmpfiles --root is used only users from
@ -221,10 +204,6 @@ pkg_postinst() {
for dir in "${BASE_DIRS[@]}"; do for dir in "${BASE_DIRS[@]}"; do
mkdir -p "${ROOT}/usr/lib/debug/${dir}" mkdir -p "${ROOT}/usr/lib/debug/${dir}"
done done
local sym
for sym in "${!LIB_SYMS[@]}" ; do
ln -sfT "${LIB_SYMS[$sym]}" "${ROOT}/usr/lib/debug/${sym}"
done
if use symlink-usr; then if use symlink-usr; then
for sym in "${!USR_SYMS[@]}" ; do for sym in "${!USR_SYMS[@]}" ; do
ln -sfT "${USR_SYMS[$sym]}" "${ROOT}/usr/lib/debug/${sym}" ln -sfT "${USR_SYMS[$sym]}" "${ROOT}/usr/lib/debug/${sym}"

View File

@ -19,10 +19,10 @@ LICENSE="BSD"
SLOT="0" SLOT="0"
IUSE="" IUSE=""
RDEPEND="!coreos-base/vboot_reference RDEPEND="
!sys-apps/rootdev
sys-apps/util-linux sys-apps/util-linux
sys-fs/e2fsprogs" sys-fs/e2fsprogs
"
DEPEND="${RDEPEND}" DEPEND="${RDEPEND}"
src_prepare() { src_prepare() {