3

We're going to try out apticron, but we don't want to know about every package that could be updated -- only the security / critical updates. How do we configure apticron to do this?

PS -- yes, we are subscribed to the Debian security announcement list.

PhilAG
  • 53

2 Answers2

1

I had a similar issue, I created a new sources.list file which held only the sources I wanted Apticron to work with

And then I changed the Apticron code so it will use the file I created.

sudo grep "-security" /etc/apt/sources.list | sudo grep -v "#" > /etc/apt/security.sources.list 

Above command will create a new sources list specifically for security.

Inside the /usr/sbin/apticron code I made the following changes.

  • Update the package lists

    /usr/bin/apt-get -qq update -o Dir::Etc::SourceList=/etc/apt/security.sources.list || true
    
  • Get the list of packages which are pending an upgrade

    PKGNAMES=`/usr/bin/apt-get -o Dir::Etc::SourceList=/etc/apt/security.sources.list -q -y --ignore-hold --allow-unauthenticated -s dist-upgrade | \
    /bin/grep ^Inst | /usr/bin/cut -d\  -f2 | /usr/bin/sort`
    

It did work for me. This link contains tutorial how to create and use a different source.list for apt-get.

0

The 'unattend-upgrades' package actually looks promising for what you intend, https://help.ubuntu.com/10.04/serverguide/C/automatic-updates.html Should I have to enable automatic update on Debian lenny stable?

dtbnguyen
  • 337