# # spec file for package cpio # # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # 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 http://bugs.opensuse.org/ # Name: cpio Version: 2.11 Release: 86.4 Summary: A Backup and Archiving Utility License: GPL-3.0 Group: Productivity/Archiving/Backup Url: http://www.gnu.org/software/cpio/cpio.html Source0: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.bz2 Source1: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.bz2.sig Source2: %{name}.keyring Patch2: cpio-use_new_ascii_format.patch #oouch what a ...?! pieces of code grabed from mt_st package to add missing functionality (e.g. density info) Patch3: cpio-mt.patch Patch4: cpio-use_sbin_rmt.patch 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 Patch22: cpio-stdio.in.patch Patch23: paxutils-rtapelib_mtget.patch Patch24: cpio-check_for_symlinks.patch Patch25: cpio-fix_truncation_check.patch Patch26: 0001-Fix-memory-overrun-on-reading-improperly-created-lin.patch BuildRequires: autoconf BuildRequires: automake Requires(post): %{install_info_prereq} Requires(preun): %{install_info_prereq} Recommends: %{name}-lang = %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: i486 %description GNU cpio is a program to manage archives of files. This package also includes 'mt', a tape drive control program. 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. This package normally includes the program 'rmt', which provides remote tape drive control. Because there is a compatible 'rmt' in the 'dump' package, 'rmt' is not included in this package. If you are planning to use the remote tape features provided by cpio, install the 'dump' package as well. %lang_package %prep %setup -q %patch2 %patch3 %patch4 %patch5 %patch15 %patch17 %patch18 %patch20 %patch21 -p1 %patch22 -p1 %patch23 -p1 %patch24 -p1 %patch25 -p1 %patch26 -p1 #chmod 755 . #chmod u+w * #chmod a+r * %build gettextize -f autoreconf --force --install CFLAGS="%{optflags} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIE" \ LDFLAGS="-pie" \ ./configure \ --with-rmt="%{_sysconfdir}/rmt" \ --enable-mt \ --prefix=/usr \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --libdir=%{_libdir} \ --disable-silent-rules make %{?_smp_mflags} %install mkdir -p %{buildroot}/{usr/bin,bin} make prefix=%{buildroot}/usr infodir=%{buildroot}/%{_infodir} mandir=%{buildroot}/%{_mandir} install #UsrMerge ln -sf %{_bindir}/cpio %{buildroot}/bin #EndUsrMerge %find_lang %{name} %post %install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz %preun %install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz %files %defattr(-,root,root) #UsrMerge /bin/cpio #EndUsrMerge %{_bindir}/cpio %{_bindir}/mt %doc %{_infodir}/cpio.info.gz %doc %{_mandir}/man1/cpio.1.gz %doc %{_mandir}/man1/mt.1.gz #/usr/share/locale/*/LC_MESSAGES/cpio.mo %files lang -f %{name}.lang %defattr(-,root,root) %changelog * Mon Mar 16 2015 mpluskal@suse.com - Add gpg signature - Correct info scriplet dependencies - Cleanup spec file with spec-cleaner * Thu Jan 1 2015 meissner@suse.com - build with PIE * Mon Dec 1 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 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 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 2014 vcizek@suse.com - fix a truncation check in mt * added cpio-fix_truncation_check.patch * Thu Jul 17 2014 vcizek@suse.com - prevent cpio from extracting over a symlink (bnc#658010) * added cpio-check_for_symlinks.patch * Tue Jul 23 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 2013 mmeister@suse.com - Added url as source. Please see http://en.opensuse.org/SourceUrls * Wed Jul 18 2012 aj@suse.de - Fix build with missing gets declaration (glibc 2.16) * Thu Feb 2 2012 rschweikert@suse.com - leave binary in /usr (UsrMerge project), link to binary from /bin * Mon Jan 2 2012 vcizek@suse.cz - added autoconf to BuildRequires * Thu Dec 1 2011 coolo@suse.com - add automake as buildrequire to avoid implicit dependency * Sun Sep 18 2011 andrea.turrini@gmail.com - fix typos in spec file * Tue Nov 9 2010 puzel@novell.com - disable-silent-rules * Tue Aug 31 2010 aj@suse.de - Recommend instead of require lang package since it's not mandatory. * Tue Aug 10 2010 puzel@novell.com - add cpio-pattern-file-sigsegv.patch (bnc#629860) * Mon Jun 28 2010 jengelh@medozas.de - use %%_smp_mflags * Fri Mar 12 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 2010 mseben@novell.com - added heap_overflow_in_rtapelib.patch fix possible heap overflow in rtapelib.c (bnc#579475) * Sat Dec 26 2009 jengelh@medozas.de - enable parallel build * Tue Nov 3 2009 coolo@novell.com - updated patches to apply with fuzz=0 * Fri Oct 16 2009 rschweikert@novell.com - close files after copy (bnc#543132) (cpio-2.10-close_files_after_copy.patch) * Mon Aug 10 2009 mseben@novell.com - merged DAT160.patch with mt.patch - added other tape density definitions from mt_st package (bnc#523357) * Fri Jul 17 2009 rguenther@suse.de - Drop rmt BuildRequires again * Fri Jul 17 2009 mseben@suse.cz - fix identification of the density code for DAT160 bnc#415166 * Mon Jun 22 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 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 2008 cthiel@suse.de - specfile cleanup * Fri Jul 18 2008 lmichnovic@suse.cz - make possible device nodes with major number > 127 [rhb#450109] (*dev_number.patch) * Fri Jun 27 2008 schwab@suse.de - Fix gnulib macro. * Fri Apr 11 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 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 2008 lmichnovic@suse.cz - lang subpackage split off * Thu Mar 13 2008 lmichnovic@suse.cz - applying upstream patch cpio-2.9-dir_perm.patch which fixes incorrect directory permissions after archive extraction * Thu Nov 29 2007 lmichnovic@suse.cz - removed unused m4 macro gl_LONG_LONG (*m4_macro.patch) * Wed Nov 7 2007 lmichnovic@suse.cz - upstream fix of typo in documantation (*doc_typo.patch) * Tue Oct 23 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 2007 lmichnovic@suse.cz - Fixed typo in copin.c causing segfault [#329744] (*segfault_in_copyin.patch) * Tue Sep 25 2007 lmichnovic@suse.cz - fix for compiling with new gcc 4.3 (*gcc4_3.patch) * Mon Aug 20 2007 lmichnovic@suse.cz - fixed typo in paxlib-owl-alloca.patch [#301416] * Fri Aug 17 2007 lmichnovic@suse.cz - upstream fix: use of alloca can cause stack overflow (paxlib-owl-alloca.patch) * Tue Aug 14 2007 lmichnovic@suse.cz - CAN-2005-1111 is not fixed completely in 2.9 (chmodRaceC.patch) based on fedora patch * Wed Jul 25 2007 lmichnovic@suse.cz - fixed types of variables for LFS support (*lfs_correction.patch) * Tue Jul 24 2007 lmichnovic@suse.cz - adjusted *mt.patch to fix compression handling [#223494] * Fri Jul 20 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 2006 lmichnovic@suse.cz - fixed typo in cpio-2.6.dif; renamed to *-mt.patch - united suffix of patches * Tue Sep 19 2006 schwab@suse.de - Fix missing newline after mt status. * Mon Jul 24 2006 rguenther@suse.de - remove useless build-dependency on rsh. * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Tue Dec 6 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 2005 fehr@suse.de - fix call to setlocale to make multibyte characters work (#98902) * Thu Jun 30 2005 fehr@suse.de - open with O_NONBLOCK option (#94449) * Wed May 4 2005 ro@suse.de - properly detect lstat in configure * Wed Apr 27 2005 snwint@suse.de - fix '--sparse' option check * Mon Apr 25 2005 fehr@suse.de - update to cpio 2.6 * Mon Jan 24 2005 fehr@suse.de - fix problem with cpio not respecting umask (#50054) * Mon Jan 19 2004 ro@suse.de - fix build as user * Sun Jan 11 2004 adrian@suse.de - add %%defattr * Thu Apr 24 2003 ro@suse.de - fix install_info --delete call and move from preun to postun * Tue Apr 15 2003 coolo@suse.de - use BuildRoot * Fri Feb 7 2003 fehr@suse.de - Use %%install_info macro * Tue Sep 17 2002 ro@suse.de - removed bogus self-provides * Tue Aug 13 2002 mfabian@suse.de - add cpio-2.5-i18n-0.1.patch received from "Mitsuru Chinen" The patch just adds a setlocale (LC_ALL, ""). * Sun Jul 28 2002 kukuk@suse.de - remove unused tetex from neededforbuild * Fri Jul 5 2002 fehr@suse.de - update to new version 2.5 * Mon Dec 3 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 2000 schwab@suse.de - Fix a few bugs and typos. * Tue Nov 28 2000 fehr@suse.de - add compile options for LFS * Mon Apr 17 2000 fehr@suse.de - move cpio binary to /bin for compatibility with RedHat * Fri Feb 25 2000 kukuk@suse.de - remove Makefile.Linux - use _infodir/_mandir * Mon Sep 13 1999 bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. * Thu Sep 2 1999 fehr@suse.de - Fix patch for broken header (cast to short instead of int) * Wed Aug 4 1999 kukuk@suse.de - Add patch for broken header in oldascii format * Tue Sep 22 1998 ro@suse.de - define _GNU_SOURCE for glibc where including getopt * Tue Sep 1 1998 ro@suse.de - fixed strdup-macro problem * Thu Jun 5 1997 florian@suse.de - go through the list of regex in a more suitable way (from ma@suse.de) * Sun Apr 13 1997 florian@suse.de - update to new version 2.4.2 - add Linux patches from RedHat - add patches from gnu.utils.bugs