From d02457b03abe27767741f709a461e8d46294dd01 Mon Sep 17 00:00:00 2001 From: Sergey Lapin Date: Thu, 14 May 2009 17:41:56 +0400 Subject: dvd+rw-tools: Added new recipe --- recipes/dvd+rw-tools/dvd+rw-tools_7.1.bb | 32 +++ .../dvd+rw-tools/files/01-growisofs-pioneer.dpatch | 30 +++ .../dvd+rw-tools/files/02-growisofs-manpage.dpatch | 16 ++ .../dvd+rw-tools/files/03-growisofs-dvd-dl.dpatch | 21 ++ recipes/dvd+rw-tools/files/04-kfreebsd.dpatch | 78 +++++++ recipes/dvd+rw-tools/files/07-beeping.dpatch | 27 +++ recipes/dvd+rw-tools/files/08-cdrkit-code.dpatch | 74 +++++++ recipes/dvd+rw-tools/files/09-cdrkit-doc.dpatch | 227 +++++++++++++++++++++ recipes/dvd+rw-tools/files/10-includes.dpatch | 19 ++ 9 files changed, 524 insertions(+) create mode 100644 recipes/dvd+rw-tools/dvd+rw-tools_7.1.bb create mode 100644 recipes/dvd+rw-tools/files/01-growisofs-pioneer.dpatch create mode 100644 recipes/dvd+rw-tools/files/02-growisofs-manpage.dpatch create mode 100644 recipes/dvd+rw-tools/files/03-growisofs-dvd-dl.dpatch create mode 100644 recipes/dvd+rw-tools/files/04-kfreebsd.dpatch create mode 100644 recipes/dvd+rw-tools/files/07-beeping.dpatch create mode 100644 recipes/dvd+rw-tools/files/08-cdrkit-code.dpatch create mode 100644 recipes/dvd+rw-tools/files/09-cdrkit-doc.dpatch create mode 100644 recipes/dvd+rw-tools/files/10-includes.dpatch (limited to 'recipes/dvd+rw-tools') diff --git a/recipes/dvd+rw-tools/dvd+rw-tools_7.1.bb b/recipes/dvd+rw-tools/dvd+rw-tools_7.1.bb new file mode 100644 index 0000000000..69a12fbab0 --- /dev/null +++ b/recipes/dvd+rw-tools/dvd+rw-tools_7.1.bb @@ -0,0 +1,32 @@ +DESCRIPTION = "tools to write DVDs" +PR = "r2" +DEPENDS += "m4-native" +RDEPENDS += "cdrkit" +SRC_URI = "http://fy.chalmers.se/~appro/linux/DVD+RW/tools/dvd+rw-tools-${PV}.tar.gz \ + file://01-growisofs-pioneer.dpatch;patch=1 \ + file://02-growisofs-manpage.dpatch;patch=1 \ + file://03-growisofs-dvd-dl.dpatch;patch=1 \ + file://04-kfreebsd.dpatch;patch=1 \ + file://07-beeping.dpatch;patch=1 \ + file://08-cdrkit-code.dpatch;patch=1 \ + file://09-cdrkit-doc.dpatch;patch=1 \ + file://10-includes.dpatch;patch=1 \ + " + +do_configure() { + m4 -DOS=Linux Makefile.m4 >Makefile +} + +do_compile() { + oe_runmake CC="${CC}" CXX="${CXX}" dvd+rw-tools +} + +do_install() { + install -d ${D}/usr/bin + install -m 755 ${S}/growisofs ${D}/usr/bin + install -m 755 ${S}/dvd+rw-booktype ${D}/usr/bin + install -m 755 ${S}/dvd+rw-format ${D}/usr/bin + install -m 755 ${S}/dvd+rw-mediainfo ${D}/usr/bin + install -m 755 ${S}/dvd-ram-control ${D}/usr/bin +} + diff --git a/recipes/dvd+rw-tools/files/01-growisofs-pioneer.dpatch b/recipes/dvd+rw-tools/files/01-growisofs-pioneer.dpatch new file mode 100644 index 0000000000..adaaad4f7e --- /dev/null +++ b/recipes/dvd+rw-tools/files/01-growisofs-pioneer.dpatch @@ -0,0 +1,30 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 01-growisofs-pioneer.dpatch +## +## DP: Fixes to fail closing session on some PIONEER DVD-RW drives + +@DPATCH@ + +diff -Naurp dvd+rw-tools-7.1.orig/growisofs_mmc.cpp dvd+rw-tools-7.1/growisofs_mmc.cpp +--- dvd+rw-tools-7.1.orig/growisofs_mmc.cpp 2008-03-04 17:47:49.000000000 +0000 ++++ dvd+rw-tools-7.1/growisofs_mmc.cpp 2008-04-01 09:01:20.000000000 +0000 +@@ -1743,8 +1743,17 @@ void plus_rw_finalize () + cmd[1] = 0x01; // "IMMED" + cmd[2] = 0x02; // "Close session" + cmd[9] = 0; +- if ((err=cmd.transport())) +- sperror ("CLOSE SESSION",err); ++ ++ // it seems, that pioneer is a bit crappy ++ while (err=cmd.transport()) { ++ if (SK(err)==0x2 && ASC(err)==0x04 && ASCQ(err)==0x07) { ++ sperror ("CLOSE SESSION (but try to continue)",err); ++ usleep(10000); ++ } else { ++ sperror ("CLOSE SESSION",err); ++ break; ++ } ++ } + + if (wait_for_unit (cmd)) break; + diff --git a/recipes/dvd+rw-tools/files/02-growisofs-manpage.dpatch b/recipes/dvd+rw-tools/files/02-growisofs-manpage.dpatch new file mode 100644 index 0000000000..9a3eab3351 --- /dev/null +++ b/recipes/dvd+rw-tools/files/02-growisofs-manpage.dpatch @@ -0,0 +1,16 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 02-growisofs-manpage.dpatch by Daniel Baumann +## +## DP: Fix manpage section + +@DPATCH@ + +diff -Naurp dvd+rw-tools-7.1.orig/growisofs.1 dvd+rw-tools-7.1/growisofs.1 +--- dvd+rw-tools-7.1.orig/growisofs.1 2008-03-01 10:40:06.000000000 +0000 ++++ dvd+rw-tools-7.1/growisofs.1 2008-04-01 09:02:23.000000000 +0000 +@@ -1,4 +1,4 @@ +-.TH GROWISOFS 1m "1 Mar 2008" "growisofs 7.1" ++.TH GROWISOFS 1 "1 Mar 2008" "growisofs 7.1" + .SH NAME + growisofs \- combined mkisofs frontend/DVD recording program. + .SH SYNOPSIS diff --git a/recipes/dvd+rw-tools/files/03-growisofs-dvd-dl.dpatch b/recipes/dvd+rw-tools/files/03-growisofs-dvd-dl.dpatch new file mode 100644 index 0000000000..3039a9fcd1 --- /dev/null +++ b/recipes/dvd+rw-tools/files/03-growisofs-dvd-dl.dpatch @@ -0,0 +1,21 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 03-growisofs-dvd-dl.dpatch by +## +## DP: Don't abort when a DVD-DL disk is underful (Closes: #340698). + +@DPATCH@ + +diff -Naurp dvd+rw-tools-7.1.orig/growisofs_mmc.cpp dvd+rw-tools-7.1/growisofs_mmc.cpp +--- dvd+rw-tools-7.1.orig/growisofs_mmc.cpp 2008-04-01 09:01:20.000000000 +0000 ++++ dvd+rw-tools-7.1/growisofs_mmc.cpp 2008-04-01 09:02:59.000000000 +0000 +@@ -1640,9 +1640,7 @@ static void plus_r_dl_split (Scsi_Comman + blocks += 15, blocks &= ~15; + + if (blocks <= split) +- fprintf (stderr,":-( more than 50%% of space will be *wasted*!\n" +- " use single layer media for this recording\n"), +- exit (FATAL_START(EMEDIUMTYPE)); ++ fprintf (stderr,":-? more than 50%% of space will be *wasted*!\n"); + + blocks /= 16; + blocks += 1; diff --git a/recipes/dvd+rw-tools/files/04-kfreebsd.dpatch b/recipes/dvd+rw-tools/files/04-kfreebsd.dpatch new file mode 100644 index 0000000000..acc76b39f1 --- /dev/null +++ b/recipes/dvd+rw-tools/files/04-kfreebsd.dpatch @@ -0,0 +1,78 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 03-kfreebsd.dpatch by Petr Salinger +## +## DP: FTBFS on GNU/kFreeBSD (Closes: #374841). + +@DPATCH@ + +diff -Naurp dvd+rw-tools-7.1.orig/Makefile.m4 dvd+rw-tools-7.1/Makefile.m4 +--- dvd+rw-tools-7.1.orig/Makefile.m4 2008-03-02 17:17:09.000000000 +0000 ++++ dvd+rw-tools-7.1/Makefile.m4 2008-04-01 09:03:41.000000000 +0000 +@@ -14,6 +14,7 @@ ifelse(substr(OS,0,7),[MINGW32],[define( + ifelse(OS,NetBSD,[define([OS],[BSD])CXXFLAGS+=-D__unix]) + ifelse(OS,OpenBSD,[define([OS],[BSD])]) + ifelse(OS,FreeBSD,[define([OS],[BSD])LDLIBS=-lcam]) ++ifelse(OS,GNU/kFreeBSD,[define([OS],[Linux])LDLIBS=-lcam]) + ifelse(OS,IRIX64,[define([OS],[IRIX])]) + + ifelse(OS,Darwin,[ +@@ -188,7 +189,7 @@ CC =gcc + CFLAGS +=$(WARN) -O2 -D_REENTRANT + CXX =g++ + CXXFLAGS+=$(WARN) -O2 -fno-exceptions -D_REENTRANT +-LDLIBS =-lpthread ++LDLIBS +=-lpthread + LINK.o =$(LINK.cc) + + prefix?=/usr/local +diff -Naurp dvd+rw-tools-7.1.orig/growisofs.c dvd+rw-tools-7.1/growisofs.c +--- dvd+rw-tools-7.1.orig/growisofs.c 2008-03-04 09:15:03.000000000 +0000 ++++ dvd+rw-tools-7.1/growisofs.c 2008-04-01 09:03:41.000000000 +0000 +@@ -403,7 +403,7 @@ + #define _LARGEFILE64_SOURCE + #define _FILE_OFFSET_BITS 64 + +-#if defined(__linux) ++#if defined(__linux) || defined(__GLIBC__) + /* ... and "engage" glibc large file support */ + # ifndef _GNU_SOURCE + # define _GNU_SOURCE +@@ -459,7 +459,7 @@ + # define FATAL_START(e) (0x80|(e)) + # define FATAL_MASK 0x7F + +-#ifdef __FreeBSD__ ++#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) + # include + # ifndef SYS_mlockall + # define SYS_mlockall 324 +@@ -995,7 +995,7 @@ char *setup_fds (char *device) + goto open_rw; + } + +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined (__FreeBSD_kernel__) + + #include + #include +@@ -2937,7 +2937,7 @@ int main (int argc, char *argv[]) + if (setrlimit(RLIMIT_MEMLOCK,&rlim)) break; + } + # endif +-# ifdef __FreeBSD__ ++# if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) + syscall(SYS_mlockall,3); + # else + mlockall(MCL_CURRENT|MCL_FUTURE); +diff -Naurp dvd+rw-tools-7.1.orig/transport.hxx dvd+rw-tools-7.1/transport.hxx +--- dvd+rw-tools-7.1.orig/transport.hxx 2008-03-01 10:34:43.000000000 +0000 ++++ dvd+rw-tools-7.1/transport.hxx 2008-04-01 09:03:41.000000000 +0000 +@@ -483,7 +483,7 @@ public: + { return 1; } + }; + +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + + #include + #include diff --git a/recipes/dvd+rw-tools/files/07-beeping.dpatch b/recipes/dvd+rw-tools/files/07-beeping.dpatch new file mode 100644 index 0000000000..7b9a5cec34 --- /dev/null +++ b/recipes/dvd+rw-tools/files/07-beeping.dpatch @@ -0,0 +1,27 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 06-beeping.dpatch by Matt Zimmerman +## +## DP: Disable obnoxious beeping. + +@DPATCH@ + +diff -Naurp dvd+rw-tools-7.1.orig/growisofs.c dvd+rw-tools-7.1/growisofs.c +--- dvd+rw-tools-7.1.orig/growisofs.c 2008-04-01 09:04:51.000000000 +0000 ++++ dvd+rw-tools-7.1/growisofs.c 2008-04-01 09:08:58.000000000 +0000 +@@ -3453,14 +3453,14 @@ int main (int argc, char *argv[]) + printf ("'\n"); + fflush (stdout); + +- if ((warn_for_isofs&2) && !dry_run && !no_tty_check) ++/* if ((warn_for_isofs&2) && !dry_run && !no_tty_check) + { fprintf (stderr,"Sleeping for 5 sec...\a"), poll (NULL,0,1000); + fprintf (stderr,"\b\b\b\b\b\b\b\b4 sec...\a"), poll (NULL,0,1000); + fprintf (stderr,"\b\b\b\b\b\b\b\b3 sec...\a"), poll (NULL,0,1000); + fprintf (stderr,"\b\b\b\b\b\b\b\b2 sec...\a"), poll (NULL,0,1000); + fprintf (stderr,"\b\b\b\b\b\b\b\b1 sec...\a"), poll (NULL,0,1000); + fprintf (stderr,"\b\b\b\b\b\b\b\b0 sec...\r"); +- } ++ } */ + + #if defined(__unix) || defined(__unix__) + diff --git a/recipes/dvd+rw-tools/files/08-cdrkit-code.dpatch b/recipes/dvd+rw-tools/files/08-cdrkit-code.dpatch new file mode 100644 index 0000000000..624e87d979 --- /dev/null +++ b/recipes/dvd+rw-tools/files/08-cdrkit-code.dpatch @@ -0,0 +1,74 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 07-cdrkit-code.dpatch by Daniel Baumann +## +## DP: Update any cdrtools related information in the code to cdrkit. + +@DPATCH@ + +diff -Naurp dvd+rw-tools-7.1.orig/growisofs.c dvd+rw-tools-7.1/growisofs.c +--- dvd+rw-tools-7.1.orig/growisofs.c 2008-04-01 09:08:58.000000000 +0000 ++++ dvd+rw-tools-7.1/growisofs.c 2008-04-01 09:14:01.000000000 +0000 +@@ -2724,7 +2724,7 @@ void pipe_mkisofs_up (char *mkisofs_argv + perror (":-( unable to create pipe"), exit(FATAL_START(errno)); + + if ((mkisofs_pid=fork ()) == (pid_t)-1) +- perror (":-( unable to fork mkisofs"), exit(FATAL_START(errno)); ++ perror (":-( unable to fork genisoimage"), exit(FATAL_START(errno)); + else if (mkisofs_pid == 0) + { dup2 (fildes[1],1); + close (fildes[0]); +@@ -2844,7 +2844,7 @@ void pipe_mkisofs_up (char *mkisofs_argv + { DWORD ret; + + if (GetExitCodeProcess (pi.hProcess,&ret) && ret) +- fprintf (stderr,":-( mkisofs has failed: %d\n",ret), ++ fprintf (stderr,":-( genisoimage has failed: %d\n",ret), + exit (1); + else + perror (":-( GetExitCodeProcess failed"), exit(errno); +@@ -2963,8 +2963,8 @@ int main (int argc, char *argv[]) + perror (NULL), exit (FATAL_START(errno)); + + #if defined(__unix) || defined(__unix__) +- env = getenv ("MKISOFS"); +- mkisofs_argv[0] = (env?env:"mkisofs"); ++ env = getenv ("GENISOIMAGE"); ++ mkisofs_argv[0] = (env?env:"genisoimage"); + #elif defined(_WIN32) + /* + * On Windows I insist on mkisofs.exe to reside in very same +@@ -3151,8 +3151,8 @@ int main (int argc, char *argv[]) + else if (argv[i][1] == '?' || !strcmp(opt,"-help")) + { PRINT_VERSION (argv[0]); + printf ("- usage: %s [-dvd-compat] [-overburn] [-speed=1] \\\n" +- " -[ZM] /dev/dvd \n",argv[0]); +- printf (" for see 'mkisofs %s'\n",opt); ++ " -[ZM] /dev/dvd \n",argv[0]); ++ printf (" for see 'genisoimage %s'\n",opt); + exit (FATAL_START(EINVAL)); + } + else if (strstr (opt,"-version")) +@@ -3320,12 +3320,12 @@ int main (int argc, char *argv[]) + + if (imgfd<0) + { if (mkisofs_argc==1 && dev_found!='F') +- fprintf (stderr,"%s: no mkisofs options specified, " ++ fprintf (stderr,"%s: no genisoimage options specified, " + "aborting...\n",argv[0]), + exit (FATAL_START(EINVAL)); + } + else if ((mkisofs_argc-growisofs_argc)>1) +- fprintf (stderr,"%s: no mkisofs options are permitted with =, " ++ fprintf (stderr,"%s: no genisoimage options are permitted with =, " + "aborting...\n",argv[0]), + exit (FATAL_START(EINVAL)); + +@@ -3576,7 +3576,7 @@ int main (int argc, char *argv[]) + + if (saved_descriptors[i].type[0] != descr[i].type[0]) + { fprintf (stderr,":-? volume descriptor mismatch, did you " +- "use same mkisofs options?\n"); ++ "use same genisoimage options?\n"); + break; + } + memcpy (descr+i,&saved_descriptors[i],sizeof(*descr)); diff --git a/recipes/dvd+rw-tools/files/09-cdrkit-doc.dpatch b/recipes/dvd+rw-tools/files/09-cdrkit-doc.dpatch new file mode 100644 index 0000000000..3d991d399e --- /dev/null +++ b/recipes/dvd+rw-tools/files/09-cdrkit-doc.dpatch @@ -0,0 +1,227 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 08-cdrkit-doc.dpatch by Daniel Baumann +## +## DP: Update any cdrtools related information in the documentation to cdrkit. + +@DPATCH@ + +diff -Naurp dvd+rw-tools-7.1.orig/growisofs.1 dvd+rw-tools-7.1/growisofs.1 +--- dvd+rw-tools-7.1.orig/growisofs.1 2008-04-01 09:04:48.000000000 +0000 ++++ dvd+rw-tools-7.1/growisofs.1 2008-04-01 09:16:16.000000000 +0000 +@@ -1,6 +1,6 @@ + .TH GROWISOFS 1 "1 Mar 2008" "growisofs 7.1" + .SH NAME +-growisofs \- combined mkisofs frontend/DVD recording program. ++growisofs \- combined genisoimage frontend/DVD recording program. + .SH SYNOPSIS + .B growisofs + [\fB\-dry\-run\fP] +@@ -9,10 +9,10 @@ growisofs \- combined mkisofs frontend/D + [\fB\-speed=1\fP] + \-[\fBZ|M\fP] + .I /dev/dvd +-.I ++.I + + .SH DESCRIPTION +-\fBgrowisofs\fP was originally designed as a frontend to \fBmkisofs\fP ++\fBgrowisofs\fP was originally designed as a frontend to \fBgenisoimage\fP + to facilitate appending of data to ISO9660 volumes residing on + random-access media such as DVD+RW, DVD\-RAM, plain files, hard disk + partitions. In the course of development general purpose DVD recording +@@ -35,7 +35,7 @@ EXAMPLES section for further details. + Merge a new session to an existing one. + .TP + .BI \-version +-Print version information and invoke \fBmkisofs\fP, also with \-version ++Print version information and invoke \fBgenisoimage\fP, also with \-version + option. + .TP + .BI \-dvd\-compat +@@ -47,7 +47,7 @@ explicitly burn [otherwise optional] lea + .BI \-dry\-run + At dry\-run \fBgrowisofs\fP performs all the steps till, but not + including the first write operation. Most notably check for "overburn" +-condition is performed, which implies that mkisofs is invoked and ++condition is performed, which implies that genisoimage is invoked and + terminated prematurely. + .TP + .BI \-overburn +@@ -68,8 +68,8 @@ be found in \fBdvd+rw\-mediainfo\fP outp + recordings are commonly performed at ~1/2 of advertised speed, because + of defect management being in effect. + .TP +-.BI +-More options can be found in the manpage for \fBmkisofs\fP. ++.BI ++More options can be found in the manpage for \fBgenisoimage\fP. + + .P + There are several undocumented options commonly denoted with +@@ -82,7 +82,7 @@ these options undocumented is that those + need to use them directly can as well consult the source code or obtain + specific instructions elsewhere. + +-.SH DIFFERENCES WITH RUNNING MKISOFS DIRECTLY ++.SH DIFFERENCES WITH RUNNING GENISOIMAGE DIRECTLY + .P + When using growisofs you may not use the + .B \-o +@@ -99,7 +99,7 @@ will construct one for you; + Otherwise everything that applies to + .I [multisession] + mastering with +-.B mkisofs ++.B genisoimage + applies to + .B growisofs + as well. +@@ -107,7 +107,8 @@ as well. + needs at least + .B mkisofs + version 1.14, version 2.0 is required for multisession write-once +-recordings. ++recordings or ++.B genisoimage. + + .SH EXAMPLES + Actual device names vary from one operating system to another. We use +@@ -146,12 +147,12 @@ command name is not intuitive in this co + .SH NOTES + If executed under sudo(8) growisofs refuses to start. This is done for + the following reason. Naturally growisofs has to access the data set to +-be recorded to optical media, either indirectly by letting mkisofs ++be recorded to optical media, either indirectly by letting genisoimage + generate ISO9660 layout on-the-fly or directly if a pre-mastered image + is to be recorded. Being executed under sudo(8), growisofs effectively + grants sudoers read access to \fIany\fP file in the file system. The +-situation is intensified by the fact that growisofs parses MKISOFS +-environment variable in order to determine alternative path to mkisofs ++situation is intensified by the fact that growisofs parses GENISOIMAGE ++environment variable in order to determine alternative path to genisoimage + executable image. This means that being executed under sudo(8), + growisofs effectively grants sudoers right to execute program of their + choice with elevated privileges. If you for any reason still find the +@@ -162,13 +163,13 @@ real growisofs binary. + .nf + #!/bin/ksh + unset SUDO_COMMAND +- export MKISOFS=/path/to/trusted/mkisofs ++ export GENISOIMAGE=/path/to/trusted/genisoimage + exec growisofs "$@" + .fi + + But note that the recommended alternative to the above "workaround" is + actually to install growisofs set\-root\-uid, in which case it will drop +-privileges prior accessing data or executing mkisofs in order to ++privileges prior accessing data or executing genisoimage in order to + preclude unauthorized access to the data. + + If the media already carries isofs and \fBgrowisofs\fP is invoked with +@@ -214,7 +215,7 @@ it gets pre-formatted with minimal spare + Most up-to-date information on dvd+rw\-tools is available at + http://fy.chalmers.se/~appro/linux/DVD+RW/. + .PP +-The manpage for \fBmkisofs\fP. ++The manpage for \fBgenisoimage\fP. + + .SH AUTHORS + Andy Polyakov stands for programming and on-line +diff -Naurp dvd+rw-tools-7.1.orig/index.html dvd+rw-tools-7.1/index.html +--- dvd+rw-tools-7.1.orig/index.html 2008-03-04 09:03:21.000000000 +0000 ++++ dvd+rw-tools-7.1/index.html 2008-04-01 09:20:57.000000000 +0000 +@@ -137,7 +137,9 @@ SRC="japanese.gif" WIDTH=48 HEIGHT=19 BO + front-end to mkisofs, i.e. invokes mkisofs to perform the + actual ISO9660 file system layout. Secondly, the DVD burners + available on the market can burn even CD-R[W] media and +- cdrecord is the tool for this job. ++ cdrecord is the tool for this job [and this job only]. ++ Note that mkisofs is replaced with its successor genisoimage from ++ cdrkit. + + +