#318 broken scriptlets %systemd_post
Closed: Fixed None Opened 7 years ago by mmaslano.

Whole analysis is in https://bugzilla.redhat.com/show_bug.cgi?id=983760

In short it looks like we need to require also systemd-units (again?). According to guidelines [1] is my packaging correct.
I require:
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Requires(post): systemd

and scriptlets are using macros for example postun:
%postun
%systemd_postun_with_restart crond.service

The resolution after update of my package is:
postinstall scriptlet (using /bin/sh):

run after an installation

%systemd_post crond.service
/var/tmp/rpm-tmp.Wwb2pw: line 2: fg: no job control
warning: %post(cronie-1.4.11-1.fc20.x86_64) scriptlet failed, exit status 1

I'm not sure if there is a bug in systemd dependencies or in our guidelines.

[1] http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Macroized_scriptlets_.28Fedora_18.2B.29


Buildrequires: systemd
fixes the problem.

Replying to [ticket:318 mmaslano]:

I'm not sure if there is a bug in systemd dependencies or in our guidelines.

Yeah, sounds like one or the other. Is there a bug against systemd? Or some other contact with Lennart to see if it's a problem that needs to be addressed in packaging or a problem that needs to be addressed with an added BuildRequires: for the packaging guidelines?

No, I didn't ask anyone from systemd group yet.

Imho BR: systemd is wrong, because it should be in buildroot before I start a build, shouldn't it?

I don't think that systemd gets pulled in from anything here: https://fedoraproject.org/wiki/Packaging:Guidelines#Exceptions_2

so a BR: systemd should be okay.

Side note to that: I saw a comment on the bugzilla ticket that said BR: systemd was insufficient. BR: systemd-units was needed. Do you know which it is?

I asked systemd guys about it. vpavlin was looking at this issue, because the systemd BR is missing since some strange change in rpm. The correct solution might be different than adding BR, so I'm waiting what will happen next.

Solution is to add BR: systemd in all packages using macro.

Proposal: Add BuildRequires: systemd to the examples here:

http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Macroized_scriptlets_.28Fedora_18.2B.29

Please vote in ticket as lack of this is leading to broken packages.

+1 from me.

+1

We hold these truths yadda yadda yadda. . .

Had more votes in today's meeting. Final tally:

Add BuildRequires: systemd to the examples (.fpc 318)

(+1:5, 0:0, -1:0)

BuildRequires: systemd added to the ScriptletSnippets page.

Announcement text:

Due to changes in which packages are in the minimal set pulled into the buildsystem, BuildRequires: systemd has become necessary for packages which install systemd unit files. The Guidelines have been updated to show this:
http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Macroized_scriptlets_.28Fedora_18.2B.29

Login to comment on this ticket.

Metadata