diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/stage1_hooks/0000-bump-baselayout-coreos-overlay.sh b/sdk_container/src/third_party/coreos-overlay/coreos/stage1_hooks/0000-bump-baselayout-coreos-overlay.sh new file mode 100755 index 0000000000..e294393eb8 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/stage1_hooks/0000-bump-baselayout-coreos-overlay.sh @@ -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" diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/stage1_hooks/0001-update-profile-coreos-overlay.sh b/sdk_container/src/third_party/coreos-overlay/coreos/stage1_hooks/0001-update-profile-coreos-overlay.sh new file mode 100755 index 0000000000..e9a01036ae --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/stage1_hooks/0001-update-profile-coreos-overlay.sh @@ -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 diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/stage1_hooks/README.md b/sdk_container/src/third_party/coreos-overlay/coreos/stage1_hooks/README.md new file mode 100644 index 0000000000..5db213fca4 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/stage1_hooks/README.md @@ -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`. diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/categories b/sdk_container/src/third_party/coreos-overlay/profiles/categories index 55f2602a34..8afb9b905b 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/categories +++ b/sdk_container/src/third_party/coreos-overlay/profiles/categories @@ -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-vim -app-xemacs -chromeos-base coreos-base 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 diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/amd64/parent b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/amd64/parent index 9ffcce309e..b15d5c1cf9 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/amd64/parent +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/amd64/parent @@ -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 diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults index b73c719c5c..3607cd55bc 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults @@ -53,10 +53,13 @@ POLICY_TYPES="targeted mcs mls" ACCEPT_RESTRICT="* -bindist" USE="${USE} bindist" -# Default licenses that are accepted for ChromiumOS builds. -# If you want to accept more, use the --accept_licenses flag -# when running setup_board. -ACCEPT_LICENSE="* -@EULA -@CHROMEOS" +# Additional licenses accepted for Flatcar builds. +# +# netperf - license for net-analyzer/netperf +# 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 GENTOO_MIRRORS=" diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults index e8ff6e411f..ba2236b709 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults @@ -107,6 +107,3 @@ ACCT_USER_SYSTEMD_RESOLVE_ID=245 # tss seems to be one of those users with a mismatching UID/GID ACCT_GROUP_TSS_ID=252 ACCT_USER_TSS_ID=236 - -# Disable creation of /usr/lib as symlink -SYMLINK_LIB="no" diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/default/linux/amd64/10.0/coreos/parent b/sdk_container/src/third_party/coreos-overlay/profiles/default/linux/amd64/10.0/coreos/parent deleted file mode 100644 index 2dd510360b..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/profiles/default/linux/amd64/10.0/coreos/parent +++ /dev/null @@ -1 +0,0 @@ -coreos:coreos/amd64/generic diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/default/linux/amd64/10.0/parent b/sdk_container/src/third_party/coreos-overlay/profiles/default/linux/amd64/10.0/parent deleted file mode 100644 index 5449615cdd..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/profiles/default/linux/amd64/10.0/parent +++ /dev/null @@ -1 +0,0 @@ -coreos:coreos/amd64/sdk diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/features/kernel-next/package.use b/sdk_container/src/third_party/coreos-overlay/profiles/features/kernel-next/package.use deleted file mode 100644 index c7426aafe9..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/profiles/features/kernel-next/package.use +++ /dev/null @@ -1,2 +0,0 @@ -virtual/linux-sources kernel_next -virtual/perf kernel_next diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/license_groups b/sdk_container/src/third_party/coreos-overlay/profiles/license_groups deleted file mode 100644 index 21c23a8b89..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/profiles/license_groups +++ /dev/null @@ -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 diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/profiles.desc b/sdk_container/src/third_party/coreos-overlay/profiles/profiles.desc index 1ef2a7e05b..10c522161f 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/profiles.desc +++ b/sdk_container/src/third_party/coreos-overlay/profiles/profiles.desc @@ -2,8 +2,6 @@ amd64 coreos/amd64/generic dev amd64 coreos/amd64/generic/dev dev amd64 coreos/amd64/generic/prod 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 dev diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/updates/1Q-2012 b/sdk_container/src/third_party/coreos-overlay/profiles/updates/1Q-2012 deleted file mode 100644 index d2c877d9ab..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/profiles/updates/1Q-2012 +++ /dev/null @@ -1,3 +0,0 @@ -move virtual/kernel virtual/linux-sources -slotmove =media-libs/jpeg-6b-r9 62 0 -slotmove lib64 symlinks declare -A USR_SYMS # list of /foo->usr/foo symlinks declare -a BASE_DIRS # list of absolute paths that should be directories @@ -57,24 +56,16 @@ check_sym() { } 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" fi # figure out which paths should be symlinks and which should be directories local d for d in bin sbin ${libdirs} ; do - if [[ "${SYMLINK_LIB}" == "yes" && "${d}" == "lib" ]] ; 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 + if use symlink-usr; then USR_SYMS["/$d"]="usr/$d" BASE_DIRS+=( "/usr/$d" "/usr/local/$d" ) else @@ -84,9 +75,6 @@ pkg_setup() { # make sure any pre-existing symlinks map to the expected locations. local sym - for sym in "${!LIB_SYMS[@]}" ; do - check_sym "${sym}" "${LIB_SYMS[$sym]}" - done if use symlink-usr; then for sym in "${!USR_SYMS[@]}" ; do check_sym "${sym}" "${USR_SYMS[$sym]}" @@ -108,12 +96,7 @@ src_compile() { } src_install() { - # lib symlinks must be in place before make install dodir "${BASE_DIRS[@]}" - local sym - for sym in "${!LIB_SYMS[@]}" ; do - dosym "${LIB_SYMS[$sym]}" "${sym}" - done if use cros_host; then # Since later systemd-tmpfiles --root is used only users from @@ -221,10 +204,6 @@ pkg_postinst() { for dir in "${BASE_DIRS[@]}"; do mkdir -p "${ROOT}/usr/lib/debug/${dir}" 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 for sym in "${!USR_SYMS[@]}" ; do ln -sfT "${USR_SYMS[$sym]}" "${ROOT}/usr/lib/debug/${sym}" diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/seismograph/seismograph-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/seismograph/seismograph-9999.ebuild index dae18e813d..9ee7de91bf 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/seismograph/seismograph-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/seismograph/seismograph-9999.ebuild @@ -19,10 +19,10 @@ LICENSE="BSD" SLOT="0" IUSE="" -RDEPEND="!coreos-base/vboot_reference - !sys-apps/rootdev +RDEPEND=" sys-apps/util-linux - sys-fs/e2fsprogs" + sys-fs/e2fsprogs +" DEPEND="${RDEPEND}" src_prepare() {