Bug 847405 - cups package script is invalid
Summary: cups package script is invalid
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-10 22:01 UTC by Michal Jaegermann
Modified: 2012-08-13 15:21 UTC (History)
11 users (show)

Fixed In Version: cups-1.6.1-3.fc19
Clone Of:
Environment:
Last Closed: 2012-08-13 15:21:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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 !


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