Cleanup spec file and allow build tar without SELinux
- repair the xattr-gnulib-prepare patch to allow build tar without SELinux support - fedora-review compliance -> remove trailing white-spaces, remove macro from comment, remove BR of gawk;coreutils;gzip that should be covered automatically by minimum build environment, do not `rm -rf' buildroot at the beginning of install phase (needed only in EPEL), remove BuildRoot definition, remove defattr macro, s/define/global/ - do not use ${VAR} syntax for bash variables, use just $VAR
This commit is contained in:
parent
130db747c9
commit
7e8d1eef2e
@ -1,10 +1,11 @@
|
|||||||
From 1975192b75aefe1d75360e47496725f2f7c589a8 Mon Sep 17 00:00:00 2001
|
From 3a172f4a23be198bf79da30c38453c231b059500 Mon Sep 17 00:00:00 2001
|
||||||
From: Pavel Raiskup <praiskup@redhat.com>
|
From: Pavel Raiskup <praiskup@redhat.com>
|
||||||
Date: Tue, 14 Aug 2012 15:42:15 +0200
|
Date: Fri, 5 Oct 2012 09:29:31 +0200
|
||||||
Subject: [PATCH 1/2] Prepare gnulib for xattrs patch
|
Subject: [PATCH 1/2] Prepare gnulib for xattrs patch
|
||||||
|
|
||||||
---
|
---
|
||||||
gnu/Makefile.am | 98 +++++-
|
build-aux/snippet/unused-parameter.h | 38 ++
|
||||||
|
gnu/Makefile.am | 123 ++++++-
|
||||||
gnu/acl-internal.h | 267 ++++++++++++++
|
gnu/acl-internal.h | 267 ++++++++++++++
|
||||||
gnu/acl.h | 30 ++
|
gnu/acl.h | 30 ++
|
||||||
gnu/acl_entries.c | 77 ++++
|
gnu/acl_entries.c | 77 ++++
|
||||||
@ -24,7 +25,8 @@ Subject: [PATCH 1/2] Prepare gnulib for xattrs patch
|
|||||||
m4/gnulib-comp.m4 | 33 +-
|
m4/gnulib-comp.m4 | 33 +-
|
||||||
m4/selinux-context-h.m4 | 22 ++
|
m4/selinux-context-h.m4 | 22 ++
|
||||||
m4/selinux-selinux-h.m4 | 69 ++++
|
m4/selinux-selinux-h.m4 | 69 ++++
|
||||||
20 files changed, 3613 insertions(+), 7 deletions(-)
|
21 files changed, 3676 insertions(+), 7 deletions(-)
|
||||||
|
create mode 100644 build-aux/snippet/unused-parameter.h
|
||||||
create mode 100644 gnu/acl-internal.h
|
create mode 100644 gnu/acl-internal.h
|
||||||
create mode 100644 gnu/acl.h
|
create mode 100644 gnu/acl.h
|
||||||
create mode 100644 gnu/acl_entries.c
|
create mode 100644 gnu/acl_entries.c
|
||||||
@ -44,8 +46,52 @@ Subject: [PATCH 1/2] Prepare gnulib for xattrs patch
|
|||||||
create mode 100644 m4/selinux-context-h.m4
|
create mode 100644 m4/selinux-context-h.m4
|
||||||
create mode 100644 m4/selinux-selinux-h.m4
|
create mode 100644 m4/selinux-selinux-h.m4
|
||||||
|
|
||||||
|
diff --git a/build-aux/snippet/unused-parameter.h b/build-aux/snippet/unused-parameter.h
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..6b60482
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/build-aux/snippet/unused-parameter.h
|
||||||
|
@@ -0,0 +1,38 @@
|
||||||
|
+/* -*- buffer-read-only: t -*- vi: set ro: */
|
||||||
|
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||||
|
+/* A C macro for declaring that specific function parameters are not used.
|
||||||
|
+ Copyright (C) 2008-2012 Free Software Foundation, Inc.
|
||||||
|
+
|
||||||
|
+ This program is free software: you can redistribute it and/or modify it
|
||||||
|
+ under the terms of the GNU General Public License as published
|
||||||
|
+ by the Free Software Foundation; either version 3 of the License, or
|
||||||
|
+ (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ This program is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU General Public License
|
||||||
|
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter
|
||||||
|
+ declarations for parameters that are not used. This helps to reduce
|
||||||
|
+ warnings, such as from GCC -Wunused-parameter. The syntax is as follows:
|
||||||
|
+ type param _GL_UNUSED_PARAMETER
|
||||||
|
+ or more generally
|
||||||
|
+ param_decl _GL_UNUSED_PARAMETER
|
||||||
|
+ For example:
|
||||||
|
+ int param _GL_UNUSED_PARAMETER
|
||||||
|
+ int *(*param)(void) _GL_UNUSED_PARAMETER
|
||||||
|
+ Other possible, but obscure and discouraged syntaxes:
|
||||||
|
+ int _GL_UNUSED_PARAMETER *(*param)(void)
|
||||||
|
+ _GL_UNUSED_PARAMETER int *(*param)(void)
|
||||||
|
+ */
|
||||||
|
+#ifndef _GL_UNUSED_PARAMETER
|
||||||
|
+# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
|
||||||
|
+# define _GL_UNUSED_PARAMETER __attribute__ ((__unused__))
|
||||||
|
+# else
|
||||||
|
+# define _GL_UNUSED_PARAMETER
|
||||||
|
+# endif
|
||||||
|
+#endif
|
||||||
diff --git a/gnu/Makefile.am b/gnu/Makefile.am
|
diff --git a/gnu/Makefile.am b/gnu/Makefile.am
|
||||||
index 06eb0d9..e5913db 100644
|
index 06eb0d9..406999c 100644
|
||||||
--- a/gnu/Makefile.am
|
--- a/gnu/Makefile.am
|
||||||
+++ b/gnu/Makefile.am
|
+++ b/gnu/Makefile.am
|
||||||
@@ -1,6 +1,3 @@
|
@@ -1,6 +1,3 @@
|
||||||
@ -65,16 +111,48 @@ index 06eb0d9..e5913db 100644
|
|||||||
+libgnu_a_SOURCES += set-mode-acl.c copy-acl.c file-has-acl.c
|
+libgnu_a_SOURCES += set-mode-acl.c copy-acl.c file-has-acl.c
|
||||||
+
|
+
|
||||||
+EXTRA_DIST += acl-internal.h acl.h acl_entries.c
|
+EXTRA_DIST += acl-internal.h acl.h acl_entries.c
|
||||||
|
|
||||||
+EXTRA_libgnu_a_SOURCES += acl_entries.c
|
|
||||||
+
|
+
|
||||||
|
+EXTRA_libgnu_a_SOURCES += acl_entries.c
|
||||||
|
|
||||||
+## end gnulib module acl
|
+## end gnulib module acl
|
||||||
+
|
+
|
||||||
+## begin gnulib module alloca
|
+## begin gnulib module alloca
|
||||||
|
|
||||||
EXTRA_DIST += alloca.c
|
EXTRA_DIST += alloca.c
|
||||||
|
|
||||||
@@ -1386,6 +1392,60 @@ EXTRA_libgnu_a_SOURCES += savedir.c
|
@@ -179,6 +185,31 @@ EXTRA_DIST += $(top_srcdir)/build-aux/c++defs.h
|
||||||
|
|
||||||
|
## end gnulib module c++defs
|
||||||
|
|
||||||
|
+## begin gnulib module snippet/unused-parameter
|
||||||
|
+
|
||||||
|
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
|
||||||
|
+# statements but through direct file reference. Therefore this snippet must be
|
||||||
|
+# present in all Makefile.am that need it. This is ensured by the applicability
|
||||||
|
+# 'all' defined above.
|
||||||
|
+
|
||||||
|
+BUILT_SOURCES += unused-parameter.h
|
||||||
|
+# The unused-parameter.h that gets inserted into generated .h files is the same
|
||||||
|
+# as build-aux/snippet/unused-parameter.h, except that it has the copyright
|
||||||
|
+# header cut off.
|
||||||
|
+unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h
|
||||||
|
+ $(AM_V_GEN)rm -f $@-t $@ && \
|
||||||
|
+ sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
|
||||||
|
+ < $(top_srcdir)/build-aux/snippet/unused-parameter.h \
|
||||||
|
+ > $@-t && \
|
||||||
|
+ mv $@-t $@
|
||||||
|
+MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t
|
||||||
|
+
|
||||||
|
+UNUSED_PARAMETER_H=unused-parameter.h
|
||||||
|
+
|
||||||
|
+EXTRA_DIST += $(top_srcdir)/build-aux/snippet/unused-parameter.h
|
||||||
|
+
|
||||||
|
+## end gnulib module snippet/unused-parameter
|
||||||
|
+
|
||||||
|
## begin gnulib module c-ctype
|
||||||
|
|
||||||
|
libgnu_a_SOURCES += c-ctype.h c-ctype.c
|
||||||
|
@@ -1386,6 +1417,60 @@ EXTRA_libgnu_a_SOURCES += savedir.c
|
||||||
|
|
||||||
## end gnulib module savedir
|
## end gnulib module savedir
|
||||||
|
|
||||||
@ -135,7 +213,7 @@ index 06eb0d9..e5913db 100644
|
|||||||
## begin gnulib module setenv
|
## begin gnulib module setenv
|
||||||
|
|
||||||
|
|
||||||
@@ -2695,6 +2755,36 @@ libgnu_a_SOURCES += xalloc-die.c
|
@@ -2695,6 +2780,36 @@ libgnu_a_SOURCES += xalloc-die.c
|
||||||
|
|
||||||
## end gnulib module xalloc-die
|
## end gnulib module xalloc-die
|
||||||
|
|
||||||
@ -3888,5 +3966,5 @@ index 0000000..ed5215b
|
|||||||
+ fi
|
+ fi
|
||||||
+])
|
+])
|
||||||
--
|
--
|
||||||
1.7.11.2
|
1.7.11.4
|
||||||
|
|
||||||
|
36
tar.spec
36
tar.spec
@ -1,11 +1,11 @@
|
|||||||
%if %{?WITH_SELINUX:0}%{!?WITH_SELINUX:1}
|
%if %{?WITH_SELINUX:0}%{!?WITH_SELINUX:1}
|
||||||
%define WITH_SELINUX 1
|
%global WITH_SELINUX 1
|
||||||
%endif
|
%endif
|
||||||
Summary: A GNU file archiving program
|
Summary: A GNU file archiving program
|
||||||
Name: tar
|
Name: tar
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
Version: 1.26
|
Version: 1.26
|
||||||
Release: 11%{?dist}
|
Release: 12%{?dist}
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: Applications/Archiving
|
Group: Applications/Archiving
|
||||||
URL: http://www.gnu.org/software/tar/
|
URL: http://www.gnu.org/software/tar/
|
||||||
@ -40,14 +40,13 @@ Patch10: tar-1.26-stdio.in.patch
|
|||||||
Patch11: tar-1.26-xattrs-gnulib-prepare.patch
|
Patch11: tar-1.26-xattrs-gnulib-prepare.patch
|
||||||
Patch12: tar-1.26-xattrs.patch
|
Patch12: tar-1.26-xattrs.patch
|
||||||
|
|
||||||
BuildRequires: autoconf automake gzip texinfo gettext libacl-devel gawk rsh
|
BuildRequires: autoconf automake texinfo gettext libacl-devel rsh
|
||||||
# allow proper tests for extended attributes
|
# allow proper tests for extended attributes
|
||||||
BuildRequires: attr acl coreutils policycoreutils
|
BuildRequires: attr acl policycoreutils
|
||||||
|
|
||||||
%if %{WITH_SELINUX}
|
%if %{WITH_SELINUX}
|
||||||
BuildRequires: libselinux-devel
|
BuildRequires: libselinux-devel
|
||||||
%endif
|
%endif
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
Provides: bundled(gnulib)
|
Provides: bundled(gnulib)
|
||||||
Requires(post): /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
Requires(preun): /sbin/install-info
|
Requires(preun): /sbin/install-info
|
||||||
@ -68,7 +67,6 @@ the rmt package.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1 -b .loneZeroWarning
|
%patch1 -p1 -b .loneZeroWarning
|
||||||
%patch2 -p1 -b .vfatTruncate
|
%patch2 -p1 -b .vfatTruncate
|
||||||
#%patch3 -p1 -b .xattrs
|
|
||||||
%patch4 -p1 -b .wildcards
|
%patch4 -p1 -b .wildcards
|
||||||
%patch5 -p1 -b .rofs
|
%patch5 -p1 -b .rofs
|
||||||
%patch6 -p1 -b .oldarchive
|
%patch6 -p1 -b .oldarchive
|
||||||
@ -89,26 +87,25 @@ autoreconf
|
|||||||
make
|
make
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
make DESTDIR=$RPM_BUILD_ROOT bindir=/bin libexecdir=/sbin install
|
make DESTDIR=$RPM_BUILD_ROOT bindir=/bin libexecdir=/sbin install
|
||||||
|
|
||||||
ln -s tar ${RPM_BUILD_ROOT}/bin/gtar
|
ln -s tar $RPM_BUILD_ROOT/bin/gtar
|
||||||
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
|
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
|
||||||
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1
|
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
|
||||||
install -c -p -m 0644 %{SOURCE2} ${RPM_BUILD_ROOT}%{_mandir}/man1
|
install -c -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man1
|
||||||
ln -s tar.1.gz ${RPM_BUILD_ROOT}%{_mandir}/man1/gtar.1
|
ln -s tar.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/gtar.1
|
||||||
|
|
||||||
# XXX Nuke unpackaged files.
|
# XXX Nuke unpackaged files.
|
||||||
rm -f ${RPM_BUILD_ROOT}/sbin/rmt
|
rm -f $RPM_BUILD_ROOT/sbin/rmt
|
||||||
|
|
||||||
%find_lang %name
|
%find_lang %name
|
||||||
|
|
||||||
%check
|
%check
|
||||||
rm -f ${RPM_BUILD_ROOT}/test/testsuite
|
rm -f $RPM_BUILD_ROOT/test/testsuite
|
||||||
TESTSUITEFLAGS=-v make check
|
TESTSUITEFLAGS=-v make check
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf ${RPM_BUILD_ROOT}
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [ -f %{_infodir}/tar.info.gz ]; then
|
if [ -f %{_infodir}/tar.info.gz ]; then
|
||||||
@ -123,7 +120,6 @@ if [ $1 = 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc AUTHORS ChangeLog ChangeLog.1 COPYING NEWS README THANKS TODO
|
%doc AUTHORS ChangeLog ChangeLog.1 COPYING NEWS README THANKS TODO
|
||||||
%ifos linux
|
%ifos linux
|
||||||
/bin/tar
|
/bin/tar
|
||||||
@ -139,6 +135,16 @@ fi
|
|||||||
%{_infodir}/tar.info*
|
%{_infodir}/tar.info*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Oct 05 2012 Pavel Raiskup <praiskup@redhat.com> 2:1.26-12
|
||||||
|
- repair the xattr-gnulib-prepare patch to allow build tar without SELinux
|
||||||
|
support
|
||||||
|
- fedora-review compliance -> remove trailing white-spaces, remove macro from
|
||||||
|
comment, remove BR of gawk;coreutils;gzip that should be covered automatically
|
||||||
|
by minimum build environment, do not `rm -rf' buildroot at the beginning of
|
||||||
|
install phase (needed only in EPEL), remove BuildRoot definition, remove
|
||||||
|
defattr macro, s/define/global/
|
||||||
|
- do not use ${VAR} syntax for bash variables, use just $VAR
|
||||||
|
|
||||||
* Wed Aug 22 2012 Pavel Raiskup <praiskup@redhat.com> 2:1.26-11
|
* Wed Aug 22 2012 Pavel Raiskup <praiskup@redhat.com> 2:1.26-11
|
||||||
- fix manpage to reflect #850291 related commit
|
- fix manpage to reflect #850291 related commit
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user