aboutsummaryrefslogtreecommitdiff
path: root/security/tripwire
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2012-01-25 21:15:30 +0000
committerCy Schubert <cy@FreeBSD.org>2012-01-25 21:15:30 +0000
commit92aaf1ed36e865bbb4ceda35e737cf4e33426845 (patch)
tree8cddc8ab35dd790756bbae69835e7fcbd75eb39d /security/tripwire
parent92ff23618980612f038089cae3d109bd5e5ab572 (diff)
Update 2.4.1.2 --> 2.4.2.2.
Binary packaging now possible -- first cut.
Notes
Notes: svn path=/head/; revision=289805
Diffstat (limited to 'security/tripwire')
-rw-r--r--security/tripwire/Makefile49
-rw-r--r--security/tripwire/distinfo4
-rw-r--r--security/tripwire/files/patch-install-install.sh39
-rw-r--r--security/tripwire/files/pkg-deinstall.in27
-rw-r--r--security/tripwire/pkg-plist1
5 files changed, 110 insertions, 10 deletions
diff --git a/security/tripwire/Makefile b/security/tripwire/Makefile
index bb5a37da2d35..d0f2248aad69 100644
--- a/security/tripwire/Makefile
+++ b/security/tripwire/Makefile
@@ -6,18 +6,20 @@
#
PORTNAME= tripwire
-PORTVERSION= 2.4.1.2
+PORTVERSION= 2.4.2.2
CATEGORIES= security
-MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-src/${PORTNAME}-${PORTVERSION}-src
+MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-src/${PORTNAME}-${PORTVERSION}
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
MAINTAINER= cy@FreeBSD.org
COMMENT= File system security and verification program
+LICENSE= GPLv2
+NO_LICENSES_INSTALL= yes
LATEST_LINK= ${PORTNAME}
MAN5= twfiles.5 twconfig.5 twpolicy.5
MAN8= siggen.8 tripwire.8 twadmin.8 twintro.8 twprint.8
-NO_PACKAGE= "requires local database to be built"
+# NO_PACKAGE= "requires local database to be built"
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-src
USE_BZIP2= yes
GNU_CONFIGURE= yes
@@ -43,12 +45,16 @@ TWEDITOR?= /usr/bin/vi
# This sets the location of the twpol.txt file that is to be installed
TWPOL_TXT?= ${FILESDIR}/twpol.m4
# Other variables that are used:
-TRIPWIRE_CLOBBER?= NO
+TRIPWIRE_CLOBBER?= false
+TRIPWIRE_PROMPT?= true
# If TRIPWIRE_CLOBBER is set to YES, the install script clobbers
# previously installed config files.
CONFIGURE_ARGS= --prefix=${PREFIX} --program-transform-name='' --sysconfdir=${TWCFG}
PLIST_SUB+= TWCFG=${TWCFG} TWDB=${TWDB}
+PKGINSTALL= ${WRKDIR}/pkg-install
+SUB_FILES= pkg-deinstall
+SUB_LIST= TWCFG=${TWCFG} TWDB=${TWDB}
pre-configure:
@ ${M4} -DFREEBSD_VERSION=`${ECHO_CMD} ${OSREL} | ${CUT} -d. -f1` < ${TWPOL_TXT} > ${WRKSRC}/policy/twpol-FreeBSD.txt
@@ -66,15 +72,44 @@ install-config-files:
@ ${ECHO_CMD} TWREPORT=${TWREPORT} >> ${WRKSRC}/install/install.cfg
@ ${ECHO_CMD} TWEDITOR=${TWEDITOR} >> ${WRKSRC}/install/install.cfg
@ cd ${WRKSRC} && ${LN} -sf install/install.cfg install/install.sh .
+.ifndef PACKAGE_BUILDING
.if ( defined(TRIPWIRE_CLOBBER) && ${TRIPWIRE_CLOBBER} == "YES" ) || \
( defined(TRIPWIRE_CLOBBER) && ${TRIPWIRE_CLOBBER} == "yes" )
@ cd ${WRKSRC} && PREFIX=${PREFIX} CLOBBER=true ${GMAKE} install-data-hook
.else
@ cd ${WRKSRC} && PREFIX=${PREFIX} ${GMAKE} install-data-hook
.endif
+.else
+ @ cd ${WRKSRC} && PREFIX=${PREFIX} DO_NOT_CONFIG=yes ${GMAKE} install-data-hook
+.endif
+
+make-pkg-install:
+ @ ${ECHO_CMD} '#!/bin/sh -' > ${PKGINSTALL}
+ @ ${ECHO_CMD} '#' >> ${PKGINSTALL}
+ @ ${ECHO_CMD} "# Generated by make-${PKGINSTALL} on `date`" >> ${PKGINSTALL}
+ @ ${ECHO_CMD} '#' >> ${PKGINSTALL}
+ @ ${ECHO_CMD} 'case $$2 in' >> ${PKGINSTALL}
+ @ ${ECHO_CMD} 'POST-INSTALL) ;;' >> ${PKGINSTALL}
+ @ ${ECHO_CMD} '*) exit 0;;' >> ${PKGINSTALL}
+ @ ${ECHO_CMD} 'esac' >> ${PKGINSTALL}
+ @ ${ECHO_CMD} PACKAGE_INSTALLER=yes >> ${PKGINSTALL}
+ @ ${ECHO_CMD} POLICYSRC=/tmp/$$$$.tmp >> ${PKGINSTALL}
+ @ ${ECHO_CMD} PREFIX="$(PREFIX)" >> ${PKGINSTALL}
+ @ ${ECHO_CMD} sysconfdir="$(sysconfdir)" >> ${PKGINSTALL}
+ @ ${ECHO_CMD} prefix=${PREFIX} >> ${PKGINSTALL}
+ @ ${ECHO_CMD} sysconfdir=${TWCFG} >> ${PKGINSTALL}
+ @ ${ECHO_CMD} path_to_vi="/usr/bin/vi" >> ${PKGINSTALL}
+ @ ${ECHO_CMD} path_to_sendmail="/usr/sbin/sendmail" >> ${PKGINSTALL}
+ @ ${ECHO_CMD} BASE_DIR=${PREFIX}/ >> ${PKGINSTALL}
+ @ ${ECHO_CMD} BIN_DIR=${PREFIX}/sbin >> ${PKGINSTALL}
+ @ ${CAT} ${WRKSRC}/install/install.cfg >> ${PKGINSTALL}
+ @ ${ECHO_CMD} ${CAT} "> /tmp/$$$$.tmp <<'EOF'" >> ${PKGINSTALL}
+ @ ${M4} -DFREEBSD_VERSION=`${ECHO_CMD} ${OSREL} | ${CUT} -d. -f1` < ${TWPOL_TXT} >> ${PKGINSTALL}
+ @ ${ECHO_CMD} EOF >> ${PKGINSTALL}
+ @ ${SED} "/^\. /s/^/: /;/^BASE_DIR=/d;s/BIN_DIR=/: BIN_DIR=/;/^POLICYSRC/d" ${WRKSRC}/install/install.sh >> ${PKGINSTALL}
create-database:
-.ifndef NO_DB_BUILD
+.if !defined(NO_DB_BUILD) && !defined(PACKAGE_BUILDING)
@ ${MKDIR} -p ${TWCFG} ${TWPOLICY} ${TWSITEKEYDIR} ${TWLOCALKEYDIR} \
${TWDB} ${TWREPORT}
@ ${ECHO} Creating tripwire database
@@ -87,6 +122,6 @@ create-database:
.endif
-post-install: install-config-files create-database
-
+post-install: install-config-files create-database make-pkg-install
+
.include <bsd.port.mk>
diff --git a/security/tripwire/distinfo b/security/tripwire/distinfo
index 9df9f7e9b892..0d6d827c0026 100644
--- a/security/tripwire/distinfo
+++ b/security/tripwire/distinfo
@@ -1,2 +1,2 @@
-SHA256 (tripwire-2.4.1.2-src.tar.bz2) = 55462b13a81aa65b83a76cd43d8617a60eb669d2b3d9999d0377a0e68e692907
-SIZE (tripwire-2.4.1.2-src.tar.bz2) = 711311
+SHA256 (tripwire-2.4.2.2-src.tar.bz2) = e09a7bdca9302e704cc62067399e0b584488f825b0e58c82ad6d54cd2e899fad
+SIZE (tripwire-2.4.2.2-src.tar.bz2) = 716616
diff --git a/security/tripwire/files/patch-install-install.sh b/security/tripwire/files/patch-install-install.sh
new file mode 100644
index 000000000000..7112cc1ebb50
--- /dev/null
+++ b/security/tripwire/files/patch-install-install.sh
@@ -0,0 +1,39 @@
+--- install/install.sh.orig 2011-11-21 08:06:56.000000000 -0800
++++ install/install.sh 2012-01-17 22:57:34.124821110 -0800
+@@ -200,6 +200,7 @@
+ ## Parse the command line.
+ ##-------------------------------------------------------
+
++test "$PACKAGE_INSTALLER" != "yes" && {
+ while [ "x$1" != "x" ] ; do
+ case "$1" in
+ -n) PROMPT="false"; xCLOBBER="true" ;;
+@@ -232,6 +233,7 @@
+ esac
+ shift
+ done
++}
+
+ ##-------------------------------------------------------
+ ## Print the sign-on banner here before the first
+@@ -550,6 +552,7 @@
+ ## Copy all files to the location specified.
+ ##=======================================================
+
++test "$PACKAGE_INSTALLER" != "yes" && {
+ echo
+ echo "----------------------------------------------"
+ echo "Copying files..."
+@@ -604,6 +607,12 @@
+ fi
+ fi
+ done
++}
++
++case $DO_NOT_CONFIG in
++yes) exit;;
++*) ;;
++esac
+
+ ##=======================================================
+ ## Files are now present on user's system.
diff --git a/security/tripwire/files/pkg-deinstall.in b/security/tripwire/files/pkg-deinstall.in
new file mode 100644
index 000000000000..173ee3d9829e
--- /dev/null
+++ b/security/tripwire/files/pkg-deinstall.in
@@ -0,0 +1,27 @@
+#! /bin/sh
+
+case $2 in
+POST-DEINSTALL)
+ if [ -d %%TWCFG%% -o -d %%TWDB%% ]; then
+ unset ANS
+ echo
+ while [ -z "$ANS" ]; do
+ echo If permanently deleting this package,
+ echo %%TWCFG%% and %%TWDB%% may be removed.
+ echo Do you wish to delete %%TWCFG%%
+ echo -n and %%TWDB%%? '(yes/no) -: '
+ read ANS
+ case $ANS in
+ [Yy]|[Yy][Ee][Ss])
+ rm -rf %%TWCFG%% %%TWDB%%
+ ;;
+ [Nn]|[Nn][Oo])
+ ;;
+ *) echo Answer must be yes or no.
+ echo
+ unset ANS
+ ;;
+ esac
+ done
+ fi
+esac
diff --git a/security/tripwire/pkg-plist b/security/tripwire/pkg-plist
index 663033bbe4f7..005b7988576c 100644
--- a/security/tripwire/pkg-plist
+++ b/security/tripwire/pkg-plist
@@ -6,4 +6,3 @@ share/doc/tripwire/COPYING
share/doc/tripwire/TRADEMARK
share/doc/tripwire/policyguide.txt
@dirrm share/doc/tripwire
-@unexec echo If permanently deleting this package, %%TWCFG%% and %%TWDB%% must be removed manually