pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Update wip/send-pr to 4.2, since the 4.1 distfile is gone.
Module Name: pkgsrc-wip
Committed By: Hauke Fath <hauke%NetBSD.org@localhost>
Pushed By: hauke
Date: Wed Jul 11 13:22:14 2018 +0200
Changeset: 716743dfc3cecf433c08713bb7cbdf605f6d1d87
Modified Files:
send-pr/Makefile
send-pr/PLIST
send-pr/TODO
send-pr/distinfo
send-pr/files/send-pr.NetBSD.conf
Added Files:
send-pr/files/netbsd-template
send-pr/patches/patch-configure
send-pr/patches/patch-gnats_send-pr.sh
Log Message:
Update wip/send-pr to 4.2, since the 4.1 distfile is gone.
Set send-pr up for mailing to gnats.netbsd.org as a default.
Re-structure build and install to only do what we need.
Fix minor issues, and use pkgsrc magic where available.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=716743dfc3cecf433c08713bb7cbdf605f6d1d87
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
send-pr/Makefile | 70 ++++++++++++++++++++++------------
send-pr/PLIST | 3 +-
send-pr/TODO | 3 --
send-pr/distinfo | 9 +++--
send-pr/files/netbsd-template | 68 +++++++++++++++++++++++++++++++++
send-pr/files/send-pr.NetBSD.conf | 26 ++++---------
send-pr/patches/patch-configure | 15 ++++++++
send-pr/patches/patch-gnats_send-pr.sh | 44 +++++++++++++++++++++
8 files changed, 189 insertions(+), 49 deletions(-)
diffs:
diff --git a/send-pr/Makefile b/send-pr/Makefile
index d92abd9554..c9edab79d2 100644
--- a/send-pr/Makefile
+++ b/send-pr/Makefile
@@ -1,53 +1,75 @@
-# $NetBSD: Makefile,v 1.18 2012/10/07 16:22:55 asau Exp $
+# $NetBSD$
# this should use a Makefile.common to share the DISTNAME
-DISTNAME= gnats-4.1.0
+DISTNAME= gnats-4.2.0
PKGNAME= send-pr-${GNATS_VERSION}
CATEGORIES= misc
-MASTER_SITES= ${MASTER_SITE_GNU=gnats/}
+MASTER_SITES= ${MASTER_SITE_GNU:=gnats/}
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= http://www.gnu.org/software/gnats/
-COMMENT= GNATS problem reporting tool
+COMMENT= Problem reporting tool for GNATS bug-tracker
LICENSE= gnu-gpl-v2
-WRKSRC= ${WRKDIR}/gnats-${GNATS_VERSION}/send-pr
+WRKSRC= ${WRKDIR}/gnats-${GNATS_VERSION}
GNATS_VERSION= ${DISTNAME:S/gnats-//}
-CONFLICTS+= gnats-[0-9]* arla-[0-9]*
+CONFLICTS+= gnats-[0-9]* arla-[0-9]*
+USE_TOOLS+= gmake
GNU_CONFIGURE= YES
CONFIGURE_ENV+= GNATS_ROOT=${PKG_SYSCONFDIR}
-# this stops the configuration program from pulling installation
-# information in from the standard NetBSD send-pr program
+# Stop the configuration program from pulling installation information
+# in from the standard NetBSD send-pr program
CONFIGURE_ENV+= SEND_PR=/dev/null
BUILD_MAKE_FLAGS+= MAKEINFO=makeinfo\ --no-split
-INSTALL_MAKE_FLAGS+= INSTALL_SCRIPT=${INSTALL_SCRIPT:Q} \
- sysconfdir=${EGBASE}
-AUTO_MKDIRS= yes
+PKG_SYSCONFSUBDIR= gnats
-EGBASE= ${PREFIX}/share/examples
-EGDIR= ${EGBASE}/gnats
-CONF_FILES= ${EGDIR}/send-pr.NetBSD.conf \
- ${PKG_SYSCONFDIR}/gnats/send-pr.conf
+EGDIR= share/examples/gnats
MAKE_DIRS+= ${PKG_SYSCONFDIR}/gnats
-# ${PKG_SYSCONFDIR}/gnats/gnats-adm
+CONF_FILES= ${PREFIX}/${EGDIR}/send-pr.NetBSD.conf \
+ ${PKG_SYSCONFDIR}/send-pr.conf
+CONF_FILES+= ${PREFIX}/${EGDIR}/netbsd-template \
+ ${PKG_SYSCONFDIR}/netbsd-template
SUBST_CLASSES+= fix-paths
SUBST_STAGE.fix-paths= post-patch
SUBST_MESSAGE.fix-paths= Fixing paths
-SUBST_FILES.fix-paths= send-pr.sh
-SUBST_SED.fix-paths= -e 's,install-sid,${PREFIX}/bin/install-sid,'
-SUBST_SED.fix-paths+= -e 's,send-pr --request-id,${PREFIX}/bin/send-pr --request-id,'
-
-post-install:
- ${INSTALL_DATA} ${WRKSRC}/INSTALL ${DESTDIR}${PREFIX}/share/gnats/dist/INSTALL.send-pr
- ${INSTALL_DATA} ${FILESDIR}/netbsd-categories ${DESTDIR}${PREFIX}/share/gnats/netbsd
- ${INSTALL_DATA} ${FILESDIR}/send-pr.NetBSD.conf ${DESTDIR}${EGDIR}
+SUBST_FILES.fix-paths+= send-pr.NetBSD.conf
+SUBST_SED.fix-paths+= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
+
+INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man8
+INSTALLATION_DIRS+= share/gnats/dist ${EGDIR}
+
+post-extract:
+.for f in send-pr.NetBSD.conf netbsd-template
+ cp ${FILESDIR}/${f} ${WRKSRC}
+.endfor
+
+do-build:
+ cd ${WRKSRC}/doc/man && env ${MAKE_ENV} ${MAKE_PROGRAM} ${BUILD_MAKE_FLAGS}
+ cd ${WRKSRC}/gnats && env ${MAKE_ENV} ${MAKE_PROGRAM} \
+ ${BUILD_MAKE_FLAGS} install-sid send-pr
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/gnats/install-sid \
+ ${DESTDIR}${PREFIX}/bin/install-sid
+ ${INSTALL_SCRIPT} ${WRKSRC}/gnats/send-pr ${DESTDIR}${PREFIX}/bin/send-pr
+ ${INSTALL_MAN} ${WRKSRC}/doc/man/send-pr.man \
+ ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/send-pr.1
+ ${INSTALL_MAN} ${WRKSRC}/doc/man/install-sid.man \
+ ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/install-sid.8
+ ${INSTALL_DATA} ${WRKSRC}/INSTALL \
+ ${DESTDIR}${PREFIX}/share/gnats/dist/INSTALL.send-pr
+ ${INSTALL_DATA} ${FILESDIR}/netbsd-categories \
+ ${DESTDIR}${PREFIX}/share/gnats/netbsd
+ ${INSTALL_DATA} ${WRKSRC}/netbsd-template ${DESTDIR}${PREFIX}/${EGDIR}
+ ${INSTALL_DATA} ${WRKSRC}/gnats/send-pr.conf ${DESTDIR}${PREFIX}/${EGDIR}
+ ${INSTALL_DATA} ${WRKSRC}/send-pr.NetBSD.conf ${DESTDIR}${PREFIX}/${EGDIR}
.include "../../mk/bsd.pkg.mk"
diff --git a/send-pr/PLIST b/send-pr/PLIST
index 39c6095702..e49a63e2ba 100644
--- a/send-pr/PLIST
+++ b/send-pr/PLIST
@@ -1,8 +1,9 @@
-@comment $NetBSD: PLIST,v 1.6 2011/05/29 13:55:06 cheusov Exp $
+@comment $NetBSD$
bin/install-sid
bin/send-pr
man/man1/send-pr.1
man/man8/install-sid.8
+share/examples/gnats/netbsd-template
share/examples/gnats/send-pr.NetBSD.conf
share/examples/gnats/send-pr.conf
share/gnats/dist/INSTALL.send-pr
diff --git a/send-pr/TODO b/send-pr/TODO
index 6a10cb50e0..036157db97 100644
--- a/send-pr/TODO
+++ b/send-pr/TODO
@@ -1,5 +1,2 @@
-- configure send-pr to send PRs to gnats.NetBSD.org by default
- (TEMPLATE variable in config file?)
-
- maybe remove send-pr from database/gnats and depend on this instead
(and get rid of any CONFLICTs)
diff --git a/send-pr/distinfo b/send-pr/distinfo
index 8b2bb87e6f..cf3ae51d67 100644
--- a/send-pr/distinfo
+++ b/send-pr/distinfo
@@ -1,5 +1,8 @@
$NetBSD: distinfo,v 1.11 2011/05/29 13:55:06 cheusov Exp $
-SHA1 (gnats-4.1.0.tar.gz) = 7f8ce7fbb7594698c5ba71421cad3cbc7e079003
-RMD160 (gnats-4.1.0.tar.gz) = b16bfa3ffa4f1c7dc351d1c5639061c358c64afd
-Size (gnats-4.1.0.tar.gz) = 1221364 bytes
+SHA1 (gnats-4.2.0.tar.gz) = 1f277bba896ee0941f3cd8b16788efd8f0f273cc
+RMD160 (gnats-4.2.0.tar.gz) = 4dc473a242f8047bbe547f7b38a820e48a74bf90
+SHA512 (gnats-4.2.0.tar.gz) = 650faa87206889912e27a27daba4c86292fac90250a88e7e6272cc8488fc19dfd6098bdd450553cd6c2c1d446072a8da9395f1ce7b1cd284596994ce53744152
+Size (gnats-4.2.0.tar.gz) = 1264845 bytes
+SHA1 (patch-configure) = 1271b9c4d71e9978da31afbca556d103ca1fdfa1
+SHA1 (patch-gnats_send-pr.sh) = 6dd5cc839f8793bde0bf63060f05842220501846
diff --git a/send-pr/files/netbsd-template b/send-pr/files/netbsd-template
new file mode 100644
index 0000000000..36823c9994
--- /dev/null
+++ b/send-pr/files/netbsd-template
@@ -0,0 +1,68 @@
+SEND-PR: -*- send-pr -*-
+SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as
+SEND-PR: will all comments (text enclosed in `<' and `>').
+SEND-PR:
+SEND-PR: Please consult the send-pr man page `send-pr(1)' or the Texinfo
+SEND-PR: manual if you are not sure how to fill out a problem report.
+SEND-PR:
+SEND-PR: NOTE: If you include a patch that corrects the problem, the
+SEND-PR: issue will probably be handled much more quickly.
+SEND-PR:
+SEND-PR: Choose from the following categories:
+SEND-PR:
+SEND-PR: bin install kern
+SEND-PR: lib misc pkg
+SEND-PR: port-acorn26 port-acorn32 port-algor
+SEND-PR: port-alpha port-amd64 port-amiga
+SEND-PR: port-amigappc port-arc port-arm
+SEND-PR: port-atari port-bebox port-cats
+SEND-PR: port-cesfic port-cobalt port-dreamcast
+SEND-PR: port-emips port-evbarm port-evbmips
+SEND-PR: port-evbppc port-evbsh3 port-hp300
+SEND-PR: port-hpcarm port-hpcmips port-hpcsh
+SEND-PR: port-hppa port-i386 port-ia64
+SEND-PR: port-ibmnws port-iyonix port-luna68k
+SEND-PR: port-m68k port-mac68k port-macppc
+SEND-PR: port-mips port-mipsco port-mmeye
+SEND-PR: port-mvme68k port-mvmeppc port-netwinder
+SEND-PR: port-news68k port-newsmips port-next68k
+SEND-PR: port-ofppc port-playstation2 port-pmax
+SEND-PR: port-powerpc port-prep port-sandpoint
+SEND-PR: port-sbmips port-sgimips port-sh3
+SEND-PR: port-shark port-sparc port-sparc64
+SEND-PR: port-sun2 port-sun3 port-vax
+SEND-PR: port-x68k port-xen port-zaurus
+SEND-PR: security standards toolchain
+SEND-PR: xsrc y2k
+SEND-PR:
+To: <MAILADDR>
+Subject:
+From: <FROM>
+Reply-To: <REPLYTO>
+X-send-pr-version: <VERSION>
+
+
+>Submitter-Id: <SUBMITTER>
+>Originator: <DEFAULT_ORIGINATOR>
+>Organization: <DEFAULT_ORGANIZATION>
+>Confidential: <[ no | yes ] (one line)>
+>Synopsis: <synopsis of the problem (one line)>
+>Severity: <[ non-critical | serious | critical ] (one line)>
+>Priority: <[ low | medium | high ] (one line)>
+>Category: <problem report category - see top for list (one line)>
+>Class: <[ sw-bug | doc-bug | change-request | support ] (one line)>
+>Release: <DEFAULT_RELEASE>
+ <Please check that the above is correct for the bug being reported,>
+ <and append source date of snapshot, if applicable (one line).>
+>Environment:
+ <The following information is extracted from your kernel. Please>
+ <append output of "ldd", "ident" where relevant (multiple lines).>
+System: <SYSTEM>
+Architecture: <ARCH>
+Machine: <MACHINE>
+>Description:
+ <precise description of the problem (multiple lines)>
+>How-To-Repeat:
+ <code/input/activities to reproduce the problem (multiple lines)>
+>Fix:
+ <how to correct or work around the problem, if known (multiple lines)>
diff --git a/send-pr/files/send-pr.NetBSD.conf b/send-pr/files/send-pr.NetBSD.conf
index de00cc19e0..50b7b0cef6 100644
--- a/send-pr/files/send-pr.NetBSD.conf
+++ b/send-pr/files/send-pr.NetBSD.conf
@@ -36,27 +36,17 @@ SUBMITTER=net
# By default send-pr connects directly to the database. However, it can be
# configured to use an existing template file by setting the TEMPLATE variable
# below to point to a PR template generated from "send-pr -P".
-#TEMPLATE=""
+TEMPLATE="@PKG_SYSCONFDIR@/netbsd-template"
-# send-pr can use mail to submit PRs, instead of connecting to the database
-# directly. MAILPROG needs to point to a compatible mailer (sendmail will
-# work). If MAILPROG needs to have the address that the mail is being sent to
-# specified on the command line, it should be specified here as well (for
-# example, the command MAILPROG="mail bugs%foo.bar.com@localhost" should work). If
-# sendmail is used, this should be set to MAILPROG="/usr/lib/sendmail -oi -t"
-#MAILPROG=""
+# The default release for this host.
+DEFAULT_RELEASE="`uname -s` `uname -r`"
+
+# send-pr can use mail to submit PRs, instead of connecting to the
+# database directly. MAILPROG needs to point to a compatible mailer.
+# If sendmail is used, this should be set to
+MAILPROG="/usr/sbin/sendmail -oi -t"
# The address that PRs are sent to. Normally this can be left as "bugs";
# however, if using mail to submit PRs, this should be set to the address where
# PRs should be sent.
MAILADDR=gnats-bugs%gnats.netbsd.org@localhost
-
-
-# The mail address for PR submissions.
-# GNATS_ADDR=gnats-bugs%gnats.netbsd.org@localhost
-# The release for this host.
-# DEFAULT_RELEASE="`uname -s` `uname -r`"
-# The site to look for.
-# GNATS_SITE=netbsd
-# The submitter-id for your site.
-# SUBMITTER=net
diff --git a/send-pr/patches/patch-configure b/send-pr/patches/patch-configure
new file mode 100644
index 0000000000..9b003ee533
--- /dev/null
+++ b/send-pr/patches/patch-configure
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Bash bashisms!
+
+--- configure.orig 2015-02-27 02:10:23.000000000 +0000
++++ configure
+@@ -6349,7 +6349,7 @@ fi
+ if test "$LEX" = :; then
+ LEX=${am_missing_run}flex
+ fi
+-if test "x$LEX" == "flex" ; then
++if test "x$LEX" = "flex" ; then
+ # Lex options - use -X
+ FLEX_LFLAGS="-X"
+ FLEX_CFLAGS="-D_POSIX_SOURCE=1"
diff --git a/send-pr/patches/patch-gnats_send-pr.sh b/send-pr/patches/patch-gnats_send-pr.sh
new file mode 100644
index 0000000000..0ece6694f4
--- /dev/null
+++ b/send-pr/patches/patch-gnats_send-pr.sh
@@ -0,0 +1,44 @@
+$NetBSD$
+
+'sysconfdir' is a macro to be replaced during build, not a shell variable
+
+Use build mechanism to provide full path to install-sid (in case base
+has one, too)
+
+Add placeholders to be substituted in mail template
+
+--- gnats/send-pr.sh.orig 2015-02-26 04:26:41.000000000 +0000
++++ gnats/send-pr.sh
+@@ -76,7 +76,7 @@ MAILADDR="bugs"
+ # Configuration file to be read. It must be a shell script that can redefine
+ # the variables above to fit a local configuration. It reads the system config
+ # file first, then the personal config file.
+-CONFIGFILES="${sysconfdir}/gnats/send-pr.conf ${HOME}/.send-pr.conf"
++CONFIGFILES="@sysconfdir@/gnats/send-pr.conf ${HOME}/.send-pr.conf"
+ for CONFIGFILE in ${CONFIGFILES}; do
+ if [ -r ${CONFIGFILE} ]; then
+ . ${CONFIGFILE}
+@@ -276,12 +276,12 @@ if [ "x$SUBMITTER" = "xunknown" -a -z "$
+ It seems that send-pr is not installed with your unique submitter-id,
+ or that "unknown" has been specified. You need to run:
+
+- install-sid YOUR-SID
++ @bindir@/install-sid YOUR-SID
+
+ where YOUR-SID is the identification code you received with `send-pr'.
+ `send-pr' will automatically insert this value into the template field
+ `>Submitter-Id'. If you've downloaded `send-pr' from the Net, use `net'
+-for this value. If you do not know your id, run `send-pr --request-id'
++for this value. If you do not know your id, run `@bindir@/send-pr --request-id'
+ to get one from your support site.
+ __EOF__
+ exit 1
+@@ -322,7 +322,7 @@ else
+ fi
+
+ if [ -n "$TEMPLATE" -a -z "$PRINT_INTERN" ]; then
+- sed "s/<FROM>/$FROM/;s/<REPLYTO>/$REPLYTO/;s/<DEFAULT_ORIGINATOR>/$DEFAULT_ORIGINATOR/;s/<SUBMITTER>/$DEFAULT_SUBMITTERID/" < $TEMPLATE > $TEMP ||
++ sed "s/<MAILADDR>/$MAILADDR/;s/<FROM>/$FROM/;s/<REPLYTO>/$REPLYTO/;s/<VERSION>/$VERSION/;s/<DEFAULT_ORIGINATOR>/$DEFAULT_ORIGINATOR/;s/<SUBMITTER>/$DEFAULT_SUBMITTERID/;s/<DEFAULT_ORGANIZATION>/$DEFAULT_ORGANIZATION/;s/<DEFAULT_RELEASE>/$DEFAULT_RELEASE/;s/<SYSTEM>/$SYSTEM/;s/<ARCH>/$ARCH/;s/<MACHINE>/$MACHINE/" < $TEMPLATE > $TEMP ||
+ { echo >&2 "$COMMAND: could not copy $TEMPLATE" ; xs=1; exit; }
+ if [ -z "${SENDPR_CLEANUP+set}" ]; then
+ # build a cleanup sed script to schedule the removal of comments
Home |
Main Index |
Thread Index |
Old Index