Sync from SUSE:SLFO:Main cpio revision 5e08944fe4289e3897cc485257c12615

This commit is contained in:
Adrian Schröter 2024-05-03 11:51:59 +02:00
commit fcf11da3e7
16 changed files with 1243 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
cpio-2.15.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

BIN
cpio-2.15.tar.bz2.sig Normal file

Binary file not shown.

View File

@ -0,0 +1,24 @@
Index: src/copyin.c
===================================================================
--- src/copyin.c.orig
+++ src/copyin.c
@@ -1420,6 +1420,19 @@ process_copy_in ()
cpio_file_stat_free (&file_hdr);
+ if (tty_in)
+ {
+ fclose(tty_in);
+ }
+ if (tty_out)
+ {
+ fclose(tty_out);
+ }
+ if (rename_in)
+ {
+ fclose(rename_in);
+ }
+
if (append_flag)
return;

View File

@ -0,0 +1,28 @@
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;

24
cpio-dev_number.patch Normal file
View File

@ -0,0 +1,24 @@
Index: src/copyin.c
===================================================================
--- src/copyin.c.orig
+++ src/copyin.c
@@ -1287,15 +1287,15 @@ read_in_binary (struct cpio_file_stat *f
swab_array ((char *) short_hdr, 13);
}
- file_hdr->c_dev_maj = major (short_hdr->c_dev);
- file_hdr->c_dev_min = minor (short_hdr->c_dev);
+ file_hdr->c_dev_maj = major ((unsigned short)short_hdr->c_dev);
+ file_hdr->c_dev_min = minor ((unsigned short)short_hdr->c_dev);
file_hdr->c_ino = short_hdr->c_ino;
file_hdr->c_mode = short_hdr->c_mode;
file_hdr->c_uid = short_hdr->c_uid;
file_hdr->c_gid = short_hdr->c_gid;
file_hdr->c_nlink = short_hdr->c_nlink;
- file_hdr->c_rdev_maj = major (short_hdr->c_rdev);
- file_hdr->c_rdev_min = minor (short_hdr->c_rdev);
+ file_hdr->c_rdev_maj = major ((unsigned short)short_hdr->c_rdev);
+ file_hdr->c_rdev_min = minor ((unsigned short)short_hdr->c_rdev);
file_hdr->c_mtime = (unsigned long) short_hdr->c_mtimes[0] << 16
| short_hdr->c_mtimes[1];
file_hdr->c_filesize = (unsigned long) short_hdr->c_filesizes[0] << 16

View File

@ -0,0 +1,79 @@
Index: src/util.c
===================================================================
--- src/util.c.orig
+++ src/util.c
@@ -203,8 +203,15 @@ tape_fill_input_buffer (int in_des, int
input_size = rmtread (in_des, input_buffer, num_bytes);
if (input_size == 0 && input_is_special)
{
- get_next_reel (in_des);
+ if (!tape_eof (in_des))
+ get_next_reel (in_des);
input_size = rmtread (in_des, input_buffer, num_bytes);
+ if (input_size == 0)
+ {
+ if (tape_eod (in_des))
+ get_next_reel (in_des);
+ input_size = rmtread (in_des, input_buffer, num_bytes);
+ }
}
if (input_size == SAFE_READ_ERROR)
error (PAXEXIT_FAILURE, errno, _("read error"));
@@ -366,8 +373,15 @@ tape_buffered_peek (char *peek_buf, int
{
if (input_is_special)
{
- get_next_reel (in_des);
+ if (!tape_eof (in_des))
+ get_next_reel (in_des);
tmp_input_size = rmtread (in_des, append_buf, io_block_size);
+ if (tmp_input_size == 0)
+ {
+ if (tape_eod (in_des))
+ get_next_reel (in_des);
+ tmp_input_size = rmtread (in_des, append_buf, io_block_size);
+ }
}
else
break;
@@ -829,6 +843,40 @@ tape_offline (int tape_des)
#endif
}
+int
+tape_eof( int tape_des)
+{
+ struct mtget status;
+
+ if (rmtioctl (tape_des, MTIOCGET, (char*)&status) == -1) {
+ error (1, errno, "Cannot get tape status");
+ return 0;
+ }
+
+ if (GMT_EOF(status.mt_gstat)) {
+ return 1;
+ }
+
+ return 0;
+}
+
+int
+tape_eod( int tape_des)
+{
+ struct mtget status;
+
+ if (rmtioctl (tape_des, MTIOCGET, (char*)&status) == -1) {
+ error (1, errno, "Cannot get tape status");
+ return 1;
+ }
+
+ if (GMT_EOD(status.mt_gstat)) {
+ return 1;
+ }
+
+ return 0;
+}
+
/* The file on file descriptor TAPE_DES is assumed to be magnetic tape
(or floppy disk or other device) and the end of the medium
has been reached. Ask the user for to mount a new "tape" to continue

View File

@ -0,0 +1,13 @@
Index: cpio-2.13/src/mt.c
===================================================================
--- cpio-2.13.orig/src/mt.c
+++ cpio-2.13/src/mt.c
@@ -208,7 +208,7 @@ parse_opt (int key, char *arg, struct ar
{
char *p;
long val = strtol (arg, &p, 0);
- if (*p || (count = val) != count)
+ if (*p || (count = val) != val)
error (MT_EXIT_INVOP, 0, _("invalid count value"));
}
break;

68
cpio-open_nonblock.patch Normal file
View File

@ -0,0 +1,68 @@
From: Alexey Svistunov <svalx@svalx.net>
Date: 2017-02-17 16:07:00 +0300
Subject: open device with O_NONBLOCK option
References: https://savannah.gnu.org/patch/?9263, bnc#94449
Upstream: submitted
When running the 2.6 kernel, "mt -f /dev/nst0 status" blocks if there is
no media in the drive. The same occurs for other commands.
When running the 2.4.24 kernel, "mt -f /dev/nst0 status" does not block
when there is no tape in the drive.
This behavior change is documented for the 2.6 kernel (see
kernel-source-2.6.3/Documentation/scsi/st.txt for the full doc):
If the open option O_NONBLOCK is used, open succeeds even if the
drive is not ready. If O_NONBLOCK is not used, the driver waits for
the drive to become ready. If this does not happen in ST_BLOCK_SECONDS
seconds, open fails with the errno value EIO. With O_NONBLOCK the
device can be opened for writing even if there is a write protected
tape in the drive (commands trying to write something return error if
attempted).
It appears that the use of O_NONBLOCK is safe with pre-2.6 kernels.
Suggest adding the use of O_NONBLOCK when opening the device. As it is,
for long-running commands such as "fsf", one cannot tell if the command is
progressing or if it's blocking waiting for media.
Index: src/mt.c
===================================================================
--- src/mt.c.orig
+++ src/mt.c
@@ -332,11 +332,11 @@ main (int argc, char **argv)
#ifdef MTERASE
case MTERASE:
#endif
- tapedesc = rmtopen (tapedev, O_WRONLY, 0, rsh_command_option);
+ tapedesc = rmtopen (tapedev, O_WRONLY | O_NONBLOCK, 0, rsh_command_option);
break;
default:
- tapedesc = rmtopen (tapedev, O_RDONLY, 0, rsh_command_option);
+ tapedesc = rmtopen (tapedev, O_RDONLY | O_NONBLOCK, 0, rsh_command_option);
}
if (tapedesc == -1)
Index: src/util.c
===================================================================
--- src/util.c.orig
+++ src/util.c
@@ -799,14 +799,14 @@ open_archive (char *file)
copy_in = process_copy_in;
if (copy_function == copy_in)
- fd = rmtopen (file, O_RDONLY | O_BINARY, MODE_RW, rsh_command_option);
+ fd = rmtopen (file, O_RDONLY | O_BINARY | O_NONBLOCK, MODE_RW, rsh_command_option);
else
{
if (!append_flag)
- fd = rmtopen (file, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, MODE_RW,
+ fd = rmtopen (file, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_NONBLOCK, MODE_RW,
rsh_command_option);
else
- fd = rmtopen (file, O_RDWR | O_BINARY, MODE_RW, rsh_command_option);
+ fd = rmtopen (file, O_RDWR | O_BINARY | O_NONBLOCK, MODE_RW, rsh_command_option);
}
return fd;

View File

@ -0,0 +1,21 @@
Index: cpio-2.14/src/copyin.c
===================================================================
--- cpio-2.14.orig/src/copyin.c
+++ cpio-2.14/src/copyin.c
@@ -949,6 +949,8 @@ read_pattern_file (void)
pattern_fp = fopen (pattern_file_name, "r");
if (pattern_fp == NULL)
open_fatal (pattern_file_name);
+ else
+ {
while (ds_fgetstr (pattern_fp, &pattern_name, '\n') != NULL)
{
if (new_num_patterns == max_new_patterns)
@@ -963,6 +965,7 @@ read_pattern_file (void)
if (ferror (pattern_fp) || fclose (pattern_fp) == EOF)
close_error (pattern_file_name);
+ }
for (i = 0; i < num_patterns; ++i)
new_save_patterns[i] = save_patterns[i];

View File

@ -0,0 +1,56 @@
Index: doc/cpio.info
===================================================================
--- doc/cpio.info.orig
+++ doc/cpio.info
@@ -226,7 +226,8 @@ option, e.g.:
'-B'
Set the I/O block size to 5120 bytes.
'-c'
- Use the old portable (ASCII) archive format.
+ Identical to "-H newc", use the new (SVR4) portable format.
+ If you wish the old portable (ASCII) archive format, use "-H odc" instead.
'-C NUMBER'
'--io-size=NUMBER'
Set the I/O block size to the given NUMBER of bytes.
@@ -307,7 +308,8 @@ option.
'-B'
Set the I/O block size to 5120 bytes.
'-c'
- Use the old portable (ASCII) archive format.
+ Identical to "-H newc", use the new (SVR4) portable format.
+ If you wish the old portable (ASCII) archive format, use "-H odc" instead.
'-C NUMBER'
'--io-size=NUMBER'
Set the I/O block size to the given NUMBER of bytes.
@@ -417,7 +419,8 @@ option.
'-B'
Set the I/O block size to 5120 bytes.
'-c'
- Use the old portable (ASCII) archive format.
+ Identical to "-H newc", use the new (SVR4) portable format.
+ If you wish the old portable (ASCII) archive format, use "-H odc" instead.
'-C NUMBER'
'--io-size=NUMBER'
Set the I/O block size to the given NUMBER of bytes.
@@ -565,7 +568,8 @@ option is valid.
'-c'
[*note copy-in::,*note copy-out::,*note copy-pass::]
- Use the old portable (ASCII) archive format.
+ Identical to "-H newc", use the new (SVR4) portable format.
+ If you wish the old portable (ASCII) archive format, use "-H odc" instead.
'-C IO-SIZE'
'--io-size=IO-SIZE'
Index: src/main.c
===================================================================
--- src/main.c.orig
+++ src/main.c
@@ -328,6 +328,7 @@ parse_opt (int key, char *arg, struct ar
case 'c': /* Use the old portable ASCII format. */
if (archive_format != arf_unknown)
USAGE_ERROR ((0, 0, _("Archive format multiply defined")));
+#define SVR4_COMPAT
#ifdef SVR4_COMPAT
archive_format = arf_newascii; /* -H newc. */
#else

22
cpio-use_sbin_rmt.patch Normal file
View File

@ -0,0 +1,22 @@
Index: lib/rtapelib.c
===================================================================
--- lib/rtapelib.c.orig
+++ lib/rtapelib.c
@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-/* The man page rmt(8) for /etc/rmt documents the remote mag tape protocol
+/* The man page rmt(8) for /sbin/rmt documents the remote mag tape protocol
which rdump and rrestore use. Unfortunately, the man page is *WRONG*.
The author of the routines I'm including originally wrote his code just
based on the man page, and it didn't work, so he went to the rdump source
@@ -267,7 +267,7 @@ get_status_off (int handle)
#if WITH_REXEC
-/* Execute /etc/rmt as user USER on remote system HOST using rexec.
+/* Execute /sbin/rmt as user USER on remote system HOST using rexec.
Return a file descriptor of a bidirectional socket for stdin and
stdout. If USER is zero, use the current username.

685
cpio.changes Normal file
View File

@ -0,0 +1,685 @@
-------------------------------------------------------------------
Mon Feb 5 09:22:10 UTC 2024 - Danilo Spinella <danilo.spinella@suse.com>
- Update to 2.15:
* Fix the operation of --no-absolute-filenames --make-directories.
* Restore access and modification times of symlinks in copy-in and
copy-pass modes.
- Remove fix-operation-no-absolute-filenames.patch
-------------------------------------------------------------------
Mon Jul 10 14:52:48 UTC 2023 - Danilo Spinella <danilo.spinella@suse.com>
- Backport upstream fix for --no-absolute-filenames --make-directories
* fix-operation-no-absolute-filenames.patch
-------------------------------------------------------------------
Fri Jun 23 13:02:55 UTC 2023 - Danilo Spinella <danilo.spinella@suse.com>
- 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
- Fix CVE-2023-7207, path traversal vulnerability, bsc#1218571
-------------------------------------------------------------------
Tue Dec 27 10:29:29 UTC 2022 - Ludwig Nussel <lnussel@suse.com>
- Replace transitional %usrmerged macro with regular version check (boo#1206798)
-------------------------------------------------------------------
Thu Oct 28 13:13:33 UTC 2021 - Danilo Spinella <danilo.spinella@suse.com>
- Update keyring
-------------------------------------------------------------------
Wed Aug 18 13:23:34 UTC 2021 - Danilo Spinella <danilo.spinella@suse.com>
- Fix regression in last update (bsc#1189465)
* fix-CVE-2021-38185_2.patch
* fix-CVE-2021-38185_3.patch
-------------------------------------------------------------------
Mon Aug 9 14:01:51 UTC 2021 - Danilo Spinella <danilo.spinella@suse.com>
- Fix CVE-2021-38185 Remote code execution caused by an integer overflow in ds_fgetstr
(CVE-2021-38185, bsc#1189206)
* fix-CVE-2021-38185.patch
-------------------------------------------------------------------
Fri Oct 16 08:49:00 UTC 2020 - Ludwig Nussel <lnussel@suse.de>
- prepare usrmerge (boo#1029961)
-------------------------------------------------------------------
Fri Sep 11 11:45:35 UTC 2020 - Dirk Mueller <dmueller@suse.com>
- add cpio-revert-CVE-2015-1197-fix.patch as recommended by upstream
to fix https://lists.gnu.org/archive/html/bug-cpio/2019-11/msg00016.html
-------------------------------------------------------------------
Sat Aug 15 16:18:46 UTC 2020 - Dirk Mueller <dmueller@suse.com>
- update to 2.13:
* CVE-2015-1197, CVE-2016-2037, CVE-2019-14866
- remove patches (upstream):
cpio-2.12-out_of_bounds_write.patch, cpio-2.12-CVE-2019-14866.patch,
cpio-2.12-util.c_no_return_in_nonvoid_fnc.patch,
cpio-check_for_symlinks.patch
-------------------------------------------------------------------
Sun Mar 29 20:54:38 UTC 2020 - Kristyna Streitova <kstreitova@suse.com>
- starting with GCC 10, the default of '-fcommon' option will
change to '-fno-common'. Because cpio build fails with
'fno-common', add '-fcommon' option to optflags as a temporary
workaround for this problem till it's properly fixed [bsc#1160870]
-------------------------------------------------------------------
Mon Nov 4 15:53:41 UTC 2019 - Kristyna Streitova <kstreitova@suse.com>
- add cpio-2.12-CVE-2019-14866.patch to fix a security issue where
cpio does not properly validate the values written in the header
of a TAR file through the to_oct() function [bsc#1155199]
[CVE-2019-14866]
-------------------------------------------------------------------
Thu Sep 19 11:50:42 UTC 2019 - Ludwig Nussel <lnussel@suse.de>
- Do not recommend lang package. The lang package already has a
supplements.
-------------------------------------------------------------------
Wed Sep 26 19:51:04 UTC 2018 - Bernhard Wiedemann <bwiedemann@suse.com>
- Use gettextize --no-changelog to drop build date
to make package build reproducible (boo#1047218)
-------------------------------------------------------------------
Fri Sep 14 08:33:28 UTC 2018 - Martin Pluskal <mpluskal@suse.com>
- Use URL to fetch keyring
- Do not force building with PIE, it is default now anyways
- Use https for URLs
- Install license
-------------------------------------------------------------------
Tue Apr 11 10:06:17 UTC 2017 - kstreitova@suse.com
- modify cpio-2.12-out_of_bounds_write.patch to fix a regression
causing cpio to crash for tar and ustar archive types
[bsc#1028410]
-------------------------------------------------------------------
Mon Mar 27 11:13:08 UTC 2017 - mpluskal@suse.com
- Use macro for configure and make install
- Use update-alternatives according to current documentation
- Enable testsuite
-------------------------------------------------------------------
Fri Mar 24 13:28:00 UTC 2017 - svalx@svalx.net
- Enable mt building
- Separated cpio-mt subpackge
- Change recommend to own mt subpackge
- Remove cpio-mt.patch - those features available in original mt-st package
- Switch to use alternatives system for mt
- Disable rmt building: this binary fully identical to rmt from tar
- Change default rmt dir to /usr/bin
-------------------------------------------------------------------
Thu Mar 23 15:14:25 UTC 2017 - kstreitova@suse.com
- cleanup with spec-cleaner
-------------------------------------------------------------------
Sat Mar 5 12:31:47 UTC 2016 - mpluskal@suse.com
- Recommend mt_st as it is not hard dependency
-------------------------------------------------------------------
Thu Mar 3 09:44:23 UTC 2016 - kstreitova@suse.com
- fix typos in the description
- add 'Require: mt_st' in order not to surprise users by the missing
'mt' binary
-------------------------------------------------------------------
Thu Mar 3 07:19:03 UTC 2016 - svalx@svalx.net
- Disable mt building: this binary from mt_st package offers
advanced capabilities with the same functionality.
- Enable rmt building: 'dump' package no longer include it, besides
cpio code base for rmt is more fresh.
- Reflect those changes in the package description.
-------------------------------------------------------------------
Fri Feb 19 15:47:00 UTC 2016 - kstreitova@suse.com
- add cpio-2.12-out_of_bounds_write.patch to fix an out of bounds
write in a way cpio parses certain cpio files [bsc#963448],
[CVE-2016-2037]
-------------------------------------------------------------------
Thu Oct 8 11:57:19 UTC 2015 - kstreitova@suse.com
- update to 2.12
* Improved documentation
* Manpages are installed by make install
* New options for copy-out mode: --ignore-devno,
--renumber-inodes, --device-independent, --reproducible
* update
* cpio-use_new_ascii_format.patch
* cpio-mt.patch
* cpio-eof_tape_handling.patch
* cpio-pattern-file-sigsegv.patch
* cpio-check_for_symlinks.patch
* remove (no longer needed)
* cpio-stdio.in.patch
* 0001-Fix-memory-overrun-on-reading-improperly-created-lin.patch
* add
* cpio-2.12-util.c_no_return_in_nonvoid_fnc.patch to add missing
return to the nonvoid get_inode_and_dev() function
- use spec-cleaner
-------------------------------------------------------------------
Mon Mar 16 18:54:59 UTC 2015 - mpluskal@suse.com
- Add gpg signature
- Correct info scriplet dependencies
- Cleanup spec file with spec-cleaner
-------------------------------------------------------------------
Thu Jan 1 22:54:20 UTC 2015 - meissner@suse.com
- build with PIE
-------------------------------------------------------------------
Mon Dec 1 15:47:49 UTC 2014 - vcizek@suse.com
- fix an OOB write with cpio -i (bnc#907456) (CVE-2014-9112)
* added 0001-Fix-memory-overrun-on-reading-improperly-created-lin.patch
-------------------------------------------------------------------
Fri Aug 29 19:39:35 UTC 2014 - jengelh@inai.de
- Improve on RPM group classification (cpio does not compress
on its own per se)
- Remove redundant %clean section
-------------------------------------------------------------------
Thu Aug 21 11:35:36 UTC 2014 - vcizek@suse.com
- drop cpio-dir_perm.patch
* no longer needed since 2.11
* it was dropped from Fedora too and only caused problems (bnc#889138)
-------------------------------------------------------------------
Tue Jul 29 10:23:21 UTC 2014 - vcizek@suse.com
- fix a truncation check in mt
* added cpio-fix_truncation_check.patch
-------------------------------------------------------------------
Thu Jul 17 18:40:27 UTC 2014 - vcizek@suse.com
- prevent cpio from extracting over a symlink (bnc#658010)
* added cpio-check_for_symlinks.patch
-------------------------------------------------------------------
Tue Jul 23 11:43:47 UTC 2013 - vcizek@suse.com
- add a missing fix from SLE for bnc#830779 (original bug bnc#658031)
added paxutils-rtapelib_mtget.patch
-------------------------------------------------------------------
Thu Mar 21 12:03:37 UTC 2013 - mmeister@suse.com
- Added url as source.
Please see http://en.opensuse.org/SourceUrls
-------------------------------------------------------------------
Wed Jul 18 08:31:24 UTC 2012 - aj@suse.de
- Fix build with missing gets declaration (glibc 2.16)
-------------------------------------------------------------------
Thu Feb 2 13:31:13 UTC 2012 - rschweikert@suse.com
- leave binary in /usr (UsrMerge project), link to binary from /bin
-------------------------------------------------------------------
Mon Jan 2 17:27:13 UTC 2012 - vcizek@suse.cz
- added autoconf to BuildRequires
-------------------------------------------------------------------
Thu Dec 1 11:21:00 UTC 2011 - coolo@suse.com
- add automake as buildrequire to avoid implicit dependency
-------------------------------------------------------------------
Sun Sep 18 14:50:06 UTC 2011 - andrea.turrini@gmail.com
- fix typos in spec file
-------------------------------------------------------------------
Tue Nov 9 11:07:45 UTC 2010 - puzel@novell.com
- disable-silent-rules
-------------------------------------------------------------------
Tue Aug 31 09:37:05 UTC 2010 - aj@suse.de
- Recommend instead of require lang package since it's not mandatory.
-------------------------------------------------------------------
Tue Aug 10 14:48:32 UTC 2010 - puzel@novell.com
- add cpio-pattern-file-sigsegv.patch (bnc#629860)
-------------------------------------------------------------------
Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de
- use %_smp_mflags
-------------------------------------------------------------------
Fri Mar 12 16:34:39 UTC 2010 - mseben@novell.com
- updated to 2.11
* Fix mt build.
* In copy-in mode, if directory attributes do not permit writing to it,
setting them is delayed until the end of run. This allows to
correctly extract files in such directories.
* In copy-in mode, permissions of a directory are restored if it
appears in the file list after files in it (e.g. in listings
produced by find . -depth). This fixes debian bug #458079.
* Fix possible memory overflow in the rmt client code (CVE-2010-0624).
- deprecated heap_overflow_in_rtapelib.patch,chmodRaceC.patch and
include_fatal_c.patch
-------------------------------------------------------------------
Wed Mar 3 09:29:23 UTC 2010 - mseben@novell.com
- added heap_overflow_in_rtapelib.patch fix possible heap overflow in
rtapelib.c (bnc#579475)
-------------------------------------------------------------------
Sat Dec 26 11:51:46 CET 2009 - jengelh@medozas.de
- enable parallel build
-------------------------------------------------------------------
Tue Nov 3 19:09:11 UTC 2009 - coolo@novell.com
- updated patches to apply with fuzz=0
-------------------------------------------------------------------
Fri Oct 16 22:41:38 CEST 2009 - rschweikert@novell.com
- close files after copy (bnc#543132)
(cpio-2.10-close_files_after_copy.patch)
-------------------------------------------------------------------
Mon Aug 10 16:53:33 CEST 2009 - mseben@novell.com
- merged DAT160.patch with mt.patch
- added other tape density definitions from mt_st package (bnc#523357)
-------------------------------------------------------------------
Fri Jul 17 16:00:52 CEST 2009 - rguenther@suse.de
- Drop rmt BuildRequires again
-------------------------------------------------------------------
Fri Jul 17 15:14:23 CEST 2009 - mseben@suse.cz
- fix identification of the density code for DAT160 bnc#415166
-------------------------------------------------------------------
Mon Jun 22 16:48:28 CEST 2009 - mseben@suse.cz
- updated to version 2.10
* Ensure record headers are properly packed (fix builds on ARM).
* Fix exit codes to reliably indicate success or failure of the operation.
* Fix large file support.
* Support MinGW builds.
* Minor bugfixes.
- deprecated : lfs_correction.patch,paxlib-owl-alloca.patch,
gcc4_3.patch,segfault_in_copyin.patch,doc_typo.patch,
m4_macro.patch,gnulib.patch, no_rmt.patch
- added include_fatal_c.patch : fix undefined ref in mt build
- configure stage : removed useless DEFAULT_RMT_DIR=/sbin, added
--with-rmt="%{_sysconfdir}/rmt" and --enable-mt
-------------------------------------------------------------------
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
- specfile cleanup
-------------------------------------------------------------------
Fri Jul 18 13:52:50 CEST 2008 - lmichnovic@suse.cz
- make possible device nodes with major number > 127 [rhb#450109]
(*dev_number.patch)
-------------------------------------------------------------------
Fri Jun 27 16:28:34 CEST 2008 - schwab@suse.de
- Fix gnulib macro.
-------------------------------------------------------------------
Fri Apr 11 12:55:08 CEST 2008 - lmichnovic@suse.cz
- adjusted eof-handling.patch to check for 'end-of-file' and
'end-of-data' marker when detecting reel change. [bnc#371077]
-------------------------------------------------------------------
Fri Apr 4 15:35:41 CEST 2008 - lmichnovic@suse.cz
- adjusted cpio-2.9-dir_perm.patch acording Red Hat patch to fix
correct dir permissions after extraction in pass-through mode.
- fix for two tapes handling (eof_tape_handling.patch) [bnc#371077]
-------------------------------------------------------------------
Thu Mar 13 19:03:41 CET 2008 - lmichnovic@suse.cz
- lang subpackage split off
-------------------------------------------------------------------
Thu Mar 13 18:55:59 CET 2008 - lmichnovic@suse.cz
- applying upstream patch cpio-2.9-dir_perm.patch which fixes
incorrect directory permissions after archive extraction
-------------------------------------------------------------------
Thu Nov 29 15:49:49 CET 2007 - lmichnovic@suse.cz
- removed unused m4 macro gl_LONG_LONG (*m4_macro.patch)
-------------------------------------------------------------------
Wed Nov 7 15:30:30 CET 2007 - lmichnovic@suse.cz
- upstream fix of typo in documantation (*doc_typo.patch)
-------------------------------------------------------------------
Tue Oct 23 16:13:15 CEST 2007 - lmichnovic@suse.cz
- rewrote code which uses overflow to copy string in structure and
gcc was complaining about it (*avoid_overflow_warning.patch)
-------------------------------------------------------------------
Mon Oct 1 11:31:02 CEST 2007 - lmichnovic@suse.cz
- Fixed typo in copin.c causing segfault [#329744]
(*segfault_in_copyin.patch)
-------------------------------------------------------------------
Tue Sep 25 11:51:52 CEST 2007 - lmichnovic@suse.cz
- fix for compiling with new gcc 4.3 (*gcc4_3.patch)
-------------------------------------------------------------------
Mon Aug 20 18:11:29 CEST 2007 - lmichnovic@suse.cz
- fixed typo in paxlib-owl-alloca.patch [#301416]
-------------------------------------------------------------------
Fri Aug 17 10:31:21 CEST 2007 - lmichnovic@suse.cz
- upstream fix: use of alloca can cause stack overflow
(paxlib-owl-alloca.patch)
-------------------------------------------------------------------
Tue Aug 14 10:39:41 CEST 2007 - lmichnovic@suse.cz
- CAN-2005-1111 is not fixed completely in 2.9 (chmodRaceC.patch)
based on fedora patch
-------------------------------------------------------------------
Wed Jul 25 13:14:53 CEST 2007 - lmichnovic@suse.cz
- fixed types of variables for LFS support (*lfs_correction.patch)
-------------------------------------------------------------------
Tue Jul 24 15:50:44 CEST 2007 - lmichnovic@suse.cz
- adjusted *mt.patch to fix compression handling [#223494]
-------------------------------------------------------------------
Fri Jul 20 11:01:31 CEST 2007 - lmichnovic@suse.cz
- update to version 2.9
- obsoletes *lstat.patch
* Licensed under the GPLv3.
* Bugfixes: Honor umask when creating intermediate directories,
not specified in the archive (debian bug #430053). (This bug
is only in version 2.8)
* 2.8:
* Option --owner can be used in copy-out mode, allowing
to uniformly override the ownership of the files being added
to the archive.
* Bugfixes:
- Symlinks were handled incorrectly in copy-out mode. (This
bug was only in version 2.7)
- Fix handling of large files. {obsoletes lfs.patch}
o Fix setting the file permissions in copy-out mode.
o Fix CAN-2005-1111 {obsoletes chmodRaceC.patch}
* 2.7:
* Improved error checking and diagnostics
* Fixed CAN-1999-1572 {obsoletes writeOutHeaderBufferOverflow.patch}
* Allow to use --sparse in both copy-in and copy-pass.
* Fix bug that eventually caused copying out the same
hard-linked file several times to archive.
* Fix several LFS-related issues. {obsoletes lfs.patch}
* Fix Debian bug #335580.
- obsoletes *dirTraversal.patch implemented with option
--no-absolute-pathnames; option --absolute-pathnames is still possible
- obsoletes *checksum.patch, fix_umask.patch, sparse.patch
- using lang macro
-------------------------------------------------------------------
Thu Sep 21 18:14:59 CEST 2006 - lmichnovic@suse.cz
- fixed typo in cpio-2.6.dif; renamed to *-mt.patch
- united suffix of patches
-------------------------------------------------------------------
Tue Sep 19 14:42:39 CEST 2006 - schwab@suse.de
- Fix missing newline after mt status.
-------------------------------------------------------------------
Mon Jul 24 15:56:13 CEST 2006 - rguenther@suse.de
- remove useless build-dependency on rsh.
-------------------------------------------------------------------
Wed Jan 25 21:30:02 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Tue Dec 6 15:24:09 CET 2005 - fehr@suse.de
- add cpio-2.6-chmodRaceC.patch and cpio-2.6-dirTraversal.patch to
fix bug #80226
- add cpio-2.6-writeOutHeaderBufferOverflow.patch to fix #133454
- add cpio-2.6-checksum.patch fix wrong checksum on 64bit archs
- add cpio-2.6-lfs.patch to support large files on 32bit archs
-------------------------------------------------------------------
Wed Aug 10 17:58:40 CEST 2005 - fehr@suse.de
- fix call to setlocale to make multibyte characters work (#98902)
-------------------------------------------------------------------
Thu Jun 30 18:59:02 CEST 2005 - fehr@suse.de
- open with O_NONBLOCK option (#94449)
-------------------------------------------------------------------
Wed May 4 15:04:04 CEST 2005 - ro@suse.de
- properly detect lstat in configure
-------------------------------------------------------------------
Wed Apr 27 12:17:58 CEST 2005 - snwint@suse.de
- fix '--sparse' option check
-------------------------------------------------------------------
Mon Apr 25 15:28:26 CEST 2005 - fehr@suse.de
- update to cpio 2.6
-------------------------------------------------------------------
Mon Jan 24 12:19:31 CET 2005 - fehr@suse.de
- fix problem with cpio not respecting umask (#50054)
-------------------------------------------------------------------
Mon Jan 19 12:44:15 CET 2004 - ro@suse.de
- fix build as user
-------------------------------------------------------------------
Sun Jan 11 11:04:05 CET 2004 - adrian@suse.de
- add %defattr
-------------------------------------------------------------------
Thu Apr 24 12:20:23 CEST 2003 - ro@suse.de
- fix install_info --delete call and move from preun to postun
-------------------------------------------------------------------
Tue Apr 15 16:47:28 CEST 2003 - coolo@suse.de
- use BuildRoot
-------------------------------------------------------------------
Fri Feb 7 15:19:46 CET 2003 - fehr@suse.de
- Use %install_info macro
-------------------------------------------------------------------
Tue Sep 17 17:34:28 CEST 2002 - ro@suse.de
- removed bogus self-provides
-------------------------------------------------------------------
Tue Aug 13 21:29:02 CEST 2002 - mfabian@suse.de
- add cpio-2.5-i18n-0.1.patch received from
"Mitsuru Chinen" <CHINEN@jp.ibm.com>
The patch just adds a setlocale (LC_ALL, "").
-------------------------------------------------------------------
Sun Jul 28 09:10:20 CEST 2002 - kukuk@suse.de
- remove unused tetex from neededforbuild
-------------------------------------------------------------------
Fri Jul 5 10:26:35 CEST 2002 - fehr@suse.de
- update to new version 2.5
-------------------------------------------------------------------
Mon Dec 3 14:48:33 CET 2001 - fehr@suse.de
- make the -c switch comatible to SVR4 (and compatible to RedHat)
- fix the man page accordingly
- add rsh to #needfobuild to allow remote file access again (#12543)
-------------------------------------------------------------------
Sun Dec 3 16:07:35 CET 2000 - schwab@suse.de
- Fix a few bugs and typos.
-------------------------------------------------------------------
Tue Nov 28 11:32:08 MET 2000 - fehr@suse.de
- add compile options for LFS
-------------------------------------------------------------------
Mon Apr 17 12:01:34 MEST 2000 - fehr@suse.de
- move cpio binary to /bin for compatibility with RedHat
-------------------------------------------------------------------
Fri Feb 25 12:02:26 CET 2000 - kukuk@suse.de
- remove Makefile.Linux
- use _infodir/_mandir
-------------------------------------------------------------------
Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
-------------------------------------------------------------------
Thu Sep 2 18:29:04 MEST 1999 - fehr@suse.de
- Fix patch for broken header (cast to short instead of int)
-------------------------------------------------------------------
Wed Aug 4 13:19:24 MEST 1999 - kukuk@suse.de
- Add patch for broken header in oldascii format
-------------------------------------------------------------------
Tue Sep 22 12:13:34 MEST 1998 - ro@suse.de
- define _GNU_SOURCE for glibc where including getopt
-------------------------------------------------------------------
Tue Sep 1 11:52:58 MEST 1998 - ro@suse.de
- fixed strdup-macro problem
-------------------------------------------------------------------
Thu Jun 5 11:08:05 MEST 1997 - florian@suse.de
- go through the list of regex in a more suitable way (from ma@suse.de)
-------------------------------------------------------------------
Sun Apr 13 23:04:29 MEST 1997 - florian@suse.de
- update to new version 2.4.2
- add Linux patches from RedHat
- add patches from gnu.utils.bugs

37
cpio.keyring Normal file
View File

@ -0,0 +1,37 @@
Member GPG keyring of cpio group.
Note that this keyring is not intended for checking releases of that group.
Use Group Release Keyring instead.
GPG keys of Sergey Poznyakoff <gray>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.7 (GNU/Linux)
mQGiBDxhQHkRBACyhJxCLQvLs70IUZSlYVKAm+u1Oa4RyUo5/ctCcMm2KOcjui3z
xs+yUwlglo1n/de9NNJY98PJNLHniMVi5sPba8OKwYx9bilwuAWLgTsgfpX8UuuY
TANQmTybmrxjzxrGqN7eyjBT3utgbK3ACKDo/JUCgZMkdFu2c2i7186sDwCgo9pQ
ygxOOWEWBm70Rymdfvkon6EEAKY5h9nL1qYw46vM1+QY+vhyX2lHTD/E9QyFQv4L
driY3CerLAZ07yk5p8I6T31d7HEUt9DZcl0ZD99Y9IH84wWvms1xtnCuoLlP4ntw
FQ5ZUZtMY0AIVRtFbgkTDDLZsdanscqMu/LqnO2/QWjCQhaO/tcaIdPVgBIbCr28
fuBJA/9KA5vbQBd4WnNFLVJsr47irnJBYdR+OqPQAUFUcQPO1metR76UZ7+7LwtO
ldAjPN3RDJtRB8/JooHDNq+VCEzjs02JaBpQ+BCOzzqELnkoBPl26yHR56r4WbC5
+FH/QxEaicjVGxIF/Z9crzG/XUMXwieTNcM6HoGCnMboGqCM4bQjU2VyZ2V5IFBv
em55YWtvZmYgPGdyYXlAZ251Lm9yZy51YT6IXgQTEQIAHgUCQ/CVdwIbAwYLCQgH
AwIDFQIDAxYCAQIeAQIXgAAKCRA2ArB/VdDHMubqAJ9tq+C7VtEMexpRAq9jzcKo
5fZFywCeKtqljjB7nsCIKvZNOV1D4fn7HDm0MlNlcmdleSBQb3pueWFrb2ZmIChH
cmF5KSA8Z3JheUBtaXJkZGluLmZhcmxlcC5uZXQ+iFcEExECABcFAjxhQHkFCwcK
AwQDFQMCAxYCAQIXgAAKCRA2ArB/VdDHMg3iAKCVtLVewNzCDfjui1wTWmz73IcU
aQCcDjK4771A6G/z6qX5bDuK1yL/YeSIRgQSEQIABgUCP1tgaAAKCRCjCdZ5GaIl
R3GsAJ9IHf/Rl/2+eR03mdAe+AeSTaBfagCfUsLc7/wp+fb7Xo6lKQezvJzGBqu0
IFNlcmdleSBQb3pueWFrb2ZmIDxncmF5QGdudS5vcmc+iF4EExECAB4FAkPwlbUC
GwMGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQNgKwf1XQxzJFSgCeNYJSs7nalOVI
MTJB3Ui6NvKL/nAAni1KxoLZr/+jG5iAnhuuL+ijq54GuQENBDxhQHwQBAD3qEph
UOWRg9C8hSJpZ9Zo8F+hXnF6mvMWuy76R+yHqg4H5CPWSH116lOKl5xpGeXdOOzM
5OxGgdEChb+jLoszM9rc3HQfcKAQmFMd03Iay4/5jMAS+vNgCfDV98nj6gU0Y3ku
UdTkyMPDObQWv1ginAnkoOVXb7nAVW/X5n8izwADBQP8CPuRROj2FC+w2tTXDgaJ
am9PEm1coHRJAoHef1nBZfOAOZLjRD10wBg2m8q2EUJ4/mr/1D0whTINThJkvmZk
RGVkuNILeC3X5dMQ1AX4fIOOnVObWVrlg5etH8ichIOYOUOqCx/cuV9F6Apg9PE6
vcFqmh4BoOlb0qOaIdzN1sWIRgQYEQIABgUCPGFAfAAKCRA2ArB/VdDHMlPgAKCM
9FxutfWWvZqNKW5up6GnB4y6WwCeN5k4mxck975PULOk8jq/ZqLGvnQ=
=5lxD
-----END PGP PUBLIC KEY BLOCK-----

147
cpio.spec Normal file
View File

@ -0,0 +1,147 @@
#
# spec file for package cpio
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: cpio
Version: 2.15
Release: 0
Summary: A Backup and Archiving Utility
License: GPL-3.0-only
Group: Productivity/Archiving/Backup
URL: https://www.gnu.org/software/cpio/cpio.html
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.bz2
Source1: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.bz2.sig
Source2: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=%{name}&download=1#/%{name}.keyring
Patch2: cpio-use_new_ascii_format.patch
Patch4: cpio-use_sbin_rmt.patch
#PATCH-FIX-UPSTREAM cpio-2.12 cpio-open_nonblock.patch bnc#94449,
#https://savannah.gnu.org/patch/?9263 -- open device with O_NONBLOCK option
Patch5: cpio-open_nonblock.patch
Patch15: cpio-eof_tape_handling.patch
# make posibble to have device nodes with major number > 127
# Red Hat Bugzilla #450109
Patch17: cpio-dev_number.patch
Patch18: cpio-default_tape_dev.patch
#PATCH-FIX-UPSTREAM cpio-2.10-close_files_after_copy.patch
Patch20: cpio-close_files_after_copy.patch
Patch21: cpio-pattern-file-sigsegv.patch
Patch23: paxutils-rtapelib_mtget.patch
Patch25: cpio-fix_truncation_check.patch
BuildRequires: autoconf >= 2.71
BuildRequires: automake
#Requires(post): %{xinstall_info_prereq}
#Requires(preun): %{xinstall_info_prereq}
Recommends: %{name}-mt = %{version}
Recommends: rmt
%description
GNU cpio is a program to manage archives of files. Cpio copies files
into or out of a cpio or tar archive. An archive is a file that contains
other files plus information about them, such as their pathname, owner,
time stamps, and access permissions. The archive can be another file on
the disk, a magnetic tape, or a pipe.
%package mt
Summary: Tape drive control utility
Group: Productivity/Archiving/Backup
Requires: %{name} = %{version}
Requires(post): update-alternatives
Requires(postun):update-alternatives
Provides: mt
%description mt
This package includes the 'mt', a local tape drive control program.
%lang_package
%prep
%setup -q
%patch2
%patch4
%patch5
%patch15
%patch17
%patch18
%patch20
###
%patch21 -p1
%patch23 -p1
%patch25 -p1
%build
gettextize -f --no-changelog
autoreconf -fiv
export CFLAGS="%{optflags} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fcommon"
%configure \
--with-rmt="%{_bindir}/rmt" \
--enable-mt \
--disable-silent-rules \
--program-transform-name='s/^mt$/gnumt/'
make %{?_smp_mflags}
%install
mkdir -p %{buildroot}/{usr/bin,bin}
%make_install
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
ln -sf %{_sysconfdir}/alternatives/mt %{buildroot}%{_bindir}/mt
ln -sf %{_sysconfdir}/alternatives/mt.1%{ext_man} %{buildroot}%{_mandir}/man1/mt.1%{ext_man}
%if 0%{?suse_version} < 1550
ln -sf %{_bindir}/cpio %{buildroot}/bin
%endif
%find_lang %{name}
%check
make %{?_smp_mflags} check
%post mt
%{_sbindir}/update-alternatives --force \
--install %{_bindir}/mt mt %{_bindir}/gnumt 10 \
--slave %{_mandir}/man1/mt.1%{ext_man} mt.1%{ext_man} %{_mandir}/man1/gnumt.1%{ext_man}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info%{ext_info}
%preun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info%{ext_info}
%postun mt
if [ ! -f %{_bindir}/gnumt ] ; then
"%{_sbindir}/update-alternatives" --remove mt %{_bindir}/gnumt
fi
%files
%license COPYING
%doc NEWS ChangeLog
%if 0%{?suse_version} < 1550
/bin/cpio
%endif
%{_bindir}/cpio
%{_infodir}/cpio.info%{?ext_info}
%{_mandir}/man1/cpio.1%{?ext_man}
%files mt
%ghost %{_bindir}/mt
%{_bindir}/gnumt
%ghost %{_mandir}/man1/mt.1%{ext_man}
%{_mandir}/man1/gnumt.1%{?ext_man}
%ghost %{_sysconfdir}/alternatives/mt
%ghost %{_sysconfdir}/alternatives/mt.1%{ext_man}
%files lang -f %{name}.lang
%changelog

View File

@ -0,0 +1,13 @@
Index: cpio-2.13/lib/rtapelib.c
===================================================================
--- cpio-2.13.orig/lib/rtapelib.c
+++ cpio-2.13/lib/rtapelib.c
@@ -711,7 +711,7 @@ rmt_ioctl__ (int handle, int operation,
|| (status = get_status (handle), status == -1))
return -1;
- if (status > sizeof (struct mtop))
+ if (status > sizeof (struct mtget))
{
errno = EOVERFLOW;
return -1;