#! /bin/bash # @(#)(CAcert) $Id$ # pkg-conform - bring set of installed Debian packages in conformance with # the desired state for the CAcert webdb server TMPDIR=/tmp/pkg-conform.$$ mkdir ${TMPDIR} trap "rm -rf ${TMPDIR}" 0 1 2 3 15 sort >${TMPDIR}/1 <<\! acpid adduser analog apache2 apache2-mpm-prefork apache2-utils apache2.2-common apt apt-listchanges apt-show-versions apt-utils aptitude atop base-files base-passwd bash bash-completion bc bin86 bind9-host binutils bison boxbackup-client bsd-mailx bsdmainutils bsdutils build-essential busybox bzip2 ca-certificates console-common console-data console-tools coreutils cpio cpp cpp-4.1 cpp-4.3 cron cryptsetup cvs cyrus-sasl2-doc dc ddrescue debconf debconf-i18n debian-archive-keyring debian-faq debianutils defoma dictionaries-common diff ding dmidecode dmsetup dnsutils doc-debian doc-linux-de doc-linux-text dpkg dpkg-dev dselect e2fslibs e2fsprogs ed eject file findutils finger flex fontconfig-config g++ g++-4.1 g++-4.3 gawk gcc gcc-4.1 gcc-4.1-base gcc-4.3 gcc-4.3-base gdb gettext gettext-base gnupg gpgv grep groff-base grub grub-common gzip hddtemp hdparm hostname iamerican ibritish ifupdown info initramfs-tools initscripts installation-report iproute iptables iputils-ping ispell klibc-utils klogd language-env laptop-detect less libacl1 libapache2-mod-php5 libapr1 libaprutil1 libapt-pkg-perl libatm1 libattr1 libbind9-50 libblkid1 libbz2-1.0 libc6 libc6-dev libc6-i686 libcap1 libcap2 libcomerr2 libcompress-raw-zlib-perl libcompress-zlib-perl libconfig-inifiles-perl libconsole libcurses-perl libcurses-ui-perl libcwidget3 libdb4.2 libdb4.4 libdb4.5 libdb4.6 libdbd-mysql-perl libdbi-perl libdevice-serialport-perl libdevmapper1.02.1 libdigest-sha1-perl libdns58 libedit2 libelfg0 libept0 libevent1 libexpat1 libfile-counterfile-perl libfont-afm-perl libfontconfig1 libfreetype6 libgc1c2 libgcc1 libgcrypt11 libgd2-xpm libgdbm3 libgeoip1 libglib1.2ldbl libglib2.0-0 libgmp3c2 libgnutls26 libgomp1 libgpg-error0 libgpm2 libgssglue1 libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhtml-tree-perl libident libidn11 libinline-perl libio-compress-base-perl libio-compress-zlib-perl libisc50 libisccc50 libisccfg50 libjpeg62 libkeyutils1 libklibc libkrb53 libldap-2.4-2 liblocale-gettext-perl liblockfile1 liblwres50 liblzo2-2 libmagic1 libmailtools-perl libmpfr1ldbl libmysqlclient15off libncurses5 libncursesw5 libneon26 libnet-daemon-perl libnet1 libnewt0.52 libnfsidmap2 libnss-db libpam-modules libpam-runtime libpam0g libparse-recdescent-perl libpcap0.8 libpci3 libpcre3 libplrpc-perl libpng12-0 libpopt0 libpq5 libreadline5 librecode-dev librecode0 librpcsecgss3 libsasl2-2 libsasl2-modules libselinux1 libsemanage1 libsepol1 libsigc++-1.2-5c2 libsigc++-2.0-0c2a libslang2 libsqlite3-0 libss2 libssl-dev libssl0.9.8 libstdc++6 libstdc++6-4.1-dev libstdc++6-4.3-dev libt1-5 libtasn1-3 libtasn1-3-bin libterm-readkey-perl libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libtextwrap1 libtimedate-perl liburi-perl libusb-0.1-4 libusb-dev libustr-1.0-1 libuuid1 libvolume-id0 libwrap0 libwww-perl libx11-6 libx11-data libxapian15 libxau6 libxcb-xlib0 libxcb1 libxdelta2 libxdmcp6 libxext6 libxml2 libxmuu1 libxpm4 linux-image-2.6-486 linux-image-2.6.26-2-486 linux-libc-dev locales locales-all locate lockfile-progs login logrotate lsb-base lsb-release lsof ltrace lvm2 lynx lynx-cur lzma m4 mailx make makedev man-db manpages manpages-de manpages-dev mawk mc mime-support mktemp mmv module-init-tools mount mpack mtools mtop mtr-tiny mutt myspell-de-at myspell-de-ch myspell-de-de mysql-client-5.0 mysql-common mysql-server-5.0 nano ncurses-base ncurses-bin ncurses-term net-tools netbase netcat netcat-traditional ngrep ntpdate openbsd-inetd openssh-blacklist openssh-blacklist-extra openssh-client openssh-server openssl openssl-blacklist openssl-blacklist-extra passwd patch pciutils perl perl-base perl-modules php5 php5-cli php5-common php5-gd php5-mysql php5-recode php5-suhosin pidentd policycoreutils postfix procmail procps psmisc python python-apt python-central python-minimal python-newt python-selinux python-semanage python-sepolgen python-support python2.5 python2.5-minimal rcs readline-common recode recode-doc reiserfsprogs reportbug rsync screen sed sharutils smartmontools ssl-cert strace sudo sysklogd sysstat sysv-rc sysv-rc-conf sysvinit sysvinit-utils tar tasksel tasksel-data tcl8.4 tcpd tcpdump tcsh telnet texinfo time tk8.4 traceroute trans-de-en ttf-dejavu ttf-dejavu-core ttf-dejavu-extra tzdata ucf udev unzip update-inetd usbutils util-linux uuid-runtime vim vim-common vim-runtime vim-tiny w3m wamerican webalizer wget whiptail whois x11-common xauth xdelta zip zlib1g zlib1g-dev ! #dpkg-query --show --showformat '${Package} ${Status}\n' |\ #awk '$4 == "installed" { print $1 }' |\ #sort >${TMPDIR}/2 dpkg-query --show --showformat '${Package}\n' |\ sort >${TMPDIR}/2 REMOVE=`comm -13 ${TMPDIR}/1 ${TMPDIR}/2 | grep -v '^linux-image-'` if [ -n "${REMOVE}" ] then echo "The following packages will be removed from the system:" for pkg in ${REMOVE} do echo " ${pkg}" done apt-get remove --purge ${REMOVE} else echo "No packages need to be removed from the system" fi ADD=`comm -23 ${TMPDIR}/1 ${TMPDIR}/2 | grep -v '^linux-image-'` if [ -n "${ADD}" ] then echo "The following packages will be installed on the system:" for pkg in ${ADD} do echo " ${pkg}" done apt-get install ${ADD} else echo "No packages need to be installed on the system" fi