]> git.decadent.org.uk Git - dak.git/commitdiff
Remove all apt.conf usage from dak
authorMark Hymers <mhy@debian.org>
Sat, 4 May 2013 10:06:20 +0000 (10:06 +0000)
committerMark Hymers <mhy@debian.org>
Sat, 4 May 2013 10:06:20 +0000 (10:06 +0000)
Signed-off-by: Mark Hymers <mhy@debian.org>
config/debian/apt.conf [deleted file]
config/debian/apt.conf.buildd [deleted file]
dak/generate_index_diffs.py
dak/new_security_install.py
daklib/utils.py

diff --git a/config/debian/apt.conf b/config/debian/apt.conf
deleted file mode 100644 (file)
index eb6a930..0000000
+++ /dev/null
@@ -1,237 +0,0 @@
-// The only use of this file nowadays is to serve as something for "apt-ftparchive clean"
-// and for the "python apt read an apt.conf" thingie. Otherwise its not really in use,
-// all the generation stuff is done in generate-packages-sources
-//
-// Well, except for that generate-releases and generate-index-diffs codebase, which
-// REALLY wants a cleanup.
-
-Dir 
-{
-   ArchiveDir "/srv/ftp-master.debian.org/ftp/";
-   OverrideDir "/srv/ftp-master.debian.org/scripts/override/";
-   CacheDir "/srv/ftp-master.debian.org/database/";
-};
-
-Default
-{
-   Packages::Compress "gzip bzip2";
-   Sources::Compress "gzip bzip2";
-   Contents::Compress "gzip";
-   DeLinkLimit 0;
-   MaxContentsChange 25000;
-   FileMode 0664;
-}
-
-TreeDefault
-{
-   Contents::Header "/srv/ftp-master.debian.org/dak/config/debian/Contents.top";
-};
-
-// OldStable
-
-tree "dists/oldstable-proposed-updates"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/oldstable-proposed-updates_$(SECTION)_binary-$(ARCH).list";
-   SourceFileList "/srv/ftp-master.debian.org/database/dists/oldstable-proposed-updates_$(SECTION)_source.list";
-   Sections "main contrib non-free";
-   Architectures "amd64 armel i386 ia64 mips mipsel powerpc s390 sparc kfreebsd-i386 kfreebsd-amd64 source";
-   BinOverride "override.squeeze.$(SECTION)";
-   ExtraOverride "override.squeeze.extra.$(SECTION)";
-   SrcOverride "override.squeeze.$(SECTION).src";
-   Contents " ";
-};
-
-tree "dists/squeeze-updates"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/squeeze-updates_$(SECTION)_binary-$(ARCH).list";
-   SourceFileList "/srv/ftp-master.debian.org/database/dists/squeeze-updates_$(SECTION)_source.list";
-   Sections "main contrib non-free";
-   Architectures "amd64 armel i386 ia64 mips mipsel powerpc s390 sparc kfreebsd-i386 kfreebsd-amd64 source";
-   BinOverride "override.squeeze.$(SECTION)";
-   ExtraOverride "override.squeeze.extra.$(SECTION)";
-   SrcOverride "override.squeeze.$(SECTION).src";
-   Contents " ";
-};
-
-// Stable
-
-tree "dists/proposed-updates"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/proposed-updates_$(SECTION)_binary-$(ARCH).list";
-   SourceFileList "/srv/ftp-master.debian.org/database/dists/proposed-updates_$(SECTION)_source.list";
-   Sections "main contrib non-free";
-   Architectures "amd64 armel armhf i386 ia64 mips mipsel powerpc s390 s390x sparc kfreebsd-i386 kfreebsd-amd64 source";
-   BinOverride "override.wheezy.$(SECTION)";
-   ExtraOverride "override.wheezy.extra.$(SECTION)";
-   SrcOverride "override.wheezy.$(SECTION).src";
-   Contents " ";
-};
-
-tree "dists/wheezy-updates"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/wheezy-updates_$(SECTION)_binary-$(ARCH).list";
-   SourceFileList "/srv/ftp-master.debian.org/database/dists/wheezy-updates_$(SECTION)_source.list";
-   Sections "main contrib non-free";
-   Architectures "amd64 armel armhf i386 ia64 mips mipsel powerpc s390 s390x sparc kfreebsd-i386 kfreebsd-amd64 source";
-   BinOverride "override.wheezy.$(SECTION)";
-   ExtraOverride "override.wheezy.extra.$(SECTION)";
-   SrcOverride "override.wheezy.$(SECTION).src";
-   Contents " ";
-};
-
-tree "dists/testing"
-{
-   FakeDI "dists/unstable";
-   FileList "/srv/ftp-master.debian.org/database/dists/testing_$(SECTION)_binary-$(ARCH).list";
-   SourceFileList "/srv/ftp-master.debian.org/database/dists/testing_$(SECTION)_source.list";
-   Sections "main contrib non-free";
-   Architectures "amd64 armel armhf i386 ia64 mips mipsel powerpc s390 s390x sparc kfreebsd-i386 kfreebsd-amd64 source";
-   BinOverride "override.jessie.$(SECTION)";
-   ExtraOverride "override.jessie.extra.$(SECTION)";
-   SrcOverride "override.jessie.$(SECTION).src";
-};
-
-tree "dists/testing-proposed-updates"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/testing-proposed-updates_$(SECTION)_binary-$(ARCH).list";
-   SourceFileList "/srv/ftp-master.debian.org/database/dists/testing-proposed-updates_$(SECTION)_source.list";
-   Sections "main contrib non-free";
-   Architectures "amd64 armel armhf i386 ia64 mips mipsel powerpc s390 s390x sparc kfreebsd-i386 kfreebsd-amd64 source";
-   BinOverride "override.jessie.$(SECTION)";
-   ExtraOverride "override.jessie.extra.$(SECTION)";
-   SrcOverride "override.jessie.$(SECTION).src";
-   Contents " ";
-};
-
-tree "dists/unstable"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/unstable_$(SECTION)_binary-$(ARCH).list";
-   SourceFileList "/srv/ftp-master.debian.org/database/dists/unstable_$(SECTION)_source.list";
-   Sections "main contrib non-free";
-   Architectures "alpha amd64 armel armhf hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 s390x sparc kfreebsd-i386 kfreebsd-amd64 source";
-   BinOverride "override.sid.$(SECTION)";
-   ExtraOverride "override.sid.extra.$(SECTION)";
-   SrcOverride "override.sid.$(SECTION).src";
-};
-
-// debian-installer
-
-tree "dists/oldstable-proposed-updates/main"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/oldstable-proposed-updates_main_$(SECTION)_binary-$(ARCH).list";
-   Sections "debian-installer";
-   Architectures "amd64 armel i386 ia64 mips mipsel powerpc s390 sparc kfreebsd-i386 kfreebsd-amd64";
-   BinOverride "override.squeeze.main.$(SECTION)";
-   SrcOverride "override.squeeze.main.src";
-   BinCacheDB "packages-debian-installer-$(ARCH).db";
-   Packages::Extensions ".udeb";
-   Contents " ";
-};
-
-tree "dists/proposed-updates/main"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/proposed-updates_main_$(SECTION)_binary-$(ARCH).list";
-   Sections "debian-installer";
-   Architectures "amd64 armel armhf i386 ia64 mips mipsel powerpc s390 s390x sparc kfreebsd-i386 kfreebsd-amd64";
-   BinOverride "override.wheezy.main.$(SECTION)";
-   SrcOverride "override.wheezy.main.src";
-   BinCacheDB "packages-debian-installer-$(ARCH).db";
-   Packages::Extensions ".udeb";
-   Contents " ";
-};
-
-tree "dists/testing/main"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/testing_main_$(SECTION)_binary-$(ARCH).list";
-   Sections "debian-installer";
-   Architectures "amd64 armel armhf i386 ia64 mips mipsel powerpc s390 s390x sparc kfreebsd-i386 kfreebsd-amd64";
-   BinOverride "override.jessie.main.$(SECTION)";
-   SrcOverride "override.jessie.main.src";
-   BinCacheDB "packages-debian-installer-$(ARCH).db";
-   Packages::Extensions ".udeb";
-   Contents "$(DIST)/../Contents-udeb";
-};
-
-tree "dists/testing/non-free"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/testing_non-free_$(SECTION)_binary-$(ARCH).list";
-   Sections "debian-installer";
-   Architectures "amd64 armel armhf i386 ia64 mips mipsel powerpc s390 s390x sparc kfreebsd-i386 kfreebsd-amd64";
-   BinOverride "override.jessie.main.$(SECTION)";
-   SrcOverride "override.jessie.main.src";
-   BinCacheDB "packages-debian-installer-$(ARCH).db";
-   Packages::Extensions ".udeb";
-   Contents "$(DIST)/../Contents-udeb-nf";
-};
-
-tree "dists/testing-proposed-updates/main"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/testing-proposed-updates_main_$(SECTION)_binary-$(ARCH).list";
-   Sections "debian-installer";
-   Architectures "amd64 armel armhf i386 ia64 mips mipsel powerpc s390 s390x sparc kfreebsd-i386 kfreebsd-amd64";
-   BinOverride "override.jessie.main.$(SECTION)";
-   SrcOverride "override.jessie.main.src";
-   BinCacheDB "packages-debian-installer-$(ARCH).db";
-   Packages::Extensions ".udeb";
-   Contents " ";
-};
-
-tree "dists/unstable/main"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/unstable_main_$(SECTION)_binary-$(ARCH).list";
-   Sections "debian-installer";
-   Architectures "alpha amd64 armel armhf hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 s390x sparc kfreebsd-i386 kfreebsd-amd64";
-   BinOverride "override.sid.main.$(SECTION)";
-   SrcOverride "override.sid.main.src";
-   BinCacheDB "packages-debian-installer-$(ARCH).db";
-   Packages::Extensions ".udeb";
-   Contents "$(DIST)/../Contents-udeb";
-};
-
-tree "dists/unstable/non-free"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/unstable_non-free_$(SECTION)_binary-$(ARCH).list";
-   Sections "debian-installer";
-   Architectures "alpha amd64 armel armhf hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 s390x sparc kfreebsd-i386 kfreebsd-amd64";
-   BinOverride "override.sid.main.$(SECTION)";
-   SrcOverride "override.sid.main.src";
-   BinCacheDB "packages-debian-installer-$(ARCH).db";
-   Packages::Extensions ".udeb";
-   Contents "$(DIST)/../Contents-udeb-nf";
-};
-
-tree "dists/experimental/main"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/experimental_main_$(SECTION)_binary-$(ARCH).list";
-   Sections "debian-installer";
-   Architectures "alpha amd64 armel armhf hppa i386 ia64 mips mipsel powerpc s390 s390x sparc kfreebsd-i386 kfreebsd-amd64";
-   BinOverride "override.sid.main.$(SECTION)";
-   SrcOverride "override.sid.main.src";
-   BinCacheDB "packages-debian-installer-$(ARCH).db";
-   Packages::Extensions ".udeb";
-   Contents "$(DIST)/../Contents-udeb";
-};
-
-tree "dists/experimental/non-free"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/experimental_non-free_$(SECTION)_binary-$(ARCH).list";
-   Sections "debian-installer";
-   Architectures "alpha amd64 armel armhf hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 s390x sparc kfreebsd-i386 kfreebsd-amd64";
-   BinOverride "override.sid.main.$(SECTION)";
-   SrcOverride "override.sid.main.src";
-   BinCacheDB "packages-debian-installer-$(ARCH).db";
-   Packages::Extensions ".udeb";
-   Contents "$(DIST)/../Contents-udeb-nf";
-};
-
-// Experimental
-
-tree "dists/experimental"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/experimental_$(SECTION)_binary-$(ARCH).list";
-   SourceFileList "/srv/ftp-master.debian.org/database/dists/experimental_$(SECTION)_source.list";
-   Sections "main contrib non-free";
-   Architectures "alpha amd64 armel armhf hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 s390x sparc kfreebsd-i386 kfreebsd-amd64 source";
-   BinOverride "override.sid.$(SECTION)";
-   SrcOverride "override.sid.$(SECTION).src";
-};
diff --git a/config/debian/apt.conf.buildd b/config/debian/apt.conf.buildd
deleted file mode 100644 (file)
index 88ebf4a..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-Dir 
-{
-   ArchiveDir "/srv/incoming.debian.org/buildd/";
-   OverrideDir "/srv/ftp-master.debian.org/scripts/override/";
-   CacheDir "/srv/ftp-master.debian.org/database/";
-};
-
-Default
-{
-   Packages::Compress ". bzip2 gzip";
-   Sources::Compress ". bzip2 gzip";
-   DeLinkLimit 0;
-   FileMode 0664;
-}
-
-bindirectory "incoming"
-{
-   Packages "Packages";
-   Contents " ";
-
-   BinOverride "override.sid.all3";
-   BinCacheDB "packages-accepted.db";
-   
-   FileList "/srv/ftp-master.debian.org/database/dists/unstable_accepted.list";
-
-   PathPrefix "";
-   Packages::Extensions ".deb .udeb";
-};
-
-bindirectory "incoming/"
-{
-   Sources "Sources";
-   BinOverride "override.sid.all3";
-   SrcOverride "override.sid.all3.src";
-   FileList "/srv/ftp-master.debian.org/database/dists/unstable_accepted.list";
-};
-
index db4837617008e815ea2d7bc2c6f519a47b5e920d..3391c7bbafae8714e678dc3be6249167e33bdbd8 100755 (executable)
@@ -311,9 +311,6 @@ def main():
         format = "%Y-%m-%d-%H%M.%S"
         Options["PatchName"] = time.strftime( format )
 
-    AptCnf = apt_pkg.newConfiguration()
-    apt_pkg.ReadConfigFileISC(AptCnf,utils.which_apt_conf_file())
-
     if Options.has_key("RootDir"):
         Cnf["Dir::Root"] = Options["RootDir"]
 
@@ -338,7 +335,8 @@ def main():
         if SuiteBlock.has_key("Components"):
             components = SuiteBlock.value_list("Components")
         else:
-            components = []
+            print "ALERT: suite %s does not have components set in dak.conf" % (suite)
+            continue
 
         suite_suffix = Cnf.find("Dinstall::SuiteSuffix")
         if components and suite_suffix:
@@ -348,18 +346,9 @@ def main():
 
         tree = SuiteBlock.get("Tree", "dists/%s" % (longsuite))
 
-        if AptCnf.has_key("tree::%s" % (tree)):
-            sections = AptCnf["tree::%s::Sections" % (tree)].split()
-        elif AptCnf.has_key("bindirectory::%s" % (tree)):
-            sections = AptCnf["bindirectory::%s::Sections" % (tree)].split()
-        else:
-            aptcnf_filename = os.path.basename(utils.which_apt_conf_file())
-            print "ALERT: suite %s not in %s, nor untouchable!" % (suite, aptcnf_filename)
-            continue
-
         # See if there are Translations which might need a new pdiff
         cwd = os.getcwd()
-        for component in sections:
+        for component in components:
             #print "DEBUG: Working on %s" % (component)
             workpath=os.path.join(Cnf["Dir::Root"], tree, component, "i18n")
             if os.path.isdir(workpath):
@@ -380,11 +369,7 @@ def main():
         for archobj in architectures:
             architecture = archobj.arch_string
 
-            # use sections instead of components since dak.conf
-            # treats "foo/bar main" as suite "foo", suitesuffix "bar" and
-            # component "bar/main". suck.
-
-            for component in sections:
+            for component in components:
                 if architecture == "source":
                     longarch = architecture
                     packages = "Sources"
index 4f718b457e1cbb19b2712edae111f0a0b6ef83e7..251f34fe6c16f9cc42a417004f6eba362690e25d 100755 (executable)
@@ -107,7 +107,6 @@ def _do_Approve():
         #    spawn("dak generate-filelist")
         print "Updating Packages and Sources files... This may take a while, be patient"
         spawn("/srv/security-master.debian.org/dak/config/debian-security/map.sh")
-        #    spawn("apt-ftparchive generate %s" % (utils.which_apt_conf_file()))
         spawn("dak generate-packages-sources2 -a security")
         print "Updating Release files..."
         spawn("dak generate-releases -a security")
index abe8f52b87cbff1adb4d23cdd7692145ef13f92a..084ac195bad036266d869de61b2933e752562612 100755 (executable)
@@ -789,20 +789,6 @@ def which_conf_file ():
 
     return default_config
 
-def which_apt_conf_file ():
-    res = socket.getfqdn()
-    # In case we allow local config files per user, try if one exists
-    if Cnf.find_b("Config::" + res + "::AllowLocalConfig"):
-        homedir = os.getenv("HOME")
-        confpath = os.path.join(homedir, "/etc/dak.conf")
-        if os.path.exists(confpath):
-            apt_pkg.ReadConfigFileISC(Cnf,default_config)
-
-    if Cnf.get("Config::" + res + "::AptConfig"):
-        return Cnf["Config::" + res + "::AptConfig"]
-    else:
-        return default_apt_config
-
 def which_alias_file():
     hostname = socket.getfqdn()
     aliasfn = '/var/lib/misc/'+hostname+'/forward-alias'