Merge lp:~jtv/launchpad/db-bug-752178 into lp:launchpad/db-devel
Status: | Merged |
---|---|
Approved by: | Jeroen T. Vermeulen |
Approved revision: | no longer in the source branch. |
Merged at revision: | 10412 |
Proposed branch: | lp:~jtv/launchpad/db-bug-752178 |
Merge into: | lp:launchpad/db-devel |
Diff against target: |
313 lines (+157/-31) 6 files modified
cronscripts/publishing/distro-parts/ubuntu/publish-distro.d/10-sign-releases (+2/-2) cronscripts/publishing/distro-parts/ubuntu/publish-distro.d/20-remove-uncompressed-listings (+1/-1) cronscripts/publishing/distro-parts/ubuntu/publish-distro.d/30-copy-indices (+10/-7) cronscripts/publishing/distro-parts/ubuntu/publish-distro.d/README.txt (+2/-2) lib/lp/archivepublisher/scripts/publish_ftpmaster.py (+52/-18) lib/lp/archivepublisher/tests/test_publish_ftpmaster.py (+90/-1) |
To merge this branch: | bzr merge lp:~jtv/launchpad/db-bug-752178 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Abel Deuring (community) | code | Approve | |
Review via email: mp+56719@code.launchpad.net |
Commit message
[r=adeuring][bug=752178] Escape run-parts parameters in publish-ftpmaster.
Description of the change
= Summary =
The new python replacement for cron.publish-
== Proposed fix ==
Quote and escape variables where they are passed to the shell.
== Pre-implementation notes ==
Problem diagnosed by and discussed with William Grant.
== Implementation details ==
The quoting is still nowhere near perfect: what happens if there's a space in one of the configured archive roots? Still, this should be an improvement over the old unquoted shell code.
A new end-to-end test makes sure that the ARCHIVEROOTS variable is actually usable in the run-parts scripts. This should also serve as an example of how to deal with the quoting of these variables. The test deliberately uses a filename with a space in it to guard against slipups and lucky escapes.
== Tests ==
{{{
./bin/test -vvc lp.archivepubli
}}}
== Demo and Q/A ==
Run cronscripts/
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
cronscripts/
cronscripts/
lib/lp/
cronscripts/
lib/lp/