From bc9a2e0eec14192fca315cf4562374d9bedf9fe9 Mon Sep 17 00:00:00 2001 From: Mark Hymers Date: Sat, 4 May 2013 10:06:20 +0000 Subject: [PATCH] Remove all apt.conf usage from dak Signed-off-by: Mark Hymers --- config/debian/apt.conf | 237 ---------------------------------- config/debian/apt.conf.buildd | 37 ------ dak/generate_index_diffs.py | 23 +--- dak/new_security_install.py | 1 - daklib/utils.py | 14 -- 5 files changed, 4 insertions(+), 308 deletions(-) delete mode 100644 config/debian/apt.conf delete mode 100644 config/debian/apt.conf.buildd diff --git a/config/debian/apt.conf b/config/debian/apt.conf deleted file mode 100644 index eb6a9302..00000000 --- a/config/debian/apt.conf +++ /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 index 88ebf4ae..00000000 --- a/config/debian/apt.conf.buildd +++ /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"; -}; - diff --git a/dak/generate_index_diffs.py b/dak/generate_index_diffs.py index db483761..3391c7bb 100755 --- a/dak/generate_index_diffs.py +++ b/dak/generate_index_diffs.py @@ -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" diff --git a/dak/new_security_install.py b/dak/new_security_install.py index 4f718b45..251f34fe 100755 --- a/dak/new_security_install.py +++ b/dak/new_security_install.py @@ -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") diff --git a/daklib/utils.py b/daklib/utils.py index abe8f52b..084ac195 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -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' -- 2.39.5