Giter Site home page Giter Site logo

docker-mock-rpmbuilder's People

Contributors

csmart avatar jarekg83 avatar k0ste avatar karlism avatar mmckinst avatar mmornati avatar pop avatar tinsjourney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-mock-rpmbuilder's Issues

/tmp typically too small for this

For bulkier RPM's and build areas, /tmp is typically way too small for bulkier builds, such as gcc, and in high security environments it's mounted with "noexec" and "nosuid". Even if the software compiles, this can break test building.

Instead, use "/var/cache/docker-mock/" or some similarly specific directory.

Error building container

I got an error building the container, due to a package conflict in epel-release.
You also do not need epel-release for the container, so I suggest removing it

Building works fine when I remove
RUN yum -y install epel-release
from the Dockerfile

Error while trying to run generated test script

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.

docker.io/mmornati/mockrpmbuilder ... not found

$ sudo docker run -d -e MOCK_CONFIG=epel-6-i386 -e SOURCE_RPM=git-2.3.0-1.el7.centos.src.rpm -v /tmp/rpmbuild:/rpmbuild --privileged=true mmornati/mockrpmbuilder zsh: correct '/tmp/rpmbuild:/rpmbuild' to '/tmp/rpmbuild/rpmbuild' [nyae]? n Unable to find image 'mmornati/mockrpmbuilder:latest' locally Trying to pull repository docker.io/mmornati/mockrpmbuilder ... not found FATA[0007] Error: image mmornati/mockrpmbuilder:latest not found

Let me know if you need more details.

btrfs error after yum install step

Thanks for a very useful Docker container. Hitting the following error

DEBUG util.py:468: Executing command: ['btrfs', 'subv', 'list', '/var/lib/mock'] with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'} and shell False
DEBUG util.py:393: ERROR: can't perform the search -Inappropriate ioctl for device
DEBUG util.py:393: ERROR: can't get rootid for '/var/lib/mock'

Might be related to running mock within a container, and to https://bugzilla.redhat.com/show_bug.cgi?id=1205564

I am seeing this in mock1.2.13. Can we do any workaround within the container to handle this gracefully.

Crossbuilding fails

Hi,

I tried to crossbuild for aarch64 on x86_64:

docker run --rm --privileged=true --volume=".:/rpmbuild" -w "/rpmbuild" \
 --volume="/output:/rpmbuild/output" -e MOUNT_POINT="/rpmbuild" \
 -e MOCK_CONFIG=fedora-rawhide-aarch64 -e SOURCES="monitoring-plugins-b784428.tar.gz" \
 -e SPEC_FILE=monitoring-plugins-git.spec  -e NETWORK="true" -e NO_CLEANUP="true" \
 ghcr.io/waja/mock-rpmbuilder:latest

https://github.com/waja/docker-mock-rpmbuilder is just a fork, but with CI pipelines to generate and upload images to GHCR.

There are several error: failed to exec scriptlet interpreter /bin/sh: Exec format error errors and finally the build fails with Error: call to /usr/sbin/ldconfig failed.nError: call to /usr/sbin/iconvconfig failed.nError: call to /usr/sbin/ldconfig failed.n.

The full output can be found in the mock-builder.log.

Thanks Jan

Build SRPM first with "rpmbuild"

Building the SRPM first with rpmbuild allows you to use a .spec file in a local git repo, and still have the speedup of building from an SRPM. The only time it really screws you up is if you're using one of those loathsome SuSE RPMs, that used to exclude patch files based on architecture.

See my setup at https://github.com/nkadel/samba-4.10.x-srpm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.