From 033980faf45f86ee2fec7ce69a71ab487a816adb Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 19 Oct 2017 22:44:28 +0200 Subject: [PATCH] get rid of aptitude --- bin/fai-make-nfsroot | 4 +++- conf/nfsroot.conf | 2 +- debian/control | 2 +- examples/simple/basefiles/mk-basefile | 4 ++-- examples/simple/files/etc/fai/nfsroot.conf/FAISERVER | 2 +- man/fai-make-nfsroot.8 | 3 +-- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/bin/fai-make-nfsroot b/bin/fai-make-nfsroot index b9d9d450e..2dca3ef7b 100755 --- a/bin/fai-make-nfsroot +++ b/bin/fai-make-nfsroot @@ -585,7 +585,9 @@ trap "bad_exit" ERR # remove all kernels from nfsroot [ -n "$kremove" ] && { echo "Removing all kernels from NFSROOT." - $ROOTCMD aptitude -y purge ~nlinux-image + LC_ALL=C $ROOTCMD apt-cache dumpavail > $NFSROOT/var/lib/dpkg/available + LC_ALL=C $ROOTCMD apt-get -qq purge linux-image\* + rm $NFSROOT/var/lib/dpkg/available exit } diff --git a/conf/nfsroot.conf b/conf/nfsroot.conf index 2ba217df4..69b8d31c9 100644 --- a/conf/nfsroot.conf +++ b/conf/nfsroot.conf @@ -7,7 +7,7 @@ FAI_ROOTPW='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1' NFSROOT=/srv/fai/nfsroot TFTPROOT=/srv/tftp/fai NFSROOT_HOOKS=/etc/fai/nfsroot-hooks/ -FAI_DEBOOTSTRAP_OPTS="--exclude=wget --include=aptitude" +FAI_DEBOOTSTRAP_OPTS="--exclude=wget" # Configuration space FAI_CONFIGDIR=/srv/fai/config diff --git a/debian/control b/debian/control index e7f208280..9211aa988 100644 --- a/debian/control +++ b/debian/control @@ -43,7 +43,7 @@ Package: fai-server Architecture: all Depends: fai-client, debootstrap, xz-utils, ${misc:Depends} Recommends: nfs-kernel-server, isc-dhcp-server, tftpd-hpa | atftpd, openssh-server, openssh-client, openbsd-inetd | inet-superserver, libproc-daemon-perl -Suggests: debmirror, reprepro, xorriso, squashfs-tools, binutils, grub2, aptitude, perl-tk, qemu-utils, fai-setup-storage +Suggests: debmirror, reprepro, xorriso, squashfs-tools, binutils, grub2, perl-tk, qemu-utils, fai-setup-storage Description: Fully Automatic Installation server package FAI is a non-interactive system to install, customize and manage Linux systems and software configurations on computers as well as diff --git a/examples/simple/basefiles/mk-basefile b/examples/simple/basefiles/mk-basefile index 62077327c..53d3d9f9b 100755 --- a/examples/simple/basefiles/mk-basefile +++ b/examples/simple/basefiles/mk-basefile @@ -34,8 +34,8 @@ EXCLUDE_SID=tasksel,tasksel-data EXCLUDE_TRUSTY=dhcp3-client,dhcp3-common,info EXCLUDE_XENIAL=udhcpc,dibbler-client,info,tasksel,tasksel-data -# we need aptitude in the base file, since users may want to use it for installing packages -INCLUDE_DEBIAN=aptitude +# here you can add packages, that are needed very early +INCLUDE_DEBIAN= setarch() { diff --git a/examples/simple/files/etc/fai/nfsroot.conf/FAISERVER b/examples/simple/files/etc/fai/nfsroot.conf/FAISERVER index 13c22fbb7..9e192c69e 100644 --- a/examples/simple/files/etc/fai/nfsroot.conf/FAISERVER +++ b/examples/simple/files/etc/fai/nfsroot.conf/FAISERVER @@ -7,7 +7,7 @@ FAI_ROOTPW='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1' NFSROOT=/srv/fai/nfsroot TFTPROOT=/srv/tftp/fai NFSROOT_HOOKS=/etc/fai/nfsroot-hooks/ -FAI_DEBOOTSTRAP_OPTS="--exclude=info --include=aptitude" +FAI_DEBOOTSTRAP_OPTS="--exclude=info" # Configuration space FAI_CONFIGDIR=/srv/fai/config diff --git a/man/fai-make-nfsroot.8 b/man/fai-make-nfsroot.8 index 08c6c35b3..c68d5c26e 100644 --- a/man/fai-make-nfsroot.8 +++ b/man/fai-make-nfsroot.8 @@ -61,8 +61,7 @@ Create a generic nfsroot. Remove most install server specific data from nfsroot. See also -a. .TP .B \-K -Remove all kernels from NFSROOT. This is the same as calling aptitude -purge ~nlinux-image inside the nfsroot. +Remove all kernels from NFSROOT. .TP .B \-k Install additional packages defined in /etc/fai/NFSROOT into the