[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bin/genDLA proposal: auto-commit requested DLA numbers (was: Re: [SECURITY] [DLA 265-1] unattended-upgrades security update)

HI Raphael,

On  Sa 04 Jul 2015 08:25:27 CEST, Raphael Hertzog wrote:


On Sat, 04 Jul 2015, Mike Gabriel wrote:
>It displays a colorful warning and offers to commit only the
>modified file (if you use svn, if you use git-svn like me, you're on your

Why not also commit the changes to the dla-needed.txt file?

I just forgot about it. You're right we should do that too.

What about this then (not entirely tested, I use git-svn):

diff --git a/bin/gen-DSA b/bin/gen-DSA
index 395a8f1..9156d0b 100755
--- a/bin/gen-DSA
+++ b/bin/gen-DSA
@@ -368,4 +368,17 @@ EOF
sed -rn '/^'"$PACKAGE"'\b/{: next;n;/^\s/b next;d};p' $needed_file > $needed_file.new
     mv $needed_file.new $needed_file
     echo "$IDMODE text written to ./$IDMODE-$DAID"
+    if [ "$IDMODE" = "DLA" ]; then
+ warn "you need to commit the changes to data/$IDMODE/list to actually reserve the $IDMODE number and avoid conflicts with others."
+	if [ -d .svn ]; then
+	    idmode=$(echo "$IDMODE" | tr A-Z a-z)
+	    echo "Here are the pending changes:"
+	    svn diff data/$IDMODE/list data/$idmode-needed.txt
+	    echo -n "Do you want to commit them now ? [Yn] "
+	    read reply
+	    if [ "$reply" = "Y" ] || [ "$reply" = "" ] || [ "$reply" = "y" ]; then
+		svn commit data/$IDMODE/list data/$idmode-needed.txt
+	    fi
+	fi
+    fi

I just looked at the patch and played with it a little.


  o We maybe want to do an "svn update" before manipulating data/DLA/list
and data/dla-needed.txt file? Probably a minor thing, but it svn updating could
    be handeled by the script, as well
  o I'd auto-generate a commit message, something like:
    -m "reserve $IDMODE-$DAID for $PACKAGE"
I'd actually even prefer having the package version in that commit message, but with my little son
    sitting next to me, this is a non-trivial task
o Also, the "warning" text message on screen is above the svn diff output. There it somehow gets lost and "stayed unseen" for me, the first time I tested this patch. Maybe the warning message should be right above the "Do you want to commit now?" question.(?)

All three comments above are more in the "cosmetic improvements" category, so I'd say using your changes without modifications is just fine and helps a lot if people are not accustomed to the LTS upload / announcing workflow that much. If you think some of the above thoughts are useful, I can work on a follow-up commit during the coming week.



mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de


Attachment: pgpofubB0BszD.pgp
Description: Digitale PGP-Signatur

Reply to: