Although this would probably violate POLA, I think the Bacula ports should use ${PREFIX}/etc/bacula, instead of just ${PREFIX}/etc for the configuration files. bacula-server and bacula-client currently install configuration files in /usr/local/etc/, unlike other platforms (Linux, solaris, etc...) which install configuration files in /etc/bacula/. Not only does this clutter up /usr/local/etc/, it also makes it complicated to keep your bacula configuration under some type of revision control. And, if you are using some type of configuration management (ie puppet), its becomes tedious to manage different bacula configuration directories across multiple platforms. It makes sense to me to update the sysconfdir location from etc/ to etc/bacula/ and lets have some harmony between platforms. Fix: See svn diff attached Patch attached with submission follows: How-To-Repeat: cd /usr/ports/sysutils/bacula-server && make install && ls -al /usr/local/etc/bacula-*.conf -rw-r--r-- 1 root wheel 5411 Apr 10 10:15 /usr/local/etc/bacula-dir.conf -rw-r--r-- 1 root wheel 801 Mar 20 09:34 /usr/local/etc/bacula-fd.conf -rw-r----- 1 root wheel 8482 Apr 10 10:14 /usr/local/etc/bacula-sd.conf
Responsible Changed From-To: freebsd-ports-bugs->miwi miwi@ wants his PRs (via the GNATS Auto Assign Tool)
Maintainer of sysutils/bacula-server, Please note that PR ports/170882 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/170882 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
I understand the concept, I'll need to seek the advice of others, including the Bacula Users Mailing list before changing the location of the configuration files. -- Dan Langille - http://langille.org/
Responsible Changed From-To: miwi->freebsd-ports-bugs Reassign to the heap miwi being overloaded for now
Changing from /usr/local/etc/ to /etc/ goes against hire(7) Yes. FreeBSD, the files are in a different location than on other = systems. That doesn't make it right. So far, I'm unconvinced that changing is a good idea. --=20 Dan Langille - http://langille.org
The patch changes the configuration file location from /usr/local/etc/ to /usr/local/etc/bacula, not from /usr/loca/etc/ to /etc/ So, it is not going against heir(7)
Hello Dan, there hasn't been any activity on this PR for sysutils/bacula-server (see [1]) for quite a while. What is the state of things here? Should a change be committed, or should this PR be closed? (Note: The change proposed by Michael wasn't to use /etc, which would indeed not be correct, but to use /usr/local/etc/bacula, which would be acceptable. I am not expressing any preference myself, though - it's the maintainer's decision.) Best regards, Stefan [1]: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/170882
Responsible Changed From-To: freebsd-ports-bugs->stefan Track this while waiting for maintainer's feedback.
----- Forwarded message from Dan Langille <dan@langille.org> ----- Date: Tue, 30 Apr 2013 09:55:59 -0400 From: Dan Langille <dan@langille.org> To: stefan@FreeBSD.org Cc: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/170882: sysutils/bacula-server - Feature Request - Change sysconfdir to $PREFIX/etc/bacula X-Mailer: Apple Mail (2.1283) I did some work on this, but in another PR. See ports/177331 I failed to get the port to remove /usr/local/etc/bacula upon deinstall. The PR is stalled because of that issue. Help on that is greatly appreciated. -- Dan Langille - http://langille.org _______________________________________________ freebsd-ports-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs To unsubscribe, send any mail to "freebsd-ports-bugs-unsubscribe@freebsd.org" ----- End forwarded message -----
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"
State Changed From-To: feedback->closed Committed, thank you!