summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorSteve Price <steve@FreeBSD.org>2000-05-29 04:05:09 +0000
committerSteve Price <steve@FreeBSD.org>2000-05-29 04:05:09 +0000
commita23d18d6d70236f999dbe84bb0d0287ce7b14006 (patch)
tree592b0b6b472cc9f1ab7de46b46602a1d7822e6ee /databases
parentInstall the nc binary as nclient so as not to conflict with the (diff)
Put the freefall-specific patches behind a WANT_FREEFALL_CFG knob. Moved
Paul's changes to files/gnats-edit-pr.patch. Added [1] the ability to track class changes with a change message. Also added [2] a URL to the problem report online in the 'thank you' message when a new report is submitted. Submitted by: [1] sheldonh Inspired by: [2] archie@whistle.com
Notes
Notes: svn path=/head/; revision=28897
Diffstat (limited to 'databases')
-rw-r--r--databases/gnats/Makefile4
-rw-r--r--databases/gnats/files/file-pr.c.patch13
-rw-r--r--databases/gnats/files/gnats-edit-pr.patch126
3 files changed, 143 insertions, 0 deletions
diff --git a/databases/gnats/Makefile b/databases/gnats/Makefile
index b1f512b561d9..3a6a0900ed0a 100644
--- a/databases/gnats/Makefile
+++ b/databases/gnats/Makefile
@@ -36,6 +36,10 @@ CONFIGURE_ENV= SEND_PR=/usr/bin/false
# just install gnats
INSTALL_TARGET= install-gnats install-send-pr
+.if defined(WANT_FREEFALL_CFG)
+EXTRA_PATCHES= ${FILESDIR}/gnats-edit-pr.patch ${FILESDIR}/file-pr.c.patch
+.endif
+
post-build:
(cd ${WRKSRC}/gnats; ${MAKE} info)
(cd ${WRKSRC}/send-pr; ${MAKE} info)
diff --git a/databases/gnats/files/file-pr.c.patch b/databases/gnats/files/file-pr.c.patch
new file mode 100644
index 000000000000..a67eb0633845
--- /dev/null
+++ b/databases/gnats/files/file-pr.c.patch
@@ -0,0 +1,13 @@
+--- gnats/file-pr.c.orig Sun May 28 09:06:22 2000
++++ gnats/file-pr.c Sun May 28 09:09:35 2000
+@@ -613,6 +613,10 @@
+ fprintf (msg, "The individual assigned to look at your\nreport is: %s. \n",
+ field_value (RESPONSIBLE));
+
++ fprintf (msg, "\nYou can access the state of your problem report at any time\n"
++ "via this link:\n\nhttp://www.freebsd.org/cgi/query-pr.cgi?pr=%s\n",
++ field_value (NUMBER));
++
+ if (bad_enums != NULL)
+ {
+ /* Report the enums that were bad, separating them by an empty line. */
diff --git a/databases/gnats/files/gnats-edit-pr.patch b/databases/gnats/files/gnats-edit-pr.patch
new file mode 100644
index 000000000000..5a6d4085f028
--- /dev/null
+++ b/databases/gnats/files/gnats-edit-pr.patch
@@ -0,0 +1,126 @@
+--- gnats/gnats-edit-pr.sh.orig Tue Apr 20 16:17:07 1999
++++ gnats/gnats-edit-pr.sh Sun May 28 09:27:12 2000
+@@ -124,15 +124,18 @@
+
+ *)
+ if [ "`echo $1 | grep /`" != "" ]; then
+- pr_id=`echo $1 | awk -F"/" '{print $2}' -`
++ pr=`echo $1 | awk -F"/" '{print $2}' -`
+ else
+- pr_id=$1
++ pr=$1
+ fi
++ prs="$prs $pr"
+ ;;
+ esac
+ shift
+ done
+
++for pr_id in $prs ; do
++
+ # set command here to always pass host and port, and directory if supplied
+ if [ "$mode" = "network" ]; then
+ prog="nedit-pr"
+@@ -192,7 +195,7 @@
+ if cmp -s $new.old $new ; then
+ echo "$prog: PR not changed"
+ $PR_EDIT --unlock $pr_id
+- exit 0
++ continue
+ fi
+
+ # error-check output by calling pr-edit --check; if mistakes exist,
+@@ -229,6 +232,8 @@
+ new_resp="`sed -n '/^>Responsible:/{s,^>[-a-zA-Z]*: *,,;s, *(.*,,g;p;q;}' $new`"
+ old_synopsis="`sed -n '/^>Synopsis:/{s,^>[-a-zA-Z]*: *,,;p;q;}' $new.old`"
+ new_synopsis="`sed -n '/^>Synopsis:/{s,^>[-a-zA-Z]*: *,,;p;q;}' $new`"
++old_class="`sed -n '/^>Class:/{s,^>[-a-zA-Z]*: *,,;p;q;}' $new.old`"
++new_class="`sed -n '/^>Class:/{s,^>[-a-zA-Z]*: *,,;p;q;}' $new`"
+ full_id="`sed -n '/^>Category:/{s,^>[-a-zA-Z]*: *,,;p;q;}' $new`/$pr_id"
+
+ # If you can read this, you may have a future in sed(1) programming.
+@@ -256,8 +261,12 @@
+ if [ "$old_resp" != "$new_resp" ]; then
+ resp_change=yes
+ fi
++if [ "$old_class" != "$new_class" ]; then
++ class_change=yes
++fi
+
+-if [ ! -z "$state_change" ] || [ ! -z "$resp_change" ]; then
++if [ ! -z "$state_change" ] || [ ! -z "$resp_change" ] || \
++ [ ! -z "$class_change" ]; then
+ # we've got a change
+ mail_to="$me"
+ if [ ! -z "$state_change" ]; then
+@@ -266,14 +275,38 @@
+ echo State-Changed-By: $me >> $change_msg
+ echo State-Changed-When: $DATE >> $change_msg
+ echo "State-Changed-Why: " >> $change_msg
+- echo 'Why did the state change? (Ctrl-D to end)'
+- cat >> $change_msg
++ if [ -e /tmp/chng.$$ ]; then
++ echo "Re-use last message (y/n)?"
++ read yesno
++ if [ "$yesno" != "y" ]; then
++ cat /home/gnats/gnats-adm/edit-pr-msg > /tmp/chng.$$
++ fi
++ else
++ cat /home/gnats/gnats-adm/edit-pr-msg > /tmp/chng.$$
++ fi
++ $VISUAL /tmp/chng.$$
++ sed '/^GNATS:/d' /tmp/chng.$$ >> $change_msg
+ to_old=1
+ to_subm=1
++ if [ ! -z "$class_change" ] || [ ! -z "$resp_change" ]; then
++ echo "" >> $change_msg
++ echo "" >> $change_msg
++ fi
+ fi
+- if [ ! -z "$state_change" ] && [ ! -z "$resp_change" ]; then
+- echo "" >> $change_msg
+- echo "" >> $change_msg
++ if [ ! -z "$class_change" ]; then
++ $debug_print "Doing class change."
++ echo Class-Changed-From-To: "$old_class"'->'"$new_class" >> $change_msg
++ echo Class-Changed-By: $me >> $change_msg
++ echo Class-Changed-When: $DATE >> $change_msg
++ echo "Class-Changed-Why: " >> $change_msg
++ echo 'Why did the class change? (Ctrl-D to end)'
++ cat >> $change_msg
++ to_old=1
++ to_new=1
++ if [ ! -z "$resp_change" ]; then
++ echo "" >> $change_msg
++ echo "" >> $change_msg
++ fi
+ fi
+ if [ ! -z "$resp_change" ]; then
+ $debug_print "Doing responsible change."
+@@ -287,6 +320,9 @@
+ to_new=1
+ fi
+
++ echo "" >> $change_msg
++ echo "http://www.freebsd.org/cgi/query-pr.cgi?pr=$pr_id" >> $change_msg
++
+ if [ -n "$to_subm" ]; then mail_to="${reply_to}, ${mail_to}" ; fi
+ if [ -n "$x_gnats_notify" ]; then mail_to="${x_gnats_notify}, ${mail_to}" ; fi
+ if [ -n "$to_old" ] ; then mail_to="${mail_to}, `$PR_ADDR ${old_resp}`" ; fi
+@@ -303,7 +339,7 @@
+ $MAIL_AGENT << __EOF__
+ To: $mail_to
+ From: $me
+-Subject: Re: $full_id
++Subject: Re: $full_id: $new_synopsis
+
+ `if [ "$old_synopsis" != "$new_synopsis" ]; then
+ echo Old Synopsis: "$old_synopsis"
+@@ -321,5 +357,7 @@
+ # call PR_EDIT on the new file and clean up
+ $PR_EDIT < $new
+ $PR_EDIT --unlock $pr_id
++
++done
+
+ exit 0