Posts: 390 from 2003/2/24
From: finland, the l...
Recent tar (should be included with the SDK) includes support for amiga file attributes and comments. You need to use --xattrs option to enable the support.
Archive directory t:foo and save it to backup:foo.tar.gz:
tar --xattrs -z -c -v -f backup:foo.tar.gz -C t: foo
Extract the archice to t: restoring the amiga attributes:
tar --xattrs -z -x -v -f backup:foo.tar.gz -C t:
Note that unix systems don't know how to restore the amiga file attributes or comments. Neither some old builds of tar.
Technical notes: This support was realized by adding a fake "xattrs" layer to ixemul.library. It reports amiga attributes and comments as special xattrs. When tar is compiled against a recent MorphOS SDK, it will automatically pick up xattrs support (just ./configure and make).
File amiga protection modes are stored in "user.amiga.mode" xattr. The data is a 32bit big endian byte order integer. The amiga file comment is stored in "user.amiga.comment" xattr. The data is ISO 8859-1 (latin1) bytes forming the file comment.
So inclined may check the ixemul source code
. The implementation is at:
PS. MorphOS xadmaster.library
Tar slave supports these xattrs as well. The implementation is at:
PPS. (L)GPL isn't hard.[ Edited by Piru 27.08.2018 - 00:52 ]