From owner-svn-ports-head@FreeBSD.ORG Fri Jul 19 09:45:01 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 88651A0D; Fri, 19 Jul 2013 09:45:01 +0000 (UTC) (envelope-from rm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 79A75D0E; Fri, 19 Jul 2013 09:45:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6J9j0HY011083; Fri, 19 Jul 2013 09:45:00 GMT (envelope-from rm@svn.freebsd.org) Received: (from rm@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6J9ixHH011024; Fri, 19 Jul 2013 09:44:59 GMT (envelope-from rm@svn.freebsd.org) Message-Id: <201307190944.r6J9ixHH011024@svn.freebsd.org> From: Ruslan Makhmatkhanov Date: Fri, 19 Jul 2013 09:44:59 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r323275 - in head: . sysutils/bacula-client sysutils/bacula-server sysutils/bacula-server/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jul 2013 09:45:01 -0000 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 PR: 171818 Submitted by: Florian Ermisch PR: 177331 Submitted by: Dan Langille (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.