Make virt-pki-validate usable on Ubuntu

Bug #562266 reported by Jeppe Fihl-Pearson
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
Medium
Dustin Kirkland 
Lucid
Fix Released
Medium
Dustin Kirkland 

Bug Description

The currently existing 'virt-pki-validate' on Ubuntu 10.04 has some flaws, which I've tried to correct in the attached patch.
- It changes the interpreter to /bin/bash instead of /bin/sh, this removes an 'unexpected operator' warning which can occur on line 140.
- Removed references to SYSCONFDIR and changed those to '/etc'.
- Corrected a 'sed' call to remove a tab from the line it is formatting, in order to make the rest of the checks in the script work properly.

There are still some references to '/etc/sysconfig/iptables' in the script, which does not exist on Ubuntu. This should probably either be changed to check the UFW configuration, current loaded iptables rules, or simply be removed from the check. However, these checks are skipped when '/etc/sysconfig/iptables' does not exist.

Related branches

Revision history for this message
Jeppe Fihl-Pearson (tenzer-deactivatedaccount) wrote :
Thierry Carrez (ttx)
Changed in libvirt (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Thierry Carrez (ttx) wrote :

Dustin, do you think it's reasonable to fix this in the same post-RC libvirt upload ?

Changed in libvirt (Ubuntu Lucid):
assignee: nobody → Dustin Kirkland (kirkland)
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Yeah, I can probably take care of this.

I think I'd clean the patch up a little by:
 a) minimize the lines touched by:
[ -z "$SYSCONFDIR" ] && SYSCONFDIR="/etc"
 b) leave interpreter as /bin/sh and fix bashims

tags: added: patch
Changed in libvirt (Ubuntu Lucid):
status: Triaged → In Progress
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Fix committed, in the UNAPPROVED queue for lucid, awaiting ubuntu-release approval post RC.

Also, patch submitted to upstream mailing list.

Changed in libvirt (Ubuntu Lucid):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 0.7.5-5ubuntu27

---------------
libvirt (0.7.5-5ubuntu27) lucid; urgency=low

  * debian/libvirt-bin.postinst: ensure that the convenience feature
    of adding users to the libvirtd group does cause package setup
    failure, LP: #565380
  * debian/patches/9023-virt-pki-validate_fixes.patch: fix a bashism,
    a missing autoconf substitution, and an insufficient sed call, in
    order to get this working on Ubuntu, LP: #562266; patch submitted
    upstream
 -- Dustin Kirkland <email address hidden> Wed, 21 Apr 2010 15:59:49 -0500

Changed in libvirt (Ubuntu Lucid):
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.