jenkins-bot has submitted this change and it was merged.

Change subject: Update refresh-dblist
......................................................................


Update refresh-dblist

Also remove the logmsg-git-hook; it doesn't work.

Change-Id: Ifd9651dfc5ad267432591d287a5845f8cdbe971d
---
D logmsg-git-hook
M multiversion/checkoutMediaWiki.php
M refresh-dblist
3 files changed, 7 insertions(+), 53 deletions(-)

Approvals:
  Reedy: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/logmsg-git-hook b/logmsg-git-hook
deleted file mode 100755
index 3bd2de8..0000000
--- a/logmsg-git-hook
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/bash
-
-# Script to log repository modification on deployment hosts, so we have some
-# notion of what each sync and scap in the log pushed out.
-
-# If invoked with "--install", configure the hook for MediaWiki's staging dir
-# and its php-* subdirectories.
-[[ "$1" == --install ]] && {
-    . /usr/local/lib/mw-deployment-vars.sh
-
-    SCRIPT="$( readlink -f $0 )"
-    for HOOK in 'post-commit' 'post-merge' 'post-rewrite'; do
-        ln -fs $SCRIPT $MW_COMMON_SOURCE/.git/hooks/$HOOK
-        find $MW_COMMON_SOURCE -maxdepth 3 -path '*/php-*/.git/hooks' -execdir 
ln -fs $SCRIPT hooks/$HOOK \;
-    done
-
-    echo "Ok."
-    exit
-}
-
-{
-
-  # Exit unconditionally if the NOLOGMSG environment variable is set.
-  # Security engineers should set this variable in their ~/.profile.
-  [[ "$NOLOGMSG" ]] && exit;
-
-  REPO_ROOT="$( git rev-parse --show-toplevel )" || exit
-
-  # Exclude security patches by determining the latest common commit between
-  # the local branch and upstream. Exclude merge commits to get a Change-Id.
-  COMMIT="$( git rev-list -1 --no-merges @{upstream} )" || exit
-
-  SUBJECT="$( git log -1 --format=%s ${COMMIT} )" || exit
-  CHANGE="$( git log -1 --format=%B ${COMMIT} | grep -Po '(?<=Change-Id: 
).{10}' )" || exit
-
-  # If the Change-Id has already been logged, no change has occurred that
-  # should be publicly visible. Perhaps someone is committing a security fix.
-  # If it hasn't been logged, add it to the log file.
-  [[ -r "/var/log/logmsg" ]] && ! grep -q "${CHANGE}" /var/log/logmsg || exit
-  echo "${CHANGE}" >> /var/log/logmsg || exit
-
-  dologmsg "!log ${USER} updated ${REPO_ROOT} to {{Gerrit|${CHANGE:0:10}}}: 
${SUBJECT}"
-
-} &>/dev/null
diff --git a/multiversion/checkoutMediaWiki.php 
b/multiversion/checkoutMediaWiki.php
index 40879b0..beb4cb6 100644
--- a/multiversion/checkoutMediaWiki.php
+++ b/multiversion/checkoutMediaWiki.php
@@ -161,9 +161,6 @@
                print "Directory already exists: $l10nDir\n";
        }
 
-       # Install logmsg hook
-       exec( '../logmsg-git-hook --install' );
-
        print "\nMediaWiki $dstVersionNum, from $gitVersion, successfully 
checked out.\n";
 }
 
diff --git a/refresh-dblist b/refresh-dblist
index ab04654..4b1dd3a 100755
--- a/refresh-dblist
+++ b/refresh-dblist
@@ -30,9 +30,10 @@
        s7.dblist
 */
 
-require_once( dirname( __FILE__ ) . '/multiversion/MWRealm.php' );
+require_once( __DIR__ . '/multiversion/MWRealm.php' );
+require_once( __DIR__ . '/multiversion/defines.php' );
 
-$base = "/a/common";
+$base = MEDIAWIKI_STAGING_DIR;
 
 $defaultCluster = 's3';
 $clusterOverrides = 
loadClusterList(getRealmSpecificFilename("$base/wmf-config/db.php"));
@@ -67,7 +68,7 @@
                $cluster = $defaultCluster;
        }
        $clusterAssignments[$cluster][] = $wiki;
-       
+
        if (in_array($wiki, $special)) {
                $specialMatch[] = $wiki;
                continue;
@@ -107,12 +108,12 @@
 
 function listOut($group, $list, $print = true) {
        global $base;
-       
+
        $filename = getRealmSpecificFilename("$base/$group.dblist");
        if ( $print ) {
                printf("Listing %d wikis in %s...\n", count($list), $filename);
        }
-       
+
        $out = fopen("$filename.new", "xt");
        if ($out) {
                sort($list);
@@ -120,7 +121,7 @@
                        fwrite($out, "$wiki\n");
                }
                fclose($out);
-               
+
                if (file_exists("$filename.bak")) {
                        unlink("$filename.bak");
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/157485
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd9651dfc5ad267432591d287a5845f8cdbe971d
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to