/var/run/popfile does not get re-created after reboot

Bug #126894 reported by Daniel Hahler
10
Affects Status Importance Assigned to Milestone
popfile (Ubuntu)
Fix Released
Medium
Unassigned
Feisty
Fix Released
Medium
Scott Kitterman

Bug Description

Binary package hint: popfile

After reboot, the popfile log is full of the following entries:
2007/7/19 01:56:36 23039: config: 185: New POPFile instance detected and signalled
2007/7/19 01:56:41 23039: config: 185: New POPFile instance detected and signalled

Additionally, "invoke-rc.d popfile stop" claims that popfile is not running.

The problem is that /var/run/popfile, the default location of the pidfile, does not get created, if it does not exist.

Revision history for this message
Daniel Hahler (blueyed) wrote :

Please find a fix for this attached.

I'm not providing a debdiff yet, because I'm not sure this is the correct way to fix this.

Basically, it adds the following lines to the beginning of the init script:
mkdir -p `dirname $PIDFILE`
chown -R popfile.popfile `dirname $PIDFILE`

Revision history for this message
Steve Kowalik (stevenk) wrote :

I agree with you, in that it isn't the correct way to fix this. Since you're editing a file provided for packaging, as opposed to upstream. I also disagree with using `dirname $PIDFILE`, since the directory the pid file is going to be stored in won't change often, if at all. Secondly, don't use . as a separator for chown, use :

mkdir -p /var/run/popfile
chown -R popfile:popfile /var/run/popfile

Add that directly into the init script, and add a changelog entry. Attach a debdiff to the bug, and I'll have a look at it.

In future, if you want a bug to be noticed, as opposed to by chance, subscribe ubuntu-universe-sponsors.

Revision history for this message
Daniel Hahler (blueyed) wrote :

I see that I should not use dpatch to change a file in debian/, but I still think that using $PIDFILE to create the needed directory makes a lot of sense: it's a environment variable and therefor might get changed. It does no harm to be on the safe side here, does it?

I've taken the chown line from debian/postinst. Should I change the "." to ":" there, too?

Apart from that, I had already merged the new upstream release and sent a debdiff to the Debian maintainer 10 days ago. No reply yet, but I will re-send it, including this patch.

Thanks for looking into this.

Revision history for this message
Steve Kowalik (stevenk) wrote :

Actually, it isn't an environment variable, it's just a variable in the script, it just happens to be that the variable name is in all uppercase.

Changing the postinst would be good too, yes.

Well, we can make the change in Ubuntu and wait for Debian to include it, or you can wait for Debian to take it and then sync it into Ubuntu.

Revision history for this message
Daniel Hahler (blueyed) wrote :

debdiff for feisty-proposed.

Should I add the same debdiff (with changed changelog) for Gutsy?

Debian does not use tmpfs for /var/run, therefor this fix is Ubuntu specific anyway.

Revision history for this message
Scott Kitterman (kitterman) wrote :

Needs to be fixed in Gutsy before an SRU is proposed. The cleanest approach I've seen for this is to do something like:

+ if [ ! -d ${RUNDIR} ] ; then
+ install -o ${USER} -g ${GROUP} -m 755 -d ${RUNDIR} || return 2
+ fi
+

This checks first if the directory exists (you don't want to wipe it out if for some reason more than one instance of the program is run) and then creates it and changes permissions all in one step. Adjust variable names to suite.

Revision history for this message
Scott Kitterman (kitterman) wrote :

Unsubbed UUS as there is nothing to upload yet.

Changed in popfile:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Daniel Hahler (blueyed) wrote :

I've used Scott's advice and created a new debdiff, for gutsy.

Please note, that I've removed the part for popfile-0.22.4/debian/po/templates.pot from the debdiff, because I think it's not relevant, is it?

Revision history for this message
Daniel Hahler (blueyed) wrote :

Updated diff to not build-depend on po-debconf to have only the minimal fix for backporting.

Changed in popfile:
assignee: nobody → kitterman
status: Triaged → In Progress
status: New → Confirmed
Revision history for this message
Daniel Hahler (blueyed) wrote :

popfile (0.22.4-1ubuntu1) gutsy; urgency=low

  * Made sure that /var/run/popfile exists in init.d script
    (LP: #126894)
  * Changed chown separator from '.' to ':'
  * Changed maintainer according to
    https://wiki.ubuntu.com/DebianMaintainerField
  * Standards-Version: 3.7.2
  * Changed Build-Depends-Indep to Build-Depends (lintian)

 -- dAniel hAhler <email address hidden> Thu, 26 Jul 2007 01:09:02 +0200

Changed in popfile:
status: In Progress → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote :

Fix uploaded to Gutsy. Thank you for your contribution to Ubuntu. Please prepare a new debiff for feisty-proposed with just the init, postints, and maintainer changes and appropriate changelog entries.

Changed in popfile:
assignee: kitterman → nobody
status: Fix Released → Fix Committed
assignee: nobody → blueyed
importance: Undecided → Medium
Changed in popfile:
status: Fix Committed → Fix Released
Revision history for this message
Daniel Hahler (blueyed) wrote :

As discussed on IRC, I've only included the fix for init.d and the maintainer change now.

Changed in popfile:
assignee: blueyed → kitterman
status: Confirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into feisty-proposed, please test.

Changed in popfile:
status: In Progress → Fix Committed
Revision history for this message
Daniel Hahler (blueyed) wrote :

popfile (0.22.4-1ubuntu0.1) feisty-proposed; urgency=low

  * Made sure that /var/run/popfile exists in init.d script
    (LP: #126894)
  * Changed maintainer according to
    https://wiki.ubuntu.com/DebianMaintainerField

 -- dAniel hAhler <email address hidden> Mon, 30 Jul 2007 23:58:33 +0200

Changed in popfile:
status: Fix Committed → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote :

dAniel hAhler please send out the mail to the motu list asking for verification testing. That's the next step.

Changed in popfile:
status: Fix Released → Fix Committed
Revision history for this message
Salvatore Palma (palma-salvatore) wrote :

Works for me

Revision history for this message
Luca Falavigna (dktrkranz) wrote :

Tested successfully on Feisty.
Tagging verification-motu-done as per https://wiki.ubuntu.com/StableReleaseUpdates.

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to -updates.

Changed in popfile:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.