2006-12-19 00:15:29 +01:00
|
|
|
#
|
2011-09-18 16:50:19 +02:00
|
|
|
# spec file for package cpio
|
2006-12-19 00:15:29 +01:00
|
|
|
#
|
2019-09-19 15:25:50 +02:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2006-12-19 00:15:29 +01:00
|
|
|
#
|
2009-06-18 17:05:33 +02:00
|
|
|
# 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.
|
|
|
|
|
2018-09-14 13:48:08 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2006-12-19 00:15:29 +01:00
|
|
|
#
|
|
|
|
|
2012-07-18 17:55:03 +02:00
|
|
|
|
2006-12-19 00:15:29 +01:00
|
|
|
Name: cpio
|
2015-10-09 13:20:18 +02:00
|
|
|
Version: 2.12
|
2011-12-01 12:54:47 +01:00
|
|
|
Release: 0
|
2006-12-19 00:15:29 +01:00
|
|
|
Summary: A Backup and Archiving Utility
|
2018-09-14 13:48:08 +02:00
|
|
|
License: GPL-3.0-only
|
2014-08-30 14:33:47 +02:00
|
|
|
Group: Productivity/Archiving/Backup
|
2018-09-14 13:48:08 +02:00
|
|
|
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
|
2010-08-14 00:00:07 +02:00
|
|
|
Patch2: cpio-use_new_ascii_format.patch
|
|
|
|
Patch4: cpio-use_sbin_rmt.patch
|
2017-03-24 22:21:45 +01:00
|
|
|
#PATCH-FIX-UPSTREAM cpio-2.12 cpio-open_nonblock.patch bnc#94449,
|
|
|
|
#https://savannah.gnu.org/patch/?9263 -- open device with O_NONBLOCK option
|
2010-08-14 00:00:07 +02:00
|
|
|
Patch5: cpio-open_nonblock.patch
|
|
|
|
Patch15: cpio-eof_tape_handling.patch
|
2008-07-18 21:51:19 +02:00
|
|
|
# make posibble to have device nodes with major number > 127
|
|
|
|
# Red Hat Bugzilla #450109
|
2010-08-14 00:00:07 +02:00
|
|
|
Patch17: cpio-dev_number.patch
|
|
|
|
Patch18: cpio-default_tape_dev.patch
|
2009-12-08 11:21:50 +01:00
|
|
|
#PATCH-FIX-UPSTREAM cpio-2.10-close_files_after_copy.patch
|
2010-08-14 00:00:07 +02:00
|
|
|
Patch20: cpio-close_files_after_copy.patch
|
|
|
|
Patch21: cpio-pattern-file-sigsegv.patch
|
2013-08-22 17:40:08 +02:00
|
|
|
Patch23: paxutils-rtapelib_mtget.patch
|
2014-07-29 13:44:14 +02:00
|
|
|
Patch24: cpio-check_for_symlinks.patch
|
|
|
|
Patch25: cpio-fix_truncation_check.patch
|
2015-10-09 13:20:18 +02:00
|
|
|
Patch26: cpio-2.12-util.c_no_return_in_nonvoid_fnc.patch
|
2016-02-19 17:42:39 +01:00
|
|
|
Patch27: cpio-2.12-out_of_bounds_write.patch
|
2019-11-05 08:29:44 +01:00
|
|
|
Patch28: cpio-2.12-CVE-2019-14866.patch
|
2015-03-16 20:27:04 +01:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
Requires(post): %{install_info_prereq}
|
|
|
|
Requires(preun): %{install_info_prereq}
|
2017-03-24 22:21:45 +01:00
|
|
|
Recommends: %{name}-mt = %{version}
|
|
|
|
Recommends: rmt
|
2006-12-19 00:15:29 +01:00
|
|
|
|
|
|
|
%description
|
2016-03-03 13:34:16 +01:00
|
|
|
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
|
2016-03-03 10:33:40 +01:00
|
|
|
the disk, a magnetic tape, or a pipe.
|
|
|
|
|
2017-03-24 22:21:45 +01:00
|
|
|
%package mt
|
|
|
|
Summary: Tape drive control utility
|
|
|
|
Group: Productivity/Archiving/Backup
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2017-03-27 13:14:11 +02:00
|
|
|
Provides: mt
|
2017-03-24 22:21:45 +01:00
|
|
|
|
|
|
|
%description mt
|
|
|
|
This package includes the 'mt', a local tape drive control program.
|
2006-12-19 00:15:29 +01:00
|
|
|
|
2008-03-14 17:30:55 +01:00
|
|
|
%lang_package
|
2015-03-16 20:27:04 +01:00
|
|
|
|
2006-12-19 00:15:29 +01:00
|
|
|
%prep
|
2015-03-16 20:27:04 +01:00
|
|
|
%setup -q
|
|
|
|
%patch2
|
2006-12-19 00:15:29 +01:00
|
|
|
%patch4
|
|
|
|
%patch5
|
2008-04-06 04:37:13 +02:00
|
|
|
%patch15
|
2008-07-18 21:51:19 +02:00
|
|
|
%patch17
|
2008-08-04 12:30:39 +02:00
|
|
|
%patch18
|
2009-12-08 11:21:50 +01:00
|
|
|
%patch20
|
2010-08-14 00:00:07 +02:00
|
|
|
%patch21 -p1
|
2013-08-22 17:40:08 +02:00
|
|
|
%patch23 -p1
|
2014-07-29 13:44:14 +02:00
|
|
|
%patch24 -p1
|
|
|
|
%patch25 -p1
|
2014-12-03 10:59:19 +01:00
|
|
|
%patch26 -p1
|
2016-02-19 17:42:39 +01:00
|
|
|
%patch27 -p1
|
2019-11-05 08:29:44 +01:00
|
|
|
%patch28 -p1
|
2006-12-19 00:15:29 +01:00
|
|
|
|
|
|
|
%build
|
2018-09-27 09:29:16 +02:00
|
|
|
gettextize -f --no-changelog
|
2017-03-27 13:14:11 +02:00
|
|
|
autoreconf -fiv
|
2018-09-14 13:48:08 +02:00
|
|
|
export CFLAGS="%{optflags} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
|
2017-03-27 13:14:11 +02:00
|
|
|
%configure \
|
|
|
|
--with-rmt="%{_bindir}/rmt" \
|
|
|
|
--enable-mt \
|
|
|
|
--disable-silent-rules \
|
|
|
|
--program-transform-name='s/^mt$/gnumt/'
|
2010-07-02 18:28:18 +02:00
|
|
|
make %{?_smp_mflags}
|
2006-12-19 00:15:29 +01:00
|
|
|
|
|
|
|
%install
|
2015-03-16 20:27:04 +01:00
|
|
|
mkdir -p %{buildroot}/{usr/bin,bin}
|
2017-03-27 13:14:11 +02:00
|
|
|
%make_install
|
2017-03-24 22:21:45 +01:00
|
|
|
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}
|
2015-03-16 20:27:04 +01:00
|
|
|
#UsrMerge
|
|
|
|
ln -sf %{_bindir}/cpio %{buildroot}/bin
|
|
|
|
#EndUsrMerge
|
2017-03-24 22:21:45 +01:00
|
|
|
|
2007-07-27 01:22:54 +02:00
|
|
|
%find_lang %{name}
|
2006-12-19 00:15:29 +01:00
|
|
|
|
2017-03-27 13:14:11 +02:00
|
|
|
%check
|
|
|
|
make %{?_smp_mflags} check
|
|
|
|
|
2017-03-24 22:21:45 +01:00
|
|
|
%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}
|
|
|
|
|
2006-12-19 00:15:29 +01:00
|
|
|
%post
|
2017-03-27 13:14:11 +02:00
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info%{ext_info}
|
2006-12-19 00:15:29 +01:00
|
|
|
|
2015-03-16 20:27:04 +01:00
|
|
|
%preun
|
2017-03-27 13:14:11 +02:00
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info%{ext_info}
|
2006-12-19 00:15:29 +01:00
|
|
|
|
2017-03-24 22:21:45 +01:00
|
|
|
%postun mt
|
2017-03-27 13:14:11 +02:00
|
|
|
if [ ! -f %{_bindir}/gnumt ] ; then
|
2017-03-24 22:21:45 +01:00
|
|
|
"%{_sbindir}/update-alternatives" --remove mt %{_bindir}/gnumt
|
|
|
|
fi
|
|
|
|
|
2008-03-14 17:30:55 +01:00
|
|
|
%files
|
2018-09-14 13:48:08 +02:00
|
|
|
%license COPYING
|
|
|
|
%doc NEWS ChangeLog
|
2015-03-16 20:27:04 +01:00
|
|
|
#UsrMerge
|
2006-12-19 00:15:29 +01:00
|
|
|
/bin/cpio
|
2015-03-16 20:27:04 +01:00
|
|
|
#EndUsrMerge
|
|
|
|
%{_bindir}/cpio
|
2018-09-14 13:48:08 +02:00
|
|
|
%{_infodir}/cpio.info%{?ext_info}
|
|
|
|
%{_mandir}/man1/cpio.1%{?ext_man}
|
2017-03-24 22:21:45 +01:00
|
|
|
|
|
|
|
%files mt
|
|
|
|
%ghost %{_bindir}/mt
|
|
|
|
%{_bindir}/gnumt
|
|
|
|
%ghost %{_mandir}/man1/mt.1%{ext_man}
|
2018-09-14 13:48:08 +02:00
|
|
|
%{_mandir}/man1/gnumt.1%{?ext_man}
|
2017-03-24 22:21:45 +01:00
|
|
|
%ghost %{_sysconfdir}/alternatives/mt
|
|
|
|
%ghost %{_sysconfdir}/alternatives/mt.1%{ext_man}
|
2007-11-29 18:16:37 +01:00
|
|
|
|
2008-03-14 17:30:55 +01:00
|
|
|
%files lang -f %{name}.lang
|
|
|
|
|
2007-07-27 01:22:54 +02:00
|
|
|
%changelog
|