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.3 Date: Mon, 18 May 2020 12:08:51 +0100 Message-ID: <123621A5-6BAA-46CC-9FA7-B268F4937432@ipfire.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7697658810357688077==" List-Id: --===============7697658810357688077== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello Adolf, Thank you for submitting this patch. This looks very good, but there are some smaller problems in it: > On 16 May 2020, at 22:16, Adolf Belka wrote: >=20 > Update bacula from 9.0.6 to 9.6.3 >=20 > - Current version of bacula in ipfire is 9.0.6 and is over two and a half y= ears old. >=20 > - update config options in lfs to include bacula recommended smartalloc opt= ion. >=20 > - Add install, uninstall and update files in src/paks/bacula >=20 > - updated backup/includes to only backup the config file. >=20 > Signed-off-by: Adolf Belka > --- >=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/lfs/bacula b/lfs/bacula > index 8c96c7ba1..878aefa0c 100644 > --- a/lfs/bacula > +++ b/lfs/bacula > @@ -24,17 +24,17 @@ >=20 > include Config >=20 > -VER =3D 9.0.6 > +VER =3D 9.6.3 >=20 > THISAPP =3D bacula-$(VER) > DL_FILE =3D $(THISAPP).tar.gz > -DL_FROM =3D $(URL_IPFIRE) > +DL_FROM =3D https://www.bacula.org/download/10266/ > DIR_APP =3D $(DIR_SRC)/$(THISAPP) > TARGET =3D $(DIR_INFO)/$(THISAPP) > PROG =3D bacula > -PAK_VER =3D 4 > +PAK_VER =3D 1 We always increase the version number, even when VER is bumped, too. So, in this case it would have been 5. There person who merges this can fix t= his for you. I just wanted to let you know for next time. > -DEPS =3D > +DEPS =3D "" We don=E2=80=99t have any =E2=80=9C=E2=80=9D in here any more. >=20 > ##########################################################################= ##### > # Top-level Rules > @@ -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 6d64bc27de773ee0e0ca1d836cbe4008 >=20 > install : $(TARGET) >=20 > @@ -80,12 +80,13 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) > $(UPDATE_AUTOMAKE) > cd $(DIR_APP) && ./configure \ > --prefix=3D/usr \ > + --enable-smartalloc \ > --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..fb45b593b > --- /dev/null > +++ b/src/paks/bacula/install.sh > @@ -0,0 +1,44 @@ > +#!/bin/bash > +##########################################################################= ##=20 > +# # > +# 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 . # > +# # > +##########################################################################= ##=20 > +# > +. /opt/pakfire/lib/functions.sh > +extract_files > + > +if [ -f /etc/bacula/bacula-fd.conf ]; then > + mv /etc/bacula/bacula-fd.conf /etc/bacula/bacula-fd.conf.new > +fi > + > +restore_backup ${NAME} > + > +if [ ! -f /etc/bacula/bacula-fd.conf ]; then > + cp -a /etc/bacula/bacula-fd.conf.new /etc/bacula/bacula-fd.conf > +fi Why are you doing this? The backup should have taken care of this. > + > +# 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 bacula > + > +exit 0 > diff --git a/src/paks/bacula/uninstall.sh b/src/paks/bacula/uninstall.sh > new file mode 100644 > index 000000000..4a97eb3e9 > --- /dev/null > +++ b/src/paks/bacula/uninstall.sh > @@ -0,0 +1,32 @@ > +#!/bin/bash > +##########################################################################= ##=20 > +# # > +# 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 . # > +# # > +##########################################################################= ##=20 > +# > +. /opt/pakfire/lib/functions.sh > +stop_service ${NAME} > +make_backup ${NAME} > +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 > +##########################################################################= ##=20 > +# # > +# 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 . # > +# # > +##########################################################################= ##=20 > +# > +. /opt/pakfire/lib/functions.sh > +./uninstall.sh > +./install.sh >=20 -Michael --===============7697658810357688077==--