ports/119783: [PATCH] devel/cscope: cleanup of temp directories upon exit
Sean C. Farley
scf at FreeBSD.org
Fri Jan 18 22:20:01 UTC 2008
>Number: 119783
>Category: ports
>Synopsis: [PATCH] devel/cscope: cleanup of temp directories upon exit
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Jan 18 22:20:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Sean C. Farley
>Release: FreeBSD 7.0-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD thor.farley.org 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #0: Tue Jan 15 17:39:50 CST 2008
>Description:
As noted in the following bug report, vim sends a SIGTERM to cscope upon
exit. This results in a lot of empty cscope.<PID> directories in /tmp.
This is that fix that adds the signal handler.
http://sourceforge.net/tracker/?func=detail&atid=104664&aid=1827519&group_id=4664
Cleaned up portlint warnings while I was here including consolidating the
pkg-list into the Makefile.
Removed file(s):
- pkg-plist
Port maintainer (conrads at cox.net) is cc'd.
Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:
--- cscope-15.6.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/devel/cscope.orig/Makefile /usr/ports/devel/cscope/Makefile
--- /usr/ports/devel/cscope.orig/Makefile 2006-11-01 05:23:29.000000000 -0600
+++ /usr/ports/devel/cscope/Makefile 2008-01-18 16:04:03.000000000 -0600
@@ -8,7 +8,6 @@
PORTNAME= cscope
PORTVERSION= 15.6
-PORTREVISION= 0
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -19,6 +18,8 @@
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-yacc
+PLIST_FILES= bin/cscope \
+ bin/ocs
MAN1= cscope.1
.include <bsd.port.mk>
diff -ruN --exclude=CVS /usr/ports/devel/cscope.orig/files/patch-main.c /usr/ports/devel/cscope/files/patch-main.c
--- /usr/ports/devel/cscope.orig/files/patch-main.c 2006-10-05 17:23:33.000000000 -0500
+++ /usr/ports/devel/cscope/files/patch-main.c 2008-01-18 15:03:36.000000000 -0600
@@ -1,6 +1,6 @@
---- src/main.c.orig Sat Sep 30 01:13:00 2006
-+++ src/main.c Thu Oct 5 15:21:30 2006
-@@ -359,7 +359,7 @@ cscope: TMPDIR to a valid directory\n");
+--- src/main.c.orig 2006-09-30 03:13:00.000000000 -0500
++++ src/main.c 2008-01-18 15:01:59.000000000 -0600
+@@ -359,7 +359,7 @@
/* create the temporary file names */
orig_umask = umask(S_IRWXG|S_IRWXO);
pid = getpid();
@@ -9,7 +9,7 @@
if(mkdir(tempdirpv,S_IRWXU)) {
fprintf(stderr, "\
cscope: Could not create private temp dir %s\n",
-@@ -368,8 +368,13 @@ cscope: Could not create private temp di
+@@ -368,8 +368,13 @@
}
umask(orig_umask);
@@ -25,3 +25,11 @@
/* if running in the foreground */
if (signal(SIGINT, SIG_IGN) != SIG_IGN) {
+@@ -379,6 +384,7 @@
+ }
+ /* cleanup on the hangup signal */
+ signal(SIGHUP, myexit);
++ signal(SIGTERM, myexit);
+
+ /* if the database path is relative and it can't be created */
+ if (reffile[0] != '/' && access(".", WRITE) != 0) {
diff -ruN --exclude=CVS /usr/ports/devel/cscope.orig/pkg-plist /usr/ports/devel/cscope/pkg-plist
--- /usr/ports/devel/cscope.orig/pkg-plist 2001-07-07 00:09:55.000000000 -0500
+++ /usr/ports/devel/cscope/pkg-plist 1969-12-31 18:00:00.000000000 -0600
@@ -1,2 +0,0 @@
-bin/cscope
-bin/ocs
--- cscope-15.6.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list