diff options
author | Florian Weimer <fw@deneb.enyo.de> | 2005-09-15 10:11:44 +0000 |
---|---|---|
committer | Florian Weimer <fw@deneb.enyo.de> | 2005-09-15 10:11:44 +0000 |
commit | 337f980d8e801258d8ca74d127aa8188af3679df (patch) | |
tree | dc569d699b67dfac8d23e80882f189419c9d56d0 /Makefile | |
parent | 442da033445af42da75fb4797f54615438a5703c (diff) |
Implement bin/update-db, to update the database with a single command.
Most processing is skipped if no input files have been modified.
lib/python/security_db.py (SchemaMismatch):
New exception.
(DB):
Handle schema versioning.
(DB.initSchema):
Add subrelease column to source_packages and binary_packages.
Set user_version.
Remove stray commit.
(DB._parseFile):
Return information to the caller if the file is unchanged.
(DB.readPackages):
Move deletion code to callees.
(DB._readSourcePackages, DB._readBinaryPackages):
Implement incremental updates. Add subrelease.
Need to invoke _clearVersions if any changes are made.
(DB.deleteBugs, DB.finishBugs):
Moved into readBugs.
(DB.insertBugs):
Rename ...
(DB.readBugs):
... to this one. Implement incremental updates.
Invoke _clearVersions if necessary.
(DB._clearVersions):
Add.
(DB._updateVersions):
Skip processing if _clearVersions has not been invoked.
(DB.getVersion, DB.releaseContainsPackage, DB._synthesizeReleases):
Obsolete, remove.
(test):
Update.
lib/python/bugs.py (CANFile, CVEFile):
Split into two classes, which handle the differences between the two
files.
bin/check-syntax:
Update accordingly.
bin/update-db:
New database update script. Implements incremental updates.
Makefile:
Remove references to bin/update-packages. Simplify drastically.
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@1994 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 66 |
1 files changed, 40 insertions, 26 deletions
@@ -14,28 +14,8 @@ SECURITY_RELEASES = sarge-security=i386,ia64 woody-security=i386 PACKAGE_FILES = $(wildcard data/packages/*_Sources) \ $(wildcard data/packages/*_Packages) -all: stamps/bug-lists-imported stamps/packages-imported \ - stamps/calc-vulns - -stamps/bug-lists-imported: bin/update-bug-list-db \ - $(BUG_LISTS) $(PYTHON_MODULES) - $(PYTHON) bin/update-bug-list-db - touch $@ - -# No dependencies on the Python files. This part of the code should -# be quite stable. We only run the packages import if "make -# update-packages" has been invoked before. -stamps/packages-imported: $(PACKAGE_FILES) - if test -e stamps/packages-downloaded ; then \ - $(PYTHON) bin/update-packages import ; \ - fi - touch $@ - -stamps/calc-vulns: stamps/bug-lists-imported stamps/packages-imported - if test -e stamps/packages-downloaded ; then \ - $(PYTHON) bin/update-vulnerabilities ; \ - fi - touch $@ +all: + $(PYTHON) bin/update-db clean: -rm data/security.db @@ -64,9 +44,43 @@ stamps/DTSA-syntax: data/DTSA/list bin/check-syntax $(PYTHON_MODULES) $(PYTHON) bin/check-syntax DTSA data/DTSA/list touch $@ -.PHONY: update-packages +.PHONY: update-packages update-etch-security update-packages: - $(PYTHON) bin/update-packages download $(MIRROR) $(RELEASES) - $(PYTHON) bin/update-packages download \ - http://security.debian.org/ $(SECURITY_RELEASES) + set -e ; for rel in woody sarge etch sid ; do \ + for archive in main contrib non-free ; do \ + $(PYTHON) bin/apt-update-file \ + $(MIRROR)/dists/$$rel/$$archive/source/Sources \ + data/packages/$${rel}__$${archive}_Sources ; \ + done ; \ + for arch in i386 ia64 ; do \ + for archive in main contrib non-free ; do \ + $(PYTHON) bin/apt-update-file \ + $(MIRROR)/dists/$$rel/$$archive/binary-$$arch/Packages \ + data/packages/$${rel}__$${archive}_$${arch}_Packages ; \ + done ; \ + done ; \ + done touch stamps/packages-downloaded + +ST_MIRROR = http://secure-testing.debian.net/debian-secure-testing/dists/etch/security-updates +ST_FILE = data/packages/etch_security_ +update-testing-security: + $(PYTHON) bin/apt-update-file \ + $(ST_MIRROR)/main/source/Sources $(ST_FILE)main_Sources + $(PYTHON) bin/apt-update-file \ + $(ST_MIRROR)/main/binary-i386/Packages $(ST_FILE)main_i386_Packages + $(PYTHON) bin/apt-update-file \ + $(ST_MIRROR)/main/binary-ia64/Packages $(ST_FILE)main_ia64_Packages + +SEC_MIRROR = http://security.debian.org/dists +update-security: + for archive in woody sarge ; do \ + $(PYTHON) bin/apt-update-file \ + $(SEC_MIRROR)/$$archive/updates/main/source/Sources \ + data/packages/$${archive}_security_main_Sources ; \ + for arch in i386 ia64 ; do \ + $(PYTHON) bin/apt-update-file \ + $(SEC_MIRROR)/$$archive/updates/main/binary-$$arch/Packages \ + data/packages/$${archive}_security_main_$${arch}_Packages ; \ + done ; \ + done |