Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while trying to run generated test script #19

Open
Tzrlk opened this issue Oct 14, 2019 · 1 comment
Open

Error while trying to run generated test script #19

Tzrlk opened this issue Oct 14, 2019 · 1 comment
Assignees

Comments

@Tzrlk
Copy link

Tzrlk commented Oct 14, 2019

I've been trying to create an rpm for the "duc" tool (http://duc.zevv.nl) using their rpm spec, this docker container, and running on jenkins. However, when running the following command:

docker run -t --rm \
    --cap-add=SYS_ADMIN \
    -e MOCK_CONFIG=epel-7-x86_64 \
    -e GITHUB_WORKSPACE=/rpmbuild \
    -e SOURCES=duc-1.4.4.tar.gz \
    -e SPEC_FILE=duc.spec \
    -v $(pwd):/rpmbuild

I get the following output:

=> Building parameters:
========================================================================
      MOCK_CONFIG:    epel-7-x86_64
      SPEC_FILE:     duc.spec
      SOURCES:       duc-1.4.4.tar.gz
      OUTPUT_FOLDER: rpmbuild/output/epel-7-x86_64
      MOCK_DEFINES:  
========================================================================
sh: rpmbuild/output/epel-7-x86_64/script-test.sh: No such file or directory

However, I've found a way to work-around the issue is by omitting the GITHUB_WORKSPACE variable, and prefixing the important path inputs, like so:

docker run -t --rm \
    --cap-add=SYS_ADMIN \
    -e MOCK_CONFIG=epel-7-x86_64 \
    -e SOURCES=rpmbuild/duc-1.4.4.tar.gz \
    -e SPEC_FILE=rpmbuild/duc.spec \
    -v $(pwd):/rpmbuild

Once I do that, it appears to execute properly:

=> Building parameters:
========================================================================
      MOCK_CONFIG:    epel-7-x86_64
      SPEC_FILE:     rpmbuild/duc.spec
      SOURCES:       rpmbuild/duc-1.4.4.tar.gz
      OUTPUT_FOLDER: /output/epel-7-x86_64
      MOCK_DEFINES:  
========================================================================
INFO: mock.py version 1.2.17 starting (python version = 2.7.5)...

Though I suspect I'm going to have to mount the /output directory in addition to the /rpmbuild dir.

@Tzrlk
Copy link
Author

Tzrlk commented Oct 14, 2019

I had a suspicion that is was permission related, but when I added a mount of $(pwd)/output:/output after the first mount, everything worked perfectly.

@mmornati mmornati self-assigned this Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants