cpio/cpio-default_tape_dev.patch
Martin Pluskal c5e3d07b62 Accepting request 1094882 from home:dspinella:branches:Archiving
- Update to 2.14:
  * New option --ignore-dirnlink
    Valid in copy-out mode, it instructs cpio to ignore the actual number of
    links reported for each directory member and always store 2 instead.
  * Changes in --reproducible option
    The --reproducible option implies --ignore-dirlink.  In other words, it is
    equivalent to --ignore-devno --ignore-dirnlink --renumber-inodes.
  * Use GNU ls algorithm for deciding timestamp format in -tv mode
  * Fix cpio header verification.
  * Fix handling of device numbers on copy out.
  * Fix calculation of CRC in copy-out mode.
  * Rewrite the fix for CVE-2015-1197.
  * Fix combination of --create --append --directory.
  * Fix appending to archives bigger than 2G.
- Refresh patches:
  * cpio-open_nonblock.patch
  * cpio-dev_number.patch
  * cpio-default_tape_dev.patch
  * cpio-pattern-file-sigsegv.patch
- Remove patches:
  * cpio-revert-CVE-2015-1197-fix.patch
  * fix-CVE-2021-38185.patch
  * fix-CVE-2021-38185_2.patch
  * fix-CVE-2021-38185_3.patch

OBS-URL: https://build.opensuse.org/request/show/1094882
OBS-URL: https://build.opensuse.org/package/show/Archiving/cpio?expand=0&rev=91
2023-06-23 13:45:55 +00:00

29 lines
920 B
Diff

Index: src/mt.c
===================================================================
--- src/mt.c.orig
+++ src/mt.c
@@ -224,11 +224,18 @@ parse_opt (int key, char *arg, struct ar
{
tapedev = getenv ("TAPE");
if (tapedev == NULL)
-#ifdef DEFTAPE /* From sys/mtio.h. */
- tapedev = DEFTAPE;
-#else
- error (MT_EXIT_INVOP, 0, _("no tape device specified"));
-#endif
+
+/* 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;
}
break;