Extreme Newbie Help With Modifying Bacula Port to Get 1.36.0

Frank Laszlo laszlof at vonostingroup.com
Tue Nov 2 12:39:12 PST 2004


Drew Tomlinson wrote:

> I've never created or modified a port so I'm a complete newbie.  I'm 
> using bacula 1.34.6 which is the current version in the ports tree.  
> However my HP DLT30 (DLT2000) tape drive isn't working properly with 
> the software.  I posted to the bacula list and have been directed to 
> upgrade to the current version of 1.36.0.
>
> So I thought, why don't I learn about ports?  After all, it shouldn't 
> be to hard to modify a Makefile to get a newer version and then I 
> could share my updates with the port maintainer.  I've picked through 
> the Porters Handbook and bsd.port.mk and found that I needed to change 
> "PORTVERSION=" from "1.34.6" to "1.36.0".  Then I found that I had to 
> run "make makesum" to create the distinfo file.
>
> Now when I run "portupgrade -f bacula", it fails during patching 
> (output follows).  I suspect that the line numbers have changed and I 
> need to create a new diff (something I've never done before).  I 
> suspect I need to make a copy of the appropriate file in the source 
> code, make these changes to it, and then run diff with the appropriate 
> switches.  However I have no idea what file I might be looking for.  
> Can anyone nudge me in the right direction?  Am I close?
>
> Thanks,
>
> Drew
>
> blacklamb# portupgrade -f bacula
> --->  Upgrading 'bacula-1.34.6_2' to 'bacula-1.36.0_2' (sysutils/bacula)
> --->  Building '/usr/ports/sysutils/bacula' with make flags: 
> WITH_MYSQL=yes
> ===>  Cleaning for mysql-client-3.23.58_3
> ===>  Cleaning for libtool-1.5.10
> ===>  Cleaning for bacula-1.36.0_2
> =======> ATTENTION <=======
> ######################################################
> ===> Please read the file
> ===>     /usr/local/share/doc/bacula/ReleaseNotes
> ===> for the upgrade procedure!
> ===> IF YOU IGNORE THIS you may !! LOSE DATA !!
> ######################################################
> ===> Note that there is a pthreads problem, which leads to the loss of 
> 500kB
> ===> of data at the end of an tape. This is corrected in newer 
> versions of FreeBSD
> ===> READ 
> /var/tmp/usr/ports/sysutils/bacula/work/bacula-1.36.0/platforms/freebsd/pthreads-fix.txt 
>
>
> You may use the following build options (or make config):
>
>  WITH_CLIENT_ONLY=yes  if you only want the file daemon.
>  WITH_WXCONSOLE=yes    if you only want a wxGTK based GUI console.
>  WITH_GNOMECONSOLE=yes if you only want a GNOME based GUI console.
>  WITH_MTX=yes          if you want to use mtx instead of chio for 
> autochanger control.
>
> ===> Using mysql as the bacula database.
>
> ===>  Found saved configuration for bacula-1.32f4
> ===>  Extracting for bacula-1.36.0_2
> >> Checksum OK for bacula-1.36.0.tar.gz.
> ===>  Patching for bacula-1.36.0_2
> ===>  Applying FreeBSD patches for bacula-1.36.0_2
> 1 out of 1 hunks failed--saving rejects to scripts/Makefile.in.rej
> >> Patch patch-scripts-Makefile.in failed to apply cleanly.
> >> Patch(es) patch-autoconf-Make.common.in applied cleanly.
> *** Error code 1

Take a look in the files/ directory, it contains the applicable patches. 
it will also tell you where to find the files that are being patched. 
Sometimes you just need to regenerate the patches based on the old ones, 
only thing that gets changed is line numbers. But in some cases the 
patches no longer work, or there are new issues than need to be 
addressed within the patch files. Heres a quick lesson on creating patches.

1) cp FileName FileName.orig
2) vi FileName (make changes)
3) diff -U3 Filename.orig FileName >> patch-FileName
4) test the patches to be sure they work.

Hope this helps.

Regards,
    Frank Laszlo



More information about the freebsd-ports mailing list