Commit dafb2949 authored by Bernhard Link's avatar Bernhard Link

allow to set Signed-By header via conf/distributions

parent caa4f948
2018-08-12 Bernhard R. Link <brlink@debian.org>
* allow to set Signed-By header via conf/distributions
* add _listcodenames command (based on work from Benjamin Drung)
* drop "FILE LOCATION" headers from Contents files
* multiple manpage fixes
......
......@@ -55,6 +55,7 @@ static retvalue distribution_free(struct distribution *distribution) {
free(distribution->butautomaticupgrades);
free(distribution->label);
free(distribution->description);
free(distribution->signed_by);
free(distribution->deb_override);
free(distribution->udeb_override);
free(distribution->dsc_override);
......@@ -398,6 +399,7 @@ CFallSETPROC(distribution, butautomaticupgrades)
CFtruthSETPROC2(distribution, readonly, readonly)
CFallSETPROC(distribution, label)
CFallSETPROC(distribution, description)
CFallSETPROC(distribution, signed_by)
CFsignwithSETPROC(distribution, signwith)
CFfileSETPROC(distribution, deb_override)
CFfileSETPROC(distribution, udeb_override)
......@@ -464,6 +466,7 @@ static const struct configfield distributionconfigfields[] = {
CF("DebIndices", distribution, deb),
CF("DebOverride", distribution, deb_override),
CF("Description", distribution, description),
CF("Signed-By", distribution, signed_by),
CF("DscIndices", distribution, dsc),
CF("DscOverride", distribution, dsc_override),
CF("FakeComponentPrefix", distribution, fakecomponentprefix),
......
......@@ -43,7 +43,7 @@ struct distribution {
* (and only for sanity checks) */
/*@null@*/char *suite, *version;
/*@null@*/char *origin, *label, *description,
*notautomatic, *butautomaticupgrades;
*notautomatic, *butautomaticupgrades, *signed_by;
/* What architectures and components are there */
struct atomlist architectures, components;
/* which update rules to use */
......
......@@ -1625,6 +1625,12 @@ the section (usually \fBbyhand\fP),
the priority (usually only \fB\-\fP),
the filename in the changes file and
the full filename (with processincoming in the secure TempDir).
.TP
.B Signed\-By
This optional field is simply copied into the Release files.
It is used to tell apt which keys to trust for this Release
in the future.
(see SignWith for how to tell reprepro whether and how to sign).
.SS conf/updates
.TP
.B Name
......
......@@ -1674,6 +1674,10 @@ retvalue release_prepare(struct release *release, struct distribution *distribut
writestring("\nDescription: ");
writestring(distribution->description);
}
if (distribution->signed_by != NULL) {
writestring("\nSigned-By: ");
writestring(distribution->signed_by);
}
if (distribution->notautomatic != NULL) {
writestring("\nNotAutomatic: ");
writestring(distribution->notautomatic);
......
set -u
. "$TESTSDIR"/test.inc
mkdir conf
cat > conf/distributions <<EOF
Codename: o
Architectures: a
Components: e
DebIndices: Packages .
EOF
testrun - -b . export o 3<<EOF
stdout
$(odb)
-v1*=Exporting o...
-v2*=Created directory "./dists"
-v2*=Created directory "./dists/o"
-v2*=Created directory "./dists/o/e"
-v2*=Created directory "./dists/o/e/binary-a"
-v6*= exporting 'o|e|a'...
-v6*= creating './dists/o/e/binary-a/Packages' (uncompressed)
EOF
testrun - -b . remove o nothing 3<<EOF
stderr
-v0*=Not removed as not found: nothing
stdout
-v0*=Exporting indices...
-v6*= looking for changes in 'o|e|a'...
EOF
cat >> conf/distributions <<EOF
Signed-By: test
EOF
testrun - -b . export o 3<<EOF
stdout
-v1*=Exporting o...
-v6*= exporting 'o|e|a'...
-v6*= replacing './dists/o/e/binary-a/Packages' (uncompressed)
EOF
dodo grep 'Signed-By: test' dists/o/Release
testrun - -b . remove o nothing 3<<EOF
stderr
-v0*=Not removed as not found: nothing
stdout
-v0*=Exporting indices...
-v6*= looking for changes in 'o|e|a'...
EOF
dodo grep 'Signed-By: test' dists/o/Release
cat >> conf/distributions <<EOF
ValidFor: 100d
EOF
testrun - -b . export o 3<<EOF
stdout
-v1*=Exporting o...
-v6*= exporting 'o|e|a'...
-v6*= replacing './dists/o/e/binary-a/Packages' (uncompressed)
EOF
dodo grep '^Valid-Until:' dists/o/Release
testrun - -b . --export=normal remove o nothing 3<<EOF
stderr
-v0*=Not removed as not found: nothing
stdout
-v0*=Exporting indices...
-v6*= looking for changes in 'o|e|a'...
EOF
dodo grep '^Valid-Until:' dists/o/Release
rm -r conf db dists
testsuccess
......@@ -233,6 +233,7 @@ runtest() {
if test x"$testtorun" != x"all" ; then
runtest "$testtorun"
else
runtest export
runtest buildinfo
runtest updatepullreject
runtest descriptions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment