1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

- Update to 1.38.6

- Use rcNg scripts
- Pass maintainership to submitter

PR:		ports/95073
Submitted by:	Dan Langille <dan@langille.org>
Approved by:	maintainer
This commit is contained in:
Renato Botelho 2006-03-31 10:12:32 +00:00
parent 709dd2cde8
commit 3a584992e4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=158470
10 changed files with 174 additions and 88 deletions

View File

@ -9,5 +9,6 @@ COMMENT= The network backup solution (client)
PLIST= ${PKGDIR}/pkg-plist.client
WITH_CLIENT_ONLY= yes
USE_RC_SUBR= z-bacula-fd.sh
.include "${MASTERDIR}/Makefile"

View File

@ -6,19 +6,22 @@
#
PORTNAME= bacula
PORTVERSION= 1.38.5
PORTREVISION= 1
DISTVERSION= 1.38.6
#PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= bacula
PKGNAMESUFFIX?= -server
UNIQUENAME?=${PORTNAME}${PKGNAMESUFFIX}
MAINTAINER= Lars.Koeller@Uni-Bielefeld.DE
MAINTAINER= dan@langille.org
COMMENT?= The network backup solution (server)
CONFLICTS= bacula-server-devel-[0-9]* bacula-client-devel-[0-9]*
UNIQUENAME?=${PORTNAME}${PKGNAMESUFFIX}
USE_RC_SUBR?= z-bacula-dir.sh z-bacula-sd.sh
# The user/group IDs below are registered, see
# http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#DADS-UID
#
@ -28,17 +31,21 @@ GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-tcp-wrappers=/usr/lib \
--enable-smartalloc \
--with-working-dir=${BACULA_DIR} \
--with-scriptdir=${PREFIX}/share/bacula \
--with-scriptdir=${PREFIX}/share/${PORTNAME} \
--mandir=${PREFIX}/man \
--with-fd-user=root \
--with-fd-group=wheel \
--with-dir-user=bacula \
--with-dir-group=bacula \
--with-sd-user=bacula \
--with-sd-group=operator \
--with-readline=yes \
--disable-conio
.if defined(WITH_CLIENT_ONLY)
CONFIGURE_ARGS+= --with-fd-user=root \
--with-fd-group=wheel
.else
CONFIGURE_ARGS+=--with-dir-user=bacula \
--with-dir-group=bacula \
--with-sd-user=bacula \
--with-sd-group=operator
.endif
CONFIGURE_ENV+= CPPFLAGS="-I/usr/include/readline -I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib" \
PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
@ -66,6 +73,7 @@ OPTIONS+= MYSQL "Use MySQL database instead of SqLite" off
OPTIONS+= POSTGRESQL "Use PostgreSQL database instead of SqLite" off
OPTIONS+= MTX "Install mtx for control of autochanger devices" off
.endif
OPTIONS+= OPENSSL "Enable OpenSSL for encrypted communication" off
# Prepare if gnome-console is selected this must be happen before
@ -77,7 +85,7 @@ USE_GNOME= libgnome
PLIST_SUB+= BACULA_DIR=${BACULA_DIR}
MAN8= bacula.8
MAN8= bacula.8
.include <bsd.port.pre.mk>
@ -94,6 +102,7 @@ PORTDOCS= ReleaseNotes bacula.pdf developers.pdf kernstodo manual bacula-web
.if defined(WITH_CLIENT_ONLY)
CONFFILES= fd
CONFIGURE_ARGS+= --enable-client-only
PKGDEINSTALL= ${PKGDIR}/pkg-deinstall.client
PKGINSTALL= ${PKGDIR}/pkg-install.client
# Build gnome-console
@ -195,17 +204,22 @@ post-patch:
@${REINPLACE_CMD} -e 's|^all_subdirs = .*|all_subdirs = scripts src\/lib src\/findlib $${subdirs}|g' ${WRKSRC}/Makefile.in
.endif
pre-install:
if [ ! -d "${BACULA_DIR}" ]; then \
${ECHO_CMD} "creating ${BACULA_DIR}" ; \
${MKDIR} ${BACULA_DIR}; \
else \
${ECHO_CMD} "${BACULA_DIR} already exists"; \
fi
.if !defined(WITH_CLIENT_ONLY)
# Extend /etc/services and install UID/GID
@ ${SETENV} PKG_PREFIX=${PREFIX} \
${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
.endif
post-install:
# Migration: move existing bacula.sh to z-bacula.sh to start bacula AFTER DB start
if [ -f ${PREFIX}/etc/rc.d/bacula.sh ]; then \
${MV} ${PREFIX}/etc/rc.d/bacula.sh ${PREFIX}/etc/rc.d/z-bacula.sh; \
fi
if [ -f ${PREFIX}/etc/rc.d/bacula.sh.sample ]; then \
${MV} ${PREFIX}/etc/rc.d/bacula.sh.sample ${PREFIX}/etc/rc.d/z-bacula.sh.sample; \
fi
.if defined(WITH_CLIENT_ONLY)
# Install start script
${INSTALL_SCRIPT} ${WRKSRC}/scripts/bacula ${PREFIX}/etc/rc.d/z-bacula.sh.sample
# Extend only /etc/services
@ ${SETENV} PKG_PREFIX=${PREFIX} \
${SH} ${PKGINSTALL} ${PORTNAME}
@ -233,7 +247,6 @@ post-install:
fi
.endif
# @${CHMOD} a+x ${WRKSRC}/scripts/bacula.man
.if defined(WITH_CLIENT_ONLY)
${INSTALL_MAN} ${WRKSRC}/scripts/bacula.man ${PREFIX}/man/man8/bacula.8
.endif
@ -250,10 +263,8 @@ post-install:
${INSTALL_DATA} ${WRKDIR}/${PORTNAME}-docs-${PORTVERSION}/developers/developers.pdf ${DOCSDIR}
${INSTALL_DATA} ${WRKDIR}/${PORTNAME}-${PORTVERSION}/kernstodo ${DOCSDIR}
.endif
.else
# Extend /etc/services and install UID/GID
@ ${SETENV} PKG_PREFIX=${PREFIX} \
${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
# Install config files and preserve existing ones
${INSTALL_SCRIPT} ${FILESDIR}/chio-bacula ${PREFIX}/sbin
if [ -f ${PREFIX}/etc/bacula-barcodes ]; then \
@ -327,7 +338,7 @@ post-install:
@${ECHO_MSG} "For USB support read the bacula manual!! It could be necessary"
@${ECHO_MSG} "to configure/compile a new kernel!"
@${ECHO_MSG} ""
@${ECHO_MSG} "Look at ${PREFIX}/share/bacula/update_bacula_tables for"
@${ECHO_MSG} "Look at $PREFIX/share/bacula/update_bacula_tables for"
@${ECHO_MSG} "database update procedure. Details can be found in the"
@${ECHO_MSG} "ReleaseNotes"
.endif

View File

@ -1,6 +1,3 @@
MD5 (bacula-1.38.5.tar.gz) = 7f8f0f642b22dc2089ef7b42eb08f826
SHA256 (bacula-1.38.5.tar.gz) = df760f15ba4667fbc1ac2d985b982920eb3a1d25c17ba744bc688f0f10fe47c7
SIZE (bacula-1.38.5.tar.gz) = 1911024
MD5 (bacula-docs-1.38.5.tar.gz) = 11035d75fdd9d10801f0b3dda1f09440
SHA256 (bacula-docs-1.38.5.tar.gz) = f83e60a33ac73eb35fce30ce5a1beecd596024068386a91662b43468bb42b853
SIZE (bacula-docs-1.38.5.tar.gz) = 23183760
MD5 (bacula-1.38.6.tar.gz) = 219382ae85671c8ff13f375b6d9aa079
SHA256 (bacula-1.38.6.tar.gz) = e671f3ff20c97e8392908920ae9ca38f814359c5b85b89625d43df9ad7349ed3
SIZE (bacula-1.38.6.tar.gz) = 1952827

View File

@ -1,52 +1,33 @@
*** scripts/Makefile.in.orig Thu Nov 3 15:33:16 2005
--- scripts/Makefile.in Thu Nov 17 08:31:29 2005
***************
*** 33,43 ****
$(MKDIR) $(DESTDIR)$(mandir)
install: installdirs
! $(INSTALL_SCRIPT) startmysql $(DESTDIR)$(scriptdir)/startmysql
! $(INSTALL_SCRIPT) stopmysql $(DESTDIR)$(scriptdir)/stopmysql
! $(INSTALL_SCRIPT) bconsole $(DESTDIR)$(scriptdir)/bconsole
! $(INSTALL_SCRIPT) gconsole $(DESTDIR)$(scriptdir)/gconsole
! $(INSTALL_SCRIPT) bacula $(DESTDIR)$(scriptdir)/bacula
@if test -f ${DESTDIR}${scriptdir}/mtx-changer; then \
echo " ==> Saving existing mtx-changer to mtx-changer.old"; \
$(MV) -f ${DESTDIR}${scriptdir}/mtx-changer ${DESTDIR}${scriptdir}/mtx-changer.old; \
--- 33,43 ----
$(MKDIR) $(DESTDIR)$(mandir)
install: installdirs
! # $(INSTALL_SCRIPT) startmysql $(DESTDIR)$(scriptdir)/startmysql
! # $(INSTALL_SCRIPT) stopmysql $(DESTDIR)$(scriptdir)/stopmysql
! # $(INSTALL_SCRIPT) bconsole $(DESTDIR)$(scriptdir)/bconsole
! # $(INSTALL_SCRIPT) gconsole $(DESTDIR)$(scriptdir)/gconsole
! $(INSTALL_SCRIPT) bacula $(DESTDIR)$(sysconfdir)/rc.d/z-bacula.sh.sample
@if test -f ${DESTDIR}${scriptdir}/mtx-changer; then \
echo " ==> Saving existing mtx-changer to mtx-changer.old"; \
$(MV) -f ${DESTDIR}${scriptdir}/mtx-changer ${DESTDIR}${scriptdir}/mtx-changer.old; \
***************
*** 48,58 ****
$(MV) -f ${DESTDIR}${scriptdir}/dvd-handler ${DESTDIR}${scriptdir}/dvd-handler.old; \
fi
$(INSTALL_SCRIPT) dvd-handler $(DESTDIR)$(scriptdir)/dvd-handler
! $(INSTALL_DATA) btraceback.gdb $(DESTDIR)$(scriptdir)/btraceback.gdb
! $(INSTALL_DATA) btraceback.dbx $(DESTDIR)$(scriptdir)/btraceback.dbx
! $(INSTALL_SCRIPT) btraceback $(DESTDIR)$(sbindir)/btraceback
! gzip <bacula.man >bacula.8.gz
! $(INSTALL_DATA) bacula.8.gz $(DESTDIR)$(mandir)/bacula.8.gz
@rm -f bacula.8.gz
--- 48,58 ----
$(MV) -f ${DESTDIR}${scriptdir}/dvd-handler ${DESTDIR}${scriptdir}/dvd-handler.old; \
fi
$(INSTALL_SCRIPT) dvd-handler $(DESTDIR)$(scriptdir)/dvd-handler
! # $(INSTALL_DATA) btraceback.gdb $(DESTDIR)$(scriptdir)/btraceback.gdb
! # $(INSTALL_DATA) btraceback.dbx $(DESTDIR)$(scriptdir)/btraceback.dbx
! # $(INSTALL_SCRIPT) btraceback $(DESTDIR)$(sbindir)/btraceback
! # gzip <bacula.man >bacula.8.gz
! $(INSTALL_DATA) bacula.man $(DESTDIR)$(mandir)/bacula.8
@rm -f bacula.8.gz
--- scripts/Makefile.in.orig Sat Mar 25 10:37:41 2006
+++ scripts/Makefile.in Thu Mar 30 13:01:21 2006
@@ -33,14 +33,6 @@
$(MKDIR) $(DESTDIR)$(mandir)
install: installdirs
- $(INSTALL_SCRIPT) startmysql $(DESTDIR)$(scriptdir)/startmysql
- $(INSTALL_SCRIPT) stopmysql $(DESTDIR)$(scriptdir)/stopmysql
- $(INSTALL_SCRIPT) bconsole $(DESTDIR)$(scriptdir)/bconsole
- $(INSTALL_SCRIPT) gconsole $(DESTDIR)$(scriptdir)/gconsole
- $(INSTALL_SCRIPT) bacula $(DESTDIR)$(scriptdir)/bacula
- $(INSTALL_SCRIPT) bacula-ctl-dir $(DESTDIR)$(scriptdir)/bacula-ctl-dir
- $(INSTALL_SCRIPT) bacula-ctl-fd $(DESTDIR)$(scriptdir)/bacula-ctl-fd
- $(INSTALL_SCRIPT) bacula-ctl-sd $(DESTDIR)$(scriptdir)/bacula-ctl-sd
@if test -f ${DESTDIR}${scriptdir}/mtx-changer; then \
echo " ==> Saving existing mtx-changer to mtx-changer.old"; \
$(MV) -f ${DESTDIR}${scriptdir}/mtx-changer ${DESTDIR}${scriptdir}/mtx-changer.old; \
@@ -56,14 +48,7 @@
$(MV) -f ${DESTDIR}${scriptdir}/dvd-handler ${DESTDIR}${scriptdir}/dvd-handler.old; \
fi
$(INSTALL_SCRIPT) dvd-handler $(DESTDIR)$(scriptdir)/dvd-handler
- $(INSTALL_DATA) btraceback.gdb $(DESTDIR)$(scriptdir)/btraceback.gdb
- $(INSTALL_DATA) btraceback.dbx $(DESTDIR)$(scriptdir)/btraceback.dbx
- chmod 0644 $(DESTDIR)$(scriptdir)/btraceback.gdb \
- $(DESTDIR)$(scriptdir)/btraceback.dbx
- $(INSTALL_SCRIPT) btraceback $(DESTDIR)$(sbindir)/btraceback
- gzip <bacula.man >bacula.8.gz
- $(INSTALL_DATA) bacula.8.gz $(DESTDIR)$(mandir)/bacula.8.gz
- @rm -f bacula.8.gz
+ $(INSTALL_DATA) bacula.man $(DESTDIR)$(mandir)/bacula.8
uninstall:

View File

@ -0,0 +1,30 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: utility
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# bacula_dir_enable (bool): Set to NO by default.
# Set it to YES to enable bacula_dir.
# bacula_dir_flags (params): Set params used to start bacula_dir.
#
. %%RC_SUBR%%
name="bacula_dir"
rcvar=${name}_enable
command=%%PREFIX%%/sbin/bacula-dir
pidfile="${bacula_dir_pidfile}"
load_rc_config $name
: ${bacula_dir_enable="NO"}
: ${bacula_dir_flags=" -u bacula -g bacula -v -c %%PREFIX%%/etc/bacula-dir.conf"}
: ${bacula_dir_pidfile="/var/run/bacula-dir.9101.pid"}
run_rc_command "$1"

View File

@ -0,0 +1,30 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: utility
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# bacula_fd_enable (bool): Set to NO by default.
# Set it to YES to enable bacula_fd.
# bacula_fd_flags (params): Set params used to start bacula_fd.
#
. %%RC_SUBR%%
name="bacula_fd"
rcvar=${name}_enable
command=/usr/local/sbin/bacula-fd
pidfile="${bacula_fd_pidfile}"
load_rc_config $name
: ${bacula_fd_enable="NO"}
: ${bacula_fd_flags=" -u root -g wheel -v -c /usr/local/etc/bacula-fd.conf"}
: ${bacula_fd_pidfile="/var/run/bacula-fd.9102.pid"}
run_rc_command "$1"

View File

@ -0,0 +1,30 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: utility
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# bacula_sd_enable (bool): Set to NO by default.
# Set it to YES to enable bacula_sd.
# bacula_sd_flags (params): Set params used to start bacula_sd.
#
. %%RC_SUBR%%
name="bacula_sd"
rcvar=`set_rcvar`
command=/usr/local/sbin/bacula-sd
pidfile="${bacula_sd_pidfile}"
load_rc_config $name
: ${bacula_sd_enable="NO"}
: ${bacula_sd_flags=" -u bacula -g bacula -v -c /usr/local/etc/bacula-sd.conf"}
: ${bacula_sd_pidfile="/var/run/bacula-sd.9103.pid"}
run_rc_command "$1"

View File

@ -16,13 +16,17 @@ bacula-sd 9103/tcp #Bacula storage daemon
fi
case $2 in
POST-INSTALL)
PRE-INSTALL)
# Install UID/GID
USER=bacula
GROUP=${USER}
UID=910
GID=${UID}
if [ ! -d ${BACULA_DIR} ]; then
mkdir -p ${BACULA_DIR}
fi
if pw group show "${GROUP}" 2>/dev/null; then
echo "You already have a group \"${GROUP}\", so I will use it."
else

View File

@ -1,5 +1,4 @@
%%DATADIR%%/query.sql
etc/rc.d/z-bacula.sh.sample
sbin/chio-bacula
sbin/bacula-dir
sbin/bacula-sd
@ -13,6 +12,7 @@ sbin/btape
sbin/dbcheck
sbin/bsmtp
@unexec if cmp -s %D/share/bacula/mtx-changer.old %D/share/bacula/mtx-changer; then rm -f %D/share/bacula/mtx-changer.old; fi
@unexec if cmp -s %D/share/bacula/disk-changer.old %D/share/bacula/disk-changer; then rm -f %D/share/bacula/disk-changer.old; fi
%%DATADIR%%/mtx-changer
%%DATADIR%%/create_bacula_database
%%DATADIR%%/create_%%DBTYPE%%_database
@ -29,8 +29,10 @@ sbin/bsmtp
%%DATADIR%%/delete_catalog_backup
%%DATADIR%%/make_catalog_backup
%%DATADIR%%/dvd-handler
%%DATADIR%%/disk-changer
@dirrm %%DATADIR%%
@unexec /usr/bin/killall badula-sd > /dev/null 2>&1 || true
@unexec /usr/bin/killall bacula-sd > /dev/null 2>&1 || true
@unexec /usr/bin/killall bacula-dir > /dev/null 2>&1 || true
@exec mkdir -p %%BACULA_DIR%%
@dirrmtry %%BACULA_DIR%%

View File

@ -1,7 +1,7 @@
etc/rc.d/z-bacula.sh.sample
sbin/bacula-fd
sbin/bconsole
%%GNOMECONS%%sbin/gnome-console
%%WXCONS%%sbin/wx-console
@unexec /usr/bin/killall badula-fd > /dev/null 2>&1 || true
@exec mkdir -p %%BACULA_DIR%%
@dirrmtry %%BACULA_DIR%%