pkgsync-1.75: Añadidas dos nuevas opciones

He vuelto a crear una nueva versión del paquete pkgsync, concretamente la 1.75 que introduce dos nuevas opciones que podemos utilizar desde la línea de comandos:

  • La opción -d, --delete-files permite eliminar todos los ficheros de listas de paquetes de pkgsync incluidos dentro del directorio /etc/pkgsync/. Esta opción nos permite hacer limpieza, sobre todo si en algún momento hemos colocado ficheros localmente no gestionados mediante puppet.
  • La opción -b, --build-musthave sirve para generar el fichero /etc/pkgsync/musthave y crear los ficheros /etc/pkgsync/mayhave y /etc/pkgsync/maynothave si no existen.

Para ver todas las opciones que podéis utilizar en pkgsync desde la línea de comandos, tan sólo tenéis que iniciar pkgsync con el parámetro -h:

# pkgsync -h
pkgsync 1.75
Automated package synchronization tool
Usage: pkgsync [OPTIONS]
Recognized options:
  -h,  --help		       	display this help and exit
  -v,  --version		    display pkgsync version and exit
  -k,  --keep-unused        don't remove unused packages
  -s,  --simulate           don't do anything, just print out what would have happened
  -t,  --test-files         test pkgsync files
  -tr, --test-files r       test and remove packages from pkgsync files lists
  -d,  --delete-files       delete all pkgsync files
  -b,  --build-files        build musthave and create empty mayhave and maynothave if they don't exist
  -f,  --force              force pkgsync
  -c,  --clean              remove uninstalled packages dependencies,
				            purge uninstalled packages and clean cache
  -p,  --purge-old-kernels	remove old kernels keeping the last two (by default)
  				            or the number specified in /etc/default/pkgsync file
  -n,  --no-sincpuppet		don't launch sinc_puppet from pkgsync
  -g,  --get-keys		    exec launchpad-keys to get repositories keys
  -S,  --shutdown           shutdown machine after pkgsync
  -R,  --reboot             reboot machine after pkgsync
  -Rw, --reboot             reboot machine and boot into windows on EFI computers
Complete documentation can be found in /usr/share/doc/pkgsync/README.Debian.

Así, si queremos eliminar todos los ficheros de listas de paquetes, sean del tipo que sean, tan sólo tenemos que ejecutar el comando:

pkgsync -d

Y si queremos crear los ficheros básicos de pkgsync (musthave, mayhave y maynothave), ejecutaremos el comando con el parámetro -b:

pkgsync -b

Ésto mismo podemos hacerlo también utilizando el script musthave-build que incluye el paquete pkgsync:

musthave-build

Es importante recordar tres detalles:

  • Al eliminar los ficheros de listas de paquetes, si tratamos de ejecutar pkgsync, nos mostrará un mensaje informativo en el que nos dice que faltan los ficheros. En este caso, tenemos dos opciones:
    • Sumininistrar las listas de ficheros mediante puppet (la opción más cómoda).
    • Generar los ficheros utilizando pkgsync -b.
  • Al ejecutar pkgsync -b o musthave-build, si ya existe un fichero musthave, se realizará un backup del mismo y se generará un nuevo musthave a partir de la lista de los paquetes instalados en el sistema.
  • Los ficheros de copia de seguridad almacenados dentro del directorio /etc/pkgsync son ignorados a la hora de mezclar ficheros de listas de paquetes.

Be the first to comment