diff options
author | steve <steve@FreeBSD.org> | 2000-05-29 10:27:45 +0800 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 2000-05-29 10:27:45 +0800 |
commit | 5374dadbe2f9fe4de60279faa6f731be33c1efea (patch) | |
tree | d2b61092080388a76d1356df9de009c6a9ea6c88 /security/tripwire-131 | |
parent | 45f2d56bbe4482bf0ac6ab1cdc6a3ce962bde3c5 (diff) | |
download | freebsd-ports-gnome-5374dadbe2f9fe4de60279faa6f731be33c1efea.tar.gz freebsd-ports-gnome-5374dadbe2f9fe4de60279faa6f731be33c1efea.tar.zst freebsd-ports-gnome-5374dadbe2f9fe4de60279faa6f731be33c1efea.zip |
- Fix some of the compiler warnings (see patches/patch-warnings)
- Fix the Makefiles to obey the CC and CFLAGS settings
- Fix patches/patch-ab to be PREFIX/LOCALBASE safe
- Fix the post-install to not compress the gunzip and tripwire executables
that go onto a floppy -- there is no support for the gzip-ed ELF binaries
at all, and even for the older AOUT ones such support was optional
- Replaces the /kernel with `sysctl -n kern.bootfile` in the tw.conf as the
tw.conf.freebsd2 is copied into the right place.
- Replace the use of mktemp(3) with tmpfile(3) (see patches/patch-mktemp).
This also caused a removal of a few buffers (of size MAXPATHLEN+256) and
quite a few strcpy and sprintf invocations.
PR: 18634
Submitted by: Mikhail Teterin <mi@aldan.algebra.com>
Diffstat (limited to 'security/tripwire-131')
-rw-r--r-- | security/tripwire-131/Makefile | 24 | ||||
-rw-r--r-- | security/tripwire-131/files/patch-ab | 61 | ||||
-rw-r--r-- | security/tripwire-131/pkg-plist | 1 |
3 files changed, 57 insertions, 29 deletions
diff --git a/security/tripwire-131/Makefile b/security/tripwire-131/Makefile index 070bc8b1ceb8..7c2c4ed201c3 100644 --- a/security/tripwire-131/Makefile +++ b/security/tripwire-131/Makefile @@ -20,30 +20,38 @@ NO_PACKAGE= "requires local database to be built" RESTRICTED= "contains crypto class algorithms" post-extract: - @ (cd ${WRKDIR}; tar xf T1.2.tar) + @ (cd ${WRKDIR}; tar xpf T1.2.tar) + +post-patch: + @${PERL} -pi -e 's|/secureplace/bin|${PREFIX}/bin|g;' \ + -e 's|/usr/man|${PREFIX}/man|g;' ${WRKSRC}/Makefile pre-configure: @ ${CP} ${FILESDIR}/conf-freebsd2.h ${WRKSRC}/configs - @ ${CP} ${FILESDIR}/tw.conf.freebsd2 ${WRKSRC}/configs/tw.conf.freebsd2 + @ ${SED} s%/kernel%`sysctl -bn kern.bootfile`% \ + < ${FILESDIR}/tw.conf.freebsd2 \ + > ${WRKSRC}/configs/tw.conf.freebsd2 post-install: @ ${MKDIR} /var/adm/tcheck @ ${CP} ${FILESDIR}/tw.conf.freebsd2 /var/adm/tcheck/tw.config - @ ${ECHO} Creating tripwire database + # Creating tripwire database @ (cd /var/adm/tcheck; tripwire -initialize) .if defined(TRIPWIRE_FLOPPY) && ${TRIPWIRE_FLOPPY} == YES + # preparing the floppy @ disklabel -w -B /dev/rfd0c fd1440 @ newfs -u 0 -t 0 -i 196608 -m 0 -T minimum -o space /dev/rfd0c - @ mount /dev/fd0c /mnt - @ ${GZIP_CMD} < ${PREFIX}/bin/tripwire > /mnt/tripwire + mount /dev/fd0c /mnt + # transferring things to the floppy @ ${CP} -p /var/adm/tcheck/tw.config /mnt/tw.config @ ${GZIP_CMD} < /var/adm/tcheck/databases/tw.db_`hostname` \ > /mnt/tw.db_`hostname`.gz - @ ${CP} -p ${FILESDIR}/twcheck /mnt/twcheck - @ ${GZIP_CMD} < /usr/bin/gunzip > /mnt/gunzip + @ ${CP} -p ${FILESDIR}/twcheck /usr/bin/gunzip \ + ${PREFIX}/bin/tripwire \ + /mnt/ @ ${CHMOD} 555 /mnt/tripwire /mnt/gunzip /mnt/twcheck @ umount /mnt - @ ${ECHO} Do not forget to remove and write-protect the floppy. + # Do not forget to remove and write-protect the floppy. .endif .include <bsd.port.mk> diff --git a/security/tripwire-131/files/patch-ab b/security/tripwire-131/files/patch-ab index b7db1c46c099..7dcf3348984f 100644 --- a/security/tripwire-131/files/patch-ab +++ b/security/tripwire-131/files/patch-ab @@ -1,28 +1,23 @@ -*** Makefile.orig Mon Jul 25 10:59:41 1994 +*** Makefile Mon Jul 25 10:59:41 1994 --- Makefile Thu Jan 2 12:04:35 1997 *************** -*** 12,21 **** - ### - - # destination directory for final executables -! DESTDIR = /secureplace/bin - - # destination for man pages -! MANDIR = /usr/man - - # system utilities - LEX = lex ---- 12,21 ---- - ### - - # destination directory for final executables -! DESTDIR = /usr/local/bin +*** 34,36 **** + # you can use ANSI C if you like, but K&R is equally fine. +! CC = cc # common + #CC = gcc # also common +--- 34,36 ---- + # you can use ANSI C if you like, but K&R is equally fine. +! #CC = cc # common + #CC = gcc # also common +*************** +*** 38,40 **** - # destination for man pages -! MANDIR = /usr/local/man +! CFLAGS = -O # common + #CFLAGS = -g # common +--- 38,40 ---- - # system utilities - LEX = lex +! #CFLAGS = -O # common + #CFLAGS = -g # common *************** *** 60,66 **** #CPP = /lib/cpp # on older systems @@ -41,3 +36,27 @@ #LDFLAGS= -non_shared # OSF/1 #LDFLAGS= -Bstatic # SunOS 4 (cannot statically link tripwire # on Solaris 2.3) + + +--- src/Makefile.orig Mon Jul 25 10:40:54 1994 ++++ src/Makefile Sun May 28 15:52:25 2000 +@@ -3,7 +3,7 @@ + # Tripwire build + # + +-CFLAGS = -O ++#CFLAGS = -O + + OFILES = config.parse.o main.o list.o ignorevec.o dbase.build.o \ + utils.o preen.o preen.interp.o preen.report.o \ +@@ -103,8 +103,9 @@ + .c.o: + $(CC) $(CFLAGS) -c $< + +-install: tripwire ++install: tripwire siggen + $(INSTALL) tripwire $(DESTDIR) ++ $(INSTALL) siggen $(DESTDIR) + + clean: + -rm -f $(OFILES) config.lex.c config.pre.c y.tab.c lex.yy.c help.c \ diff --git a/security/tripwire-131/pkg-plist b/security/tripwire-131/pkg-plist index 8d1eef3d62d7..f34115341fbe 100644 --- a/security/tripwire-131/pkg-plist +++ b/security/tripwire-131/pkg-plist @@ -1 +1,2 @@ +bin/siggen bin/tripwire |