Some pacman fixes
[strongswan.git] / src / libimcv / plugins / imv_os / pacman.sh
1 #!/bin/sh
2
3 DIR="/etc/pts"
4 DATE=`date +%Y%m%d-%H%M`
5 UBUNTU="http://security.ubuntu.com/ubuntu/dists"
6 UBUNTU_VERSIONS="raring quantal precise lucid"
7 UBUNTU_DIRS="main multiverse restricted universe"
8 UBUNTU_ARCH="binary-amd64 binary-i386"
9 DEBIAN="http://security.debian.org/dists"
10 DEBIAN_VERSIONS="jessie wheezy squeeze"
11 DEBIAN_DIRS="main contrib non-free"
12 DEBIAN_ARCH="binary-amd64 binary-i386"
13 PACMAN=/usr/libexec/ipsec/pacman
14 PACMAN_LOG="$DIR/$DATE-pacman.log"
15
16 cd $DIR/dists
17
18 for v in $UBUNTU_VERSIONS
19 do
20 for a in $UBUNTU_ARCH
21 do
22 mkdir -p $v-security/$a $v-updates/$a
23 for d in $UBUNTU_DIRS
24 do
25 wget $UBUNTU/$v-security/$d/$a/Packages.bz2 -O $v-security/$a/Packages-$d.bz2
26 mv $v-security/$a/Packages-$d $v-security/$a/Packages-$d.old
27 bunzip2 $v-security/$a/Packages-$d.bz2
28 wget $UBUNTU/$v-updates/$d/$a/Packages.bz2 -O $v-updates/$a/Packages-$d.bz2
29 mv $v-updates/$a/Packages-$d $v-updates/$a/Packages-$d.old
30 bunzip2 $v-updates/$a/Packages-$d.bz2
31 done
32 done
33 done
34
35 for v in $DEBIAN_VERSIONS
36 do
37 for a in $DEBIAN_ARCH
38 do
39 mkdir -p $v-updates/$a
40 for d in $DEBIAN_DIRS
41 do
42 wget $DEBIAN/$v/updates/$d/$a/Packages.bz2 -O $v-updates/$a/Packages-$d.bz2
43 mv $v-updates/$a/Packages-$d $v-updates/$a/Packages-$d.old
44 bunzip2 $v-updates/$a/Packages-$d.bz2
45 done
46 done
47 done
48
49 for f in raring-security/binary-amd64/*
50 do
51 $PACMAN --product "Ubuntu 13.04 x86_64" --file $f --security >> $PACMAN_LOG
52 done
53 echo
54 for f in raring-updates/binary-amd64/*
55 do
56 $PACMAN --product "Ubuntu 13.04 x86_64" --file $f >> $PACMAN_LOG
57 done
58 echo
59 for f in raring-security/binary-i386/*
60 do
61 $PACMAN --product "Ubuntu 13.04 i686" --file $f --security >> $PACMAN_LOG
62 done
63 echo
64 for f in raring-updates/binary-i386/*
65 do
66 $PACMAN --product "Ubuntu 13.04 i686" --file $f >> $PACMAN_LOG
67 done
68 echo
69
70 for f in quantal-security/binary-amd64/*
71 do
72 $PACMAN --product "Ubuntu 12.10 x86_64" --file $f --security >> $PACMAN_LOG
73 done
74 echo
75 for f in quantal-updates/binary-amd64/*
76 do
77 $PACMAN --product "Ubuntu 12.10 x86_64" --file $f >> $PACMAN_LOG
78 done
79 echo
80 for f in quantal-security/binary-i386/*
81 do
82 $PACMAN --product "Ubuntu 12.10 i686" --file $f --security >> $PACMAN_LOG
83 done
84 echo
85 for f in quantal-updates/binary-i386/*
86 do
87 $PACMAN --product "Ubuntu 12.10 i686" --file $f >> $PACMAN_LOG
88 done
89 echo
90
91 for f in precise-security/binary-amd64/*
92 do
93 $PACMAN --product "Ubuntu 12.04 x86_64" --file $f --security >> $PACMAN_LOG
94 done
95 echo
96 for f in precise-updates/binary-amd64/*
97 do
98 $PACMAN --product "Ubuntu 12.04 x86_64" --file $f >> $PACMAN_LOG
99 done
100 echo
101 for f in precise-security/binary-i386/*
102 do
103 $PACMAN --product "Ubuntu 12.04 i686" --file $f --security >> $PACMAN_LOG
104 done
105 echo
106 for f in precise-updates/binary-i386/*
107 do
108 $PACMAN --product "Ubuntu 12.04 i686" --file $f >> $PACMAN_LOG
109 done
110 echo
111
112 for f in lucid-security/binary-amd64/*
113 do
114 $PACMAN --product "Ubuntu 10.04 x86_64" --file $f --security >> $PACMAN_LOG
115 done
116 echo
117 for f in lucid-updates/binary-amd64/*
118 do
119 $PACMAN --product "Ubuntu 10.04 x86_64" --file $f >> $PACMAN_LOG
120 done
121 echo
122 for f in lucid-security/binary-i386/*
123 do
124 $PACMAN --product "Ubuntu 10.04 i686" --file $f --security >> $PACMAN_LOG
125 done
126 echo
127 for f in lucid-updates/binary-i386/*
128 do
129 $PACMAN --product "Ubuntu 10.04 i686" --file $f >> $PACMAN_LOG
130 done
131 echo
132
133 for f in jessie-updates/binary-amd64/*
134 do
135 $PACMAN --product "Debian 8.0 x86_64" --file $f --security >> $PACMAN_LOG
136 done
137 echo
138 for f in jessie-updates/binary-i386/*
139 do
140 $PACMAN --product "Debian 8.0 i686" --file $f --security >> $PACMAN_LOG
141 done
142
143 for f in wheezy-updates/binary-amd64/*
144 do
145 $PACMAN --product "Debian 7.0 x86_64" --file $f --security >> $PACMAN_LOG
146 done
147 echo
148 for f in wheezy-updates/binary-i386/*
149 do
150 $PACMAN --product "Debian 7.0 i686" --file $f --security >> $PACMAN_LOG
151 done
152
153 for f in squeeze-updates/binary-amd64/*
154 do
155 $PACMAN --product "Debian 6.0 x86_64" --file $f --security >> $PACMAN_LOG
156 done
157 echo
158 for f in squeeze-updates/binary-i386/*
159 do
160 $PACMAN --product "Debian 6.0 i686" --file $f --security >> $PACMAN_LOG
161 done
162
163 cp $DIR/config.db $DIR/config.db-$DATE