Bad sed syntax in mcollective-plugins-facts-facter.postrm

Bug #994357 reported by Shane Madden
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mcollective-plugins (Ubuntu)
Fix Released
Undecided
Marc Cluet
Precise
Fix Released
Medium
Unassigned

Bug Description

The postrm script for mcollective-plugins-facts-facter is broken. Looks like it was never tested, since it's got plainly broken sed syntax on line 8:

sed -i -e "s/^factsource.*/factsource = yaml\nplugin.yaml = /etc/mcollective/facts.yaml/" /etc/mcollective/server.cfg

No escaping has been done on the forward slashes in the file path for '/etc/mcollective/facts.yaml'. The package cannot be removed without manually fixing this sed command; removal attempts result in an error:

Removing mcollective-plugins-facts-facter ...
sed: -e expression #1, char 52: unknown option to `s'
dpkg: error processing mcollective-plugins-facts-facter (--remove):
 subprocess installed post-removal script returned error exit status 1

############## SRU ###############
[Impact]
Package mcollective-plugins-facts-facter will never uninstall properly

[Development Fix]
Fixed on package mcollective-plugins_0.0.0~git20120507.df2fa81-0ubuntu1 for quantal

[Stable Fix]
Modified sed line, attached debdiff and checked that the sed line works properly now

[Test Case]
Install mcollective-plugins-facts-facter package, then proceed to uninstall it

[Regression Potential]
Very unlikely

Revision history for this message
Marc Cluet (lynxman) wrote :

Hi Shane,

Thanks for your bug report, you're right, it does indeed break, my apologies!

Working on a fix right now.

Changed in mcollective-plugins (Ubuntu):
status: New → Confirmed
assignee: nobody → Marc Cluet (lynxman)
Revision history for this message
Marc Cluet (lynxman) wrote :
description: updated
Marc Cluet (lynxman)
Changed in mcollective-plugins (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mcollective-plugins - 0.0.0~git20120507.df2fa81-0ubuntu1

---------------
mcollective-plugins (0.0.0~git20120507.df2fa81-0ubuntu1) quantal; urgency=low

  * Updated from upstream for Quantal
  * Fix for mcollective-plugins-facter postrm script error (LP: #994357)
 -- Marc Cluet <email address hidden> Mon, 07 May 2012 18:47:02 +0100

Changed in mcollective-plugins (Ubuntu):
status: In Progress → Fix Released
Changed in mcollective-plugins (Ubuntu Precise):
status: New → Triaged
importance: Undecided → Medium
tags: added: packaging
Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

I sponsored the upload to precise-proposed. Now an archive-admin will need to push it through the queue.

Thanks for your work Marc!

Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Shane, or anyone else affected,

Accepted mcollective-plugins into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in mcollective-plugins (Ubuntu Precise):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Stéphane Graber (stgraber) wrote :

I seem to sometimes get trigger related errors on removal but that's likely caused by the fact that I don't actually have mcollective configured properly.

mcollective-plugins-facts-facter itself gets removed fine and no longer crashes on the sed call, so considering it a pass.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mcollective-plugins - 0.0.0~git20120105.9b90c2b-0ubuntu3

---------------
mcollective-plugins (0.0.0~git20120105.9b90c2b-0ubuntu3) precise-proposed; urgency=low

  * Fix for mcollective-plugins-facter postrm script error (LP: #994357)
 -- Marc Cluet <email address hidden> Mon, 07 May 2012 18:47:02 +0100

Changed in mcollective-plugins (Ubuntu Precise):
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.