I tried to do a fedpkg mockbuild of systemd. The build fails on the test-mountpoint-util test. According to this Gentoo post it fails this way when built in a pid and mount namespace, which I believe is what a mockbuild is.
Is there a way around this? Is there a way to build systemd using mock?
From the test log:
ids of /proc/filesystems are 1256, 1281
the other path for mnt id 1281 is /proc
Assertion ‘path_equal(p, t)’ failed at src/test/test-mountpoint-util.c:94, function test_mnt_id(). Aborting.
Since Koji is simply a mock instance at the backend, there certainly must be. Is this the spec from the Fedora repositories?
Yes it is from the Fedora repositories. What I did was something like this
fedpkg clone systemd
fedpkg switch-branch f32
This is from memory, and excludes some irrelevant details. There were some
less commands interspersed, for example. I have also tried some additional flags like
--no-cleanup-after to try to understand what goes wrong. But the above sequence are the important steps.
That should work, in theory. Perhaps worth asking on the development channels where the systemd maintainers may be able to help. (It’s quite a specific question)
Just in case someone with the same problem stumbles on this thread when googling, I’ll explain what I did in the end.
I got the suggestion to disable nspawn when building. That solved the initial problem, but introduced two other. I was able to work around those too by bind mounting
/tmp into the container. Giving fedpkg the below mock configuration; I was able to build systemd.
config_opts['use_nspawn'] = False
config_opts['plugin_conf']['bind_mount_enable'] = True
config_opts['plugin_conf']['bind_mount_opts']['dirs'].append(('/run', '/run' ))
config_opts['plugin_conf']['bind_mount_opts']['dirs'].append(('/tmp', '/tmp' ))