aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* binrepos.conf: Support custom download locationZac Medico2024-07-169-12/+106
| | | | | | | | | | | | | | | | | | | | | | | Download packages to a custom location if it is configured in binrepos.conf, instead of PKGDIR. If a custom download location is not configured then inject downloaded packages into PKGDIR as usual. The binarytree download_required method should now be used instead of the isremote method to check if download is required, since a remote package may or may not be cached in the custom location. The get_local_repo_location method should be used to check if there is a custom download location, and if there is then downloaded packages must not be injected into PKGDIR. If any packages from a repo with a custom download location were injected into PKGDIR in the past, their identity will be recognized and will not be re-downloaded to the custom location. Bug: https://bugs.gentoo.org/934784 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* config: Allow a repository to be configured using one of its aliasesJames Le Cuirot2024-07-102-4/+9
| | | | | | | | | | | | | | | | | | | Currently, the `[name]` in repos.conf can only match the primary name. This is inconvenient if a repository wants to change its name without breaking existing configurations. This raises the question of whether to then use the primary name or the alias in the UI and in the vardb. I went with the primary name because this is presumably the name that the repository actually wants you to use. If the configured name matches neither the primary name nor an alias, then emaint sync will simply claim that it is not found, but that behaviour is unchanged from before. Bug: https://bugs.gentoo.org/935830 Closes: https://github.com/gentoo/portage/pull/1358 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
* Allow GIL to be disabled in whirlpool C extensionZac Medico2024-06-281-17/+29
| | | | | | | | | | | | | | | In 3.13 python extensions need to declare support for GIL features, for example if they don't declare Py_MOD_GIL_NOT_USED then it will cause the GIL to be enabled even when python was launched in free-threaded mode. This requires "multi-phase initialization" because Py_mod_create is incompatible with m_slots. There's a PyUnstable_Module_SetGIL() function that can be used with single-phase init, but it's an unstable API, so it's better to use multi-phase init. There's no need to use PyModule_GetState() because the whirlpool module has no mutable state. Bug: https://bugs.gentoo.org/934220 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* vartree, movefile: Warn when rewriting a symlinkUlrich Müller2024-06-193-0/+17
| | | | | | | | | | See PMS section 13.4.1 (Rewriting): Any absolute symlink whose link starts with D must be rewritten with the leading D removed. The package manager should issue a notice when doing this. Bug: https://bugs.gentoo.org/934514 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* ebuild: fix typo in commentSam James2024-06-171-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* ebuild: fix maintainer mode checks to work with modern autotoolsEli Schwartz2024-06-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modern autotools does not use the --run argument to "missing", so the check essentially never ever ever ever fired anywhere. The GNU "missing" script is actually allowed to be run by any software at all, so checking for "missing --run" was always wrong. Indeed, there are some packages which use it for their own purposes and added suppressions for this FP. The correct solution really is to check for *maintainer mode* by checking whether *maintainer* programs are run (via "missing"). This also means we get to check for specific programs which autotools.eclass would be capable of handling, and don't need to arbitrarily exclude stuff like help2man (???) which makes things somewhat simpler. It should be noted that I have observed 3 scenarios for the missing script to be run via: - the missing script is surrounded by single quotes, followed by the unquoted command - the missing script is unquoted, and is followed by the unquoted command - legacy: the missing script is unquoted and is followed by --run We have to handle all three cases via a regex group. Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
* bin/ebuild.sh: disable globskipdots too in Bash 5.2Sam James2024-06-132-4/+10
| | | | | | | | | | | | See 69cac73ba0a7bcf2e2cff88c60d389895a550623. globskipdots is a new option in bash-5.2 that is also default-on in that release. The default value is not gated by BASH_COMPAT (see bug #907061), hence we need to disable it for older Bashes to avoid behaviour changes in ebuilds and eclasses. Bug: https://bugs.gentoo.org/907061 Signed-off-by: Sam James <sam@gentoo.org>
* emerge: Make --root-deps install build deps to ROOT plus / for all EAPIsJames Le Cuirot2024-06-114-22/+36
| | | | | | | | | | | Rather than instead of / for EAPI 6 and below. This changes the behaviour, but it is arguably not a breaking change, as no installations are being dropped. The previous behaviour was highly likely to break anyway. Bug: https://bugs.gentoo.org/435066 Closes: https://github.com/gentoo/portage/pull/1319 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
* tar_safe_extract: Use tarfile.fully_trusted_filterZac Medico2024-06-091-0/+9
| | | | | | | | | | | This suppresses a DeprecationWarning triggered because the tarfile.data_filter will become the new default in python3.14. The fully_trusted filter should be suitable here because tar_safe_extract already performs security validation on tar members prior to extraction. Bug: https://bugs.gentoo.org/933433 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* sync/zipfile: Install zipfile sync methodAlexey Gladkov2024-06-042-0/+9
| | | | | | | | | | Add files that were accidentally forgotten when adding zipfile sync method. Fixes: 80445d9b0 ("sync: Add method to download zip archives") Signed-off-by: Alexey Gladkov <legion@kernel.org> Closes: https://github.com/gentoo/portage/pull/1340 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* NEWS, meson.build: prepare for portage-3.0.65portage-3.0.65Sam James2024-06-042-2/+2
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* NEWS: prepare forSam James2024-06-041-1/+63
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* Add binpkgs info to mtimedb resume dataZac Medico2024-06-024-5/+66
| | | | | | | | | | | | | | | In order to fix emerge --resume and --keep-going to make appropriate binary package selections, store a list of binpkgs in the resume data. By adding the data as a new key which older versions of portage will ignore, the extension is backward compatible. Without this fix, emerge --resume and --keep-going make poor package selection choices which do not account for the --binpkg-respect-use option. Bug: https://bugs.gentoo.org/933442 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* tar_stream_writer: Add missing error attributeZac Medico2024-06-021-0/+1
| | | | | | | | | This attribute was previously initialized only in an exception handler. Fixes: b8c3f38ec5ee ("Add more error handling for binpkgs") Bug: https://bugs.gentoo.org/933385 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* MergeProcess: Pass bintree to subprocessZac Medico2024-06-011-2/+3
| | | | | | | | It's required for FEATURES=*-backup. Fixes: b9a85ff987ea ("MergeProcess: Support QueryCommand with spawn start method") Bug: https://bugs.gentoo.org/933297 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* eapi.sh: Drop ___eapi_has_dohtml_deprecated()Ulrich Müller2024-06-012-10/+2
| | | | | | | | | | This was added because of a council decision 10 years ago: https://projects.gentoo.org/council/meeting-logs/20140909-summary.txt It has outlived its usefulness since dohtml is banned in EAPI 7 and later. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* atomic_ofstream: fix follow_symlinks fallback and default file modeZac Medico2024-05-273-15/+116
| | | | | | | | | | | | | | | | Handle OSError from mkstemp for (default) follow_symlinks mode, not following the symlink if necessary (the target's parent may not exist or may be readonly). This restores the fallback behavior that existed before the introduction of mkstemp in commit de19f3a7215d. Handle missing _file and _tmp_name attributes during close. Also set the default file mode respecting umask if a previous file does not exist, which fixes the mode of CONTENTS files since mkstemp. Fixes: de19f3a7215d ("atomic_ofstream: Use mkstemp rather than getpid (pid namespace safety)") Signed-off-by: Zac Medico <zmedico@gentoo.org>
* atomic_ofstream: Use mkstemp rather than getpid (pid namespace safety)Zac Medico2024-05-271-19/+28
| | | | | Bug: https://bugs.gentoo.org/851015 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* binarytree: Rewrite remote index only on changeZac Medico2024-05-271-1/+3
| | | | | | | | I noticed that the remote index was rewritten with a new DOWNLOAD_TIMESTAMP even while frozen, and this patch fixed it. Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Scheduler: convert state_change to boolean in _schedule_tasks_imp()Florian Schmaus2024-05-271-5/+5
| | | | | | Signed-off-by: Florian Schmaus <flow@gentoo.org> Closes: https://github.com/gentoo/portage/pull/1324 Signed-off-by: Sam James <sam@gentoo.org>
* Scheduler: drop unreachable return statement in _schedule_tasks_imp()Florian Schmaus2024-05-271-2/+0
| | | | | Signed-off-by: Florian Schmaus <flow@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* Scheduler: coalesce common code in _schedule_tasks_imp()Florian Schmaus2024-05-271-10/+5
| | | | | Signed-off-by: Florian Schmaus <flow@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* sync: don't use ipv6 for rsync when it's disabledPavel Balaev2024-05-271-4/+3
| | | | | | | | | | | | | | | | | | | | socket.has_ipv6 gives a false result: $ sysctl net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.all.disable_ipv6 = 1 $ python Python 3.11.8 (main, Feb 24 2024, 17:10:38) [GCC 13.2.1 20240210] on linux >>> import socket >>> socket.has_ipv6 True This patch uses the portage.process.has_ipv6() function, which returns the correct result. Bug: https://bugs.gentoo.org/927241 Signed-off-by: Pavel Balaev <mail@void.so> Closes: https://github.com/gentoo/portage/pull/1309 Signed-off-by: Sam James <sam@gentoo.org>
* process: make has_ipv6 a public functionPavel Balaev2024-05-272-5/+5
| | | | | Signed-off-by: Pavel Balaev <mail@void.so> Signed-off-by: Sam James <sam@gentoo.org>
* emerge.1: Fix /var/log/emerge.log descriptionWaldo Lemmer2024-05-261-3/+3
| | | | | | | | | | | | | | /var/log/emerge.log doesn't "[contain] a log of all emerge output". This commit changes this description to better reflect what emerge.log contains: - Packages that were built - emerge's invocation (i.e. its command-line arguments) Signed-off-by: Waldo Lemmer <waldolemmer1@gmail.com> Closes: https://github.com/gentoo/portage/pull/1331 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* test_tar_merge_order.py: Fix unused pytest unused-importZac Medico2024-05-261-1/+0
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Revert "find_smallest_cycle: Optimize to traverse fewer nodes"Zac Medico2024-05-264-40/+9
| | | | | | | | | This reverts commit 49e01d041c74680a81860b819daff812d83df02f in order to fix bug 922629. Later we can try to optimize it again but without breaking testTarMergeOrder. Bug: https://bugs.gentoo.org/922629 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* tests: add testcase for app-arch/tar merge order with binpkgsSam James2024-05-262-0/+496
| | | | | | | | | | | | | | | | | | | | | | | | | In the bug, dilfridge reports releng@ is hitting the following: ``` $ emerge -epvk world | grep -E "(app-arch/tar|sys-apps/acl)" [ebuild N ] sys-apps/acl-2.3.2-r1::gentoo USE="nls -static-libs" 363 KiB [binary R ] app-arch/tar-1.35-1::gentoo USE="acl* nls* xattr* -minimal (-selinux) -verify-sig" 0 KiB [...] ``` Test for bug #922629 where binary app-arch/tar[acl] was merged before its dependency sys-apps/acl (with virtual/acl merged but unsatisfied). It (appears to be) a bad interaction with @system containing app-alternatives/tar plus a circular dependency on app-arch/tar. The USE change is also important, as e.g. dropping "sys-apps/attr nls" from package.use makes things okay. XFAIL'd for now. Bug: https://bugs.gentoo.org/922629 Signed-off-by: Sam James <sam@gentoo.org> Closes: https://github.com/gentoo/portage/pull/1332 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Fix a depgraph crash with useoldpkg and subslot bumpsTatsuyuki Ishi2024-05-261-0/+1
| | | | | | | | | | | | | | | | | This resolves a "list index out of range" error that could happen with when a package's subslot is bumped and --useoldpkg is used. Due to the subslot bump, the code will filter matched_packages to only contain the latest version. However, this didn't update matched_oldpkg, which would now contain stale packages and cause logic errors. Fix this by filtering matched_oldpkg again before its use. Signed-off-by: Tatsuyuki Ishi <ishitatsuyuki@google.com> Bug: https://bugs.gentoo.org/932804 Closes: https://github.com/gentoo/portage/pull/1322 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* bintree: Add REPO_REVISIONS to package index headerZac Medico2024-05-252-14/+124
| | | | | | | | | | | | | As a means for binhost clients to select source repo revisions which are consistent with binhosts, inject REPO_REVISIONS from a package into the index header, using a history of synced revisions to guarantee forward progress. This queries the relevant repos to check if any new revisions have appeared in the absence of a proper sync operation. Bug: https://bugs.gentoo.org/924772 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Add get_repo_revision_history function and repo_revisions fileZac Medico2024-05-2512-7/+387
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The history of synced revisions is provided by a new get_repo_revision_history function and corresponding /var/lib/portage/repo_revisions file, with history limit currently capped at 25 revisions. If a change is detected and the current process has permission to update the repo_revisions file, then the file will be updated with any newly detected revisions. For volatile repos the revisions may be unordered, which makes them unusable for the purposes of the revision history, so the revisions of volatile repos are not tracked. This functions detects revisions which are not yet visible to the current process due to the sync-rcu option. The emaint revisions --purgerepos and --purgeallrepos options allow revisions for some or all repos to be easily purged from the history. For example, the emerge-webrsync script uses this emaint commmand to purge the revision history of the gentoo repo when the emerge-webrsync --revert option is used to roll back to a previous snapshot: emaint revisions --purgerepos="${repo_name}" Bug: https://bugs.gentoo.org/924772 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* binrepos.conf: Support "frozen" attributeZac Medico2024-05-253-4/+19
| | | | | | | | | | | | | | | | In order to allow consistent and reproducible dependency calculations during mixed source and binary updates, add a "frozen" binrepos.conf attribute which will freeze binrepo index updates and cause messsages to indicate that the repo is frozen rather than up-to-date: Local copy of remote index is frozen and will be used. This should only be set temporarily in order to guarantee consistent and reproducible dependency calculations for mixed binary and source updates. Bug: https://bugs.gentoo.org/932739 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* install-qa-checks.d: suppress some gnulib implicit decls on muslEli Schwartz2024-05-221-0/+12
| | | | | | | | | | | | | | These happen in tons of GNU packages because of using gnulib's regex.m4 specifically, which pulls in a macro that checks for some functionality and spit out many implicit function declaration errors if regex.h isn't GNU's specifically. The compile tests do fail either way, it's just very dirty in the logs. Bug: https://bugs.gentoo.org/906027 Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Closes: https://github.com/gentoo/portage/pull/1327 Signed-off-by: Sam James <sam@gentoo.org>
* unpack: skip unrecognized file formats *silently*Mike Gilbert2024-05-221-13/+0
| | | | | | See PMS section 12.3.15. Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* Drop portage.util.shlex_splitMike Gilbert2024-05-2137-122/+116
| | | | | | This has been a trivial wrapper since we dropped support for python2. Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* Do not use shlex.split for CONFIG_PROTECTMike Gilbert2024-05-217-20/+18
| | | | | | | PMS says this is a whitespace-separated list, so we should not treat it as a shell expression. Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* SchedulerInterface/PollScheduler: _loadavg_latency's unit is secondsFlorian Schmaus2024-05-211-1/+1
| | | | | | | | | The unit of _loadavg_latency is seconds, not milliseconds, as it is used as first argument to an eventloop's call_later() function. Signed-off-by: Florian Schmaus <flow@gentoo.org> Closes: https://github.com/gentoo/portage/pull/1325 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* install-qa-checks.d: suppress some gnulib implicit configure declarationsEli Schwartz2024-05-171-0/+9
| | | | | | | | | | | | These happen in tons of GNU packages because of using gnulib, which pulls in macros that check for some functionality and spit out an implicit function declaration error if they aren't supported, which is *expected*. Bug: https://bugs.gentoo.org/906027 Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Closes: https://github.com/gentoo/portage/pull/1323 Signed-off-by: Sam James <sam@gentoo.org>
* ebuild.5: Escape carats which are special to groffBryan Gardiner2024-05-131-1/+1
| | | | | | | | Raw carats are converted to circumflex characters which are not searchable, so they need to be escaped. See groff_char(7). Signed-off-by: Bryan Gardiner <bog@khumba.net> Signed-off-by: Sam James <sam@gentoo.org>
* depgraph.py: Fix the URL for the changed-deps wiki pageBryan Gardiner2024-05-131-1/+1
| | | | | Signed-off-by: Bryan Gardiner <bog@khumba.net> Signed-off-by: Sam James <sam@gentoo.org>
* sync: git: add safe.directory for get head commitAlex Xu (Hello71)2024-05-121-0/+1
| | | | | | | Closes: https://bugs.gentoo.org/930992 Fixes: 1339a02103 ("sync: git: include signing key and git revision in log output") Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca> Signed-off-by: Sam James <sam@gentoo.org>
* actions: handle pkgmoves for autoconf, automake, libtoolSam James2024-05-041-3/+3
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* estrip: Don't use splitdebug for .o filesAlex Xu (Hello71)2024-05-041-6/+12
| | | | | | | | | As the process_ar comment explained, object files cannot be splitdebug. Bug: https://bugs.gentoo.org/787623 ("www-client/firefox[clang]: .gnu_debuglink is busted when using LLD") Fixes: 51579fb34c19 ("prepstrip: add support for elfutils strip") Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca> Signed-off-by: Sam James <sam@gentoo.org>
* NEWS: fix typo in placeholderSam James2024-04-281-1/+1
| | | | | Fixes: 60d3ffc6b9168b0bfa0cd601b3664e261fc90685 Signed-off-by: Sam James <sam@gentoo.org>
* NEWS: updateSam James2024-04-281-0/+5
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* meson.build, NEWS: prepare for portage-3.0.64portage-3.0.64Sam James2024-04-282-2/+2
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* NEWS: updateSam James2024-04-281-0/+93
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* .pre-commit-config.yaml: bump pylint to 3.1.0Alfred Wingate2024-04-281-1/+1
| | | | | | Signed-off-by: Alfred Wingate <parona@protonmail.com> Closes: https://github.com/gentoo/portage/pull/1315 Signed-off-by: Sam James <sam@gentoo.org>
* pylintrc: give fully qualified name to overgeneral-exceptionsAlfred Wingate2024-04-281-1/+1
| | | | | | | | | * Ability to give unqualified names will be removed in pylint-3.1.0. https://pylint.pycqa.org/en/latest/whatsnew/3/3.0/index.html#changes-requiring-user-actions Signed-off-by: Alfred Wingate <parona@protonmail.com> Signed-off-by: Sam James <sam@gentoo.org>
* zipfile: Add an example to portage(5)Alexey Gladkov2024-04-281-1/+10
| | | | | | Signed-off-by: Alexey Gladkov <legion@kernel.org> Closes: https://github.com/gentoo/portage/pull/1264 Signed-off-by: Sam James <sam@gentoo.org>