bacula: Update to 9.6.3

Message ID be4fb38c-9eb0-7cb6-c797-92f4537ded86@gmail.com
State Superseded
Headers
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

Michael Tremer May 18, 2020, 11:08 a.m. UTC | #1
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
  
Adolf Belka May 18, 2020, 4:34 p.m. UTC | #2
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
>
  
Adolf Belka May 18, 2020, 5:11 p.m. UTC | #3
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
>>
  
Adolf Belka May 19, 2020, 6:29 p.m. UTC | #4
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
>>>
  
Michael Tremer May 19, 2020, 6:35 p.m. UTC | #5
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
>>>
  

Patch

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