From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH] bacula: Update to 9.6.5 Date: Mon, 15 Jun 2020 11:36:48 +0100 Message-ID: <5B7750E6-80B0-4D44-8C59-285C72D63DED@ipfire.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1818748600120603581==" List-Id: --===============1818748600120603581== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello Adolf, Thank you very much for submitting this patch. I am slightly losing track of all the bacula patches, so please help me to un= derstand. The last patch that was sent was n update to 9.6.3, v2: https://lists.ipfire.org/pipermail/development/2020-May/007779.html What has changed since then? Is this just an update from 9.6.3 to 9.6.5? This= won=E2=80=99t merge then if the previous patch is being merged. > On 13 Jun 2020, at 14:43, Adolf Belka wrote: >=20 > - Update bacula from 9.0.6 to 9.6.5 > - Current version of bacula in ipfire is 9.0.6 and is over two and a half y= ears old. > - Update config options in lfs to include bacula recommended smartalloc opt= ion. > - Add install, uninstall and update files in src/paks/bacula > - Updated backup/includes to only backup the config file. You are saying what you have changed, but not why. Please see my questions be= low. > Signed-off-by: Adolf Belka >=20 > --- > config/backup/includes/bacula | 2 +- > config/rootfiles/packages/bacula | 17 +++++++------- > lfs/bacula | 11 ++++----- > src/paks/bacula/install.sh | 38 ++++++++++++++++++++++++++++++++ > src/paks/bacula/uninstall.sh | 33 +++++++++++++++++++++++++++ > src/paks/bacula/update.sh | 26 ++++++++++++++++++++++ > 6 files changed, 113 insertions(+), 14 deletions(-) > create mode 100644 src/paks/bacula/install.sh > create mode 100644 src/paks/bacula/uninstall.sh > create mode 100644 src/paks/bacula/update.sh >=20 > diff --git a/config/backup/includes/bacula b/config/backup/includes/bacula > index 8d5c119f9..0da11db7d 100644 > --- a/config/backup/includes/bacula > +++ b/config/backup/includes/bacula > @@ -1 +1 @@ > -/etc/bacula/ > +/etc/bacula/bacula-fd.conf > diff --git a/config/rootfiles/packages/bacula b/config/rootfiles/packages/b= acula > index 64fb0d2ca..4ee408fc4 100644 > --- a/config/rootfiles/packages/bacula > +++ b/config/rootfiles/packages/bacula > @@ -13,22 +13,23 @@ etc/bacula/bacula-fd.conf > #etc/bacula/btraceback.gdb > #etc/bacula/btraceback.mdb > #etc/bacula/disk-changer > +#etc/bacula/isworm > #etc/bacula/mtx-changer > #etc/bacula/mtx-changer.conf > #etc/bacula/tapealert > etc/rc.d/init.d/bacula > #opt/bacula > #opt/bacula/log > -usr/lib/bpipe-fd.so > -usr/lib/libbac-9.0.6.so > +#usr/lib/bpipe-fd.so > +usr/lib/libbac-9.6.5.so > #usr/lib/libbac.la > -#usr/lib/libbac.so > -usr/lib/libbaccfg-9.0.6.so > +usr/lib/libbac.so > +usr/lib/libbaccfg-9.6.5.so > #usr/lib/libbaccfg.la > -#usr/lib/libbaccfg.so > -usr/lib/libbacfind-9.0.6.so > +usr/lib/libbaccfg.so > +usr/lib/libbacfind-9.6.5.so > #usr/lib/libbacfind.la > -#usr/lib/libbacfind.so > +usr/lib/libbacfind.so > #usr/sbin/bacula > usr/sbin/bacula-fd > #usr/sbin/bbconsjson Bacula is using a horrible method to version their libraries... > @@ -61,4 +62,4 @@ usr/sbin/bacula-fd > #usr/share/man/man8/bwild.8.gz > #usr/share/man/man8/dbcheck.8.gz > #var/bacula > -var/bacula/working > +#var/bacula/working > diff --git a/lfs/bacula b/lfs/bacula > index 8c96c7ba1..b6b0d9cbf 100644 > --- a/lfs/bacula > +++ b/lfs/bacula > @@ -24,15 +24,15 @@ >=20 > include Config >=20 > -VER =3D 9.0.6 > +VER =3D 9.6.5 >=20 > THISAPP =3D bacula-$(VER) > DL_FILE =3D $(THISAPP).tar.gz > -DL_FROM =3D $(URL_IPFIRE) > +DL_FROM =3D https://sourceforge.net/projects/bacula/files/bacula/9.6.5/= bacula-9.6.5.tar.gz > DIR_APP =3D $(DIR_SRC)/$(THISAPP) > TARGET =3D $(DIR_INFO)/$(THISAPP) > PROG =3D bacula > -PAK_VER =3D 4 > +PAK_VER =3D 5 >=20 > DEPS =3D >=20 > @@ -44,7 +44,7 @@ objects =3D $(DL_FILE) >=20 > $(DL_FILE) =3D $(DL_FROM)/$(DL_FILE) >=20 > -$(DL_FILE)_MD5 =3D 9168e398808c42bf290515f60892f643 > +$(DL_FILE)_MD5 =3D e58eb531483de98d0410b33e3ec3d96a >=20 > install : $(TARGET) >=20 > @@ -80,12 +80,13 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) > $(UPDATE_AUTOMAKE) > cd $(DIR_APP) && ./configure \ > --prefix=3D/usr \ > + --enable-smartalloc \ What does this do? > --sysconfdir=3D/etc/bacula \ > --with-working-dir=3D/var/bacula/working \ > --enable-client-only > cd $(DIR_APP) && make $(MAKETUNING) > cd $(DIR_APP) && make install > - ln -s /etc/bacula/bacula-ctl-fd /etc/rc.d/init.d/bacula > + ln -sf /etc/bacula/bacula-ctl-fd /etc/rc.d/init.d/bacula > rm -f /root/.rnd > @rm -rf $(DIR_APP) > @$(POSTBUILD) > diff --git a/src/paks/bacula/install.sh b/src/paks/bacula/install.sh > new file mode 100644 > index 000000000..49aef9379 > --- /dev/null > +++ b/src/paks/bacula/install.sh > @@ -0,0 +1,38 @@ > +#!/bin/bash > +##########################################################################= ## > +# # > +# This file is part of the IPFire Firewall. = # > +# # > +# IPFire is free software; you can redistribute it and/or modify = # > +# it under the terms of the GNU General Public License as published by = # > +# the Free Software Foundation; either version 2 of the License, or = # > +# (at your option) any later version. = # > +# # > +# IPFire is distributed in the hope that it will be useful, = # > +# but WITHOUT ANY WARRANTY; without even the implied warranty of = # > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # > +# GNU General Public License for more details. = # > +# # > +# You should have received a copy of the GNU General Public License = # > +# along with IPFire; if not, write to the Free Software = # > +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA= # > +# # > +# Copyright (C) 2007 IPFire-Team . = # > +# # > +##########################################################################= ## > +# > +. /opt/pakfire/lib/functions.sh > +extract_files > +if [ -f /etc/bacula/bacula-fd.conf ]; then > + cp /etc/bacula/bacula-fd.conf /etc/bacula/bacula-fd.conf.new > +fi I thought I have asked this before: Why is this file being moved? We should have a backup taking care of backing = up configuration files. > +if [ ! -d /var/bacula/working ]; then > + mkdir -p /var/bacula/working > +fi > +restore_backup ${NAME} > +# create startlinks > +ln -sf ../init.d/bacula /etc/rc.d/rc0.d/K35bacula > +ln -sf ../init.d/bacula /etc/rc.d/rc3.d/S65bacula > +ln -sf ../init.d/bacula /etc/rc.d/rc6.d/K35bacula > +start_service ${NAME} > +exit 0 > diff --git a/src/paks/bacula/uninstall.sh b/src/paks/bacula/uninstall.sh > new file mode 100644 > index 000000000..762bb103c > --- /dev/null > +++ b/src/paks/bacula/uninstall.sh > @@ -0,0 +1,33 @@ > +#!/bin/bash > +##########################################################################= ## > +# # > +# This file is part of the IPFire Firewall. = # > +# # > +# IPFire is free software; you can redistribute it and/or modify = # > +# it under the terms of the GNU General Public License as published by = # > +# the Free Software Foundation; either version 2 of the License, or = # > +# (at your option) any later version. = # > +# # > +# IPFire is distributed in the hope that it will be useful, = # > +# but WITHOUT ANY WARRANTY; without even the implied warranty of = # > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # > +# GNU General Public License for more details. = # > +# # > +# You should have received a copy of the GNU General Public License = # > +# along with IPFire; if not, write to the Free Software = # > +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA= # > +# # > +# Copyright (C) 2007 IPFire-Team . = # > +# # > +##########################################################################= ## > +# > +. /opt/pakfire/lib/functions.sh > +stop_service ${NAME} > +make_backup ${NAME} > +# Remove bacula-fd.conf.new file and /var/bacula/ directory > +rm -rf /etc/bacula/bacula-fd.conf.new > +rm -r /var/bacula I suppose this is all related to above. Why is /var/bacula being deleted? What would be in that directory? > +remove_files > +# Remove all start links. > +rm -rf /etc/rc.d/rc*.d/*bacula > +exit 0 > diff --git a/src/paks/bacula/update.sh b/src/paks/bacula/update.sh > new file mode 100644 > index 000000000..89c40d0d7 > --- /dev/null > +++ b/src/paks/bacula/update.sh > @@ -0,0 +1,26 @@ > +#!/bin/bash > +##########################################################################= ## > +# # > +# This file is part of the IPFire Firewall. = # > +# # > +# IPFire is free software; you can redistribute it and/or modify = # > +# it under the terms of the GNU General Public License as published by = # > +# the Free Software Foundation; either version 2 of the License, or = # > +# (at your option) any later version. = # > +# # > +# IPFire is distributed in the hope that it will be useful, = # > +# but WITHOUT ANY WARRANTY; without even the implied warranty of = # > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # > +# GNU General Public License for more details. = # > +# # > +# You should have received a copy of the GNU General Public License = # > +# along with IPFire; if not, write to the Free Software = # > +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA= # > +# # > +# Copyright (C) 2007 IPFire-Team . = # > +# # > +##########################################################################= ## > +# > +. /opt/pakfire/lib/functions.sh > +./uninstall.sh > +./install.sh > --=20 > 2.27.0 >=20 I am looking forward to be able to merge this soon and I am happy that you ar= e taking care of this add-on which has been neglected. :) Best, -Michael --===============1818748600120603581==--