/[secure-testing]/Makefile
ViewVC logotype

Contents of /Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1994 - (hide annotations) (download)
Thu Sep 15 10:11:44 2005 UTC (7 years, 8 months ago) by fw
File size: 2920 byte(s)
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.
1 fw 1934 PYTHON = python
2     PYTHON_MODULES = $(wildcard lib/python/*.py)
3     BUG_LISTS = $(wildcard data/*/list)
4    
5 fw 1947 # Adjust these if necessary. The architecture selection is arther
6     # arbitrary at the moment. More architectures can be added later.
7 fw 1934
8 fw 1947 MIRROR = http://merkel.debian.org/~aba/debian/
9     RELEASES_with_proposed_updates = sarge=i386,ia64 etch=i386,ia64
10     RELEASES = sid=i386,ia64 $(RELEASES_with_proposed_updates) \
11 fw 1966 $(subst =,-proposed-updates=, $(RELEASES_with_proposed_updates)) \
12     woody=i386
13     SECURITY_RELEASES = sarge-security=i386,ia64 woody-security=i386
14 fw 1947 PACKAGE_FILES = $(wildcard data/packages/*_Sources) \
15     $(wildcard data/packages/*_Packages)
16    
17 fw 1994 all:
18     $(PYTHON) bin/update-db
19 fw 1947
20     clean:
21     -rm data/security.db
22     -rm stamps/*-*
23    
24 fw 1934 .PHONY: check check-syntax
25    
26     test check: check-syntax
27    
28     check-syntax: stamps/CAN-syntax stamps/CVE-syntax \
29     stamps/DSA-syntax stamps/DTSA-syntax
30    
31     stamps/CAN-syntax: data/CAN/list bin/check-syntax $(PYTHON_MODULES)
32     $(PYTHON) bin/check-syntax CAN data/CAN/list
33     touch $@
34    
35     stamps/CVE-syntax: data/CVE/list bin/check-syntax $(PYTHON_MODULES)
36     $(PYTHON) bin/check-syntax CVE data/CVE/list
37     touch $@
38    
39     stamps/DSA-syntax: data/DSA/list bin/check-syntax $(PYTHON_MODULES)
40     $(PYTHON) bin/check-syntax DSA data/DSA/list
41     touch $@
42    
43     stamps/DTSA-syntax: data/DTSA/list bin/check-syntax $(PYTHON_MODULES)
44     $(PYTHON) bin/check-syntax DTSA data/DTSA/list
45     touch $@
46 fw 1947
47 fw 1994 .PHONY: update-packages update-etch-security
48 fw 1947 update-packages:
49 fw 1994 set -e ; for rel in woody sarge etch sid ; do \
50     for archive in main contrib non-free ; do \
51     $(PYTHON) bin/apt-update-file \
52     $(MIRROR)/dists/$$rel/$$archive/source/Sources \
53     data/packages/$${rel}__$${archive}_Sources ; \
54     done ; \
55     for arch in i386 ia64 ; do \
56     for archive in main contrib non-free ; do \
57     $(PYTHON) bin/apt-update-file \
58     $(MIRROR)/dists/$$rel/$$archive/binary-$$arch/Packages \
59     data/packages/$${rel}__$${archive}_$${arch}_Packages ; \
60     done ; \
61     done ; \
62     done
63 fw 1947 touch stamps/packages-downloaded
64 fw 1994
65     ST_MIRROR = http://secure-testing.debian.net/debian-secure-testing/dists/etch/security-updates
66     ST_FILE = data/packages/etch_security_
67     update-testing-security:
68     $(PYTHON) bin/apt-update-file \
69     $(ST_MIRROR)/main/source/Sources $(ST_FILE)main_Sources
70     $(PYTHON) bin/apt-update-file \
71     $(ST_MIRROR)/main/binary-i386/Packages $(ST_FILE)main_i386_Packages
72     $(PYTHON) bin/apt-update-file \
73     $(ST_MIRROR)/main/binary-ia64/Packages $(ST_FILE)main_ia64_Packages
74    
75     SEC_MIRROR = http://security.debian.org/dists
76     update-security:
77     for archive in woody sarge ; do \
78     $(PYTHON) bin/apt-update-file \
79     $(SEC_MIRROR)/$$archive/updates/main/source/Sources \
80     data/packages/$${archive}_security_main_Sources ; \
81     for arch in i386 ia64 ; do \
82     $(PYTHON) bin/apt-update-file \
83     $(SEC_MIRROR)/$$archive/updates/main/binary-$$arch/Packages \
84     data/packages/$${archive}_security_main_$${arch}_Packages ; \
85     done ; \
86     done

  ViewVC Help
Powered by ViewVC 1.1.5