* Dustin J. Mitchell <[email protected]> [20100507 13:33]:
> On Fri, May 7, 2010 at 12:03 PM, Jean-Francois Malouin
> <[email protected]> wrote:
> > Dustin, educate me please!
> > How do I proceed with the git patches and
> > how do I patch the source on my side?
> 
> First, if you click on each of those commits in github, you'll have URLs like
> 
> http://github.com/djmitche/amanda/commit/29f7aee9b0ecb9cb7ec6d0b2faa17ecde3168e95
> 
> and you can add a .patch to the end to get a regular old patch file.
> Fetch that with wget or whatever you'd like.  I just re-pushed to that
> branch with a single patch, so that should make things easier for you.

ok, thanks, one learns every day. 
I've applied the patches and recompiled and still no go:

watch:~# su amanda -c "/opt/amanda-3.1.0beta2/sbin/amtape rait label
RAIT-002.L4"
slot {2,14}: RAIT-002.L4
slot {2,14}: time X              label RAIT-002.L4
label RAIT-002.L4 is now loaded from slot {2,14}

I see a lot of warning in the debug file:

Fri May  7 13:54:34 2010: amtape: warning: Use of uninitialized value in 
bitwise or (|) at
/opt/amanda-3.1.0beta2/perl/Amanda/Changer/rait.pm line 596.

Then trying to unload it fails:

~# su amanda -c "/opt/amanda-3.1.0beta2/sbin/amtape rait eject {0,1}"
ERROR: av48-half-2: this changer instance is not configured to access drive 0

amtape debug file shows:

Fri May  7 13:59:49 2010: amtape: invoking /usr/sbin/mtx -f /dev/changer status
Fri May  7 13:59:51 2010: amtape: av48-half-1: updating state
Fri May  7 13:59:51 2010: amtape: av48-half-1: unloading drive 0
Fri May  7 13:59:51 2010: amtape: av48-half-1: ejecting tape:/dev/nst0 before 
unload
Fri May  7 14:00:31 2010: amtape: invoking /usr/sbin/mtx -f /dev/changer unload 
2 0
Fri May  7 14:01:24 2010: amtape: av48-half-1: unload complete
Fri May  7 14:01:27 2010: amtape: invoking /usr/sbin/mtx -f /dev/changer status
Fri May  7 14:01:29 2010: amtape: av48-half-2: updating state
Fri May  7 14:01:29 2010: amtape: av48-half-2: unloading drive 0
Fri May  7 14:01:29 2010: amtape: new Amanda::Changer::Error: type='failed', 
reason='invalid', message='this changer instance is not configured to access 
drive 0'
Fri May  7 14:01:29 2010: amtape: new Amanda::Changer::Error: type='failed', 
reason='invalid', message='av48-half-2: this changer instance is not configured 
to access drive 0'


> 
> I don't recall what OS you're using, or how you're installing Amanda.
> If it's from a source tarball, you should be able to just apply the
> patches:
>   patch -p1 < /path/to/patch.patch
> 
> if you need to rebuild a package, things are a little bit trickier.
> Basically, you should get the beta2 tarball, apply the patch as above,
> and then run ./packaging/$flavor/buildpkg, where $flavor is the
> appropriate flavor for your operating system (rpm, deb, ..).  This
> should Just Work, but of course it's tricky and won't always be
> effective.
> 
> The trickiest, but in the end easiest, solution is to patch the
> robot.pm and rait.pm files in place.  This omits the manpage update
> and the changes to the RAIT device, but neither of those are critical
> to fixing the bugs you've encountered.  Edit out the appropriate
> sections of the patch for each of those two files, and then use
> 
>   patch < /path/to/robot.pm.patch
> 
> patch should then say it can't find robot.pm, and you can give the
> path to it (/usr/lib/amanda/perl/Amanda/Changer/robot.pm, maybe -
> depends on your OS).
> 
> If you're on Solaris, you may want to use gpatch - Sun's patch is awful.
> 
> Dustin
> 
> -- 
> Open Source Storage Engineer
> http://www.zmanda.com

-- 
<° >< Jean-François Malouin          McConnell Brain Imaging Centre        
Systems/Network Administrator       Montréal Neurological Institute
3801 Rue University, Suite WB219          Montréal, Québec, H3A 2B4
Phone: 514-398-8924                               Fax: 514-398-8948

Reply via email to