Message ID | be4fb38c-9eb0-7cb6-c797-92f4537ded86@gmail.com |
---|---|
State | Superseded |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 49PdQ949fQz3xQn for <patchwork@web04.haj.ipfire.org>; Sat, 16 May 2020 21:17:05 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 49PdQ75kjHz1DB; Sat, 16 May 2020 21:17:03 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 49PdQ72yLZz2xbq; Sat, 16 May 2020 21:17:03 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 49PdQ46xV2z2xB8 for <development@lists.ipfire.org>; Sat, 16 May 2020 21:17:00 +0000 (UTC) Received: from smtpq3.tb.mail.iss.as9143.net (smtpq3.tb.mail.iss.as9143.net [212.54.42.166]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 49PdQ2141hz1DB for <development@lists.ipfire.org>; Sat, 16 May 2020 21:16:58 +0000 (UTC) Received: from [212.54.42.137] (helo=smtp6.tb.mail.iss.as9143.net) by smtpq3.tb.mail.iss.as9143.net with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ahb.ipfire@gmail.com>) id 1ja4Az-0001de-3G for development@lists.ipfire.org; Sat, 16 May 2020 23:16:57 +0200 Received: from j103033.upc-j.chello.nl ([24.132.103.33] helo=rhea.saturn.pimb.org) by smtp6.tb.mail.iss.as9143.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from <ahb.ipfire@gmail.com>) id 1ja4Ay-0090Gc-Op for development@lists.ipfire.org; Sat, 16 May 2020 23:16:56 +0200 Received: from [192.168.26.32] (hyperion.saturn.pimb.org [192.168.26.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by rhea.saturn.pimb.org (Postfix) with ESMTPSA id 4A0EB3E2B for <development@lists.ipfire.org>; Sat, 16 May 2020 23:16:55 +0200 (CEST) From: Adolf Belka <ahb.ipfire@gmail.com> Subject: [PATCH] bacula: Update to 9.6.3 To: development@lists.ipfire.org Message-ID: <be4fb38c-9eb0-7cb6-c797-92f4537ded86@gmail.com> Date: Sat, 16 May 2020 23:16:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-SourceIP: 24.132.103.33 X-Authenticated-Sender: adolf.belka@ziggo.nl (via SMTP) X-Ziggo-spambar: / X-Ziggo-spamscore: 0.0 X-Ziggo-spamreport: CMAE Analysis: v=2.3 cv=dcIbIUfe c=1 sm=1 tr=0 a=N0UC3/faf55XGTeY5t7zSQ==:17 a=9+rZDBEiDlHhcck0kWbJtElFXBc=:19 a=IkcTkHD0fZMA:10 a=x7bEGLp0ZPQA:10 a=6yxbeI8x3IIA:10 a=sTwFKg_x9MkA:10 a=pGLkceISAAAA:8 a=yhoIxFJXAAAA:8 a=2jW0gPRiAAAA:8 a=bLKUoSeGhUWTyoL6IcgA:9 a=QEXdDO2ut3YA:10 a=4iAlMDuT8H_mAVjAB4g1:22 a=3VCx8bP5vPwQSM_nLb0P:22 X-Ziggo-Spam-Status: No X-Spam-Status: No X-Spam-Flag: No ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1589663818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r0boEnemoE842KJAZg3TVneO72Wb0JtrZdpho1cs9KE=; b=LGlrZ8yINUVaEX2wxkkmvm+cHtIJXBKDH+JVC8KOXbDOpCVa5VlwsIOTthWwEWwnGHvhrc 6obyRWwjapbORPA/tP79XnHyOGGZqeg2J2/N3v2rrfmPzZJG0QLtsiUd8TGdao+hRGrXnC /ybjRnJiByBlcOW/hG6dM7miG0FerHBupgmFen2SojV/QRzBhkmqYEtOb9JlUKbZwIoxxZ lv68kq/6sJiYPlsi/6/as3ic7kE7g3Ytb4GACsAE6vwABA2A1exb40VoqOAh6Wg+BLGbFK 8hPt3HZuVZhmXNAgWFW+rtYCkCptcbsFxftT47VlVuZNWKKN6gTpsDBMM00uDA== ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1589663818; a=rsa-sha256; cv=none; b=ZYFL0mBfwcHXyj0hOWcFvPIiMmKt+XmdBPJfpyWxfn461Sniuk72QHbBSb4c8TMVmwE3gQ fYBaF6/KxAtuj5JK9MbzVRzfpAJcR90dckGLzCQOw5z+sE8Slhgl+qaCCpSv8z9GsebIKf rWrDo7ETjPurMCnvk28xjkeoQhfisEK88FfBpLyleyC76n8RcPGsV9UlUNAELFyrcmnXfZ 9iPvuC6dGRu1AJwUiRP/5Av47tykXtBTwv66Nrcv4hCA3c7i+qztMpozsPeZqG6XakKo7m v0scxEpUC13DtCoqlR0rKbyUMGH/ceFQCPn3arFCH3+XAAq/J2YO7Rtp+blrHw== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=none; spf=softfail (mail01.ipfire.org: 212.54.42.166 is neither permitted nor denied by domain of ahbipfire@gmail.com) smtp.mailfrom=ahbipfire@gmail.com Authentication-Results: mail01.ipfire.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mail01.ipfire.org: 212.54.42.166 is neither permitted nor denied by domain of ahbipfire@gmail.com) smtp.mailfrom=ahbipfire@gmail.com X-Rspamd-Queue-Id: 49PdQ2141hz1DB X-Spamd-Result: default: False [2.83 / 11.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; BAYES_SPAM(3.00)[100.00%]; RWL_MAILSPIKE_GOOD(0.00)[212.54.42.166:from]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; ARC_SIGNED(0.00)[i=1]; R_SPF_SOFTFAIL(0.00)[~all]; RCVD_COUNT_THREE(0.00)[4]; MX_GOOD(-0.01)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:33915, ipnet:212.54.32.0/20, country:NL]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[]; HAS_X_AS(0.00)[]; R_DKIM_NA(0.00)[]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[212.54.42.166:from]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[development@lists.ipfire.org]; RCPT_COUNT_ONE(0.00)[1]; RECEIVED_SPAMHAUS_PBL(0.00)[24.132.103.33:received]; NEURAL_HAM(-0.07)[-0.066]; IP_REPUTATION_SPAM(0.01)[asn: 33915(0.00), country: NL(0.01), ip: 212.54.42.166(0.00)]; RCVD_TLS_ALL(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-Rspamd-Server: mail01.haj.ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Series |
bacula: Update to 9.6.3
|
|
Commit Message
Adolf Belka
May 16, 2020, 9:16 p.m. UTC
Update bacula from 9.0.6 to 9.6.3
- Current version of bacula in ipfire is 9.0.6 and is over two and a
half years old.
- update config options in lfs to include bacula recommended smartalloc
option.
- Add install, uninstall and update files in src/paks/bacula
- updated backup/includes to only backup the config file.
Signed-off-by: Adolf Belka <ahb.ipfire@gmail.com>
---
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 <info@ipfire.org>. #
+# #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+./uninstall.sh
+./install.sh
Comments
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 <ahb.ipfire@gmail.com> wrote: > > Update bacula from 9.0.6 to 9.6.3 > > - Current version of bacula in ipfire is 9.0.6 and is over two and a half years old. > > - update config options in lfs to include bacula recommended smartalloc option. > > - Add install, uninstall and update files in src/paks/bacula > > - updated backup/includes to only backup the config file. > > Signed-off-by: Adolf Belka <ahb.ipfire@gmail.com> > --- > > 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 @@ > > include Config > > -VER = 9.0.6 > +VER = 9.6.3 > > THISAPP = bacula-$(VER) > DL_FILE = $(THISAPP).tar.gz > -DL_FROM = $(URL_IPFIRE) > +DL_FROM = https://www.bacula.org/download/10266/ > DIR_APP = $(DIR_SRC)/$(THISAPP) > TARGET = $(DIR_INFO)/$(THISAPP) > PROG = bacula > -PAK_VER = 4 > +PAK_VER = 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 this for you. I just wanted to let you know for next time. > -DEPS = > +DEPS = "" We don’t have any “” in here any more. > > ############################################################################### > # Top-level Rules > @@ -44,7 +44,7 @@ objects = $(DL_FILE) > > $(DL_FILE) = $(DL_FROM)/$(DL_FILE) > > -$(DL_FILE)_MD5 = 9168e398808c42bf290515f60892f643 > +$(DL_FILE)_MD5 = 6d64bc27de773ee0e0ca1d836cbe4008 > > install : $(TARGET) > > @@ -80,12 +80,13 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) > $(UPDATE_AUTOMAKE) > cd $(DIR_APP) && ./configure \ > --prefix=/usr \ > + --enable-smartalloc \ > --sysconfdir=/etc/bacula \ > --with-working-dir=/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 > +############################################################################ > +# # > +# 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 <info@ipfire.org>. # > +# # > +############################################################################ > +# > +. /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 > +############################################################################ > +# # > +# 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 <info@ipfire.org>. # > +# # > +############################################################################ > +# > +. /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 > +############################################################################ > +# # > +# 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 <info@ipfire.org>. # > +# # > +############################################################################ > +# > +. /opt/pakfire/lib/functions.sh > +./uninstall.sh > +./install.sh > -Michael
Hallo Michael, Thanks for your feedback on the patch. This is my first attempt at doing this so I am not surprised that I need to fix some things. I will fix the install.sh script as mentioned below and redo the patch. On 18/05/2020 13:08, Michael Tremer wrote: > 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 <ahb.ipfire@gmail.com> wrote: >> >> Update bacula from 9.0.6 to 9.6.3 >> >> - Current version of bacula in ipfire is 9.0.6 and is over two and a half years old. >> >> - update config options in lfs to include bacula recommended smartalloc option. >> >> - Add install, uninstall and update files in src/paks/bacula >> >> - updated backup/includes to only backup the config file. >> >> Signed-off-by: Adolf Belka <ahb.ipfire@gmail.com> >> --- >> >> 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 @@ >> >> include Config >> >> -VER = 9.0.6 >> +VER = 9.6.3 >> >> THISAPP = bacula-$(VER) >> DL_FILE = $(THISAPP).tar.gz >> -DL_FROM = $(URL_IPFIRE) >> +DL_FROM = https://www.bacula.org/download/10266/ >> DIR_APP = $(DIR_SRC)/$(THISAPP) >> TARGET = $(DIR_INFO)/$(THISAPP) >> PROG = bacula >> -PAK_VER = 4 >> +PAK_VER = 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 this for you. I just wanted to let you know for next time. Thanks for letting me know. >> -DEPS = >> +DEPS = "" > We don’t have any “” in here any more. Thanks for letting me know. >> ############################################################################### >> # Top-level Rules >> @@ -44,7 +44,7 @@ objects = $(DL_FILE) >> >> $(DL_FILE) = $(DL_FROM)/$(DL_FILE) >> >> -$(DL_FILE)_MD5 = 9168e398808c42bf290515f60892f643 >> +$(DL_FILE)_MD5 = 6d64bc27de773ee0e0ca1d836cbe4008 >> >> install : $(TARGET) >> >> @@ -80,12 +80,13 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) >> $(UPDATE_AUTOMAKE) >> cd $(DIR_APP) && ./configure \ >> --prefix=/usr \ >> + --enable-smartalloc \ >> --sysconfdir=/etc/bacula \ >> --with-working-dir=/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 >> +############################################################################ >> +# # >> +# 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 <info@ipfire.org>. # >> +# # >> +############################################################################ >> +# >> +. /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. Having had a think about it I realised I created my own problem. In the first if statement I used a mv command. If I use a cp command then for a new install the .conf file will be coped to a .conf.new file and the restore_backup will not have any file so the .conf and .conf.new files will be equivalent. For an update the restore_backup will overwrite the new .conf file with the previous version and the new .conf file will be available in .conf.new The second if statement then isn't needed. I will redo the patch with this change and the other items you highlighted and resend it. >> + >> +# 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 >> +############################################################################ >> +# # >> +# 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 <info@ipfire.org>. # >> +# # >> +############################################################################ >> +# >> +. /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 >> +############################################################################ >> +# # >> +# 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 <info@ipfire.org>. # >> +# # >> +############################################################################ >> +# >> +. /opt/pakfire/lib/functions.sh >> +./uninstall.sh >> +./install.sh >> > -Michael >
Hallo Michael, I have realised that the patch file does not include the rootfiles file that shows which files are added or removed. I presume that this file also needs to be included in the patch diff listing. I will wait to resend the patch until it is confirmed that I need to include the bacula file under the rootfiles directory. Adolf. On 18/05/2020 18:34, Adolf Belka wrote: > Hallo Michael, > > Thanks for your feedback on the patch. This is my first attempt at > doing this so I am not surprised that I need to fix some things. I > will fix the install.sh script as mentioned below and redo the patch. > > > On 18/05/2020 13:08, Michael Tremer wrote: >> 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 <ahb.ipfire@gmail.com> wrote: >>> >>> Update bacula from 9.0.6 to 9.6.3 >>> >>> - Current version of bacula in ipfire is 9.0.6 and is over two and a >>> half years old. >>> >>> - update config options in lfs to include bacula recommended >>> smartalloc option. >>> >>> - Add install, uninstall and update files in src/paks/bacula >>> >>> - updated backup/includes to only backup the config file. >>> >>> Signed-off-by: Adolf Belka <ahb.ipfire@gmail.com> >>> --- >>> >>> 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 @@ >>> >>> include Config >>> >>> -VER = 9.0.6 >>> +VER = 9.6.3 >>> >>> THISAPP = bacula-$(VER) >>> DL_FILE = $(THISAPP).tar.gz >>> -DL_FROM = $(URL_IPFIRE) >>> +DL_FROM = https://www.bacula.org/download/10266/ >>> DIR_APP = $(DIR_SRC)/$(THISAPP) >>> TARGET = $(DIR_INFO)/$(THISAPP) >>> PROG = bacula >>> -PAK_VER = 4 >>> +PAK_VER = 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 this for you. I just wanted to let you know for next time. > Thanks for letting me know. >>> -DEPS = >>> +DEPS = "" >> We don’t have any “” in here any more. > Thanks for letting me know. >>> ############################################################################### >>> # Top-level Rules >>> @@ -44,7 +44,7 @@ objects = $(DL_FILE) >>> >>> $(DL_FILE) = $(DL_FROM)/$(DL_FILE) >>> >>> -$(DL_FILE)_MD5 = 9168e398808c42bf290515f60892f643 >>> +$(DL_FILE)_MD5 = 6d64bc27de773ee0e0ca1d836cbe4008 >>> >>> install : $(TARGET) >>> >>> @@ -80,12 +80,13 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) >>> $(UPDATE_AUTOMAKE) >>> cd $(DIR_APP) && ./configure \ >>> --prefix=/usr \ >>> + --enable-smartalloc \ >>> --sysconfdir=/etc/bacula \ >>> --with-working-dir=/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 >>> +############################################################################ >>> >>> +# # >>> +# 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 <info@ipfire.org>. # >>> +# # >>> +############################################################################ >>> >>> +# >>> +. /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. > > Having had a think about it I realised I created my own problem. > > In the first if statement I used a mv command. If I use a cp command > then for a new install the .conf file will be coped to a .conf.new > file and the restore_backup will not have any file so the .conf and > .conf.new files will be equivalent. For an update the restore_backup > will overwrite the new .conf file with the previous version and the > new .conf file will be available in .conf.new > > The second if statement then isn't needed. > > I will redo the patch with this change and the other items you > highlighted and resend it. > >>> + >>> +# 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 >>> +############################################################################ >>> >>> +# # >>> +# 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 <info@ipfire.org>. # >>> +# # >>> +############################################################################ >>> >>> +# >>> +. /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 >>> +############################################################################ >>> >>> +# # >>> +# 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 <info@ipfire.org>. # >>> +# # >>> +############################################################################ >>> >>> +# >>> +. /opt/pakfire/lib/functions.sh >>> +./uninstall.sh >>> +./install.sh >>> >> -Michael >>
Hallo Michael, Having thought about it, it is clear that the rootfile needs to be in the patch as well. So I will investigate further to understand why it was not, fix that and re-do the patch generation and then resubmit it here. On 18/05/2020 19:11, Adolf Belka wrote: > Hallo Michael, > > I have realised that the patch file does not include the rootfiles > file that shows which files are added or removed. I presume that this > file also needs to be included in the patch diff listing. I will wait > to resend the patch until it is confirmed that I need to include the > bacula file under the rootfiles directory. > > Adolf. > > On 18/05/2020 18:34, Adolf Belka wrote: >> Hallo Michael, >> >> Thanks for your feedback on the patch. This is my first attempt at >> doing this so I am not surprised that I need to fix some things. I >> will fix the install.sh script as mentioned below and redo the patch. >> >> >> On 18/05/2020 13:08, Michael Tremer wrote: >>> 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 <ahb.ipfire@gmail.com> wrote: >>>> >>>> Update bacula from 9.0.6 to 9.6.3 >>>> >>>> - Current version of bacula in ipfire is 9.0.6 and is over two and >>>> a half years old. >>>> >>>> - update config options in lfs to include bacula recommended >>>> smartalloc option. >>>> >>>> - Add install, uninstall and update files in src/paks/bacula >>>> >>>> - updated backup/includes to only backup the config file. >>>> >>>> Signed-off-by: Adolf Belka <ahb.ipfire@gmail.com> >>>> --- >>>> >>>> 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 @@ >>>> >>>> include Config >>>> >>>> -VER = 9.0.6 >>>> +VER = 9.6.3 >>>> >>>> THISAPP = bacula-$(VER) >>>> DL_FILE = $(THISAPP).tar.gz >>>> -DL_FROM = $(URL_IPFIRE) >>>> +DL_FROM = https://www.bacula.org/download/10266/ >>>> DIR_APP = $(DIR_SRC)/$(THISAPP) >>>> TARGET = $(DIR_INFO)/$(THISAPP) >>>> PROG = bacula >>>> -PAK_VER = 4 >>>> +PAK_VER = 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 this for you. I just wanted to let you know for next time. >> Thanks for letting me know. >>>> -DEPS = >>>> +DEPS = "" >>> We don’t have any “” in here any more. >> Thanks for letting me know. >>>> ############################################################################### >>>> >>>> # Top-level Rules >>>> @@ -44,7 +44,7 @@ objects = $(DL_FILE) >>>> >>>> $(DL_FILE) = $(DL_FROM)/$(DL_FILE) >>>> >>>> -$(DL_FILE)_MD5 = 9168e398808c42bf290515f60892f643 >>>> +$(DL_FILE)_MD5 = 6d64bc27de773ee0e0ca1d836cbe4008 >>>> >>>> install : $(TARGET) >>>> >>>> @@ -80,12 +80,13 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) >>>> $(UPDATE_AUTOMAKE) >>>> cd $(DIR_APP) && ./configure \ >>>> --prefix=/usr \ >>>> + --enable-smartalloc \ >>>> --sysconfdir=/etc/bacula \ >>>> --with-working-dir=/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 >>>> +############################################################################ >>>> >>>> +# # >>>> +# 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 <info@ipfire.org>. # >>>> +# # >>>> +############################################################################ >>>> >>>> +# >>>> +. /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. >> >> Having had a think about it I realised I created my own problem. >> >> In the first if statement I used a mv command. If I use a cp command >> then for a new install the .conf file will be coped to a .conf.new >> file and the restore_backup will not have any file so the .conf and >> .conf.new files will be equivalent. For an update the restore_backup >> will overwrite the new .conf file with the previous version and the >> new .conf file will be available in .conf.new >> >> The second if statement then isn't needed. >> >> I will redo the patch with this change and the other items you >> highlighted and resend it. >> >>>> + >>>> +# 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 >>>> +############################################################################ >>>> >>>> +# # >>>> +# 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 <info@ipfire.org>. # >>>> +# # >>>> +############################################################################ >>>> >>>> +# >>>> +. /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 >>>> +############################################################################ >>>> >>>> +# # >>>> +# 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 <info@ipfire.org>. # >>>> +# # >>>> +############################################################################ >>>> >>>> +# >>>> +. /opt/pakfire/lib/functions.sh >>>> +./uninstall.sh >>>> +./install.sh >>>> >>> -Michael >>>
Hello, Yes, we will need that file. You can add it with “git add” and for testing, you can send an email to yourself with git send-email. Let me know if you have any questions. Best, -Michael > On 18 May 2020, at 18:11, Adolf Belka <ahb.ipfire@gmail.com> wrote: > > Hallo Michael, > > I have realised that the patch file does not include the rootfiles file that shows which files are added or removed. I presume that this file also needs to be included in the patch diff listing. I will wait to resend the patch until it is confirmed that I need to include the bacula file under the rootfiles directory. > > Adolf. > > On 18/05/2020 18:34, Adolf Belka wrote: >> Hallo Michael, >> >> Thanks for your feedback on the patch. This is my first attempt at doing this so I am not surprised that I need to fix some things. I will fix the install.sh script as mentioned below and redo the patch. >> >> >> On 18/05/2020 13:08, Michael Tremer wrote: >>> 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 <ahb.ipfire@gmail.com> wrote: >>>> >>>> Update bacula from 9.0.6 to 9.6.3 >>>> >>>> - Current version of bacula in ipfire is 9.0.6 and is over two and a half years old. >>>> >>>> - update config options in lfs to include bacula recommended smartalloc option. >>>> >>>> - Add install, uninstall and update files in src/paks/bacula >>>> >>>> - updated backup/includes to only backup the config file. >>>> >>>> Signed-off-by: Adolf Belka <ahb.ipfire@gmail.com> >>>> --- >>>> >>>> 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 @@ >>>> >>>> include Config >>>> >>>> -VER = 9.0.6 >>>> +VER = 9.6.3 >>>> >>>> THISAPP = bacula-$(VER) >>>> DL_FILE = $(THISAPP).tar.gz >>>> -DL_FROM = $(URL_IPFIRE) >>>> +DL_FROM = https://www.bacula.org/download/10266/ >>>> DIR_APP = $(DIR_SRC)/$(THISAPP) >>>> TARGET = $(DIR_INFO)/$(THISAPP) >>>> PROG = bacula >>>> -PAK_VER = 4 >>>> +PAK_VER = 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 this for you. I just wanted to let you know for next time. >> Thanks for letting me know. >>>> -DEPS = >>>> +DEPS = "" >>> We don’t have any “” in here any more. >> Thanks for letting me know. >>>> ############################################################################### >>>> # Top-level Rules >>>> @@ -44,7 +44,7 @@ objects = $(DL_FILE) >>>> >>>> $(DL_FILE) = $(DL_FROM)/$(DL_FILE) >>>> >>>> -$(DL_FILE)_MD5 = 9168e398808c42bf290515f60892f643 >>>> +$(DL_FILE)_MD5 = 6d64bc27de773ee0e0ca1d836cbe4008 >>>> >>>> install : $(TARGET) >>>> >>>> @@ -80,12 +80,13 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) >>>> $(UPDATE_AUTOMAKE) >>>> cd $(DIR_APP) && ./configure \ >>>> --prefix=/usr \ >>>> + --enable-smartalloc \ >>>> --sysconfdir=/etc/bacula \ >>>> --with-working-dir=/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 >>>> +############################################################################ >>>> +# # >>>> +# 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 <info@ipfire.org>. # >>>> +# # >>>> +############################################################################ >>>> +# >>>> +. /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. >> >> Having had a think about it I realised I created my own problem. >> >> In the first if statement I used a mv command. If I use a cp command then for a new install the .conf file will be coped to a .conf.new file and the restore_backup will not have any file so the .conf and .conf.new files will be equivalent. For an update the restore_backup will overwrite the new .conf file with the previous version and the new .conf file will be available in .conf.new >> >> The second if statement then isn't needed. >> >> I will redo the patch with this change and the other items you highlighted and resend it. >> >>>> + >>>> +# 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 >>>> +############################################################################ >>>> +# # >>>> +# 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 <info@ipfire.org>. # >>>> +# # >>>> +############################################################################ >>>> +# >>>> +. /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 >>>> +############################################################################ >>>> +# # >>>> +# 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 <info@ipfire.org>. # >>>> +# # >>>> +############################################################################ >>>> +# >>>> +. /opt/pakfire/lib/functions.sh >>>> +./uninstall.sh >>>> +./install.sh >>>> >>> -Michael >>>
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 @@ include Config -VER = 9.0.6 +VER = 9.6.3 THISAPP = bacula-$(VER) DL_FILE = $(THISAPP).tar.gz -DL_FROM = $(URL_IPFIRE) +DL_FROM = https://www.bacula.org/download/10266/ DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = bacula -PAK_VER = 4 +PAK_VER = 1 -DEPS = +DEPS = "" ############################################################################### # Top-level Rules @@ -44,7 +44,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_MD5 = 9168e398808c42bf290515f60892f643 +$(DL_FILE)_MD5 = 6d64bc27de773ee0e0ca1d836cbe4008 install : $(TARGET) @@ -80,12 +80,13 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) $(UPDATE_AUTOMAKE) cd $(DIR_APP) && ./configure \ --prefix=/usr \ + --enable-smartalloc \ --sysconfdir=/etc/bacula \ --with-working-dir=/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 +############################################################################ +# # +# 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 <info@ipfire.org>. # +# # +############################################################################ +# +. /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 + +# 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 +############################################################################ +# # +# 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 <info@ipfire.org>. # +# # +############################################################################ +# +. /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 +############################################################################ +# # +# 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