Bug 1476005 - systemd fails to build for non-root system user
Summary: systemd fails to build for non-root system user
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-27 19:48 UTC by Troy Dawson
Modified: 2017-07-31 20:19 UTC (History)
8 users (show)

Fixed In Version: systemd-234-5.fc27
Clone Of:
Environment:
Last Closed: 2017-07-31 20:19:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch to fix builds for non-root system users (2.80 KB, patch)
2017-07-27 20:07 UTC, Troy Dawson
no flags Details | Diff

Description Troy Dawson 2017-07-27 19:48:49 UTC
Description of problem:
When trying to build systemd as a non-root system user my builds fail on the tests.  Example: if mockbuild's uid is set to 996

Version-Release number of selected component (if applicable):
systemd-234-3.fc27

How reproducible:
100%

Steps to Reproduce:
1.Create a system user
2.rebuild the systemd rpm as that system user
3.

Actual results:
...
ConditionUser=996 → 1
ConditionUser=997 → 0
ConditionUser=mockbuild → 1
ConditionUser=root → 0
ConditionUser=@system → 1
Assertion 'r == 0' failed at ../src/test/test-condition.c:396, function test_condition_test_user(). Aborting.
...
And then normal failling errors after that.

Expected results:
rpm to build

Additional info:
This is a known bug already fixed upstream with a simple one line fix.
https://github.com/systemd/systemd/issues/6366

Comment 1 Troy Dawson 2017-07-27 20:07:17 UTC
Created attachment 1305642 [details]
Patch to fix builds for non-root system users

I have attached a patch that fixes the test for non-root system users.

Comment 2 Troy Dawson 2017-07-27 20:12:30 UTC
This is blocking some automated building for the bootstrap and module team.  We understand that there is a workaround on our end, by raising our mockbuild uid to 1000 or above.  But we are concerned about hitting this again on other systems, so if we could get this fixed in a timely manner we would appreciate it.

We understand that time is important and that not everyone has time to work on bug that don't directly affect their builds.  If you are unable to update the rpm within two weeks, we will have a proven packager apply the patch in this bug.
If you know you will be too busy and wouldn't mind us applying it sooner, just let us know.

Comment 3 Zbigniew Jędrzejewski-Szmek 2017-07-27 23:08:40 UTC
This was already fixed upstream: https://github.com/systemd/systemd/commit/708d423915. I'll push that patch instead.


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