Debian Codegraph @

debian/gen_signing_changelog

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2 #
3 # Generate a changelog file for the signed fwupdate package, based on
4 # a changelog.in file and other state
5
6 DIR=$1
7 SOURCE=$2
8 ARCH=$3
9 IN="${DIR}/changelog.in"
10 OUT="${DIR}/changelog"
11
12 # Parse out fields from our changelg entry - want the signing-template
13 # one to match all the important details where we can
14 DISTRIBUTION="$(dpkg-parsechangelogscip-shell system . . dpkg-parsechangelog. | sedscip-shell system . . sed. -ne 's/^Distribution: \(.*\)/\1/p')"
15 URGENCY="$(dpkg-parsechangelogscip-shell system . . dpkg-parsechangelog. | sedscip-shell system . . sed. -ne 's/^Urgency: \(.*\)/\1/p')"
16 MAINT="$(dpkg-parsechangelogscip-shell system . . dpkg-parsechangelog. | sedscip-shell system . . sed. -ne 's/^Maintainer: \(.*\)/\1/p')"
17 DATE="$(dpkg-parsechangelogscip-shell system . . dpkg-parsechangelog. | sedscip-shell system . . sed. -ne 's/^Date: \(.*\)/\1/p')"
18
19 # If the version ends in "+bXXX", this is a binNMU. We don't want a new
20 # source package to look like that, so change it to ".bXXX" instead
21 VERSION="$(dpkg-parsechangelogscip-shell system . . dpkg-parsechangelog. | sedscip-shell system . . sed. -ne 's/^Version: \(.*\)/\1/p')"
22 MANGLED_VERSION="$(echoscip-shell system . . echo. $VERSION | sedscip-shell system . . sed. -r 's/-/\+/;s/\+(b[[:digit:]]+)$/.\1/')"
23
24 printfscip-shell system . . printf. "%s-%s-signed (%s) %s; urgency=%s\n" "fwupd" "${ARCH}" "${MANGLED_VERSION}" "${DISTRIBUTION}" "${URGENCY}" > $OUT
25 printfscip-shell system . . printf. "\n" >> $OUT
26 printfscip-shell system . . printf. " * Update to %s version %s\n" "${SOURCE}" "${VERSION}" >> $OUT
27 printfscip-shell system . . printf. "\n" >> $OUT
28 printfscip-shell system . . printf. " -- %s %s\n" "${MAINT}" "${DATE}" >> $OUT
29 printfscip-shell system . . printf. "\n" >> $OUT
30
31 catscip-shell system . . cat. $IN >> $OUT
32 rmscip-shell system . . rm. -f $IN