Bug 847405 - cups package script is invalid
cups package script is invalid
Product: Fedora
Classification: Fedora
Component: cups (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tim Waugh
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-08-10 18:01 EDT by Michal Jaegermann
Modified: 2012-08-13 11:21 EDT (History)
11 users (show)

See Also:
Fixed In Version: cups-1.6.1-3.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-08-13 11:21:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2012-08-10 18:01:20 EDT
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 || : 
 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):
Comment 1 Jiri Popelka 2012-08-13 09:49:26 EDT
Does any systemd guru know what's wrong with the following statement from cups.spec ?

%{systemd_post} %{name}.path %{name}.socket %{name}.service
Comment 2 Michal Schmidt 2012-08-13 10:29:29 EDT
Try without the curly brackets around the macro name, like this:

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

In RPM the two forms expand differently.
Comment 3 Michal Schmidt 2012-08-13 10:40:02 EDT
I added a note to the FPC ticket that introduced the current (wrong) Packaging Guideline for systemd scriptlets:

Comment 4 Michal Schmidt 2012-08-13 10:46:32 EDT
And the Guidelines were fixed within two minutes, thanks to Spot!
Comment 5 Jiri Popelka 2012-08-13 11:21:21 EDT
Yes, that's it. Thanks Michal !

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