Bug 164033 - [patch] port devel/subversion ports change pkg-install and pkg-deinstall script
Summary: [patch] port devel/subversion ports change pkg-install and pkg-deinstall script
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Lev A. Serebryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-11 23:30 UTC by Olli Hauer
Modified: 2012-02-14 16:10 UTC (History)
1 user (show)

See Also:


Attachments
patch_subversion.txt (4.06 KB, text/plain)
2012-01-11 23:30 UTC, Olli Hauer
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olli Hauer freebsd_committer 2012-01-11 23:30:12 UTC
The pkg-install script should be more expilzit.

The pkg-deinstall script should only check for LoadModule (apache20/22/24),
AddModule was only used for apache13.

Also during deinstall the changed script will cleanup lines prefixed with `#'
and is tolerant against reformating httpd.conf by the user.

How-To-Repeat: - change spacing in httpd.conf and install subversion
  (add additional tab/spaces in the Line LoadModule dav_module)

- prefix a subversion module line with `#' and deinstall subversion
Comment 1 Edwin Groothuis freebsd_committer 2012-01-11 23:30:25 UTC
Responsible Changed
From-To: freebsd-ports-bugs->lev

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Olli Hauer freebsd_committer 2012-01-29 21:53:33 UTC
Port devel/subversion builds and installs ${WRKDIR}/tools per default but with all object files and .libs dirs.

The following patch replace the first one for devel/subversion.
 - do not build svnauthz-validate a second time
 - rework pkg-install / pkg-deinstall
 - do not install tools/*/.libs tools/*/*.o and .lo files
 


--- patch_subversion.txt begins here ---
Index: subversion/Makefile
===================================================================
RCS file: /home/pcvs/ports/devel/subversion/Makefile,v
retrieving revision 1.139
diff -u -r1.139 Makefile
--- subversion/Makefile	16 Oct 2011 21:01:42 -0000	1.139
+++ subversion/Makefile	29 Jan 2012 21:30:30 -0000
@@ -193,12 +193,13 @@
 #	cd ${WRKSRC}/contrib/server-side/mod_dontdothat && \
 #		${APXS} -c -I${WRKSRC}/subversion/include -L${WRKSRC}/subversion/libsvn_subr/.libs -lsvn_subr-1 mod_dontdothat.c
 #.endif
-.if defined(WITH_SVNAUTHZ_VALIDATE)
-	# place binary in ${WRKDIR}, else we install it twice
-	cd ${WRKSRC}/tools/server-side && \
-		${CC} svnauthz-validate.c -o ../../svnauthz-validate -I${WRKSRC}/subversion/include -I${APR_INCLUDE_DIR} \
-		-L${WRKSRC}/subversion/libsvn_repos/.libs -L${WRKSRC}/subversion/libsvn_subr/.libs -lsvn_repos-1 -lsvn_subr-1
-.endif
+## svnauthz-validate will be build with the other tools (subversion-1.7(+))
+#.if defined(WITH_SVNAUTHZ_VALIDATE)
+#	# place binary in ${WRKDIR}, else we install it twice
+#	cd ${WRKSRC}/tools/server-side && \
+#		${CC} svnauthz-validate.c -o ../../svnauthz-validate -I${WRKSRC}/subversion/include -I${APR_INCLUDE_DIR} \
+#		-L${WRKSRC}/subversion/libsvn_repos/.libs -L${WRKSRC}/subversion/libsvn_subr/.libs -lsvn_repos-1 -lsvn_subr-1
+#.endif
 
 pre-install:
 .if defined(WITH_MOD_DAV_SVN)
@@ -218,11 +219,11 @@
 #.endif
 .endif
 .if defined(WITH_SVNAUTHZ_VALIDATE)
-	${INSTALL_PROGRAM} ${WRKSRC}/svnauthz-validate ${PREFIX}/bin
+	${INSTALL} ${COPY} ${_BINOWNGRP} -m ${BINMODE} ${WRKSRC}/tools/server-side/svnauthz-validate ${PREFIX}/bin
 .endif
 	@${MKDIR} ${DATADIR}
 	cd ${WRKSRC}/tools ; \
-	  ${TAR} --exclude '*.in' -cf - * | ${TAR} -C ${DATADIR} -xf -
+	  ${TAR} --exclude '*.in' --exclude '.libs' --exclude '*.o' --exclude '*.lo' -cf - * | ${TAR} -C ${DATADIR} -xf -
 	@${CHMOD} -R a-st,o+rX ${DATADIR}
 .if !defined(NOPORTDOCS)
 	${MKDIR} ${DOCSDIR}
Index: subversion/pkg-plist
===================================================================
RCS file: /home/pcvs/ports/devel/subversion/pkg-plist,v
retrieving revision 1.44
diff -u -r1.44 pkg-plist
--- subversion/pkg-plist	16 Oct 2011 14:31:46 -0000	1.44
+++ subversion/pkg-plist	29 Jan 2012 21:30:30 -0000
@@ -229,13 +229,9 @@
 %%DATADIR%%/client-side/svn-graph.pl
 %%DATADIR%%/client-side/svn-ssl-fingerprints.sh
 %%DATADIR%%/client-side/svn-viewspec.py
-%%DATADIR%%/client-side/svnmucc/.libs/svnmucc
-%%DATADIR%%/client-side/svnmucc/.libs/svnmucc.o
 %%DATADIR%%/client-side/svnmucc/svnmucc
 %%DATADIR%%/client-side/svnmucc/svnmucc-test.py
 %%DATADIR%%/client-side/svnmucc/svnmucc.c
-%%DATADIR%%/client-side/svnmucc/svnmucc.lo
-%%DATADIR%%/client-side/svnmucc/svnmucc.o
 %%DATADIR%%/client-side/wcfind
 %%DATADIR%%/dev/analyze-svnlogs.py
 %%DATADIR%%/dev/benchmarks/large_dirs/create_bigdir.sh
@@ -276,11 +272,7 @@
 %%DATADIR%%/dev/svn-entries.el
 %%DATADIR%%/dev/svn-merge-revs.py
 %%DATADIR%%/dev/svnqlite3-dump
-%%DATADIR%%/dev/svnraisetreeconflict/.libs/main.o
-%%DATADIR%%/dev/svnraisetreeconflict/.libs/svnraisetreeconflict
 %%DATADIR%%/dev/svnraisetreeconflict/main.c
-%%DATADIR%%/dev/svnraisetreeconflict/main.lo
-%%DATADIR%%/dev/svnraisetreeconflict/main.o
 %%DATADIR%%/dev/svnraisetreeconflict/svnraisetreeconflict
 %%DATADIR%%/dev/trails.py
 %%DATADIR%%/dev/unix-build/Makefile.svn
@@ -297,24 +289,12 @@
 %%DATADIR%%/dev/windows-build/document-version.pl
 %%DATADIR%%/dev/windows-build/Makefile
 %%DATADIR%%/dev/windows-build/README
-%%DATADIR%%/diff/.libs/diff
-%%DATADIR%%/diff/.libs/diff.o
-%%DATADIR%%/diff/.libs/diff3
-%%DATADIR%%/diff/.libs/diff3.o
-%%DATADIR%%/diff/.libs/diff4
-%%DATADIR%%/diff/.libs/diff4.o
 %%DATADIR%%/diff/diff
 %%DATADIR%%/diff/diff.c
-%%DATADIR%%/diff/diff.lo
-%%DATADIR%%/diff/diff.o
 %%DATADIR%%/diff/diff3
 %%DATADIR%%/diff/diff3.c
-%%DATADIR%%/diff/diff3.lo
-%%DATADIR%%/diff/diff3.o
 %%DATADIR%%/diff/diff4
 %%DATADIR%%/diff/diff4.c
-%%DATADIR%%/diff/diff4.lo
-%%DATADIR%%/diff/diff4.o
 %%DATADIR%%/dist/backport.pl
 %%DATADIR%%/dist/checksums.py
 %%DATADIR%%/dist/collect_sigs.py
@@ -370,27 +350,15 @@
 %%DATADIR%%/hook-scripts/verify-po.py
 %%DATADIR%%/po/l10n-report.py
 %%DATADIR%%/po/po-update.sh
-%%DATADIR%%/server-side/.libs/svn-populate-node-origins-index
-%%DATADIR%%/server-side/.libs/svn-populate-node-origins-index.o
-%%DATADIR%%/server-side/.libs/svn-rep-sharing-stats
-%%DATADIR%%/server-side/.libs/svn-rep-sharing-stats.o
-%%DATADIR%%/server-side/.libs/svnauthz-validate
-%%DATADIR%%/server-side/.libs/svnauthz-validate.o
 %%DATADIR%%/server-side/fsfs-reshard.py
 %%DATADIR%%/server-side/svn-backup-dumps.py
 %%DATADIR%%/server-side/svn-populate-node-origins-index
 %%DATADIR%%/server-side/svn-populate-node-origins-index.c
-%%DATADIR%%/server-side/svn-populate-node-origins-index.lo
-%%DATADIR%%/server-side/svn-populate-node-origins-index.o
 %%DATADIR%%/server-side/svn-rep-sharing-stats
 %%DATADIR%%/server-side/svn-rep-sharing-stats.c
-%%DATADIR%%/server-side/svn-rep-sharing-stats.lo
-%%DATADIR%%/server-side/svn-rep-sharing-stats.o
 %%DATADIR%%/server-side/svn_server_log_parse.py
 %%DATADIR%%/server-side/svnauthz-validate
 %%DATADIR%%/server-side/svnauthz-validate.c
-%%DATADIR%%/server-side/svnauthz-validate.lo
-%%DATADIR%%/server-side/svnauthz-validate.o
 %%DATADIR%%/server-side/test_svn_server_log_parse.py
 %%DATADIR%%/xslt/svnindex.css
 %%DATADIR%%/xslt/svnindex.xsl
@@ -418,20 +386,17 @@
 @dirrm %%DATADIR%%/buildbot/slaves/xp-vc60-ia32
 @dirrm %%DATADIR%%/buildbot/slaves
 @dirrm %%DATADIR%%/buildbot
-@dirrm %%DATADIR%%/client-side/svnmucc/.libs
 @dirrm %%DATADIR%%/client-side/svnmucc
 @dirrm %%DATADIR%%/client-side
 @dirrm %%DATADIR%%/dev/benchmarks/large_dirs
 @dirrm %%DATADIR%%/dev/benchmarks/suite1
 @dirrm %%DATADIR%%/dev/benchmarks
 @dirrm %%DATADIR%%/dev/iz
-@dirrm %%DATADIR%%/dev/svnraisetreeconflict/.libs
 @dirrm %%DATADIR%%/dev/svnraisetreeconflict
 @dirrm %%DATADIR%%/dev/unix-build
 @dirrm %%DATADIR%%/dev/wc-ng
 @dirrm %%DATADIR%%/dev/windows-build
 @dirrm %%DATADIR%%/dev
-@dirrm %%DATADIR%%/diff/.libs
 @dirrm %%DATADIR%%/diff
 @dirrm %%DATADIR%%/dist/templates
 @dirrm %%DATADIR%%/dist
@@ -440,7 +405,6 @@
 @dirrm %%DATADIR%%/hook-scripts/mailer
 @dirrm %%DATADIR%%/hook-scripts
 @dirrm %%DATADIR%%/po
-@dirrm %%DATADIR%%/server-side/.libs
 @dirrm %%DATADIR%%/server-side
 @dirrm %%DATADIR%%/xslt
 @dirrm %%DATADIR%%
Index: subversion/files/pkg-deinstall.in
===================================================================
RCS file: /home/pcvs/ports/devel/subversion/files/pkg-deinstall.in,v
retrieving revision 1.1
diff -u -r1.1 pkg-deinstall.in
--- subversion/files/pkg-deinstall.in	19 Apr 2010 10:39:12 -0000	1.1
+++ subversion/files/pkg-deinstall.in	29 Jan 2012 21:30:30 -0000
@@ -51,15 +51,12 @@
 
 for i in ${conffile}; do
 	echo -n Removing dav_svn_module, authz_svn_module and dontdothat_module from $i in config dir: ${confdir}...
-	awk '{if (!/^LoadModule dav_svn_module/    && 
-		  !/^AddModule mod_dav_svn.c/      && \
-		  !/^LoadModule authz_svn_module/  && \
-		  !/^AddModule mod_authz_svn.c/    && \
-		  !/^LoadModule dontdothat_module/ && \
-		  !/^AddModule mod_dontdothat.c/    ) \
+	awk '{if (!/LoadModule[[:blank:]]+dav_svn_module/    &&
+		  !/LoadModule[[:blank:]]+authz_svn_module/  &&
+		  !/LoadModule[[:blank:]]+dontdothat_module/ )
 	    print $0}' < "${confdir}/$i" > "${tmpdir}/$i"
 	AWKRC=$?
-	diff "${confdir}/$i" "${tmpdir}/$i" | grep "^[<>]" | grep -Evq "^< (Load|Add)Module "
+	diff "${confdir}/$i" "${tmpdir}/$i" | grep "^[<>]" | sed -e 's/#//g' | grep -Evq "^<[[:blank:]]+LoadModule"
 	GREPRC=$?
 	# last grep should not find anything
 	if [ "x${AWKRC}" = "x0" -a "x${GREPRC}" = "x1"  ] ; then
Index: subversion/files/pkg-install.in
===================================================================
RCS file: /home/pcvs/ports/devel/subversion/files/pkg-install.in,v
retrieving revision 1.1
diff -u -r1.1 pkg-install.in
--- subversion/files/pkg-install.in	19 Apr 2010 10:39:12 -0000	1.1
+++ subversion/files/pkg-install.in	29 Jan 2012 21:30:30 -0000
@@ -43,7 +43,7 @@
 fi
 
 # use only 'egrep -e' else the check works not correct
-if [ ! -n "`egrep -e '^(Load|Add)Module.*dav_module' ${SYSCONFDIR}/${CONFFILE}`" ]; then
+if [ ! -n "`egrep -e '^LoadModule[[:blank:]]+dav_module' ${SYSCONFDIR}/${CONFFILE}`" ]; then
 	if [ -f ${LIBEXECDIR}/mod_dav.so ]; then
 		${APXSCMD} -e -S LIBEXECDIR=${LIBEXECDIR} -a -n dav ${LIBEXECDIR}/mod_dav.so
 	else
--- patch_subversion.txt ends here ---
Comment 3 dfilter service freebsd_committer 2012-02-14 16:06:36 UTC
lev         2012-02-14 16:06:21 UTC

  FreeBSD ports repository

  Modified files:
    devel/subversion     Makefile Makefile.common distinfo 
                         pkg-plist 
    devel/subversion/files pkg-deinstall.in pkg-install.in 
  Log:
    (1) Upgrade to 1.7.3
    (2) Return building od mod_dontdothat
    (3) Fix pkg-plist and remove strange binary files from installation
    (4) Make better install/deinstall scripts
    (5) Fix installation with SVNSERVE_WRAPPER, MOD_DAV_SVN and WITH_REPO_CREATION
  
  PR:             [3, 4] ports/164033, [5] ports/164583
  
  Revision  Changes    Path
  1.140     +31 -24    ports/devel/subversion/Makefile
  1.59      +2 -2      ports/devel/subversion/Makefile.common
  1.84      +5 -5      ports/devel/subversion/distinfo
  1.2       +5 -8      ports/devel/subversion/files/pkg-deinstall.in
  1.2       +2 -2      ports/devel/subversion/files/pkg-install.in
  1.45      +7 -39     ports/devel/subversion/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Lev A. Serebryakov freebsd_committer 2012-02-14 16:08:37 UTC
State Changed
From-To: open->closed


Committed, thanx!