aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* emerge: Default enable soname dependencies (bug 687956)HEADmasterZac Medico3 days2-4/+5
| | | | | | | | | | | Default emerge --ignore-soname-deps=n, in order to enable soname dependencies by default. As always, soname dependencies remain inapplicable in the absence of the --usepkgonly option (or --getbinpkgonly). Therefore, this change only affects commands that specify --usepkgonly or --getbinpkgonly. Bug: https://bugs.gentoo.org/687956 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* dbapi: fix logic in bintree.binarytree._parse_build_id()Mike Gilbert5 days1-5/+4
| | | | | | | Resolves an error when improperly named xpak files exist in PKGDIR. Bug: https://bugs.gentoo.org/818886 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* portage/util/_dyn_libs/dyn_libs.py: fix symlink recursion issueMike Gilbert8 days1-3/+10
| | | | | | | | | | | | Python's glob.glob() function follows symlinks recursively. Use os.walk() instead. Also re-order the operands to short-circuit the directory walk when PROVIDES is not empty. Bug: https://bugs.gentoo.org/826982 Fixes: cba2156dba89a22f2858238013469b4d80208854 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* eapply_user(): Add message about applying user patches and minor decoration.Arfrever Frehtes Taifersar Arahesis12 days1-1/+13
| | | | | | Bug: https://bugs.gentoo.org/825066 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Exclude binary pkg installation for live ebuildsMadhu Priya Murugan12 days3-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | This commit introduces a new option "--usepkg-exclude-live" for emerge. Passing this option with the emerge call, will disable binary pkgs from being installed for live ebuilds. So it is no longer necessary to pass a list of live packages to --usepkg-exclude. Before this commit, when an emerge is called with the option '--usepkg', the corresponding package is installed from the binary cache under /var/cache/binpkgs. With this commit, even if we explicitly use the options, '--usepkg' for the packages with live ebuilds, no binary package will not be installed for live ebuilds (given we disable it calling emerge with "--usepkg-exclude-live" in the emerge). Motivation: We no longer need to maintain a separate list for VCS based pkgs (eg., git pkgs), from being installed from the binary cache, and then pass it to --usepkg-exclude. This reduces some redundancy. Closes: https://github.com/gentoo/portage/pull/769 Signed-off-by: Madhu Priya Murugan <madhu.murugan@rohde-schwarz.com> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Exclude binary cache build for live ebuildsMadhu Priya Murugan12 days4-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces a new value "buildpkg-live" for FEATURES, which is enabled by default (so the default behavior of building binary cache for all packages is retained). When it is disabled by calling emerge with FEATURES="-buildpkg-live", binary caches will not be built live ebuilds even if we specify --buildpkg. So that it is no longer necessary to pass a list of packages with live ebuilds to --buildpkg-exclude. Before this commit, when an emerge is called with the option '--buildpkg', a binary cache for the package is created under /var/cache/binpkgs. For example, when we do a, 'emerge --ask --verbose --buildpkg some-gitpkg/abc', a binary cache abc-1.1.1.tbz2 is created under /var/cache/binpkgs/some-gitpkg. With this commit, even if we explicitly use the options, '--buildpkg' for the packages with live ebuilds, no binary cache will be created (given we disable it calling emerge with FEATURES="-buildpkg-live"). Motivation: Since binary caches are created for all packages, including packages with live ebuilds, a separate list of (for eg.,) git packages needs to be maintained. And this is then passed to the options '--buildpkg-exclude' via, EMERGE_DEFAULT_OPTS. So the motivation behind this patch was to reduce redundancy, while we can simply disable binary cache for live ebuilds with this option. Closes: https://github.com/gentoo/portage/pull/766 Signed-off-by: Madhu Priya Murugan <madhu.murugan@rohde-schwarz.com> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* estrip: fix lockfile handlingMike Gilbert12 days1-8/+7
| | | | | | | | | | | | | The previous code would wait for the first link to an inode to be processed, and would then allow multiple processes to process duplicate links to the same inode. This behavior leads to a race condition in save_elf_debug. The new code ensures that each inode is accessed by a single process at a time. Closes: https://bugs.gentoo.org/823798 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* estrip: add death messages and debug prints in save_elf_debugMike Gilbert12 days1-6/+9
| | | | | Bug: https://bugs.gentoo.org/823798 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* Move debug-print to isolated-functions.shMike Gilbert12 days2-39/+39
| | | | | | This allows it to be called from various helpers. Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* Add make.conf.example for riscvMarek Szuba2021-11-161-0/+61
| | | | | Bug: https://bugs.gentoo.org/812434 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* package.ebuild.doebuild: ignore setuptools install deprecationMichał Górny2021-11-151-1/+4
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* EbuildIpcDaemon: fix lock permission raceZac Medico2021-11-107-11/+21
| | | | | | | | | | | Move ipc files to a .ipc subdirectory, with a setgid bit to prevent a lockfile group permission race. The lockfile function uses an appropriate open call with mode argument so that the lockfile is created atomically with both group ownership and group write bit. Bug: https://bugs.gentoo.org/468990 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* setup.py: fix black formattingZac Medico2021-11-081-1/+5
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Install example repo.postsync.d script into sharedirDaniel Cordero2021-11-081-2/+2
| | | | | | | | | | | | The sysconfdir is for host specific configuration files, and this example script makes no host specific change (it is not enabled by default). Install the script under portage's sharedir, from where administrators can copy it into sysconfdir, if needed. Signed-off-by: Daniel Cordero <gentoo.portage@0xdc.io> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* fetch: enable resume for digestgen caseZac Medico2021-11-041-3/+4
| | | | | | | | | | | | Enable resume for the digestgen case (no digests available), when the temporary file exceeds PORTAGE_FETCH_RESUME_MIN_SIZE. This fixes a case which caused the ebuild digest command to skip the download and fail with a message like this: !!! File b'/var/cache/distfiles/foo.tar.xz' doesn't exist, can't update Manifest Bug: https://bugs.gentoo.org/821571 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* estrip: skip build-id link creation if we fail to create a debug fileMike Gilbert2021-10-311-14/+15
| | | | Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* estrip: rework hard link logic in save_elf_debugMike Gilbert2021-10-311-21/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GDB loads debug files based on the file name given in the .gnu_debuglink section, prepended with /usr/lib/debug/${dirname}, where dirname is the absolute path to the parent directory of the binary being executed. For each unique inode as input, we need a link to the debug file with the GNU debuglink as its basename. A link to the debug file should exist for each directory in which the input inode exists. The debug link names should be based on the .gnu_debuglink value instead of the name of the file we are processing as input. The .gnu_debuglink value is based on the name of the first link processed for each inode. We save this value as a symlink, and then read it back as we process subsequent links. For example, given the following input: INODE PATH 1 /usr/bin/git 1 /usr/libexec/git-core/git-add 2 /usr/bin/git-shell 2 /usr/libexec/git-core/git-shell We generate the following inodes for the debug files: INODE DEBUGLINK 3 git.debug 4 git-shell.debug We should generate the following links: INODE PATH 3 /usr/lib/debug/usr/bin/git.debug 3 /usr/lib/debug/usr/libexec/git-core/git.debug 4 /usr/bin/debug/usr/bin/git-shell.debug 4 /usr/bin/debug/usr/libexec/git-core/git-shell.debug The previous code would have generated this broken output: INODE PATH 3 /usr/lib/debug/usr/bin/git.debug 3 /usr/lib/debug/usr/libexec/git-core/git-add.debug (*) 4 /usr/bin/debug/usr/bin/git-shell.debug 4 /usr/bin/debug/usr/libexec/git-core/git-shell.debug (*) This link has the wrong name. Bug: https://bugs.gentoo.org/820107 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* .github: test against Python 3.10 finalSam James2021-10-281-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* lib/portage/package/ebuild/doebuild.py: drop unused importSam James2021-10-281-1/+0
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* lib/portage/util/_dyn_libs/dyn_libs.py: drop unused importSam James2021-10-281-2/+0
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* Binpkg.py: check for inconsistent PROVIDES/image when unpacking binpkgSam James2021-10-281-1/+14
| | | | | | | | | | | | | This is part of a series of fixes for the linked bug (failure to preserve libraries in some situations). When unpacking a binpkg to be installed, we should check for the existence of PROVIDES if we're installing any dynamic libraries. If PROVIDES does not exist in that case, this suggests that e.g. scanelf malfunctioned or some corruption occurred. Bug: https://bugs.gentoo.org/811462 Signed-off-by: Sam James <sam@gentoo.org>
* doebuild.py: check for inconsistent PROVIDES/image post-src_installSam James2021-10-281-1/+12
| | | | | | | | | | | | | This is part of a series of fixes for the linked bug (failure to preserve libraries in some situations). At the point of installation (even if not merging), we need to detect inconsistent metadata: PROVIDES should be populated if we're installing any dynamic libraries. This suggests that e.g. scanelf malfunctioned or some corruption occurred. Bug: https://bugs.gentoo.org/811462 Signed-off-by: Sam James <sam@gentoo.org>
* portage/util/_dyn_libs/dyn_libs.py: add helperSam James2021-10-281-0/+23
| | | | | | | Needed for binpkg/image verification commits coming... Bug: https://bugs.gentoo.org/811462 Signed-off-by: Sam James <sam@gentoo.org>
* lib/_emerge/actions.py: warn on missing /runSam James2021-10-281-12/+21
| | | | | | | | | | | | | | | | | | | Newer versions of build-docbook-catalog use /run/lock. This exposed that we weren't asking users to mount /run in the handbook. Check if it exists and warn if it doesn't. This should primarily (exclusively?) be a problem in chroots given an init system should be creating this. Bug: https://bugs.gentoo.org/816303 Closes: https://github.com/gentoo/portage/pull/762 Reviewed-by: Alec Warner <antarus@gentoo.org> Reviewed-by: Mike Gilbert <floppym@gentoo.org> Thanks-to: Duncan Signed-off-by: Sam James <sam@gentoo.org>
* bin/estrip: don't mention rpm anymore in splitdebug errorSam James2021-10-201-1/+1
| | | | | Closes: https://bugs.gentoo.org/818967 Signed-off-by: Sam James <sam@gentoo.org>
* Prepare for 3.0.28 releaseportage-3.0.28Michał Górny2021-10-052-1/+5
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* Revert "Copy files/* into the work tree instead of symlinking it"Michał Górny2021-10-052-25/+12
| | | | | | Revert the series of FILESDIR changes that keep causing new regressions. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* Prepare for 3.0.27 releaseportage-3.0.27Michał Górny2021-10-053-1/+11
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* Use distinct colors for output msg typesMichał Górny2021-10-045-28/+81
| | | | | | | | Introduce distinct colors per output function. For elog and eerror the colors remain the same but the names change. For einfo and eqawarn, use darker colors to distinguish them. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* Prefix color vars with "PORTAGE_COLOR_"Michał Górny2021-10-044-32/+34
| | | | | | | | | | | | Rename color variables used by einfo etc. to use "PORTAGE_COLOR_" prefix. Currently these variables are prone to being accidentally ovewritten e.g. if an ebuild uses GOOD or BAD variables for some purpose. Using PORTAGE prefix should keep us safe. As an extra benefit, this makes it trivial to grep for all uses of color variables. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* lib/_emerge/resolver/output_helpers.py: explicitly state 'all satisfied'Sam James2021-10-041-0/+2
| | | | | | | | | | This makes things a bit less confusing and tries to avoid users focusing on (soft) blocks which aren't actually the problem they're hitting. Signed-off-by: Sam James <sam@gentoo.org> Closes: https://github.com/gentoo/portage/pull/760 Signed-off-by: Sam James <sam@gentoo.org>
* lib/_emerge/resolver/output.py: say 'soft blocking' explicitlySam James2021-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | Before: ``` [blocks b ] >perl-core/Scalar-List-Utils-1.550.0-r999 (">perl-core/Scalar-List-Utils-1.550.0-r999" is blocking virtual/perl-Scalar-List-Utils-1.550.0) ``` After: ``` [blocks b ] >perl-core/Scalar-List-Utils-1.550.0-r999 (">perl-core/Scalar-List-Utils-1.550.0-r999" is soft blocking virtual/perl-Scalar-List-Utils-1.550.0) ``` This should make it a little bit clearer when a block matters, especially given we already explicitly say 'hard blocking' for the opposite case. Signed-off-by: Sam James <sam@gentoo.org>
* prepare_build_dirs: handle copytree FileExistsErrorZac Medico2021-10-031-1/+9
| | | | | | Bug: https://bugs.gentoo.org/815871 Reviewed-by: Michał Górny <mgorny@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Prepare for 3.0.26 releaseportage-3.0.26Michał Górny2021-09-293-3/+7
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* Attempt to fix creating FILESDIR properlyMichał Górny2021-09-281-1/+0
| | | | | | | | Since we perform a mode fixup on FILESDIR anyway, just let copytree() create it. This should finally fix all the problems: have the directory created without errors and work with Python < 3.8. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* Revert "prepare_build_dirs: Fix copytree() on Python 3.7"Michał Górny2021-09-281-1/+1
| | | | | | | This is (obviously) the wrong fix, resulting in empty FILESDIR. Reverts: 4c2d9475fe14a8947f4f552a1be0b101bb1eef96 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* Prepare for 3.0.25 releaseportage-3.0.25Michał Górny2021-09-283-1/+12
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* prepare_build_dirs: apply permissions to filesdirZac Medico2021-09-281-2/+9
| | | | | | | Bug: https://bugs.gentoo.org/815196 Reviewed-by: Michał Górny <mgorny@gentoo.org> Reviewed-by: Sam James <sam@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
* prepare_build_dirs: Fix copytree() on Python 3.7Michał Górny2021-09-271-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eend: Output QA notice when called without argumentUlrich Müller2021-09-271-0/+1
| | | | | | | | PMS says about eend: "Takes one fixed argument, which is a numeric return code, and an optional message in all subsequent arguments." Bug: https://bugs.gentoo.org/703520 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Prepare for 3.0.24 releaseportage-3.0.24Michał Górny2021-09-273-1/+17
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* Copy files/* into the work tree instead of symlinking itMichał Górny2021-09-262-11/+10
| | | | | | | | | | | | | | | | | | | | Symlinking FILESDIR into the work tree has the unintended consequence of preserving all original file metadata, including system-specific ACLs and so on. When these files are installed, this could lead to unintentionally copying this metadata to the system and/or binary packages. Let's copy all files instead and drop metadata in the process. Since FILESDIR is expected to be small by design, this shouldn't cause any major trouble. It is also easier and less likely to cause regressions than making sure stuff is not preserved when installing. Unfortunately, a similar problem applies to DISTDIR. However, installing files from DISTDIR is rarer than from FILESDIR, so I guess we'll cross that bridge when we get to it. Bug: https://bugs.gentoo.org/814857 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* bin/misc-function.sh: check scanelf return codeSam James2021-09-211-14/+50
| | | | | | | | | | | | | | | | | | | | | This is part of a series of fixes for the linked bug (failure to preserve libraries in some situations). We need to check if scanelf failed when calling it in the installed-files QA check as we later use it to populate the VDB. Silently continuing results in either blank e.g. PROVIDES, NEEDED{,.ELF.2} or those files may be missing entirely, resulting in a corrupt state both on the system and in any generated binpkgs. Adds an escape variable (PORTAGE_NO_SCANELF_CHECK) to allow re-emerging pax-utils if it's broken. Bug: https://bugs.gentoo.org/811462 See: https://github.com/gentoo/portage/pull/744 Closes: https://github.com/gentoo/portage/pull/750 Signed-off-by: Sam James <sam@gentoo.org>
* vardbapi: convert compat coroutine to asyncZac Medico2021-09-201-9/+6
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* portdbapi: convert compat coroutine to asyncZac Medico2021-09-201-6/+4
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* bindbapi: convert compat coroutine to asyncZac Medico2021-09-201-9/+6
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* SpawnProcess: convert compat coroutine to asyncZac Medico2021-09-201-6/+4
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* SequentialTaskQueue: convert compat coroutine to asyncZac Medico2021-09-201-6/+4
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Binpkg: convert compat coroutine to asyncZac Medico2021-09-202-7/+7
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* ForkProcess: convert compat coroutine to asyncZac Medico2021-09-201-6/+4
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>