Hello community,
here is the log from the commit of package wodim
checked in at Mon Sep 8 18:18:11 CEST 2008.
--------
--- wodim/wodim.changes 2008-08-22 08:12:11.000000000 +0200
+++ /mounts/work_src_done/STABLE/wodim/wodim.changes 2008-09-08 17:52:27.000000000 +0200
@@ -1,0 +2,7 @@
+Mon Sep 8 17:48:19 CEST 2008 - nadvornik@suse.cz
+
+- updated to bugfix release 1.1.8
+- ported support for files >4GB on iso9660 (see the option
+ -iso-level 3) [fate#303791]
+
+-------------------------------------------------------------------
Old:
----
cdrkit-1.1.7.1-cmake.patch
cdrkit-1.1.7.1.tar.bz2
New:
----
cdrkit-1.1.8-cmake.patch
cdrkit-1.1.8.tar.bz2
genisoimage-multi-extent.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ wodim.spec ++++++
--- /var/tmp/diff_new_pack.yo7502/_old 2008-09-08 18:17:58.000000000 +0200
+++ /var/tmp/diff_new_pack.yo7502/_new 2008-09-08 18:17:58.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package wodim (Version 1.1.7.1)
+# spec file for package wodim (Version 1.1.8)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -24,13 +24,14 @@
Group: Productivity/Multimedia/CD/Record
PreReq: permissions /bin/cp
AutoReqProv: on
-Version: 1.1.7.1
-Release: 46
+Version: 1.1.8
+Release: 1
Source: cdrkit-%{version}.tar.bz2
Source1: scan_scsi.linux
Source2: cdinfo.c
Source5: README.SUSE
Patch1: cdrkit-%{version}-cmake.patch
+Patch2: genisoimage-multi-extent.patch
Url: http://cdrkit.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Tool for Writing CDRs
@@ -136,6 +137,7 @@
%prep
%setup -q -n cdrkit-%{version}
%patch1
+%patch2
%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
@@ -276,6 +278,10 @@
/usr/bin/list_audio_tracks
%changelog
+* Mon Sep 08 2008 nadvornik@suse.cz
+- updated to bugfix release 1.1.8
+- ported support for files >4GB on iso9660 (see the option
+ -iso-level 3) [fate#303791]
* Fri Aug 22 2008 lnussel@suse.de
- remove resmgr from BuildRequires
* Tue Apr 08 2008 nadvornik@suse.cz
++++++ cdrkit-1.1.7.1-cmake.patch -> cdrkit-1.1.8-cmake.patch ++++++
++++++ cdrkit-1.1.7.1.tar.bz2 -> cdrkit-1.1.8.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.7.1/Changelog new/cdrkit-1.1.8/Changelog
--- old/cdrkit-1.1.7.1/Changelog 2008-03-17 22:28:37.000000000 +0100
+++ new/cdrkit-1.1.8/Changelog 2008-05-26 00:30:33.000000000 +0200
@@ -1,3 +1,24 @@
+cdrkit (1.1.8) RELEASED; urgency=low
+
+ [ Steve McIntyre ]
+ * genisoimage/joliet.c: Fix a potential memory corruption bug.
+ * genisoimage/md5.c: Trivial cleanup
+ * genisoimage/genisoimage.[c1]: Add command-line support for
+ -jigdo-template-compress
+ * genisoimage/sha1.h: Fix a type issue that broke sha1 support
+ on 64-bit arches.
+ * genisoimage/checksum.[ch]: Added test code; changed internal
+ layout slightly to make for easier debug.
+ * genisoimage: Applied patch from Roman Rakus to
+ preserve directory permissions.
+ * genisoimage: Add a patch from Ivan Shmakov. "-o -" will now write
+ to stdout, as typical for command line programs. And we will try
+ not to corrupt stdout by default if it's a terminal.
+ * genisoimage/genisoimage.1: Add a mention of -chrp-boot.
+ * genisoimage/mac_label.c: Fix an over-keen s/mkisofs/genisoimage.
+
+ -- Steve McIntyre <93sam@debian.org> Mon, 25 May 2008 21:22:26 +0100
+
cdrkit (1.1.7.1) RELEASED; urgency=low
[ Steve McIntyre ]
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.7.1/genisoimage/checksum.c new/cdrkit-1.1.8/genisoimage/checksum.c
--- old/cdrkit-1.1.7.1/genisoimage/checksum.c 2008-01-06 04:01:25.000000000 +0100
+++ new/cdrkit-1.1.8/genisoimage/checksum.c 2008-05-25 22:46:17.000000000 +0200
@@ -47,6 +47,7 @@
struct checksum_details
{
char *name;
+ char *prog;
int digest_size;
int context_size;
void (*init)(void *context);
@@ -58,6 +59,7 @@
{
{
"MD5",
+ "md5sum",
16,
sizeof(struct mk_MD5Context),
md5_init,
@@ -66,6 +68,7 @@
},
{
"SHA1",
+ "sha1sum",
20,
sizeof(struct sha1_ctx),
sha1_init,
@@ -74,40 +77,53 @@
}
};
-struct _checksum_context
+struct algo_context
{
void *context;
unsigned char *digest;
int enabled;
};
+struct _checksum_context
+{
+ char *owner;
+ struct algo_context algo[NUM_CHECKSUMS];
+};
+
struct checksum_info *checksum_information(enum checksum_types which)
{
return (struct checksum_info *)&algorithms[which];
}
-checksum_context_t *checksum_init_context(int checksums)
+checksum_context_t *checksum_init_context(int checksums, const char *owner)
{
int i = 0;
- struct _checksum_context *context = malloc(NUM_CHECKSUMS * sizeof(struct _checksum_context));
+ struct _checksum_context *context = malloc(sizeof(struct _checksum_context));
if (!context)
return NULL;
+ context->owner = strdup(owner);
+ if (!context->owner)
+ {
+ free(context);
+ return NULL;
+ }
+
for (i = 0; i < NUM_CHECKSUMS; i++)
{
if ( (1 << i) & checksums)
{
- context[i].context = malloc(algorithms[i].context_size);
- if (!context[i].context)
+ context->algo[i].context = malloc(algorithms[i].context_size);
+ if (!context->algo[i].context)
return NULL;
- context[i].digest = malloc(algorithms[i].digest_size);
- if (!context[i].digest)
+ context->algo[i].digest = malloc(algorithms[i].digest_size);
+ if (!context->algo[i].digest)
return NULL;
- algorithms[i].init(context[i].context);
- context[i].enabled = 1;
+ algorithms[i].init(context->algo[i].context);
+ context->algo[i].enabled = 1;
}
else
- context[i].enabled = 0;
+ context->algo[i].enabled = 0;
}
return context;
@@ -120,9 +136,10 @@
for (i = 0; i < NUM_CHECKSUMS; i++)
{
- free(c[i].context);
- free(c[i].digest);
+ free(c->algo[i].context);
+ free(c->algo[i].digest);
}
+ free(c->owner);
free(c);
}
@@ -134,8 +151,8 @@
for (i = 0; i < NUM_CHECKSUMS; i++)
{
- if (c[i].enabled)
- algorithms[i].update(c[i].context, buf, len);
+ if (c->algo[i].enabled)
+ algorithms[i].update(c->algo[i].context, buf, len);
}
}
@@ -146,8 +163,8 @@
for (i = 0; i < NUM_CHECKSUMS; i++)
{
- if (c[i].enabled)
- algorithms[i].final(c[i].digest, c[i].context);
+ if (c->algo[i].enabled)
+ algorithms[i].final(c->algo[i].digest, c->algo[i].context);
}
}
@@ -157,8 +174,90 @@
{
struct _checksum_context *c = context;
- if (c[which].enabled)
- memcpy(digest, c[which].digest, algorithms[which].digest_size);
-}
+ if (c->algo[which].enabled)
+ memcpy(digest, c->algo[which].digest, algorithms[which].digest_size);
+ else
+ fprintf(stderr, "Asked for %s checksum, not enabled!\n",
+ algorithms[which].name);
+}
+
+#ifdef CHECKSUM_SELF_TEST
+#include
+#include
+#include
+#include
+#include
+#include
+
+int main(int argc, char **argv)
+{
+ char buf[1024];
+ int fd = -1;
+ char *filename;
+ int err = 0;
+ static checksum_context_t *test_context = NULL;
+ int i = 0;
+
+ if (argc != 2)
+ {
+ fprintf(stderr, "Need a filename to act on!\n");
+ return 1;
+ }
+
+ filename = argv[1];
+ fd = open(filename, O_RDONLY);
+ if (fd < 0)
+ {
+ fprintf(stderr, "Unable to open file %s, errno %d\n", filename, errno);
+ return 1;
+ }
+
+ test_context = checksum_init_context(CHECK_ALL_USED, "test");
+ if (!test_context)
+ {
+ fprintf(stderr, "Unable to initialise checksum context\n");
+ return 1;
+ }
+
+ while(1)
+ {
+ err = read(fd, buf, sizeof(buf));
+ if (err < 0)
+ {
+ fprintf(stderr, "Failed to read from file, errno %d\n", errno);
+ return 1;
+ }
+ if (err == 0)
+ break; // EOF
+
+ /* else */
+ checksum_update(test_context, buf, err);
+ }
+ close(fd);
+ checksum_final(test_context);
+
+ for (i = 0; i < NUM_CHECKSUMS; i++)
+ {
+ struct checksum_info *info;
+ unsigned char r[64];
+ int j = 0;
+
+ info = checksum_information(i);
+ memset(r, 0, sizeof(r));
+
+ checksum_copy(test_context, i, r);
+
+ printf("OUR %s:\n", info->name);
+ for (j = 0; j < info->digest_size; j++)
+ printf("%2.2x", r[j]);
+ printf(" %s\n", filename);
+ printf("system checksum program (%s):\n", info->prog);
+ sprintf(buf, "%s %s", info->prog, filename);
+ system(buf);
+ printf("\n");
+ }
+ return 0;
+}
+#endif /* CHECKSUM_SELF_TEST */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.7.1/genisoimage/checksum.h new/cdrkit-1.1.8/genisoimage/checksum.h
--- old/cdrkit-1.1.7.1/genisoimage/checksum.h 2008-01-06 04:01:25.000000000 +0100
+++ new/cdrkit-1.1.8/genisoimage/checksum.h 2008-05-25 22:46:17.000000000 +0200
@@ -19,12 +19,14 @@
#define CHECK_MD5_USED (1 << CHECK_MD5)
#define CHECK_SHA1_USED (1 << CHECK_SHA1)
+#define CHECK_ALL_USED 0xFFFFFFFF
typedef void checksum_context_t;
struct checksum_info
{
char *name;
+ char *prog;
int digest_size;
};
@@ -35,7 +37,7 @@
/* Allocate / initialise a context for the chosen checksums. OR
* together the desired checksums as the parameter */
-checksum_context_t *checksum_init_context(int checksums);
+checksum_context_t *checksum_init_context(int checksums, const char *owner);
/* Cleanup and free a context when it's finished with */
void checksum_free_context(checksum_context_t *context);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.7.1/genisoimage/genisoimage.1 new/cdrkit-1.1.8/genisoimage/genisoimage.1
--- old/cdrkit-1.1.7.1/genisoimage/genisoimage.1 2007-03-17 12:59:16.000000000 +0100
+++ new/cdrkit-1.1.8/genisoimage/genisoimage.1 2008-05-26 00:32:46.000000000 +0200
@@ -806,6 +806,12 @@
.B JIGDO NOTES
section below for more information.
.TP
+.BI \-jigdo\-template\-compress " algorithm
+Specify a compression algorithm to use for template date. gzip and
+bzip2 are currently supported, and gzip is the default. See the
+.B JIGDO NOTES
+section below for more information.
+.TP
.BI \-log\-file " log_file"
Redirect all error, warning and informational messages to
.I log_file
@@ -1528,6 +1534,9 @@
.I README.prep_boot
for more information. (Alpha)
.TP
+.BI \-chrp\-boot
+Add CHRP boot header.
+.TP
.BI \-input\-hfs\-charset " charset"
Input charset that defines the characters used in HFS filenames when
used with
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.7.1/genisoimage/genisoimage.c new/cdrkit-1.1.8/genisoimage/genisoimage.c
--- old/cdrkit-1.1.7.1/genisoimage/genisoimage.c 2008-02-25 12:14:07.000000000 +0100
+++ new/cdrkit-1.1.8/genisoimage/genisoimage.c 2008-05-26 00:12:37.000000000 +0200
@@ -413,6 +413,7 @@
#define OPTION_JT_MD5_LIST 1105
#define OPTION_JT_INCLUDE 1106
#define OPTION_JT_EXCLUDE 1107
+#define OPTION_JT_COMPRESS_ALGO 1108
#endif
#define OPTION_BOOTALPHA 1200
@@ -688,6 +689,8 @@
'\0', "PATTERN1=PATTERN2", "Pattern(s) to map paths (e.g. Debian=/mirror/debian)", ONE_DASH },
{{"md5-list", required_argument, NULL, OPTION_JT_MD5_LIST},
'\0', "FILE", "File containing MD5 sums of the files that should be checked", ONE_DASH },
+ {{"jigdo-template-compress", required_argument, NULL, OPTION_JT_COMPRESS_ALGO},
+ '\0', "ALGORITHM", "Choose to use gzip or bzip2 compression for template data; default is gzip", ONE_DASH },
#endif
#ifdef SORTING
@@ -1051,16 +1054,6 @@
{
const char *program_name = "genisoimage";
-#if 0
- fprintf(stderr, "Usage:\n");
- fprintf(stderr,
- "genisoimage [-o outfile] [-R] [-V volid] [-v] [-a] \
-[-T]\n [-l] [-d] [-V] [-D] [-L] [-p preparer]"
- "[-P publisher] [ -A app_id ] [-z] \n \
-[-b boot_image_name] [-c boot_catalog-name] \
-[-x path -x path ...] path\n");
-#endif
-
int i;
/* const char **targets, **pp;*/
@@ -1489,6 +1482,21 @@
#endif
}
break;
+ case OPTION_JT_COMPRESS_ALGO:
+ if (!strcasecmp(optarg, "gzip"))
+ jte_template_compression = JTE_TEMP_GZIP;
+ else if (!strcasecmp(optarg, "bzip2"))
+ jte_template_compression = JTE_TEMP_BZIP2;
+ else
+ {
+#ifdef USE_LIBSCHILY
+ comerrno(EX_BAD, "Compression algorithm %s unknown\n", optarg);
+#else
+ fprintf(stderr, "Compression algorithm %s unknown\n", optarg);
+ exit(1);
+#endif
+ }
+ break;
#endif /* JIGDO_TEMPLATE */
case OPTION_NOBAK:
all_files = 0;
@@ -3033,7 +3041,7 @@
* Create an empty root directory. If we ever scan it for real,
* we will fill in the contents.
*/
- find_or_create_directory(NULL, "", &de, TRUE);
+ find_or_create_directory(NULL, "", &de, TRUE, NULL);
#ifdef APPLE_HYB
/* may need to set window layout of the volume */
@@ -3095,6 +3103,7 @@
char *pnt;
char *xpnt;
size_t len;
+ int node_is_dir;
/* insert -root prefix */
if (reloc_root != NULL) {
@@ -3142,7 +3151,9 @@
status = stat_filter(node, &st);
else
status = lstat_filter(node, &st);
- if (status == 0 && S_ISDIR(st.st_mode)) {
+
+ node_is_dir = S_ISDIR(st.st_mode);
+ if (status == 0 && node_is_dir) {
len = strlen(graft_point);
if ((len <= (sizeof (graft_point) -1)) &&
@@ -3159,6 +3170,8 @@
* Canonicalize the filename while parsing it.
*/
for (;;) {
+ struct stat* stat_template;
+
do {
while (xpnt[0] == '.' && xpnt[1] == '/')
xpnt += 2;
@@ -3186,9 +3199,22 @@
graft_dir->de_name,
graft_point);
}
- graft_dir = find_or_create_directory(graft_dir,
- graft_point,
- NULL, TRUE);
+ /*
+ * If the node being grafted is a
+ * directory, then we want the last
+ * directory in this graft chain to have
+ * the ownership and permissions of the
+ * source node. Other directories in the
+ * chain get default ownership and
+ * permissions.
+ */
+ stat_template =
+ (pnt[1] == '\0' && node_is_dir) ? &st : 0;
+
+ graft_dir = find_or_create_directory(graft_dir,
+ graft_point, NULL, TRUE,
+ stat_template);
+
*pnt = PATH_SEPARATOR;
xpnt = pnt + 1;
}
@@ -3201,8 +3227,7 @@
}
/*
- * Now see whether the user wants to add a regular file, or a
- * directory at this point.
+ * Get information on the node
*/
if (follow_links)
status = stat_filter(node, &st);
@@ -3220,6 +3245,10 @@
exit(1);
#endif
} else {
+ /*
+ * Now see whether the user wants to add a regular
+ * file or a directory at this point.
+ */
if (S_ISDIR(st.st_mode)) {
if (debug) {
fprintf(stderr, "graft_dir: '%s : %s', node: '%s', (scan)\n",
@@ -3375,7 +3404,7 @@
exit(1);
#endif
}
- } else if (outfile) {
+ } else if (outfile && (strcmp (outfile, "-")) != 0) {
discimage = fopen(outfile, "wb");
if (!discimage) {
#ifdef USE_LIBSCHILY
@@ -3406,6 +3435,13 @@
}
write_jt_header(jttemplate, jtjigdo);
}
+ } else if ((outfile == NULL)
+ && isatty (fileno (stdout))) {
+ /* FIXME: a cleaner way to override this check? */
+ fputs (("image not written to a terminal.\n"
+ "Use -o - to force the output.\n"),
+ stderr);
+ exit (1);
} else {
discimage = stdout;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.7.1/genisoimage/genisoimage.h new/cdrkit-1.1.8/genisoimage/genisoimage.h
--- old/cdrkit-1.1.7.1/genisoimage/genisoimage.h 2007-04-12 13:27:04.000000000 +0200
+++ new/cdrkit-1.1.8/genisoimage/genisoimage.h 2008-05-25 23:00:55.000000000 +0200
@@ -433,8 +433,10 @@
extern int lstat_filter(char *, struct stat *);
extern int sort_tree(struct directory *);
extern struct directory *
-find_or_create_directory(struct directory *, const char *,
- struct directory_entry *self, int);
+find_or_create_directory(struct directory *, const char *,
+ struct directory_entry *self,
+ int,
+ struct stat *stat_template);
extern void finish_cl_pl_entries(void);
extern int scan_directory_tree(struct directory *this_dir, char *path,
struct directory_entry *self);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.7.1/genisoimage/joliet.c new/cdrkit-1.1.8/genisoimage/joliet.c
--- old/cdrkit-1.1.7.1/genisoimage/joliet.c 2008-02-27 09:53:29.000000000 +0100
+++ new/cdrkit-1.1.8/genisoimage/joliet.c 2008-05-25 22:21:29.000000000 +0200
@@ -242,8 +242,9 @@
* inplace copy, and we need to make a temporary working copy first.
*/
if (source == NULL) {
- tmpbuf = (Uchar *) e_malloc(size);
+ tmpbuf = (Uchar *) e_malloc(size+1);
memcpy(tmpbuf, buffer, size);
+ tmpbuf[size] = 0;
} else {
tmpbuf = (Uchar *) source;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.7.1/genisoimage/jte.c new/cdrkit-1.1.8/genisoimage/jte.c
--- old/cdrkit-1.1.7.1/genisoimage/jte.c 2008-02-25 12:14:07.000000000 +0100
+++ new/cdrkit-1.1.8/genisoimage/jte.c 2008-05-25 22:46:17.000000000 +0200
@@ -445,7 +445,7 @@
memset(buf, 0, sizeof(buf));
- template_context = checksum_init_context(CHECK_MD5_USED);
+ template_context = checksum_init_context(CHECK_MD5_USED, "template");
if (!template_context)
{
#ifdef USE_LIBSCHILY
@@ -569,7 +569,7 @@
j_file = jigdo_file;
/* Start checksum work for the image */
- iso_context = checksum_init_context(CHECK_MD5_USED|CHECK_SHA1_USED);
+ iso_context = checksum_init_context(CHECK_MD5_USED|CHECK_SHA1_USED, "iso");
if (!iso_context)
{
#ifdef USE_LIBSCHILY
@@ -821,7 +821,6 @@
checksum_final(template_context);
checksum_copy(template_context, CHECK_MD5, &template_md5sum[0]);
-// mk_MD5Final(&template_md5sum[0], &template_context);
fprintf(j_file, "# JigsawDownload\n");
fprintf(j_file, "# See http://atterer.net/jigdo/ for details about jigdo\n");
@@ -834,6 +833,7 @@
fprintf(j_file, "[Image]\n");
fprintf(j_file, "Filename=%s\n", file_base_name(outfile));
fprintf(j_file, "Template=http://localhost/%s\n", jtemplate_out);
+
fprintf(j_file, "Template-MD5Sum=%s \n",
base64_dump(&template_md5sum[0], sizeof(template_md5sum)));
fprintf(j_file, "# Template Hex MD5sum %s\n",
@@ -874,7 +874,6 @@
checksum_final(iso_context);
checksum_copy(iso_context, CHECK_MD5, &image_md5[0]);
checksum_copy(iso_context, CHECK_SHA1, &image_sha1[0]);
-// mk_MD5Final(&md5[0], &iso_context);
/* And calculate the image size */
image_size = (unsigned long long)SECTOR_SIZE * last_extent_written;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.7.1/genisoimage/mac_label.c new/cdrkit-1.1.8/genisoimage/mac_label.c
--- old/cdrkit-1.1.7.1/genisoimage/mac_label.c 2006-12-08 14:38:43.000000000 +0100
+++ new/cdrkit-1.1.8/genisoimage/mac_label.c 2008-05-26 00:19:45.000000000 +0200
@@ -32,8 +32,8 @@
/*
* mac_label.c: generate Mactintosh partition maps and label
*
- * Taken from "genisoimage 1.05 PLUS" by Andy Polyakov
- * (see http://fy.chalmers.se/~appro/genisoimage_plus.html for details)
+ * Taken from "mkisofs 1.05 PLUS" by Andy Polyakov
+ * (see http://fy.chalmers.se/~appro/mkisofs_plus.html for details)
*
* The format of the HFS driver file:
*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.7.1/genisoimage/md5.c new/cdrkit-1.1.8/genisoimage/md5.c
--- old/cdrkit-1.1.7.1/genisoimage/md5.c 2008-02-25 12:14:07.000000000 +0100
+++ new/cdrkit-1.1.8/genisoimage/md5.c 2008-05-25 22:25:37.000000000 +0200
@@ -186,8 +186,6 @@
memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
}
-#ifndef ASM_MD5
-
/* The four core functions - F1 is optimized somewhat */
/* #define F1(x, y, z) (x & y | ~x & z) */
@@ -293,7 +291,6 @@
buf[2] += c;
buf[3] += d;
}
-#endif
/* Read in a hex-dumped MD5 sum and parse it */
int mk_MD5Parse(unsigned char in[33], unsigned char out[16])
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.7.1/genisoimage/multi.c new/cdrkit-1.1.8/genisoimage/multi.c
--- old/cdrkit-1.1.7.1/genisoimage/multi.c 2008-02-25 12:14:07.000000000 +0100
+++ new/cdrkit-1.1.8/genisoimage/multi.c 2008-05-25 23:00:55.000000000 +0200
@@ -1641,7 +1641,7 @@
if (reloc_root && reloc_root[0]) {
/* also decend into new root before searching for files */
- this_dir = find_or_create_directory(this_dir, reloc_root, NULL, TRUE);
+ this_dir = find_or_create_directory(this_dir, reloc_root, NULL, TRUE, NULL);
if (!this_dir) {
return (-1);
}
@@ -1707,7 +1707,7 @@
*/
child = find_or_create_directory(this_dir,
s_entry->whole_name,
- s_entry, 1);
+ s_entry, 1, NULL);
dflag = merge_previous_session(child,
&odpnt->isorec,
NULL, reloc_old_root);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.7.1/genisoimage/sha1.h new/cdrkit-1.1.8/genisoimage/sha1.h
--- old/cdrkit-1.1.7.1/genisoimage/sha1.h 2008-01-06 04:01:25.000000000 +0100
+++ new/cdrkit-1.1.8/genisoimage/sha1.h 2008-05-25 22:39:07.000000000 +0200
@@ -21,7 +21,7 @@
# include
-typedef unsigned long md5_uint32;
+typedef unsigned int md5_uint32;
/* Structure to save state of computation between the single steps. */
struct sha1_ctx
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.7.1/genisoimage/tree.c new/cdrkit-1.1.8/genisoimage/tree.c
--- old/cdrkit-1.1.7.1/genisoimage/tree.c 2008-02-25 12:14:07.000000000 +0100
+++ new/cdrkit-1.1.8/genisoimage/tree.c 2008-05-25 23:00:55.000000000 +0200
@@ -74,8 +74,8 @@
int lstat_filter(char *path, struct stat *st);
static int sort_n_finish(struct directory *this_dir);
static void generate_reloc_directory(void);
-static void attach_dot_entries(struct directory *dirnode,
- struct stat *parent_stat);
+static void attach_dot_entries(struct directory *dirnode, struct stat *dir_stat,
+ struct stat *parent_stat);
static void update_nlink(struct directory_entry *s_entry, int value);
static void increment_nlink(struct directory_entry *s_entry);
char *find_rr_attribute(unsigned char *pnt, int len, char *attr_type);
@@ -95,9 +95,10 @@
void generate_iso9660_directories(struct directory *node,
FILE *outfile);
struct directory *find_or_create_directory(struct directory *parent,
- const char *path,
- struct directory_entry *de,
- int flag);
+ const char *path,
+ struct directory_entry *de,
+ int flag,
+ struct stat* stat_template);
static void delete_directory(struct directory *parent,
struct directory *child);
int sort_tree(struct directory *node);
@@ -284,7 +285,9 @@
*/
if ((this_dir->dir_flags & (DIR_HAS_DOT | DIR_HAS_DOTDOT)) !=
(DIR_HAS_DOT | DIR_HAS_DOTDOT)) {
- attach_dot_entries(this_dir, &fstatbuf);
+ fstatbuf.st_mode = new_dir_mode | S_IFDIR;
+ fstatbuf.st_nlink = 2;
+ attach_dot_entries(this_dir, &fstatbuf, &fstatbuf);
}
flush_file_hash();
s_entry = this_dir->contents;
@@ -840,7 +843,7 @@
/* Now create the . and .. entries in rr_moved */
/* Now create an actual directory entry */
memset(&root_statbuf, 0x0, sizeof(struct stat)); /* be sure */
- attach_dot_entries(reloc_dir, &root_statbuf);
+ attach_dot_entries(reloc_dir, &fstatbuf, &root_statbuf);
}
/*
@@ -848,12 +851,17 @@
*
* Purpose: Create . and .. entries for a new directory.
*
+ * Arguments: dir_stat contains the ownership/permission information
+ * for dirnode, and parent_stat contains
+ * ownership/permission information for its parent
+ *
+ *
* Notes: Only used for artificial directories that
* we are creating.
*/
static void
-attach_dot_entries(struct directory *dirnode,
- struct stat *parent_stat)
+attach_dot_entries(struct directory *dirnode, struct stat *dir_stat,
+ struct stat *parent_stat)
{
struct directory_entry *s_entry;
struct directory_entry *orig_contents;
@@ -894,9 +902,6 @@
orig_contents = s_entry;
if (use_XA || use_RockRidge) {
- if (parent_stat == NULL) {
- parent_stat = &fstatbuf;
- }
generate_xa_rr_attributes("",
"..", s_entry,
parent_stat,
@@ -934,15 +939,12 @@
dirnode->contents->next = orig_contents;
if (use_XA || use_RockRidge) {
- fstatbuf.st_mode = new_dir_mode | S_IFDIR;
- fstatbuf.st_nlink = 2;
if (dirnode == root) {
deep_flag |= NEED_CE | NEED_SP; /* For extension record */
}
- generate_xa_rr_attributes("",
- ".", s_entry,
- &fstatbuf, &fstatbuf, deep_flag);
+ generate_xa_rr_attributes("", ".", s_entry,
+ dir_stat, dir_stat, deep_flag);
}
dirnode->dir_flags |= DIR_HAS_DOT;
}
@@ -1646,11 +1648,11 @@
}
child = find_or_create_directory(reloc_dir,
whole_path,
- s_entry, 1);
+ s_entry, 1, NULL);
} else {
child = find_or_create_directory(this_dir,
whole_path,
- s_entry, 1);
+ s_entry, 1, NULL);
/*
* If unable to scan directory, mark this as a
* non-directory
@@ -1985,14 +1987,14 @@
*/
s_entry1->filedir = reloc_dir;
child = find_or_create_directory(reloc_dir, whole_path,
- s_entry1, 0);
+ s_entry1, 0, NULL);
/* if (!no_scandir)*/
if (!0)
scan_directory_tree(child, whole_path, s_entry1);
s_entry1->filedir = this_dir;
statbuf.st_size = (off_t)0;
- statbuf.st_mode &= 0777;
+// statbuf.st_mode &= 0777;
set_733((char *) s_entry->isorec.size, 0);
s_entry->realsize=0;
s_entry->size = 0;
@@ -2091,7 +2093,7 @@
struct directory *child;
child = find_or_create_directory(this_dir, whole_path,
- s_entry, 1);
+ s_entry, 1, NULL);
if (no_scandir)
dflag = 1;
else
@@ -2217,18 +2219,25 @@
* Function: find_or_create_directory
*
* Purpose: Locate a directory entry in the tree, create if needed.
+ * If a directory is created and stat_template is non-null,
+ * create the directory with ownership, permissions, etc.,
+ * from stat_template, otherwise use fallback defaults.
*
* Arguments: parent & de are never NULL at the same time.
*/
struct directory *
-find_or_create_directory(struct directory *parent, const char *path,
- struct directory_entry *de, int flag)
+find_or_create_directory(struct directory *parent,
+ const char *path,
+ struct directory_entry *de,
+ int flag,
+ struct stat *stat_template)
{
struct directory *dpnt;
struct directory_entry *orig_de;
struct directory *next_brother;
const char *cpnt;
const char *pnt;
+ struct stat my_statbuf;
orig_de = de;
@@ -2287,18 +2296,27 @@
volume_sequence_number);
iso9660_file_length(pnt, de, 1);
+ /*
+ * If we were given a stat template, use it for
+ * ownership/permissions, otherwise use fallback defaults.
+ */
init_fstatbuf();
+ if (stat_template) {
+ my_statbuf = *stat_template;
+ } else {
+ my_statbuf = fstatbuf; /* defaults */
+ my_statbuf.st_mode = new_dir_mode;
+ }
+ my_statbuf.st_mode &= ~S_IFMT; /* zero out file type */
+ my_statbuf.st_mode |= S_IFDIR; /* force to be a directory */
+ my_statbuf.st_nlink = 2;
+
/*
- * It doesn't exist for real, so we cannot add any
- * XA or Rock Ridge attributes.
+ * Apply attributes from my_statbuf to the new directory.
*/
if (use_XA || use_RockRidge) {
- fstatbuf.st_mode = new_dir_mode | S_IFDIR;
- fstatbuf.st_nlink = 2;
- generate_xa_rr_attributes("",
- (char *) pnt, de,
- &fstatbuf,
- &fstatbuf, 0);
+ generate_xa_rr_attributes("", (char *) pnt, de,
+ &my_statbuf, &my_statbuf, 0);
}
iso9660_date(de->isorec.date, fstatbuf.st_mtime);
#ifdef APPLE_HYB
@@ -2310,8 +2328,8 @@
/* fill in the defaults */
memset(hfs_ent, 0, sizeof (hfsdirent));
- hfs_ent->crdate = fstatbuf.st_ctime;
- hfs_ent->mddate = fstatbuf.st_mtime;
+ hfs_ent->crdate = my_statbuf.st_ctime;
+ hfs_ent->mddate = my_statbuf.st_mtime;
de->hfs_ent = hfs_ent;
@@ -2347,6 +2365,7 @@
if (orig_de == NULL) {
struct stat xstatbuf;
+ struct stat parent_statbuf;
int sts;
/*
@@ -2358,16 +2377,19 @@
if (parent == NULL || parent->whole_name[0] == '\0')
sts = -1;
else
- sts = stat_filter(parent->whole_name, &xstatbuf);
+ sts = stat_filter(parent->whole_name, &parent_statbuf);
+
+ if (sts != 0) {
+ parent_statbuf = fstatbuf;
+ parent_statbuf.st_mode = new_dir_mode | S_IFDIR;
+ parent_statbuf.st_nlink = 2;
+ }
+
if (debug && parent) {
fprintf(stderr, "stat parent->whole_name: '%s' -> %d.\n",
parent->whole_name, sts);
}
- if (sts == 0) {
- attach_dot_entries(dpnt, &xstatbuf);
- } else {
- attach_dot_entries(dpnt, &fstatbuf);
- }
+ attach_dot_entries(dpnt, &my_statbuf, &parent_statbuf);
}
if (!parent || parent == root) {
if (!root) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.7.1/VERSION new/cdrkit-1.1.8/VERSION
--- old/cdrkit-1.1.7.1/VERSION 2008-03-17 22:28:37.000000000 +0100
+++ new/cdrkit-1.1.8/VERSION 2008-05-26 00:30:33.000000000 +0200
@@ -1 +1 @@
-1.1.7.1
+1.1.8
++++++ genisoimage-multi-extent.patch ++++++
++++ 1383 lines (skipped)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org