[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: b276077666c2fca47c91eae19669f1bf6c0c702f Author: Mike Gilbert gentoo org> AuthorDate: Fri Mar 15 20:27:06 2024 + Commit: Mike Gilbert gentoo org> CommitDate: Fri Mar 15 21:34:16 2024 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=b2760776 github: update actions to avoid deprecation warnings Signed-off-by: Mike Gilbert gentoo.org> .github/workflows/ci.yml | 6 +++--- .github/workflows/lint.yml | 13 ++--- .github/workflows/pre-commit.yml | 8 +--- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4168203d4..2ac66970e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - '3.9' - '3.10' - '3.11' - - '3.12-dev' + - '3.12' - '3.13-dev' - 'pypy-3.10' exclude: @@ -34,9 +34,9 @@ jobs: start-method: 'spawn' fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} -uses: actions/setup-python@v4 +uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2091796b7c..ddcd9d486d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,13 +6,13 @@ jobs: black: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "Collect stragglers that Black misses" id: stragglers run: | - echo "::set-output name=missed::$( + echo "missed=$( find bin -type f -not -name '*.py' -not -name '*.sh' | \ - xargs grep -l '#!/usr/bin/env python' | tr $'\n' ' ')" + xargs grep -l '#!/usr/bin/env python' | tr $'\n' ' ')" >> $GITHUB_OUTPUT - uses: psf/black@24.1.1 with: src: . ${{ steps.stragglers.outputs.missed }} @@ -25,13 +25,12 @@ jobs: - '3.9' - '3.10' - '3.11' - # pylint currently broken under 3.12 - # - '3.12-dev' + - '3.12' fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} -uses: actions/setup-python@v4 +uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install python dependencies diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index ad71791c0b..1c3fbc48b0 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -9,6 +9,8 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: -- uses: actions/checkout@v3 -- uses: actions/setup-python@v4 -- uses: pre-commit/action@v3.0.0 +- uses: actions/checkout@v4 +- uses: actions/setup-python@v5 + with: +python-version: '3.x' +- uses: pre-commit/action@v3.0.1
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: ffcb1eb3ded0dbd244836ab3020fdc5244407298 Author: Zac Medico gentoo org> AuthorDate: Wed Feb 14 03:37:08 2024 + Commit: Zac Medico gentoo org> CommitDate: Wed Feb 14 19:07:57 2024 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=ffcb1eb3 actions: Use pytest-rerunfailures for pytest-xdist worker crash Since pytest-xdist workers crash intermittently for the multiprocessing spawn start method, use pytest-rerunfailures to detect and handle this case. Only use pytest-rerunfailures for the spawn start-method since that is the only case where we've observed intermittent pytest-xdist worker crashes, and use --only-rerun 'worker .* crashed while running' to ensure that rerun only triggers for worker crashes. Bug: https://bugs.gentoo.org/924416 See: https://github.com/pytest-dev/execnet/issues/96 Signed-off-by: Zac Medico gentoo.org> .github/workflows/ci.yml | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 762999b7cc..e4168203d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,7 +53,7 @@ jobs: python -m site python -m pip install --upgrade pip # setuptools needed for 3.12+ because of https://github.com/mesonbuild/meson/issues/7702. - python -m pip install pytest pytest-xdist setuptools + python -m pip install pytest pytest-rerunfailures pytest-xdist setuptools # symlink /bin/true to /usr/bin/getuto (or do we want to grab the script from github?) sudo ln -s /bin/true /usr/bin/getuto @@ -90,8 +90,7 @@ jobs: - name: Run tests for ${{ matrix.python-version }} run: | [[ "${{ matrix.start-method }}" == "spawn" ]] && export PORTAGE_MULTIPROCESSING_START_METHOD=spawn - # spawn start-method crashes pytest-xdist workers (bug 924416) - [[ "${{ matrix.start-method }}" == "spawn" ]] && \ -export PYTEST_ADDOPTS="-vv -ra -l -o console_output_style=count" || \ -export PYTEST_ADDOPTS="-vv -ra -l -o console_output_style=count -n $(nproc) --dist=worksteal" + export PYTEST_ADDOPTS="-vv -ra -l -o console_output_style=count -n $(nproc) --dist=worksteal" + # Use pytest-rerunfailures to workaround pytest-xdist worker crashes with spawn start-method (bug 924416). + [[ "${{ matrix.start-method }}" == "spawn" ]] && PYTEST_ADDOPTS+=" --reruns 5 --only-rerun 'worker .* crashed while running'" meson test -C /tmp/build --verbose
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: 86f92dae52382fd6b7fac8ced1d4e5e6456ce68b Author: Zac Medico gentoo org> AuthorDate: Tue Feb 13 09:04:40 2024 + Commit: Zac Medico gentoo org> CommitDate: Tue Feb 13 09:42:36 2024 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=86f92dae actions: disable pytest-xdist for spawn start-method (workers crash) Bug: https://bugs.gentoo.org/924416 Signed-off-by: Zac Medico gentoo.org> .github/workflows/ci.yml | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5bffd97206..762999b7cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,5 +90,8 @@ jobs: - name: Run tests for ${{ matrix.python-version }} run: | [[ "${{ matrix.start-method }}" == "spawn" ]] && export PORTAGE_MULTIPROCESSING_START_METHOD=spawn - export PYTEST_ADDOPTS="-vv -ra -l -o console_output_style=count -n $(nproc) --dist=worksteal" + # spawn start-method crashes pytest-xdist workers (bug 924416) + [[ "${{ matrix.start-method }}" == "spawn" ]] && \ +export PYTEST_ADDOPTS="-vv -ra -l -o console_output_style=count" || \ +export PYTEST_ADDOPTS="-vv -ra -l -o console_output_style=count -n $(nproc) --dist=worksteal" meson test -C /tmp/build --verbose
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: b419577c2e5219af9d10c9856449e23fa4d87b24 Author: Zac Medico gentoo org> AuthorDate: Tue Feb 6 05:56:57 2024 + Commit: Zac Medico gentoo org> CommitDate: Tue Feb 6 08:05:01 2024 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=b419577c actions: Add muliprocessing start-method to matrix Add multiprocessing start-method to matrix so that we are prepared for when python changes to default to spawn. Exclude all python versions except 3.12-dev for now. This adds a conditional ci step that patches the sources just for the spawn start-method. It patches all bin/* scripts with python shebangs, and also patches the test command in meson.build. Bug: https://bugs.gentoo.org/914876 Signed-off-by: Zac Medico gentoo.org> .github/workflows/ci.yml | 40 1 file changed, 40 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a897dbeec..15da507238 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,9 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: +start-method: + - 'fork' + - 'spawn' python-version: - '3.9' - '3.10' @@ -18,6 +21,17 @@ jobs: - '3.12-dev' - '3.13-dev' - 'pypy-3.10' +exclude: + - python-version: '3.9' +start-method: 'spawn' + - python-version: '3.10' +start-method: 'spawn' + - python-version: '3.11' +start-method: 'spawn' + - python-version: '3.13-dev' +start-method: 'spawn' + - python-version: 'pypy-3.10' +start-method: 'spawn' fail-fast: false steps: - uses: actions/checkout@v3 @@ -43,6 +57,32 @@ jobs: # symlink /bin/true to /usr/bin/getuto (or do we want to grab the script from github?) sudo ln -s /bin/true /usr/bin/getuto + - name: Patch python scripts to set spawn start method +if: ${{ matrix.start-method == 'spawn' }} +run: | + IFS='' + while read -r bin_file; do +if [[ $(head -n1 "${bin_file}") == '#!/usr/bin/env python' ]]; then + mode=top + while read -r line; do +if [[ ${mode} == top ]]; then + if [[ ${line} == \#* ]]; then +echo "${line}" + else +echo "import multiprocessing" +echo 'multiprocessing.set_start_method("spawn", force=True)' +echo "${line}" +mode=bottom + fi +else + echo "${line}" +fi + done < "${bin_file}" > "${bin_file}.new" + chmod +x "${bin_file}.new" + mv "${bin_file}"{.new,} +fi + done < <(find bin -maxdepth 1 -type f) + sed -i meson.build -e "s|'-m', 'pytest'|'-c', 'import multiprocessing, sys, pytest; multiprocessing.set_start_method(\"spawn\", force=True); sys.exit(pytest.console_main())'|" - name: Test meson install --destdir /tmp/install-root run: | echo -e "[binaries]\npython = '$(command -v python)'" > /tmp/native.ini
[gentoo-commits] proj/portage:master commit in: .github/workflows/, /
commit: 0e2f316113f82582069a3e09bec49220fc9406ef Author: Zac Medico gentoo org> AuthorDate: Sun Jan 28 23:12:31 2024 + Commit: Zac Medico gentoo org> CommitDate: Sun Jan 28 23:15:33 2024 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=0e2f3161 actions: Use psf/black 24.1.1 and sync pre-commit version Signed-off-by: Zac Medico gentoo.org> .github/workflows/lint.yml | 2 +- .pre-commit-config.yaml| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f75eaa0e7d..2091796b7c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,7 +13,7 @@ jobs: echo "::set-output name=missed::$( find bin -type f -not -name '*.py' -not -name '*.sh' | \ xargs grep -l '#!/usr/bin/env python' | tr $'\n' ' ')" - - uses: psf/black@23.12.1 + - uses: psf/black@24.1.1 with: src: . ${{ steps.stragglers.outputs.missed }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 72b0df3edd..f6fca10cba 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ --- repos: - repo: https://github.com/psf/black -rev: 23.12.1 +rev: 24.1.1 hooks: - id: black - repo: https://github.com/PyCQA/pylint
[gentoo-commits] proj/portage:master commit in: /, .github/workflows/
commit: e9e2809eeb9bd063b0f36f05b1773435ed7ef7c8 Author: Zac Medico gentoo org> AuthorDate: Sun Jan 28 22:58:36 2024 + Commit: Zac Medico gentoo org> CommitDate: Sun Jan 28 23:01:56 2024 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=e9e2809e actions: Use psf/black 23.12.1 and sync pre-commit version The versions must be consistent, since psf/black@stable now refers to 24.1.1 which triggers some reformatting relative to black 23.x. The consistency should correct lint failures like this: https://github.com/gentoo/portage/actions/runs/7667403073/job/20950314014?pr=1239 Signed-off-by: Zac Medico gentoo.org> .github/workflows/lint.yml | 2 +- .pre-commit-config.yaml| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 69b9578d4b..f75eaa0e7d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,7 +13,7 @@ jobs: echo "::set-output name=missed::$( find bin -type f -not -name '*.py' -not -name '*.sh' | \ xargs grep -l '#!/usr/bin/env python' | tr $'\n' ' ')" - - uses: psf/black@stable + - uses: psf/black@23.12.1 with: src: . ${{ steps.stragglers.outputs.missed }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 53856cb236..72b0df3edd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ --- repos: - repo: https://github.com/psf/black -rev: 23.9.1 +rev: 23.12.1 hooks: - id: black - repo: https://github.com/PyCQA/pylint
[gentoo-commits] proj/portage:master commit in: /, .github/workflows/
commit: 0c8634082b20938b4e2eef52b171b8238526ae98 Author: Zac Medico gentoo org> AuthorDate: Thu Jan 11 20:25:25 2024 + Commit: Zac Medico gentoo org> CommitDate: Thu Jan 11 20:31:36 2024 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=0c863408 Test python 3.13 Signed-off-by: Zac Medico gentoo.org> .github/workflows/ci.yml | 1 + tox.ini | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 698b8dcacf..3a897dbeec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,7 @@ jobs: - '3.10' - '3.11' - '3.12-dev' + - '3.13-dev' - 'pypy-3.10' fail-fast: false steps: diff --git a/tox.ini b/tox.ini index dcae3e87b5..23c533c345 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{39,310,311,312}-{pylint,test},pypy3-test +envlist = py{39,310,311,312,313}-{pylint,test},pypy3-test skipsdist = True [gh-actions] @@ -8,6 +8,7 @@ python = 3.10: py310 3.11: py311 3.12: py312 + 3.13: py313 pypy-3: pypy3 [gh-actions:env]
[gentoo-commits] proj/portage:master commit in: .github/workflows/, lib/portage/tests/emerge/
commit: eee0ea0cef115e274d97a7c9707aaa8fc40b5688 Author: Sam James gentoo org> AuthorDate: Sun Dec 10 01:07:31 2023 + Commit: Sam James gentoo org> CommitDate: Sun Dec 10 22:01:49 2023 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=eee0ea0c CI: add pax-utils for test_binpkg_libc_dep_inject test I've made the test_binpkg_libc_dep_inject test gracefully skip if scanelf from pax-utils isn't around, but we want to test this thing in CI, so add the pax-utils package. Signed-off-by: Sam James gentoo.org> .github/workflows/ci.yml | 2 +- lib/portage/tests/emerge/test_libc_dep_inject.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eedbe2f6e4..698b8dcacf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: set -xe echo "force-unsafe-io" | sudo tee /etc/dpkg/dpkg.cfg.d/force-unsafe-io sudo apt-get update -q - sudo apt-get install -qy --no-install-recommends libxslt-dev libxml2-dev libxml2-utils meson zstd + sudo apt-get install -qy --no-install-recommends libxslt-dev libxml2-dev libxml2-utils meson pax-utils zstd # Patch Ubuntu's old Meson to fix pypy-3.9 detection. curl -s -f https://github.com/mesonbuild/meson/commit/2540ad6e9e08370ddd0b6753fdc9314945a672f0.patch | sudo patch -d /usr/lib/python3/dist-packages -p1 --no-backup-if-mismatch diff --git a/lib/portage/tests/emerge/test_libc_dep_inject.py b/lib/portage/tests/emerge/test_libc_dep_inject.py index 10a4ae4120..31a66e8614 100644 --- a/lib/portage/tests/emerge/test_libc_dep_inject.py +++ b/lib/portage/tests/emerge/test_libc_dep_inject.py @@ -35,7 +35,8 @@ class LibcDepInjectEmergeTestCase(TestCase): src_install() { insinto /usr/bin -# We need an ELF binary for the injection to trigger +# We need an ELF binary for the injection to trigger, so +# use ${BASH} given we know it must be around for running ebuilds. cp "${BASH}" "${ED}"/usr/bin/${PN} || die } """
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: 25813f730f661590bae5cc67747cf15502a0e084 Author: Sam James gentoo org> AuthorDate: Mon Oct 30 05:48:11 2023 + Commit: Sam James gentoo org> CommitDate: Thu Nov 2 14:37:07 2023 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=25813f73 CI: quieten apt, try suppress fsync Signed-off-by: Sam James gentoo.org> .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd901fee96..eedbe2f6e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,8 +27,9 @@ jobs: - name: Install dependencies run: | set -xe - sudo apt-get update - sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libxml2-utils meson zstd + echo "force-unsafe-io" | sudo tee /etc/dpkg/dpkg.cfg.d/force-unsafe-io + sudo apt-get update -q + sudo apt-get install -qy --no-install-recommends libxslt-dev libxml2-dev libxml2-utils meson zstd # Patch Ubuntu's old Meson to fix pypy-3.9 detection. curl -s -f https://github.com/mesonbuild/meson/commit/2540ad6e9e08370ddd0b6753fdc9314945a672f0.patch | sudo patch -d /usr/lib/python3/dist-packages -p1 --no-backup-if-mismatch
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: 4ec6db2a428cd1db9cad3443f15f5b260aa369ac Author: Sam James gentoo org> AuthorDate: Mon Oct 30 05:35:20 2023 + Commit: Sam James gentoo org> CommitDate: Mon Oct 30 08:47:22 2023 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=4ec6db2a CI: Use epytest-style options for pytest, including xdist Signed-off-by: Sam James gentoo.org> .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61ca83d503..fd901fee96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: python -m site python -m pip install --upgrade pip # setuptools needed for 3.12+ because of https://github.com/mesonbuild/meson/issues/7702. - python -m pip install pytest setuptools + python -m pip install pytest pytest-xdist setuptools # symlink /bin/true to /usr/bin/getuto (or do we want to grab the script from github?) sudo ln -s /bin/true /usr/bin/getuto @@ -48,4 +48,5 @@ jobs: meson install -C /tmp/build --destdir /tmp/install-root - name: Run tests for ${{ matrix.python-version }} run: | - meson test -C /tmp/build --verbose \ No newline at end of file + export PYTEST_ADDOPTS="-vv -ra -l -o console_output_style=count -n $(nproc) --dist=worksteal" + meson test -C /tmp/build --verbose
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: 01245d7149703c4cfd84c7acf0baab83cafe38fc Author: Zac Medico gentoo org> AuthorDate: Tue Oct 10 02:25:16 2023 + Commit: Zac Medico gentoo org> CommitDate: Wed Oct 11 19:05:03 2023 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=01245d71 CI: Upgrade pypy from 3.9 to 3.10 This solves an error I'm seeing just in portage.utf8_mode CI runs for pypy-3.9: /home/runner/work/portage/portage/lib/portage/tests/emerge/test_config_protect.py:294: AssertionError - Captured stderr call - Traceback (most recent call last): File "/home/runner/work/portage/portage/bin/emerge", line 59, in retval = emerge_main() File "/home/runner/work/portage/portage/lib/_emerge/main.py", line 1265, in emerge_main emerge_config = load_emerge_config(action=myaction, args=myfiles, opts=myopts) File "/home/runner/work/portage/portage/lib/portage/proxy/objectproxy.py", line 31, in __call__ return result(*args, **kwargs) File "/home/runner/work/portage/portage/lib/_emerge/actions.py", line 2914, in load_emerge_config setconfig = load_default_config(settings, root_trees) File "/home/runner/work/portage/portage/lib/portage/_sets/__init__.py", line 382, in load_default_config return SetConfig(_getfiles(), settings, trees) File "/home/runner/work/portage/portage/lib/portage/_sets/__init__.py", line 63, in __init__ read_configs(self._parser, paths) File "/home/runner/work/portage/portage/lib/portage/util/configparser.py", line 49, in read_configs for p in paths: File "/home/runner/work/portage/portage/lib/portage/_sets/__init__.py", line 377, in _getfiles if not f.startswith(dot) and not f.endswith(tilde): TypeError: startswith first arg must be str or a tuple of str, not bytes Signed-off-by: Zac Medico gentoo.org> .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc7ab93a2b..d2abc31cd0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - '3.10' - '3.11' - '3.12-dev' - - 'pypy-3.9' + - 'pypy-3.10' fail-fast: false steps: - uses: actions/checkout@v3
[gentoo-commits] proj/portage:master commit in: .github/workflows/, cnf/, man/, lib/portage/package/ebuild/_config/, ...
commit: 3e56f8a6498cd90a7d5fe472febf586455c3bad7 Author: Andreas K. Hüttel gentoo org> AuthorDate: Wed Aug 30 17:57:19 2023 + Commit: Mike Gilbert gentoo org> CommitDate: Sun Sep 3 18:07:28 2023 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=3e56f8a6 Run PORTAGE_TRUST_HELPER before remote binary package operations Right now this is somewhat suboptimal because the helper is only called if FEATURES="binpkg-request-signature" is set, but existing signatures are also verified otherwise. Closes: https://github.com/gentoo/portage/pull/1085 Signed-off-by: Andreas K. Hüttel gentoo.org> Signed-off-by: Mike Gilbert gentoo.org> .github/workflows/ci.yml | 3 +++ NEWS | 2 ++ cnf/make.globals | 3 +++ lib/portage/dbapi/bintree.py | 12 lib/portage/package/ebuild/_config/special_env_vars.py | 1 + man/make.conf.5| 9 + 6 files changed, 30 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf36ad19d8..fc7ab93a2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,9 @@ jobs: python -m pip install --upgrade pip # setuptools needed for 3.12+ because of https://github.com/mesonbuild/meson/issues/7702. python -m pip install pytest setuptools + + # symlink /bin/true to /usr/bin/getuto (or do we want to grab the script from github?) + sudo ln -s /bin/true /usr/bin/getuto - name: Test meson install --destdir /tmp/install-root run: | echo -e "[binaries]\npython = '$(command -v python)'" > /tmp/native.ini diff --git a/NEWS b/NEWS index 65e75759bf..3e9e36f23f 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,8 @@ Features: * bintree: Add new API member (invalid_paths) to allow gentoolkit to later clean up invalid binpkgs (bug #900224). +* Run PORTAGE_TRUST_HELPER before remote binary package operations. + Bug fixes: * Prevent gpg from removing /dev/null when unlocking signing key (bug #912808). diff --git a/cnf/make.globals b/cnf/make.globals index f951bb3172..bfefcc5235 100644 --- a/cnf/make.globals +++ b/cnf/make.globals @@ -150,6 +150,9 @@ PORTAGE_ELOG_MAILFROM="portage@localhost" # Signing command used by egencache PORTAGE_GPG_SIGNING_COMMAND="gpg --sign --digest-algo SHA256 --clearsign --yes --default-key \"\${PORTAGE_GPG_KEY}\" --homedir \"\${PORTAGE_GPG_DIR}\" \"\${FILE}\"" +# Trust helper executable for installing and updating package verification keys +PORTAGE_TRUST_HELPER="/usr/bin/getuto" + # btrfs.* attributes are irrelevant, see bug #527636. # security.* attributes may be special (see bug 461868), but # security.capability is specifically not excluded (bug 548516). diff --git a/lib/portage/dbapi/bintree.py b/lib/portage/dbapi/bintree.py index af2113bd84..ec31b52d00 100644 --- a/lib/portage/dbapi/bintree.py +++ b/lib/portage/dbapi/bintree.py @@ -1234,11 +1234,23 @@ class binarytree: return pkgindex if update_pkgindex else None +def _run_trust_helper(self): +portage_trust_helper = self.settings.get("PORTAGE_TRUST_HELPER", "") +if portage_trust_helper == "": +return +ret = subprocess.run(portage_trust_helper) +ret.check_returncode() + def _populate_remote(self, getbinpkg_refresh=True): self._remote_has_index = False self._remotepkgs = {} if "binpkg-request-signature" in self.settings.features: +# This is somewhat broken, we *should* run the trust helper always +# when binpackages are involved, not only when we refuse unsigned +# ones. (If the keys have expired we end up refusing signed but +# technically invalid packages...) +self._run_trust_helper() gpkg_only = True else: gpkg_only = False diff --git a/lib/portage/package/ebuild/_config/special_env_vars.py b/lib/portage/package/ebuild/_config/special_env_vars.py index ef8f06abe3..6020029e35 100644 --- a/lib/portage/package/ebuild/_config/special_env_vars.py +++ b/lib/portage/package/ebuild/_config/special_env_vars.py @@ -315,6 +315,7 @@ environ_filter = frozenset( "PORTAGE_RSYNC_RETRIES", "PORTAGE_SSH_OPTS", "PORTAGE_SYNC_STALE", +"PORTAGE_TRUST_HELPER", "PORTAGE_USE", "PORTAGE_LOG_FILTER_FILE_CMD", "PORTAGE_LOGDIR", diff --git a/man/make.conf.5 b/man/make.conf.5 index a1a433b108..2a28d2b6f7 100644 --- a/man/make.conf.5 +++ b/man/make.conf.5 @@ -1208,6 +1208,15 @@ Defaults to /var/tmp. This should not be set to point anywhere under location of any repository. .TP +\fBPORTAGE_TRUST_HELPER\fR = \fI[path]\fR +Defines an executable file which initializes and maintains +/etc/portage/gnupg, installing keys
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: 85e69ccec067b1b7be688d7de677638acf79510c Author: James Le Cuirot gentoo org> AuthorDate: Tue Jul 25 08:07:46 2023 + Commit: Sam James gentoo org> CommitDate: Wed Aug 2 06:31:20 2023 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=85e69cce Patch Meson in GitHub CI to fix pypy-3.9 detection Signed-off-by: James Le Cuirot gentoo.org> Signed-off-by: Sam James gentoo.org> .github/workflows/ci.yml | 4 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 519bf92c4..bf36ad19d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,10 @@ jobs: set -xe sudo apt-get update sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libxml2-utils meson zstd + + # Patch Ubuntu's old Meson to fix pypy-3.9 detection. + curl -s -f https://github.com/mesonbuild/meson/commit/2540ad6e9e08370ddd0b6753fdc9314945a672f0.patch | sudo patch -d /usr/lib/python3/dist-packages -p1 --no-backup-if-mismatch + python -VV python -m site python -m pip install --upgrade pip
[gentoo-commits] proj/portage:master commit in: /, .github/workflows/
commit: edb9a6244be524ace95a48282e114d073ff37ad8 Author: Sam James gentoo org> AuthorDate: Wed Jul 26 07:51:05 2023 + Commit: Sam James gentoo org> CommitDate: Wed Jul 26 07:58:30 2023 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=edb9a624 Increase minimum Python version from Python 3.6/3.7 -> Python 3.9 We don't seem to have been consistent as to whether it was 3.6 or 3.7, but we weren't testing it consistently anyway. It feels too soon to go up to 3.10 unfortunately, but 3.6/3.7 are EOL and 3.8 is EOL next year, so let's do 3.9. Signed-off-by: Sam James gentoo.org> .github/workflows/ci.yml | 4 .github/workflows/lint.yml | 2 -- DEVELOPING | 2 +- NEWS | 3 +++ README.md | 2 +- setup.py | 2 +- tox.ini| 4 +--- 7 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c17e74e91..6bfe4847a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,14 +12,10 @@ jobs: strategy: matrix: python-version: - - '3.7' - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12-dev' - - 'pypy-3.7' - - 'pypy-3.8' - 'pypy-3.9' fail-fast: false steps: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8263567a1..469cffe37 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,8 +22,6 @@ jobs: strategy: matrix: python-version: - - '3.7' - - '3.8' - '3.9' - '3.10' - '3.11' diff --git a/DEVELOPING b/DEVELOPING index 2f05d49b5..0d414c4da 100644 --- a/DEVELOPING +++ b/DEVELOPING @@ -9,7 +9,7 @@ bad habits that exist in the current codebase. Python Version -- -Python 3.7 is the minimum supported version. +Python 3.9 is the minimum supported version. Dependencies diff --git a/NEWS b/NEWS index fe59a1ddf..fcbbdb2a5 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ portage-3.0.50 (UNRELEASED) -- +Breaking changes: +* The minimum supported Python version is now >= Python 3.9. + Bug fixes: * install-qa-check.d/05prefix: Fix prefixifying shebang for >= EAPI 7 ebuilds (bug #909147). diff --git a/README.md b/README.md index 08b06c10f..481d12bac 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ git config blame.ignoreRevsFile .git-blame-ignore-revs Dependencies -Python and Bash should be the only hard dependencies. Python 3.7 is the +Python and Bash should be the only hard dependencies. Python 3.9 is the minimum supported version. Native Extensions diff --git a/setup.py b/setup.py index 3c343aabd..4525264c7 100755 --- a/setup.py +++ b/setup.py @@ -921,5 +921,5 @@ setup( "Programming Language :: Python :: 3", "Topic :: System :: Installation/Setup", ], -python_requires=">=3.6", +python_requires=">=3.9", ) diff --git a/tox.ini b/tox.ini index cec7dd833..4ea388e35 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,9 @@ [tox] -envlist = py{37,38,39,310,311,312}-{pylint,test},pypy3-test +envlist = py{39,310,311,312}-{pylint,test},pypy3-test skipsdist = True [gh-actions] python = - 3.7: py37 - 3.8: py38 3.9: py39 3.10: py310 3.11: py311
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: 9817637785ecfa6bf73c2f9f35c877d7fbdf15d0 Author: Sam James gentoo org> AuthorDate: Tue May 23 08:58:18 2023 + Commit: Sam James gentoo org> CommitDate: Tue May 23 10:08:50 2023 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=98176377 CI: add setuptools Needed for >= Python 3.12 which drops distutils. This is the codepath we're using in Gentoo anyway. Signed-off-by: Sam James gentoo.org> .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29a5a60c1..c17e74e91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: python -VV python -m site python -m pip install --upgrade pip - python -m pip install tox tox-gh-actions + python -m pip install tox tox-gh-actions setuptools - name: Test ./setup.py install --root=/tmp/install-root run: | printf "[build_ext]\nportage_ext_modules=true" >> setup.cfg
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: 4d1ee70e843a19d3f5c0d31f29fae8141e7c6572 Author: Oskari Pirhonen gmail com> AuthorDate: Wed Mar 22 05:35:38 2023 + Commit: Sam James gentoo org> CommitDate: Thu Mar 23 06:59:11 2023 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=4d1ee70e actions: rename black.yml to lint.yml Signed-off-by: Oskari Pirhonen gmail.com> Signed-off-by: Sam James gentoo.org> .github/workflows/{black.yml => lint.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/.github/workflows/black.yml b/.github/workflows/lint.yml similarity index 100% rename from .github/workflows/black.yml rename to .github/workflows/lint.yml
[gentoo-commits] proj/portage:master commit in: .github/workflows/, /
commit: 8003c8acb8e0a73387535c338ee2d112781fe9fd Author: Oskari Pirhonen gmail com> AuthorDate: Wed Mar 22 05:50:39 2023 + Commit: Sam James gentoo org> CommitDate: Thu Mar 23 06:59:11 2023 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=8003c8ac actions: move pylint job into lint.yml Enable running the pylint job outside of just pushes or PR's to master. Don't run pylint as part of the CI/build job. Signed-off-by: Oskari Pirhonen gmail.com> Closes: https://github.com/gentoo/portage/pull/1014 Signed-off-by: Sam James gentoo.org> .github/workflows/ci.yml | 63 +++--- .github/workflows/lint.yml | 35 -- tox.ini| 24 +++--- 3 files changed, 79 insertions(+), 43 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 12d01dd1d..29a5a60c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,41 +8,40 @@ on: jobs: build: - runs-on: ubuntu-22.04 strategy: matrix: python-version: -- '3.7' -- '3.8' -- '3.9' -- '3.10' -- '3.11' -- '3.12-dev' -- 'pypy-3.7' -- 'pypy-3.8' -- 'pypy-3.9' + - '3.7' + - '3.8' + - '3.9' + - '3.10' + - '3.11' + - '3.12-dev' + - 'pypy-3.7' + - 'pypy-3.8' + - 'pypy-3.9' fail-fast: false - steps: -- uses: actions/checkout@v3 -- name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: -python-version: ${{ matrix.python-version }} -- name: Install python dependencies - run: | -set -xe -sudo apt-get update -sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libxml2-utils zstd -python -VV -python -m site -python -m pip install --upgrade pip -python -m pip install tox tox-gh-actions -- name: Test ./setup.py install --root=/tmp/install-root - run: | -printf "[build_ext]\nportage_ext_modules=true" >> setup.cfg -./setup.py install --root=/tmp/install-root -- name: Run tox targets for ${{ matrix.python-version }} - run: | -tox -vv + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} +uses: actions/setup-python@v4 +with: + python-version: ${{ matrix.python-version }} + - name: Install python dependencies +run: | + set -xe + sudo apt-get update + sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libxml2-utils zstd + python -VV + python -m site + python -m pip install --upgrade pip + python -m pip install tox tox-gh-actions + - name: Test ./setup.py install --root=/tmp/install-root +run: | + printf "[build_ext]\nportage_ext_modules=true" >> setup.cfg + ./setup.py install --root=/tmp/install-root + - name: Run tox test env for ${{ matrix.python-version }} +run: tox -vv +env: + TARGET: test diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 977f62d89..8263567a1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,9 +1,9 @@ name: Lint -on: [push, pull_request] +on: [ push, pull_request ] jobs: - lint: + black: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -16,3 +16,34 @@ jobs: - uses: psf/black@stable with: src: . ${{ steps.stragglers.outputs.missed }} + + pylint: +runs-on: ubuntu-latest +strategy: + matrix: +python-version: + - '3.7' + - '3.8' + - '3.9' + - '3.10' + - '3.11' + # Complains about importing distutils.dir_utils + # - '3.12-dev' + fail-fast: false +steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} +uses: actions/setup-python@v4 +with: + python-version: ${{ matrix.python-version }} + - name: Install python dependencies +run: | + set -xe + python -VV + python -m site + python -m pip install --upgrade pip + python -m pip install tox tox-gh-actions + - name: Run tox pylint env for ${{ matrix.python-version }} +run: tox -vv +env: + TARGET: pylint diff --git a/tox.ini b/tox.ini index 6760bde03..d8b84c80a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,24 +1,30 @@ [tox] -envlist = py{37,38,39,310}-pylint,py311,pypy3 +envlist = py{37,38,39,310,311,312}-{pylint,test},pypy3-test skipsdist = True [gh-actions] python = -3.7: py37-pylint -3.8: py38-pylint -3.9: py39-pylint -3.10: py310-pylint -3.11: py311 -pypy-3: pypy3 +
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: d58f064bee3f7ae57fe826da94a1e8b0f1df1573 Author: Sam James gentoo org> AuthorDate: Mon Mar 20 03:49:00 2023 + Commit: Sam James gentoo org> CommitDate: Mon Mar 20 04:03:51 2023 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=d58f064b CI: add Python 3.12 alphas Per https://github.com/actions/setup-python/issues/150, we can just do 3.12-dev and such. Signed-off-by: Sam James gentoo.org> .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 244262c2e..12d01dd1d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,7 @@ jobs: - '3.9' - '3.10' - '3.11' +- '3.12-dev' - 'pypy-3.7' - 'pypy-3.8' - 'pypy-3.9'
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: 28fd649ebc1c106dfc9111f0e487e8f9033e7654 Author: Sam James gentoo org> AuthorDate: Mon Mar 20 03:48:13 2023 + Commit: Sam James gentoo org> CommitDate: Mon Mar 20 04:03:51 2023 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=28fd649e CI: fix Python 3.11 workflow/job Use the latest Python 3.11 release. Signed-off-by: Sam James gentoo.org> .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f113a5c4d..244262c2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: - '3.8' - '3.9' - '3.10' -- '3.11.0-alpha - 3.11.0' +- '3.11' - 'pypy-3.7' - 'pypy-3.8' - 'pypy-3.9'
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: 6b6ca068df16acb13e7e109b6355bc398dbbdeb1 Author: Florian Schmaus gentoo org> AuthorDate: Fri Mar 10 16:24:21 2023 + Commit: Sam James gentoo org> CommitDate: Sat Mar 11 18:52:06 2023 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=6b6ca068 github ci: bump Ubuntu to 22.04 Signed-off-by: Florian Schmaus gentoo.org> Closes: https://github.com/gentoo/portage/pull/1006 Signed-off-by: Sam James gentoo.org> .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e6861b6c..f113a5c4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: jobs: build: -runs-on: ubuntu-20.04 +runs-on: ubuntu-22.04 strategy: matrix: python-version:
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: 783983d20df87377a644d6c7779468940fc38554 Author: Sam James gentoo org> AuthorDate: Tue Jan 10 14:25:39 2023 + Commit: Sam James gentoo org> CommitDate: Tue Jan 10 15:12:39 2023 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=783983d2 CI: add pre-commit Github Action Signed-off-by: Sam James gentoo.org> .github/workflows/pre-commit.yml | 14 ++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0..ad71791c0 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,14 @@ +name: pre-commit + +on: + pull_request: + push: +branches: [main] + +jobs: + pre-commit: +runs-on: ubuntu-latest +steps: +- uses: actions/checkout@v3 +- uses: actions/setup-python@v4 +- uses: pre-commit/action@v3.0.0
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: 8722c453536f76c398e7a098006c0534c37adbf2 Author: John Helmert III gentoo org> AuthorDate: Thu Dec 1 18:12:25 2022 + Commit: Sam James gentoo org> CommitDate: Sat Dec 3 01:39:53 2022 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=8722c453 update Actions versions We've started getting warnings about the versions of our Actions [1]: Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions/checkout@v2, actions/setup-python@v2 [1] https://github.com/gentoo/portage/actions/runs/3595151962 Signed-off-by: John Helmert III gentoo.org> Closes: https://github.com/gentoo/portage/pull/953 Signed-off-by: Sam James gentoo.org> .github/workflows/black.yml | 2 +- .github/workflows/ci.yml| 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index 1d6f1378c..977f62d89 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -6,7 +6,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: "Collect stragglers that Black misses" id: stragglers run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5869114d8..2e6861b6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,9 +24,9 @@ jobs: fail-fast: false steps: -- uses: actions/checkout@v2 +- uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install python dependencies
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: 3b3a5ba45aa8e72464125e55882c19814343c82c Author: Mike Gilbert gentoo org> AuthorDate: Mon Jun 6 15:33:33 2022 + Commit: Mike Gilbert gentoo org> CommitDate: Mon Jun 6 15:33:33 2022 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=3b3a5ba4 Remove Python 3.6 in github workflow Signed-off-by: Mike Gilbert gentoo.org> .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adeb41a77..5869114d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,6 @@ jobs: strategy: matrix: python-version: -- '3.6' - '3.7' - '3.8' - '3.9'
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: 29cb8eb012017aac6bd38088c0a6cbd2a6bcebdb Author: Michał Górny gentoo org> AuthorDate: Fri May 20 11:13:54 2022 + Commit: Michał Górny gentoo org> CommitDate: Fri May 20 11:13:54 2022 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=29cb8eb0 .github: Disable fail-fast on CI Signed-off-by: Michał Górny gentoo.org> .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad1633a3d..adeb41a77 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,7 @@ jobs: - 'pypy-3.7' - 'pypy-3.8' - 'pypy-3.9' + fail-fast: false steps: - uses: actions/checkout@v2
[gentoo-commits] proj/portage:master commit in: /, .github/workflows/
commit: 53a5ed7e6886eea8c2b08211cc8bad66f1146982 Author: Sam James gentoo org> AuthorDate: Thu May 19 03:55:03 2022 + Commit: Sam James gentoo org> CommitDate: Thu May 19 04:09:01 2022 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=53a5ed7e tox.ini, .github: test on available Python 3.11 versions Signed-off-by: Sam James gentoo.org> .github/workflows/ci.yml | 1 + tox.ini | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03cf1fc7f..ad1633a3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,7 @@ jobs: - '3.8' - '3.9' - '3.10' +- '3.11.0-alpha - 3.11.0' - 'pypy-3.7' - 'pypy-3.8' - 'pypy-3.9' diff --git a/tox.ini b/tox.ini index 84c24396e..a091afae9 100644 --- a/tox.ini +++ b/tox.ini @@ -16,7 +16,7 @@ deps = pylint: pylint pygost pyyaml - py36,py37,py38,py39,py310,pypy3: lxml!=4.2.0 + py36,py37,py38,py39,py310,py311,pypy3: lxml!=4.2.0 setenv = PYTHONPATH={toxinidir}/lib commands =
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: ebe8265dc2b41822e6a9e809cb079fdd76e14a29 Author: Sam James gentoo org> AuthorDate: Tue Apr 12 02:03:48 2022 + Commit: Sam James gentoo org> CommitDate: Tue Apr 12 03:12:53 2022 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=ebe8265d .github: add pypy3.8, pypy3.9 to CI Signed-off-by: Sam James gentoo.org> Closes: https://github.com/gentoo/portage/pull/808 Signed-off-by: Sam James gentoo.org> .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6b96a8f0..03cf1fc7f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,8 @@ jobs: - '3.9' - '3.10' - 'pypy-3.7' +- 'pypy-3.8' +- 'pypy-3.9' steps: - uses: actions/checkout@v2
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: 0480258c13997a5eb468692b85edca2ee56cfdd9 Author: Sam James gentoo org> AuthorDate: Tue Mar 15 22:39:09 2022 + Commit: Sam James gentoo org> CommitDate: Tue Mar 15 22:39:09 2022 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=0480258c .github/workflows/ci.yml: run 'apt update' Signed-off-by: Sam James gentoo.org> .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 581b2d04d..c6b96a8f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,7 @@ jobs: - name: Install python dependencies run: | set -xe +sudo apt-get update sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libxml2-utils zstd python -VV python -m site
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: ea97f7d77fd80ff9c380f77c64ffa9060e6a41cb Author: John Helmert III gentoo org> AuthorDate: Thu Feb 10 01:48:10 2022 + Commit: Sam James gentoo org> CommitDate: Mon Feb 21 03:50:54 2022 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=ea97f7d7 CI: also lint python files that Black doesn't automatically detect Signed-off-by: John Helmert III gentoo.org> Closes: https://github.com/gentoo/portage/pull/787 Signed-off-by: Sam James gentoo.org> .github/workflows/black.yml | 8 1 file changed, 8 insertions(+) diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index b04fb15cb..d3c3fa3e1 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -7,4 +7,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: "Collect stragglers that Black misses" +id: stragglers +run: | + echo "::set-output name=missed::$( + find bin repoman runtests -type f -not -name '*.py' -not -name '*.sh' | \ + xargs grep -l '#!/usr/bin/env python' | tr $'\n' ' ')" - uses: psf/black@stable +with: +src: . ${{ steps.stragglers.outputs.missed }}
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: 2567ca20f214f4e44bdc1e229c73434a5de17443 Author: Sam James gentoo org> AuthorDate: Thu Oct 28 05:01:44 2021 + Commit: Sam James gentoo org> CommitDate: Thu Oct 28 05:01:44 2021 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=2567ca20 .github: test against Python 3.10 final Signed-off-by: Sam James gentoo.org> .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8466e0f1..581b2d04d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: - '3.7' - '3.8' - '3.9' -- '3.10.0-alpha - 3.10.0' +- '3.10' - 'pypy-3.7' steps:
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: 71dbd16c41e68bc31a1c7d2e7ba90c7eee5138b7 Author: Wolfgang E. Sanyer gmail com> AuthorDate: Mon Sep 20 02:38:20 2021 + Commit: Zac Medico gentoo org> CommitDate: Mon Sep 20 03:57:30 2021 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=71dbd16c Add github action to check black formatting Signed-off-by: Wolfgang E. Sanyer gmail.com> Signed-off-by: Zac Medico gentoo.org> .github/workflows/black.yml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml new file mode 100644 index 0..b04fb15cb --- /dev/null +++ b/.github/workflows/black.yml @@ -0,0 +1,10 @@ +name: Lint + +on: [push, pull_request] + +jobs: + lint: +runs-on: ubuntu-latest +steps: + - uses: actions/checkout@v2 + - uses: psf/black@stable
[gentoo-commits] proj/portage:master commit in: /, .github/workflows/
commit: 1a0df634bf9ae6db13e1d2fd1665c6219445ee84 Author: Michał Górny gentoo org> AuthorDate: Sat Aug 7 16:45:05 2021 + Commit: Michał Górny gentoo org> CommitDate: Sat Aug 7 16:50:42 2021 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=1a0df634 ci: Test using the newest version of PyPy3.7 Do not bind to old version of PyPy3.7, also fix actually running tests via CI. Signed-off-by: Michał Górny gentoo.org> .github/workflows/ci.yml | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec2091810..a8466e0f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - '3.8' - '3.9' - '3.10.0-alpha - 3.10.0' -- 'pypy-3.7-v7.3.3' +- 'pypy-3.7' steps: - uses: actions/checkout@v2 diff --git a/tox.ini b/tox.ini index b0cfa7da3..ce43cc7fe 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,7 @@ python = 3.8: py38 3.9: py39 3.10: py310 -pypy-3.7-v7.3.3: pypy3 +pypy-3: pypy3 [testenv] deps =
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: 1d3bc260fe01bad66f3b6a3c7f267b2e8fd10964 Author: Michał Górny gentoo org> AuthorDate: Sat Aug 7 16:33:10 2021 + Commit: Michał Górny gentoo org> CommitDate: Sat Aug 7 16:33:10 2021 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=1d3bc260 ci: Test using the newest available version of py3.10 Signed-off-by: Michał Górny gentoo.org> .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78e4f428b..ec2091810 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: - '3.7' - '3.8' - '3.9' -- '3.10.0-alpha.3' +- '3.10.0-alpha - 3.10.0' - 'pypy-3.7-v7.3.3' steps:
[gentoo-commits] proj/portage:master commit in: .github/workflows/, /
commit: 4a8725ee4aba2c2990b63f520143a0b78db35376 Author: Zac Medico gentoo org> AuthorDate: Tue Jun 15 19:06:01 2021 + Commit: Zac Medico gentoo org> CommitDate: Tue Jun 15 19:19:23 2021 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=4a8725ee setup.cfg: eliminate dash-separated portage-ext-modules * QA Notice: setuptools warnings detected: * * Usage of dash-separated 'portage-ext-modules' will not be supported in future versions. Please use the underscore name 'portage_ext_modules' instead Reported-by: Patrick McLean gentoo.org> Signed-off-by: Zac Medico gentoo.org> .github/workflows/ci.yml | 2 +- README | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9188c9c28..78e4f428b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: python -m pip install tox tox-gh-actions - name: Test ./setup.py install --root=/tmp/install-root run: | -printf "[build_ext]\nportage-ext-modules=true" >> setup.cfg +printf "[build_ext]\nportage_ext_modules=true" >> setup.cfg ./setup.py install --root=/tmp/install-root - name: Run tox targets for ${{ matrix.python-version }} run: | diff --git a/README b/README index 54b12f8ce..d2bc9fdda 100644 --- a/README +++ b/README @@ -26,7 +26,7 @@ native extensions for all invocations of the build_ext command (the build_ext command is invoked automatically by other build commands): [build_ext] - portage-ext-modules=true + portage_ext_modules=true Currently, the native extensions only include libc bindings which are used to validate LC_CTYPE and LC_COLLATE behavior for EAPI 6. If the diff --git a/setup.py b/setup.py index 6be38895c..879e0ca5e 100755 --- a/setup.py +++ b/setup.py @@ -720,7 +720,7 @@ class build_ext(_build_ext): ] boolean_options = _build_ext.boolean_options + [ - 'portage-ext-modules', + 'portage_ext_modules', ] def initialize_options(self):
[gentoo-commits] proj/portage:master commit in: .github/workflows/, /
commit: 14d2182465f9921717801563f83b376cfa439bd1 Author: Zac Medico gentoo org> AuthorDate: Mon Feb 22 03:26:23 2021 + Commit: Zac Medico gentoo org> CommitDate: Mon Feb 22 03:41:43 2021 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=14d21824 ci: upgrade to pypy-3.7-v7.3.3 Signed-off-by: Zac Medico gentoo.org> .github/workflows/ci.yml | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4b960dc3..9188c9c28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - '3.8' - '3.9' - '3.10.0-alpha.3' -- 'pypy-3.6' +- 'pypy-3.7-v7.3.3' steps: - uses: actions/checkout@v2 diff --git a/tox.ini b/tox.ini index 585752686..b0cfa7da3 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,7 @@ python = 3.8: py38 3.9: py39 3.10: py310 -pypy-3.6: pypy3 +pypy-3.7-v7.3.3: pypy3 [testenv] deps =
[gentoo-commits] proj/portage:master commit in: .github/workflows/, lib/portage/, /
commit: cd98dc8ccff848e9750fb729aea3de2b6c34495c Author: Zac Medico gentoo org> AuthorDate: Sat Jan 2 06:57:30 2021 + Commit: Zac Medico gentoo org> CommitDate: Sat Jan 2 08:15:45 2021 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=cd98dc8c ci: enable repoman tests Bug: https://bugs.gentoo.org/763045 Signed-off-by: Zac Medico gentoo.org> .github/workflows/ci.yml | 2 +- lib/portage/__init__.py | 3 ++- tox.ini | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09c944ba1..d4b960dc3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: - name: Install python dependencies run: | set -xe -sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev zstd +sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libxml2-utils zstd python -VV python -m site python -m pip install --upgrade pip diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py index 621b1d99f..178d724db 100644 --- a/lib/portage/__init__.py +++ b/lib/portage/__init__.py @@ -360,7 +360,8 @@ except (ImportError, OSError) as e: # END OF IMPORTS -- END OF IMPORTS -- END OF IMPORTS -- END OF IMPORTS -- END # === -_python_interpreter = os.path.realpath(sys.executable) +_python_interpreter = (sys.executable if os.environ.get("VIRTUAL_ENV") + else os.path.realpath(sys.executable)) _bin_path = PORTAGE_BIN_PATH _pym_path = PORTAGE_PYM_PATH _not_installed = os.path.isfile(os.path.join(PORTAGE_BASE_PATH, ".portage_not_installed")) diff --git a/tox.ini b/tox.ini index 27b2206d6..cebf0e49c 100644 --- a/tox.ini +++ b/tox.ini @@ -22,4 +22,4 @@ setenv = commands = bash -c 'rm -rf build && PYTHONPATH=$PWD/lib:$PWD/repoman/lib pylint *' python -b -Wd setup.py test - python -b -Wd repoman/setup.py test + bash -c 'if python -c "import lxml.etree"; then python -b -Wd repoman/setup.py test; else echo "repoman tests skipped due to lxml breakage"; fi'
[gentoo-commits] proj/portage:master commit in: .github/workflows/
commit: aa9de9f3509700b1b049d2e7d15ecfeb571fc938 Author: Zac Medico gentoo org> AuthorDate: Sat Jan 2 03:17:57 2021 + Commit: Zac Medico gentoo org> CommitDate: Sat Jan 2 03:20:09 2021 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=aa9de9f3 ci: upgrade workflow to ubuntu-20.04 This will be the new default soon. See: https://github.com/actions/virtual-environments/issues/1816 Signed-off-by: Zac Medico gentoo.org> .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ec4c57aa..09c944ba1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: jobs: build: -runs-on: ubuntu-latest +runs-on: ubuntu-20.04 strategy: matrix: python-version:
[gentoo-commits] proj/portage:master commit in: .github/workflows/, /
commit: 8d09cb1da12366a0420341be5ab11bed987eb413 Author: Zac Medico gentoo org> AuthorDate: Sat Jan 2 00:43:19 2021 + Commit: Zac Medico gentoo org> CommitDate: Sat Jan 2 02:45:30 2021 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=8d09cb1d .travis.yml: convert to github action Signed-off-by: Zac Medico gentoo.org> .github/workflows/ci.yml | 43 +++ .travis.yml | 26 -- tox.ini | 9 + 3 files changed, 52 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0..2ec4c57aa --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: +branches: [ master ] + pull_request: +branches: [ master ] + +jobs: + build: + +runs-on: ubuntu-latest +strategy: + matrix: +python-version: +- '3.6' +- '3.7' +- '3.8' +- '3.9' +- '3.10.0-alpha.3' +- 'pypy-3.6' + +steps: +- uses: actions/checkout@v2 +- name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: +python-version: ${{ matrix.python-version }} +- name: Install python dependencies + run: | +set -xe +sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev zstd +python -VV +python -m site +python -m pip install --upgrade pip +python -m pip install tox tox-gh-actions +- name: Test ./setup.py install --root=/tmp/install-root + run: | +printf "[build_ext]\nportage-ext-modules=true" >> setup.cfg +./setup.py install --root=/tmp/install-root +- name: Run tox targets for ${{ matrix.python-version }} + run: | +tox -vv diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 297286ce0..0 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -dist: focal -language: python -python: -- 3.6 -- 3.7 -- 3.8 -- 3.9 -- 3.10-dev -- pypy3 - -# command to install dependencies -before_install: -# Use "dist: bionic" to get a zstd with --long support. -- sudo apt-get -y install zstd -install: -- pip install tox - -script: -- printf "[build_ext]\nportage-ext-modules=true" >> setup.cfg -- ./setup.py install --root=/tmp/install-root -- if [[ ${TRAVIS_PYTHON_VERSION/-dev/} == ?.? ]]; then -TOX_PYTHON_VERSION=${TRAVIS_PYTHON_VERSION/-dev/}; -tox -e py${TOX_PYTHON_VERSION/./}; - else -tox -e ${TRAVIS_PYTHON_VERSION}; - fi diff --git a/tox.ini b/tox.ini index 8aabbd2ce..27b2206d6 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,15 @@ envlist = py36,py37,py38,py39,py310,pypy3 skipsdist = True +[gh-actions] +python = +3.6: py36 +3.7: py37 +3.8: py38 +3.9: py39 +3.10: py310 +pypy-3.6: pypy3 + [testenv] deps = pylint