Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Latest mock rpm from epel failing in 7.3 environment

    Posted on

    I just sunk some time into this and in the hope that it may help someone else with the issue I thought I would document it here.

    The current version of mock from epel at time of writing is:

    mock-1.4.2-1.el7.noarch.rpm 
    

    There is a problem when building RPMs with this version of mock as it references an invalid option when creating a container from the chroot using systemd-nspawn. The error is as follows:

    DEBUG util.py:450:  /usr/bin/systemd-nspawn: invalid option -- 'a'
    DEBUG util.py:588:  Child return code was: 1
    DEBUG util.py:197:  kill orphans
    

    It appears that the -a option was added in systemd 229 with the following note from the release notes:

    systemd-nspawn gained a new --as-pid2 switch that invokes any
              specified command line as PID 2 rather than PID 1 in the
              container. In this mode PID 1 is a minimal stub init process that
              implements the special POSIX and Linux semantics of PID 1 regarding
              signal and child process management. Note that this stub init process
              is implemented in nspawn itself and requires no support from the
              container image. This new logic is useful to support running
              arbitrary commands in the container, as normal processes are
              generally not prepared to run as PID 1.
    

    The issue is that the systemd shipped in 7.3 is 219 and it doesn't look like this feature/capability has been backported.

    Is anyone else using mock to build RPMs in 7.x? Has anyone else come up with this issue?

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat