Bug 21810 - Nspawn enabled in mock causes issues running mock in docker.
Summary: Nspawn enabled in mock causes issues running mock in docker.
Status: RESOLVED WONTFIX
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: All Linux
Priority: Normal minor
Target Milestone: ---
Assignee: Neal Gompa
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-06 22:48 CEST by Jeremiah Summers
Modified: 2017-10-07 16:52 CEST (History)
2 users (show)

See Also:
Source RPM: mock-1.4.2-1.mga6.src.rpm
CVE:
Status comment:


Attachments
patch for the issue (684 bytes, text/plain)
2017-10-06 22:54 CEST, Jeremiah Summers
Details

Description Jeremiah Summers 2017-10-06 22:48:01 CEST
Description of problem:
A new default has been added to mock to use nspawn, while this might be a awesome idea, it seems to be wreaking havoc on my ability to built Mageia packages in Docker. A Simple solution would be to turn it off. However I am not sure what it brings to the table, and maybe I'm just a corner case.


Version-Release number of selected component (if applicable):
mock-1.4.2-1

How reproducible:
Everytime

Steps to Reproduce:
1. Use mock in a Docker container
2. Try to rebuild src rpm.
Comment 1 Jeremiah Summers 2017-10-06 22:54:23 CEST
Created attachment 9704 [details]
patch for the issue

The simple solution is to just add:

"config_opts['use_nspawn'] = False"

to the mock files as presented in the example patch.

CC: (none) => JMiahMan

Marja Van Waes 2017-10-07 15:39:27 CEST

CC: (none) => marja11
Assignee: bugsquad => ngompa13

Comment 2 Neal Gompa 2017-10-07 15:52:40 CEST
Nspawn containers basically do the same thing Docker does, so if you're using mock in Docker, you will want to pass "--old-chroot" to the command to revert to using the chroot() instead, which should work inside of Docker.

Nspawn containers automatically namespace out everything, so you don't get collisions between different builds running at the same time, and it makes it far harder for host information to leak into the container and vice versa.

I do not intend to change the default, as upstream has intended for nspawn to be used to enhance the security of building packages.

Status: NEW => RESOLVED
Resolution: (none) => WONTFIX

Comment 3 Jeremiah Summers 2017-10-07 16:52:00 CEST
That works, Thanks

Note You need to log in before you can comment on or make changes to this bug.