[Rear-users] Kleine Probleme ReaR und Symlinks

Schlomo Schapiro schlomo at schapiro.org
Sat Apr 11 21:18:54 CEST 2009


Hi Peter,

[this is an English-language list, I will give a short translation

weird TSM client packages seem to brake rear's library copy routine, fix suggested

]

I would prefer a solution that guarantees that the copy will always work. Can
you find out the real reason for the copy failing?

Your fix would call cmp on *all* libraries to copy, I am sure that we can find a
more economic fix for your problem.

To submit a patch please use the sourceforge patch tracker and

- log on with your sf.net account
- indicate against which version you are patching
- confirm that you ran enough regression tests on all major supported platforms
to be sure that this fix won't break somewhere else

Alternatively, if this is a specific TSM issue then we might also understand the
underlying problem and include some special handling (e.g. setting some
variables) in on of the BACKUP/TSM scripts.

Regards,
Schlomo



Peter Eckhardt wrote:
> Halloele,
> 
> aufgrund historisch gewachsener Strukturen gibt es bei einem Kunden
> interessante TSM Client Pakete. Nach dem letzten TSM Client Update war
> ReaR unter SLES 10 nicht mehr in der Lage das Boot ISO zu bauen. Ein
> bisschen suchen brachte dann die Erkenntnis, dass versucht wird eine
> Library aus zwei verschiedenen Orten (Symlink) in das ISO zu kopieren.
> Das führt dann dazu, dass der cp in LibCopyTo mit Fehlermeldung
> abbricht. Ähnliches Problem hatte ich vor kurzem mit TSM und einem
> anderen schrägen IBM Paket.
> 
> Als generischen Fix schlage ich das folgende vor (siehe Pfeile)
> 
> 
> in /usr/share/rear/lib/linux-functions.sh
> 
> # Copy libraries given in $* to $1, stripping them on the way
> # like BinCopyTo, but copy symlinks as such, since some libraries
> LibCopyTo() {
>     echo "libCopyTo....."
>    TARGET="$1" ; shift
>    test -d "$TARGET" || Error "[LibCopyTo] Target $TARGET not a directory"
>    for k in "$@" ; do
>         test -z "$k" && continue # ignore blanks
>         test -r "$k" || Error "[LibCopyTo] Source $k is not readable"
> ---->        if ! cmp "$TARGET/$(basename "$k")" "$k"
> ---->        then
>               cp -v -a "$k" "$TARGET" || Error "[LipCopyTo] Could not
> copy '$k' to '$TARGET'"
> ---->        fi
>         test ! -L "$TARGET/$(basename "$k")" && strip -s
> "$TARGET/$(basename "$k")"
>    done
> 
> Vor dem kopieren prüfen ob evtl. schon eine identische Library
> exisitiert. Falls ja nicht prüfen. Falls nein kopieren. Im echten
> Fehlerfalle schlägt der cp weiter fehl. Evtl. kann man auch noch eine
> aussagekräftige Fehlermeldung bringen.
> 
> Löst bei uns das Problem mit der Zusammenarbeit von TSM mit anderen IBM
> Produkten und ReaR sowie mit dem aktuellen TSM Client (kundenverwurstelt).
> 
> Viele Grüße
> Peter
> 
> 
> Viele Grüße
> Peter
> 
> 
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> High Quality Requirements in a Collaborative Environment.
> Download a free trial of Rational Requirements Composer Now!
> http://p.sf.net/sfu/www-ibm-com
> _______________________________________________
> Rear-users mailing list
> Rear-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rear-users




More information about the rear-users mailing list