Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Nov 2004 14:29:07 -0800
From:      Drew Tomlinson <drew@mykitchentable.net>
To:        Frank Laszlo <laszlof@vonostingroup.com>
Cc:        ports@freebsd.org
Subject:   Re: Extreme Newbie Help With Modifying Bacula Port to Get 1.36.0
Message-ID:  <41880A33.9020002@mykitchentable.net>
In-Reply-To: <4187F073.50005@vonostingroup.com>
References:  <4187CE00.8040900@mykitchentable.net> <4187F073.50005@vonostingroup.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a cryptographically signed message in MIME format.

--------------ms060904040305030608010409
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

On 11/2/2004 12:39 PM Frank Laszlo wrote:

> 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 

Thanks for your reply.  In the bacula source, I found src/Makefile.in 
and in the ports tree I found bacula/files/patch-scripts-Makefile.in.  I 
looked at the contents of patch-scripts-Makefile.in and then searched 
the web to learn how to read it so I'd know what changes to make in the 
original Makefile.in.  The diff man page say the example you gave me 
produces a "unified output format" file with 3 lines of context.  The 
examples I've found on the web for this format look like this:

(from http://www.network-theory.co.uk/docs/diff/diff_23.html)
--- lao2002-02-21 23:30:39.942229878 -0800
+++ tzu2002-02-21 23:30:50.442260588 -0800
@@ -1,7 +1,6 @@
-The Way that can be told of is not the eternal Way;
-The name that can be named is not the eternal name.
 The Nameless is the origin of Heaven and Earth;
-The Named is the mother of all things.
+The named is the mother of all things.
+
 Therefore let there always be non-being,
   so we may see their subtlety,
 And let there always be being,

 From my understanding, this is one "hunk".  The next "hunk" would start 
with another line beginning with "@@".  However the 
patch-scripts-Makefile.in the bacula 1.34.6 port tree looks like this:

---BEGIN---
*** scripts/Makefile.in.orig    Wed Mar 31 00:54:17 2004
--- scripts/Makefile.in Thu Apr  8 19:56:21 2004
***************
*** 32,46 ****
        $(MKDIR) $(DESTDIR)$(scriptdir)

  install: installdirs
!       $(INSTALL_SCRIPT) startmysql $(DESTDIR)$(scriptdir)/startmysql
!       $(INSTALL_SCRIPT) stopmysql $(DESTDIR)$(scriptdir)/stopmysql
!       $(INSTALL_SCRIPT) bconsole $(DESTDIR)$(scriptdir)/bconsole
!       $(INSTALL_SCRIPT) gconsole $(DESTDIR)$(scriptdir)/gconsole
!       $(INSTALL_SCRIPT) bacula $(DESTDIR)$(scriptdir)/bacula
!       $(INSTALL_SCRIPT) fd $(DESTDIR)$(scriptdir)/fd
!       $(INSTALL_SCRIPT) mtx-changer $(DESTDIR)$(scriptdir)/mtx-changer
!       $(INSTALL_DATA)   btraceback.gdb 
$(DESTDIR)$(scriptdir)/btraceback.gdb
!       $(INSTALL_SCRIPT) btraceback $(DESTDIR)$(sbindir)/btraceback

  uninstall:
        (cd $(DESTDIR)$(scriptdir); $(RMF) startmysql)
--- 32,46 ----
        $(MKDIR) $(DESTDIR)$(scriptdir)

  install: installdirs
! #     $(INSTALL_SCRIPT) startmysql $(DESTDIR)$(scriptdir)/startmysql
! #     $(INSTALL_SCRIPT) stopmysql $(DESTDIR)$(scriptdir)/stopmysql
! #     $(INSTALL_SCRIPT) bconsole $(DESTDIR)$(scriptdir)/bconsole
! #     $(INSTALL_SCRIPT) gconsole $(DESTDIR)$(scriptdir)/gconsole
!       $(INSTALL_SCRIPT) bacula 
$(DESTDIR)$(sysconfdir)/rc.d/bacula.sh.sample
!       $(INSTALL_SCRIPT) mtx-changer $(DESTDIR)$(scriptdir)/mtx-changer
! #     $(INSTALL_DATA)   btraceback.gdb 
$(DESTDIR)$(scriptdir)/btraceback.gdb
! #     $(INSTALL_SCRIPT) btraceback $(DESTDIR)$(sbindir)/btraceback

  uninstall:
        (cd $(DESTDIR)$(scriptdir); $(RMF) startmysql)
---END---

How do I interpret this file and edit src/Makefile.in that came with the 
bacula 1.36.0 source?  I can see similar sections like "install:" and 
"uninstall:".  Here's the contents of src/Makefile.in:

---BEGIN---
#
# Version $Id: Makefile.in,v 1.11 2004/05/28 15:45:56 kerns Exp $
#
@MCOMMON@

srcdir =        .
VPATH =         .
.PATH:          .

# one up
basedir = ..
# top dir
topdir = ..
# this dir relative to top dir
thisdir = src


first_rule: all
dummy:


.SUFFIXES:      .c .o
.PHONY:
.DONTCARE:

# inference rules
.c.o:
        $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I. -I$(basedir) 
-I$(srcdir) $(DINCLUDE) $(CFLAGS) $<

.cc.o:
        $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I. -I$(basedir) 
-I$(srcdir) $(DINCLUDE) $(CFLAGS) $<
#-------------------------------------------------------------------------
all: Makefile


Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
        cd $(topdir) \
          && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) 
./config.status


clean:
        @$(RMF) core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
        @$(RMF) AUTHORS ChangeLog Makefile.am NEWS README acconfig.h 
autogen.sh
        @$(RMF) configure.in stamp.h stamp-h.in
        @$(RMF) -r po
        (cd gnome-console; $(MAKE) clean)
        (cd gnome2-console; $(MAKE) clean)

realclean: clean
        @$(RMF) tags

distclean: realclean
        if test $(srcdir) = .; then $(MAKE) realclean; fi
        @(cd $(srcdir); $(RMF) Makefile)
        @$(RMF) config.h host.h
        @$(RMF) -r CVS

devclean: realclean
        if test $(srcdir) = .; then $(MAKE) realclean; fi
        @(cd $(srcdir); $(RMF) Makefile)
        @$(RMF) config.h host.h

install:


uninstall:


depend:
---END---

I'd be happy to read if only I knew what to read.  :)

Thanks for your help!

Drew

-- 
Visit The Alchemist's Warehouse
Magic Tricks, DVDs, Videos, Books, & More!

http://www.alchemistswarehouse.com


--------------ms060904040305030608010409
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIH+TCC
AlcwggHAoAMCAQICAw0RLjANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UE
ChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNv
bmFsIEZyZWVtYWlsIElzc3VpbmcgQ0EwHhcNMDQwOTE4MTQ1MDAxWhcNMDUwOTE4MTQ1MDAx
WjBJMR8wHQYDVQQDExZUaGF3dGUgRnJlZW1haWwgTWVtYmVyMSYwJAYJKoZIhvcNAQkBFhdk
cmV3QG15a2l0Y2hlbnRhYmxlLm5ldDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwJS7
Je3OPtSkBf9B6ZrTC0vrxLNCV9WP3bHljygz2ZQtyr6TpV0j5E8ZMH9MSVxxySTXkeji/e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Nf1xkvEi79DLFaoEFqS
XtmSEr6+j2MloSaJY4QanWY1YvLQrOjWmpd8Rd+ZmmoTHjR1EwzmvYMAAAAAAAA=
--------------ms060904040305030608010409--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41880A33.9020002>