2 # Copyright The GNU Toolchain Authors.
3 # This file is part of the GNU C Library.
5 # The GNU C Library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
10 # The GNU C Library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with the GNU C Library; if not, see
17 # <https://www.gnu.org/licenses/>.
19 if ! [ -d advisories
]; then
20 echo "error: Run me from the toplevel directory of the glibc repository."
28 usage: $0 {update|news}
44 rel
=$
(git describe
$1 |
sed 's/glibc-\([^g]\+\)-g.*/\1/')
45 # If the latest tag for the commit is the development tag, then increment
46 # the release version.
47 if echo $rel |
grep -q "\.9000"; then
48 rel
=$
(echo $rel |
sed 's/2\.\([0-9]\+\)\.9000.*/\1/')
58 echo "Usage: $0 update GLIBC-SA-YYYY-NNNN"
62 advisory_file
=advisories
/$advisory
64 grep --color=none Commit
$advisory_file |
awk '{printf "%s %s\n", $1, $2}' |
67 echo "*** Updating: $t $r ($rel)"
68 sed -i "s/^$t $r.*/$t $r ($rel)/" $advisory_file
74 for f
in $
(grep -l "^Fix-Commit: .* ($rel)$" advisories
/*); do
75 echo -e " $(basename $f):"
76 cve_id
=$
(sed -n 's/CVE-Id: \(.*\)/\1/p' $f)
77 echo "$(head -1 $f) ($cve_id)" |
fold -w 68 -s |
85 advisories_
$command $2