Merge lp:~jtv/launchpad/db-bug-752179 into lp:launchpad/db-devel

Proposed by Jeroen T. Vermeulen
Status: Merged
Approved by: Jeroen T. Vermeulen
Approved revision: no longer in the source branch.
Merged at revision: 10408
Proposed branch: lp:~jtv/launchpad/db-bug-752179
Merge into: lp:launchpad/db-devel
Diff against target: 15 lines (+6/-0)
1 file modified
cronscripts/publishing/distro-parts/ubuntu/publish-distro.d/10-sign-releases (+6/-0)
To merge this branch: bzr merge lp:~jtv/launchpad/db-bug-752179
Reviewer Review Type Date Requested Status
Abel Deuring (community) code Approve
Review via email: mp+56896@code.launchpad.net

Commit message

[r=adeuring][bug=752179] Set GNUPGHOME in publish-ftpmaster distro-signing plugin.

Description of the change

= Summary =

The new, distro-agnostic python replacement for the cron.publish-ftpmaster script "outsources" distribution-specific or system-specific jobs to plugin scripts run through run-parts.

William found a problem however. Of the production scripts bundled with the LP source tree, the script tasked with signing Ubuntu releases didn't have its GNUPGROOT set up. Instead, it improperly inherited a temporary setup created by the LaunchpadScript.

== Proposed fix ==

Set the GNUPGHOME to the value the cron.publish-ftpmaster script used in production.

== Pre-implementation notes ==

On dogfood, William had to clear the variable. If we ever want to use the production scripts that are currently still in the Launchpad tree, we could set them up locally; edit them locally; or even just create the same GNUPGHOME directory as on production.

The default however is not to use these scripts on dogfood. This can be changed in the LAZR config.

== Implementation details ==

Doing this in the plugin script, not the LaunchpadScript, since it's system-specific and distro-specific, and since other scripts might conceivably want to access the inherited configuration.

== Tests ==

It's hard to test this, partly because it all happens in a shell script and partly because it lies somewhere between code and configuration.

== Demo and Q/A ==

William has already tried this on dogfood, though with a different value.

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  cronscripts/publishing/distro-parts/ubuntu/publish-distro.d/10-sign-releases

To post a comment you must log in.
Revision history for this message
Abel Deuring (adeuring) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cronscripts/publishing/distro-parts/ubuntu/publish-distro.d/10-sign-releases'
2--- cronscripts/publishing/distro-parts/ubuntu/publish-distro.d/10-sign-releases 2011-03-29 14:09:31 +0000
3+++ cronscripts/publishing/distro-parts/ubuntu/publish-distro.d/10-sign-releases 2011-04-08 08:35:50 +0000
4@@ -1,5 +1,11 @@
5 #!/bin/sh -e
6
7+# The calling script may set GNUPGHOME to a value set up by Launchpad's
8+# script machinery. In production, we have a dedicated directory set up
9+# for this.
10+GNUPGHOME=/srv/launchpad.net/ubuntu-archive/gnupg-home
11+
12+
13 RELEASE_FILES=`find "$DISTSROOT".new -maxdepth 2 -name Release`
14 DIST_UPGRADER_TARBALLS=`
15 find "$DISTSROOT".new"/*/*/dist-upgrader* -name "*.tar.gz" || true`

Subscribers

People subscribed via source and target branches

to status/vote changes: