Debian Bug report logs - #690157
ITP: aptitude-robot -- Automate package choice management

version graph

Package: wnpp; Maintainer for wnpp is wnpp@debian.org;

Reported by: "Elmar S. Heeb" <elmar@heebs.ch>

Date: Wed, 10 Oct 2012 15:09:02 UTC

Owned by: "Elmar S. Heeb" <elmar@heebs.ch>

Severity: wishlist

Fixed in version aptitude-robot/1.2.11-1

Done: elmar@heebs.ch (Elmar S. Heeb)

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, aptitude-devel@lists.alioth.debian.org, wnpp@debian.org:
Bug#690157; Package wnpp. (Wed, 10 Oct 2012 15:09:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Elmar S. Heeb" <elmar@heebs.ch>:
New Bug report received and forwarded. Copy sent to aptitude-devel@lists.alioth.debian.org, wnpp@debian.org. (Wed, 10 Oct 2012 15:09:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "Elmar S. Heeb" <elmar@heebs.ch>
To: submit@bugs.debian.org
Subject: ITP: aptitude-robot -- Automate package choice management
Date: Wed, 10 Oct 2012 17:02:15 +0200
Package: wnpp
Owner: "Elmar S. Heeb" <elmar@heebs.ch>
Severity: wishlist
X-Debbugs-CC: aptitude-devel@lists.alioth.debian.org,
debian-devel@lists.debian.org

* Package name    : aptitude-robot
  Version         : 1.0
  Upstream Author : "Elmar S. Heeb" <elmar@heebs.ch>
* URL             : https://github.com/elmar/aptitude-robot
* License         : GPL-3+
  Programming Lang: Perl
  Description     : Automate package choice management

Framework to use aptitude for automated package management including
upgrade, installation, removal, hold, etc.  Allows you to automate what
you would manually do with aptitude.



Information forwarded to debian-bugs-dist@lists.debian.org, wnpp@debian.org, "Elmar S. Heeb" <elmar@heebs.ch>:
Bug#690157; Package wnpp. (Fri, 16 Nov 2012 03:33:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Hartwig <mandyke@gmail.com>:
Extra info received and forwarded to list. Copy sent to wnpp@debian.org, "Elmar S. Heeb" <elmar@heebs.ch>. (Fri, 16 Nov 2012 03:33:03 GMT) Full text and rfc822 format available.

Message #10 received at 690157@bugs.debian.org (full text, mbox):

From: Daniel Hartwig <mandyke@gmail.com>
To: "Elmar S. Heeb" <elmar@heebs.ch>, 690157@bugs.debian.org, aptitude-devel@lists.alitoh.debian.org
Subject: Re: Bug#690157: ITP: aptitude-robot -- Automate package choice management
Date: Fri, 16 Nov 2012 11:31:22 +0800
On 10 October 2012 23:02, Elmar S. Heeb <elmar@heebs.ch> wrote:
> Framework to use aptitude for automated package management including
> upgrade, installation, removal, hold, etc.  Allows you to automate what
> you would manually do with aptitude.

See also pkgsync, cron-apt, apticron.

I note that the configuration is an imperative style: an explicit list
of (aptitude-specific) actions to take.  I suspect that with a
declarative config. (similar to pkgsync) there would be less
unexpected side-effects.  Clearly this program is simply meant as an
automated interface to aptitude, although I think that most use cases
would be covered by pkgsync if also supported list of packages to
*not* upgrade.

Any comments on the distinction, and the particular novelties of your approach?

Any ideas how it could synchronize with the periodic apt script that
performs update, clean, etc.?

From aptitude-robot-session:

> # yes "" forces the default answer to any configuration question
> nice yes "" | /usr/sbin/aptitude-robot

Have you considered something more explicit, such as:

# aptitude -y -o DPkg::Options::=--force-confdef \
   -o DPkg::Options::=--force-confold …

Though these options currently have problems when a package fails to
install or remove.

From TODO:

> * allow package+ and package&M (or &m) to be both specified for the
>   same package (currently the last one wins)

I guess you would combine these internally to “+M”?

Regards



Information forwarded to debian-bugs-dist@lists.debian.org, wnpp@debian.org, "Elmar S. Heeb" <elmar@heebs.ch>:
Bug#690157; Package wnpp. (Fri, 16 Nov 2012 03:57:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Hartwig <mandyke@gmail.com>:
Extra info received and forwarded to list. Copy sent to wnpp@debian.org, "Elmar S. Heeb" <elmar@heebs.ch>. (Fri, 16 Nov 2012 03:57:03 GMT) Full text and rfc822 format available.

Message #15 received at 690157@bugs.debian.org (full text, mbox):

From: Daniel Hartwig <mandyke@gmail.com>
To: "Elmar S. Heeb" <elmar@heebs.ch>, 690157@bugs.debian.org, aptitude-devel@lists.alioth.debian.org
Subject: Re: Bug#690157: ITP: aptitude-robot -- Automate package choice management
Date: Fri, 16 Nov 2012 11:52:04 +0800
On 16 November 2012 11:31, Daniel Hartwig <mandyke@gmail.com> wrote:
> See also pkgsync, cron-apt, apticron.

Excuse me, but apticron should not be in that list.



Information forwarded to debian-bugs-dist@lists.debian.org, wnpp@debian.org, "Elmar S. Heeb" <elmar@heebs.ch>:
Bug#690157; Package wnpp. (Fri, 16 Nov 2012 12:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Axel Beckert <abe@debian.org>:
Extra info received and forwarded to list. Copy sent to wnpp@debian.org, "Elmar S. Heeb" <elmar@heebs.ch>. (Fri, 16 Nov 2012 12:39:03 GMT) Full text and rfc822 format available.

Message #20 received at 690157@bugs.debian.org (full text, mbox):

From: Axel Beckert <abe@debian.org>
To: aptitude-devel@lists.alitoh.debian.org
Cc: 690157@bugs.debian.org, "Elmar S. Heeb" <elmar@heebs.ch>
Subject: Re: [Aptitude-devel] Fwd: Bug#690157: ITP: aptitude-robot -- Automate package choice management
Date: Fri, 16 Nov 2012 13:36:02 +0100
Hi,

Daniel Hartwig wrote:
> On 10 October 2012 23:02, Elmar S. Heeb <elmar@heebs.ch> wrote:
> > Framework to use aptitude for automated package management including
> > upgrade, installation, removal, hold, etc.  Allows you to automate what
> > you would manually do with aptitude.
> 
> See also pkgsync, cron-apt, apticron.

We used cron-apt before for a long time. It just does upgrades or mail
about pending upgrades and as far as I know you can't tell them that
they should upgrade some packages and some not.

pkgsync is much closer to what we have in mind with aptitude-robot and
after looking at the source code, I must admit that the way it uses
aptitude is very close to ours. (From the description alone it looked
less like what we have in mind.)

> I note that the configuration is an imperative style: an explicit list
> of (aptitude-specific) actions to take.  I suspect that with a
> declarative config. (similar to pkgsync) there would be less
> unexpected side-effects.

Actually our first thoughts were even closer to pkgsync than we are
now.

> Clearly this program is simply meant as an automated interface to
> aptitude, although I think that most use cases would be covered by
> pkgsync if also supported list of packages to *not* upgrade.

As you noticed, the main difference to pkgsync is that aptitude-robot
allows to automatically upgrade most packages but to not automatically
upgrade some explicitly listed packages.

To make that easier with different sets of hosts or single hosts which
need indiviual changes we use run-parts to read in the package lists
from multiple, ordered files.

With this it's possible to distribute the base package list to
all hosts while other, more specific package lists will be distributed
only to a subset of the hosts. These package lists can override
entries in the base package list, especially they can prevent
automatic upgrades of a package on individual hosts while they get
automatically upgraded on most hosts.

The idea behind this is that while we can do fully automatic upgrades
on workstations, we want controlled upgrades of core services on
servers while automatic upgrading stuff like commandline utilities is
fine.

There are also cases where we want automatic upgrades of specific
server software one most hosts, but not on all. Common examples for
this are Apache and Postfix:

Postfix is installed on all our servers. Those which need postfix
just to send mails themselves have a simple default configuration and
postfix on them is not really critical. On the other hand, Postfix
also runs on our primary mail server and while its ok to automatically
upgrade commandline utilities on that box, we do not want automatic
upgrades of Postfix there.

Same situation with Apache: While Apache is installed on quite some
boxes to provide access to local statistic web pages or simple web
interfaces, it also runs on our primary webserver with several
hundered VHosts. We do not want automatic Apache upgrades there while
they're fine on other infrastructure servers.

There are some more differences, partially in the details:

* We allow both, holds and keeps to be configured.
* We allow both, purges and removes to be configured.
* We honour aptitude holds (ok, that would be trivial to implement
  in pkgsync, i.e. it's probably a bug in pkgsync that it doesn't
  honour holds. :-)
* aptitude-robot by itself allows questions to be presented on the
  commandline. Only aptitude-robot-session will silence those
  questions.

> Any comments on the distinction, and the particular novelties of
> your approach?

aptitude-robot should be as close as possible to the interactive use.
So, yes, it's on purpose rather imperative than declarative.
Essentially you should be able to "record" your interactive session
and write it down as configuration files for aptitude-robot.

> Any ideas how it could synchronize with the periodic apt script that
> performs update, clean, etc.?

From our experience there is an inherent problem between multiple
tools handling automatic package list updates and package upgrades
stepping on each others toes. This is the main reason why we stopped
using cron-apt and disabled apt periodic in favour of aptitude-robot.

But our discussion about how to reply to this question just gave us
the idea that we may be able to run aptitude-robot triggered by apt
periodic. We'll investigate this idea.

> From aptitude-robot-session:
> 
> > # yes "" forces the default answer to any configuration question
> > nice yes "" | /usr/sbin/aptitude-robot
> 
> Have you considered something more explicit, such as:
> 
> # aptitude -y -o DPkg::Options::=--force-confdef \
>    -o DPkg::Options::=--force-confold …

Good point! Thanks.

> Though these options currently have problems when a package fails to
> install or remove.
> 
> From TODO:
> 
> > * allow package+ and package&M (or &m) to be both specified for the
> >   same package (currently the last one wins)
> 
> I guess you would combine these internally to “+M”?

Yes and no. See http://bugs.debian.org/693144

		Regards, Axel and Elmar
-- 
 ,''`.  |  Axel Beckert <abe@debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-    |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5



Information forwarded to debian-bugs-dist@lists.debian.org, wnpp@debian.org, "Elmar S. Heeb" <elmar@heebs.ch>:
Bug#690157; Package wnpp. (Fri, 16 Nov 2012 14:09:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Hartwig <mandyke@gmail.com>:
Extra info received and forwarded to list. Copy sent to wnpp@debian.org, "Elmar S. Heeb" <elmar@heebs.ch>. (Fri, 16 Nov 2012 14:09:07 GMT) Full text and rfc822 format available.

Message #25 received at 690157@bugs.debian.org (full text, mbox):

From: Daniel Hartwig <mandyke@gmail.com>
To: 690157@bugs.debian.org, "Elmar S. Heeb" <elmar@heebs.ch>
Cc: aptitude-devel@lists.alioth.debian.org
Subject: Re: Bug#690157: ITP: aptitude-robot -- Automate package choice management
Date: Fri, 16 Nov 2012 22:08:17 +0800
On 16 November 2012 20:36, Axel Beckert <abe@debian.org> wrote:
> We used cron-apt before for a long time. It just does upgrades or mail
> about pending upgrades and as far as I know you can't tell them that
> they should upgrade some packages and some not.

On a single system, possible, since you basically specify the complete
apt command line(s).  When trying to use a central config plus local
tweaks that is definitely not easy :-)

> pkgsync is much closer to what we have in mind with aptitude-robot and
> after looking at the source code, I must admit that the way it uses
> aptitude is very close to ours. (From the description alone it looked
> less like what we have in mind.)

I had somewhat imagined the setup you later describe, though with your
details I can easily see how a declarative syntax would also have to
be rather complex to handle that level of local-system overriding and
so on.

I once had a pipe dream of a declarative syntax that would support
default actions and package lists (like pkgsel's “make sure these are
installed, and these others are not”) with local overrides, and it
ended up looking a lot like apt_preferences :-/

>> Clearly this program is simply meant as an automated interface to
>> aptitude, although I think that most use cases would be covered by
>> pkgsync if also supported list of packages to *not* upgrade.
>
> As you noticed, the main difference to pkgsync is that aptitude-robot
> allows to automatically upgrade most packages but to not automatically
> upgrade some explicitly listed packages.
>
> To make that easier with different sets of hosts or single hosts which
> need indiviual changes we use run-parts to read in the package lists
> from multiple, ordered files.

I had assumed that pkgsync supported a similar run-parts type config,
allowing local overrides, etc..  But anyway, it can't do what you want
unless you can override the default to “upgrade all packages” with
“but not package X and Y on some host.”  (Also the inability to
control holds and such.)

Well I wish you gentlemen success.  It seems that you already have
quite a useful tool to work with.

>> Any ideas how it could synchronize with the periodic apt script that
>> performs update, clean, etc.?
>
> From our experience there is an inherent problem between multiple
> tools handling automatic package list updates and package upgrades
> stepping on each others toes.

Indeed.

> But our discussion about how to reply to this question just gave us
> the idea that we may be able to run aptitude-robot triggered by apt
> periodic. We'll investigate this idea.

If only it had a hook to run post-update and pre-clean …

>
>> From aptitude-robot-session:
>>
>> > # yes "" forces the default answer to any configuration question
>> > nice yes "" | /usr/sbin/aptitude-robot
>>
>> Have you considered something more explicit, such as:
>>
>> # aptitude -y -o DPkg::Options::=--force-confdef \
>>    -o DPkg::Options::=--force-confold …
>
> Good point! Thanks.

Note that the dpkg options are ignored when aptitude tries “dpkg
--configure -a” to fix a failed install.

https://bugs.launchpad.net/bugs/257279

Regards



Added tag(s) pending. Request was from Anibal Monsalve Salazar <anibal@debian.org> to control@bugs.debian.org. (Wed, 13 Feb 2013 19:06:05 GMT) Full text and rfc822 format available.

Reply sent to elmar@heebs.ch (Elmar S. Heeb):
You have taken responsibility. (Mon, 08 Apr 2013 22:03:09 GMT) Full text and rfc822 format available.

Notification sent to "Elmar S. Heeb" <elmar@heebs.ch>:
Bug acknowledged by developer. (Mon, 08 Apr 2013 22:03:09 GMT) Full text and rfc822 format available.

Message #32 received at 690157-close@bugs.debian.org (full text, mbox):

From: elmar@heebs.ch (Elmar S. Heeb)
To: 690157-close@bugs.debian.org
Subject: Bug#690157: fixed in aptitude-robot 1.2.11-1
Date: Mon, 08 Apr 2013 22:00:07 +0000
Source: aptitude-robot
Source-Version: 1.2.11-1

We believe that the bug you reported is fixed in the latest version of
aptitude-robot, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 690157@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Elmar S. Heeb <elmar@heebs.ch> (supplier of updated aptitude-robot package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Wed, 13 Feb 2013 15:05:54 +0100
Source: aptitude-robot
Binary: aptitude-robot
Architecture: source all
Version: 1.2.11-1
Distribution: unstable
Urgency: low
Maintainer: Elmar S. Heeb <elmar@heebs.ch>
Changed-By: Elmar S. Heeb <elmar@heebs.ch>
Description: 
 aptitude-robot - Automate package choice management
Closes: 690157
Changes: 
 aptitude-robot (1.2.11-1) unstable; urgency=low
 .
   Upload to Debian (Closes: #690157)
 .
   [ Elmar S. Heeb ]
   * do not report packages on hold in mail
 .
   [ Axel Beckert ]
   * Update lintian override for init.d-script-missing-dependency-on-… to
     please newer lintian versions.
   * Add lintian override for init.d-script-does-not-implement-optional-option
   * Use dh-autoreconf to (re)create Makefile to be able to build straight
     from git repo, too.
Checksums-Sha1: 
 3caa58cffdd1670b82a188259ae74e16399471a3 1375 aptitude-robot_1.2.11-1.dsc
 2fbd039602001e99026a5f6c87c8d8d666149ce2 74686 aptitude-robot_1.2.11.orig.tar.gz
 a46837f7e9a5bacdd85ea9c983da2e946e80763d 4434 aptitude-robot_1.2.11-1.debian.tar.gz
 db34ff8f8cefcba3a7b2de707ea9c01274166853 21140 aptitude-robot_1.2.11-1_all.deb
Checksums-Sha256: 
 68aef3c7fde476110269d5c9d1e3b6c510b2c7375ee502f0e117bb179a86513e 1375 aptitude-robot_1.2.11-1.dsc
 618be1de549115c69a2ba797124197240cb2843db04a4aa509b7951667fb7c6e 74686 aptitude-robot_1.2.11.orig.tar.gz
 b823116edcef98a763dd62bf020ac25afea4fdc09504398de83764ac3b5cb82e 4434 aptitude-robot_1.2.11-1.debian.tar.gz
 94a439821c79bb26dd7b10d2ee92b2390929ca1625e88875ce3af014cf5c62f1 21140 aptitude-robot_1.2.11-1_all.deb
Files: 
 09f8f18c71cad4638387e391c5621c68 1375 admin extra aptitude-robot_1.2.11-1.dsc
 1a814b6215dcdb7202f34001ae8c19a9 74686 admin extra aptitude-robot_1.2.11.orig.tar.gz
 3f7da5def9909f3de9a75b40a034fc63 4434 admin extra aptitude-robot_1.2.11-1.debian.tar.gz
 089c6c9d979de65db13c8f8d5d77a8da 21140 admin extra aptitude-robot_1.2.11-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlEbpNMACgkQwJ4diZWTDt7M2ACeIoGskOU9YfGI8IzwiFgskv6k
G3EAnijku6tMfEwxjxWAYOPC2LKe6IXe
=/IJp
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 07 May 2013 07:29:11 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 05:51:13 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.