summaryrefslogtreecommitdiff
path: root/maintainer-scripts
diff options
context:
space:
mode:
authorVladimir Makarov <vmakarov@gcc.gnu.org>2019-12-12 20:46:39 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>2019-12-12 20:46:39 +0000
commit3a8c69ecd95f708f5d489d92ff12dfbe2a93b00b (patch)
tree1596316424f3ab3df4c378a866d87ddca07e342f /maintainer-scripts
parent3fceb4462a7484503f3048a2c402e7996c72cc7c (diff)
parentbdaf8be1b2e3514b8bbcdd1042136e7d91b3c3f3 (diff)
Merged latest trunk changes to ira-select.devel/ira-select
From-SVN: r279316
Diffstat (limited to 'maintainer-scripts')
-rw-r--r--maintainer-scripts/ChangeLog39
-rwxr-xr-xmaintainer-scripts/bugzilla-close-candidate.py96
-rw-r--r--maintainer-scripts/crontab5
-rwxr-xr-xmaintainer-scripts/gcc_release14
-rwxr-xr-xmaintainer-scripts/generate_libstdcxx_web_docs14
-rwxr-xr-xmaintainer-scripts/update_version_svn2
-rwxr-xr-xmaintainer-scripts/update_web_docs_svn2
7 files changed, 159 insertions, 13 deletions
diff --git a/maintainer-scripts/ChangeLog b/maintainer-scripts/ChangeLog
index 0259aabd1d3..6182cf774b5 100644
--- a/maintainer-scripts/ChangeLog
+++ b/maintainer-scripts/ChangeLog
@@ -1,3 +1,42 @@
+2019-11-20 Janne Blomqvist <jb@gcc.gnu.org>
+
+ * gcc_release: Use https for gcc.gnu.org.
+
+2019-11-14 Richard Biener <rguenther@suse.de>
+
+ * update_version_svn (IGNORE_BRANCHES): Add 7.
+
+2019-10-05 Richard Biener <rguenther@suse.de>
+
+ * crontab: Disable snapshots from gcc-7-branch.
+
+2019-08-05 David Malcolm <dmalcolm@redhat.com>
+
+ * update_web_docs_svn: Proceed even if the invocation of
+ sphinx fails.
+
+2019-05-04 Gerald Pfeifer <gerald@pfeifer.com>
+
+ * crontab: Snapshots from trunk are now GCC 10 related.
+ Add GCC 9 snapshots from the respective branch.
+
+2019-02-23 Jonathan Wakely <jwakely@redhat.com>
+
+ * generate_libstdcxx_web_docs: Improve error output.
+
+2018-11-22 Martin Liska <mliska@suse.cz>
+
+ * bugzilla-close-candidate.py: New file.
+
+2018-10-26 Jakub Jelinek <jakub@redhat.com>
+
+ * update_version_svn (IGNORE_BRANCHES): Add gcc-6-branch.
+ * crontab: Remove gcc-6-branch entry.
+
+ * gcc_release (error, inform): Use $@ instead of $1.
+ (build_sources): Check for ^[[:blank:]]*GCC in both index.html
+ and changes.html, rather than for GCC in one and ^GCC in another one.
+
2018-05-03 Jakub Jelinek <jakub@redhat.com>
PR other/85622
diff --git a/maintainer-scripts/bugzilla-close-candidate.py b/maintainer-scripts/bugzilla-close-candidate.py
new file mode 100755
index 00000000000..26ee84474a0
--- /dev/null
+++ b/maintainer-scripts/bugzilla-close-candidate.py
@@ -0,0 +1,96 @@
+#!/usr/bin/env python3
+
+# The script is used for finding PRs that have a SVN revision that
+# mentiones the PR and are not closed. It's done by iterating all
+# comments of a PR and finding SVN commit entries.
+
+"""
+Sample output of the script:
+Bugzilla URL page size: 50
+HINT: bugs with following comment are ignored: Can the bug be marked as resolved?
+
+Bug URL SVN commits known-to-fail known-to-work Bug summary
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88129 trunk Two blockage insns are emited in the function epilogue
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88122 trunk [9 Regression] g++ ICE: internal compiler error: Segmentation fault
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88084 trunk basic_string_view::copy doesn't use Traits::copy
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88083 trunk ICE in find_constant_pool_ref_1, at config/s390/s390.c:8231
+...
+Bugzilla lists:
+https://gcc.gnu.org/bugzilla/buglist.cgi?bug_id=88129,88122,88084,88083,88074,88073,88071,88070,88051,88018,87985,87955,87926,87917,87913,87898,87895,87874,87871,87855,87853,87826,87824,87819,87818,87799,87793,87789,87788,87787,87754,87725,87674,87665,87649,87647,87645,87625,87611,87610,87598,87593,87582,87566,87556,87547,87544,87541,87537,87528
+https://gcc.gnu.org/bugzilla/buglist.cgi?bug_id=87486
+"""
+
+import argparse
+import json
+
+import requests
+
+base_url = 'https://gcc.gnu.org/bugzilla/rest.cgi/'
+statuses = ['UNCONFIRMED', 'ASSIGNED', 'SUSPENDED', 'NEW', 'WAITING', 'REOPENED']
+regex = '(.*\[)([0-9\./]*)( [rR]egression])(.*)'
+closure_question = 'Can the bug be marked as resolved?'
+start_page = 20
+url_page_size = 50
+
+def get_branches_by_comments(comments):
+ versions = set()
+ for c in comments:
+ text = c['text']
+ if 'URL: https://gcc.gnu.org/viewcvs' in text:
+ version = 'trunk'
+ for l in text.split('\n'):
+ if 'branches/gcc-' in l:
+ parts = l.strip().split('/')
+ parts = parts[1].split('-')
+ assert len(parts) == 3
+ versions.add(parts[1])
+ versions.add(version)
+ return versions
+
+def get_bugs(api_key, query):
+ u = base_url + 'bug'
+ r = requests.get(u, params = query)
+ return r.json()['bugs']
+
+def search(api_key):
+ chunk = 1000
+ ids = []
+ print('%-53s%-30s%-40s%-40s%-60s' % ('Bug URL', 'SVN commits', 'known-to-fail', 'known-to-work', 'Bug summary'))
+ for i in range(start_page, 0, -1):
+ # print('offset: %d' % (i * chunk), flush = True)
+ bugs = get_bugs(api_key, {'api_key': api_key, 'bug_status': statuses, 'limit': chunk, 'offset': i * chunk})
+ for b in sorted(bugs, key = lambda x: x['id'], reverse = True):
+ id = b['id']
+
+ fail = b['cf_known_to_fail']
+ work = b['cf_known_to_work']
+
+ u = base_url + 'bug/' + str(id) + '/comment'
+ r = requests.get(u, params = {'api_key': api_key} ).json()
+ keys = list(r['bugs'].keys())
+ assert len(keys) == 1
+ comments = r['bugs'][keys[0]]['comments']
+ for c in comments:
+ if closure_question in c['text']:
+ continue
+
+ branches = get_branches_by_comments(comments)
+ if len(branches):
+ branches_str = ','.join(sorted(list(branches)))
+ print('%-53s%-30s%-40s%-40s%-60s' % ('https://gcc.gnu.org/bugzilla/show_bug.cgi?id=%d' % id, branches_str, fail, work, b['summary']))
+ ids.append(id)
+
+ # print all URL lists
+ print('\nBugzilla lists:')
+ while len(ids) > 0:
+ print('https://gcc.gnu.org/bugzilla/buglist.cgi?bug_id=%s' % ','.join([str(x) for x in ids[:url_page_size]]))
+ ids = ids[url_page_size:]
+
+print('Bugzilla URL page size: %d' % url_page_size)
+print('HINT: bugs with following comment are ignored: %s\n' % closure_question)
+
+parser = argparse.ArgumentParser(description='')
+parser.add_argument('api_key', help = 'API key')
+
+args = parser.parse_args()
+search(args.api_key)
diff --git a/maintainer-scripts/crontab b/maintainer-scripts/crontab
index 67c18b8a000..80a4a4845d5 100644
--- a/maintainer-scripts/crontab
+++ b/maintainer-scripts/crontab
@@ -1,7 +1,6 @@
16 0 * * * sh /home/gccadmin/scripts/update_version_svn
50 0 * * * sh /home/gccadmin/scripts/update_web_docs_svn
55 0 * * * sh /home/gccadmin/scripts/update_web_docs_libstdcxx_svn
-32 22 * * 3 sh /home/gccadmin/scripts/gcc_release -s 6:branches/gcc-6-branch -l -d /sourceware/snapshot-tmp/gcc all
-32 22 * * 4 sh /home/gccadmin/scripts/gcc_release -s 7:branches/gcc-7-branch -l -d /sourceware/snapshot-tmp/gcc all
32 22 * * 5 sh /home/gccadmin/scripts/gcc_release -s 8:branches/gcc-8-branch -l -d /sourceware/snapshot-tmp/gcc all
-32 22 * * 7 sh /home/gccadmin/scripts/gcc_release -s 9:trunk -l -d /sourceware/snapshot-tmp/gcc all
+32 22 * * 6 sh /home/gccadmin/scripts/gcc_release -s 9:branches/gcc-9-branch -l -d /sourceware/snapshot-tmp/gcc all
+32 22 * * 7 sh /home/gccadmin/scripts/gcc_release -s 10:trunk -l -d /sourceware/snapshot-tmp/gcc all
diff --git a/maintainer-scripts/gcc_release b/maintainer-scripts/gcc_release
index 440b0ba51ff..10da704f95f 100755
--- a/maintainer-scripts/gcc_release
+++ b/maintainer-scripts/gcc_release
@@ -45,18 +45,18 @@
# Functions
########################################################################
-# Issue the error message given by $1 and exit with a non-zero
+# Issue the error message given by $@ and exit with a non-zero
# exit code.
error() {
- echo "gcc_release: error: $1"
+ echo "gcc_release: error: $@"
exit 1
}
-# Issue the informational message given by $1.
+# Issue the informational message given by $@.
inform() {
- echo "gcc_release: $1"
+ echo "gcc_release: $@"
}
# Issue a usage message explaining how to use this script.
@@ -128,12 +128,12 @@ build_sources() {
previndex="http:\/\/gcc.gnu.org\/gcc-`expr ${RELEASE_MAJOR} - 1`\/index.html"
sed -n -e "/^${thisindex}/,/^${thischanges}/p" NEWS |\
sed -n -e "/Release History/,/References and Acknowledgments/p" |\
- grep -q "GCC ${RELEASE_MAJOR}.${RELEASE_MINOR}" ||\
+ grep -q "^[[:blank:]]*GCC ${RELEASE_MAJOR}.${RELEASE_MINOR}" ||\
error "GCC ${RELEASE_MAJOR}.${RELEASE_MINOR} not mentioned "\
"in gcc-${RELEASE_MAJOR}/index.html"
sed -n -e "/^${thischanges}/,/^${previndex}/p" NEWS |\
- grep -q "^GCC ${RELEASE_MAJOR}.${RELEASE_MINOR}" ||\
+ grep -q "^[[:blank:]]*GCC ${RELEASE_MAJOR}.${RELEASE_MINOR}" ||\
error "GCC ${RELEASE_MAJOR}.${RELEASE_MINOR} not mentioned "\
"in gcc-${RELEASE_MAJOR}/changes.html"
@@ -430,7 +430,7 @@ announce_snapshot() {
changedir "${SNAPSHOTS_DIR}"
echo \
"Snapshot gcc-"${RELEASE}" is now available on
- ftp://gcc.gnu.org/pub/gcc/snapshots/"${RELEASE}"/
+ https://gcc.gnu.org/pub/gcc/snapshots/"${RELEASE}"/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.
This snapshot has been generated from the GCC "${BRANCH}" SVN branch
diff --git a/maintainer-scripts/generate_libstdcxx_web_docs b/maintainer-scripts/generate_libstdcxx_web_docs
index 00ebcbf7f67..74886356bc7 100755
--- a/maintainer-scripts/generate_libstdcxx_web_docs
+++ b/maintainer-scripts/generate_libstdcxx_web_docs
@@ -3,16 +3,28 @@
# i.e. http://gcc.gnu.org/onlinedocs/gcc-x.y.z/libstdc++*
SRCDIR=${1}
-DOCSDIR=$(realpath ${2})
+DOCSDIR=${2}
if ! [ $# -eq 2 -a -x "${SRCDIR}/configure" -a -d "${DOCSDIR}" ]
then
+ if ! [ $# -eq 2 ]
+ then
+ echo "$0: Wrong number of arguments" >&2
+ elif ! [ -x "${SRCDIR}/configure" ]
+ then
+ echo "$0: No executable configure script found in $SRCDIR" >&2
+ elif ! [ -d "${DOCSDIR}" ]
+ then
+ echo "$0: Output directory does not exist: $DOCSDIR" >&2
+ fi
echo "Usage: $0 <gcc src dir> <doc output dir>" >&2
exit 1
fi
set -e
+DOCSDIR=$(realpath ${DOCSDIR})
+
# Check we have some of the required tools
for i in doxygen dot dblatex pdflatex makeindex
do
diff --git a/maintainer-scripts/update_version_svn b/maintainer-scripts/update_version_svn
index e83757ca1f8..dfbaee6e44a 100755
--- a/maintainer-scripts/update_version_svn
+++ b/maintainer-scripts/update_version_svn
@@ -6,7 +6,7 @@
# in the space separated list in $ADD_BRANCHES.
SVNROOT=${SVNROOT:-"file:///svn/gcc"}
-IGNORE_BRANCHES='gcc-(2_95|3_0|3_1|3_2|3_3|3_4|4_0|4_1|4_2|4_3|4_4|4_5|4_6|4_7|4_8|4_9|5)-branch'
+IGNORE_BRANCHES='gcc-(2_95|3_0|3_1|3_2|3_3|3_4|4_0|4_1|4_2|4_3|4_4|4_5|4_6|4_7|4_8|4_9|5|6|7)-branch'
ADD_BRANCHES='HEAD'
# Run this from /tmp.
diff --git a/maintainer-scripts/update_web_docs_svn b/maintainer-scripts/update_web_docs_svn
index 4f262fd01e5..16abfee3278 100755
--- a/maintainer-scripts/update_web_docs_svn
+++ b/maintainer-scripts/update_web_docs_svn
@@ -190,7 +190,7 @@ done
# /usr/bin/sphinx-1.0-build
# so we need to override SPHINXBUILD with this when invoking "make".
pushd gcc/gcc/jit/docs
-make SPHINXBUILD=/usr/bin/sphinx-1.0-build html
+make SPHINXBUILD=/usr/bin/sphinx-1.0-build html || true
popd
cp -a gcc/gcc/jit/docs/_build/html jit
mkdir -p $DOCSDIR/jit