ubuntu patch 05aptitude (aptitude) contains sudo setting also in 00aptitude (user-setup)

Bug #1033838 reported by Shahar Or
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
aptitude (Ubuntu)
Fix Released
High
Unassigned
user-setup (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

aptitude::Get-Root-Command "sudo:/usr/bin/sudo";

Set in 05aptitude (aptitude) and 00aptitude (user-setup). The user-setup file is generated only if root-login is disabled in the installer and co-incides with settings for other programs to use sudo.

Setting this twice at two different priorities (00 vs. 05) can be problematic if the admin is trying to override the setting. Ubuntu maintainers should decide which is the canonical location for this setting — the older 05aptitude or the more recent 00aptitude — and remove the other.

[ Original Report ]

It doesn't seem right to me...

dpkg -S 00aptitude suggests that no package contains 00aptitude.
dpkg -S 05aptitude suggests that aptitude contains 05aptitude.

So... Perhaps this is a result of a left-over file from an aptitude package upgrade?

Thanks,
Shahar

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: aptitude 0.6.6-1ubuntu2
ProcVersionSignature: Ubuntu 3.5.0-8.8-generic 3.5.0
Uname: Linux 3.5.0-8-generic i686
ApportVersion: 2.4-0ubuntu6
Architecture: i386
Date: Tue Aug 7 10:04:24 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta i386 (20120421)
ProcEnviron:
 TERM=screen-bce
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: aptitude
UpgradeStatus: Upgraded to quantal on 2012-07-12 (25 days ago)

Revision history for this message
Shahar Or (mightyiam) wrote :
Revision history for this message
Daniel Hartwig (wigs) wrote : Re: [Bug 1033838] [NEW] both 00aptitude and 05aptitude in /etc/apt/apt.conf.d

On 7 August 2012 15:08, Shahar Or <email address hidden> wrote:
> dpkg -S 00aptitude suggests that no package contains 00aptitude.
> dpkg -S 05aptitude suggests that aptitude contains 05aptitude.
>
> So... Perhaps this is a result of a left-over file from an aptitude
> package upgrade?

aptitude has only contained 05aptitude going back at least as far as
hardy [1]. Provide output from:

$ (x=/etc/apt/apt.conf.d/00aptitude; ls -l $x; cat $x)

[1] http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/hardy/aptitude/hardy/view/head:/debian/05aptitude

 status incomplete

Changed in aptitude (Ubuntu):
status: New → Incomplete
Revision history for this message
Shahar Or (mightyiam) wrote : Re: both 00aptitude and 05aptitude in /etc/apt/apt.conf.d

shahar@shahar-netbook:~$ (x=/etc/apt/apt.conf.d/00aptitude; ls -l $x; cat $x)
-rw-r--r-- 1 root root 49 May 30 21:17 /etc/apt/apt.conf.d/00aptitude
Aptitude::Get-Root-Command "sudo:/usr/bin/sudo";

Perhaps I made this? I don't remember doing this and also don't see reason why I could have.

Changed in aptitude (Ubuntu):
status: Incomplete → New
Revision history for this message
Daniel Hartwig (wigs) wrote : Re: [Bug 1033838] Re: both 00aptitude and 05aptitude in /etc/apt/apt.conf.d

On 7 August 2012 16:07, Shahar Or <email address hidden> wrote:
> shahar@shahar-netbook:~$ (x=/etc/apt/apt.conf.d/00aptitude; ls -l $x; cat $x)
> -rw-r--r-- 1 root root 49 May 30 21:17 /etc/apt/apt.conf.d/00aptitude
> Aptitude::Get-Root-Command "sudo:/usr/bin/sudo";
>
> Perhaps I made this? I don't remember doing this and also don't see
> reason why I could have.

Perhaps.

> InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta
> i386 (20120421)

Don't see that this file could have come from package aptitude
since that install. A search on packages.u.c for 00aptitude
turns up nothing as well. The mystery remains.

 status invalid

If you locate the source and believe it still constitutes a bug
please reopen and assign it to the proper package.

Changed in aptitude (Ubuntu):
status: New → Invalid
Revision history for this message
Shahar Or (mightyiam) wrote : Re: both 00aptitude and 05aptitude in /etc/apt/apt.conf.d

hehe,
OK thank you :)

Revision history for this message
Adrien Beau (adrienbeau) wrote :

I have noticed this issue, too, on three different machines, all running 12.04.1 LTS. Two of them are Kubuntu desktops installed by me, one other is an Ubuntu Server installed by my service provider.

Actually, /etc/apt/apt.conf.d/00aptitude is not the only surprising file, there is also /etc/apt/apt.conf.d/00trustcdrom.

I am positive I have not created the files. I have been unable to find which program could have created them. I have grepped the whole hard drive of the machines, and also the source code for aptitude-0.6.8.2, apt-0.8.10.3+squeeze1, muon-1.3.1, to no avail.

I have noticed two interesting things. On the machines I control, those two files have most likely been generated locally, and not extracted from an archive. Here's a listing of one of my apt.conf.d directories showing why I think that:

-rw-r--r-- 1 root root 49 2012-11-01 21:04:10.927496746 +0100 00aptitude
-rw-r--r-- 1 root root 40 2012-11-01 21:01:19.758647967 +0100 00trustcdrom
-rw-r--r-- 1 root root 430 2012-04-20 12:21:55.000000000 +0200 01autoremove
-rw-r--r-- 1 root root 157 2012-03-30 19:18:30.000000000 +0200 05aptitude
-rw-r--r-- 1 root root 129 2011-08-22 13:58:02.000000000 +0200 10periodic
-rw-r--r-- 1 root root 108 2011-08-22 13:58:02.000000000 +0200 15update-stamp
-rw-r--r-- 1 root root 85 2011-08-22 13:58:02.000000000 +0200 20archive
-rw-r--r-- 1 root root 123 2012-04-20 12:21:55.000000000 +0200 20changelog
-rw-r--r-- 1 root root 2124 2012-03-12 10:03:53.000000000 +0100 50unattended-upgrades
-rw-r--r-- 1 root root 182 2012-03-15 14:21:13.000000000 +0100 70debconf
-rw-r--r-- 1 root root 231 2011-08-22 13:58:02.000000000 +0200 99update-notifier

As you can see, the first two files are the only one to have sub-second timestamps. Generally, it seems to me extracted files have no sub-second timestamps, in contrast to files generated locally.

The other interesting thing is, thanks to /var/log/aptitude*, /var/log/dpkg*, /var/log/history.log* and /var/log/term.log*, I can say with some confidence that:

- These files were not created during the initial install of the machine;
- These files were created a couple of minutes before the first round of install/updates done by the package manager (on one of the machines, *months* passed between the initial install and the first round of updates, so I am sure they were created right before the updates);
- I had not installed Aptitude at the time these files were created;
- I was most likely using the package manager available in KDE when those files were created (Muon I believe).

So, I believe these files were somehow created by Muon, maybe indirectly.

Changed in aptitude (Ubuntu):
status: Invalid → New
Revision history for this message
Daniel Hartwig (wigs) wrote :

00aptitude is generated by user-setup, when root-login is disabled. It contains one setting:

Aptitude::Get-Root-Command "sudo:/usr/bin/sudo";

which is also set in 05aptitude, shipped with /Ubuntu's/ aptitude package. The user-setup code seems more universal, being conditional on root-login disable, also contained in Debian, and co-located with settings for other programs to also use sudo.

Setting this option twice is redundant, and may lead to race conditions in configuration (e.g. if there is an override between 00 and 05). Ubuntu maintainers should decide which is the canonical location for the setting and remove the other.

**

user-setup (1.36) unstable; urgency=low

   [ Otavio Salvador ]
   * Configure aptitude to use sudo if possible. Thanks to Mehdi Dogguy
     by reporting it.

   [ Updated translations ]
   * Sinhala (si.po) by Danishka Navin
   * Slovenian (sl.po) by Vanja Cvelbar

 -- Otavio Salvador <email address hidden> Wed, 24 Nov 2010 09:55:39 -0200

Changed in aptitude (Ubuntu):
status: New → Confirmed
summary: - both 00aptitude and 05aptitude in /etc/apt/apt.conf.d
+ 05aptitude (aptitude) contains sudo setting also in 00aptitude (user-
+ setup)
Changed in user-setup (Ubuntu):
status: New → Confirmed
status: Confirmed → New
Changed in aptitude (Ubuntu):
status: Confirmed → New
summary: - 05aptitude (aptitude) contains sudo setting also in 00aptitude (user-
- setup)
+ ubuntu patch 05aptitude (aptitude) contains sudo setting also in
+ 00aptitude (user-setup)
Daniel Hartwig (wigs)
description: updated
Revision history for this message
Daniel Hartwig (wigs) wrote :

After a long period of disinterest I am delcaring user-setup ok. It is in aptitude that the duplicate config should be removed.

Changed in user-setup (Ubuntu):
status: New → Invalid
Changed in aptitude (Ubuntu):
status: New → Confirmed
Changed in aptitude (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package aptitude - 0.6.8.2-1ubuntu2

---------------
aptitude (0.6.8.2-1ubuntu2) saucy; urgency=low

  * Remove debian/05aptitude:
    - sudo setting is redundant with user-setup (LP: #1033838)
    - Keep-Unused-Pattern setting is redundant with apts NeverAutoRemove,
      which conflicts with an apt update to permit autoremoval of old kernel
      images (LP: #923876, #1053776)
    - Thanks to Daniel Hartwig for the patch.
    - Remove 05aptitude from debian/aptitude.install
 -- Brian Murray <email address hidden> Mon, 23 Sep 2013 17:05:47 -0700

Changed in aptitude (Ubuntu):
status: Triaged → 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.