From 73eb62cd082a565a813e432c988057c6ec53dbba69df81b4e415481fe7135191 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 4 Aug 2008 10:30:39 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cpio?expand=0&rev=15 --- cpio-2.9-default_tape_dev.patch | 27 +++++++++++++++++++++++++++ cpio.changes | 7 +++++++ cpio.spec | 8 +++++++- 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 cpio-2.9-default_tape_dev.patch diff --git a/cpio-2.9-default_tape_dev.patch b/cpio-2.9-default_tape_dev.patch new file mode 100644 index 0000000..d23c8ef --- /dev/null +++ b/cpio-2.9-default_tape_dev.patch @@ -0,0 +1,27 @@ +--- src/mt.c ++++ src/mt.c +@@ -664,11 +664,20 @@ + { + tapedev = getenv ("TAPE"); + if (tapedev == NULL) +-#ifdef DEFTAPE /* From sys/mtio.h. */ +- tapedev = DEFTAPE; +-#else ++/* Suse doesn't have /dev/tape as link to /dev/nst0 any more. ++Instead it uses udev and creates different names in /dev/tape/by-id/ directory. ++If it is SCSI tape storage then it creates /dev/tape/by-id/scsi--nst ++If it is USB device then it creates something not predictibable: ++/dev/tape/by-id/scsi-*HP_blabla*{VENDOR_SPECIFIC}*-nst ++So let's use old behave which was /dev/nst0. ++bnc#355241 ++*/ ++/* #ifdef DEFTAPE * From sys/mtio.h. * */ ++# define DEFSUSETAPE "/dev/nst0" ++ tapedev = DEFSUSETAPE; ++/* #else + error (1, 0, _("no tape device specified")); +-#endif ++#endif */ + } + + #ifdef MTDENS diff --git a/cpio.changes b/cpio.changes index f190e4f..97e2ebf 100644 --- a/cpio.changes +++ b/cpio.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Aug 4 12:02:01 CEST 2008 - lmichnovic@suse.cz + +- changed default tape device for 'mt' command to /dev/nst0 + /dev/tape is not symlink any more but directory handled by udev + (*default_tape_dev.patch) [bnc#355241] + ------------------------------------------------------------------- Fri Aug 1 18:16:00 CEST 2008 - cthiel@suse.de diff --git a/cpio.spec b/cpio.spec index db94bba..a437025 100644 --- a/cpio.spec +++ b/cpio.spec @@ -17,7 +17,7 @@ License: GPL v3 only Group: Productivity/Archiving/Compression AutoReqProv: on Version: 2.9 -Release: 73 +Release: 75 Summary: A Backup and Archiving Utility Source: cpio-2.9.tar.bz2 Patch1: cpio-2.9-no_rmt.patch @@ -40,6 +40,7 @@ Patch16: cpio-2.9-gnulib.patch # make posibble to have device nodes with major number > 127 # Red Hat Bugzilla #450109 Patch17: cpio-2.9-dev_number.patch +Patch18: cpio-2.9-default_tape_dev.patch PreReq: %install_info_prereq BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: %{name}-lang = %{version} @@ -83,6 +84,7 @@ Authors: %patch15 %patch16 %patch17 +%patch18 chmod 755 . chmod u+w * chmod a+r * @@ -127,6 +129,10 @@ rm -rf $RPM_BUILD_ROOT %files lang -f %{name}.lang %changelog +* Mon Aug 04 2008 lmichnovic@suse.cz +- changed default tape device for 'mt' command to /dev/nst0 + /dev/tape is not symlink any more but directory handled by udev + (*default_tape_dev.patch) [bnc#355241] * Fri Aug 01 2008 cthiel@suse.de - specfile cleanup * Fri Jul 18 2008 lmichnovic@suse.cz