[tools] master update

tmraz at fedoraproject.org tmraz at fedoraproject.org
Tue Jun 23 11:49:00 UTC 2020


The branch master has been updated
       via  ff67949521c929a243309f8a983b14a129820b0f (commit)
       via  4bb402fbae5a9c7e48b8f205f035e3d181b4b22f (commit)
       via  c64d64ed24edb03457ca343a9197f5b221990112 (commit)
       via  da999bb4be744046be67944c6f14052810f742f8 (commit)
       via  3d59254cb7aac3427c89f7305995a7e59a8e0a5a (commit)
       via  6da33b651e1dedf576bb454f2dbe56b6ed6b5fef (commit)
      from  3a3d8929cfab681d3807983a584fb4d7042df4b2 (commit)


- Log -----------------------------------------------------------------
commit ff67949521c929a243309f8a983b14a129820b0f
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date:   Wed Jun 10 11:35:23 2020 +0200

    Simplify and generalize passing of addrev flags via ghmerge

commit 4bb402fbae5a9c7e48b8f205f035e3d181b4b22f
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date:   Wed Jun 10 11:34:11 2020 +0200

    Add usage/doc/help text on --trivial option of 'addrev'

commit c64d64ed24edb03457ca343a9197f5b221990112
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date:   Sat Jun 6 20:27:02 2020 +0200

    Make opensslbuild faster by adding -j4 option to 'make test'

commit da999bb4be744046be67944c6f14052810f742f8
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date:   Sat Jun 6 20:25:59 2020 +0200

    Slightly improve user interaction of ghmerge

commit 3d59254cb7aac3427c89f7305995a7e59a8e0a5a
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date:   Mon May 25 21:10:54 2020 +0200

    Improve author matching for skipping author in list of reviewers in gitaddrev

commit 6da33b651e1dedf576bb454f2dbe56b6ed6b5fef
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date:   Mon May 25 21:09:48 2020 +0200

    Add check of REMOTE and --verbose option to ghmerge

-----------------------------------------------------------------------

Summary of changes:
 review-tools/addrev       |  7 ++++---
 review-tools/ghmerge      | 32 +++++++++++++++++---------------
 review-tools/gitaddrev    | 17 +++++++++--------
 review-tools/opensslbuild |  4 ++--
 4 files changed, 32 insertions(+), 28 deletions(-)

diff --git a/review-tools/addrev b/review-tools/addrev
index 24032e7..5617199 100755
--- a/review-tools/addrev
+++ b/review-tools/addrev
@@ -85,15 +85,16 @@ option style arguments:
 --list			List the known reviewers and exit (discards all other
 			arguments)
 --verbose		Be a bit more verbose
+--trivial		Do not require a CLA
 --reviewer=<reviewer>	A reviewer to be added on a Reviewed-by: line
 --rmreviewers		Remove all existing Reviewed-by: lines before adding
 			reviewers
 --commit=<id>		Only apply to commit <id>
 --myemail=<email>	Set email address.  Defaults to the result from
-			git configuration setting user.email.
---nopr			Do not requre a PR number.
+			git configuration setting user.email
+--nopr			Do not require a PR number
 [--prnum=]NNN           Add a reference to GitHub pull request NNN
--<n>			Change the last <n> commits.  Defaults to 1.
+-<n>			Change the last <n> commits.  Defaults to 1
 
 non-option style arguments can be:
 
diff --git a/review-tools/ghmerge b/review-tools/ghmerge
index d2da9e6..9c8a903 100755
--- a/review-tools/ghmerge
+++ b/review-tools/ghmerge
@@ -4,17 +4,21 @@ set -o errexit
 
 WHAT=openssl
 BUILD=yes
-TRIVIAL=""
 INTERACTIVE=yes
 AUTOSQUASH="--autosquash"
 [ -z ${CC+x} ] && CC="ccache gcc" # the default otherwise is "ccache clang-3.6"
 REMOTE=`git remote -v | awk '/git.openssl.org.*(push)/{ print $1; }' | head -n 1`
+if [ "$REMOTE" = "" ] ; then
+    echo Cannot find remote git.openssl.org
+    exit 1
+fi
 
 if [ ! -d .git ] ; then
     echo Not at top-level
     exit 1
 fi
 
+ADDREVOPTS=""
 # Parse JCL.
 while true ; do
     case "$1" in
@@ -24,9 +28,6 @@ while true ; do
     --web)
         WHAT=web ; BUILD=no ; shift
         ;;
-    --trivial)
-        TRIVIAL="--trivial" ; shift
-        ;;
     --noautosquash)
         AUTOSQUASH="" ; shift
         ;;
@@ -47,9 +48,10 @@ while true ; do
         shift
         break
         ;;
-    -*)
-        echo "$0: Unknown flag $1"
-        exit 1
+    -*) # e.g., --verbose, --trivial, --myemail=...
+        ADDREVOPTS="$ADDREVOPTS $1"
+        shift
+        break
         ;;
     *)
         break
@@ -58,7 +60,7 @@ while true ; do
 done
 
 if [ $# -lt 2 ] ; then
-    echo "Usage: $0 [flags] prnum reviewer..."
+    echo "Usage: $0 [flags, including addrev flags] prnum reviewer..."
     exit 1
 fi
 PRNUM=$1 ; shift
@@ -89,14 +91,14 @@ REL=`git rev-parse --abbrev-ref HEAD`
 WORK="${WHO}-${BRANCH}"
 PREV=
 
-echo -n "Press Enter to pull the latest $REL from $REMOTE: "; read foo
+echo -n "Press Enter to pull the latest branch '$REL' from $REMOTE: "; read foo
 git pull $REMOTE $REL
 
 function cleanup {
     if [ "$WORK" != "$REL" ]; then
         git checkout -q $REL
         git branch -D $WORK
-        git reset --hard $REMOTE/$REL
+        git reset --hard $REMOTE/$REL # prune any leftover commits added locally
     fi
 }
 trap 'cleanup' EXIT
@@ -105,16 +107,16 @@ git checkout -b $WORK $REL
 
 # append new commits from $REPO/$BRANCH
 git pull --rebase $REPO $BRANCH
-echo rebasing on $REL
+echo rebasing $BRANCH on $REL
 git rebase $REL || (git rebase --abort; exit 1)
 
 echo Diff against $REL
 git diff $REL
 
 if [ "$INTERACTIVE" == "yes" ] ; then
-    # echo -n "Press Enter to interactively rebase $AUTOSQUASH on $REL: "; read foo
+    echo -n "Press Enter to interactively rebase $AUTOSQUASH $BRANCH on $REL: "; read foo
     git rebase -i $AUTOSQUASH $REL || (git rebase --abort; exit 1)
-    addrev $TRIVIAL --prnum=$PRNUM $TEAM ${REL}..
+    addrev $ADDREVOPTS --prnum=$PRNUM $TEAM ${REL}..
 fi
 
 echo Log since $REL
@@ -122,11 +124,11 @@ git log $REL..
 
 git checkout $REL
 if [ "$INTERACTIVE" != "yes" ] ; then
-    echo -n "Press Enter to non-interactively merge --squash to $REL: "; read foo
+    echo -n "Press Enter to non-interactively merge --squash $BRANCH to $REL: "; read foo
     git merge --ff-only --no-commit --squash $WORK
     AUTHOR=`git show --no-patch --pretty="format:%an <%ae>" $WORK`
     git commit --author="$AUTHOR"
-    addrev $TRIVIAL --prnum=$PRNUM $TEAM $REMOTE/${REL}..
+    addrev $ADDREVOPTS --prnum=$PRNUM $TEAM $REMOTE/${REL}..
 else
     # echo -n "Press Enter to merge to $REL: "; read foo
     git merge --ff-only $WORK
diff --git a/review-tools/gitaddrev b/review-tools/gitaddrev
index 177a92a..cda9299 100755
--- a/review-tools/gitaddrev
+++ b/review-tools/gitaddrev
@@ -108,11 +108,12 @@ foreach (@ARGV) {
 }
 
 my @commit_message = map { (my $x = $_) =~ s|\R$||; $x } <STDIN>;
+my $author = $ENV{GIT_AUTHOR_EMAIL};
 my $trivial = !! grep(/^CLA:\s*Trivial\s*$/i, @commit_message);
 
 # If the author is a registered committer, that identity passes as a reviewer
 # too.  There is a twist, though...  see next comment
-if (my $rev = try_add_reviewer($ENV{GIT_AUTHOR_EMAIL})) {
+if (my $rev = try_add_reviewer($author)) {
 
     # So here's the deal: We added the commit author because we need to keep
     # count of the total amount of reviewers, which includes the commit author
@@ -128,7 +129,6 @@ if (my $rev = try_add_reviewer($ENV{GIT_AUTHOR_EMAIL})) {
     # In case the author is unknown to our databases or is lacking a CLA,
     # we need to be extra careful to check if this is supposed to be a
     # trivial commit.
-    my $author = $ENV{GIT_AUTHOR_EMAIL};
 
     # Note: it really should be enough to check if $author is unknown, since
     # the databases are supposed to be consistent with each other.  However,
@@ -141,6 +141,7 @@ if (my $rev = try_add_reviewer($ENV{GIT_AUTHOR_EMAIL})) {
     # more unnecessary errors (false positives).
     @nocla_reviewers = grep { $_ ne $author } @nocla_reviewers;
     @unknown_reviewers = grep { $_ ne $author } @unknown_reviewers;
+    $skip_reviewer = $author;
 }
 
 if (@unknown_reviewers) {
@@ -152,9 +153,6 @@ if (@nocla_reviewers) {
 
 print STDERR "Detected trivial marker\n" if $verbose && $trivial;
 
-print STDERR "Going with these reviewers:\n  ", join("\n  ", @reviewers), "\n"
-    if $verbose;
-
 if (scalar @reviewers < 2) {
     die "Too few reviewers (total must be at least 2)\n";
 }
@@ -162,11 +160,14 @@ if ($otccount < 1) {
     die "At least one of the reviewers must be an OTC member\n";
 }
 if ($skip_reviewer) {
-    @reviewers = grep { $_ ne $skip_reviewer } @reviewers;
-    @nocla_reviewers = grep { $_ ne $skip_reviewer } @nocla_reviewers;
-    @unknown_reviewers = grep { $_ ne $skip_reviewer } @unknown_reviewers;
+    @reviewers = grep { !m/$skip_reviewer/i } @reviewers;
+    @nocla_reviewers = grep { !m/$skip_reviewer/i } @nocla_reviewers;
+    @unknown_reviewers = grep { !m/$skip_reviewer/i } @unknown_reviewers;
 }
 
+print STDERR "Going with these reviewers:\n  ", join("\n  ", @reviewers), "\n"
+    if $verbose;
+
 if ($skip == 1) {
     my $commit_id = $ENV{GIT_COMMIT};
     foreach(@commits) {
diff --git a/review-tools/opensslbuild b/review-tools/opensslbuild
index e9abfb3..dcb8e62 100755
--- a/review-tools/opensslbuild
+++ b/review-tools/opensslbuild
@@ -46,11 +46,11 @@ grep -q doc-nits Makefile && make doc-nits
 s=$?
 test $configonly = yes && exit $s
 
-echo Making
+echo Making build
 make -s -j20
 make -s -j20 build_tests >/dev/null
 s=$?
 test $execonly = yes && exit $s
 
 echo Making test
-make test
+make -j4 test


More information about the openssl-commits mailing list