| 2 |
PYTHON_MODULES = $(wildcard lib/python/*.py) |
PYTHON_MODULES = $(wildcard lib/python/*.py) |
| 3 |
BUG_LISTS = $(wildcard data/*/list) |
BUG_LISTS = $(wildcard data/*/list) |
| 4 |
|
|
| 5 |
all: stamps/bug-lists-imported |
# Adjust these if necessary. The architecture selection is rather |
| 6 |
|
# arbitrary at the moment. More architectures can be added later. |
| 7 |
|
|
| 8 |
stamps/bug-lists-imported: bin/update-bug-list-db \ |
MIRROR = http://ftp.de.debian.org/debian/ |
| 9 |
$(BUG_LISTS) $(PYTHON_MODULES) |
ETCH_ARCHS = alpha amd64 arm hppa i386 ia64 mips mipsel powerpc s390 sparc |
| 10 |
$(PYTHON) bin/update-bug-list-db |
LENNY_ARCHS = alpha amd64 arm armel hppa i386 ia64 mips mipsel powerpc s390 sparc |
| 11 |
touch $@ |
SQUEEZE_ARCHS = amd64 armel hppa i386 ia64 mips mipsel powerpc s390 sparc |
| 12 |
|
SID_ARCHS = alpha amd64 armel hppa i386 ia64 kfreebsd-i386 kfreebsd-amd64 mips mipsel powerpc s390 sparc |
| 13 |
|
|
| 14 |
|
OLDSTABLE = etch |
| 15 |
|
STABLE = lenny |
| 16 |
|
TESTING = squeeze |
| 17 |
|
|
| 18 |
|
OLDSTABLE_uc = $(shell echo "$(OLDSTABLE)" | tr "[:lower:]" "[:upper:]") |
| 19 |
|
STABLE_uc = $(shell echo "$(STABLE)" | tr "[:lower:]" "[:upper:]") |
| 20 |
|
TESTING_uc = $(shell echo "$(TESTING)" | tr "[:lower:]" "[:upper:]") |
| 21 |
|
|
| 22 |
|
all: |
| 23 |
|
rm -f data/security-new.db data/security-new.db.journal |
| 24 |
|
if test -e data/security.db; then cp data/security.db data/security-new.db; fi |
| 25 |
|
$(PYTHON) bin/update-db data/security-new.db |
| 26 |
|
mv data/security-new.db data/security.db |
| 27 |
|
|
| 28 |
|
clean: |
| 29 |
|
-rm data/security.db lib/python/test_security.db |
| 30 |
|
-rm stamps/*-* |
| 31 |
|
|
| 32 |
.PHONY: check check-syntax |
.PHONY: check check-syntax |
| 33 |
|
|
| 34 |
test check: check-syntax |
test check: check-syntax |
| 35 |
|
|
| 36 |
check-syntax: stamps/CAN-syntax stamps/CVE-syntax \ |
check-syntax: stamps/CVE-syntax \ |
| 37 |
stamps/DSA-syntax stamps/DTSA-syntax |
stamps/DSA-syntax stamps/DTSA-syntax |
| 38 |
|
|
|
stamps/CAN-syntax: data/CAN/list bin/check-syntax $(PYTHON_MODULES) |
|
|
$(PYTHON) bin/check-syntax CAN data/CAN/list |
|
|
touch $@ |
|
|
|
|
| 39 |
stamps/CVE-syntax: data/CVE/list bin/check-syntax $(PYTHON_MODULES) |
stamps/CVE-syntax: data/CVE/list bin/check-syntax $(PYTHON_MODULES) |
| 40 |
$(PYTHON) bin/check-syntax CVE data/CVE/list |
$(PYTHON) bin/check-syntax CVE data/CVE/list |
| 41 |
touch $@ |
touch $@ |
| 47 |
stamps/DTSA-syntax: data/DTSA/list bin/check-syntax $(PYTHON_MODULES) |
stamps/DTSA-syntax: data/DTSA/list bin/check-syntax $(PYTHON_MODULES) |
| 48 |
$(PYTHON) bin/check-syntax DTSA data/DTSA/list |
$(PYTHON) bin/check-syntax DTSA data/DTSA/list |
| 49 |
touch $@ |
touch $@ |
| 50 |
|
|
| 51 |
|
.PHONY: serve |
| 52 |
|
serve: |
| 53 |
|
@bash bin/test-web-server |
| 54 |
|
|
| 55 |
|
.PHONY: update-packages update-testing update-stable update-oldstable |
| 56 |
|
update-packages: update-testing |
| 57 |
|
set -e ; for rel in sid experimental ; do \ |
| 58 |
|
for archive in main contrib non-free ; do \ |
| 59 |
|
$(PYTHON) bin/apt-update-file \ |
| 60 |
|
$(MIRROR)/dists/$$rel/$$archive/source/Sources \ |
| 61 |
|
data/packages/$${rel}__$${archive}_Sources ; \ |
| 62 |
|
done ; \ |
| 63 |
|
for arch in $(SID_ARCHS) ; do \ |
| 64 |
|
for archive in main contrib non-free ; do \ |
| 65 |
|
$(PYTHON) bin/apt-update-file \ |
| 66 |
|
$(MIRROR)/dists/$$rel/$$archive/binary-$$arch/Packages \ |
| 67 |
|
data/packages/$${rel}__$${archive}_$${arch}_Packages ; \ |
| 68 |
|
done ; \ |
| 69 |
|
done ; \ |
| 70 |
|
done |
| 71 |
|
|
| 72 |
|
update-testing: |
| 73 |
|
set -e ; for rel in $(TESTING) ; do \ |
| 74 |
|
for archive in main contrib non-free ; do \ |
| 75 |
|
$(PYTHON) bin/apt-update-file \ |
| 76 |
|
$(MIRROR)/dists/$$rel/$$archive/source/Sources \ |
| 77 |
|
data/packages/$${rel}__$${archive}_Sources ; \ |
| 78 |
|
done ; \ |
| 79 |
|
for arch in $($(TESTING_uc)_ARCHS) ; do \ |
| 80 |
|
for archive in main contrib non-free ; do \ |
| 81 |
|
$(PYTHON) bin/apt-update-file \ |
| 82 |
|
$(MIRROR)/dists/$$rel/$$archive/binary-$$arch/Packages \ |
| 83 |
|
data/packages/$${rel}__$${archive}_$${arch}_Packages ; \ |
| 84 |
|
done ; \ |
| 85 |
|
done ; \ |
| 86 |
|
done |
| 87 |
|
|
| 88 |
|
update-stable: update-oldstable |
| 89 |
|
set -e ; for rel in $(STABLE) ; do \ |
| 90 |
|
for archive in main contrib non-free ; do \ |
| 91 |
|
$(PYTHON) bin/apt-update-file \ |
| 92 |
|
$(MIRROR)/dists/$$rel/$$archive/source/Sources \ |
| 93 |
|
data/packages/$${rel}__$${archive}_Sources ; \ |
| 94 |
|
done ; \ |
| 95 |
|
for arch in $($(STABLE_uc)_ARCHS) ; do \ |
| 96 |
|
for archive in main contrib non-free ; do \ |
| 97 |
|
$(PYTHON) bin/apt-update-file \ |
| 98 |
|
$(MIRROR)/dists/$$rel/$$archive/binary-$$arch/Packages \ |
| 99 |
|
data/packages/$${rel}__$${archive}_$${arch}_Packages ; \ |
| 100 |
|
done ; \ |
| 101 |
|
done ; \ |
| 102 |
|
done |
| 103 |
|
|
| 104 |
|
update-oldstable: |
| 105 |
|
set -e ; for rel in $(OLDSTABLE) ; do \ |
| 106 |
|
for archive in main contrib non-free ; do \ |
| 107 |
|
$(PYTHON) bin/apt-update-file \ |
| 108 |
|
$(MIRROR)/dists/$$rel/$$archive/source/Sources \ |
| 109 |
|
data/packages/$${rel}__$${archive}_Sources ; \ |
| 110 |
|
done ; \ |
| 111 |
|
for arch in $($(OLDSTABLE_uc)_ARCHS) ; do \ |
| 112 |
|
for archive in main contrib non-free ; do \ |
| 113 |
|
$(PYTHON) bin/apt-update-file \ |
| 114 |
|
$(MIRROR)/dists/$$rel/$$archive/binary-$$arch/Packages \ |
| 115 |
|
data/packages/$${rel}__$${archive}_$${arch}_Packages ; \ |
| 116 |
|
done ; \ |
| 117 |
|
done ; \ |
| 118 |
|
done |
| 119 |
|
|
| 120 |
|
.PHONY: update-security update-old-security update-testing-security |
| 121 |
|
ST_MIRROR = http://security.debian.org/dists/$(TESTING)/updates |
| 122 |
|
ST_FILE = data/packages/$(TESTING)_security_ |
| 123 |
|
update-testing-security: |
| 124 |
|
$(PYTHON) bin/apt-update-file \ |
| 125 |
|
$(ST_MIRROR)/main/source/Sources $(ST_FILE)main_Sources |
| 126 |
|
set -e ; for arch in $($(TESTING_uc)_ARCHS) ; do \ |
| 127 |
|
$(PYTHON) bin/apt-update-file \ |
| 128 |
|
$(ST_MIRROR)/main/binary-$${arch}/Packages $(ST_FILE)main_$${arch}_Packages ; \ |
| 129 |
|
done |
| 130 |
|
|
| 131 |
|
SEC_MIRROR = http://security.debian.org/dists |
| 132 |
|
update-security: update-old-security |
| 133 |
|
for archive in $(STABLE); do \ |
| 134 |
|
for section in main contrib non-free ; do \ |
| 135 |
|
$(PYTHON) bin/apt-update-file \ |
| 136 |
|
$(SEC_MIRROR)/$$archive/updates/$$section/source/Sources \ |
| 137 |
|
data/packages/$${archive}_security_$${section}_Sources ; \ |
| 138 |
|
for arch in $($(STABLE_uc)_ARCHS) ; do \ |
| 139 |
|
$(PYTHON) bin/apt-update-file \ |
| 140 |
|
$(SEC_MIRROR)/$$archive/updates/$$section/binary-$$arch/Packages \ |
| 141 |
|
data/packages/$${archive}_security_$${section}_$${arch}_Packages ; \ |
| 142 |
|
done ; \ |
| 143 |
|
done ; \ |
| 144 |
|
done |
| 145 |
|
|
| 146 |
|
update-old-security: |
| 147 |
|
for archive in $(OLDSTABLE) ; do \ |
| 148 |
|
for section in main contrib non-free ; do \ |
| 149 |
|
$(PYTHON) bin/apt-update-file \ |
| 150 |
|
$(SEC_MIRROR)/$$archive/updates/$$section/source/Sources \ |
| 151 |
|
data/packages/$${archive}_security_$${section}_Sources ; \ |
| 152 |
|
for arch in $($(OLDSTABLE_uc)_ARCHS) ; do \ |
| 153 |
|
$(PYTHON) bin/apt-update-file \ |
| 154 |
|
$(SEC_MIRROR)/$$archive/updates/$$section/binary-$$arch/Packages \ |
| 155 |
|
data/packages/$${archive}_security_$${section}_$${arch}_Packages ; \ |
| 156 |
|
done ; \ |
| 157 |
|
done ; \ |
| 158 |
|
done |
| 159 |
|
|
| 160 |
|
VOLATILE_MIRROR = http://volatile.debian.net/debian-volatile/dists |
| 161 |
|
update-volatile: |
| 162 |
|
set -e && for archive in $(OLDSTABLE) $(STABLE) ; do \ |
| 163 |
|
for arch in $(ETCH_ARCHS) ; do \ |
| 164 |
|
$(PYTHON) bin/apt-update-file \ |
| 165 |
|
$(VOLATILE_MIRROR)/$${archive}/volatile/main/binary-$$arch/Packages \ |
| 166 |
|
data/packages/$${archive}-volatile__main_$${arch}_Packages ; \ |
| 167 |
|
done ; \ |
| 168 |
|
$(PYTHON) bin/apt-update-file \ |
| 169 |
|
$(VOLATILE_MIRROR)/$${archive}/volatile/main/source/Sources \ |
| 170 |
|
data/packages/$${archive}-volatile__main_Sources ; \ |
| 171 |
|
done |
| 172 |
|
$(PYTHON) bin/apt-update-file \ |
| 173 |
|
$(VOLATILE_MIRROR)/lenny/volatile/main/binary-armel/Packages \ |
| 174 |
|
data/packages/lenny-volatile__main_armel_Packages |
| 175 |
|
|
| 176 |
|
BACKPORTS_MIRROR = http://www.backports.org/backports.org/dists |
| 177 |
|
update-backports: |
| 178 |
|
set -e && for archive in $(OLDSTABLE) $(STABLE) ; do \ |
| 179 |
|
for arch in $(ETCH_ARCHS) ; do \ |
| 180 |
|
$(PYTHON) bin/apt-update-file \ |
| 181 |
|
$(BACKPORTS_MIRROR)/$${archive}-backports/main/binary-$$arch/Packages \ |
| 182 |
|
data/packages/$${archive}-backports__main_$${arch}_Packages ; \ |
| 183 |
|
done ; \ |
| 184 |
|
$(PYTHON) bin/apt-update-file \ |
| 185 |
|
$(BACKPORTS_MIRROR)/$${archive}-backports/main/source/Sources \ |
| 186 |
|
data/packages/$${archive}-backports__main_Sources ; \ |
| 187 |
|
done |
| 188 |
|
$(PYTHON) bin/apt-update-file \ |
| 189 |
|
$(BACKPORTS_MIRROR)/lenny-backports/main/binary-armel/Packages \ |
| 190 |
|
data/packages/lenny-backports__main_armel_Packages |
| 191 |
|
|
| 192 |
|
update-lists: |
| 193 |
|
svn update -q data |
| 194 |
|
|
| 195 |
|
update-nvd: |
| 196 |
|
for x in $$(seq 2002 $$(date +%Y)) ; do \ |
| 197 |
|
name=nvdcve-$$x.xml; \ |
| 198 |
|
wget -q -Odata/nvd/$$name http://nvd.nist.gov/download/$$name || true; \ |
| 199 |
|
done |
| 200 |
|
python bin/update-nvd data/nvd/nvdcve-*.xml |