diff options
author | H. Peter Anvin <hpa@zytor.com> | 2001-11-08 20:24:11 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2001-11-08 20:24:11 +0000 |
commit | 7946b8f6e2797925fbdcd7a27507d8597a7684c7 (patch) | |
tree | 3c79f7ab0039a09062969191c55198d9911caf39 | |
parent | 929ff56edd616c018c5c6d9a1a9eab649be31c2e (diff) | |
download | zisofs-tools-7946b8f6e2797925fbdcd7a27507d8597a7684c7.tar.gz |
Add updated cdrtools diff.
-rw-r--r-- | cdrtools-1.11a09-zisofs.diff | 409 |
1 files changed, 409 insertions, 0 deletions
diff --git a/cdrtools-1.11a09-zisofs.diff b/cdrtools-1.11a09-zisofs.diff new file mode 100644 index 0000000..946d7ae --- /dev/null +++ b/cdrtools-1.11a09-zisofs.diff @@ -0,0 +1,409 @@ +diff -urN cdrtools-1.11a09/mkisofs/README.compression cdrtools-1.11a09-zisofs/mkisofs/README.compression +--- cdrtools-1.11a09/mkisofs/README.compression Wed Dec 31 16:00:00 1969 ++++ cdrtools-1.11a09-zisofs/mkisofs/README.compression Thu Nov 8 12:01:31 2001 +@@ -0,0 +1,17 @@ ++Transparent decompression (-z option) is available on Linux kernels ++using kernel version 2.4.14 or 2.4.9-ac14 or later. ++ ++You also need the zisofs-tools package, containing the mkzftree ++utility, to create the compressed files; this package is available at: ++ ++ftp://ftp.kernel.org/pub/linux/utils/fs/zisofs/ ++ ++The mkzftree utility can also be used to read compressed CD-ROMs on ++systems which do not support transparent decompression. ++ ++The use of a separate utility allows compression to be controlled on a ++per-file basis. A file which is not compressed can be read on any ++system. ++ ++Transparent decompression is implemented as an extension to Rock ++Ridge, so Rock Ridge needs to be enabled (-R or -r options.) +diff -urN cdrtools-1.11a09/mkisofs/mkisofs.8 cdrtools-1.11a09-zisofs/mkisofs/mkisofs.8 +--- cdrtools-1.11a09/mkisofs/mkisofs.8 Mon Jul 9 05:09:08 2001 ++++ cdrtools-1.11a09-zisofs/mkisofs/mkisofs.8 Thu Nov 8 12:11:13 2001 +@@ -206,7 +206,7 @@ + .B \-pad + ] + [ +-.B \-no\-pad ++.B \-no-pad + ] + [ + .B \-path-list +@@ -383,40 +383,40 @@ + .I folder_name + ] + [ +-.B \--cap ++.B \-\-cap + ] + [ +-.B \--netatalk ++.B \-\-netatalk + ] + [ +-.B \--double ++.B \-\-double + ] + [ +-.B \--ethershare ++.B \-\-ethershare + ] + [ +-.B \--ushare ++.B \-\-ushare + ] + [ +-.B \--exchange ++.B \-\-exchange + ] + [ +-.B \--sgi ++.B \-\-sgi + ] + [ +-.B \--xinet ++.B \-\-xinet + ] + [ +-.B \--macbin ++.B \-\-macbin + ] + [ +-.B \--single ++.B \-\-single + ] + [ +-.B \--dave ++.B \-\-dave + ] + [ +-.B \--sfm ++.B \-\-sfm + ] + .\" end mkhybrid options + .B \-o +@@ -1398,15 +1398,25 @@ + + mkisofs \-o cd \-x /local/dir1 \-x /local/dir2 /local + .sp +-NOTE: The \-m and \-x option description should both be updated, they are wrong. ++NOTE: The ++.B \-m ++and ++.B \-x ++option description should both be updated, they are wrong. + Both now work identical and use filename globbing. A file is excluded if either + the last component matches or the whole path matches. + .TP + .B \-z +-Generate special SUSP records for transparently compressed files. This is +-only of use and interest for hosts that support transparent decompression. +-This is an experimental feature, and no hosts yet support this, but there +-are ALPHA patches for Linux that can make use of this feature. ++Generate special RRIP records for transparently compressed files. ++This is only of use and interest for hosts that support transparent ++decompression, such as Linux 2.4.14 or later. You must specify the ++.B \-R ++or ++.B \-r ++options to enable RockRidge, and generate compressed files using the ++.B mkzftree ++utility before running ++.BR mkisofs . + + .SH "HFS OPTIONS + .TP +@@ -1505,7 +1515,7 @@ + .BI \-cluster-size " size + Set the size in bytes of the cluster or allocation units of PC Exchange + files. Implies the +-.B \--exchange ++.B \-\-exchange + option. See the + .B HFS MACINTOSH FILE FORMATS + section below. +@@ -1612,44 +1622,44 @@ + called System Folder, then the whole path name is "./cddata/System Folder" + (remember to use quotes if the name contains spaces). + .TP +-.B \--cap ++.B \-\-cap + Look for AUFS CAP Macintosh files. Search for CAP Apple/Unix file formats + only. Searching for the other possible Apple/Unix file formats is disabled, + unless other + .I double dash + options are given. + .TP +-.B \--netatalk ++.B \-\-netatalk + Look for NETATALK Macintosh files + .TP +-.B \--double ++.B \-\-double + Look for AppleDouble Macintosh files + .TP +-.B \--ethershare ++.B \-\-ethershare + Look for Helios EtherShare Macintosh files + .TP +-.B \--ushare ++.B \-\-ushare + Look for IPT UShare Macintosh files + .TP +-.B \--exchange ++.B \-\-exchange + Look for PC Exchange Macintosh files + .TP +-.B \--sgi ++.B \-\-sgi + Look for SGI Macintosh files + .TP +-.B \--xinet ++.B \-\-xinet + Look for XINET Macintosh files + .TP +-.B \--macbin ++.B \-\-macbin + Look for MacBinary Macintosh files + .TP +-.B \--single ++.B \-\-single + Look for AppleSingle Macintosh files + .TP +-.B \--dave ++.B \-\-dave + Look for Thursby Software Systems DAVE Macintosh files + .TP +-.B \--sfm ++.B \-\-sfm + Look for Microsoft's Services for Macintosh files (NT only) (Alpha) + + .SH "CHARACTER SETS +@@ -2285,7 +2295,7 @@ + The floppy will be mounted as a CAP file system by default. Then run mkisofs + using something like: + +- mkisofs \--cap \-o output source_dir /mnt/floppy ++ mkisofs \-\-cap \-o output source_dir /mnt/floppy + + If you are not using Linux, then you can use the hfsutils to copy the icon + file from the floppy. However, care has to be taken, as the icon file +@@ -2301,7 +2311,7 @@ + .B mkisofs + by using something like: + +- mkisofs \--macbin \-o output source_dir icon_dir ++ mkisofs \-\-macbin \-o output source_dir icon_dir + .PP + The procedure for creating/using custom folder icons is very similar - paste + an icon to folder's "Get Info" box and transfer the resulting 'Icon\\r' +@@ -2520,7 +2530,7 @@ + that contains + Netatalk Apple/Unix files: + .PP +-% mkisofs \-o cd.iso \--netatalk cd_dir ++% mkisofs \-o cd.iso \-\-netatalk cd_dir + .PP + To create a HFS hybrid CD from the source directory + .IR cd_dir , +@@ -2754,9 +2764,10 @@ + options. + + .SH "SEE ALSO +-.BR cdrecord(1) ++.BR cdrecord (1), ++.BR mkzftree (1), + .BR magic (5), +-.BR apple_driver (8) ++.BR apple_driver (8). + + .SH "FUTURE IMPROVEMENTS + Some sort of gui interface. +@@ -2764,8 +2775,13 @@ + .B m\&kisofs + is available as part of the cdrecord package from + ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/ ++ + .B hfsutils + from ftp://ftp.mars.org/pub/hfs ++ ++.B mkzftree ++is available as part of the zisofs-tools package ++from ftp://ftp.kernel.org/pub/linux/utils/fs/zisofs/ + .SH "MAILING LISTS + If you want to actively take part on the development of m\&kisofs, + and/or mkhybrid, +diff -urN cdrtools-1.11a09/mkisofs/mkisofs.c cdrtools-1.11a09-zisofs/mkisofs/mkisofs.c +--- cdrtools-1.11a09/mkisofs/mkisofs.c Sat Oct 20 15:00:34 2001 ++++ cdrtools-1.11a09-zisofs/mkisofs/mkisofs.c Thu Nov 8 11:57:58 2001 +@@ -561,10 +561,8 @@ + '\0', "#", "Set numbers of load sectors", ONE_DASH}, + {{"boot-info-table", no_argument, NULL, OPTION_BOOT_INFO_TABLE}, + '\0', NULL, "Patch boot image with info table", ONE_DASH}, +-#ifdef ERIC_neverdef + {{"transparent-compression", no_argument, NULL, 'z'}, + 'z', NULL, "Enable transparent compression of files", ONE_DASH}, +-#endif + #ifdef APPLE_HYB + {{"hfs-type", required_argument, NULL, OPTION_HFS_TYPE}, + '\0', "TYPE", "Set HFS default TYPE", ONE_DASH}, +@@ -1984,7 +1982,11 @@ + error(" but without (standard) Rock Ridge extensions.\n"); + error(" It is highly recommended to add Rock Ridge\n"); + } +- ++ if (transparent_compression && !use_RockRidge) { ++ error("Warning: transparent decompression is a Rock Ridge extension, but\n"); ++ error(" creating filesystem without Rock Ridge attributes; files\n"); ++ error(" will not be transparently decompressed.\n"); ++ } + init_nls(); /* Initialize UNICODE tables */ + + /* initialize code tables from a file - if they exists */ +diff -urN cdrtools-1.11a09/mkisofs/mkisofs.c.orig cdrtools-1.11a09-zisofs/mkisofs/mkisofs.c.orig +diff -urN cdrtools-1.11a09/mkisofs/rock.c cdrtools-1.11a09-zisofs/mkisofs/rock.c +--- cdrtools-1.11a09/mkisofs/rock.c Tue Jan 23 04:28:34 2001 ++++ cdrtools-1.11a09-zisofs/mkisofs/rock.c Thu Nov 8 11:57:58 2001 +@@ -45,7 +45,7 @@ + #define PX_SIZE 36 + #define RE_SIZE 4 + #define SL_SIZE 20 +-#define ZZ_SIZE 15 ++#define ZF_SIZE 16 + #ifdef APPLE_HYB + #define AA_SIZE 14 /* size of Apple extension */ + #endif /* APPLE_HYB */ +@@ -577,17 +577,24 @@ + #ifndef VMS + /* + * If transparent compression was requested, fill in the correct field +- * for this file ++ * for this file, if (and only if) it is actually a compressed file! ++ * This relies only on magic number, but it should in general not ++ * be an issue since if you're using -z odds are most of your ++ * files are already compressed. ++ * ++ * In the future it would be nice if mkisofs actually did the ++ * compression. + */ +- if (transparent_compression && +- S_ISREG(lstatbuf->st_mode) && +- strlen(name) > 3 && +- strcmp(name + strlen(name) - 3, ".gZ") == 0) { +- FILE *zipfile; ++ if (transparent_compression && S_ISREG(lstatbuf->st_mode)) { ++ static const unsigned char zisofs_magic[8] = ++ { 0x37, 0xE4, 0x53, 0x96, 0xC9, 0xDB, 0xD6, 0x07 }; ++ FILE *zffile; + char *checkname; + unsigned int file_size; +- unsigned char header[8]; ++ unsigned char header[16]; + int OK_flag; ++ int blocksize; ++ int headersize; + + /* + * First open file and verify that the correct algorithm was +@@ -596,73 +603,43 @@ + file_size = 0; + OK_flag = 1; + +- zipfile = fopen(whole_name, "rb"); +- fread(header, 1, sizeof(header), zipfile); ++ memset(header, 0, sizeof(header)); + +- /* Check some magic numbers from gzip. */ +- if (header[0] != 0x1f || header[1] != 0x8b || header[2] != 8) +- OK_flag = 0; +- /* Make sure file was blocksized. */ +- if (((header[3] & 0x40) == 0)) +- OK_flag = 0; +- /* OK, now go to the end of the file and get some more info */ +- if (OK_flag) { +- int status; +- +- status = (long) lseek(fileno(zipfile), (off_t)(-8), +- SEEK_END); +- if (status == -1) ++ zffile = fopen(whole_name, "rb"); ++ if ( zffile ) { ++ if ( fread(header, 1, sizeof(header), zffile) != sizeof(header) ) + OK_flag = 0; +- } +- if (OK_flag) { +- if (read(fileno(zipfile), (char *) header, +- sizeof(header)) != sizeof(header)) { ++ ++ /* Check magic number */ ++ if ( memcmp(header, zisofs_magic, sizeof zisofs_magic) ) + OK_flag = 0; +- } else { +- int blocksize; + +- blocksize = (header[3] << 8) | header[2]; +- file_size = ((unsigned int) header[7] << 24) | +- ((unsigned int) header[6] << 16) | +- ((unsigned int) header[5] << 8) | +- header[4]; +-#if 0 +- fprintf(stderr, "Blocksize = %d %d\n", +- blocksize, file_size); +-#endif +- if (blocksize != SECTOR_SIZE) +- OK_flag = 0; +- } +- } +- fclose(zipfile); +- +- checkname = strdup(whole_name); +- checkname[strlen(whole_name) - 3] = 0; +- zipfile = fopen(checkname, "rb"); +- if (zipfile) { ++ /* Get the real size of the file */ ++ file_size = get_731(header+8); ++ ++ /* Get the header size (>> 2) */ ++ headersize = header[12]; ++ ++ /* Get the block size (log2) */ ++ blocksize = header[13]; ++ ++ fclose(zffile); ++ } else { + OK_flag = 0; +-#ifdef USE_LIBSCHILY +- errmsg( +- "Unable to insert transparent compressed file - name conflict\n"); +-#else +- fprintf(stderr, +- "Unable to insert transparent compressed file - name conflict\n"); +-#endif +- fclose(zipfile); + } +- free(checkname); +- ++ + if (OK_flag) { +- if (MAYBE_ADD_CE_ENTRY(ZZ_SIZE)) ++ if (MAYBE_ADD_CE_ENTRY(ZF_SIZE)) + add_CE_entry(); + Rock[ipnt++] = 'Z'; +- Rock[ipnt++] = 'Z'; +- Rock[ipnt++] = ZZ_SIZE; ++ Rock[ipnt++] = 'F'; ++ Rock[ipnt++] = ZF_SIZE; + Rock[ipnt++] = SU_VERSION; +- Rock[ipnt++] = 'g'; /* Identify compression +- technique used */ ++ Rock[ipnt++] = 'p'; /* Algorithm: "paged zlib" */ + Rock[ipnt++] = 'z'; +- Rock[ipnt++] = 3; ++ /* 2 bytes for algorithm-specific information */ ++ Rock[ipnt++] = headersize; ++ Rock[ipnt++] = blocksize; + set_733((char *) Rock + ipnt, file_size); /* Real file size */ + ipnt += 8; + }; |