summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-09-18 22:05:40 +0000
committerMike Frysinger <vapier@gentoo.org>2005-09-18 22:05:40 +0000
commit556fa0e4cb055e5b7d2889c1dc9f66e8bbc888b4 (patch)
tree5d4a73d45259a06031a4fb8ea28a67d35184385e /sys-apps/eject
parentmerged upstream (diff)
downloadgentoo-2-556fa0e4cb055e5b7d2889c1dc9f66e8bbc888b4.tar.gz
gentoo-2-556fa0e4cb055e5b7d2889c1dc9f66e8bbc888b4.tar.bz2
gentoo-2-556fa0e4cb055e5b7d2889c1dc9f66e8bbc888b4.zip
Version bump #106356 by Surakshan Mendis.
(Portage version: 2.0.52-r1 http://ronaldmcnightrider.ytmnd.com/ )
Diffstat (limited to 'sys-apps/eject')
-rw-r--r--sys-apps/eject/ChangeLog9
-rw-r--r--sys-apps/eject/eject-2.1.0.ebuild44
-rw-r--r--sys-apps/eject/files/digest-eject-2.1.01
-rw-r--r--sys-apps/eject/files/eject-2.1.0-regcomp-check.patch18
-rw-r--r--sys-apps/eject/files/eject-2.1.0-scsi-io-update.patch116
5 files changed, 187 insertions, 1 deletions
diff --git a/sys-apps/eject/ChangeLog b/sys-apps/eject/ChangeLog
index 215c03e1a393..9e08540ffd8b 100644
--- a/sys-apps/eject/ChangeLog
+++ b/sys-apps/eject/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-apps/eject
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/eject/ChangeLog,v 1.34 2005/07/25 20:05:51 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/eject/ChangeLog,v 1.35 2005/09/18 22:05:40 vapier Exp $
+
+*eject-2.1.0 (18 Sep 2005)
+
+ 18 Sep 2005; Mike Frysinger <vapier@gentoo.org>
+ +files/eject-2.1.0-regcomp-check.patch,
+ +files/eject-2.1.0-scsi-io-update.patch, +eject-2.1.0.ebuild:
+ Version bump #106356 by Surakshan Mendis.
25 Jul 2005; Diego Pettenò <flameeyes@gentoo.org> eject-2.0.13.ebuild,
eject-2.0.13-r1.ebuild, eject-2.0.13-r2.ebuild:
diff --git a/sys-apps/eject/eject-2.1.0.ebuild b/sys-apps/eject/eject-2.1.0.ebuild
new file mode 100644
index 000000000000..e4006f5f32f6
--- /dev/null
+++ b/sys-apps/eject/eject-2.1.0.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/eject/eject-2.1.0.ebuild,v 1.1 2005/09/18 22:05:40 vapier Exp $
+
+inherit eutils
+
+DESCRIPTION="A command to eject a disc from the CD-ROM drive"
+HOMEPAGE="http://eject.sourceforge.net/"
+SRC_URI="http://www.ibiblio.org/pub/Linux/utils/disk-management/${P}.tar.gz
+ http://www.pobox.com/~tranter/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="nls"
+
+DEPEND="!virtual/eject"
+PROVIDE="virtual/eject"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-2.0.13-autoclose.patch
+ epatch "${FILESDIR}"/${PN}-2.0.13-header.patch
+ epatch "${FILESDIR}"/${PN}-2.0.13-use-mountpoints.patch
+ epatch "${FILESDIR}"/${PN}-2.0.13-xmalloc.patch
+ epatch "${FILESDIR}"/${P}-regcomp-check.patch
+ epatch "${FILESDIR}"/${PN}-2.0.13-pumount.patch
+ epatch "${FILESDIR}"/${PN}-2.0.13-i18n-uclibc.patch
+ epatch "${FILESDIR}"/${P}-scsi-io-update.patch
+
+ sed -i '/^AM_CFLAGS/s:-O3::' Makefile.in
+ if ! use nls ; then
+ sed -i "s:SUBDIRS = po::" Makefile.in || die "sed nls failed"
+ fi
+
+ # Fix busted timestamps in tarball
+ touch -r aclocal.m4 configure.in
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+ dodoc ChangeLog README PORTING TODO AUTHORS NEWS PROBLEMS
+}
diff --git a/sys-apps/eject/files/digest-eject-2.1.0 b/sys-apps/eject/files/digest-eject-2.1.0
new file mode 100644
index 000000000000..ea145a9572f9
--- /dev/null
+++ b/sys-apps/eject/files/digest-eject-2.1.0
@@ -0,0 +1 @@
+MD5 82e3a7a4d7e3323018c6938015ff25f7 eject-2.1.0.tar.gz 66819
diff --git a/sys-apps/eject/files/eject-2.1.0-regcomp-check.patch b/sys-apps/eject/files/eject-2.1.0-regcomp-check.patch
new file mode 100644
index 000000000000..3c225346caad
--- /dev/null
+++ b/sys-apps/eject/files/eject-2.1.0-regcomp-check.patch
@@ -0,0 +1,18 @@
+Make sure the regcomp's work.
+
+http://bugs.gentoo.org/91977
+
+--- eject.c
++++ eject.c
+@@ -882,7 +882,10 @@ static char *MultiplePartitions(const ch
+ strcpy(pattern, "^/dev/");
+ strcat(pattern, partitionDevice[i]);
+ strcat(pattern, "[a-z]([0-9]?[0-9])?$");
+- regcomp(&preg, pattern, REG_EXTENDED|REG_NOSUB);
++ if (regcomp(&preg, pattern, REG_EXTENDED|REG_NOSUB) != 0) {
++ perror(programName);
++ exit(1);
++ }
+ status = regexec(&preg, name, 1, 0, 0);
+ regfree(&preg);
+ if (status == 0) {
diff --git a/sys-apps/eject/files/eject-2.1.0-scsi-io-update.patch b/sys-apps/eject/files/eject-2.1.0-scsi-io-update.patch
new file mode 100644
index 000000000000..cc449068b28e
--- /dev/null
+++ b/sys-apps/eject/files/eject-2.1.0-scsi-io-update.patch
@@ -0,0 +1,116 @@
+===================================================================
+RCS file: /cvsroot/eject/eject/eject/eject.c,v
+retrieving revision 1.3
+retrieving revision 1.4
+diff -u -r1.3 -r1.4
+--- eject/eject/eject/eject.c 2005/07/24 23:54:48 1.3
++++ eject/eject/eject/eject.c 2005/08/24 00:39:38 1.4
+@@ -625,56 +625,51 @@
+
+
+ /*
+- * Eject using SCSI commands. Return 1 if successful, 0 otherwise.
++ * Eject using SCSI SG_IO commands. Return 1 if successful, 0 otherwise.
+ */
+ static int EjectScsi(int fd)
+ {
+- int status;
+- struct sdata {
+- int inlen;
+- int outlen;
+- char cmd[256];
+- } scsi_cmd;
+-
+- scsi_cmd.inlen = 0;
+- scsi_cmd.outlen = 0;
+- scsi_cmd.cmd[0] = ALLOW_MEDIUM_REMOVAL;
+- scsi_cmd.cmd[1] = 0;
+- scsi_cmd.cmd[2] = 0;
+- scsi_cmd.cmd[3] = 0;
+- scsi_cmd.cmd[4] = 0;
+- scsi_cmd.cmd[5] = 0;
+- status = ioctl(fd, SCSI_IOCTL_SEND_COMMAND, (void *)&scsi_cmd);
+- if (status != 0)
++ int status, k;
++ sg_io_hdr_t io_hdr;
++ unsigned char allowRmBlk[6] = {ALLOW_MEDIUM_REMOVAL, 0, 0, 0, 0, 0};
++ unsigned char startStop1Blk[6] = {START_STOP, 0, 0, 0, 1, 0};
++ unsigned char startStop2Blk[6] = {START_STOP, 0, 0, 0, 2, 0};
++ unsigned char inqBuff[2];
++ unsigned char sense_buffer[32];
++
++ if ((ioctl(fd, SG_GET_VERSION_NUM, &k) < 0) || (k < 30000)) {
++ printf("not an sg device, or old sg driver\n");
++ return 0;
++ }
++
++ memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
++ io_hdr.interface_id = 'S';
++ io_hdr.cmd_len = 6;
++ io_hdr.mx_sb_len = sizeof(sense_buffer);
++ io_hdr.dxfer_direction = SG_DXFER_NONE;
++ io_hdr.dxfer_len = 0;
++ io_hdr.dxferp = inqBuff;
++ io_hdr.sbp = sense_buffer;
++ io_hdr.timeout = 2000;
++
++ io_hdr.cmdp = allowRmBlk;
++ status = ioctl(fd, SG_IO, (void *)&io_hdr);
++ if (status < 0)
+ return 0;
+
+- scsi_cmd.inlen = 0;
+- scsi_cmd.outlen = 0;
+- scsi_cmd.cmd[0] = START_STOP;
+- scsi_cmd.cmd[1] = 0;
+- scsi_cmd.cmd[2] = 0;
+- scsi_cmd.cmd[3] = 0;
+- scsi_cmd.cmd[4] = 1;
+- scsi_cmd.cmd[5] = 0;
+- status = ioctl(fd, SCSI_IOCTL_SEND_COMMAND, (void *)&scsi_cmd);
+- if (status != 0)
++ io_hdr.cmdp = startStop1Blk;
++ status = ioctl(fd, SG_IO, (void *)&io_hdr);
++ if (status < 0)
+ return 0;
+
+- scsi_cmd.inlen = 0;
+- scsi_cmd.outlen = 0;
+- scsi_cmd.cmd[0] = START_STOP;
+- scsi_cmd.cmd[1] = 0;
+- scsi_cmd.cmd[2] = 0;
+- scsi_cmd.cmd[3] = 0;
+- scsi_cmd.cmd[4] = 2;
+- scsi_cmd.cmd[5] = 0;
+- status = ioctl(fd, SCSI_IOCTL_SEND_COMMAND, (void *)&scsi_cmd);
+- if (status != 0)
++ io_hdr.cmdp = startStop2Blk;
++ status = ioctl(fd, SG_IO, (void *)&io_hdr);
++ if (status < 0)
+ return 0;
+
+ /* force kernel to reread partition table when new disc inserted */
+ status = ioctl(fd, BLKRRPART);
+- return (status == 0);
++ return 1;
+ }
+
+
+@@ -686,7 +681,7 @@
+ int status;
+
+ status = ioctl(fd, FDEJECT);
+- return (status == 0);
++ return (status >= 0);
+ }
+
+
+@@ -701,7 +696,7 @@
+ op.mt_op = MTOFFL; /* rewind and eject */
+ op.mt_count = 0; /* not used */
+ status = ioctl(fd, MTIOCTOP, &op);
+- return (status == 0);
++ return (status >= 0);
+ }
+
+