Bug 847405

Summary: cups package script is invalid
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: johannbg, jpopelka, lnykryn, metherid, mschmidt, msekleta, notting, plautrba, systemd-maint, twaugh, vpavlin
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cups-1.6.1-3.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-13 15:21:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Jaegermann 2012-08-10 22:01:20 UTC
Description of problem:

After an update to cups-1.6.1-2.fc19 its postinstall scriptlet starts like that:

if [ $1 -eq 1 ] ; then 
        # Initial installation 
        /usr/bin/systemctl preset  >/dev/null 2>&1 || : 
fi 
 cups.path cups.socket cups.service
.....

As one should expect this fails with "line 6: cups.path: command not found".
Some spec macros got "lost"?

Version-Release number of selected component (if applicable):
cups-1.6.1-2.fc19

Comment 1 Jiri Popelka 2012-08-13 13:49:26 UTC
Does any systemd guru know what's wrong with the following statement from cups.spec ?

%post
%{systemd_post} %{name}.path %{name}.socket %{name}.service

Comment 2 Michal Schmidt 2012-08-13 14:29:29 UTC
Try without the curly brackets around the macro name, like this:

%post
%systemd_post %{name}.path %{name}.socket %{name}.service

In RPM the two forms expand differently.

Comment 3 Michal Schmidt 2012-08-13 14:40:02 UTC
I added a note to the FPC ticket that introduced the current (wrong) Packaging Guideline for systemd scriptlets:

https://fedorahosted.org/fpc/ticket/190#comment:17

Comment 4 Michal Schmidt 2012-08-13 14:46:32 UTC
And the Guidelines were fixed within two minutes, thanks to Spot!

Comment 5 Jiri Popelka 2012-08-13 15:21:21 UTC
Yes, that's it. Thanks Michal !