diff options
author | Luis Medinas <metalgod@gentoo.org> | 2005-08-22 04:27:59 +0000 |
---|---|---|
committer | Luis Medinas <metalgod@gentoo.org> | 2005-08-22 04:27:59 +0000 |
commit | 81205251d1e0fc80239dcf843e151a5b60157b0b (patch) | |
tree | 34387d9f18772debbca71b5ee8721581af102f1d /app-cdr/cdrtools | |
parent | New release: 2.11.90 (diff) | |
download | gentoo-2-81205251d1e0fc80239dcf843e151a5b60157b0b.tar.gz gentoo-2-81205251d1e0fc80239dcf843e151a5b60157b0b.tar.bz2 gentoo-2-81205251d1e0fc80239dcf843e151a5b60157b0b.zip |
Removed problematic revisions of cdrtools-2.01.01_alpha03. Removed CFLAGS for x86 that fix bug #102878. Added a patch that fix -scanbus.
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'app-cdr/cdrtools')
-rw-r--r-- | app-cdr/cdrtools/ChangeLog | 12 | ||||
-rw-r--r-- | app-cdr/cdrtools/Manifest | 8 | ||||
-rw-r--r-- | app-cdr/cdrtools/cdrtools-2.01.01_alpha03-r2.ebuild (renamed from app-cdr/cdrtools/cdrtools-2.01.01_alpha03-r1.ebuild) | 11 | ||||
-rw-r--r-- | app-cdr/cdrtools/cdrtools-2.01.01_alpha03.ebuild | 119 | ||||
-rw-r--r-- | app-cdr/cdrtools/files/cdrtools-2.01.01a01-scanbus.patch | 23 | ||||
-rw-r--r-- | app-cdr/cdrtools/files/cdrtools-2.01a32-scan.patch | 429 | ||||
-rw-r--r-- | app-cdr/cdrtools/files/digest-cdrtools-2.01.01_alpha03-r1 | 2 | ||||
-rw-r--r-- | app-cdr/cdrtools/files/digest-cdrtools-2.01.01_alpha03-r2 (renamed from app-cdr/cdrtools/files/digest-cdrtools-2.01.01_alpha03) | 0 |
8 files changed, 44 insertions, 560 deletions
diff --git a/app-cdr/cdrtools/ChangeLog b/app-cdr/cdrtools/ChangeLog index dec3929e2d2c..086b32ca80a9 100644 --- a/app-cdr/cdrtools/ChangeLog +++ b/app-cdr/cdrtools/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for app-cdr/cdrtools # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdrtools/ChangeLog,v 1.126 2005/08/21 02:36:34 metalgod Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdrtools/ChangeLog,v 1.127 2005/08/22 04:27:59 metalgod Exp $ + +*cdrtools-2.01.01_alpha03-r2 (22 Aug 2005) + + 22 Aug 2005; Luis Medinas <metalgod@gentoo.org> + -files/cdrtools-2.01a32-scan.patch, + +files/cdrtools-2.01.01a01-scanbus.patch, + -cdrtools-2.01.01_alpha03.ebuild, -cdrtools-2.01.01_alpha03-r1.ebuild, + +cdrtools-2.01.01_alpha03-r2.ebuild: + Removed problematic revisions of cdrtools-2.01.01_alpha03. Removed CFLAGS + for x86 that fix bug #102878. Added a patch that fix -scanbus. *cdrtools-2.01.01_alpha03-r1 (21 Aug 2005) diff --git a/app-cdr/cdrtools/Manifest b/app-cdr/cdrtools/Manifest index 81f557d47d92..a33139d7b887 100644 --- a/app-cdr/cdrtools/Manifest +++ b/app-cdr/cdrtools/Manifest @@ -3,16 +3,14 @@ MD5 5a2a9ad0ab6a40d5ee27662bf265bc41 cdrtools-2.01-r1.ebuild 2830 MD5 7851326782af5e5357d8e24d8decee25 cdrtools-2.01-r3.ebuild 3608 MD5 b99aca1cac4436f277c4583809661008 cdrtools-2.01.01_alpha01-r2.ebuild 3614 MD5 fb7c98c4ada508b4870303b6cf6f327c metadata.xml 450 -MD5 6a597a4b76d527942bed17efc28db24e cdrtools-2.01.01_alpha03.ebuild 3520 -MD5 3a787964c3a8f4176a6b8291e03adf02 cdrtools-2.01.01_alpha03-r1.ebuild 3710 +MD5 5ed93235c181c7db8f31212dbfd6a8c5 cdrtools-2.01.01_alpha03-r2.ebuild 3653 MD5 3b1ffea11e1653b7b16c2c89597d1c5a files/cdrtools-2.01-scsi-remote.patch 938 MD5 c848b3b9b6921469483a22caa0fd40c3 files/digest-cdrtools-2.01-r1 67 MD5 8165b59a7b14939c58a88ca1f272cad4 files/digest-cdrtools-2.01-r3 147 MD5 0e8283f78b14f3ead0e78d197e1d5ed1 files/digest-cdrtools-2.01.01_alpha01-r2 153 MD5 1a596f5cae257e97c559716336b30e5b files/mkisofs-iconv-10.patch 16986 -MD5 5a55a164c3584a99297b99bf7975c1d6 files/cdrtools-2.01a32-scan.patch 12397 -MD5 a5a56cb102587325619a4d3a610d0085 files/digest-cdrtools-2.01.01_alpha03 153 MD5 5c79e3ba5125fdb0695604c77a00b707 files/cdrtools-2.01.01a03-rezero.patch 558 MD5 118ed27cd1f6e1cc5e48adc622bb8528 files/cdrtools-2.01.01a03-warnings.patch 853 MD5 9c89bdd0371267dc24f8640160b9ea9e files/cdrtools-2.01a27-writemode.patch 477 -MD5 a5a56cb102587325619a4d3a610d0085 files/digest-cdrtools-2.01.01_alpha03-r1 153 +MD5 0a9c4d3c7d28293dd147c78f57dd2a1f files/cdrtools-2.01.01a01-scanbus.patch 776 +MD5 a5a56cb102587325619a4d3a610d0085 files/digest-cdrtools-2.01.01_alpha03-r2 153 diff --git a/app-cdr/cdrtools/cdrtools-2.01.01_alpha03-r1.ebuild b/app-cdr/cdrtools/cdrtools-2.01.01_alpha03-r2.ebuild index ec2c04c6421e..17c25f8195d8 100644 --- a/app-cdr/cdrtools/cdrtools-2.01.01_alpha03-r1.ebuild +++ b/app-cdr/cdrtools/cdrtools-2.01.01_alpha03-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdrtools/cdrtools-2.01.01_alpha03-r1.ebuild,v 1.1 2005/08/21 02:36:34 metalgod Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdrtools/cdrtools-2.01.01_alpha03-r2.ebuild,v 1.1 2005/08/22 04:27:59 metalgod Exp $ inherit eutils gnuconfig toolchain-funcs flag-o-matic @@ -30,9 +30,9 @@ src_unpack() { # CAN-2004-0806 - Bug 63187 epatch ${FILESDIR}/${PN}-2.01-scsi-remote.patch - epatch ${FILESDIR}/${PN}-2.01a32-scan.patch epatch ${FILESDIR}/${PN}-2.01a27-writemode.patch epatch ${FILESDIR}/${PN}-2.01.01a03-warnings.patch + epatch ${FILESDIR}/${PN}-2.01.01a01-scanbus.patch epatch ${FILESDIR}/${PN}-2.01.01a03-rezero.patch # Add support for On-The-Fly AES encryption @@ -61,7 +61,10 @@ src_compile() { gnuconfig_update use unicode && append-flags "-finput-charset=ISO-8859-1 -fexec-charset=UTF-8" - + if use x86; + then + strip-flags + fi emake CC="$(tc-getCC) -D__attribute_const__=const" COPTX="${CFLAGS}" CPPOPTX="${CPPFLAGS}" LDOPTX="${LDFLAGS}" || die } @@ -95,7 +98,7 @@ src_install() { doins include/scg/*.h cd ${S} - dodoc ABOUT Changelog README README.{ATAPI,audio,cdplus,cdrw,cdtext,clone,copy,DiskT@2,linux,linux-shm,multi,parallel,raw,rscsi,sony,verify} START + dodoc ABOUT Changelog README README.{ATAPI,audio,cdplus,cdrw,cdtext,clone,copy,DiskT@2,linux-shm,multi,parallel,raw,rscsi,sony,verify} START READMEs/README.linux doman */*.1 doman */*.8 diff --git a/app-cdr/cdrtools/cdrtools-2.01.01_alpha03.ebuild b/app-cdr/cdrtools/cdrtools-2.01.01_alpha03.ebuild deleted file mode 100644 index da2703343d34..000000000000 --- a/app-cdr/cdrtools/cdrtools-2.01.01_alpha03.ebuild +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdrtools/cdrtools-2.01.01_alpha03.ebuild,v 1.2 2005/08/18 14:26:46 pylon Exp $ - -inherit eutils gnuconfig toolchain-funcs flag-o-matic - -MY_CRYPT_VERS="2.01-encrypt-1.0rc1" - -DESCRIPTION="A set of tools for CD recording, including cdrecord" -HOMEPAGE="http://cdrecord.berlios.de/old/private/cdrecord.html" -SRC_URI="ftp://ftp.berlios.de/pub/cdrecord/alpha/${P/_alpha/a}.tar.bz2 - on-the-fly-crypt? ( http://burbon04.gmxhome.de/linux/files/${PN}-${MY_CRYPT_VERS}.diff.gz )" - -LICENSE="GPL-2 freedist" -SLOT="0" -KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~s390 ~sparc ~x86" -IUSE="on-the-fly-crypt unicode" - -DEPEND="virtual/libc - !app-cdr/dvdrtools" -RDEPEND="on-the-fly-crypt? ( sys-fs/cryptsetup )" -PROVIDE="virtual/cdrtools" - -S=${WORKDIR}/${PN}-2.01.01 - -src_unpack() { - unpack ${A} - cd ${S} - - # CAN-2004-0806 - Bug 63187 - epatch ${FILESDIR}/${PN}-2.01-scsi-remote.patch - - epatch ${FILESDIR}/${PN}-2.01a32-scan.patch - - # Add support for On-The-Fly AES encryption - # http://burbon04.gmxhome.de/linux/CDREncryption.html - if use on-the-fly-crypt; then - epatch ${DISTDIR}/${PN}-${MY_CRYPT_VERS}.diff.gz || die "Can't apply encryption patch" - fi - - cd ${S}/DEFAULTS - use ppc-macos && MYARCH="mac-os10" || MYARCH="linux" - sed -i "s:/opt/schily:/usr:g" Defaults.${MYARCH} - sed -i "s:/usr/src/linux/include::g" Defaults.${MYARCH} - - cd ${S}/librscg - sed -i "s:/opt/schily:/usr:g" scsi-remote.c - - cd ${S}/RULES - ln -sf i386-linux-cc.rul x86_64-linux-cc.rul - ln -sf i386-linux-gcc.rul x86_64-linux-gcc.rul - ln -sf ppc-linux-cc.rul ppc64-linux-cc.rul - ln -sf mips-linux-cc.rul mips64-linux-cc.rul -} - -src_compile() { - gnuconfig_update - - use unicode && append-flags "-finput-charset=ISO-8859-1 -fexec-charset=UTF-8" - - emake CC="$(tc-getCC) -D__attribute_const__=const" COPTX="${CFLAGS}" CPPOPTX="${CPPFLAGS}" LDOPTX="${LDFLAGS}" || die -} - -src_install() { - cd ${S} - - dobin cdda2wav/OBJ/*-*-cc/cdda2wav || die "cdda2wav" - dobin cdrecord/OBJ/*-*-cc/cdrecord || die "cdrecord" - dobin mkisofs/OBJ/*-*-cc/mkisofs || die "mkisofs" - dobin readcd/OBJ/*-*-cc/readcd || die "readcd" - dosbin rscsi/OBJ/*-*-cc/rscsi || die "rscsi" - - insinto /usr/include - doins incs/*-*-cc/align.h incs/*-*-cc/avoffset.h incs/*-*-cc/xconfig.h || die "include" - - cd mkisofs/diag/OBJ/*-*-cc - dobin devdump isodump isoinfo isovfy || die "dobin" - - cd ${S} - insinto /etc/default - doins rscsi/rscsi.dfl - doins cdrecord/cdrecord.dfl - - cd ${S}/libs/*-*-cc - dolib.a *.a || die "dolib failed" - - cd ${S} - insinto /usr/include/scsilib - doins include/*.h - insinto /usr/include/scsilib/scg - doins include/scg/*.h - - cd ${S} - dodoc ABOUT Changelog README README.{ATAPI,audio,cdplus,cdrw,cdtext,clone,copy,DiskT@2,linux,linux-shm,multi,parallel,raw,rscsi,sony,verify} START - doman */*.1 - doman */*.8 - - cd ${S}/doc - docinto print - dodoc *.ps -} - -pkg_postinst() { - einfo "Note the special license on cdrecord/cdrecord.c starting from line 4648." - if use ppc-macos ; then - einfo - einfo "Darwin/OS X use the following device names:" - einfo - einfo "CD burners: (probably) ./cdrecord dev=IOCompactDiscServices" - einfo - einfo "DVD burners: (probably) ./cdrecord dev=IODVDServices" - einfo - else - echo - einfo "The command line option 'dev=/dev/hdX' (X is the name of your drive)" - einfo "should be used for IDE CD writers. And make sure that the permissions" - einfo "on this device are set properly and your user is in the correct groups." - fi -} diff --git a/app-cdr/cdrtools/files/cdrtools-2.01.01a01-scanbus.patch b/app-cdr/cdrtools/files/cdrtools-2.01.01a01-scanbus.patch new file mode 100644 index 000000000000..b91dd0a09489 --- /dev/null +++ b/app-cdr/cdrtools/files/cdrtools-2.01.01a01-scanbus.patch @@ -0,0 +1,23 @@ +--- cdrtools-2.01.01/libscg/scsi-linux-ata.c.scanbus 2005-01-19 21:13:34.000000000 +0100 ++++ cdrtools-2.01.01/libscg/scsi-linux-ata.c 2005-01-19 21:32:59.634364995 +0100 +@@ -384,7 +384,8 @@ + "try open(%s) return %i, errno %i, cancel\n", + device, f, errno); + } +- return (-2); ++ /* return (-2); */ ++ break; + } else if (errno == ENOENT || errno == ENODEV) { + break; + } +--- cdrtools-2.01.01/libscg/scsi-linux-sg.c.scanbus 2005-01-19 21:34:38.264068893 +0100 ++++ cdrtools-2.01.01/libscg/scsi-linux-sg.c 2005-01-19 21:34:54.386932733 +0100 +@@ -428,7 +428,7 @@ + if (scgp->errstr) + js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, + "Cannot open '%s'", devname); +- return (0); ++ //return (0); + } + } else { + int iparm; diff --git a/app-cdr/cdrtools/files/cdrtools-2.01a32-scan.patch b/app-cdr/cdrtools/files/cdrtools-2.01a32-scan.patch deleted file mode 100644 index 59ad401abc9f..000000000000 --- a/app-cdr/cdrtools/files/cdrtools-2.01a32-scan.patch +++ /dev/null @@ -1,429 +0,0 @@ ---- cdrtools-2.01/libscg/scsi-linux-sg.c.scan 2004-09-22 12:57:24.313986568 +0200 -+++ cdrtools-2.01/libscg/scsi-linux-sg.c 2004-09-22 12:57:24.327984440 +0200 -@@ -287,6 +287,8 @@ - return (0); - } - -+#include <glob.h> -+ - LOCAL int - scgo_open(scgp, device) - SCSI *scgp; -@@ -301,8 +303,9 @@ - register int t; - register int l; - register int nopen = 0; -- char devname[64]; -- BOOL use_ata = FALSE; -+ char *devname; -+ BOOL use_ata = FALSE; -+ glob_t globbuf; - - if (busno >= MAX_SCG || tgt >= MAX_TGT || tlun >= MAX_LUN) { - errno = EINVAL; -@@ -383,103 +386,91 @@ - * look silly but there may be users that did boot from a SCSI hdd - * and connected 4 CD/DVD writers to both IDE cables in the PC. - */ -- if (use_ata) for (i = 0; i <= 25; i++) { -- js_snprintf(devname, sizeof (devname), "/dev/hd%c", i+'a'); -- /* O_NONBLOCK is dangerous */ -- f = open(devname, O_RDWR | O_NONBLOCK); -- if (f < 0) { -- /* -- * Set up error string but let us clear it later -- * if at least one open succeeded. -- */ -- if (scgp->errstr) -- js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, -- "Cannot open '/dev/hd*'"); -- if (errno != ENOENT && errno != ENXIO && errno != ENODEV) { -+ if (use_ata) { -+ glob("/dev/hd[a-z]", GLOB_NOSORT, NULL, &globbuf); -+ -+ for (i = 0; globbuf.gl_pathv && globbuf.gl_pathv[i] != NULL ; i++) { -+ devname = globbuf.gl_pathv[i]; -+ f = open(devname, O_RDWR | O_NONBLOCK); -+ if (f < 0) { -+ /* -+ * Set up error string but let us clear it later -+ * if at least one open succeeded. -+ */ - if (scgp->errstr) - js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, -- "Cannot open '%s'", devname); -- return (0); -- } -- } else { -- int iparm; -- -- if (ioctl(f, SG_GET_TIMEOUT, &iparm) < 0) { -- if (scgp->errstr) -- js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, -- "SCSI unsupported with '/dev/hd*'"); -- close(f); -- continue; -+ "Cannot open '/dev/hd*'"); -+ if (errno != ENOENT && errno != ENXIO && errno != ENODEV && errno != EACCES) { -+ if (scgp->errstr) -+ js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, -+ "Cannot open '%s'", devname); -+ globfree(&globbuf); -+ return (0); -+ } -+ } else { -+ int iparm; -+ -+ if (ioctl(f, SG_GET_TIMEOUT, &iparm) < 0) { -+ if (scgp->errstr) -+ js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, -+ "SCSI unsupported with '/dev/hd*'"); -+ close(f); -+ continue; -+ } -+ sg_clearnblock(f); /* Be very proper about this */ -+ if (sg_setup(scgp, f, busno, tgt, tlun, devname[7]-'a')) { -+ globfree(&globbuf); -+ return (++nopen); -+ } -+ if (busno < 0 && tgt < 0 && tlun < 0) -+ nopen++; - } -- sg_clearnblock(f); /* Be very proper about this */ -- if (sg_setup(scgp, f, busno, tgt, tlun, i)) -- return (++nopen); -- if (busno < 0 && tgt < 0 && tlun < 0) -- nopen++; - } -+ globfree(&globbuf); - } - if (use_ata && nopen == 0) - return (0); - if (nopen > 0 && scgp->errstr) - scgp->errstr[0] = '\0'; - -- if (nopen == 0) for (i = 0; i < 32; i++) { -- js_snprintf(devname, sizeof (devname), "/dev/sg%d", i); -- /* O_NONBLOCK is dangerous */ -- f = open(devname, O_RDWR | O_NONBLOCK); -- if (f < 0) { -- /* -- * Set up error string but let us clear it later -- * if at least one open succeeded. -- */ -- if (scgp->errstr) -- js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, -- "Cannot open '/dev/sg*'"); -- if (errno != ENOENT && errno != ENXIO && errno != ENODEV) { -+ if (nopen == 0) { -+ glob("/dev/scd[0-9]", GLOB_NOSORT, NULL, &globbuf); -+ glob("/dev/scd[0-9][0-9]", GLOB_NOSORT|GLOB_APPEND, NULL, &globbuf); -+ /*glob("/dev/sg[a-z]", GLOB_NOSORT|GLOB_APPEND, NULL, &globbuf);*/ -+ -+ for (i = 0; globbuf.gl_pathv && globbuf.gl_pathv[i] != NULL ; i++) { -+ devname = globbuf.gl_pathv[i]; -+ -+ f = open(devname, O_RDWR | O_NONBLOCK); -+ if (f < 0) { -+ /* -+ * Set up error string but let us clear it later -+ * if at least one open succeeded. -+ */ - if (scgp->errstr) - js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, -- "Cannot open '%s'", devname); -- return (0); -+ "Cannot open '/dev/scd*'"); -+ if (errno != ENOENT && errno != ENXIO && errno != ENODEV) { -+ if (scgp->errstr) -+ js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, -+ "Cannot open '%s'", devname); -+ globfree(&globbuf); -+ return (0); -+ } -+ } else { -+ sg_clearnblock(f); /* Be very proper about this */ -+ if (sg_setup(scgp, f, busno, tgt, tlun, -1)) { -+ globfree(&globbuf); -+ return (++nopen); -+ } -+ if (busno < 0 && tgt < 0 && tlun < 0) -+ nopen++; - } -- } else { -- sg_clearnblock(f); /* Be very proper about this */ -- if (sg_setup(scgp, f, busno, tgt, tlun, -1)) -- return (++nopen); -- if (busno < 0 && tgt < 0 && tlun < 0) -- nopen++; - } - } - if (nopen > 0 && scgp->errstr) - scgp->errstr[0] = '\0'; - -- if (nopen == 0) for (i = 0; i <= 25; i++) { -- js_snprintf(devname, sizeof (devname), "/dev/sg%c", i+'a'); -- /* O_NONBLOCK is dangerous */ -- f = open(devname, O_RDWR | O_NONBLOCK); -- if (f < 0) { -- /* -- * Set up error string but let us clear it later -- * if at least one open succeeded. -- */ -- if (scgp->errstr) -- js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, -- "Cannot open '/dev/sg*'"); -- if (errno != ENOENT && errno != ENXIO && errno != ENODEV) { -- if (scgp->errstr) -- js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, -- "Cannot open '%s'", devname); -- return (0); -- } -- } else { -- sg_clearnblock(f); /* Be very proper about this */ -- if (sg_setup(scgp, f, busno, tgt, tlun, -1)) -- return (++nopen); -- if (busno < 0 && tgt < 0 && tlun < 0) -- nopen++; -- } -- } -- if (nopen > 0 && scgp->errstr) -- scgp->errstr[0] = '\0'; - - openbydev: - if (device != NULL && *device != '\0') { ---- cdrtools-2.01/libscg/scsi-linux-ata.c.scan 2004-06-12 12:48:12.000000000 +0200 -+++ cdrtools-2.01/libscg/scsi-linux-ata.c 2004-09-22 12:57:24.330983984 +0200 -@@ -267,7 +267,7 @@ - starget, - slun; - -- f = open(device, O_RDONLY | O_NONBLOCK); -+ f = open(device, O_RDWR | O_NONBLOCK); - - if (f < 0) { - if (scgp->errstr) -@@ -283,6 +283,9 @@ - return (nopen); - } - -+#include <glob.h> -+ -+ - LOCAL int - scan_internal(scgp, nopen) - SCSI *scgp; -@@ -293,118 +296,62 @@ - int schilly_bus, - target, - lun; -- char device[128]; -+ char *device; -+ glob_t globbuf; -+ - /* - * try always with devfs - * unfortunatelly the solution with test of existing - * of '/dev/.devfsd' don't work, because it root.root 700 - * and i don't like run suid root - */ -- BOOL DEVFS = TRUE; -+ BOOL DEVFS = FALSE; - -- if (DEVFS) { -- for (i = 0; ; i++) { -- sprintf(device, "/dev/cdroms/cdrom%i", i); -- if ((f = open(device, O_RDONLY | O_NONBLOCK)) < 0) { -- if (errno != ENOENT && errno != ENXIO && errno != ENODEV && errno != EACCES) { -- if (scgp->debug > 4) { -- js_fprintf((FILE *) scgp->errfile, -- "try open(%s) return %i, errno %i, cancel\n", device, f, errno); -- } -- return (-2); -- } else if (errno == ENOENT || errno == ENODEV) { -- if (scgp->debug > 4) { -- js_fprintf((FILE *) scgp->errfile, -- "try open(%s) return %i, errno %i\n", device, f, errno); -- } -- if (0 == i) { -- DEVFS = FALSE; -- if (scgp->debug > 4) { -- js_fprintf((FILE *) scgp->errfile, -- "DEVFS not detected, continuing with old dev\n"); -- } -- } -- break; -- } -+ glob("/dev/cdroms/cdrom*", -+ GLOB_NOSORT, -+ NULL, &globbuf); -+ glob("/dev/hd[a-z]", -+ GLOB_NOSORT|GLOB_APPEND, -+ NULL, &globbuf); -+ /*glob("/dev/scd*", -+ GLOB_NOSORT|GLOB_APPEND, -+ NULL, &globbuf);*/ -+ -+ for (i = 0; globbuf.gl_pathv && globbuf.gl_pathv[i] != NULL ; i++) { -+ device = globbuf.gl_pathv[i]; -+ if ((f = open(device, O_RDWR | O_NONBLOCK)) < 0) { -+ if (errno != ENOENT && errno != ENXIO && errno != ENODEV && errno != EACCES) { - if (scgp->debug > 4) { -- if (errno == EACCES) { -- js_fprintf((FILE *) scgp->errfile, -- "errno (EACCESS), you don't have the needed rights for %s\n", -- device); -- } - js_fprintf((FILE *) scgp->errfile, -- "try open(%s) return %i, errno %i, trying next cdrom\n", -- device, f, errno); -+ "try open(%s) return %i, errno %i, cancel\n", device, f, errno); - } -- } else { -- if (scgp->debug > 4) { -+ globfree(&globbuf); -+ return (-2); -+ } -+ if (scgp->debug > 4) { -+ if (errno == EACCES) { - js_fprintf((FILE *) scgp->errfile, -- "try open(%s) return %i errno %i calling sg_mapdev(...)\n", -- device, f, errno); -- } -- if (sg_amapdev(scgp, f, device, &schilly_bus, &target, &lun)) { -- (++(*nopen)); -- } else { -- close(f); -+ "errno (EACCESS), you don't have the needed rights for %s\n", -+ device); - } -+ js_fprintf((FILE *) scgp->errfile, -+ "try open(%s) return %i, errno %i, trying next cdrom\n", -+ device, f, errno); - } -- } -- } -- if (!DEVFS) { -- /* for /dev/sr0 - /dev/sr? */ -- for (i = 0; ; i++) { -- sprintf(device, "/dev/sr%i", i); -- if ((f = open(device, O_RDONLY | O_NONBLOCK)) < 0) { -- if (errno != ENOENT && errno != ENXIO && errno != ENODEV && errno != EACCES) { -- if (scgp->debug > 4) { -- js_fprintf((FILE *) scgp->errfile, -- "try open(%s) return %i, errno %i, cancel\n", -- device, f, errno); -- } -- return (-2); -- } else if (errno == ENOENT || errno == ENODEV) { -- break; -- } -- } else { -- if (sg_amapdev(scgp, f, device, &schilly_bus, &target, &lun)) { -- (++(*nopen)); -- } else { -- close(f); -- } -+ } else { -+ if (scgp->debug > 4) { -+ js_fprintf((FILE *) scgp->errfile, -+ "try open(%s) return %i errno %i calling sg_mapdev(...)\n", -+ device, f, errno); - } -- } -- -- /* for /dev/hda - /dev/hdz */ -- for (i = 'a'; i <= 'z'; i++) { -- sprintf(device, "/dev/hd%c", i); -- if ((f = open(device, O_RDONLY | O_NONBLOCK)) < 0) { -- if (errno != ENOENT && errno != ENXIO && errno != EACCES) { -- if (scgp->debug > 4) { -- js_fprintf((FILE *) scgp->errfile, -- "try open(%s) return %i, errno %i, cancel\n", -- device, f, errno); -- } -- return (-2); -- } else if (errno == ENOENT || errno == ENODEV) { -- break; -- } -+ if (sg_amapdev(scgp, f, device, &schilly_bus, &target, &lun)) { -+ (++(*nopen)); - } else { -- /* ugly hack, make better, when you can. Alex */ -- if (0 > ioctl(f, CDROM_DRIVE_STATUS, CDSL_CURRENT)) { -- if (scgp->debug > 4) { -- js_fprintf((FILE *) scgp->errfile, -- "%s is not a cdrom, skipping\n", -- device); -- } -- close(f); -- } else if (sg_amapdev(scgp, f, device, &schilly_bus, &target, &lun)) { -- (++(*nopen)); -- } else { -- close(f); -- } -+ close(f); - } - } - } -+ globfree(&globbuf); - return (0); - } - ---- cdrtools-2.01/libscg/scsi-linux-pg.c.scan 2004-01-15 01:54:36.000000000 +0100 -+++ cdrtools-2.01/libscg/scsi-linux-pg.c 2004-09-22 12:59:04.107815600 +0200 -@@ -130,6 +130,8 @@ - return (0); - } - -+#include <glob.h> -+ - LOCAL int - scgo_open(scgp, device) - SCSI *scgp; -@@ -146,6 +148,8 @@ - #endif - register int nopen = 0; - char devname[32]; -+ glob_t globbuf; -+ int i; - - if (busno >= MAX_SCG || tgt >= MAX_TGT || tlun >= MAX_LUN) { - errno = EINVAL; -@@ -217,10 +221,14 @@ - scglocal(scgp)->scgfiles[busno][tgt][tlun] = f; - return (1); - } else { -+ const char *dev; - tlun = 0; -- for (tgt = 0; tgt < MAX_TGT; tgt++) { -- js_snprintf(devname, sizeof (devname), "/dev/pg%d", tgt); -- f = open(devname, O_RDWR | O_NONBLOCK); -+ glob("/dev/pg[0-9]", GLOB_NOSORT, NULL, &globbuf); -+ glob("/dev/pg[0-9][0-9]", GLOB_NOSORT|GLOB_APPEND, NULL, &globbuf); -+ for (i = 0; globbuf.gl_pathv && globbuf.gl_pathv[i] != NULL ; i++) { -+ dev = globbuf.gl_pathv[i]; -+ tgt = atoi(&dev[7]); -+ f = open(dev, O_RDWR | O_NONBLOCK); - if (f < 0) { - /* - * Set up error string but let us clear it later -@@ -232,7 +240,8 @@ - if (errno != ENOENT && errno != ENXIO && errno != ENODEV) { - if (scgp->errstr) - js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, -- "Cannot open '%s'", devname); -+ "Cannot open '%s'", dev); -+ globfree(&globbuf); - return (0); - } - } else { -@@ -240,6 +249,8 @@ - nopen++; - } - } -+ globfree(&globbuf); -+ - } - if (nopen > 0 && scgp->errstr) - scgp->errstr[0] = '\0'; diff --git a/app-cdr/cdrtools/files/digest-cdrtools-2.01.01_alpha03-r1 b/app-cdr/cdrtools/files/digest-cdrtools-2.01.01_alpha03-r1 deleted file mode 100644 index 5e5a8969111b..000000000000 --- a/app-cdr/cdrtools/files/digest-cdrtools-2.01.01_alpha03-r1 +++ /dev/null @@ -1,2 +0,0 @@ -MD5 6c5683a6f85c89cc163307a5e434086c cdrtools-2.01.01a03.tar.bz2 1423541 -MD5 785184b45952798c72b26e3da9db0e0f cdrtools-2.01-encrypt-1.0rc1.diff.gz 25384 diff --git a/app-cdr/cdrtools/files/digest-cdrtools-2.01.01_alpha03 b/app-cdr/cdrtools/files/digest-cdrtools-2.01.01_alpha03-r2 index 5e5a8969111b..5e5a8969111b 100644 --- a/app-cdr/cdrtools/files/digest-cdrtools-2.01.01_alpha03 +++ b/app-cdr/cdrtools/files/digest-cdrtools-2.01.01_alpha03-r2 |