diff options
author | lkoeller <lkoeller@FreeBSD.org> | 2004-05-11 03:26:29 +0800 |
---|---|---|
committer | lkoeller <lkoeller@FreeBSD.org> | 2004-05-11 03:26:29 +0800 |
commit | 399f44ccd8a5e21bd8ed904db3ab126fb9e78e08 (patch) | |
tree | 1b39968ca5961aa80f634b656fc72819387c235b /sysutils | |
parent | 4ffbf0d37726e044ed179af811c4458eb50eaf00 (diff) | |
download | freebsd-ports-graphics-399f44ccd8a5e21bd8ed904db3ab126fb9e78e08.tar.gz freebsd-ports-graphics-399f44ccd8a5e21bd8ed904db3ab126fb9e78e08.tar.zst freebsd-ports-graphics-399f44ccd8a5e21bd8ed904db3ab126fb9e78e08.zip |
o) Include ReleaseNotes in documentation
o) Fix problem with remove of configuration files
o) Some minor changes
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/bacula-server/Makefile | 43 | ||||
-rw-r--r-- | sysutils/bacula-server/files/chio-bacula | 24 | ||||
-rw-r--r-- | sysutils/bacula-server/files/patch-src-console-Makefile.in | 19 | ||||
-rw-r--r-- | sysutils/bacula-server/pkg-plist | 2 | ||||
-rw-r--r-- | sysutils/bacula/Makefile | 43 | ||||
-rw-r--r-- | sysutils/bacula/files/chio-bacula | 24 | ||||
-rw-r--r-- | sysutils/bacula/files/patch-src-console-Makefile.in | 19 | ||||
-rw-r--r-- | sysutils/bacula/pkg-plist | 2 |
8 files changed, 132 insertions, 44 deletions
diff --git a/sysutils/bacula-server/Makefile b/sysutils/bacula-server/Makefile index f6bdf77b20a..9dc72590879 100644 --- a/sysutils/bacula-server/Makefile +++ b/sysutils/bacula-server/Makefile @@ -7,7 +7,7 @@ PORTNAME= bacula PORTVERSION= 1.34.2 -#PORTREVISION= 1 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= bacula @@ -96,18 +96,20 @@ PLIST_SUB+= DBTYPE=${DBTYPE} PLIST_SUB+= SERVER="" .endif -PORTDOCS= bacula.pdf html-manual/* +PORTDOCS= bacula.pdf ReleaseNotes html-manual/* pre-everything:: .if !defined(WITH_CLIENT_ONLY) @${ECHO_MSG} "=======> ATTENTION <=======" @${ECHO_MSG} "######################################################" - @${ECHO_MSG} "===> READ the file ReleaseNotes for upgrade procedure!" + @${ECHO_MSG} "===> Please read the file" + @${ECHO_MSG} "===> ${DOCSDIR}/ReleaseNotes" + @${ECHO_MSG} "===> for the upgrade procedure!" @${ECHO_MSG} "===> IF YOU IGNORE, it is possible to !! LOOSE DATA !!" @${ECHO_MSG} "######################################################" @${ECHO_MSG} "===> Note that there is a pthreads problem, which leads to the loss of 500kB" @${ECHO_MSG} "===> of data at the end of an tape. This is corrected in newer versinon of FreeBSD" - @${ECHO_MSG} "===> READ ${WRKDIR}/bacula-1.34.1/platforms/freebsd/pthreads-fix.txt" + @${ECHO_MSG} "===> READ ${WRKSRC}/platforms/freebsd/pthreads-fix.txt" @${ECHO_MSG} "" @${ECHO_MSG} "You may use the following build options (or make config):" @${ECHO_MSG} "" @@ -147,26 +149,29 @@ post-install: ${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${PREFIX}/etc/bacula-barcodes.new ; \ ${ECHO_CMD} "etc/bacula-barcodes.new" >> ${TMPPLIST}; \ else \ - ${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${PREFIX}/etc ; \ - ${ECHO_CMD} "etc/bacula-barcodes" >> ${TMPPLIST}; \ + ${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${PREFIX}/etc/bacula-barcodes.samples ; \ + ${ECHO_CMD} "etc/bacula-barcodes.samples" >> ${TMPPLIST}; \ fi - if [ -f ${PREFIX}/etc/console.conf.new ]; then \ + if [ -f ${PREFIX}/etc/bconsole.conf.new ]; then \ ${ECHO_CMD} "etc/console.conf.new" >> ${TMPPLIST}; \ - elif [ -f ${PREFIX}/etc/console.conf ]; then \ - ${ECHO_CMD} "etc/console.conf" >> ${TMPPLIST}; \ + elif [ -f ${PREFIX}/etc/bconsole.conf ]; then \ + ${MV} ${PREFIX}/etc/bconsole.conf ${PREFIX}/etc/bconsole.conf.sample; \ + ${ECHO_CMD} "etc/bconsole.conf.sample" >> ${TMPPLIST}; \ fi .if defined(WITH_WXCONSOLE) if [ -f ${PREFIX}/etc/wx-console.conf.new ]; then \ ${ECHO_CMD} "etc/wx-console.conf.new" >> ${TMPPLIST}; \ elif [ -f ${PREFIX}/etc/wx-console.conf ]; then \ - ${ECHO_CMD} "etc/wx-console.conf" >> ${TMPPLIST}; \ + ${MV} ${PREFIX}/etc/wx-console.conf ${PREFIX}/etc/wx-console.conf.sample; + ${ECHO_CMD} "etc/wx-console.conf.sample" >> ${TMPPLIST}; \ fi .endif .if defined(WITH_GNOMECONSOLE) if [ -f ${PREFIX}/etc/gnome-console.conf.new ]; then \ ${ECHO_CMD} "etc/gnome-console.conf.new" >> ${TMPPLIST}; \ elif [ -f ${PREFIX}/etc/gnome-console.conf ]; then \ - ${ECHO_CMD} "etc/gnome-console.conf" >> ${TMPPLIST}; \ + ${MV} ${PREFIX}/etc/gnome-console.conf ${PREFIX}/etc/gnome-console.conf.sample; + ${ECHO_CMD} "etc/gnome-console.conf.sample" >> ${TMPPLIST}; \ fi .endif # chmod of bsmtp program so bacula can use it with dropped down permissions ${CHMOD} o+x ${PREFIX}/sbin/bsmtp @@ -177,21 +182,26 @@ post-install: 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 \ - ${ECHO_CMD} "etc/bacula-$$na.conf" >> ${TMPPLIST}; \ + ${MV} ${PREFIX}/etc/bacula-$$na.conf ${PREFIX}/etc/bacula-$$na.sample; + ${ECHO_CMD} "etc/bacula-$$na.conf.sample" >> ${TMPPLIST}; \ fi \ done; \ .if !defined(NOPORTDOCS) - ${MKDIR} ${DOCSDIR}/html-manual ${INSTALL_DATA} ${WRKSRC}/doc/bacula.pdf ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/ReleaseNotes ${DOCSDIR} + ${MKDIR} ${DOCSDIR}/html-manual cd ${WRKSRC}/doc && ${FIND} html-manual | \ ${CPIO} -pdm -L -R root:wheel ${DOCSDIR} .endif # Inform user after install about important things .... -.if !defined(WITH_CLIENT_ONLY) - @${ECHO_MSG} "*******************************************************" + @${ECHO_MSG} "*********************************************************************" @${ECHO_MSG} "NOTE:" + @${ECHO_MSG} "Sample files are installed in ${PREFIX}/etc:" + @${ECHO_MSG} " bconsole.conf.sample, bacula-barcodes.sample, bacula-fd.conf.sample" +.if !defined(WITH_CLIENT_ONLY) + @${ECHO_MSG} " bacula-sd.conf.sample, bacula-dir.conf.sample" @${ECHO_MSG} "" @${ECHO_MSG} "An auto-changer manipulation script based on FreeBSDs" @${ECHO_MSG} "chio command is included and installed at" @@ -220,8 +230,7 @@ post-install: @${ECHO_MSG} "It is also important that all the scripts accessed" @${ECHO_MSG} "by RunBeforeJob and RunAfterJob could be executed by" @${ECHO_MSG} "the user bacula, too." - @${ECHO_MSG} "" - @${ECHO_MSG} "*******************************************************" .endif + @${ECHO_MSG} "*********************************************************************" .include <bsd.port.post.mk> diff --git a/sysutils/bacula-server/files/chio-bacula b/sysutils/bacula-server/files/chio-bacula index 5ac65fec38c..c3a4554a215 100644 --- a/sysutils/bacula-server/files/chio-bacula +++ b/sysutils/bacula-server/files/chio-bacula @@ -32,7 +32,8 @@ BARCODE_FILE=/usr/local/etc/bacula-barcodes MTX=/bin/chio # Set default values (see case statement below for # free mapping of drive index and tape device -TAPE=/dev/nrsa0 +# We have a double drive Qualstar where drive 1 is the default bacula drive +TAPE=/dev/nrsa1 DRIVE=0 # Time to wait for (un)loading SLEEP=20 @@ -143,8 +144,23 @@ case ${COMMAND} in # echo "Request loaded" ${MTX} -f ${CHANGER} status -S > /tmp/mtx.$$ rtn=$? - cat /tmp/mtx.$$ | grep "^drive ${DRIVE}: <FULL> .*slot" | awk '{print $6+1}' | tr -d ">" - cat /tmp/mtx.$$ | grep "^drive ${DRIVE}: .* source: <>" | awk "{print 0}" + # Try to get chio slot source from drive entry + SLOT=$(cat /tmp/mtx.$$ | grep "^drive ${DRIVE}: <FULL> .*slot" | awk '{print $6+1}' | tr -d ">") + if [ -z "$SLOT" ]; then + # This handles the case a source slot is not available (power on + # of the changer with a drive loaded) and all other slots are + # occupied with a tape! + SLOT=$(cat /tmp/mtx.$$ | grep "^slot .*: <ACCESS>" | awk '{print $2+1}') + if [ -z "$SLOT" ]; then + echo 0 + else + echo $SLOT + fi + else + echo $SLOT + fi + # All tapes are in the slots + #cat /tmp/mtx.$$ | grep "^drive ${DRIVE}: .* source: <>" | awk "{print 0}" rm -f /tmp/mtx.$$ exit $rtn ;; @@ -152,7 +168,7 @@ case ${COMMAND} in slots) # echo "Request slots" ${MTX} -f ${CHANGER} status | grep "^slot " | tail -1 | awk '{print $2+1}' | tr -d ":" - ;; + ;; *) usage diff --git a/sysutils/bacula-server/files/patch-src-console-Makefile.in b/sysutils/bacula-server/files/patch-src-console-Makefile.in new file mode 100644 index 00000000000..e31efc2e2a9 --- /dev/null +++ b/sysutils/bacula-server/files/patch-src-console-Makefile.in @@ -0,0 +1,19 @@ +*** src/console/Makefile.in.org Sat Apr 3 20:40:26 2004 +--- src/console/Makefile.in Sat May 8 14:01:49 2004 +*************** +*** 89,95 **** + destconf=$$srcconf; \ + if test -f ${DESTDIR}${sysconfdir}/console.conf; then \ + echo "Existing console.conf moved to bconsole.conf"; \ +! @$(MV) ${DESTDIR}${sysconfdir}/console.conf ${DESTDIR}${sysconfdir}/bconsole.conf; \ + destconf=$$srcconf.new; \ + fi; \ + fi; \ +--- 89,95 ---- + destconf=$$srcconf; \ + if test -f ${DESTDIR}${sysconfdir}/console.conf; then \ + echo "Existing console.conf moved to bconsole.conf"; \ +! $(MV) ${DESTDIR}${sysconfdir}/console.conf ${DESTDIR}${sysconfdir}/bconsole.conf; \ + destconf=$$srcconf.new; \ + fi; \ + fi; \ diff --git a/sysutils/bacula-server/pkg-plist b/sysutils/bacula-server/pkg-plist index 4a701526018..c04636ba87a 100644 --- a/sysutils/bacula-server/pkg-plist +++ b/sysutils/bacula-server/pkg-plist @@ -9,7 +9,7 @@ etc/rc.d/fd.sh.sample %%SERVER%%sbin/bls %%SERVER%%sbin/bscan %%SERVER%%sbin/btape -%%SERVER%%sbin/bconsole +sbin/bconsole %%WXCONS%%sbin/wx-console %%GNOMECONS%%sbin/gnome-console %%SERVER%%sbin/dbcheck diff --git a/sysutils/bacula/Makefile b/sysutils/bacula/Makefile index f6bdf77b20a..9dc72590879 100644 --- a/sysutils/bacula/Makefile +++ b/sysutils/bacula/Makefile @@ -7,7 +7,7 @@ PORTNAME= bacula PORTVERSION= 1.34.2 -#PORTREVISION= 1 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= bacula @@ -96,18 +96,20 @@ PLIST_SUB+= DBTYPE=${DBTYPE} PLIST_SUB+= SERVER="" .endif -PORTDOCS= bacula.pdf html-manual/* +PORTDOCS= bacula.pdf ReleaseNotes html-manual/* pre-everything:: .if !defined(WITH_CLIENT_ONLY) @${ECHO_MSG} "=======> ATTENTION <=======" @${ECHO_MSG} "######################################################" - @${ECHO_MSG} "===> READ the file ReleaseNotes for upgrade procedure!" + @${ECHO_MSG} "===> Please read the file" + @${ECHO_MSG} "===> ${DOCSDIR}/ReleaseNotes" + @${ECHO_MSG} "===> for the upgrade procedure!" @${ECHO_MSG} "===> IF YOU IGNORE, it is possible to !! LOOSE DATA !!" @${ECHO_MSG} "######################################################" @${ECHO_MSG} "===> Note that there is a pthreads problem, which leads to the loss of 500kB" @${ECHO_MSG} "===> of data at the end of an tape. This is corrected in newer versinon of FreeBSD" - @${ECHO_MSG} "===> READ ${WRKDIR}/bacula-1.34.1/platforms/freebsd/pthreads-fix.txt" + @${ECHO_MSG} "===> READ ${WRKSRC}/platforms/freebsd/pthreads-fix.txt" @${ECHO_MSG} "" @${ECHO_MSG} "You may use the following build options (or make config):" @${ECHO_MSG} "" @@ -147,26 +149,29 @@ post-install: ${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${PREFIX}/etc/bacula-barcodes.new ; \ ${ECHO_CMD} "etc/bacula-barcodes.new" >> ${TMPPLIST}; \ else \ - ${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${PREFIX}/etc ; \ - ${ECHO_CMD} "etc/bacula-barcodes" >> ${TMPPLIST}; \ + ${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${PREFIX}/etc/bacula-barcodes.samples ; \ + ${ECHO_CMD} "etc/bacula-barcodes.samples" >> ${TMPPLIST}; \ fi - if [ -f ${PREFIX}/etc/console.conf.new ]; then \ + if [ -f ${PREFIX}/etc/bconsole.conf.new ]; then \ ${ECHO_CMD} "etc/console.conf.new" >> ${TMPPLIST}; \ - elif [ -f ${PREFIX}/etc/console.conf ]; then \ - ${ECHO_CMD} "etc/console.conf" >> ${TMPPLIST}; \ + elif [ -f ${PREFIX}/etc/bconsole.conf ]; then \ + ${MV} ${PREFIX}/etc/bconsole.conf ${PREFIX}/etc/bconsole.conf.sample; \ + ${ECHO_CMD} "etc/bconsole.conf.sample" >> ${TMPPLIST}; \ fi .if defined(WITH_WXCONSOLE) if [ -f ${PREFIX}/etc/wx-console.conf.new ]; then \ ${ECHO_CMD} "etc/wx-console.conf.new" >> ${TMPPLIST}; \ elif [ -f ${PREFIX}/etc/wx-console.conf ]; then \ - ${ECHO_CMD} "etc/wx-console.conf" >> ${TMPPLIST}; \ + ${MV} ${PREFIX}/etc/wx-console.conf ${PREFIX}/etc/wx-console.conf.sample; + ${ECHO_CMD} "etc/wx-console.conf.sample" >> ${TMPPLIST}; \ fi .endif .if defined(WITH_GNOMECONSOLE) if [ -f ${PREFIX}/etc/gnome-console.conf.new ]; then \ ${ECHO_CMD} "etc/gnome-console.conf.new" >> ${TMPPLIST}; \ elif [ -f ${PREFIX}/etc/gnome-console.conf ]; then \ - ${ECHO_CMD} "etc/gnome-console.conf" >> ${TMPPLIST}; \ + ${MV} ${PREFIX}/etc/gnome-console.conf ${PREFIX}/etc/gnome-console.conf.sample; + ${ECHO_CMD} "etc/gnome-console.conf.sample" >> ${TMPPLIST}; \ fi .endif # chmod of bsmtp program so bacula can use it with dropped down permissions ${CHMOD} o+x ${PREFIX}/sbin/bsmtp @@ -177,21 +182,26 @@ post-install: 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 \ - ${ECHO_CMD} "etc/bacula-$$na.conf" >> ${TMPPLIST}; \ + ${MV} ${PREFIX}/etc/bacula-$$na.conf ${PREFIX}/etc/bacula-$$na.sample; + ${ECHO_CMD} "etc/bacula-$$na.conf.sample" >> ${TMPPLIST}; \ fi \ done; \ .if !defined(NOPORTDOCS) - ${MKDIR} ${DOCSDIR}/html-manual ${INSTALL_DATA} ${WRKSRC}/doc/bacula.pdf ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/ReleaseNotes ${DOCSDIR} + ${MKDIR} ${DOCSDIR}/html-manual cd ${WRKSRC}/doc && ${FIND} html-manual | \ ${CPIO} -pdm -L -R root:wheel ${DOCSDIR} .endif # Inform user after install about important things .... -.if !defined(WITH_CLIENT_ONLY) - @${ECHO_MSG} "*******************************************************" + @${ECHO_MSG} "*********************************************************************" @${ECHO_MSG} "NOTE:" + @${ECHO_MSG} "Sample files are installed in ${PREFIX}/etc:" + @${ECHO_MSG} " bconsole.conf.sample, bacula-barcodes.sample, bacula-fd.conf.sample" +.if !defined(WITH_CLIENT_ONLY) + @${ECHO_MSG} " bacula-sd.conf.sample, bacula-dir.conf.sample" @${ECHO_MSG} "" @${ECHO_MSG} "An auto-changer manipulation script based on FreeBSDs" @${ECHO_MSG} "chio command is included and installed at" @@ -220,8 +230,7 @@ post-install: @${ECHO_MSG} "It is also important that all the scripts accessed" @${ECHO_MSG} "by RunBeforeJob and RunAfterJob could be executed by" @${ECHO_MSG} "the user bacula, too." - @${ECHO_MSG} "" - @${ECHO_MSG} "*******************************************************" .endif + @${ECHO_MSG} "*********************************************************************" .include <bsd.port.post.mk> diff --git a/sysutils/bacula/files/chio-bacula b/sysutils/bacula/files/chio-bacula index 5ac65fec38c..c3a4554a215 100644 --- a/sysutils/bacula/files/chio-bacula +++ b/sysutils/bacula/files/chio-bacula @@ -32,7 +32,8 @@ BARCODE_FILE=/usr/local/etc/bacula-barcodes MTX=/bin/chio # Set default values (see case statement below for # free mapping of drive index and tape device -TAPE=/dev/nrsa0 +# We have a double drive Qualstar where drive 1 is the default bacula drive +TAPE=/dev/nrsa1 DRIVE=0 # Time to wait for (un)loading SLEEP=20 @@ -143,8 +144,23 @@ case ${COMMAND} in # echo "Request loaded" ${MTX} -f ${CHANGER} status -S > /tmp/mtx.$$ rtn=$? - cat /tmp/mtx.$$ | grep "^drive ${DRIVE}: <FULL> .*slot" | awk '{print $6+1}' | tr -d ">" - cat /tmp/mtx.$$ | grep "^drive ${DRIVE}: .* source: <>" | awk "{print 0}" + # Try to get chio slot source from drive entry + SLOT=$(cat /tmp/mtx.$$ | grep "^drive ${DRIVE}: <FULL> .*slot" | awk '{print $6+1}' | tr -d ">") + if [ -z "$SLOT" ]; then + # This handles the case a source slot is not available (power on + # of the changer with a drive loaded) and all other slots are + # occupied with a tape! + SLOT=$(cat /tmp/mtx.$$ | grep "^slot .*: <ACCESS>" | awk '{print $2+1}') + if [ -z "$SLOT" ]; then + echo 0 + else + echo $SLOT + fi + else + echo $SLOT + fi + # All tapes are in the slots + #cat /tmp/mtx.$$ | grep "^drive ${DRIVE}: .* source: <>" | awk "{print 0}" rm -f /tmp/mtx.$$ exit $rtn ;; @@ -152,7 +168,7 @@ case ${COMMAND} in slots) # echo "Request slots" ${MTX} -f ${CHANGER} status | grep "^slot " | tail -1 | awk '{print $2+1}' | tr -d ":" - ;; + ;; *) usage diff --git a/sysutils/bacula/files/patch-src-console-Makefile.in b/sysutils/bacula/files/patch-src-console-Makefile.in new file mode 100644 index 00000000000..e31efc2e2a9 --- /dev/null +++ b/sysutils/bacula/files/patch-src-console-Makefile.in @@ -0,0 +1,19 @@ +*** src/console/Makefile.in.org Sat Apr 3 20:40:26 2004 +--- src/console/Makefile.in Sat May 8 14:01:49 2004 +*************** +*** 89,95 **** + destconf=$$srcconf; \ + if test -f ${DESTDIR}${sysconfdir}/console.conf; then \ + echo "Existing console.conf moved to bconsole.conf"; \ +! @$(MV) ${DESTDIR}${sysconfdir}/console.conf ${DESTDIR}${sysconfdir}/bconsole.conf; \ + destconf=$$srcconf.new; \ + fi; \ + fi; \ +--- 89,95 ---- + destconf=$$srcconf; \ + if test -f ${DESTDIR}${sysconfdir}/console.conf; then \ + echo "Existing console.conf moved to bconsole.conf"; \ +! $(MV) ${DESTDIR}${sysconfdir}/console.conf ${DESTDIR}${sysconfdir}/bconsole.conf; \ + destconf=$$srcconf.new; \ + fi; \ + fi; \ diff --git a/sysutils/bacula/pkg-plist b/sysutils/bacula/pkg-plist index 4a701526018..c04636ba87a 100644 --- a/sysutils/bacula/pkg-plist +++ b/sysutils/bacula/pkg-plist @@ -9,7 +9,7 @@ etc/rc.d/fd.sh.sample %%SERVER%%sbin/bls %%SERVER%%sbin/bscan %%SERVER%%sbin/btape -%%SERVER%%sbin/bconsole +sbin/bconsole %%WXCONS%%sbin/wx-console %%GNOMECONS%%sbin/gnome-console %%SERVER%%sbin/dbcheck |