Package: reprotest
Followup-For: Bug #898284

> > sudo reprotest sl_3.03-17build1.dsc -- schroot stretch
> (Sudo is needed to let build dependencies installed and since I get a
> sem_open: Permission denied otherwise)

I've faced with a simililar error message.
The reason was /dev/shm or /run/shm were not mounted as tmpfs.

Probably related to #778462

> It runs the first build, but when doing the 2nd build with variations I end
> up with the error:
> fuse: unknown option `-q'
> fusermount: failed to unmount /tmp/reprotest.smM4SM/build-experiment-1:
> Invalid argument
> cleanup failed with exit code 1
> 
> (Full output attached as run1.txt)

May be related to the same mounting problem?
I don't know. 

> I wasn't planning on using disoderfs so I turn off that variation:
> > sudo reprotest sl_3.03-17build1.dsc --variations +all,-fileordering --
> schroot stretch

sudo reprotest sl_3.03-17build1.dsc --variations +all,-fileordering -- schroot 
stretch

> Which I tracked down with strace to:
> 
> [pid 15694] unshare(CLONE_NEWUTS|CLONE_NEWUSER)
> = -1 EPERM (Operation not permitted)

Also straced my problem.

util-linux-2.34/sys-utils/unshare.c:431:        if (-1 == 
unshare(unshare_flags))

unshare looks fine, CLONE_NEWUTS|CLONE_NEWUSER are used when is invoked with
"-r --uts".

In your execution the unshare command was triggered from reprotest (line 238):
reprotest/build.py-218-    # TODO: below only works on linux, of course..
reprotest/build.py-219-    if ctx.spec.domain_host.use_sudo:
[...]
reprotest/build.py-232-    else:
reprotest/build.py-233-        logger.warn("Not using sudo for domain_host; 
your build may fail. See man page for other options.")
reprotest/build.py-234-        logger.warn("Be sure to `echo 1 > 
/proc/sys/kernel/unprivileged_userns_clone` if on a Debian system.")
reprotest/build.py-235-        if "user_group" in ctx.spec and 
ctx.spec.user_group.available:
reprotest/build.py-236-            logger.error("Incompatible variations: 
domain_host.use_sudo False, user_group.available non-empty.")
reprotest/build.py-237-            raise ValueError("Incompatible variations; 
check the log for details.")
reprotest/build.py:238:        _ = _.prepend_to_build_command(*"unshare -r 
--uts".split(),

So, ctx.spec.domain_host.use_sudo was evaluated to false.

Also nice notes on README:
https://salsa.debian.org/reproducible-builds/reprotest/commit/9b34f0a3044b84c39bd897c47a426256cf0a88b1


I've fixed my problems with this param:
  --variations '+all,domain_host.use_sudo=1'

Hope it helps. In my opinion and understanding this bug should be closed.

Regards,

Reply via email to