Bug 171818 - Please add option for Python-integration to sysutils/bacula-server
Summary: Please add option for Python-integration to sysutils/bacula-server
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: freebsd-ports-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-20 19:40 UTC by Florian Ermisch
Modified: 2013-07-19 10:50 UTC (History)
0 users

See Also:


Attachments
file.diff (798 bytes, patch)
2012-09-20 19:40 UTC, Florian Ermisch
no flags Details | Diff
patch.bacula.python (1.45 KB, application/octet-stream)
2013-02-18 13:25 UTC, Dan Langille
no flags Details
file.dat (33.42 KB, text/plain; charset=us-ascii)
2013-02-18 13:25 UTC, Dan Langille
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Ermisch 2012-09-20 19:40:04 UTC
Bacula has a compile-time option to use Python-scripting but the current port's Makefile has no option to switch this feature on.

Fix: The attached patch to the Makefile adds an option to enable Python-integration (the default is 'off').
I ran portlint and already solved one bug I added. The other things portlint complains about aren't my fault ^^".

Patch attached with submission follows:
How-To-Repeat: Try to use scripting in a Bacula-server built from the FreeBSD-ports.
Comment 1 Edwin Groothuis freebsd_committer 2012-09-20 19:40:14 UTC
Maintainer of sysutils/bacula-server,

Please note that PR ports/171818 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/171818

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer 2012-09-20 19:40:15 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Dan Langille 2012-12-15 18:03:29 UTC
Let's look at this once we get this PR committed:

http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/167700

-- 
Dan Langille - http://langille.org
Comment 4 Dan Langille 2013-02-18 13:25:46 UTC
I've applied the patch (with modifications) but linking errors such as this are beyond me this morning.
Comment 5 Dan Langille 2013-03-24 05:58:31 UTC
Florian:

Were you successful at compiling in Python support?  As you can see, I =
am failing.

I have no further ideas as to what to try.

--=20
Dan Langille - http://langille.org
Comment 6 dfilter service freebsd_committer 2013-07-19 10:45:14 UTC
Author: rm
Date: Fri Jul 19 09:44:58 2013
New Revision: 323275
URL: http://svnweb.freebsd.org/changeset/ports/323275

Log:
  - move bacula configuration to ${ETCDIR}/bacula
  - bump PORTREVISION
  - add UPDATING entry
  - add an option to enable python support (both client and server
    need to be rebuilt with this)
  
  Dan's submission is based on:
  PR:     170882
  Submitted by:   Michael Carlson <mike@bayphoto.com>
  
  PR:     171818
  Submitted by:   Florian Ermisch <floh.edo@googlemail.com>
  
  PR:     177331
  Submitted by:   Dan Langille <dan@langille.org> (maintainer)

Modified:
  head/UPDATING
  head/sysutils/bacula-client/Makefile
  head/sysutils/bacula-server/Makefile
  head/sysutils/bacula-server/Makefile.common
  head/sysutils/bacula-server/files/bacula-dir.in
  head/sysutils/bacula-server/files/bacula-fd.in
  head/sysutils/bacula-server/files/bacula-sd.in
  head/sysutils/bacula-server/files/chio-bacula
  head/sysutils/bacula-server/files/pkg-message.client.in
  head/sysutils/bacula-server/files/pkg-message.server.in

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Fri Jul 19 09:19:53 2013	(r323274)
+++ head/UPDATING	Fri Jul 19 09:44:58 2013	(r323275)
@@ -5,6 +5,14 @@ they are unavoidable.
 You should get into the habit of checking this file for changes each time
 you update your ports collection, before attempting any port upgrades.
 
+20130719:
+  AFFECTS: users of sysutils/bacula-server, sysutils/bacula-client, sysutils/bat
+  AUTHOR: dvl@FreeBSD.org
+
+  The configuration files for bacula have been moved to PREFIX/bacula.
+  Moveyour existing configuration files to this directory after
+  upgrading.
+
 20130718:
   AFFECTS: users of security/logcheck
   AUTHOR: glarkin@FreeBSD.org

Modified: head/sysutils/bacula-client/Makefile
==============================================================================
--- head/sysutils/bacula-client/Makefile	Fri Jul 19 09:19:53 2013	(r323274)
+++ head/sysutils/bacula-client/Makefile	Fri Jul 19 09:44:58 2013	(r323275)
@@ -11,7 +11,7 @@ USE_RC_SUBR=	bacula-fd
 PLIST=		${PKGDIR}/pkg-plist.client
 MASTERDIR=	${.CURDIR}/../../sysutils/bacula-server
 
-OPTIONS_DEFINE=	NLS OPENSSL
+OPTIONS_DEFINE=	NLS OPENSSL PYTHON
 OPTIONS_DEFAULT=NLS OPENSSL
 
 .include "${MASTERDIR}/Makefile"

Modified: head/sysutils/bacula-server/Makefile
==============================================================================
--- head/sysutils/bacula-server/Makefile	Fri Jul 19 09:19:53 2013	(r323274)
+++ head/sysutils/bacula-server/Makefile	Fri Jul 19 09:44:58 2013	(r323275)
@@ -3,7 +3,7 @@
 
 PORTNAME=	bacula
 DISTVERSION=	5.2.12
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES?=	sysutils
 MASTER_SITES=	SF/bacula/bacula/${PORTVERSION}
 PKGNAMEPREFIX?=	#
@@ -25,7 +25,7 @@ USE_LDCONFIG=	yes
 CPPFLAGS+=	-I/usr/include/readline -I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 
-OPTIONS_DEFINE?=	SQLITE3 MYSQL PGSQL MTX NLS OPENSSL
+OPTIONS_DEFINE?=	SQLITE3 MYSQL PGSQL MTX PYTHON NLS OPENSSL
 OPTIONS_DEFAULT?=	NLS OPENSSL PGSQL
 MTX_DESC=		Install mtx for control of autochanger devices
 
@@ -33,6 +33,11 @@ MTX_DESC=		Install mtx for control of au
 
 .if ${PKGNAMESUFFIX} == "-client" || ${PKGNAMESUFFIX} == "-server"  #Till end of the file
 
+.if defined(WITH_PYTHON)
+USE_PYTHON=		yes
+CONFIGURE_ARGS+=	--with-python=yes
+.endif
+
 .if !defined(WITH_CLIENT_ONLY)
 LIB_DEPENDS+=	bac:${PORTSDIR}/sysutils/bacula-client
 USE_RC_SUBR?=	bacula-dir bacula-sd
@@ -47,6 +52,7 @@ SUB_FILES+=	pkg-install.server pkg-deins
 MANCOMPRESSED=	yes
 CONFIGURE_ARGS+=--with-tcp-wrappers=/usr/lib \
 		--enable-smartalloc \
+		--sysconfdir=${ETCDIR} \
 		--with-working-dir=${BACULA_DIR} \
 		--with-scriptdir=${PREFIX}/share/${PORTNAME} \
 		--with-readline=yes \
@@ -154,6 +160,7 @@ pre-everything::
 	@${ECHO_MSG} ""
 	@${ECHO_MSG} "  WITH_CLIENT_ONLY=yes	if you only want the file daemon."
 	@${ECHO_MSG} "  WITH_MTX=yes		if you want to use mtx instead of chio for autochanger control."
+	@${ECHO_MSG} "  WITH_PYTHON=yes		Enable Python scripting in the director."
 	@${ECHO_MSG} "  WITH_SQLITE3=yes  	if you want SQLite-3 as the database (not recommended)."
 .if ! ${PORT_OPTIONS:MMYSQL} && ! ${PORT_OPTIONS:MPGSQL}
 	@${ECHO_MSG} "  WITH_MYSQL=yes  	if you want MySQL as the database."
@@ -173,8 +180,8 @@ post-patch:
 #	Change $(ECHO) to echo in some Makefile.in files
 	@${REINPLACE_CMD} -e 's|$$(ECHO)|echo|g' ${WRKSRC}/src/filed/Makefile.in \
 		${WRKSRC}/src/console/Makefile.in
-#	Default bconsole.conf is ${PREFIX}/etc
-	@${REINPLACE_CMD} -e 's|./bconsole.conf|${PREFIX}/etc/bconsole.conf|g' ${WRKSRC}/src/console/console.c
+#	Default bconsole.conf is in ${ETCDIR}
+	@${REINPLACE_CMD} -e 's|./bconsole.conf|${ETCDIR}/bconsole.conf|g' ${WRKSRC}/src/console/console.c
 	@${REINPLACE_CMD} -e 's|^MAN8 =|MAN8 ?=|g' -e 's|^MAN1 =|MAN1 ?=|g' ${WRKSRC}/manpages/Makefile.in
 .if defined(WITH_CLIENT_ONLY)
 # 	In client port only install startup script out of script dir (see below post-install)
@@ -212,13 +219,13 @@ post-install:
 	@ ${SETENV} PKG_PREFIX=${PREFIX} \
 		${SH} ${PKGINSTALL} ${PORTNAME}
 # 	Console stuff
-	if [ -f ${PREFIX}/etc/bconsole.conf.new ]; then \
+	if [ -f ${ETCDIR}/bconsole.conf.new ]; then \
 		${ECHO_CMD} "etc/bconsole.conf.new" >> ${TMPPLIST}; \
-		${CHGRP} bacula ${PREFIX}/etc/bconsole.conf.new; \
-	elif [ -f ${PREFIX}/etc/bconsole.conf ]; then \
-		${MV} ${PREFIX}/etc/bconsole.conf ${PREFIX}/etc/bconsole.conf.sample; \
-		${CHGRP} bacula ${PREFIX}/etc/bconsole.conf.sample; \
-		${ECHO_CMD} "etc/bconsole.conf.sample" >> ${TMPPLIST}; \
+		${CHGRP} bacula ${ETCDIR}/bconsole.conf.new; \
+	elif [ -f ${ETCDIR}/bconsole.conf ]; then \
+		${MV} ${ETCDIR}/bconsole.conf ${ETCDIR}/bconsole.conf.sample; \
+		${CHGRP} bacula ${ETCDIR}/bconsole.conf.sample; \
+		${ECHO_CMD} "etc/bacula/bconsole.conf.sample" >> ${TMPPLIST}; \
 	fi
 
 #	ensure that users in the bacula group can run bconsole
@@ -226,22 +233,24 @@ post-install:
 .else
 # 	Install config files and preserve existing ones
 	${INSTALL_SCRIPT} ${FILESDIR}/chio-bacula ${PREFIX}/sbin
-	if [ -f ${PREFIX}/etc/bacula-barcodes ]; then \
-		${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${PREFIX}/etc/bacula-barcodes.new ; \
-		${ECHO_CMD} "etc/bacula-barcodes.new" >> ${TMPPLIST}; \
+	if [ -f ${ETCDIR}/bacula-barcodes ]; then \
+		${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${ETCDIR}/bacula-barcodes.new ; \
+		${ECHO_CMD} "etc/bacula/bacula-barcodes.new" >> ${TMPPLIST}; \
 	else \
-		${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${PREFIX}/etc/bacula-barcodes.samples ; \
-		${ECHO_CMD} "etc/bacula-barcodes.samples" >> ${TMPPLIST}; \
+		${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${ETCDIR}/bacula-barcodes.samples ; \
+		${ECHO_CMD} "etc/bacula/bacula-barcodes.samples" >> ${TMPPLIST}; \
 	fi
+#	Add configuration files directory to packing list
+	${ECHO_CMD} "@unexec rmdir %D/etc/bacula 2>/dev/null || true" >> ${TMPPLIST}
 # 	chmod of bsmtp program so bacula can use it with dropped down permissions
 	${CHMOD} o+x ${PREFIX}/sbin/bsmtp
 	${CHOWN} -R bacula:bacula ${PREFIX}/share/bacula
 
 #	on a fresh install, the .new suffix is not used
-	if [ -f ${PREFIX}/etc/bacula-dir.conf.new ]; then \
-		${CHGRP} bacula ${PREFIX}/etc/bacula-dir.conf.new; \
+	if [ -f ${ETCDIR}/bacula-dir.conf.new ]; then \
+		${CHGRP} bacula ${ETCDIR}/bacula-dir.conf.new; \
 	else \
-		${CHGRP} bacula ${PREFIX}/etc/bacula-dir.conf; \
+		${CHGRP} bacula ${ETCDIR}/bacula-dir.conf; \
 	fi
 
 	${CHGRP} bacula ${PREFIX}/sbin/dbcheck
@@ -249,14 +258,17 @@ post-install:
 .endif
 # 	Install leaves existing conf files untouched. Respect this here!
 	for na in ${CONFFILES}; do \
-		if [ -f ${PREFIX}/etc/bacula-$$na.conf.new ]; then \
-			${ECHO_CMD} "etc/bacula-$$na.conf.new" >> ${TMPPLIST}; \
-		elif [ -f ${PREFIX}/etc/bacula-$$na.conf ]; then \
-			${MV} ${PREFIX}/etc/bacula-$$na.conf ${PREFIX}/etc/bacula-$$na.conf.sample; \
-			${ECHO_CMD} "etc/bacula-$$na.conf.sample" >> ${TMPPLIST}; \
+		if [ -f ${ETCDIR}/bacula-$$na.conf.new ]; then \
+			${ECHO_CMD} "etc/bacula/bacula-$$na.conf.new" >> ${TMPPLIST}; \
+		elif [ -f ${ETCDIR}/bacula-$$na.conf ]; then \
+			${MV} ${ETCDIR}/bacula-$$na.conf ${ETCDIR}/bacula-$$na.conf.sample; \
+			${ECHO_CMD} "etc/bacula/bacula-$$na.conf.sample" >> ${TMPPLIST}; \
 		fi; \
 	done
 
+#	Add configuration files directory to packing list
+	${ECHO_CMD} "@unexec rmdir %D/etc/bacula 2>/dev/null || true" >> ${TMPPLIST}
+
 	${CHGRP} wheel ${PREFIX}/etc
 
 	@${CAT} ${PKGMESSAGE}

Modified: head/sysutils/bacula-server/Makefile.common
==============================================================================
--- head/sysutils/bacula-server/Makefile.common	Fri Jul 19 09:19:53 2013	(r323274)
+++ head/sysutils/bacula-server/Makefile.common	Fri Jul 19 09:44:58 2013	(r323275)
@@ -48,7 +48,7 @@ pre-install:
 do-install:
 .if ${PKGNAMESUFFIX} == "-bat"
 # Install config files and preserve existing ones
-	${INSTALL_SCRIPT}  ${WRKSRC}/src/qt-console/bat.conf ${PREFIX}/etc/bat.conf.sample
+	${INSTALL_SCRIPT}  ${WRKSRC}/src/qt-console/bat.conf ${PREFIX}/etc/bacula/bat.conf.sample
 	${INSTALL_MAN}     ${WRKSRC}/manpages/bat.1          ${PREFIX}/man/man1/
 	${INSTALL_PROGRAM} ${WRKSRC}/src/qt-console/bat ${PREFIX}/sbin
 .endif

Modified: head/sysutils/bacula-server/files/bacula-dir.in
==============================================================================
--- head/sysutils/bacula-server/files/bacula-dir.in	Fri Jul 19 09:19:53 2013	(r323274)
+++ head/sysutils/bacula-server/files/bacula-dir.in	Fri Jul 19 09:44:58 2013	(r323275)
@@ -23,7 +23,7 @@ command=%%PREFIX%%/sbin/bacula-dir
 load_rc_config $name
 
 : ${bacula_dir_enable="NO"}
-: ${bacula_dir_flags=" -u bacula -g bacula -v -c %%PREFIX%%/etc/bacula-dir.conf"}
+: ${bacula_dir_flags=" -u bacula -g bacula -v -c %%PREFIX%%/etc/bacula/bacula-dir.conf"}
 : ${bacula_dir_pidfile="/var/run/bacula-dir.9101.pid"}
 
 pidfile="${bacula_dir_pidfile}"

Modified: head/sysutils/bacula-server/files/bacula-fd.in
==============================================================================
--- head/sysutils/bacula-server/files/bacula-fd.in	Fri Jul 19 09:19:53 2013	(r323274)
+++ head/sysutils/bacula-server/files/bacula-fd.in	Fri Jul 19 09:44:58 2013	(r323275)
@@ -23,7 +23,7 @@ command=%%PREFIX%%/sbin/bacula-fd
 load_rc_config $name
 
 : ${bacula_fd_enable="NO"}
-: ${bacula_fd_flags=" -u root -g wheel -v -c %%PREFIX%%/etc/bacula-fd.conf"}
+: ${bacula_fd_flags=" -u root -g wheel -v -c %%PREFIX%%/etc/bacula/bacula-fd.conf"}
 : ${bacula_fd_pidfile="/var/run/bacula-fd.9102.pid"}
 
 pidfile="${bacula_fd_pidfile}"

Modified: head/sysutils/bacula-server/files/bacula-sd.in
==============================================================================
--- head/sysutils/bacula-server/files/bacula-sd.in	Fri Jul 19 09:19:53 2013	(r323274)
+++ head/sysutils/bacula-server/files/bacula-sd.in	Fri Jul 19 09:44:58 2013	(r323275)
@@ -23,7 +23,7 @@ command=%%PREFIX%%/sbin/bacula-sd
 load_rc_config $name
 
 : ${bacula_sd_enable="NO"}
-: ${bacula_sd_flags=" -u bacula -g bacula -v -c %%PREFIX%%/etc/bacula-sd.conf"}
+: ${bacula_sd_flags=" -u bacula -g bacula -v -c %%PREFIX%%/etc/bacula/bacula-sd.conf"}
 : ${bacula_sd_pidfile="/var/run/bacula-sd.9103.pid"}
 
 pidfile="${bacula_sd_pidfile}"

Modified: head/sysutils/bacula-server/files/chio-bacula
==============================================================================
--- head/sysutils/bacula-server/files/chio-bacula	Fri Jul 19 09:19:53 2013	(r323274)
+++ head/sysutils/bacula-server/files/chio-bacula	Fri Jul 19 09:44:58 2013	(r323275)
@@ -39,7 +39,7 @@ logger -p user.err "$me $@"
 # This simulates a barcode reader in the changer.
 # The labes of the virtual barcode reader are located in the BARCODE_FILE
 SIMULATE_BARCODE=true
-BARCODE_FILE=/usr/local/etc/bacula-barcodes
+BARCODE_FILE=/usr/local/etc/bacula/bacula-barcodes
 MTX=/bin/chio
 # Set default values (see case statement below for
 # free mapping of drive index and tape device

Modified: head/sysutils/bacula-server/files/pkg-message.client.in
==============================================================================
--- head/sysutils/bacula-server/files/pkg-message.client.in	Fri Jul 19 09:19:53 2013	(r323274)
+++ head/sysutils/bacula-server/files/pkg-message.client.in	Fri Jul 19 09:44:58 2013	(r323275)
@@ -1,7 +1,7 @@
 ################################################################################
 
 NOTE:
-Sample files are installed in %%PREFIX%%/etc:
+Sample files are installed in %%PREFIX%%/etc/bacula:
 bconsole.conf.sample, bacula-barcodes.sample, bacula-fd.conf.sample
 
   Please read this file:

Modified: head/sysutils/bacula-server/files/pkg-message.server.in
==============================================================================
--- head/sysutils/bacula-server/files/pkg-message.server.in	Fri Jul 19 09:19:53 2013	(r323274)
+++ head/sysutils/bacula-server/files/pkg-message.server.in	Fri Jul 19 09:44:58 2013	(r323275)
@@ -17,7 +17,7 @@ chio command is included and installed a
 Please have a look at it if you want to use an
 autochanger. You have to configure the usage in
 
-  %%PREFIX%%/etc/bacula-dir.conf
+  %%PREFIX%%/etc/bacula/bacula-dir.conf
 
 Take care of correct permissions for changer and
 tape device (e.g. /dev/ch0 and /dev/n[r]sa0) i.e.
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 7 Ruslan Makhmatkhanov freebsd_committer 2013-07-19 10:45:45 UTC
State Changed
From-To: feedback->closed

Committed, thank you!