#313 standard-test-source cannot unpack packages containing python scripts
Opened 5 years ago by whot. Modified 5 years ago

rpmbuild requires pathfix.py for packages that ship python. That's in python3-devel which isn't available by default. standard-test-source doesn't have required_packages: (#308) and adding a role to install python3-devel doesn't work either:

- hosts: localhost
  roles:
  - role: standard-test-basic
    tags:
      - classic
    required_packages:
      - python3-devel  # for pathfix during srpm prep
    tests:
      - simple:
          dir: .
          run: test -f /usr/bin/pathfix.py
  - role: standard-test-source
    tags:
      - classic

This one fails because pathfix.py is missing, even though the test for pathfix.py succeeds.

[2019-03-11T07:44:32.832Z] fatal: [/workDir/workspace/fedora-rawhide-pr-pipeline/images/test_subject.qcow2 -> 127.0.0.1]: FAILED! => {"changed": true, "cmd": "rm -rf \"/workDir/workspace/fedora-rawhide-pr-pipeline/libinput/tests/source\"\n rpmbuild -bp /workDir/workspace/fedora-rawhide-pr-pipeline/libinput/tests/../*.spec --nodeps --define \"_sourcedir /workDir/workspace/fedora-rawhide-pr-pipeline/libinput/tests/../\" --define \"_builddir /workDir/workspace/fedora-rawhide-pr-pipeline/libinput/tests/source\"", "delta": "0:00:00.592222", "end": "2019-03-11 07:44:27.418295", "msg": "non-zero return code", "rc": 1, "start": "2019-03-11 07:44:26.826073", "stderr": "+ umask 022\n+ cd /workDir/workspace/fedora-rawhide-pr-pipeline/libinput/tests/source\n+ cd /workDir/workspace/fedora-rawhide-pr-pipeline/libinput/tests/source\n+ rm -rf libinput-1.12.6\n+ /usr/bin/xz -dc /workDir/workspace/fedora-rawhide-pr-pipeline/libinput/libinput-1.12.6.tar.xz\n+ /usr/bin/tar -xof -\n+ STATUS=0\n+ '[' 0 -ne 0 ']'\n+ cd libinput-1.12.6\n+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .\n+ /usr/bin/git init -q\n+ /usr/bin/git config user.name rpm-build\n+ /usr/bin/git config user.email '<rpm-build>'\n+ /usr/bin/git add .\n+ /usr/bin/git commit -q --allow-empty -a --author 'rpm-build <rpm-build>' -m 'libinput-1.12.6 base'\n++ git grep -l '#!/usr/bin/.*python3'\n+ pathfix.py -i '%{__python3}' -p -n tools/libinput-measure-fuzz.py tools/libinput-measure-touch-size.py tools/libinput-measure-touchpad-pressure.py tools/libinput-measure-touchpad-tap.py tools/libinput-record-verify-yaml.py tools/libinput-replay\n/var/tmp/rpm-tmp.YZfqBE: line 51: pathfix.py: command not found\nerror: Bad exit status from /var/tmp/rpm-tmp.YZfqBE (%prep)\n    Bad exit status from /var/tmp/rpm-tmp.YZfqBE (%prep)", "stderr_lines": ["+ umask 022", "+ cd /workDir/workspace/fedora-rawhide-pr-pipeline/libinput/tests/source", "+ cd /workDir/workspace/fedora-rawhide-pr-pipeline/libinput/tests/source", "+ rm -rf libinput-1.12.6", "+ /usr/bin/xz -dc /workDir/workspace/fedora-rawhide-pr-pipeline/libinput/libinput-1.12.6.tar.xz", "+ /usr/bin/tar -xof -", "+ STATUS=0", "+ '[' 0 -ne 0 ']'", "+ cd libinput-1.12.6", "+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .", "+ /usr/bin/git init -q", "+ /usr/bin/git config user.name rpm-build", "+ /usr/bin/git config user.email '<rpm-build>'", "+ /usr/bin/git add .", "+ /usr/bin/git commit -q --allow-empty -a --author 'rpm-build <rpm-build>' -m 'libinput-1.12.6 base'", "++ git grep -l '#!/usr/bin/.*python3'", "+ pathfix.py -i '%{__python3}' -p -n tools/libinput-measure-fuzz.py tools/libinput-measure-touch-size.py tools/libinput-measure-touchpad-pressure.py tools/libinput-measure-touchpad-tap.py tools/libinput-record-verify-yaml.py tools/libinput-replay", "/var/tmp/rpm-tmp.YZfqBE: line 51: pathfix.py: command not found", "error: Bad exit status from /var/tmp/rpm-tmp.YZfqBE (%prep)", "    Bad exit status from /var/tmp/rpm-tmp.YZfqBE (%prep)"], "stdout": "Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.YZfqBE\n\n\nRPM build errors:", "stdout_lines": ["Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.YZfqBE", "", "", "RPM build errors:"]}

Full pipeline: https://jenkins-continuous-infra.apps.ci.centos.org/blue/organizations/jenkins/fedora-rawhide-pr-pipeline/detail/fedora-rawhide-pr-pipeline/1002/pipeline/

lines 198 and 233


python3-devel needs to be installed on test runner if I understood correct? @astepano any suggestion how to do this properly?

Commit 9518993 relates to this ticket

@bgoncalv we agreed that we take care only about packages sources, and if user wants %prep step, he takes care of necessary packages. Right? Let's close this issue

@astepano In general yes, if %prep step requires extra packages the source role should be used with fetch_only option. Although for python3-devel @bookwar would like the role to install it on test-runner.

ok, I see, than we need to figure out what RHEL8 requires to process python .spec
python3-devel is absent on RHEL8.
@bgoncalv can you please take this ticket and make conditional installation for rhel8 and fedora cases?

like

when: distro_name == "fedora"

I don't know what would be the best approach in this case. I'm not sure if installing packages only for specific distribution is the correct fix. @bookwar what do you think?

We can cover both: RHEL8 and Fedora. I am just gave example for when :)

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #314 Merged 5 years ago