From 87b76dd2ef2526cdaab21098fe08812f331b7020 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 16 Apr 2018 22:28:49 +0000 Subject: [PATCH] - from PLD --- cdrtools-config.patch | 136 ++++++++ cdrtools-linking.patch | 25 ++ cdrtools-make.patch | 33 ++ cdrtools-man.patch | 47 +++ cdrtools-rename.patch | 260 +++++++++++++++ cdrtools-revert_sg_io_eperm_failure.patch | 20 ++ cdrtools.spec | 388 ++++++++++++++++++++++ 7 files changed, 909 insertions(+) create mode 100644 cdrtools-config.patch create mode 100644 cdrtools-linking.patch create mode 100644 cdrtools-make.patch create mode 100644 cdrtools-man.patch create mode 100644 cdrtools-rename.patch create mode 100644 cdrtools-revert_sg_io_eperm_failure.patch create mode 100644 cdrtools.spec diff --git a/cdrtools-config.patch b/cdrtools-config.patch new file mode 100644 index 0000000..1f8b0ee --- /dev/null +++ b/cdrtools-config.patch @@ -0,0 +1,136 @@ +--- cdrtools-3.00/cdrecord/cdrecord.1~ 2014-03-25 14:58:38.000000000 +0200 ++++ cdrtools-3.00/cdrecord/cdrecord.1 2014-03-25 14:59:13.673238717 +0200 +@@ -71,7 +71,7 @@ + explained below refers to + .IR scsibus / target / lun + of the CD/DVD/BluRay-recorder. +-If a file /etc/default/cdrecord exists, the parameter to the ++If a file /etc/cdrecord.conf exists, the parameter to the + .B dev= + option may also be a drive name label in said file (see FILES section). + +@@ -1201,13 +1201,13 @@ + option is present, + .B cdrecord + will try to get a drive specific speed value from the file +-.B /etc/default/cdrecord ++.B /etc/cdrecord.conf + and if it cannot find one, it will try to get the speed value from the + .B CDR_SPEED + environment and later from the + .B CDR_SPEED= + entry in +-.BR /etc/default/cdrecord . ++.BR /etc/cdrecord.conf . + If no speed value could be found, cdrecord uses a drive specific default speed. + The default for all new (MMC compliant) drives is to use the maximum supported by the drive. + If you use +@@ -1505,7 +1505,7 @@ + .B CDR_DEVICE + environment. + .sp +-If a file /etc/default/cdrecord exists, and ++If a file /etc/cdrecord.conf exists, and + if the argument to the + .B dev= + option +@@ -1514,7 +1514,7 @@ + environment + does not contain the characters ',', '/', '@' or ':', + it is interpreted as a device label name that was defined in the file +-/etc/default/cdrecord (see FILES section). ++/etc/cdrecord.conf (see FILES section). + .sp + .B \h'-2m'Autotarget Mode + .br +@@ -2158,7 +2158,7 @@ + .TP + .B CDR_DEVICE + This may either hold a device identifier that is suitable to the open +-call of the SCSI transport library or a label in the file /etc/default/cdrecord. ++call of the SCSI transport library or a label in the file /etc/cdrecord.conf + .TP + .B CDR_SPEED + Sets the default speed value for writing (see also +@@ -2226,8 +2226,11 @@ + + .SH FILES + .TP +-.B /etc/default/cdrecord +-Default values can be set for the following options in /etc/default/cdrecord. ++.B /etc/cdrecord.conf ++Default values can be set for the following options in /etc/cdrecord.conf . ++Note that this path has been changed from standard location in cdrtools ++distribution (/etc/default/cdrecord) to be consistent with other packages ++which don't use /etc/default directory in general. + For example: + .SM CDR_FIFOSIZE=8m + or +@@ -2236,7 +2239,7 @@ + .TP + .B CDR_DEVICE + This may either hold a device identifier that is suitable to the open +-call of the SCSI transport library or a label in the file /etc/default/cdrecord ++call of the SCSI transport library or a label in the file /etc/cdrecord.conf + that allows to identify a specific drive on the system. + .TP + .B CDR_SPEED +--- cdrtools-2.01.01.orig/cdrecord/cdrecord.dfl 2008-12-30 14:29:50.000000000 +0100 ++++ cdrtools-2.01.01/cdrecord/cdrecord.dfl 2010-02-08 14:15:04.000000000 +0100 +@@ -1,6 +1,6 @@ + #ident @(#)cdrecord.dfl 1.7 08/12/30 Copyr 1998 J. Schilling + # +-# This file is /etc/default/cdrecord ++# This file is /etc/cdrecord.conf + # It contains defaults that are used if no command line option + # or environment is present. + # +@@ -19,7 +19,7 @@ + # Note that newer cdrecord versions do not default + # to speed=1. For MMC compliant drives, the default + # is to write at maximum speed, so it in general does +-# not make sense to set up a default speed in /etc/default/cdrecord ++# not make sense to set up a default speed in /etc/cdrecord.conf + # + #CDR_SPEED=40 + +--- cdrtools-2.01.01.orig/libcdrdeflt/cdrdeflt.c 2009-07-10 23:57:18.000000000 +0200 ++++ cdrtools-2.01.01/libcdrdeflt/cdrdeflt.c 2010-02-08 14:15:04.000000000 +0100 +@@ -49,7 +49,7 @@ + * don't contribute work and don't give support, they are causing extra + * work for me and this way slow down the cdrecord development. + */ +- return (defltopen("/etc/default/cdrecord")); ++ return (defltopen("/etc/cdrecord.conf")); + } + + EXPORT void +--- cdrtools-2.01.01.orig/readcd/readcd.1 2010-01-29 23:27:12.000000000 +0100 ++++ cdrtools-2.01.01/readcd/readcd.1 2010-02-08 14:15:04.000000000 +0100 +@@ -64,7 +64,7 @@ + explained below refers to + .IR scsibus / target / lun + of the CD/DVD/BluRay-Recorder. +-If a file /etc/default/cdrecord exists, the parameter to the ++If a file /etc/cdrecord.conf exists, the parameter to the + .B dev= + option may also be a drive name label in said file (see FILES section). + +@@ -440,7 +440,7 @@ + .B CDR_DEVICE + environment. + .sp +-If a file /etc/default/cdrecord exists, and ++If a file /etc/cdrecord.conf exists, and + if the argument to the + .B dev= + option +@@ -449,7 +449,7 @@ + environment + does not contain the characters ',', '/', '@' or ':', + it is interpreted as a device label name that was defined in the file +-/etc/default/cdrecord (see FILES section). ++/etc/cdrecord.conf (see FILES section). + .sp + .B \h'-2m'Autotarget Mode + .br diff --git a/cdrtools-linking.patch b/cdrtools-linking.patch new file mode 100644 index 0000000..8f5c27a --- /dev/null +++ b/cdrtools-linking.patch @@ -0,0 +1,25 @@ +diff -Nur cdrtools-2.01.01.orig/RULES/rules.cmd cdrtools-2.01.01.linking/RULES/rules.cmd +--- cdrtools-2.01.01.orig/RULES/rules.cmd 2006-05-14 13:55:28.000000000 +0200 ++++ cdrtools-2.01.01.linking/RULES/rules.cmd 2006-08-05 19:21:26.000000000 +0200 +@@ -30,7 +30,7 @@ + all: $(PTARGET) + + $(PTARGET): $(OFILES) $(SRCLIBS) +- $(LDCC) $(_LD_OUTPUT_OPTION) $(POFILES) $(LDFLAGS) $(LDLIBS) ++ $(LDCC) $(LDFLAGS) $(_LD_OUTPUT_OPTION) $(POFILES) $(LDLIBS) + # $(CC) -o $@ $(OFILES) $(LDPATH) $(RUNPATH) $(SRCLIBS) $(LIBS) + + ########################################################################### +diff -Nur cdrtools-2.01.01.orig/RULES/rules.inc cdrtools-2.01.01.linking/RULES/rules.inc +--- cdrtools-2.01.01.orig/RULES/rules.inc 2006-05-14 13:55:29.000000000 +0200 ++++ cdrtools-2.01.01.linking/RULES/rules.inc 2006-08-05 19:21:41.000000000 +0200 +@@ -41,7 +41,7 @@ + all: $(PTARGETCX) $(PTARGET) + + $(PTARGETCX): $(OFILES) $(SRCLIBS) +- $(LDCC) $(_LD_OUTPUT_OPTION) $(POFILES) $(LDFLAGS) $(LDLIBS) ++ $(LDCC) $(LDFLAGS) $(_LD_OUTPUT_OPTION) $(POFILES) $(LDLIBS) + + $(PTARGET): $(OINCSDIR) $(PTARGETCX) + @echo " ==> GENERATING include file \"$@\""; $(PTARGETC)$(_XEXEEXT) > $@ + diff --git a/cdrtools-make.patch b/cdrtools-make.patch new file mode 100644 index 0000000..73a81ae --- /dev/null +++ b/cdrtools-make.patch @@ -0,0 +1,33 @@ +--- cdrtools-2.01.01/DEFAULTS/Defaults.linux.orig 2009-06-04 23:10:45.000000000 +0200 ++++ cdrtools-2.01.01/DEFAULTS/Defaults.linux 2010-01-05 09:18:52.000000000 +0100 +@@ -40,16 +40,11 @@ + # LINUX_SRC_INCLUDE is used in RULES/*-linux-*cc*.rul + # + ########################################################################### +-LINUX_INCL_PATH= /usr/src/linux/include +- +-_LINUX_SRC_INCLUDE= $(_UNIQ)$(MAY_LINUX_SRC_INCLUDE) +-__LINUX_SRC_INCLUDE= $(_LINUX_SRC_INCLUDE:$(_UNIQ)=$(LINUX_INCL_PATH)) +-LINUX_SRC_INCLUDE= $(__LINUX_SRC_INCLUDE:$(_UNIQ)no%=%) ++LINUX_SRC_INCLUDE= + + DEFINCDIRS= $(SRCROOT)/include +-LDPATH= -L/opt/schily/lib +-#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +-RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ++LDPATH= ++RUNPATH= + + ########################################################################### + # +--- cdrtools-2.01.01/RULES/rules.cnf.orig 2008-08-01 20:04:08.000000000 +0200 ++++ cdrtools-2.01.01/RULES/rules.cnf 2008-10-06 22:18:00.000000000 +0200 +@@ -61,7 +61,7 @@ + cd $(OINCSDIR); \ + CONFIG_NOFAIL=TRUE CC="$(XCC_COM)" CFLAGS="$(CFLAGS)" \ + CXXFLAGS="$(C++FLAGS)" CPPFLAGS="$(OSDEFS)" \ +- LDFLAGS="$(LDOPTS)" sh ../../autoconf/configure $(CONFFLAGS) ++ LDFLAGS="$(LDFLAGS1) $(LDOPTS)" sh ../../autoconf/configure $(CONFFLAGS) + ########################################################################### + include $(OINCSDIR)/Inull + include $(OINCSDIR)/rules.cnf diff --git a/cdrtools-man.patch b/cdrtools-man.patch new file mode 100644 index 0000000..5a1e650 --- /dev/null +++ b/cdrtools-man.patch @@ -0,0 +1,47 @@ +--- cdrtools-2.01/scgcheck/scgcheck.1~ Wed Apr 16 04:33:06 2003 ++++ cdrtools-2.01/scgcheck/scgcheck.1 Wed Apr 16 04:33:06 2003 +@@ -118,7 +118,7 @@ + .I Scsibus + 0 is the default SCSI bus on the machine. Watch the boot messages for more + information or look into +-.B /var/adm/messages ++.B /var/log/messages + for more information about the SCSI configuration of your machine. + If you have problems to figure out what values for + .IR scsibus , target , lun +--- cdrtools-2.01/readcd/readcd.1~ Wed Apr 16 04:36:31 2003 ++++ cdrtools-2.01/readcd/readcd.1 Wed Apr 16 04:37:00 2003 +@@ -129,7 +129,7 @@ + .I Scsibus + 0 is the default SCSI bus on the machine. Watch the boot messages for more + information or look into +-.B /var/adm/messages ++.B /var/log/messages + for more information about the SCSI configuration of your machine. + If you have problems to figure out what values for + .IR scsibus , target , lun +@@ -412,19 +412,19 @@ + .B readcd, + enter: + .PP +- chown root /usr/local/bin/readcd ++ chown root /usr/bin/readcd + .br +- chmod 4711 /usr/local/bin/readcd ++ chmod 4711 /usr/bin/readcd + .PP + To give a restricted group of users access to + .B readcd + enter: + .PP +- chown root /usr/local/bin/readcd ++ chown root /usr/bin/readcd + .br +- chgrp cdburners /usr/local/bin/readcd ++ chgrp cdburners /usr/bin/readcd + .br +- chmod 4710 /usr/local/bin/readcd ++ chmod 4710 /usr/bin/readcd + .PP + and add a group + .I cdburners diff --git a/cdrtools-rename.patch b/cdrtools-rename.patch new file mode 100644 index 0000000..b337fec --- /dev/null +++ b/cdrtools-rename.patch @@ -0,0 +1,260 @@ +--- cdrtools-3.00/./autoconf/configure.in~ 2010-05-07 20:00:25.000000000 +0300 ++++ cdrtools-3.00/./autoconf/configure.in 2014-03-24 23:12:01.206179037 +0200 +@@ -370,17 +370,17 @@ + dnl POSIX rules. The new POSIX interfaces in question should be called + dnl fdexec*() to follow the rules of other similar POSIX functions. + dnl +-dnl We use AC_RCHECK_FUNCS() because some Linux distros define a ++dnl We use AC_CHECK_FUNCS() because some Linux distros define a + dnl fexecve() that returns ENOSYS an AC_CHECK_FUNCS() would return FALSE + dnl + echo Checking for POSIX violations by the POSIX.1-2008 standard: +-AC_RCHECK_FUNCS(fexecl fexecle fexecv fexecve) +-AC_RCHECK_FUNCS(fspawnv fspawnl fspawnv_nowait) ++AC_CHECK_FUNCS(fexecl fexecle fexecv fexecve) ++AC_CHECK_FUNCS(fspawnv fspawnl fspawnv_nowait) + + dnl A similar problem exists with the new POSIX.1-2008 interfaces + dnl getline() and fgetline(). These interfaces are also incompatible + dnl with our interfaces defined in 1982. +-AC_RCHECK_FUNCS(getline fgetline) ++AC_CHECK_FUNCS(getline fgetline) + echo End of tests for POSIX violations by the POSIX.1-2008 standard. + + dnl Check whether a symbol is either defined in an include file or +--- cdrtools-3.00/include/schily/schily.h~ 2009-10-23 00:18:55.000000000 +0300 ++++ cdrtools-3.00/include/schily/schily.h 2014-03-24 23:14:00.498115198 +0200 +@@ -144,7 +144,6 @@ + #define fexecl js_fexecl + #define fexecle js_fexecle + #define fexecv js_fexecv +-#define fexecve js_fexecve + #endif + #ifdef RENAME_FSPAWN + #define fspawnv js_fspawnv +@@ -152,7 +151,6 @@ + #define fspawnl js_fspawnl + #endif + #ifdef RENAME_GETLINE +-#define getline js_getline + #define fgetline js_fgetline + #endif + +@@ -174,7 +172,7 @@ + /* 6th arg not const, fexecv forces av[ac] = NULL */ + extern int fexecv __PR((const char *, FILE *, FILE *, FILE *, int, + char **)); +-extern int fexecve __PR((const char *, FILE *, FILE *, FILE *, ++extern int js_fexecve __PR((const char *, FILE *, FILE *, FILE *, + char * const *, char * const *)); + extern int fspawnv __PR((FILE *, FILE *, FILE *, int, char * const *)); + extern int fspawnl __PR((FILE *, FILE *, FILE *, const char *, ...)); +@@ -311,7 +309,7 @@ + extern char *findinpath __PR((char *__name, int __mode, BOOL __plain_file)); + extern int findline __PR((const char *, char, const char *, + int, char **, int)); +-extern int getline __PR((char *, int)); ++extern int js_getline __PR((char *, int)); + extern int getstr __PR((char *, int)); + extern int breakline __PR((char *, char, char **, int)); + extern int getallargs __PR((int *, char * const**, const char *, ...)); +--- cdrtools-3.00/libfind/find.c~ 2010-04-27 21:42:14.000000000 +0300 ++++ cdrtools-3.00/libfind/find.c 2014-03-24 23:15:42.452619081 +0200 +@@ -1878,7 +1878,7 @@ + #endif + pp[ac] = NULL; /* -exec {} \; is not NULL terminated */ + +- fexecve(av[0], state->std[0], state->std[1], state->std[2], ++ js_fexecve(av[0], state->std[0], state->std[1], state->std[2], + pp, state->env); + err = geterrno(); + #ifdef PLUS_DEBUG +--- cdrtools-2.01.01/libscg/scsitransp.c.orig 2009-09-07 21:09:48.000000000 +0200 ++++ cdrtools-2.01.01/libscg/scsitransp.c 2010-01-06 08:37:33.000000000 +0100 +@@ -338,7 +338,7 @@ + + js_printf("%s", msg); + flush(); +- if (getline(okbuf, sizeof (okbuf)) == EOF) ++ if (js_getline(okbuf, sizeof (okbuf)) == EOF) + exit(EX_BAD); + if (streql(okbuf, "y") || streql(okbuf, "yes") || + streql(okbuf, "Y") || streql(okbuf, "YES")) +--- cdrtools-2.01.01/libschily/fexec.c.orig 2009-11-15 15:14:28.000000000 +0100 ++++ cdrtools-2.01.01/libschily/fexec.c 2010-01-06 08:41:20.000000000 +0100 +@@ -135,7 +135,7 @@ + } while (p != NULL); + va_end(args); + +- ret = fexecv(name, in, out, err, ac, av); ++ ret = js_fexecv(name, in, out, err, ac, av); + if (av != xav) + free(av); + return (ret); +@@ -143,10 +143,10 @@ + + #ifdef PROTOTYPES + EXPORT int +-fexecle(const char *name, FILE *in, FILE *out, FILE *err, const char *arg0, ...) ++js_fexecle(const char *name, FILE *in, FILE *out, FILE *err, const char *arg0, ...) + #else + EXPORT int +-fexecle(name, in, out, err, arg0, va_alist) ++js_fexecle(name, in, out, err, arg0, va_alist) + char *name; + FILE *in; + FILE *out; +@@ -198,25 +198,25 @@ + } while (p != NULL); + va_end(args); + +- ret = fexecve(name, in, out, err, av, env); ++ ret = js_fexecve(name, in, out, err, av, env); + if (av != xav) + free(av); + return (ret); + } + + EXPORT int +-fexecv(name, in, out, err, ac, av) ++js_fexecv(name, in, out, err, ac, av) + const char *name; + FILE *in, *out, *err; + int ac; + char *av[]; + { + av[ac] = NULL; /* force list to be null terminated */ +- return (fexecve(name, in, out, err, av, environ)); ++ return (js_fexecve(name, in, out, err, av, environ)); + } + + EXPORT int +-fexecve(name, in, out, err, av, env) ++js_fexecve(name, in, out, err, av, env) + const char *name; + FILE *in, *out, *err; + char * const av[], * const env[]; +--- cdrtools-2.01.01/libschily/spawn.c.orig 2010-01-06 08:45:54.000000000 +0100 ++++ cdrtools-2.01.01/libschily/spawn.c 2010-01-06 08:45:43.000000000 +0100 +@@ -127,10 +127,10 @@ + if (pid != 0) + return (pid); + /* +- * silly: fexecv must set av[ac] = NULL ++ * silly: js_fexecv must set av[ac] = NULL + * so we have to cast argv tp (char **) + */ +- fexecv(name, in, out, err, argc, (char **)argv); ++ js_fexecv(name, in, out, err, argc, (char **)argv); + _exit(geterrno()); + /* NOTREACHED */ + #ifndef lint +--- cdrtools-2.01.01/libschily/stdio/fgetline.c.orig 2004-09-25 14:23:36.000000000 +0200 ++++ cdrtools-2.01.01/libschily/stdio/fgetline.c 2010-01-06 08:34:46.000000000 +0100 +@@ -61,7 +61,7 @@ + } + + EXPORT int +-getline(buf, len) ++js_getline(buf, len) + char *buf; + int len; + { +--- cdrtools-2.01.01/readcd/io.c.orig 2010-01-06 08:29:06.000000000 +0100 ++++ cdrtools-2.01.01/readcd/io.c 2010-01-06 08:29:31.000000000 +0100 +@@ -136,7 +136,7 @@ + (*prt)(s, *lp, mini, maxi, dp); + flush(); + line[0] = '\0'; +- if (getline(line, 80) == EOF) ++ if (js_getline(line, 80) == EOF) + exit(EX_BAD); + + linep = skipwhite(line); +@@ -204,7 +204,7 @@ + printf("%r", form, args); + va_end(args); + flush(); +- if (getline(okbuf, sizeof (okbuf)) == EOF) ++ if (js_getline(okbuf, sizeof (okbuf)) == EOF) + exit(EX_BAD); + if (okbuf[0] == '?') { + printf("Enter 'y', 'Y', 'yes' or 'YES' if you agree with the previous asked question.\n"); +--- cdrtools-2.01.01/readcd/readcd.c.orig 2010-01-06 08:27:59.000000000 +0100 ++++ cdrtools-2.01.01/readcd/readcd.c 2010-01-06 08:28:36.000000000 +0100 +@@ -2098,7 +2098,7 @@ + error("Copy from SCSI (%d,%d,%d) disk to file\n", + scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp)); + error("Enter filename [%s]: ", defname); flush(); +- (void) getline(filename, sizeof (filename)); ++ (void) js_getline(filename, sizeof (filename)); + } + + if (askrange) { +@@ -2285,7 +2285,7 @@ + error("Copy from file to SCSI (%d,%d,%d) disk\n", + scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp)); + error("Enter filename [%s]: ", defname); flush(); +- (void) getline(filename, sizeof (filename)); ++ (void) js_getline(filename, sizeof (filename)); + error("Notice: reading from file always starts at file offset 0.\n"); + + getlong("Enter starting sector for copy:", &addr, 0L, end-1); +--- cdrtools-2.01.01/scgcheck/dmaresid.c.orig 2010-01-06 08:24:34.000000000 +0100 ++++ cdrtools-2.01.01/scgcheck/dmaresid.c 2010-01-06 08:25:01.000000000 +0100 +@@ -84,7 +84,7 @@ + printf("Ready to start test for working DMA residual count == DMA count? Enter to continue: "); + fprintf(logfile, "**********> Testing for working DMA residual count == DMA count.\n"); + flushit(); +- (void) getline(abuf, sizeof (abuf)); ++ (void) js_getline(abuf, sizeof (abuf)); + passed = TRUE; + dmacnt = cnt; + ret = xtinquiry(scgp, 0, dmacnt); +@@ -118,7 +118,7 @@ + + printf("Ready to start test for working DMA residual count == 1? Enter to continue: "); + flushit(); +- (void) getline(abuf, sizeof (abuf)); ++ (void) js_getline(abuf, sizeof (abuf)); + chkprint("**********> Testing for working DMA residual count == 1.\n"); + passed = TRUE; + dmacnt = cnt+1; +@@ -147,7 +147,7 @@ + + printf("Ready to start test for working DMA overrun detection? Enter to continue: "); + flushit(); +- (void) getline(abuf, sizeof (abuf)); ++ (void) js_getline(abuf, sizeof (abuf)); + chkprint("**********> Testing for working DMA overrun detection.\n"); + passed = TRUE; + dmacnt = cnt-1; +--- cdrtools-2.01.01/scgcheck/scgcheck.c.orig 2010-01-06 08:26:33.000000000 +0100 ++++ cdrtools-2.01.01/scgcheck/scgcheck.c 2010-01-06 08:27:29.000000000 +0100 +@@ -191,7 +191,7 @@ + break; + error("Enter SCSI device name for bus scanning [%s]: ", device); + flushit(); +- (void) getline(device, sizeof (device)); ++ (void) js_getline(device, sizeof (device)); + if (device[0] == '\0') + strcpy(device, "0,6,0"); + +@@ -616,5 +616,5 @@ + lbuf[0] = '\0'; + return (0); + } +- return (getline(lbuf, len)); ++ return (js_getline(lbuf, len)); + } +--- cdrtools-3.00/scgcheck/sense.c~ 2010-05-24 12:19:15.000000000 +0300 ++++ cdrtools-3.00/scgcheck/sense.c 2014-03-24 23:16:55.065826928 +0200 +@@ -116,7 +116,7 @@ + + printf("Ready to eject tray? Enter to continue: "); + flushit(); +- (void) getline(abuf, sizeof (abuf)); ++ (void) js_getline(abuf, sizeof (abuf)); + if (abuf[0] != 'n') { + scsi_unload(scgp, (cdr_t *)0); + needload = TRUE; diff --git a/cdrtools-revert_sg_io_eperm_failure.patch b/cdrtools-revert_sg_io_eperm_failure.patch new file mode 100644 index 0000000..c3014f6 --- /dev/null +++ b/cdrtools-revert_sg_io_eperm_failure.patch @@ -0,0 +1,20 @@ + * Add debian/patches/41_revert_sg_io_eperm_failure.dpatch: + - Between 2.01+01a01 and 2.01+01a03, upstream changed the behaviour of + SG_IO ioctl()s failing with EPERM; earlier releases ignored it, while + the current one aborts the program. While in principle, EPERM checking + is a good thing, it breaks burning for non-root users, so revert this + test for now. + - See also http://bugs.debian.org/374685. + +diff -urNad cdrtools-2.01+01a03~/libscg/scsi-linux-sg.c cdrtools-2.01+01a03/libscg/scsi-linux-sg.c +--- cdrtools-2.01+01a03~/libscg/scsi-linux-sg.c 2005-05-16 23:48:37.000000000 +0200 ++++ cdrtools-2.01+01a03/libscg/scsi-linux-sg.c 2006-08-17 12:01:37.000000000 +0200 +@@ -1291,7 +1291,7 @@ + scglocal(scgp)->isold = 1; + return (sg_rwsend(scgp)); + } +- if (sp->ux_errno == ENXIO || sp->ux_errno == EPERM || ++ if (sp->ux_errno == ENXIO || /* sp->ux_errno == EPERM || */ + sp->ux_errno == EINVAL || sp->ux_errno == EACCES) { + return (-1); + } diff --git a/cdrtools.spec b/cdrtools.spec new file mode 100644 index 0000000..1ab8b46 --- /dev/null +++ b/cdrtools.spec @@ -0,0 +1,388 @@ +Summary: Highly portable CD/DVD/BluRay command line recording software +Summary(es.UTF-8): Un programa de grabación de CD/DVD/BluRay +Summary(pl.UTF-8): Oprogramowanie do nagrywania płyt CD/DVD/BluRay +Summary(pt_BR.UTF-8): Um programa de gravação de CD/DVD/BluRay +Summary(ru.UTF-8): Программа для записи CD/DVD/BluRay, запускаемая из командной строки +Summary(uk.UTF-8): Програма для запису CD/DVD/BluRay, яка запускається з командної стрічки +Name: cdrtools +Version: 3.00 +Release: 2 +Epoch: 5 +License: GPL v2 (mkisofs), LGPL v2.1 (cdda2wav), CDDL v1.0 (the rest) +Group: Applications/System +Source0: http://downloads.sourceforge.net/cdrtools/%{name}-%{version}.tar.bz2 +# Source0-md5: f9fbab08fbd458b0d2312976d8c5f558 +Patch0: %{name}-config.patch +Patch2: %{name}-man.patch +Patch3: %{name}-make.patch +Patch4: %{name}-linking.patch +Patch5: %{name}-revert_sg_io_eperm_failure.patch +Patch6: %{name}-rename.patch +URL: http://cdrtools.sourceforge.net/ +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: iconv +Provides: cdrecord +Obsoletes: cdrecord +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%define specflags -finput-charset=ISO-8859-1 -fexec-charset=UTF-8 -D__attribute_const__=const + +%description +Cdrtools is a set of command line programs that allows to record +CD/DVD/BluRay media. + +%description -l pl.UTF-8 +Cdrtools jest zestawemn narzędzi pozwalającym na nagrywanie płyt +CD/DVD/BluRay z linii poleceń. + +%description -l pt_BR.UTF-8 +Cdrecord permite que você crie CDs em seu gravador de CDs SCSI/ATAPI. +É possível gravar dados, áudio, misturados, multi-seção e CD+. + +%description -l ru.UTF-8 +Cdrecord - это программа для создания аудио и цифровых CD. Cdrecord +работает со многими типами CD-рекордеров разных производителей, +полностью поддерживает multi-session и сообщает об ошибках в формате, +пригодном для чтения человеком. + +%description -l uk.UTF-8 +Cdrecord - це програма для створення аудіо та програмних CD. Cdrecord +працює з багатьма типами CD-рекордерів різних виробників, повністю +підтримує multi-session і повідомляє про помилки у форматі, придатному +для читання людиною. + +%package devel +Summary: The libschily SCSI user level transport library +Summary(es.UTF-8): La biblioteca SCSI libschily +Summary(pl.UTF-8): Biblioteka dostępu do poziomu SCSI przez użytkownika +Summary(pt_BR.UTF-8): A biblioteca SCSI libschily +Summary(ru.UTF-8): SCSI-библиотека libschily +Summary(uk.UTF-8): SCSI-бібліотека libschily +Group: Development/Libraries +Obsoletes: cdrecord-devel + +%description devel +The %{name} distribution contains a SCSI user level transport library. +The SCSI library is suitable to talk to any SCSI device without having +a special driver for it. Cdrecord may be easily ported to any system +that has a SCSI device driver similar to the scg driver. + +%description devel -l pl.UTF-8 +Dystrybucja %{name} zawiera bibliotekę dostępu do warstwy transportu w +SCSI. Poprzez bibliotekę można komunikować się z dowolnym urządzeniem +SCSI bez potrzeby posiadania specjalnego sterownika do tego +urządzenia. + +%description devel -l pt_BR.UTF-8 +O cdrtools contém uma biblioteca de transporte de dados por SCSI "user +level". A biblioteca SCSI pode ser usada para conversar com qualquer +dispositivo SCSI sem a necessidade de um driver especial. + +%description devel -l ru.UTF-8 +Пакет cdrecord-devel содержит транспортные библиотеки +пользовательского уровня для SCSI, которые могут работать с любым +SCSI-устройством без специального драйвера для этого устройства. +Cdrecord может быть легко портирован на любую систему с драйвером +SCSI-устройства, похожим на драйвер scg. + +%description devel -l uk.UTF-8 +Пакет cdrecord-devel містить транспортні бібліотеки користувацького +рівня для SCSI, які можуть працювати з будь-яким SCSI-пристроєм без +спеціального драйвера для цього пристрою. Cdrecord може бути легко +портований на будь-яку систему з драйвером SCSI-пристроя, схожим на +драйвер scg. + +%package cdda2wav +Summary: Get WAV files from digital audio cd's +Summary(es.UTF-8): Crea archivos tipo WAV a partir de CDs de audio +Summary(fr.UTF-8): convertisseur CD-Audio->.WAV +Summary(pl.UTF-8): Uzyskaj pliki WAV z cyfrowego kompaktu audio +Summary(pt_BR.UTF-8): Cria arquivos tipo WAV a partir de CDs de áudio +Summary(ru.UTF-8): Утилита для получения файлов .WAV с digital audio CD +Summary(uk.UTF-8): Утиліта для генерації файлів .WAV з digital audio CD +Group: Applications/Sound +Provides: cdda2wav +Obsoletes: cdda2wav +Obsoletes: cdrecord-cdda2wav + +%description cdda2wav +A sampling utility for cdrom drives that are capable of sending audio +cd data in digital form to your host. Data can be dumped into WAV or +sun format sound files. Options control the recording format +(stereo/mono; 8,12,16 bits; different rates). + +%description cdda2wav -l es.UTF-8 +Un utilitario para leer músicas en accionadores de cdrom capaces de +transmitir datos de CDs de audio en forma digital para tu máquina. Los +datos pueden ser grabados en formato WAV o sun. Existen opciones para +controlar el formato de la grabación (stereo/mono, 8, 12, 16 bits, +tasas diferentes). + +%description cdda2wav -l pl.UTF-8 +Narzędzie do zczytywania danych z napędów cdrom, które są w stanie +wysyłać strumień audio. Dane mogą zostać zapisane w formacie plików +WAV lub suna. + +%description cdda2wav -l pt_BR.UTF-8 +Um utilitário para ler músicas em acionadores de cdrom capazes de +transmitir dados de CDs de áudio em forma digital para sua máquina. Os +dados podem ser gravados em formato WAV ou sun. Existem opções para +controlar o formato da gravação (estéreo/mono, 8, 12, 16 bits, taxas +diferentes). + +%description cdda2wav -l ru.UTF-8 +Cdda2wav - это сэмплер, способный считывать аудиоданные с CD в +цифровой форме и сохранять их на диск в виде звуковых файлов формата +.WAV или .sun. Форматы записи включают стерео/моно, 8/12/16 бит и +различные частоты дискретизации. Cdda2wav также может быть использован +как CD-плейер. + +%description cdda2wav -l uk.UTF-8 +Cdda2wav - це семплер, здатний зчитувати аудіодані і CD у цифровій +формі та зберігати їх на диск у вигляді звукових файлів формату .WAV +або .sun. Формати запису включають стерео/моно, 8/12/16 біт та різні +частоты дискретизації. Cdda2wav також може бути використаний як +CD-плейєр. + +%package readcd +Summary: Read/Write data Compact Discs +Summary(pl.UTF-8): Odczytuje/Zapisuje dane z Płyt Kompaktowych +Group: Applications/System +Obsoletes: cdrecord-readcd + +%description readcd +Read/Write data Compact Discs. + +%description readcd -l pl.UTF-8 +Odczytuje/Zapisuje dane z Płyt Kompaktowych. + +%package utils +Summary: Dumping and verifying iso9660 images +Summary(pl.UTF-8): Zrzucanie i weryfikacja obrazów iso9660 +Group: Applications/System + +%description utils +Utility programs for dumping and verifying iso9660 images. + +%description utils -l pl.UTF-8 +Narzędzia do zrzucania i weryfikacji obrazów iso9660. + +%package mkisofs +Summary: Creates an ISO9660 filesystem image +Summary(de.UTF-8): Erstellt ein Dateisystem-Abbild nach ISO9660 +Summary(es.UTF-8): Crea una imagen de un sistema de archivos ISO9660 +Summary(fr.UTF-8): Crée un image système de fichiers ISO9660 +Summary(pl.UTF-8): Tworzy obraz systemu plików ISO9660 +Summary(pt_BR.UTF-8): Cria uma imagem de um sistema de arquivos ISO9660 +Summary(ru.UTF-8): Создает образ файловой системы ISO9660 +Summary(tr.UTF-8): ISO9660 dosya sistemi kopyası oluşturur +Summary(uk.UTF-8): Створює образ файлової системи ISO9660 +Group: Applications/System +Provides: mkisofs = %{epoch}:%{version}-%{release} +Obsoletes: mkisofs + +%description mkisofs +This is the mkisofs package. It is used to create ISO 9660 file system +images for creating CD-ROMs. + +%description mkisofs -l es.UTF-8 +Este es el paquete mkisofs. Se le usa para crear imágenes de sistema +de archivos ISO 9660 en la creación de CD-ROMs. Ahora incluye soporte +para hacer CD-ROMs de boot "El Torito". + +%description mkisofs -l pl.UTF-8 +To jest pakiet mkisofs. Jest on używany do tworzenia obrazów systemów +plików ISO9660 potrzebnych do tworzenia płyt CD-ROM. + +%description mkisofs -l pt_BR.UTF-8 +Este é o pacote mkisofs. Ele é usado para criar imagens de sistema de +arquivos ISO 9660 para criação de CD-ROMs. Agora inclui suporte para +fazer CD-ROMs de boot "El Torito". + +%description mkisofs -l ru.UTF-8 +Программа mkisofs используется для подготовки мастер-диска, т.е. она +генерирует файловую систему ISO9660. Mkisofs делает снимок заданного +дерева каталогов и генерирует бинарный образ этого дерева, который +соответствует файловой системе ISO9660, записываемой на блочное +устройство. Mkisofs используется для записи CD-ROM'ов и включает +поддержку создания загружаемых El Torito CD-ROM'ов. + +%description mkisofs -l uk.UTF-8 +Програма mkisofs використовується для підготовки мастер-диску, вона +генерує файлову систему ISO9660. Mkisofs робить знімок заданого дерева +каталогів та генерує бінарный образ цього дерева, який відповідає +файловій системі ISO9660, записуваній на блочний пристрій. Mkisofs +використовується для запису CD-ROM'ів і має підтримку створення +завантажуваних El Torito CD-ROM'ів. + +%package btcflash +Summary: BTC CD/DVD reader/writer firmware updater +Summary(pl.UTF-8): Program do uaktualniania firmware'u czytników/nagrywarek CD/DVD BTC +Group: Applications/System + +%description btcflash +BTC CD/DVD reader/writer firmware updater. + +%description btcflash -l pl.UTF-8 +Program do uaktualniania firmware'u czytników/nagrywarek CD/DVD firmy +BTC. + +%prep +%setup -q +chmod -R u+rw -R . +%patch0 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 + +# Remove profiled make files +rm -v $(find . -name '*_p.mk') + +cp -p /usr/share/automake/config.* conf + +# kill annoying beep and sleep +%{__sed} -i -e 's/^__gmake_warn.*//g' RULES/mk-gmake.id + +%{__sed} -i -e "s/-o \$(INSUSR) -g \$(INSGRP)//g" RULES/rules.prg +%{__sed} -i -e 's#/\*.*\*/##g' autoconf/xconfig.h.in + +%{__sed} -i -e 's/^\(INSDIR=.*\)lib$/\1%{_lib}/g' lib*/*.mk +%{__sed} -i -e 's/lib\/siconv/%{_lib}\/siconv/g' \ + libsiconv/{sic_nls.c,*/*.mk} mkisofs/{diag/isoinfo.c,mkisofs.c} + +%{__sed} -i -e 's#/usr/bin/gm4#%{_bindir}/m4#g' autoconf/autoconf + +cd autoconf +install -d m4 +mv acgeneral.m4 acspecific.m4 autoheader.m4 acoldnames.m4 autoconf.m4 m4 +mv aclocal.m4 acinclude.m4 + +for a in acgeneral.m4 acspecific.m4 autoheader.m4 acoldnames.m4 autoconf.m4; do + :> $a +done + +# extract only needed functions +sed -ne '/AC_INCL_CHECK_TYPE/,/dnl ###/p' m4/acgeneral.m4 >> acinclude.m4 + +%build +cd autoconf +%{__aclocal} -I . +%{__autoconf} +cd ../cdda2wav +%{__autoconf} +cd .. +%{__make} -j1 \ + PARCH=%{_arch}-%{_target_vendor} \ + O_ARCH=%{_target_os} \ + CC="%{__cc}" \ + LDCC="%{__cc}" \ + COPTOPT="%{rpmcflags}" \ + CFLAGS="%{rpmcflags}" \ + LDFLAGS1="%{rpmldflags}" \ + XEXEEXT= + +%install +rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_includedir}/schily/scg} +%{__make} -j1 install \ + PARCH=%{_arch}-%{_target_vendor} \ + O_ARCH=%{_target_os} \ + DEFINSUMASK=002 \ + DEFINSMODEF=644 \ + DEFINSMODEX=755 \ + INS_BASE=%{_prefix} \ + DESTDIR=$RPM_BUILD_ROOT + +cp -p libscg/scg/*.h $RPM_BUILD_ROOT%{_includedir}/schily/scg + +cp -p cdrecord/cdrecord.dfl $RPM_BUILD_ROOT%{_sysconfdir}/cdrecord.conf + +rm -r $RPM_BUILD_ROOT%{_includedir}/scg +%ifarch x32 +rm -r $RPM_BUILD_ROOT%{_includedir}/schily/x32-pld-linux-cc +%else +rm -r $RPM_BUILD_ROOT%{_includedir}/schily/%{_target_platform}-cc +%endif +rm -r $RPM_BUILD_ROOT%{_docdir}/{mkisofs,rscsi,cdrecord,cdda2wav,libparanoia} +rm $RPM_BUILD_ROOT%{_mandir}/man5/makefiles.5* +rm $RPM_BUILD_ROOT%{_mandir}/man5/makerules.5* + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%doc AN-* doc/cdrecord.ps Changelog README README.mkisofs cdrecord/README.ATAPI cdrecord/README.DiskT@2 +%doc cdrecord/README.{WORM,audio,cdplus,cdtext,cdrw,clone,copy,multi} +%doc cdrecord/README.{parallel,raw,rscsi,sony,verify} make_diskt@2.sh +%doc cdrecord/cdrecord.dfl cdrecord/LICENSE +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cdrecord.conf +%attr(755,root,root) %{_bindir}/cdrecord +%attr(755,root,root) %{_bindir}/scgcheck +%attr(755,root,root) %{_bindir}/scgskeleton +%attr(755,root,root) %{_sbindir}/rscsi +%{_mandir}/man1/cdrecord.1* +%{_mandir}/man1/rscsi.1* +%{_mandir}/man1/scgcheck.1* +%{_mandir}/man1/scgskeleton.1* + +%files devel +%defattr(644,root,root,755) +%{_libdir}/lib*.a +%dir %{_includedir}/schily +%dir %{_includedir}/schily/scg +%{_includedir}/schily/*.h +%{_includedir}/schily/scg/*.h + +%files cdda2wav +%defattr(644,root,root,755) +%doc cdda2wav/Frontends cdda2wav/HOWTOUSE cdda2wav/OtherProgs +%doc cdda2wav/README cdda2wav/THANKS cdda2wav/TODO +%doc cdda2wav/cdda2mp3.new cdda2wav/cdda_links cdda2wav/pitchplay +%doc cdda2wav/readmult cdda2wav/tracknames.pl cdda2wav/tracknames.txt +%doc cdda2wav/FAQ +%attr(755,root,root) %{_bindir}/cdda2wav +%attr(755,root,root) %{_bindir}/cdda2mp3 +%attr(755,root,root) %{_bindir}/cdda2ogg +%{_mandir}/man1/cdda2wav.1* +%{_mandir}/man1/cdda2mp3.1* +%{_mandir}/man1/cdda2ogg.1* + +%files readcd +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/readcd +%{_mandir}/man1/readcd.1* + +%files utils +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/devdump +%attr(755,root,root) %{_bindir}/isodebug +%attr(755,root,root) %{_bindir}/isoinfo +%attr(755,root,root) %{_bindir}/isovfy +%attr(755,root,root) %{_bindir}/isodump +%{_mandir}/man8/isoinfo.8* +%{_mandir}/man8/devdump.8* +%{_mandir}/man8/isovfy.8* +%{_mandir}/man8/isodump.8* +%{_mandir}/man8/isodebug.8* + +%files mkisofs +%defattr(644,root,root,755) +%doc mkisofs/README.compression mkisofs/README.eltorito mkisofs/README +%doc mkisofs/README.graft_dirs mkisofs/README.hfs_boot mkisofs/README.hfs_magic +%doc mkisofs/README.hide mkisofs/README.joliet mkisofs/README.mkhybrid +%doc mkisofs/README.prep_boot mkisofs/README.rootinfo mkisofs/README.session +%doc mkisofs/README.sort mkisofs/README.sparcboot +%attr(755,root,root) %{_bindir}/mkisofs +%attr(755,root,root) %{_bindir}/mkhybrid +%{_libdir}/siconv +%{_mandir}/man8/mkisofs.8* +%{_mandir}/man8/mkhybrid.8* + +%files btcflash +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/btcflash +%{_mandir}/man1/btcflash.1* -- 2.37.3