diff options
Diffstat (limited to 'src/libimcv/plugins/imv_os/pacman.sh')
-rwxr-xr-x | src/libimcv/plugins/imv_os/pacman.sh | 162 |
1 files changed, 141 insertions, 21 deletions
diff --git a/src/libimcv/plugins/imv_os/pacman.sh b/src/libimcv/plugins/imv_os/pacman.sh index e9134ea5d..e99de0cb5 100755 --- a/src/libimcv/plugins/imv_os/pacman.sh +++ b/src/libimcv/plugins/imv_os/pacman.sh @@ -1,40 +1,160 @@ #!/bin/sh -DATE=`date +%Y%m%d` -DEBIAN=http://packages.debian.org -UBUNTU=http://packages.ubuntu.com -UBUNTU_VERSIONS="quantal precise oneiric lucid" -PACKAGES=allpackages?format=txt.gz +DIR="/etc/pts" +DATE=`date +%Y%m%d-%H%M` +UBUNTU="http://security.ubuntu.com/ubuntu/dists" +UBUNTU_VERSIONS="raring quantal precise lucid" +UBUNTU_DIRS="main multiverse restricted universe" +UBUNTU_ARCH="binary-amd64 binary-i386" +DEBIAN="http://security.debian.org/dists" +DEBIAN_VERSIONS="jessie wheezy squeeze" +DEBIAN_DIRS="main contrib non-free" +DEBIAN_ARCH="binary-amd64 binary-i386" PACMAN=/usr/libexec/ipsec/pacman -DIR=/etc/pts +PACMAN_LOG="$DIR/$DATE-pacman.log" -cd $DIR +cd $DIR/dists for v in $UBUNTU_VERSIONS do - wget $UBUNTU/$v/$PACKAGES -O $DATE-$v.txt.gz - wget $UBUNTU/$v-updates/$PACKAGES -O $DATE-$v-updates.txt.gz + for a in $UBUNTU_ARCH + do + mkdir -p $v-security/$a $v-updates/$a + for d in $UBUNTU_DIRS + do + wget $UBUNTU/$v-security/$d/$a/Packages.bz2 -O $v-security/$a/Packages-$d.bz2 + bunzip2 -f $v-security/$a/Packages-$d.bz2 + wget $UBUNTU/$v-updates/$d/$a/Packages.bz2 -O $v-updates/$a/Packages-$d.bz2 + bunzip2 -f $v-updates/$a/Packages-$d.bz2 + done + done done -wget $DEBIAN/stable/$PACKAGES -O $DATE-squeeze.txt.gz -gunzip *.gz +for v in $DEBIAN_VERSIONS +do + for a in $DEBIAN_ARCH + do + mkdir -p $v-updates/$a + for d in $DEBIAN_DIRS + do + wget $DEBIAN/$v/updates/$d/$a/Packages.bz2 -O $v-updates/$a/Packages-$d.bz2 + bunzip2 -f $v-updates/$a/Packages-$d.bz2 + done + done +done + +for f in raring-security/binary-amd64/* +do + $PACMAN --product "Ubuntu 13.04 x86_64" --file $f --security >> $PACMAN_LOG +done +echo +for f in raring-updates/binary-amd64/* +do + $PACMAN --product "Ubuntu 13.04 x86_64" --file $f >> $PACMAN_LOG +done +echo +for f in raring-security/binary-i386/* +do + $PACMAN --product "Ubuntu 13.04 i686" --file $f --security >> $PACMAN_LOG +done +echo +for f in raring-updates/binary-i386/* +do + $PACMAN --product "Ubuntu 13.04 i686" --file $f >> $PACMAN_LOG +done +echo -$PACMAN --product "Ubuntu 12.10" --file $DATE-quantal.txt +for f in quantal-security/binary-amd64/* +do + $PACMAN --product "Ubuntu 12.10 x86_64" --file $f --security >> $PACMAN_LOG +done echo -$PACMAN --product "Ubuntu 12.10" --file $DATE-quantal-updates.txt --update +for f in quantal-updates/binary-amd64/* +do + $PACMAN --product "Ubuntu 12.10 x86_64" --file $f >> $PACMAN_LOG +done echo -$PACMAN --product "Ubuntu 12.04" --file $DATE-precise.txt +for f in quantal-security/binary-i386/* +do + $PACMAN --product "Ubuntu 12.10 i686" --file $f --security >> $PACMAN_LOG +done echo -$PACMAN --product "Ubuntu 12.04" --file $DATE-precise-updates.txt --update +for f in quantal-updates/binary-i386/* +do + $PACMAN --product "Ubuntu 12.10 i686" --file $f >> $PACMAN_LOG +done echo -$PACMAN --product "Ubuntu 11.10" --file $DATE-oneiric.txt + +for f in precise-security/binary-amd64/* +do + $PACMAN --product "Ubuntu 12.04 x86_64" --file $f --security >> $PACMAN_LOG +done echo -$PACMAN --product "Ubuntu 11.10" --file $DATE-oneiric-updates.txt --update +for f in precise-updates/binary-amd64/* +do + $PACMAN --product "Ubuntu 12.04 x86_64" --file $f >> $PACMAN_LOG +done echo -$PACMAN --product "Ubuntu 10.04" --file $DATE-lucid.txt +for f in precise-security/binary-i386/* +do + $PACMAN --product "Ubuntu 12.04 i686" --file $f --security >> $PACMAN_LOG +done echo -$PACMAN --product "Ubuntu 10.04" --file $DATE-lucid-updates.txt --update +for f in precise-updates/binary-i386/* +do + $PACMAN --product "Ubuntu 12.04 i686" --file $f >> $PACMAN_LOG +done echo -$PACMAN --product "Debian squeeze" --file $DATE-squeeze.txt -cp config.db config.db-$DATE +for f in lucid-security/binary-amd64/* +do + $PACMAN --product "Ubuntu 10.04 x86_64" --file $f --security >> $PACMAN_LOG +done +echo +for f in lucid-updates/binary-amd64/* +do + $PACMAN --product "Ubuntu 10.04 x86_64" --file $f >> $PACMAN_LOG +done +echo +for f in lucid-security/binary-i386/* +do + $PACMAN --product "Ubuntu 10.04 i686" --file $f --security >> $PACMAN_LOG +done +echo +for f in lucid-updates/binary-i386/* +do + $PACMAN --product "Ubuntu 10.04 i686" --file $f >> $PACMAN_LOG +done +echo + +for f in jessie-updates/binary-amd64/* +do + $PACMAN --product "Debian 8.0 x86_64" --file $f --security >> $PACMAN_LOG +done +echo +for f in jessie-updates/binary-i386/* +do + $PACMAN --product "Debian 8.0 i686" --file $f --security >> $PACMAN_LOG +done + +for f in wheezy-updates/binary-amd64/* +do + $PACMAN --product "Debian 7.0 x86_64" --file $f --security >> $PACMAN_LOG +done +echo +for f in wheezy-updates/binary-i386/* +do + $PACMAN --product "Debian 7.0 i686" --file $f --security >> $PACMAN_LOG +done + +for f in squeeze-updates/binary-amd64/* +do + $PACMAN --product "Debian 6.0 x86_64" --file $f --security >> $PACMAN_LOG +done +echo +for f in squeeze-updates/binary-i386/* +do + $PACMAN --product "Debian 6.0 i686" --file $f --security >> $PACMAN_LOG +done + +cp $DIR/config.db $DIR/config.db-$DATE |