Merge lp:~apw/launchpad/signing-be-kinder-to-mirrors into lp:launchpad

Proposed by Andy Whitcroft on 2016-05-26
Status: Rejected
Rejected by: Colin Watson on 2016-06-22
Proposed branch: lp:~apw/launchpad/signing-be-kinder-to-mirrors
Merge into: lp:launchpad
Diff against target: 28 lines (+3/-3)
2 files modified
lib/lp/archivepublisher/signing.py (+1/-1)
lib/lp/archivepublisher/tests/test_signing.py (+2/-2)
To merge this branch: bzr merge lp:~apw/launchpad/signing-be-kinder-to-mirrors
Reviewer Review Type Date Requested Status
Colin Watson 2016-05-26 Disapprove on 2016-06-22
Review via email: mp+295810@code.launchpad.net

Description of the change

Signing should not replace directories with symlinks to avoid pain for mirrors.

To post a comment you must log in.
Colin Watson (cjwatson) wrote :

This will create the same problem in the other direction for mirrors that have already been bodged to have signed as a directory and uefi as a symlink. As discussed on IRC, it seems that we need to remove the whole-directory symlinking for a while and then come up with something more fine-grained.

review: Needs Fixing
Colin Watson (cjwatson) wrote :

We ended up taking the different approach of using two different custom upload types and no symlinks.

review: Disapprove

Unmerged revisions

18071. By Andy Whitcroft on 2016-05-26

siging: recreate missing efi symlinks

Signed-off-by: Andy Whitcroft <email address hidden>

18070. By Andy Whitcroft on 2016-05-26

signing: be kinder to mirrors

Renaming the existing uefi directory and replacing it with a link breaks
mirrors which use rsync.

Signed-off-by: Andy Whitcroft <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/archivepublisher/signing.py'
2--- lib/lp/archivepublisher/signing.py 2016-05-24 17:41:57 +0000
3+++ lib/lp/archivepublisher/signing.py 2016-05-26 09:59:21 +0000
4@@ -105,7 +105,7 @@
5 pubconf.archiveroot, "dists", suite, "main", "uefi")
6 if not os.path.exists(dists_signed):
7 if os.path.isdir(dists_uefi):
8- os.rename(dists_uefi, dists_signed)
9+ os.symlink("uefi", dists_signed)
10 else:
11 os.makedirs(dists_signed, 0o755)
12 if not os.path.exists(dists_uefi):
13
14=== modified file 'lib/lp/archivepublisher/tests/test_signing.py'
15--- lib/lp/archivepublisher/tests/test_signing.py 2016-05-24 21:33:32 +0000
16+++ lib/lp/archivepublisher/tests/test_signing.py 2016-05-26 09:59:21 +0000
17@@ -515,9 +515,9 @@
18 self.openArchive("test", "1.0", "amd64")
19 self.archive.add_file("1.0/empty.efi", "")
20 self.process()
21+ self.assertTrue(os.path.islink(os.path.join(
22+ self.getDistsPath(), "signed")))
23 self.assertTrue(os.path.isdir(os.path.join(
24- self.getDistsPath(), "signed")))
25- self.assertTrue(os.path.islink(os.path.join(
26 self.getDistsPath(), "uefi")))
27 self.assertTrue(os.path.exists(os.path.join(
28 self.getSignedPath("test", "amd64"), "1.0", "empty.efi")))