summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* NEWS, meson.build: prepare for portage-3.0.51portage-3.0.51Sam James2023-08-202-2/+2
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* sync: git: don't log on OK signature with --quietSam James2023-08-192-1/+5
| | | | | | | | No point in emitting a message if everything is fine when the user asks for --quiet. Bug: https://bugs.gentoo.org/673624 Signed-off-by: Sam James <sam@gentoo.org>
* misc/emerge-delta-webrsync: fix incorrect warning in --helpSam James2023-08-191-1/+1
| | | | | | | | I was wrong - the full thing is indeed verified, because we check both the base + final signatures. Fixes: 0347637fe5033d3d8eb4fdafa1e86de171934819 Signed-off-by: Sam James <sam@gentoo.org>
* NEWS: add -Oline fixOskari Pirhonen2023-08-191-0/+2
| | | | | | Signed-off-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com> Closes: https://github.com/gentoo/portage/pull/1079 Signed-off-by: Sam James <sam@gentoo.org>
* doebuild: gate -Oline behind MAKEFLAGS checkOskari Pirhonen2023-08-191-1/+1
| | | | | | | | | | | | Add a check to see if MAKEFLAGS is set (alongside the existing MAKEOPTS and GNUMAKEFLAGS checks) before enabling output synchronization. This is only tangentially related to the bug below via being a (likely rare) case of MAKEFLAGS being set in the wild. Bug: https://bugs.gentoo.org/909009 Signed-off-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
* emerge-webrsync: drop dead --keyserver codeSam James2023-08-191-6/+0
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* misc/emerge-delta-webrsync: drop dead --keyserver codeSam James2023-08-191-5/+0
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* misc/emerge-delta-webrsync: sync with emerge-webrsync for proxy supportSam James2023-08-191-2/+8
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* make.conf.5: mention https_proxySam James2023-08-192-1/+3
| | | | | | | We support it as of recent (from today) commits. Bug: https://bugs.gentoo.org/587484 Signed-off-by: Sam James <sam@gentoo.org>
* NEWS: update for proxy fixesSam James2023-08-191-0/+6
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* save-ebuild-env.sh, special_env_vars.py: add https_proxySam James2023-08-192-1/+2
| | | | | | | | | For parity with http_proxy. Bug: https://bugs.gentoo.org/691434 Bug: https://bugs.gentoo.org/835927 Bug: https://bugs.gentoo.org/911629 Signed-off-by: Sam James <sam@gentoo.org>
* sync: handle https_proxy tooSam James2023-08-191-0/+2
| | | | | | | | | | | | | | | | Pass down https_proxy into gemato. If http_proxy isn't set, but https_proxy is, then let's fall back to it to help users out. gnupg itself doesn't use https_proxy but users may have only https_proxy set rather than http_proxy and https_proxy. We've had cases reported where users only have https_proxy and not http_proxy set, so include this to help them out too. Bug: https://bugs.gentoo.org/691434 Bug: https://bugs.gentoo.org/835927 Bug: https://bugs.gentoo.org/911629 Signed-off-by: Sam James <sam@gentoo.org>
* emerge-webrsync: pass --proxy to gemato if http_proxy or https_proxy is setSam James2023-08-191-0/+7
| | | | | | | | | | | | | Make sure we pass proxy settings down into gemato. We include a fallback w/ https_proxy, but note that gnupg doesn't actually use https_proxy but we've had cases reported where users only have https_proxy and not http_proxy set, so include this to help them out too. Bug: https://bugs.gentoo.org/691434 Bug: https://bugs.gentoo.org/835927 Bug: https://bugs.gentoo.org/911629 Signed-off-by: Sam James <sam@gentoo.org>
* emerge-webrsync: handle https_proxy tooSam James2023-08-191-2/+2
| | | | | | | | | | If `https_proxy` is also set in make.conf, pick that up so it's passed down to wget. Bug: https://bugs.gentoo.org/691434 Bug: https://bugs.gentoo.org/835927 Bug: https://bugs.gentoo.org/911629 Signed-off-by: Sam James <sam@gentoo.org>
* misc/emerge-delta-webrsync: fix copyright header, whitespaceSam James2023-08-191-2/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* misc/emerge-delta-webrsync: fix pgp verificationSam James2023-08-192-57/+242
| | | | | | | | Sync the logic with bin/emerge-webrsync to bring in the recent updates from portage-3.0.47 onwards. Bug: https://bugs.gentoo.org/911335 Signed-off-by: Sam James <sam@gentoo.org>
* sync: git: fix debugging line leftoverSam James2023-08-171-1/+0
| | | | | Fixes: 9268a92b9666eaaf263999b18220c0d56d8c476c Signed-off-by: Sam James <sam@gentoo.org>
* sync: git: dump gpg output if verification fails with --debugSam James2023-08-171-0/+8
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* sync: rsync, git: respect --debug for gematoSam James2023-08-173-8/+30
| | | | | | | | | | | | | | | Respect --debug and pass it down to gemato so we get nice debugging output when e.g. 'refreshing keys' is stuck. Bug: https://bugs.gentoo.org/646194 Bug: https://bugs.gentoo.org/647696 Bug: https://bugs.gentoo.org/691666 Bug: https://bugs.gentoo.org/779766 Bug: https://bugs.gentoo.org/873133 Bug: https://bugs.gentoo.org/906875 Bug: https://github.com/projg2/gemato/issues/7 Bug: https://github.com/projg2/gemato/issues/25 Signed-off-by: Sam James <sam@gentoo.org>
* lib: _emerge: call portage.util.initialize_logger()Sam James2023-08-172-0/+13
| | | | | | | | | We don't have a root logger setup otherwise which means we can't get nice output from things like gemato which define their own logger names/domains. And respect --debug for it. Signed-off-by: Sam James <sam@gentoo.org>
* NEWS: add another news entrySam James2023-08-101-0/+2
| | | | | | From 8cc2348a2c0706f57962fee09a91c5a5b85f1b99. Signed-off-by: Sam James <sam@gentoo.org>
* NEWS: add missing entry for compgen removalSam James2023-08-101-0/+3
| | | | | | Bug: https://bugs.gentoo.org/909148 Fixes: f24dd0d9808559571509add2c8c69c1bcb2bfec6 Signed-off-by: Sam James <sam@gentoo.org>
* NEWS: fix entry for cgroup removalSam James2023-08-101-5/+4
| | | | | Fixes: f8e3b11496bd6d602a690535c4a3bb32bb8e9744 Signed-off-by: Sam James <sam@gentoo.org>
* NEWS, meson.build: prepare for portage-3.0.50portage-3.0.50Sam James2023-08-092-2/+2
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* NEWS: updateSam James2023-08-081-0/+2
| | | | | Bug: https://bugs.gentoo.org/911594 Signed-off-by: Sam James <sam@gentoo.org>
* portage(5): fix description of volatile attributeChristian Becke2023-08-081-5/+5
| | | | | | | | | | | | | | | | | | | | | | | The description of the 'volatile' keyword in the 'repos.conf' section in the portage(5) man page seems to be inconsistent. I think the first two sentences correctly describe the behaviour of 'volatile' and agree with the comments in portage/repository/config.py: "Specifies whether a repository is volatile. Volatile repositories are assumed to contain changes made outside of Portage. This prohibits optimizations from occurring by assuming the integrity of the repository and its caches may be violated." The remainder of the paragraph inverts the meaning of 'volatile' and does not agree with the code in portage/repository/config.py: "Disabling this option allows local changes to be made to the repository for e.g. development safely. For git-synced repositories, Portage will not perform destructive operations. Per default, repositories are considered volatile if their directory is owned by either 'root' or 'portage' and if it is under /var/db/repos. Otherwise, the repository is considered non volatile." Bug: https://bugs.gentoo.org/911594 Signed-off-by: Christian Becke <christianbecke@web.de> Signed-off-by: Sam James <sam@gentoo.org>
* Define BROOT in pkg_* phases following PMS changeJames Le Cuirot2023-08-063-3/+6
| | | | | | | | Closes: https://bugs.gentoo.org/911797 Bug: https://bugs.gentoo.org/911574 Signed-off-by: James Le Cuirot <chewi@gentoo.org> Closes: https://github.com/gentoo/portage/pull/1077 Signed-off-by: Sam James <sam@gentoo.org>
* Fix risc vs riscv typo in Meson fileJames Le Cuirot2023-08-031-2/+2
| | | | | Closes: https://github.com/gentoo/portage/pull/1076 Signed-off-by: Sam James <sam@gentoo.org>
* Fix Meson CPU detection for make.confJames Le Cuirot2023-08-031-1/+1
| | | | | | | I used the CPU name rather than the family by mistake. Signed-off-by: James Le Cuirot <chewi@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* _reflink_linux_file_copy: initialize error to 0Mike Gilbert2023-08-021-0/+1
| | | | | | | | | | | | | | | Avoids a compiler warning: ``` ../src/portage_util_file_copy_reflink_linux.c: In function ‘_reflink_linux_file_copy’: ../src/portage_util_file_copy_reflink_linux.c:379:12: warning: ‘error’ may be used uninitialized [-Wmaybe-uninitialized] 379 | if (!error && ftruncate(fd_out, offset_out) < 0) | ^ ../src/portage_util_file_copy_reflink_linux.c:205:22: note: ‘error’ was declared here 205 | int eintr_retry, error, fd_in, fd_out, stat_in_acquired, stat_out_acquired; | ^~~~~ ``` Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* Respect TMPDIR instead of hardcoding /tmp in test_bintree.pyJames Le Cuirot2023-08-021-11/+17
| | | | | | | | It was breaking the Portage sandbox. Signed-off-by: James Le Cuirot <chewi@gentoo.org> Closes: https://github.com/gentoo/portage/pull/1071 Signed-off-by: Sam James <sam@gentoo.org>
* Use the correct library path when launching scripts directly from a venvJames Le Cuirot2023-08-022-13/+8
| | | | | | | | | | | | | | | | It's not clear what bin_entry_point.sh was trying to do before. The regular expression didn't appear to match any likely shebang. The wrapper already runs under the desired Python, so we only need to use sys.executable, which points to the venv's python symlink. We don't need to worry about handling non-Python scripts any more either as the new Meson-based build system just installs these directly to bin rather than creating an entrypoint for them. Any Python-based Portage scripts they execute are now tried from the same directory first and will therefore use the correct environment, as above. Signed-off-by: James Le Cuirot <chewi@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* Make non-Python (s)bin scripts use other scripts from the same directoryJames Le Cuirot2023-08-023-15/+18
| | | | | | | | This is particularly important when Portage is installed in a venv to ensure that other scripts are launched using the same environment. Signed-off-by: James Le Cuirot <chewi@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* Fix the test_doebuild_fd_pipes.py test under CIJames Le Cuirot2023-08-021-0/+1
| | | | | | | | | | | | | | | The tests call _disable_legacy_globals, but they never reset portage.data._initialized_globals, meaning that the globals never get set again. This led to the test trying to chown with GID 0 as an unprivileged user. This only failed under CI after switching to pytest, despite it working with runTests.py, as well as locally. Running it on its own also worked fine. I don't know how it worked before, maybe it was just the ordering and some luck. Signed-off-by: James Le Cuirot <chewi@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* Drop custom test runner bits in favour of pytestJames Le Cuirot2023-08-0234-617/+49
| | | | | Signed-off-by: James Le Cuirot <chewi@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* Patch Meson in GitHub CI to fix pypy-3.9 detectionJames Le Cuirot2023-08-021-0/+4
| | | | | Signed-off-by: James Le Cuirot <chewi@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* Migrate from setuptools to Meson and meson-pythonJames Le Cuirot2023-08-02138-1060/+2087
| | | | | | | | | | | This makes Portage PEP 517 compliant. When building via meson-python, the man pages and logrotate config are no longer included as there seems little point. Bug: https://bugs.gentoo.org/910035 Signed-off-by: James Le Cuirot <chewi@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* Linting fixesJames Le Cuirot2023-08-028-28/+31
| | | | | Signed-off-by: James Le Cuirot <chewi@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* Drop FEATURES=cgroup, i.e., v1 cgroup usageFlorian Schmaus2023-07-296-170/+5
| | | | | | | | | | | | | | | | | | | | | Remove portage's usage of Linux version 1 cgroups, which are itself superseded by version 2 cgroups. This basically reverts b01a1b90d8c5 ("Add FEATURES=cgroup to isolate phase processes."). Portage's usage of version 1 cgroups has caused some issues in the past. For example https://bugs.gentoo.org/894398, where LXD got confused by the existence of the version 1 cgroup created by portage. Arguably, this could be considered a bug in LXD, but with FEATURES=pid-sandbox, as better alternative to FEATURES=cgroup exists. And removing the code for FEATURES=cgroup reduces portage's code size, which is also a plus. Bug: https://bugs.gentoo.org/894398 Signed-off-by: Florian Schmaus <flow@gentoo.org> Reviewed-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/portage/pull/1057 Signed-off-by: Sam James <sam@gentoo.org>
* dbapi: add some typingAndrew Udvare2023-07-292-22/+39
| | | | | | Signed-off-by: Andrew Udvare <audvare@gmail.com> Closes: https://github.com/gentoo/portage/pull/1069 Signed-off-by: Sam James <sam@gentoo.org>
* versions: add basic typingAndrew Udvare2023-07-291-40/+48
| | | | | Signed-off-by: Andrew Udvare <audvare@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
* install-qa-check.d/60openrc: be explicit about OpenRCFlorian Schmaus2023-07-291-1/+1
| | | | | | | | | Be explicit that this is not some arbitrary shell script that is checked by the QA check, but an OpenRC runscript. Signed-off-by: Florian Schmaus <flow@gentoo.org> Closes: https://github.com/gentoo/portage/pull/1074 Signed-off-by: Sam James <sam@gentoo.org>
* env_update: drop os.waitstatus_to_exitcodeMike Gilbert2023-07-261-1/+0
| | | | | | | The subprocess.run() function does this translation already. Fixes: 3bba408e214ae27bdf924ba90ad4b0919a85f3c8 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* runtests: update supported Python versionsSam James2023-07-261-3/+3
| | | | | | We're about to get rid of this, but.. Signed-off-by: Sam James <sam@gentoo.org>
* Run `flynt`Sam James2023-07-2610-41/+29
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* Run `pyupgrade --py39-plus`Sam James2023-07-266-33/+28
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* CI: update tool versionsSam James2023-07-261-4/+4
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* CI: allow pyupgrade to use >= 3.9 syntaxSam James2023-07-261-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* lib: env_update: use more f-stringsSam James2023-07-261-6/+4
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* lib: env_update: port to subprocessSam James2023-07-261-9/+15
| | | | | | | | | | os.system is a bit janky here, let's use subprocess so we're not injecting multiple commands. Thanks to mgorny for the suggestion. Bug: https://bugs.gentoo.org/910376 Signed-off-by: Sam James <sam@gentoo.org>