Commit Graph

85 Commits

Author SHA1 Message Date
David Michael
449066f395 update_chroot: Drop old workarounds for package renames 2019-01-19 23:17:10 +00:00
David Michael
fceffdb660 update_chroot: Work around dead cargo file conflicts 2018-11-14 21:09:52 +00:00
David Michael
ba7d7f1410 update_chroot: Add a workaround for a package rename
This avoids SDK update failures due to conflicts.  It can be
reverted once SDKs have the new version built into them.
2018-10-25 20:22:35 +00:00
Andrew Jeddeloh
a27b02bcb6 *: use cros_workon not cros_list_modified_pkgs
This removes a dependency on chromite
2018-05-30 13:07:58 -07:00
David Michael
d2f2e11225 update_chroot: Allow upgrading glibc 2018-04-06 18:30:38 -04:00
David Michael
2880de9a89 update_chroot: Drop obsolete GCC versions, older than 7.3.0 2018-02-08 20:45:57 -05:00
David Michael
ac8402c1aa update_chroot: Allow upgrading binutils and GCC
Normally toolchains packages are prevented from upgrading.  This
drops that restriction and explicitly removes old versions so that
conflicting tool profiles are not accidentally used.

This reverts commit 20975049b3.
2018-01-04 14:27:47 -05:00
David Michael
20975049b3 Revert "update_chroot: Avoid a portage crash while upgrading binutils"
The binutils update prevents Linux from uncompressing during boot,
so this is being put off until it's fixed.

This reverts commit 5e659964d0.
2017-10-19 08:43:41 -07:00
David Michael
5e659964d0 update_chroot: Avoid a portage crash while upgrading binutils
This omits the toolchain packages' version-pinning flag for the
binutils package while it is being upgraded.  It also removes older
versions installed in parallel that cause unwanted rebuilds.

When stable has the upgraded version, this can be reverted.
2017-09-29 14:10:58 -07:00
Euan Kemp
62bff69a19 update_chroot: set a more permissive ccache umask
This seems to fix the ccache permission issues `update_chroot` hits
while building ninja.

The erroneous files were created as root:portage, so a umask of 002
should let other portage group members share them, which seems entirely
reasonable.
2017-09-07 11:56:51 -07:00
David Michael
3c24b28e35 Revert "update_chroot: fix SDK updates during the Perl 5.24 upgrade"
This reverts commit 6508cf3faa.

All update channels are now using Perl 5.24, so workarounds are no
longer required.
2017-08-14 14:07:28 -07:00
David Michael
6508cf3faa update_chroot: fix SDK updates during the Perl 5.24 upgrade 2017-06-14 16:28:55 -07:00
David Michael
59643849ad Revert "update_chroot: fix SDK updates during the Perl 5.22 upgrade"
This reverts commit 09efc42e8f.
2017-06-14 13:04:51 -07:00
David Michael
09efc42e8f update_chroot: fix SDK updates during the Perl 5.22 upgrade 2017-03-21 18:52:05 -07:00
David Michael
28f5d7f276 update_chroot: store emerge flags in arrays 2017-03-21 18:36:43 -07:00
Michael Marineau
8eceddd54f Revert "*: drop obsolete gentoo repo reference" 2016-05-24 14:20:43 -07:00
Michael Marineau
44e86ecdaa update_chroot: do not reconfigure/rebuild the SDK's GRUB for arm64
Now built/installed under the board root instead.
See https://github.com/coreos/coreos-overlay/pull/1950
2016-05-10 12:02:56 -07:00
Michael Marineau
632d578b56 *: drop obsolete gentoo repo reference
Instead of patching portage to support the `disabled` flag now we just
patch it to leave the `[gentoo]` section out of the default repos.conf.

Follow up to 585275b268
2016-05-08 19:31:02 -07:00
Michael Marineau
7979650cde setup_board: move arm64 grub recompile to update_chroot 2016-02-19 13:21:16 -08:00
Michael Marineau
5ba4c7181d *: drop usage of COREOS_VERSION_STRING
This variable was semi-deprecated ages ago so `version.txt` could follow
a similar variable naming pattern to `os-release`. Finally drop usage of
it here in favor of `$COREOS_VERSION`.
2016-02-15 13:55:55 -08:00
Michael Marineau
9b00ea5495 *: disable reinstalling rebuilt binaries with --usepkgonly
When --usepkgonly is mixed with the right update flags it will
re-install any binary packages that have a newer build. Since the full
set of SDK and board packages are rebuilt quite often this leads to
excessive reinstalling.
2016-02-04 11:50:36 -08:00
Michael Marineau
d327840ce8 *: add --usepkgonly flag to avoid building from source 2016-02-03 18:29:16 -08:00
Michael Marineau
a3fceb1957 update_chroot: cleanup flags, include all in usage 2016-02-03 18:29:16 -08:00
Michael Marineau
f5970d877c build_packages: reduce the noise that --depclean generates 2015-08-04 14:46:09 -07:00
Michael Marineau
e881b270db update_chroot/build_packages: remove obsolete packages
Before attempting to do @preserved-rebuild to fix linked against old
libraries remove any packages that no longer have corresponding ebuilds,
making them impossible to rebuild. This uses `--depclean`'s secondary
meaning: `--unmerge` but only remove packages without dependencies.
2015-07-24 14:38:09 -07:00
Michael Marineau
9d4d888429 update_chroot/build_packages: trigger @preserved-rebuild
Rebuilds packages that are linked against old libraries that have been
upgraded or removed from the system. Skipping this can lead to shared
library checks looking ok in the build root but then built images have
broken library dependencies.
2015-07-12 15:48:21 -07:00
Michael Marineau
1fa7ef236b update_chroot: remove dependency on complex 'chromeos-cache' links
The distfiles cache is always under .cache in the repo tree but there is
a lot of extra logic to make that configurable along with compatibility
symlinks for previous locations. Just yank it all out.
2015-07-05 17:54:00 -07:00
Michael Marineau
174a847e36 update_chroot: remove dependence on /usr/local/portage/* symlinks
A step in reducing the amount of initialization code required: drop
needless symlinks under /usr/local/portage to the portage trees. Just
configure portage to point directly at the source instead. Only crossdev
remains in that location because it is a locally managed overlay.
2015-07-05 16:57:05 -07:00
Michael Marineau
629021b6de update_chroot: fail if --toolchain_boards= was given invalid names 2015-04-08 17:11:12 -07:00
Michael Marineau
6e6a0a4967 toolchain_util: include repos.conf in bootstrap build environments
This is required for the eventual removal of `$PORTDIR` and
`$PORTDIR_OVERLAY` and ensures toolchain rebuilds/updates with
`./build_packages --nousepkg` don't erroniously try to use ebuilds from
`/usr/portage` inside of the SDK.

In order to fix up the build_toolchains script the crossdev overlay
needs to be setup properly, previously only setup_board did it.

Overall silences a lot of warnings and fixes an issue with crossdev:

    /usr/bin/emerge-wrapper: line 48: /eclass/toolchain-funcs.eclass: No such file or directory
    /usr/bin/emerge-wrapper: line 49: tc-arch: command not found
2015-04-01 16:30:37 -07:00
techdragon
d3f29195b6 Repo Dir Auto-Symlinking
- Automatically symlink any provided portage repo configurations into
  the appropriate destination directory from "config/portage/repos".
2015-02-24 23:54:43 +08:00
Michael Marineau
1de8eb3b11 toolchain: always switch to latest GCC version
Normally Gentoo expects moving between major GCC releases to be a manual
step. In our case we want this to always be automatic, otherwise the GCC
version won't be switched at all.
2014-08-26 16:31:46 -07:00
Michael Marineau
2991ad8cd8 chroot: remove git from $PS1
This feature is disabled for now. See c8a62a12 for details.
2014-08-18 16:40:34 -07:00
Michael Marineau
4d3c198161 tools: remove support for parallel_emerge
Using parallel_emerge has been disabled by default for all commands
except build_image for quite a while now, build_image kept it just
because it was still a bit faster than normal emerge. Keeping
parallel_emerge complicates future changes to build_image so it needs to
drop it entirely. Since that means nothing uses it by default we might
as well just rip out support for it entirely.
2014-07-19 16:38:17 -07:00
Michael Marineau
7f599ac764 fix(update_chroot): Remove old make.conf symlinks
The old static files are pretty much empty and unused now.
2014-06-12 16:57:54 -07:00
Michael Marineau
68a8a67081 fix(update_chroot): Consolidate more portage configuration
To behave more like setup_board/build_packages update_chroot should
fully configure portage to make sure everything is accurate.

Now binhosts are defined in make.conf.host_setup so the static config in
coreos-overlays doesn't need to refer to version.txt. setup_board
already made this change in 7a43a07f.

Define path locations to reduce dependency between static configs in
coreos-overlays and the behavior of the scripts repo. Spreading
configuration across two repos makes everything harder to understand.
Eventually everything should either be defined in profiles in
coreos-overlays or minimal auto-generated config files here in scripts.
2014-05-14 19:15:30 -07:00
Michael Marineau
57d19d0f06 refactor(update_chroot): Write make.conf.host_setup
There is no need for this to be in sdk_lib any more, remove what little
remains of make_conf_util.sh.
2014-05-14 18:51:58 -07:00
Alex Crawford
8c3ad86ae3 fix(make_chroot): Add new repos.conf and crossdev metadata
The latest release of portage uses repos.conf, so generate that
file when making the chroot. The crossdev overlay also needed
repo_name and layout.conf files.
2014-04-14 19:02:04 -07:00
Michael Marineau
8244c7a260 cleanup(set_lsb_release): Rework release config setup
- Remove custom COREOS_* attributes from /etc/lsb-release
- Move dev image logic to dev_image_util
  For extra fun fix detection of local host URL for devserver.
- Remove weirdly verbose "DESCRIPTION" format.
- Add COREOS_RELEASE_BOARD back to /usr/share/coreos/release
  This is mostly just so update_engine and gmerge report the correct
  board name to devserver, informative-only on prod images.
- Remove version info from /etc/gentoo-release
- Switch from 'track' to 'group' terminology.
2014-03-19 15:56:21 -07:00
Michael Marineau
10025571d9 fix(common): Disable parallel_emerge by default for most commands.
I would like to phase out parallel_emerge so disable it for all commands
other than build_image which is the only one that shows a noticeable
benefit from it (~2 min with --fast, ~3 min with --nofast).
2014-02-17 12:42:22 -08:00
Michael Marineau
e6d348cbd1 fix(update_chroot): Install/update nss-usrfiles early
Soon nss-usrfiles will be required to resolve users and groups properly.
To avoid potentially breaking during the transition we need to make sure
the package is installed early during the chroot upgrade process.
2014-02-13 18:53:53 -08:00
Michael Marineau
6452857e82 fix(*): Change default for --jobs to $NUM_JOBS
This makes parallelism behavior between parallel_emerge and emerge
consistent. NUM_JOBS is defined as the number of CPUs by common.sh
2013-12-01 16:04:10 -08:00
Michael Marineau
c9c1efd276 fix(build_image): Add --fast to control use of parallel_emerge
This makes it possible to toggle parallel_emerge just as other scripts
do. In other scripts update the help string to be more specific, the
--jobs option can be used to control parallelism.
2013-12-01 16:04:10 -08:00
Michael Marineau
a70da914ba fix(toolchain_util.sh): Replace TOOLCHAIN_BINONLY with a function.
The new function supports generating arguments for cross toolchain
packages in addition to native ones.
2013-11-29 17:56:58 -08:00
Michael Marineau
1186334edf fix(update_chroot): Move to new toolchain_util.sh library
Switch from cros_setup_toolchains to the new simpler toolchain_util code
for installing toolchains in the SDK chroot.
2013-11-25 16:45:34 -08:00
Michael Marineau
29ccafbdba fix(sdk): Use coreos-devel/sdk-depends instead of hard-host-depends
coreos-devel/sdk-depends is a super-set of hard-host-depends and has a
somewhat better name.
2013-08-28 15:59:05 -07:00
Michael Marineau
5ac0bcdd27 fix(update_chroot): Generate make.conf.host_setup before update scripts.
This doesn't currently have any real impact but seems like a better
ordering since update scripts may need to emerge things.

Add some friendly version info logging.
2013-08-07 12:29:10 -04:00
Michael Marineau
28b2ffabec fix(update_chroot): Remove an old debug echo 2013-08-06 17:38:28 -04:00
Michael Marineau
74c4f21b68 fix(update_chroot): Replace old chroot version scheme.
The old chroot version system we inherited from Chromium OS always
assumes that a newly unpacked tarball is the latest and greatest but
since we version the SDK in the same way as target builds we can use
that version for these sorts of upgrade scripts and not make assumptions
about how late and great the starting tarball was.

The first upgrade script simply aborts to force the user to recreate
their chroot when moving from python 2.6 to 2.7.
2013-08-06 13:54:18 -04:00
Brandon Philips
95b2a4b8cd chore(*): use coreos_ everywhere 2013-07-21 23:20:50 -07:00