apticron should refer to Ubuntu instead of Debian in mail subject

Bug #78357 reported by Daniel Hahler
6
Affects Status Importance Assigned to Milestone
apticron (Debian)
Fix Released
Unknown
apticron (Ubuntu)
Fix Released
Low
Daniel Hahler

Bug Description

Binary package hint: apticron

The mails sent by apticron says "Debian Package Updates on <hostname>".

Instead it should say "Ubuntu Package Updates on <hostname>".

The patch is simple:
----------------------------------------------------------------------------
--- /usr/sbin/apticron.orig 2007-01-07 21:03:12.000000000 +0100
+++ /usr/sbin/apticron 2007-01-07 21:03:25.000000000 +0100
@@ -124,6 +124,6 @@
 apticron
 EOF

- ) 2>&1 | /usr/bin/mailx -s "Debian Package Updates on `/bin/hostname`" $EMAIL
+ ) 2>&1 | /usr/bin/mailx -s "Ubuntu Package Updates on `/bin/hostname`" $EMAIL

 fi
----------------------------------------------------------------------------

Additionally there's a reference in the README.Debian file, but that's ok probably:
# dpkg -L apticron | xargs grep Debian
/usr/share/doc/apticron/README.Debian:apticron for Debian

Maybe the "real fix" would be to make the subject configurable in /etc/apticron/apticron.conf and default to "Ubuntu" for Ubuntu and "Debian" for upstream.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks for reporting this bug and any supporting documentation. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

Changed in apticron:
status: New → Confirmed
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Here is the debdiff

Revision history for this message
Jonathan Marsden (jmarsden) wrote :

I think checking /etc/lsb-release for the name of the distribution may be more appropriate than a straight text patch. This way the patch could be used upstream and we'd avoid a difference between the Debian and Ubuntu versions.

I also spotted a minor typo in the usage message text which I corrected, and I updated the Standards-Version to keep lintian happy :-)

I'll attach a .debdiff. For some reason dch created a ubuntu-specific version for me... anyway, here it is.

The patch becomes:

diff -Nru apticron-1.1.20/apticron apticron-1.1.20ubuntu1/apticron
--- apticron-1.1.20/apticron 2006-10-25 15:36:17.000000000 -0700
+++ apticron-1.1.20ubuntu1/apticron 2008-07-22 20:40:23.000000000 -0700
@@ -2,7 +2,7 @@

 if [ -n "$1" ]; then
        echo "Usage: apticron"
- echo "Mails a list of packaged that are pending-upgrade to the"
+ echo "Mails a list of packages that are pending-upgrade to the"
        echo "email address specified in /etc/apticron/apticron.conf"
        exit 1
 fi
@@ -22,6 +22,10 @@
 # Set the IPADDRESSNUM
 IPADDRESSNUM="1"

+# Source lsb-release to so we know what distribution we are
+DISTRIB_ID="Debian" # Default to Debian
+[ -e /etc/lsb-release ] && . /etc/lsb-release
+
 # Source the config file
 [ -e /etc/apticron/apticron.conf ] && . /etc/apticron/apticron.conf

@@ -132,6 +136,6 @@
 apticron
 EOF

- ) 2>&1 | /usr/bin/mailx -s "Debian package updates on `/bin/hostname`" $EMAIL
+ ) 2>&1 | /usr/bin/mailx -s "$DISTRIB_ID package updates on `/bin/hostname`" $EMAIL

 fi

Jonathan

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

That's a valid point, Jonathan. Thanks for your work.

However, the debdiff should be against version 1.1.21 from Intrepid/Debian unstable: your patch does not apply to it.
Can you re-roll the patch? Otherwise, I could work it out with the current patch, too. Just let me know then.

Changed in apticron:
assignee: nobody → jmarsden
importance: Undecided → Low
status: Confirmed → Triaged
Revision history for this message
Jonathan Marsden (jmarsden) wrote :

> However, the debdiff should be against version 1.1.21 ...

Can you tell I'm new at this? :-) Here is a .debdiff against the 1.1.21 from Intrepid.

Changed in apticron:
assignee: jmarsden → nobody
status: Triaged → Confirmed
Revision history for this message
Jonathan Marsden (jmarsden) wrote :

One more update, fixing Standards-Version so lintian doesn't complain.

Jonathan

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

Thank you.
I'm sponsoring your upload and will forward it to Debian.

Just for the record/learning: you can forward patches from a changed source directory like this (with ubuntu changes) using submittodebian (from ubuntu-dev-tools).

Changed in apticron:
assignee: nobody → blueyed
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apticron - 1.1.21ubuntu1

---------------
apticron (1.1.21ubuntu1) intrepid; urgency=low

  * Use $DISTRIB_ID from /etc/lsb-release for appropriate distribution name.
    - Closes (LP: #78357)
  * Modify Maintainer value to match the DebianMaintainerField
    specification.
  * Update Standards-Version to 3.8.0 in debian/control

 -- Jonathan Marsden <email address hidden> Thu, 24 Jul 2008 22:54:35 -0700

Changed in apticron:
status: In Progress → Fix Released
Changed in apticron:
status: Unknown → New
Changed in apticron:
status: New → Fix Committed
Changed in apticron:
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.