DE-IBH / apt-dater

terminal-based remote package update manager
GNU General Public License v2.0
101 stars 24 forks source link

Update a single package on many host #97

Open JGroselle opened 9 years ago

JGroselle commented 9 years ago

Hello,

First of all thank you for this tool. Really efficient. Is it possible to update a defined package for a selected group ? For example:

The command line should be:

apt-get install --only-upgrade libjpeg-dev

This feature is really important for us. Thank you.

DejavuDmitry commented 9 years ago

I'm supporting this feature request.

kiranos commented 9 years ago

can you explain a scenario where you dont want to do upt-get upgrade instead of upgrade a single package. For security reasons its a good rule to follow to try to keep all packages up2date.

Im just thinking about keeping apt-dater with minimal very usable features so it dont become cluttered with features only very few uses. Would be great to hear about scenarios where you dont want to do apt-get dist-upgrade|upgrade

JGroselle commented 9 years ago

First of all thank you for your quick answer. About the scenario, imagine 3 servers, one PostgreSQL server and two web servers. After a aptitude update I have those package out of date: On PostgreSQL:

On web server "a":

On web server "b"

I do not want to update postgresql package, nginx, apache, php or nodejs, because this will be a little project, but security team want me to upgrade all the openssl packages on all the linux servers. This lead to two problems:

  1. I need to upgrade just openssl on this server, so I could press "i" and as it is already installed, apt-dater will upgrade it.
  2. I need to upgrade only openssl on all my servers but if it is not installed I do not want install it. Just upgrade all servers (on a group for example) which contain this package.

I hope I am clear. Have a good day.

liske commented 9 years ago

Hi,

as a quick workaround you might try to use the "install" function. On Debian installing a package again will install the update. Although this records the package as "manual installed" (while the package might be "auto installed" due to dependencies). I think this should work on other package managers, too.

The is a --only-upgrade option for apt-get to prevent accidentally installing a package on a host where the package was not installed. As a hack for Debian based systems you could press 'i' on a section/group/host and enter something like:

--ony-upgrade pkg1 pkg2

This should upgrade pkg1 and pkg2 and their dependencies.

HTH, Thomas

On 07/08/2015 04:18 PM, Julien Groselle wrote:

First of all thank you for your quick answer. About the scenario, imagine 3 servers, one PostgreSQL server and two web servers. After a aptitude update I have those package out of date: On PostgreSQL:

  • postgresql

On web server "a":

  • openssl
  • nginx

On web server "b"

  • apache
  • php
  • openssl
  • nodejs

I do not want to update postgresql package, nginx, apache, php or nodejs, because this will be a little project, but security team want me to upgrade all the openssl packages on all the linux servers. This lead to two problems:

  1. I need to upgrade just openssl on this server, so I could press "i" and as it is already installed, apt-dater will upgrade it.
  2. I need to upgrade only openssl on all my servers but if it is not installed I do not want install it. Just upgrade all servers (on a group for example) which contain this package.

I hope I am clear. Have a good day.

— Reply to this email directly or view it on GitHub https://github.com/DE-IBH/apt-dater/issues/97#issuecomment-119594280.

support@ibh.de Tel. +49 351 477 77 30 www.ibh.de Fax +49 351 477 77 39


Dipl.-Ing. Thomas Liske DataCenter Services

IBH IT-Service GmbH Amtsgericht Dresden Gostritzer Str. 67a HRB 13626 D-01217 Dresden GF: Prof. Dr. Thomas Horn

Germany VAT DE182302907

Ihr Partner für: LAN, WAN IP-Quality, Security, VoIP, SAN, Backup, USV

   professioneller IT-Service - kompetent und zuverlässig

JGroselle commented 9 years ago

Hi,

The workaround work in my case, thank you. But it should be better to implement this option. I think it is something really important.

Upgrade a GNU/Linux production server is not always a simple task due to the number and the type of package out of date. We are not Windows sysadmin and their "Patch & pray" policy... :-P

Have a good day. Again thanks.

liske commented 9 years ago

ACK

The first step is to extend the apt-dater-host stuff to support 'selective package upgrades' before apt-dater could implement it. After a quick look at different package manager backends most of them seems to support upgrading selected packages.

HTH, Thomas