diff options
author | Koen Kooi <koen@openembedded.org> | 2011-01-01 16:05:26 +0100 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2011-01-01 16:05:26 +0100 |
commit | 205967623b344dc68693e5a26b649c78954bd8f2 (patch) | |
tree | d09626eb6b6d6712974d0e06b49256c7bcc019f6 /recipes/udf | |
parent | a9234023e22f7c3598cdd9d69c638888d0d8e6e5 (diff) | |
download | openembedded-205967623b344dc68693e5a26b649c78954bd8f2.tar.gz |
udftools: add 1.0.0b3 with debian patches
Signed-off-by: Koen Kooi <koen@openembedded.org>
Diffstat (limited to 'recipes/udf')
-rw-r--r-- | recipes/udf/udftools/patch-01-pktsetup-chardev.diff | 346 | ||||
-rw-r--r-- | recipes/udf/udftools/patch-02-pktsetup-exitstatus.diff | 126 | ||||
-rw-r--r-- | recipes/udf/udftools/patch-03-mkudffs-bigendian.diff | 36 | ||||
-rw-r--r-- | recipes/udf/udftools/patch-04-wrudf-gcc4.diff | 53 | ||||
-rw-r--r-- | recipes/udf/udftools/patch-05-pktsetup-manpage.diff | 126 | ||||
-rw-r--r-- | recipes/udf/udftools/patch-06-wrudf-lvalue.diff | 11 | ||||
-rw-r--r-- | recipes/udf/udftools/patch-07-cdrwtool-manpage.diff | 106 | ||||
-rw-r--r-- | recipes/udf/udftools/patch-08-mkudffs-manpage.diff | 15 | ||||
-rw-r--r-- | recipes/udf/udftools/patch-09-include-stringh.diff | 42 | ||||
-rw-r--r-- | recipes/udf/udftools/patch-10-mkudffs-open-error.diff | 31 | ||||
-rw-r--r-- | recipes/udf/udftools/patch-11-udftools-limits-h.diff | 10 | ||||
-rw-r--r-- | recipes/udf/udftools/patch-12-pktsetup-limits-h.diff | 10 | ||||
-rw-r--r-- | recipes/udf/udftools_1.0.0b3.bb | 28 |
13 files changed, 940 insertions, 0 deletions
diff --git a/recipes/udf/udftools/patch-01-pktsetup-chardev.diff b/recipes/udf/udftools/patch-01-pktsetup-chardev.diff new file mode 100644 index 0000000000..5ef0825426 --- /dev/null +++ b/recipes/udf/udftools/patch-01-pktsetup-chardev.diff @@ -0,0 +1,346 @@ +From: Peter Osterlund <petero2@telia.com> +Subject: Re: [RFC][PATCH] Control pktcdvd with an auxiliary character device +To: linux-kernel@vger.kernel.org +Cc: Christoph Hellwig <hch@infradead.org>, Arnd Bergmann <arnd@arndb.de>, + Jens Axboe <axboe@suse.de>, Andrew Morton <akpm@osdl.org> +Date: Wed Jul 14 02:17:27 2004 +0200 + +Peter Osterlund <petero2@telia.com> writes: + +> Peter Osterlund <petero2@telia.com> writes: +> +> > Christoph Hellwig <hch@infradead.org> writes: +> > +> > > On Sun, Jul 11, 2004 at 01:20:45AM +0200, Arnd Bergmann wrote: +> > > > These are actually incorrect definitions since the ioctl argument is +> > > > not a pointer to unsigned int but instead just an int. However, that's +> > > > too late to fix without breaking the existing tools. +> > > +> > > The tools need to change anyway to get away from the broken behaviour to +> > > issue in ioctl on the actual block device to bind it.. +> > +> > OK, I'll create a patch that gets rid of the ioctl interface and uses +> > an auxiliary character device instead to control device bindings. +> +> Here is a patch for 2.6.7-mm7 that does that. The driver creates a +> misc character device and bind/unbind of the block devices are +> controlled by ioctl commands on the char device. +> +> This patch needs corresponding changes in the pktsetup user space +> program. I'll post a patch for pktsetup as a separate message. + +And here is a patch for udftools-1.0.0b3 that updates the pktsetup +program to make it able to use the character device for block device +setup/teardown. + +--- + + udftools-1.0.0b3-petero/pktsetup/pktsetup.c | 245 +++++++++++++++++++++++++++- + 1 files changed, 238 insertions(+), 7 deletions(-) + +diff -puN pktsetup/pktsetup.c~pktsetup-char-dev pktsetup/pktsetup.c +--- udftools-1.0.0b3/pktsetup/pktsetup.c~pktsetup-char-dev 2004-07-12 19:57:51.000000000 +0200 ++++ udftools-1.0.0b3-petero/pktsetup/pktsetup.c 2004-07-14 00:34:02.471317888 +0200 +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 1999,2000 Jens Axboe <axboe@suse.de> ++ * Copyright (c) 2004 Peter Osterlund <petero2@telia.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -19,6 +20,7 @@ + #include <stdio.h> + #include <fcntl.h> + #include <sys/ioctl.h> ++#include <sys/stat.h> + #include <unistd.h> + #include <getopt.h> + #include <bits/types.h> +@@ -33,8 +35,33 @@ + #define PACKET_SETUP_DEV _IOW('X', 1, unsigned int) + #define PACKET_TEARDOWN_DEV _IOW('X', 2, unsigned int) + #endif ++#ifndef PACKET_CTRL_CMD ++#define PACKET_CTRL_CMD _IOWR('X', 1, struct pkt_ctrl_command) ++#endif ++ ++#define MAJOR(dev) ((dev & 0xfff00) >> 8) ++#define MINOR(dev) ((dev & 0xff) | ((dev >> 12) & 0xfff00)) ++#define MKDEV(ma,mi) ((mi & 0xff) | (ma << 8) | ((mi & ~0xff) << 12)) ++ ++#define MISC_MAJOR 10 ++#define CTL_DIR "/dev/pktcdvd" ++#define CTL_DEV "control" ++ ++#define PKT_CTRL_CMD_SETUP 0 ++#define PKT_CTRL_CMD_TEARDOWN 1 ++#define PKT_CTRL_CMD_STATUS 2 ++ ++struct pkt_ctrl_command { ++ __u32 command; /* in: Setup, teardown, status */ ++ __u32 dev_index; /* in/out: Device index */ ++ __u32 dev; /* in/out: Device nr for cdrw device */ ++ __u32 pkt_dev; /* out: Device nr for packet device */ ++ __u32 num_devices; /* out: Largest device index + 1 */ ++ __u32 padding; ++}; ++ + +-int init_cdrom(int fd) ++static int init_cdrom(int fd) + { + if (ioctl(fd, CDROM_DRIVE_STATUS, CDSL_CURRENT) < 0) { + perror("drive not ready\n"); +@@ -54,7 +81,7 @@ int init_cdrom(int fd) + return 0; + } + +-void setup_dev(char *pkt_device, char *device, int rem) ++static void setup_dev(char *pkt_device, char *device, int rem) + { + int pkt_fd, dev_fd, cmd; + +@@ -88,29 +115,233 @@ void setup_dev(char *pkt_device, char *d + close(pkt_fd); + } + +-int usage(void) ++static int usage(void) + { +- printf("pktsetup /dev/pktcdvd0 /dev/cdrom\tsetup device\n"); +- printf("pktsetup -d /dev/pktcdvd0\t\ttear down device\n"); ++ printf("For pktcdvd < 0.2.0:\n"); ++ printf(" pktsetup /dev/pktcdvd0 /dev/cdrom setup device\n"); ++ printf(" pktsetup -d /dev/pktcdvd0 tear down device\n"); ++ printf("For pktcdvd >= 0.2.0:\n"); ++ printf(" pktsetup dev_name /dev/cdrom setup device\n"); ++ printf(" pktsetup -d dev_name tear down device\n"); ++ printf(" pktsetup -d major:minor tear down device\n"); ++ printf(" pktsetup -s show device mappings\n"); + return 1; + } + ++/* ++ * Find the minor device number for the pktcdvd control device. ++ */ ++static int get_misc_minor(void) ++{ ++ int minor; ++ char name[64]; ++ FILE *f; ++ ++ if ((f = fopen("/proc/misc", "r")) == NULL) ++ return -1; ++ while (fscanf(f, " %d %64s", &minor, name) == 2) { ++ if (strcmp(name, "pktcdvd") == 0) { ++ fclose(f); ++ return minor; ++ } ++ } ++ fclose(f); ++ return -1; ++} ++ ++static const char *pkt_dev_name(const char *dev) ++{ ++ static char buf[128]; ++ snprintf(buf, sizeof(buf), "%s/%s", CTL_DIR, dev); ++ return buf; ++} ++ ++static void create_ctl_dev(void) ++{ ++ int misc_minor; ++ struct stat stat_buf; ++ int dev; ++ ++ if ((misc_minor = get_misc_minor()) < 0) { ++ system("/sbin/modprobe pktcdvd"); ++ misc_minor = get_misc_minor(); ++ } ++ if (misc_minor < 0) { ++ fprintf(stderr, "Can't find pktcdvd character device\n"); ++ return; ++ } ++ dev = MKDEV(MISC_MAJOR, misc_minor); ++ ++ if ((stat(pkt_dev_name(CTL_DEV), &stat_buf) >= 0) && ++ S_ISCHR(stat_buf.st_mode) && (stat_buf.st_rdev == dev)) ++ return; /* Already set up */ ++ ++ mkdir(CTL_DIR, 0755); ++ unlink(pkt_dev_name(CTL_DEV)); ++ mknod(pkt_dev_name(CTL_DEV), S_IFCHR | 0644, dev); ++} ++ ++static int remove_stale_dev_node(int ctl_fd, char *devname) ++{ ++ struct stat stat_buf; ++ int i, dev; ++ struct pkt_ctrl_command c; ++ ++ if (stat(pkt_dev_name(devname), &stat_buf) < 0) ++ return 0; ++ if (!S_ISBLK(stat_buf.st_mode)) ++ return 1; ++ dev = stat_buf.st_rdev; ++ memset(&c, 0, sizeof(struct pkt_ctrl_command)); ++ for (i = 0; ; i++) { ++ c.command = PKT_CTRL_CMD_STATUS; ++ c.dev_index = i; ++ if (ioctl(ctl_fd, PACKET_CTRL_CMD, &c) < 0) { ++ perror("ioctl"); ++ return 1; ++ } ++ if (i >= c.num_devices) ++ break; ++ if (c.pkt_dev == dev) ++ return 1; /* busy */ ++ } ++ unlink(pkt_dev_name(devname)); ++ return 0; ++} ++ ++static void setup_dev_chardev(char *pkt_device, char *device, int rem) ++{ ++ struct pkt_ctrl_command c; ++ struct stat stat_buf; ++ int ctl_fd, dev_fd; ++ ++ memset(&c, 0, sizeof(struct pkt_ctrl_command)); ++ ++ create_ctl_dev(); ++ if ((ctl_fd = open(pkt_dev_name(CTL_DEV), O_RDONLY)) < 0) { ++ perror("ctl open"); ++ return; ++ } ++ ++ if (!rem) { ++ if ((dev_fd = open(device, O_RDONLY | O_NONBLOCK)) == -1) { ++ perror("open cd-rom"); ++ goto out_close; ++ } ++ if (init_cdrom(dev_fd)) { ++ close(dev_fd); ++ goto out_close; ++ } ++ close(dev_fd); ++ ++ if (stat(device, &stat_buf) < 0) { ++ perror("stat cd-rom"); ++ goto out_close; ++ } ++ if (!S_ISBLK(stat_buf.st_mode)) { ++ fprintf(stderr, "Not a block device\n"); ++ goto out_close; ++ } ++ c.command = PKT_CTRL_CMD_SETUP; ++ c.dev = stat_buf.st_rdev; ++ ++ if (remove_stale_dev_node(ctl_fd, pkt_device) != 0) { ++ fprintf(stderr, "Device node '%s' already in use\n", pkt_device); ++ goto out_close; ++ } ++ if (ioctl(ctl_fd, PACKET_CTRL_CMD, &c) < 0) { ++ perror("ioctl"); ++ goto out_close; ++ } ++ mknod(pkt_dev_name(pkt_device), S_IFBLK | 0640, c.pkt_dev); ++ } else { ++ int major, minor, remove_node; ++ ++ if ((stat(pkt_dev_name(pkt_device), &stat_buf) >= 0) && ++ S_ISBLK(stat_buf.st_mode)) { ++ major = MAJOR(stat_buf.st_rdev); ++ minor = MINOR(stat_buf.st_rdev); ++ remove_node = 1; ++ } else if (sscanf(pkt_device, "%d:%d", &major, &minor) == 2) { ++ remove_node = 0; ++ } else { ++ fprintf(stderr, "Can't find major/minor numbers\n"); ++ goto out_close; ++ } ++ ++ c.command = PKT_CTRL_CMD_TEARDOWN; ++ c.pkt_dev = MKDEV(major, minor); ++ if (ioctl(ctl_fd, PACKET_CTRL_CMD, &c) < 0) { ++ perror("ioctl"); ++ goto out_close; ++ } ++ if (remove_node) ++ unlink(pkt_dev_name(pkt_device)); ++ } ++ ++out_close: ++ close(ctl_fd); ++} ++ ++static void show_mappings(void) ++{ ++ struct pkt_ctrl_command c; ++ int ctl_fd, i; ++ ++ memset(&c, 0, sizeof(struct pkt_ctrl_command)); ++ ++ create_ctl_dev(); ++ if ((ctl_fd = open(pkt_dev_name(CTL_DEV), O_RDONLY)) < 0) { ++ perror("ctl open"); ++ return; ++ } ++ ++ for (i = 0; ; i++) { ++ c.command = PKT_CTRL_CMD_STATUS; ++ c.dev_index = i; ++ if (ioctl(ctl_fd, PACKET_CTRL_CMD, &c) < 0) { ++ perror("ioctl"); ++ goto out_close; ++ } ++ if (i >= c.num_devices) ++ break; ++ if (c.dev) { ++ printf("%2d : %d:%d -> %d:%d\n", ++ i, MAJOR(c.pkt_dev), MINOR(c.pkt_dev), ++ MAJOR(c.dev), MINOR(c.dev)); ++ } ++ } ++ ++out_close: ++ close(ctl_fd); ++} ++ + int main(int argc, char **argv) + { + int rem = 0, c; ++ char *pkt_device; ++ char *device; + + if (argc == 1) + return usage(); + +- while ((c = getopt(argc, argv, "d")) != EOF) { ++ while ((c = getopt(argc, argv, "ds?")) != EOF) { + switch (c) { + case 'd': + rem = 1; + break; ++ case 's': ++ show_mappings(); ++ return 0; + default: + return usage(); + } + } +- setup_dev(argv[optind], argv[optind + 1], rem); ++ pkt_device = argv[optind]; ++ device = argv[optind + 1]; ++ if (strchr(pkt_device, '/')) ++ setup_dev(pkt_device, device, rem); ++ else ++ setup_dev_chardev(pkt_device, device, rem); + return 0; + } +_ + +-- +Peter Osterlund - petero2@telia.com +http://w1.894.telia.com/~u89404340 diff --git a/recipes/udf/udftools/patch-02-pktsetup-exitstatus.diff b/recipes/udf/udftools/patch-02-pktsetup-exitstatus.diff new file mode 100644 index 0000000000..92552c4277 --- /dev/null +++ b/recipes/udf/udftools/patch-02-pktsetup-exitstatus.diff @@ -0,0 +1,126 @@ +From: Henrique de Moraes Holschuh <hmh@debian.org> +To: Debian Bug Tracking System <submit@bugs.debian.org> +Subject: Bug#223266: pktsetup: please return meaningful exit status on errors +Date: Sun, 7 Dec 2003 17:03:35 -0200 + +pktsetup seems to always return exit status 0 (ok) even when something +goes wrong. + +Stuff like: + trying to register an already registered device + trying to de-register an unbound device + +should return a non-zero exit status. + +--- ./pktsetup/pktsetup.c.orig 2007-11-30 16:39:48.580250640 +0100 ++++ ./pktsetup/pktsetup.c 2007-11-30 16:36:48.569992440 +0100 +@@ -81,13 +82,13 @@ + return 0; + } + +-static void setup_dev(char *pkt_device, char *device, int rem) ++static int setup_dev(char *pkt_device, char *device, int rem) + { + int pkt_fd, dev_fd, cmd; + + if ((pkt_fd = open(pkt_device, O_RDONLY | O_CREAT)) == -1) { + perror("open packet device"); +- return; ++ return 1; + } + + if (!rem) { +@@ -95,24 +96,29 @@ + if ((dev_fd = open(device, O_RDONLY | O_NONBLOCK)) == -1) { + perror("open cd-rom"); + close(pkt_fd); +- return; ++ return 1; + } + if (init_cdrom(dev_fd)) { + close(pkt_fd); + close(dev_fd); +- return; ++ return 0; ++ } else { ++ return 1; + } + } else { + cmd = PACKET_TEARDOWN_DEV; + dev_fd = 0; /* silence gcc */ + } + +- if (ioctl(pkt_fd, cmd, dev_fd) == -1) ++ if (ioctl(pkt_fd, cmd, dev_fd) == -1) { + perror("ioctl"); ++ return 1; ++ } + + if (dev_fd) + close(dev_fd); + close(pkt_fd); ++ return 0; + } + + static int usage(void) +@@ -209,18 +215,19 @@ + return 0; + } + +-static void setup_dev_chardev(char *pkt_device, char *device, int rem) ++static int setup_dev_chardev(char *pkt_device, char *device, int rem) + { + struct pkt_ctrl_command c; + struct stat stat_buf; + int ctl_fd, dev_fd; ++ int ret = 1; + + memset(&c, 0, sizeof(struct pkt_ctrl_command)); + + create_ctl_dev(); + if ((ctl_fd = open(pkt_dev_name(CTL_DEV), O_RDONLY)) < 0) { + perror("ctl open"); +- return; ++ return 1; + } + + if (!rem) { +@@ -254,6 +261,7 @@ + goto out_close; + } + mknod(pkt_dev_name(pkt_device), S_IFBLK | 0640, c.pkt_dev); ++ ret = 0; + } else { + int major, minor, remove_node; + +@@ -275,12 +283,17 @@ + perror("ioctl"); + goto out_close; + } +- if (remove_node) +- unlink(pkt_dev_name(pkt_device)); ++ if (remove_node) { ++ if (unlink(pkt_dev_name(pkt_device)) == 0) ++ ret = 0; ++ } else { ++ ret = 0; ++ } + } + + out_close: + close(ctl_fd); ++ return ret; + } + + static void show_mappings(void) +@@ -340,8 +353,7 @@ + pkt_device = argv[optind]; + device = argv[optind + 1]; + if (strchr(pkt_device, '/')) +- setup_dev(pkt_device, device, rem); ++ return setup_dev(pkt_device, device, rem); + else +- setup_dev_chardev(pkt_device, device, rem); +- return 0; ++ return setup_dev_chardev(pkt_device, device, rem); + } diff --git a/recipes/udf/udftools/patch-03-mkudffs-bigendian.diff b/recipes/udf/udftools/patch-03-mkudffs-bigendian.diff new file mode 100644 index 0000000000..3209262717 --- /dev/null +++ b/recipes/udf/udftools/patch-03-mkudffs-bigendian.diff @@ -0,0 +1,36 @@ +Date: Sun, 12 Dec 2004 14:25:09 +0100 +From: Christoph Hellwig <hch@lst.de> +To: submit@bugs.debian.org + +Package: udftools +Version: 1.0.0b3-6 + +mkduffs crashes with a segmentation fault when trying to create a +filesystem on big-endian systems. e.g. mkudffs /dev/sda4 on my +PowerMac. + +udffstools from CVS on sf.net is fine, and I've extracted the actual +fix: + + +diff -uNr -Xdontdiff -p udftools-1.0.0b3/mkudffs/mkudffs.c udftools/mkudffs/mkudffs.c +--- udftools-1.0.0b3/mkudffs/mkudffs.c 2004-02-23 04:35:33.000000000 +0100 ++++ udftools/mkudffs/mkudffs.c 2004-03-02 03:09:39.000000000 +0100 +@@ -250,14 +250,14 @@ void split_space(struct udf_disc *disc) + if (size % offsets[PSPACE_SIZE]) + size -= (size % offsets[PSPACE_SIZE]); + set_extent(disc, PSPACE, start, size); +- for (i=0; i<disc->udf_lvd[0]->numPartitionMaps; i++) ++ for (i=0; i<le32_to_cpu(disc->udf_lvd[0]->numPartitionMaps); i++) + { + if (i == 1) + disc->udf_lvid->freeSpaceTable[i] = cpu_to_le32(0xFFFFFFFF); + else + disc->udf_lvid->freeSpaceTable[i] = cpu_to_le32(size); + } +- for (j=0; j<disc->udf_lvd[0]->numPartitionMaps; j++) ++ for (j=0; j<le32_to_cpu(disc->udf_lvd[0]->numPartitionMaps); j++) + { + if (j == 1) + disc->udf_lvid->sizeTable[i+j] = cpu_to_le32(0xFFFFFFFF); + diff --git a/recipes/udf/udftools/patch-04-wrudf-gcc4.diff b/recipes/udf/udftools/patch-04-wrudf-gcc4.diff new file mode 100644 index 0000000000..13690123a5 --- /dev/null +++ b/recipes/udf/udftools/patch-04-wrudf-gcc4.diff @@ -0,0 +1,53 @@ +Subject: Bug#288621: udftools: FTBFS (amd64/gcc-4.0): invalid lvalue in assignment +From: Andreas Jochens <aj@andaco.de> +Message-Id: <E1CltQT-00068G-Sy@localhost.localdomain> +Date: Tue, 04 Jan 2005 19:29:01 +0100 +Lines: 59 + +Package: udftools +Severity: normal +Tags: patch + +When building 'udftools' on amd64 with gcc-4.0, +I get the following error: + +wrudf.c:119: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness +wrudf.c:119: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness +wrudf.c:119: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness +wrudf.c:119: warning: pointer targets in passing argument 1 of 'strncmp' differ in signedness +wrudf.c:230: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness +wrudf.c:230: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness +wrudf.c:230: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness +wrudf.c:230: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness +wrudf.c:230: warning: pointer targets in passing argument 1 of 'strncmp' differ in signedness +wrudf.c:245: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness +wrudf.c:245: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness +wrudf.c:245: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness +wrudf.c:245: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness +wrudf.c:245: warning: pointer targets in passing argument 1 of 'strncmp' differ in signedness +wrudf.c:248: error: invalid lvalue in assignment +make[2]: *** [wrudf.o] Error 1 +make[2]: Leaving directory `/udftools-1.0.0b3/wrudf' + +With the attached patch 'udftools' can be compiled +on amd64 using gcc-4.0. + +The patch also changes the Build-Depends from 'libreadline4-dev' +to 'libreadline5-dev'. + +Regards +Andreas Jochens + +diff -urN ../tmp-orig/udftools-1.0.0b3/wrudf/wrudf.c ./wrudf/wrudf.c +--- ../tmp-orig/udftools-1.0.0b3/wrudf/wrudf.c 2002-11-26 08:18:51.000000000 +0100 ++++ ./wrudf/wrudf.c 2005-01-04 16:56:49.394078200 +0100 +@@ -245,7 +245,7 @@ + } else if( strncmp( spm->partIdent.ident, UDF_ID_VIRTUAL, strlen(UDF_ID_VIRTUAL)) == 0 ) + virtualPartitionNum = i; + } +- (char*)spm += spm->partitionMapLength; ++ spm = (char*)spm + spm->partitionMapLength; + } + + if( medium == CDR ) { +diff -urN ../tmp-orig/udftools-1.0.0b3/debian/control ./debian/control diff --git a/recipes/udf/udftools/patch-05-pktsetup-manpage.diff b/recipes/udf/udftools/patch-05-pktsetup-manpage.diff new file mode 100644 index 0000000000..2b093c4f65 --- /dev/null +++ b/recipes/udf/udftools/patch-05-pktsetup-manpage.diff @@ -0,0 +1,126 @@ +Date: Thu, 06 Jan 2005 02:04:10 -0500 +From: A Costa <agcosta@gis.net> +Reply-To: A Costa <agcosta@gis.net>, 288896@bugs.debian.org +Sender: A Costa <alfie@Arf> +To: Debian Bug Tracking System <submit@bugs.debian.org> +Subject: Bug#288896: udftools: 'man pktsetup' links to obsolete "http://packet-cd.sourceforge.net/" + +Package: udftools +Version: 1.0.0b3-9 +Severity: normal + + + % man pktsetup | grep -n http + 19: See: http://packet-cd.sourceforge.net/ + 55: http://linux-udf.sourceforge.net. + +The web page in #19 hasn't been updated since 2001. It's a time waster. + +The web page in #55 says "copyright 1999" at the bottom. + +Suggest: + + 19: See /usr/share/doc/udftools/README.Debian + 55: http://sourceforge.net/projects/linux-udf/ + + + + +--- ./doc/pktsetup.8.orig 2005-10-03 13:11:38.000000000 +0000 ++++ ./doc/pktsetup.8 2005-10-03 13:14:16.000000000 +0000 +@@ -45,9 +45,7 @@ + used as a read/write filesystem. This requires kernel support for + the packet device, and the UDF filesystem. + .PP +-See: +-.UR +-http://packet-cd.sourceforge.net/ ++See /usr/share/doc/udftools/README.Debian for more information. + .UE + + .SH EXIT STATUS +@@ -87,7 +85,7 @@ + .SH AVAILABILITY + .B pktsetup + is part of the udftools package and is available from +-http://linux-udf.sourceforge.net. ++http://sourceforge.net/projects/linux-udf/ + + .SH "SEE ALSO" + .BR cdrwtool (1) + +----------------------------------------------------------------- + +From: Carsten Grohmann <carstengrohmann@gmx.de> +To: "Debian Bug Tracking System" <submit@bugs.debian.org> +Subject: Bug#414801: udftools: man pktsetup: Wrong device names in "EXAMPLE" and "FILES" sections +Date: Tue, 13 Mar 2007 22:56:04 +0100 + +The device files are moved in the seprate directory /dev/pktcdvd/. The +current files are /dev/pktcdvd/control,/dev/pktcdvd/0, ... The major +device number has changed too. + +The example section used the wrong path names. Calling +"pktsetup /dev/pktcdvd0 /dev/sr0" prints an error message like +"ioctl: Inappropriate ioctl for device". + +The new syntax works fine: +pktsetup 0 /dev/sr0 +pktsetup -d 0 + +And could you add the option "-s" too? + +Thanks + +--- ./doc/pktsetup.8.orig 2007-11-30 13:10:51.865824000 +0100 ++++ ./doc/pktsetup.8 2007-11-30 13:25:14.915006370 +0100 +@@ -37,6 +37,9 @@ + .B pktsetup + .B \-d + .I packet_device ++.br ++.B pktsetup ++.B \-s + .ad b + .SH DESCRIPTION + .B Pktsetup +@@ -59,29 +62,36 @@ + Delete the association between the specified \fIpacket-device\fP + and its block device. + ++.IP "\fB\-s\fP" ++Show the current device mapping, one device per line, in the format ++ \fIname\fP : \fIpktdevid\fP -> \fIblkdevid\fP ++.br ++(e.g. "0 : 253:0 -> 22:0") ++ + .SH EXAMPLE + The following commands provide an example of using the + packet device. + .nf + .IP + cdrwtool -d /dev/sr0 -q +-pktsetup /dev/pktcdvd0 /dev/sr0 ++pktsetup 0 /dev/sr0 + + mount -t udf /dev/pktcdvd0 /mnt + ... + umount /dev/pktcdvd0 +-pktsetup -d /dev/pktcdvd0 ++pktsetup -d 0 + .fi + .LP + + .SH FILES + .nf +-/dev/pktcdvd0,/dev/pktcdvd1,... CD/DVD packet devices (block major=97) ++/dev/pktcdvd0,/dev/pktcdvd1,... CD/DVD packet devices + .fi + + .SH AUTHOR + .nf + Jens Axboe <axboe@suse.de> ++Some additions by Richard Atterer <atterer@debian.org> + .fi + + .SH AVAILABILITY diff --git a/recipes/udf/udftools/patch-06-wrudf-lvalue.diff b/recipes/udf/udftools/patch-06-wrudf-lvalue.diff new file mode 100644 index 0000000000..9922f4ea30 --- /dev/null +++ b/recipes/udf/udftools/patch-06-wrudf-lvalue.diff @@ -0,0 +1,11 @@ +--- ./wrudf/wrudf.c.orig 2007-11-30 12:09:29.655986820 +0100 ++++ ./wrudf/wrudf.c 2007-11-30 12:10:09.658266420 +0100 +@@ -245,7 +245,7 @@ + } else if( strncmp( spm->partIdent.ident, UDF_ID_VIRTUAL, strlen(UDF_ID_VIRTUAL)) == 0 ) + virtualPartitionNum = i; + } +- spm = (char*)spm + spm->partitionMapLength; ++ spm = (struct sparablePartitionMap*)((char*)spm + spm->partitionMapLength); + } + + if( medium == CDR ) { diff --git a/recipes/udf/udftools/patch-07-cdrwtool-manpage.diff b/recipes/udf/udftools/patch-07-cdrwtool-manpage.diff new file mode 100644 index 0000000000..182e35a36d --- /dev/null +++ b/recipes/udf/udftools/patch-07-cdrwtool-manpage.diff @@ -0,0 +1,106 @@ +Date: Tue, 17 May 2005 23:54:35 -0400 +From: A Costa <agcosta@gis.net> +Reply-To: A Costa <agcosta@gis.net>, 309572@bugs.debian.org +Sender: A Costa <alfie@Arf> +To: Debian Bug Tracking System <submit@bugs.debian.org> +Subject: Bug#309572: 'man cdrwtool' typo: "pktsetup (8)" instead of "pktsetup (1)" + +Found a typo in '/usr/share/man/man1/cdrwtool.1.gz', see attached '.diff'. + + +Reason why it should be "1" and not "8": + +Since there's no section #8 man page... + + % dlocate -L udftools | grep "pktsetup.[1-9].gz" + /usr/share/man/man1/pktsetup.1.gz + +...programs like 'pinfo' link to nowhere if you click +on 'pktsetup (8)'. + + + +--- ./doc/cdrwtool.1.orig 2005-10-03 13:11:38.000000000 +0000 ++++ ./doc/cdrwtool.1 2005-10-03 13:14:16.000000000 +0000 +@@ -140,4 +140,4 @@ + http://linux-udf.sourceforge.net. + + .SH "SEE ALSO" +-.BR pktsetup (8) ++.BR pktsetup (1) + +-------------------------------------------------------------------------- + +From: A Costa <agcosta@gis.net> +To: Debian Bug Tracking System <submit@bugs.debian.org> +Subject: Bug#288355: udftools: 'man cdrwtool' should describe the '-q' switch +Date: Mon, 03 Jan 2005 03:47:34 -0500 + +The '-q' switch is mentioned twice in the 'cdrwtool' man page: +...but under OPTIONS there's no description of what '-q' does. + +--- ./doc/cdrwtool.1.orig 2007-11-30 11:25:24.005219775 +0100 ++++ ./doc/cdrwtool.1 2007-11-30 11:28:47.516817240 +0100 +@@ -83,6 +83,9 @@ + .IP "\fB\-u \fIlength\fP" + Make a UDF filesystem using \fIlength\fP number of blocks. + ++.IP "\fB\-q\fP" ++`Quick setup': blank the disc, format it as one large track and write a UDF filesystem. ++ + .IP "\fB\-m \fIoffset\fP" + Format the disc at \fIoffset\fP number of blocks. + +-------------------------------------------------------------------------- + +From: Jari Aalto <jari.aalto@cante.net> +To: Debian Bug Tracking System <submit@bugs.debian.org> +Subject: Bug#372093: udftools: cdrwtool [manual] Mention default settings and clarify options -l +Date: Thu, 08 Jun 2006 11:54:13 +0300 + +-l -w -p: +The -s option changes these parameters, but the documentation does +not mention what are the default values. Please add word "(default)" +next to the choices, like: +-p type + Set packet type. Either `0' (default) or `1', corresponding to variable and + fixed packet sizes respectively. + + +--- ./doc/cdrwtool.1.orig 2007-11-30 12:19:02.688642090 +0100 ++++ ./doc/cdrwtool.1 2007-11-30 12:27:20.216994615 +0100 +@@ -101,6 +101,8 @@ + Set write parameters determined by + .BR "\-l" , " \-w" ", and" " \-p" + options for the disc. ++.br ++(Note by your Debian maintainer: Apparently this option does nothing.) + + .IP "\fB\-v \fIversion\fP" + Specify the udf revision to use. Valid revisions are 0x0201, 0x0200, 0x0150, +@@ -116,14 +116,14 @@ + .IP "\fB\-t \fIspeed\fP" + Set write speed. (Defaults to 12x ?) + .IP "\fB\-l \fItype\fP" +-Set multi\-session field. Either `0', `1', or `3', corresponding to ++Set multi\-session field. Either `0' (default), `1', or `3', corresponding to + `No B0 pointer. Next Session not allowed', + `B0 pointer = FF:FF:FF. Next session not allowed', and + `Next session allowed. B0 pointer = next possible program area' respectively. + .IP "\fB\-w \fImode\fP" +-Set write mode. Either `mode1' or `mode2'. ++Set write mode. Either `mode1' or `mode2' (default). + .IP "\fB\-p \fItype\fP" +-Set packet type. Either `0' or `1', corresponding to ++Set packet type. Either `0' or `1' (default), corresponding to + variable and fixed packet sizes respectively. + .IP "\fB\-o \fIoffset\fP" + Set write offset. +@@ -132,6 +132,7 @@ + .nf + Jens Axboe <axboe@suse.de> + Ben Fennema <bfennema@falcon.csc.calpoly.edu> ++Some additions by Richard Atterer <atterer@debian.org> + .fi + + .SH AVAILABILITY diff --git a/recipes/udf/udftools/patch-08-mkudffs-manpage.diff b/recipes/udf/udftools/patch-08-mkudffs-manpage.diff new file mode 100644 index 0000000000..809a33b966 --- /dev/null +++ b/recipes/udf/udftools/patch-08-mkudffs-manpage.diff @@ -0,0 +1,15 @@ +--- ./doc/mkudffs.8 2002-11-26 08:18:51.000000000 +0100 ++++ ./doc/mkudffs.8 2006-11-22 22:37:49.099351000 +0100 +@@ -96,10 +96,10 @@ + hard drive + .TP + dvd +-DVD (Digital Versital Disc) ++DVD (Digital Versatile Disc) + .TP + dvdram +-DVD\-RAM (Digital Versital Disc\-Random Access Memory) ++DVD\-RAM (Digital Versatile Disc\-Random Access Memory) + .TP + worm + WORM (Write Once Ready Many) diff --git a/recipes/udf/udftools/patch-09-include-stringh.diff b/recipes/udf/udftools/patch-09-include-stringh.diff new file mode 100644 index 0000000000..acb6a1fd5e --- /dev/null +++ b/recipes/udf/udftools/patch-09-include-stringh.diff @@ -0,0 +1,42 @@ + +--- ./include/udf_endian.h.orig 2007-11-30 12:35:59.746600920 +0100 ++++ ./include/udf_endian.h 2007-11-30 12:36:49.749450420 +0100 +@@ -20,6 +20,8 @@ + * + */ + ++#include <string.h> ++ + #ifndef __UDF_ENDIAN_H + #define __UDF_ENDIAN_H + +--- ./pktsetup/pktsetup.c.orig 2007-11-30 12:37:42.252442395 +0100 ++++ ./pktsetup/pktsetup.c 2007-11-30 12:38:36.255519855 +0100 +@@ -25,6 +25,7 @@ + #include <getopt.h> + #include <bits/types.h> + #include <sys/types.h> ++#include <string.h> + + #include <linux/cdrom.h> + +--- ./wrudf/wrudf-cdr.c.orig 2007-11-30 12:39:06.257229555 +0100 ++++ ./wrudf/wrudf-cdr.c 2007-11-30 12:39:28.758511830 +0100 +@@ -6,6 +6,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <unistd.h> ++#include <string.h> + #include "wrudf.h" + #include "ide-pc.h" + #include "bswap.h" +--- ./wrudf/wrudf-cdrw.c.orig 2007-11-30 12:40:21.761532300 +0100 ++++ ./wrudf/wrudf-cdrw.c 2007-11-30 12:40:36.762387150 +0100 +@@ -28,6 +28,7 @@ + #include <stdio.h> + #include <fcntl.h> + #include <unistd.h> ++#include <string.h> + #include <sys/stat.h> + #include <sys/ioctl.h> + #include <linux/cdrom.h> /* for CDROM_DRIVE_STATUS */ diff --git a/recipes/udf/udftools/patch-10-mkudffs-open-error.diff b/recipes/udf/udftools/patch-10-mkudffs-open-error.diff new file mode 100644 index 0000000000..9fc7c6434e --- /dev/null +++ b/recipes/udf/udftools/patch-10-mkudffs-open-error.diff @@ -0,0 +1,31 @@ +From: Christoph Hellwig <hch@lst.de> +To: submit@bugs.debian.org +Subject: Bug#285313: mkudffs gives unhelpfull error messages when called without write-access to the device +Date: Sun, 12 Dec 2004 14:28:09 +0100 + +When calling mkuffs without write access to the device, e.g. + + mkudffs /dev/sda + +as ordinary user where the device is writeable only for root it gives an +completely unhelpfull error message: + + hch@dhcppc1:~$ mkudffs /dev/sda4 + trying to change type of multiple extents + +Some kind of permission denied message would be much better + + +--- ./mkudffs/main.c.orig 2007-11-30 13:57:22.524854595 +0100 ++++ ./mkudffs/main.c 2007-11-30 13:58:44.529527775 +0100 +@@ -162,6 +162,10 @@ + #else + fd = open(filename, O_RDWR | O_CREAT | O_LARGEFILE, 0660); + #endif ++ if (fd == -1) { ++ perror("Error opening device"); ++ exit(1); ++ } + disc.head->blocks = get_blocks(fd, disc.blocksize, disc.head->blocks); + disc.write = write_func; + disc.write_data = &fd; diff --git a/recipes/udf/udftools/patch-11-udftools-limits-h.diff b/recipes/udf/udftools/patch-11-udftools-limits-h.diff new file mode 100644 index 0000000000..c9cf1d51cd --- /dev/null +++ b/recipes/udf/udftools/patch-11-udftools-limits-h.diff @@ -0,0 +1,10 @@ +--- ./cdrwtool/cdrwtool.h.orig 2008-01-12 13:07:44.000000000 +0100 ++++ ./cdrwtool/cdrwtool.h 2008-01-12 13:08:19.000000000 +0100 +@@ -11,6 +11,7 @@ + #define _CDRWTOOL_H 1 + + #include <inttypes.h> ++#include <limits.h> + #include <linux/cdrom.h> + #include "../include/libudffs.h" + diff --git a/recipes/udf/udftools/patch-12-pktsetup-limits-h.diff b/recipes/udf/udftools/patch-12-pktsetup-limits-h.diff new file mode 100644 index 0000000000..5cd42acd08 --- /dev/null +++ b/recipes/udf/udftools/patch-12-pktsetup-limits-h.diff @@ -0,0 +1,10 @@ +--- ./pktsetup/pktsetup.c.orig 2008-01-12 13:16:01.000000000 +0100 ++++ ./pktsetup/pktsetup.c 2008-01-12 13:16:15.000000000 +0100 +@@ -26,6 +26,7 @@ + #include <bits/types.h> + #include <sys/types.h> + #include <string.h> ++#include <limits.h> + + #include <linux/cdrom.h> + diff --git a/recipes/udf/udftools_1.0.0b3.bb b/recipes/udf/udftools_1.0.0b3.bb new file mode 100644 index 0000000000..432f33b239 --- /dev/null +++ b/recipes/udf/udftools_1.0.0b3.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "Linux UDF Filesystem userspace utilities" +LICENSE = "GPLv2" + +REALPV = "1.0.0b3" +PV = "0.9.8+${REALPV}" + +SRC_URI = "http://downloads.sourceforge.net/project/linux-udf/udftools/${REALPV}/udftools-${REALPV}.tar.gz \ +file://patch-01-pktsetup-chardev.diff \ +file://patch-02-pktsetup-exitstatus.diff \ +file://patch-03-mkudffs-bigendian.diff \ +file://patch-04-wrudf-gcc4.diff \ +file://patch-05-pktsetup-manpage.diff \ +file://patch-06-wrudf-lvalue.diff \ +file://patch-07-cdrwtool-manpage.diff \ +file://patch-08-mkudffs-manpage.diff \ +file://patch-09-include-stringh.diff \ +file://patch-10-mkudffs-open-error.diff \ +file://patch-11-udftools-limits-h.diff \ +file://patch-12-pktsetup-limits-h.diff \ +" + +SRC_URI[md5sum] = "2f491ddd63f31040797236fe18db9e60" +SRC_URI[sha256sum] = "c5079e878d4d8e03de0fd75bfecf485a299689b8289a5288f18b2e793e0904a0" + +S = "${WORKDIR}/${PN}-${REALPV}" + +inherit autotools + |