Bug 908151 - lsyncd throws error on installation due to incomplete mkdir command in post install RPM scriptlet
Summary: lsyncd throws error on installation due to incomplete mkdir command in post i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: lsyncd
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Troy C
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-06 02:38 UTC by William Jamieson
Modified: 2013-10-08 20:38 UTC (History)
6 users (show)

Fixed In Version: lsyncd-2.1.4-4.el6
Clone Of:
Environment:
Last Closed: 2013-10-08 20:38:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Create log directory so the package properly owns it (902 bytes, patch)
2013-03-08 20:42 UTC, Troy C
no flags Details | Diff

Description William Jamieson 2013-02-06 02:38:45 UTC
Description of problem:
The postinstall scriptlet contains the following sh script lines:

> /sbin/chkconfig --add lsyncd
> mkdir -p

The first line is fine (adding the lsyncd service)
The second line throws an error because the the directory to create is not actually specified, thus throwing the following error:
> mkdir: missing operand
> Try `mkdir --help' for more information

Version-Release number of selected component (if applicable):
lsyncd-2.1.4-1.el6.x86_64

How reproducible:
yum install lsyncd

Steps to Reproduce:
1. yum install lsyncd
2.
3.
  
Actual results:
            Installing : lsyncd-2.1.4-1.el6.x86_64      1/1 
          Non-fatal POSTIN scriptlet failure in rpm package lsyncd-2.1.4-1.el6.x86_64
          mkdir: missing operand
          Try `mkdir --help' for more information.
          warning: %post(lsyncd-2.1.4-1.el6.x86_64) scriptlet failed, exit status 1
            Verifying  : lsyncd-2.1.4-1.el6.x86_64      1/1 
          VerifyTransaction time: 0.123
          Transaction time: 0.439

          Installed:
            lsyncd.x86_64 0:2.1.4-1.el6                                                                                                                                                                                                                                                                                                                                  

Expected results:
Install without errors

Additional info:

Comment 1 Troy C 2013-02-06 19:37:29 UTC
Can LSYNCD_OPTIONS in /etc/sysconfig/lsyncd be commented by default in the next rev too?

Currently, that line overrides the value in the init script so the binary isn't given any arguments by default (resulting in a Usage: message).

-T

Comment 2 William Jamieson 2013-02-06 23:51:37 UTC
I agree with Troy C.

The 'LSYNCD_OPTIONS = " "' variable declaration should be commented out of /etc/sysconfig/lsyncd because it overrides the default value as set in /etc/rc.d/init.d/lsyncd:

LSYNCD_OPTIONS="-pidfile /var/run/lsyncd.pid /etc/lsyncd.conf"

This causes lsyncd to fail on using the 'service lsyncd start' command, throwing a command syntax error and showing the usage instructions on screen.  Simply commenting out the 'LSYNCD_OPTIONS = " "' line in /etc/sysconfig/lsyncd fixes the issue.

It is a separate issue though, so not sure if there needs to be a separate bug created.

Comment 3 Paul Wouters 2013-02-11 21:04:12 UTC
will do

Comment 4 Trevor Hemsley 2013-03-07 16:02:06 UTC
This error is more of a problem on `yum update` since it does not remove the older 2.0.4 afterwards.

Comment 5 Trevor Hemsley 2013-03-07 16:04:21 UTC
Please note, this also affects the el5 package as well as the el6 version this bug is raised against.

Comment 6 Fedora Update System 2013-03-07 16:15:46 UTC
lsyncd-2.1.4-3.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/lsyncd-2.1.4-3.el5

Comment 7 Rex Dieter 2013-03-07 16:39:03 UTC
did a el6 build too, but wanted coordinate what to do with
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2013-0387/lsyncd-2.1.4-2.el6
first

Comment 8 Troy C 2013-03-07 19:56:09 UTC
Instead of removing the `mkdir` from the spec file entirely, could the directory /var/log/lsyncd actually be created since a logrotate.d file for that directory is provided?

Comment 9 Rex Dieter 2013-03-07 20:59:58 UTC
That's the wrong fix.  Imo, the directory should be created and owned by the package proper, not created in %post

Comment 10 Troy C 2013-03-08 20:42:20 UTC
Created attachment 707218 [details]
Create log directory so the package properly owns it

thanks for the clarification rdieter!

Comment 11 Troy C 2013-03-08 22:21:02 UTC
Could I also volunteer be a comaintainer of this package? We use it quite frequently.

Comment 12 Fedora Update System 2013-03-09 19:13:43 UTC
Package lsyncd-2.1.4-3.el5:
* should fix your issue,
* was pushed to the Fedora EPEL 5 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing lsyncd-2.1.4-3.el5'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2013-0531/lsyncd-2.1.4-3.el5
then log in and leave karma (feedback).

Comment 13 Paul Wouters 2013-03-12 13:34:07 UTC
sure. just request the ACLs in the packagedb?

Comment 14 Fedora Update System 2013-03-29 13:34:25 UTC
lsyncd-2.1.4-3.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2013-0531/lsyncd-2.1.4-3.el5

Comment 15 Fedora Update System 2013-03-29 21:31:11 UTC
lsyncd-2.1.4-3.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2013-09-25 06:16:47 UTC
lsyncd-2.1.4-4.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/lsyncd-2.1.4-4.el6

Comment 17 Fedora Update System 2013-09-25 17:17:16 UTC
Package lsyncd-2.1.4-4.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing lsyncd-2.1.4-4.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2013-11681/lsyncd-2.1.4-4.el6
then log in and leave karma (feedback).

Comment 18 Fedora Update System 2013-10-08 20:38:55 UTC
lsyncd-2.1.4-4.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.


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