View | Details | Raw Unified | Return to bug 177331 | Differences between
and this patch

Collapse All | Expand All

(-)bacula-server/Makefile (-22 / +25 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	bacula
4
PORTNAME=	bacula
5
DISTVERSION=	5.2.12
5
DISTVERSION=	5.2.12
6
PORTREVISION?=	0
6
PORTREVISION?=	1
7
CATEGORIES?=	sysutils
7
CATEGORIES?=	sysutils
8
MASTER_SITES=	SF/bacula/bacula/${PORTVERSION}
8
MASTER_SITES=	SF/bacula/bacula/${PORTVERSION}
9
PKGNAMEPREFIX?=	#
9
PKGNAMEPREFIX?=	#
Lines 47-52 Link Here
47
MANCOMPRESSED=	yes
47
MANCOMPRESSED=	yes
48
CONFIGURE_ARGS+=--with-tcp-wrappers=/usr/lib \
48
CONFIGURE_ARGS+=--with-tcp-wrappers=/usr/lib \
49
		--enable-smartalloc \
49
		--enable-smartalloc \
50
		--sysconfdir=${ETCDIR} \
50
		--with-working-dir=${BACULA_DIR} \
51
		--with-working-dir=${BACULA_DIR} \
51
		--with-scriptdir=${PREFIX}/share/${PORTNAME} \
52
		--with-scriptdir=${PREFIX}/share/${PORTNAME} \
52
		--with-readline=yes \
53
		--with-readline=yes \
Lines 173-180 Link Here
173
#	Change $(ECHO) to echo in some Makefile.in files
174
#	Change $(ECHO) to echo in some Makefile.in files
174
	@${REINPLACE_CMD} -e 's|$$(ECHO)|echo|g' ${WRKSRC}/src/filed/Makefile.in \
175
	@${REINPLACE_CMD} -e 's|$$(ECHO)|echo|g' ${WRKSRC}/src/filed/Makefile.in \
175
		${WRKSRC}/src/console/Makefile.in
176
		${WRKSRC}/src/console/Makefile.in
176
#	Default bconsole.conf is ${PREFIX}/etc
177
#	Default bconsole.conf is ${ETCDIR}
177
	@${REINPLACE_CMD} -e 's|./bconsole.conf|${PREFIX}/etc/bconsole.conf|g' ${WRKSRC}/src/console/console.c
178
	@${REINPLACE_CMD} -e 's|./bconsole.conf|${ETCDIR}/bconsole.conf|g' ${WRKSRC}/src/console/console.c
178
	@${REINPLACE_CMD} -e 's|^MAN8 =|MAN8 ?=|g' -e 's|^MAN1 =|MAN1 ?=|g' ${WRKSRC}/manpages/Makefile.in
179
	@${REINPLACE_CMD} -e 's|^MAN8 =|MAN8 ?=|g' -e 's|^MAN1 =|MAN1 ?=|g' ${WRKSRC}/manpages/Makefile.in
179
.if defined(WITH_CLIENT_ONLY)
180
.if defined(WITH_CLIENT_ONLY)
180
# 	In client port only install startup script out of script dir (see below post-install)
181
# 	In client port only install startup script out of script dir (see below post-install)
Lines 191-196 Link Here
191
		${WRKSRC}/src/tools/bpluginfo.c
192
		${WRKSRC}/src/tools/bpluginfo.c
192
.endif
193
.endif
193
194
195
194
.if !target(pre-install)
196
.if !target(pre-install)
195
pre-install:
197
pre-install:
196
	if [ ! -d "${BACULA_DIR}" ]; then \
198
	if [ ! -d "${BACULA_DIR}" ]; then \
Lines 212-224 Link Here
212
	@ ${SETENV} PKG_PREFIX=${PREFIX} \
214
	@ ${SETENV} PKG_PREFIX=${PREFIX} \
213
		${SH} ${PKGINSTALL} ${PORTNAME}
215
		${SH} ${PKGINSTALL} ${PORTNAME}
214
# 	Console stuff
216
# 	Console stuff
215
	if [ -f ${PREFIX}/etc/bconsole.conf.new ]; then \
217
	if [ -f ${ETCDIR}/bconsole.conf.new ]; then \
216
		${ECHO_CMD} "etc/bconsole.conf.new" >> ${TMPPLIST}; \
218
		${ECHO_CMD} "etc/bconsole.conf.new" >> ${TMPPLIST}; \
217
		${CHGRP} bacula ${PREFIX}/etc/bconsole.conf.new; \
219
		${CHGRP} bacula ${ETCDIR}/bconsole.conf.new; \
218
	elif [ -f ${PREFIX}/etc/bconsole.conf ]; then \
220
	elif [ -f ${ETCDIR}/bconsole.conf ]; then \
219
		${MV} ${PREFIX}/etc/bconsole.conf ${PREFIX}/etc/bconsole.conf.sample; \
221
		${MV} ${ETCDIR}/bconsole.conf ${ETCDIR}/bconsole.conf.sample; \
220
		${CHGRP} bacula ${PREFIX}/etc/bconsole.conf.sample; \
222
		${CHGRP} bacula ${ETCDIR}/bconsole.conf.sample; \
221
		${ECHO_CMD} "etc/bconsole.conf.sample" >> ${TMPPLIST}; \
223
		${ECHO_CMD} "etc/bacula/bconsole.conf.sample" >> ${TMPPLIST}; \
222
	fi
224
	fi
223
225
224
#	ensure that users in the bacula group can run bconsole
226
#	ensure that users in the bacula group can run bconsole
Lines 226-247 Link Here
226
.else
228
.else
227
# 	Install config files and preserve existing ones
229
# 	Install config files and preserve existing ones
228
	${INSTALL_SCRIPT} ${FILESDIR}/chio-bacula ${PREFIX}/sbin
230
	${INSTALL_SCRIPT} ${FILESDIR}/chio-bacula ${PREFIX}/sbin
229
	if [ -f ${PREFIX}/etc/bacula-barcodes ]; then \
231
	if [ -f ${ETCDIR}/bacula-barcodes ]; then \
230
		${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${PREFIX}/etc/bacula-barcodes.new ; \
232
		${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${ETCDIR}/bacula-barcodes.new ; \
231
		${ECHO_CMD} "etc/bacula-barcodes.new" >> ${TMPPLIST}; \
233
		${ECHO_CMD} "etc/bacula/bacula-barcodes.new" >> ${TMPPLIST}; \
232
	else \
234
	else \
233
		${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${PREFIX}/etc/bacula-barcodes.samples ; \
235
		${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${ETCDIR}/bacula-barcodes.samples ; \
234
		${ECHO_CMD} "etc/bacula-barcodes.samples" >> ${TMPPLIST}; \
236
		${ECHO_CMD} "etc/bacula/bacula-barcodes.samples" >> ${TMPPLIST}; \
235
	fi
237
	fi
236
# 	chmod of bsmtp program so bacula can use it with dropped down permissions
238
# 	chmod of bsmtp program so bacula can use it with dropped down permissions
237
	${CHMOD} o+x ${PREFIX}/sbin/bsmtp
239
	${CHMOD} o+x ${PREFIX}/sbin/bsmtp
238
	${CHOWN} -R bacula:bacula ${PREFIX}/share/bacula
240
	${CHOWN} -R bacula:bacula ${PREFIX}/share/bacula
239
241
240
#	on a fresh install, the .new suffix is not used
242
#	on a fresh install, the .new suffix is not used
241
	if [ -f ${PREFIX}/etc/bacula-dir.conf.new ]; then \
243
	if [ -f ${ETCDIR}/bacula-dir.conf.new ]; then \
242
		${CHGRP} bacula ${PREFIX}/etc/bacula-dir.conf.new; \
244
		${CHGRP} bacula ${ETCDIR}/bacula-dir.conf.new; \
243
	else \
245
	else \
244
		${CHGRP} bacula ${PREFIX}/etc/bacula-dir.conf; \
246
		${CHGRP} bacula ${ETCDIR}/bacula-dir.conf; \
245
	fi
247
	fi
246
248
247
	${CHGRP} bacula ${PREFIX}/sbin/dbcheck
249
	${CHGRP} bacula ${PREFIX}/sbin/dbcheck
Lines 249-259 Link Here
249
.endif
251
.endif
250
# 	Install leaves existing conf files untouched. Respect this here!
252
# 	Install leaves existing conf files untouched. Respect this here!
251
	for na in ${CONFFILES}; do \
253
	for na in ${CONFFILES}; do \
252
		if [ -f ${PREFIX}/etc/bacula-$$na.conf.new ]; then \
254
		if [ -f ${ETCDIR}/bacula-$$na.conf.new ]; then \
253
			${ECHO_CMD} "etc/bacula-$$na.conf.new" >> ${TMPPLIST}; \
255
			${ECHO_CMD} "etc/bacula/bacula-$$na.conf.new" >> ${TMPPLIST}; \
254
		elif [ -f ${PREFIX}/etc/bacula-$$na.conf ]; then \
256
		elif [ -f ${ETCDIR}/bacula-$$na.conf ]; then \
255
			${MV} ${PREFIX}/etc/bacula-$$na.conf ${PREFIX}/etc/bacula-$$na.conf.sample; \
257
			${MV} ${ETCDIR}/bacula-$$na.conf ${ETCDIR}/bacula-$$na.conf.sample; \
256
			${ECHO_CMD} "etc/bacula-$$na.conf.sample" >> ${TMPPLIST}; \
258
			${ECHO_CMD} "etc/bacula/bacula-$$na.conf.sample" >> ${TMPPLIST}; \
257
		fi; \
259
		fi; \
258
	done
260
	done
259
261
Lines 265-267 Link Here
265
.include "${MASTERDIR}/Makefile.common"
267
.include "${MASTERDIR}/Makefile.common"
266
.endif # -client and -server are defined
268
.endif # -client and -server are defined
267
.include <bsd.port.post.mk>
269
.include <bsd.port.post.mk>
270
(-)bacula-server/Makefile.common (-1 / +1 lines)
Lines 48-54 Link Here
48
do-install:
48
do-install:
49
.if ${PKGNAMESUFFIX} == "-bat"
49
.if ${PKGNAMESUFFIX} == "-bat"
50
# Install config files and preserve existing ones
50
# Install config files and preserve existing ones
51
	${INSTALL_SCRIPT}  ${WRKSRC}/src/qt-console/bat.conf ${PREFIX}/etc/bat.conf.sample
51
	${INSTALL_SCRIPT}  ${WRKSRC}/src/qt-console/bat.conf ${PREFIX}/etc/bacula/bat.conf.sample
52
	${INSTALL_MAN}     ${WRKSRC}/manpages/bat.1          ${PREFIX}/man/man1/
52
	${INSTALL_MAN}     ${WRKSRC}/manpages/bat.1          ${PREFIX}/man/man1/
53
	${INSTALL_PROGRAM} ${WRKSRC}/src/qt-console/bat ${PREFIX}/sbin
53
	${INSTALL_PROGRAM} ${WRKSRC}/src/qt-console/bat ${PREFIX}/sbin
54
.endif
54
.endif
(-)bacula-server/files/bacula-dir.in (-1 / +1 lines)
Lines 23-29 Link Here
23
load_rc_config $name
23
load_rc_config $name
24
24
25
: ${bacula_dir_enable="NO"}
25
: ${bacula_dir_enable="NO"}
26
: ${bacula_dir_flags=" -u bacula -g bacula -v -c %%PREFIX%%/etc/bacula-dir.conf"}
26
: ${bacula_dir_flags=" -u bacula -g bacula -v -c %%PREFIX%%/etc/bacula/bacula-dir.conf"}
27
: ${bacula_dir_pidfile="/var/run/bacula-dir.9101.pid"}
27
: ${bacula_dir_pidfile="/var/run/bacula-dir.9101.pid"}
28
28
29
pidfile="${bacula_dir_pidfile}"
29
pidfile="${bacula_dir_pidfile}"
(-)bacula-server/files/bacula-fd.in (-1 / +1 lines)
Lines 23-29 Link Here
23
load_rc_config $name
23
load_rc_config $name
24
24
25
: ${bacula_fd_enable="NO"}
25
: ${bacula_fd_enable="NO"}
26
: ${bacula_fd_flags=" -u root -g wheel -v -c %%PREFIX%%/etc/bacula-fd.conf"}
26
: ${bacula_fd_flags=" -u root -g wheel -v -c %%PREFIX%%/etc/bacula/bacula-fd.conf"}
27
: ${bacula_fd_pidfile="/var/run/bacula-fd.9102.pid"}
27
: ${bacula_fd_pidfile="/var/run/bacula-fd.9102.pid"}
28
28
29
pidfile="${bacula_fd_pidfile}"
29
pidfile="${bacula_fd_pidfile}"
(-)bacula-server/files/bacula-sd.in (-1 / +1 lines)
Lines 23-29 Link Here
23
load_rc_config $name
23
load_rc_config $name
24
24
25
: ${bacula_sd_enable="NO"}
25
: ${bacula_sd_enable="NO"}
26
: ${bacula_sd_flags=" -u bacula -g bacula -v -c %%PREFIX%%/etc/bacula-sd.conf"}
26
: ${bacula_sd_flags=" -u bacula -g bacula -v -c %%PREFIX%%/etc/bacula/bacula-sd.conf"}
27
: ${bacula_sd_pidfile="/var/run/bacula-sd.9103.pid"}
27
: ${bacula_sd_pidfile="/var/run/bacula-sd.9103.pid"}
28
28
29
pidfile="${bacula_sd_pidfile}"
29
pidfile="${bacula_sd_pidfile}"
(-)bacula-server/files/chio-bacula (-1 / +1 lines)
Lines 39-45 Link Here
39
# This simulates a barcode reader in the changer.
39
# This simulates a barcode reader in the changer.
40
# The labes of the virtual barcode reader are located in the BARCODE_FILE
40
# The labes of the virtual barcode reader are located in the BARCODE_FILE
41
SIMULATE_BARCODE=true
41
SIMULATE_BARCODE=true
42
BARCODE_FILE=/usr/local/etc/bacula-barcodes
42
BARCODE_FILE=/usr/local/etc/bacula/bacula-barcodes
43
MTX=/bin/chio
43
MTX=/bin/chio
44
# Set default values (see case statement below for
44
# Set default values (see case statement below for
45
# free mapping of drive index and tape device
45
# free mapping of drive index and tape device
(-)bacula-server/files/pkg-message.client.in (-1 / +1 lines)
Lines 1-7 Link Here
1
################################################################################
1
################################################################################
2
2
3
NOTE:
3
NOTE:
4
Sample files are installed in %%PREFIX%%/etc:
4
Sample files are installed in %%PREFIX%%/etc/bacula:
5
bconsole.conf.sample, bacula-barcodes.sample, bacula-fd.conf.sample
5
bconsole.conf.sample, bacula-barcodes.sample, bacula-fd.conf.sample
6
6
7
  Please read this file:
7
  Please read this file:
(-)bacula-server/files/pkg-message.server.in (-1 / +1 lines)
Lines 17-23 Link Here
17
Please have a look at it if you want to use an
17
Please have a look at it if you want to use an
18
autochanger. You have to configure the usage in
18
autochanger. You have to configure the usage in
19
19
20
  %%PREFIX%%/etc/bacula-dir.conf
20
  %%PREFIX%%/etc/bacula/bacula-dir.conf
21
21
22
Take care of correct permissions for changer and
22
Take care of correct permissions for changer and
23
tape device (e.g. /dev/ch0 and /dev/n[r]sa0) i.e.
23
tape device (e.g. /dev/ch0 and /dev/n[r]sa0) i.e.

Return to bug 177331