[Secure-testing-commits] r16403 - bin

Raphael Geissert geissert at alioth.debian.org
Sun Mar 20 01:22:04 UTC 2011


Author: geissert
Date: 2011-03-20 01:22:03 +0000 (Sun, 20 Mar 2011)
New Revision: 16403

Modified:
   bin/gen-DSA
Log:
Improve formatting of the CVE list


Modified: bin/gen-DSA
===================================================================
--- bin/gen-DSA	2011-03-20 01:14:32 UTC (rev 16402)
+++ bin/gen-DSA	2011-03-20 01:22:03 UTC (rev 16403)
@@ -48,6 +48,15 @@
 CVE="$(printf '%s' "$4" | tr "[:lower:]" "[:upper:]")"
 BUGNUM="$5"
 
+CVE="$(printf '%s' "$CVE" | sed 's/[ ,;]+/ /g' | tr ' ' "\n" | sort -n | tr "\n" ' ')"
+cve_spacing=
+
+for i in $(seq 0 16); do
+    cve_spacing="$cve_spacing "
+done
+sed_cmd='s/((CVE-[0-9-]+[ ]+){4})(.+)$/\1\\n'"$cve_spacing"'\3/g;P;D'
+CVE_LIST="$(printf '%s' "$CVE" | sed -r "$sed_cmd")"
+
 case "$DSAID" in
     *-*)
 	:
@@ -97,7 +106,7 @@
 setvar DEBFULLNAME
 setvar SPACEDDEBFULLNAME
 setvar PACKAGE
-setvar CVE
+setvar CVE "$CVE_LIST"
 setvar REMLOCAL "${REMLOCAL:-remote}"
 setvar DSAID
 setvar BUGNUM
@@ -131,7 +140,6 @@
 EOF
 
     if [ "$CVE" ]; then
-	CVE="$(printf '%s' "$CVE" | sed 's/[ ,;]+/ /g')"
 	printf "\t{%s}\n" "$CVE" >> $dsa_entry
     fi
 




More information about the Secure-testing-commits mailing list