[devscripts] 01/03: chdist: Symlink, rather than copy, archive keyrings

James McCoy jamessan at debian.org
Wed Jan 27 01:27:18 UTC 2016


This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch master
in repository devscripts.

commit 9aed0efaa69e8f9f41f4f70651cd1acefd5d16aa
Author: James McCoy <jamessan at debian.org>
Date:   Sun Jan 17 15:05:38 2016 -0500

    chdist: Symlink, rather than copy, archive keyrings
    
    chdist trees need the archive keyrings so apt can verify signatures, but
    copying the files leads to outdated keyrings.  Using symlinks instead
    allows the native environment's updates be reflected in the chdist
    environment.
    
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 debian/changelog  | 3 +++
 scripts/chdist.pl | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 0655cb1..95fb01d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,9 @@ devscripts (2.16.1) UNRELEASED; urgency=medium
     + Recognize dash as a valid shell.
     + Check scripts which use “#!/path/to/env $interpreter”
   * debian/tests/control: Add gcc as a dependency for dpkg-architecture.
+  * chdist:
+    + Symlink, rather than copy, the archive keyrings into the chdist tree so
+      they don't get stale.  (Closes: #783497)
 
   [ Christoph Berg ]
   * debcheckout: Add auth mapping for https://github.com.
diff --git a/scripts/chdist.pl b/scripts/chdist.pl
index 1a9dcc4..fd37d4d 100755
--- a/scripts/chdist.pl
+++ b/scripts/chdist.pl
@@ -419,7 +419,10 @@ EOF
 			    debian-archive-removed-keys.gpg
 			    ubuntu-archive-keyring.gpg
 			    ubuntu-archive-removed-keys.gpg)) {
-	cp("/usr/share/keyrings/$keyring", "$dir/etc/apt/trusted.gpg.d/");
+	my $src = "/usr/share/keyrings/$keyring";
+	if (-f $src) {
+	    symlink $src, "$dir/etc/apt/trusted.gpg.d/$keyring";
+	}
     }
     print "Now edit $dir/etc/apt/sources.list\n" unless $version;
     print "Run chdist apt-get $dist update\n";

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list