#339 [WIP] CI: Run mock as non-root user
Closed 2 years ago by churchyard. Opened 2 years ago by churchyard.
rpms/ churchyard/pyproject-rpm-macros mock-no-root  into  rawhide

file modified
+18 -75
@@ -3,9 +3,23 @@ 

    tags:

      - classic

    tasks:

-     - dnf:

+     - ansible.builtin.dnf:

          name: "*"

          state: latest

+     - ansible.builtin.group:

+         name: mock

+         gid: 135

+     - ansible.builtin.user:

+         name: testuser

+         groups: mock

+         append: yes

+     - ansible.builtin.file:

+         path: /tmp/artifacts

+         state: directory

+         recurse: yes

+         owner: root

+         group: root

+         mode: u=rwx,g=rwx,o=rwx

  

  - hosts: localhost

    roles:
@@ -15,83 +29,12 @@ 

      tests:

      - pytest:

          dir: .

-         run: ./mocktest.sh python-pytest

-     - entrypoints:

-         dir: .

-         run: ./mocktest.sh python-entrypoints

-     - pluggy:

-         dir: .

-         run: ./mocktest.sh python-pluggy

-     - clikit:

-         dir: .

-         run: ./mocktest.sh python-clikit

-     - distroinfo:

-         dir: .

-         run: ./mocktest.sh python-distroinfo

-     - tldr:

-         dir: .

-         run: ./mocktest.sh tldr

-     - openqa_client:

-         dir: .

-         run: ./mocktest.sh python-openqa_client

-     - httpbin:

-         dir: .

-         run: ./mocktest.sh python-httpbin

-     - ldap:

-         dir: .

-         run: ./mocktest.sh python-ldap

-     - isort:

-         dir: .

-         run: ./mocktest.sh python-isort

-     - mistune:

-         dir: .

-         run: ./mocktest.sh python-mistune

-     - setuptools_scm:

-         dir: .

-         run: ./mocktest.sh python-setuptools_scm

-     - ipykernel:

-         dir: .

-         run: ./mocktest.sh python-ipykernel

-     - zope:

-         dir: .

-         run: ./mocktest.sh python-zope-event

-     - django:

-         dir: .

-         run: ./mocktest.sh python-django

-     - printrun:

-         dir: .

-         run: ./mocktest.sh printrun

-     - dns_lexicon:

-         dir: .

-         run: ./mocktest.sh python-dns-lexicon

-     - flit_core:

-         dir: .

-         run: ./mocktest.sh python-flit-core

-     - poetry_core:

-         dir: .

-         run: ./mocktest.sh python-poetry-core

-     - setuptools:

-         dir: .

-         run: ./mocktest.sh python-setuptools

-     - markupsafe:

-         dir: .

-         run: ./mocktest.sh python-markupsafe

-     - getmac:

-         dir: .

-         run: ./mocktest.sh python-getmac

-     - userpath:

-         dir: .

-         run: ./mocktest.sh python-userpath

-     - double_install:

-         dir: .

-         run: ./mocktest.sh double-install

-     - fake_requirements:

-         dir: .

-         run: ./mocktest.sh fake-requirements

+         run: runuser testuser -c './mocktest.sh python-pytest'

      - escape_percentages:

          dir: .

-         run: rpmbuild -ba escape_percentages.spec

+         run: runuser testuser -c 'rpmbuild -ba escape_percentages.spec'

      required_packages:

+     - util-linux

      - mock

      - rpmdevtools

      - rpm-build

See https://github.com/rpm-software-management/mock/issues/990

This will require changes in all packages using this script.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

fatal: [localhost]: FAILED! => {"changed": false, "msg": "Group mock does not exist"}

OK, we need to create it first I guess.

rebased onto dfcd148562dbec39bd35d5f92b90822132835c97

2 years ago

rebased onto 4819ec0302abbbdb075642276f493c0d692e117f

2 years ago

rebased onto b248af2dbb0e13b751b6fdf423d8b12092f65450

2 years ago

rebased onto 205a616037e975121288a179466326eaa77021ea

2 years ago

rebased onto 637ef46021174461007c3f8003a65336c58c22b3

2 years ago

1 new commit added

  • CI: Run mock as non-root user
2 years ago

rebased onto fa02a87ef6ee0454b420e4dfe0f0f506b51693e3

2 years ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

rebased onto ead08d1

2 years ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

OK, this seems too tedious.

Pull-Request has been closed by churchyard

2 years ago
Metadata