silence strict aliasing warning in Rijndael
- apply UsrMove - spec file cleanups
This commit is contained in:
parent
771f7f2ed7
commit
b5413f756a
30
libgcrypt-1.5.2-aliasing.patch
Normal file
30
libgcrypt-1.5.2-aliasing.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
diff -up libgcrypt-1.5.2/cipher/Makefile.am.aliasing libgcrypt-1.5.2/cipher/Makefile.am
|
||||||
|
--- libgcrypt-1.5.2/cipher/Makefile.am.aliasing 2013-04-18 16:49:13.000000000 +0200
|
||||||
|
+++ libgcrypt-1.5.2/cipher/Makefile.am 2013-04-25 21:48:57.867465215 +0200
|
||||||
|
@@ -81,3 +81,9 @@ tiger.o: $(srcdir)/tiger.c
|
||||||
|
|
||||||
|
tiger.lo: $(srcdir)/tiger.c
|
||||||
|
`echo $(LTCOMPILE) -c $(srcdir)/tiger.c | $(o_flag_munging) `
|
||||||
|
+
|
||||||
|
+rijndael.o: $(srcdir)/rijndael.c
|
||||||
|
+ `echo $(COMPILE) -fno-strict-aliasing -c $(srcdir)/rijndael.c `
|
||||||
|
+
|
||||||
|
+rijndael.lo: $(srcdir)/rijndael.c
|
||||||
|
+ `echo $(LTCOMPILE) -fno-strict-aliasing -c $(srcdir)/rijndael.c `
|
||||||
|
diff -up libgcrypt-1.5.2/cipher/Makefile.in.aliasing libgcrypt-1.5.2/cipher/Makefile.in
|
||||||
|
--- libgcrypt-1.5.2/cipher/Makefile.in.aliasing 2013-04-18 17:06:03.000000000 +0200
|
||||||
|
+++ libgcrypt-1.5.2/cipher/Makefile.in 2013-04-25 21:48:59.164493610 +0200
|
||||||
|
@@ -638,6 +638,12 @@ tiger.o: $(srcdir)/tiger.c
|
||||||
|
tiger.lo: $(srcdir)/tiger.c
|
||||||
|
`echo $(LTCOMPILE) -c $(srcdir)/tiger.c | $(o_flag_munging) `
|
||||||
|
|
||||||
|
+rijndael.o: $(srcdir)/rijndael.c
|
||||||
|
+ `echo $(COMPILE) -fno-strict-aliasing -c $(srcdir)/rijndael.c `
|
||||||
|
+
|
||||||
|
+rijndael.lo: $(srcdir)/rijndael.c
|
||||||
|
+ `echo $(LTCOMPILE) -fno-strict-aliasing -c $(srcdir)/rijndael.c `
|
||||||
|
+
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
||||||
|
diff -up libgcrypt-1.5.2/cipher/rijndael.c.aliasing libgcrypt-1.5.2/cipher/rijndael.c
|
@ -1,6 +1,6 @@
|
|||||||
Name: libgcrypt
|
Name: libgcrypt
|
||||||
Version: 1.5.2
|
Version: 1.5.2
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
URL: http://www.gnupg.org/
|
URL: http://www.gnupg.org/
|
||||||
Source0: libgcrypt-%{version}-hobbled.tar.xz
|
Source0: libgcrypt-%{version}-hobbled.tar.xz
|
||||||
# The original libgcrypt sources now contain potentially patented ECC
|
# The original libgcrypt sources now contain potentially patented ECC
|
||||||
@ -25,13 +25,16 @@ Patch7: libgcrypt-1.5.0-fips-cavs.patch
|
|||||||
Patch9: libgcrypt-1.5.0-leak.patch
|
Patch9: libgcrypt-1.5.0-leak.patch
|
||||||
# use poll instead of select when gathering randomness
|
# use poll instead of select when gathering randomness
|
||||||
Patch11: libgcrypt-1.5.1-use-poll.patch
|
Patch11: libgcrypt-1.5.1-use-poll.patch
|
||||||
|
# compile rijndael with -fno-strict-aliasing
|
||||||
|
Patch12: libgcrypt-1.5.2-aliasing.patch
|
||||||
|
|
||||||
|
%define gcrylibdir %{_libdir}
|
||||||
|
|
||||||
# Technically LGPLv2.1+, but Fedora's table doesn't draw a distinction.
|
# Technically LGPLv2.1+, but Fedora's table doesn't draw a distinction.
|
||||||
# Documentation and some utilities are GPLv2+ licensed. These files
|
# Documentation and some utilities are GPLv2+ licensed. These files
|
||||||
# are in the devel subpackage.
|
# are in the devel subpackage.
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Summary: A general-purpose cryptography library
|
Summary: A general-purpose cryptography library
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
||||||
BuildRequires: gawk, libgpg-error-devel >= 1.4, pkgconfig
|
BuildRequires: gawk, libgpg-error-devel >= 1.4, pkgconfig
|
||||||
BuildRequires: fipscheck
|
BuildRequires: fipscheck
|
||||||
# This is needed only when patching the .texi doc.
|
# This is needed only when patching the .texi doc.
|
||||||
@ -66,6 +69,7 @@ applications using libgcrypt.
|
|||||||
%patch7 -p1 -b .cavs
|
%patch7 -p1 -b .cavs
|
||||||
%patch9 -p1 -b .leak
|
%patch9 -p1 -b .leak
|
||||||
%patch11 -p1 -b .use-poll
|
%patch11 -p1 -b .use-poll
|
||||||
|
%patch12 -p1 -b .aliasing
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --disable-static \
|
%configure --disable-static \
|
||||||
@ -87,11 +91,10 @@ make check
|
|||||||
%{?__debug_package:%{__debug_install_post}} \
|
%{?__debug_package:%{__debug_install_post}} \
|
||||||
%{__arch_install_post} \
|
%{__arch_install_post} \
|
||||||
%{__os_install_post} \
|
%{__os_install_post} \
|
||||||
fipshmac $RPM_BUILD_ROOT/%{_lib}/*.so.?? \
|
fipshmac $RPM_BUILD_ROOT%{gcrylibdir}/*.so.?? \
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -fr $RPM_BUILD_ROOT
|
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
# Change /usr/lib64 back to /usr/lib. This saves us from having to patch the
|
# Change /usr/lib64 back to /usr/lib. This saves us from having to patch the
|
||||||
@ -104,26 +107,20 @@ sed -i -e 's,^my_host=".*"$,my_host="none",g' $RPM_BUILD_ROOT/%{_bindir}/libgcry
|
|||||||
rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir ${RPM_BUILD_ROOT}/%{_libdir}/*.la
|
rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir ${RPM_BUILD_ROOT}/%{_libdir}/*.la
|
||||||
/sbin/ldconfig -n $RPM_BUILD_ROOT/%{_libdir}
|
/sbin/ldconfig -n $RPM_BUILD_ROOT/%{_libdir}
|
||||||
|
|
||||||
# Relocate the shared libraries to /%{_lib}.
|
%if "%{gcrylibdir}" != "%{_libdir}"
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_lib}
|
# Relocate the shared libraries to %{gcrylibdir}.
|
||||||
for shlib in $RPM_BUILD_ROOT/%{_libdir}/*.so* ; do
|
mkdir -p $RPM_BUILD_ROOT%{gcrylibdir}
|
||||||
|
for shlib in $RPM_BUILD_ROOT%{_libdir}/*.so* ; do
|
||||||
if test -L "$shlib" ; then
|
if test -L "$shlib" ; then
|
||||||
rm "$shlib"
|
rm "$shlib"
|
||||||
else
|
else
|
||||||
mv "$shlib" $RPM_BUILD_ROOT/%{_lib}/
|
mv "$shlib" $RPM_BUILD_ROOT%{gcrylibdir}/
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Figure out where /%{_lib} is relative to %{_libdir}.
|
|
||||||
touch $RPM_BUILD_ROOT/root_marker
|
|
||||||
relroot=..
|
|
||||||
while ! test -f $RPM_BUILD_ROOT/%{_libdir}/$relroot/root_marker ; do
|
|
||||||
relroot=$relroot/..
|
|
||||||
done
|
|
||||||
|
|
||||||
# Overwrite development symlinks.
|
# Overwrite development symlinks.
|
||||||
pushd $RPM_BUILD_ROOT/%{_libdir}
|
pushd $RPM_BUILD_ROOT/%{_libdir}
|
||||||
for shlib in $relroot/%{_lib}/lib*.so.* ; do
|
for shlib in %{gcrylibdir}/lib*.so.* ; do
|
||||||
shlib=`echo "$shlib" | sed -e 's,//,/,g'`
|
shlib=`echo "$shlib" | sed -e 's,//,/,g'`
|
||||||
target=`basename "$shlib" | sed -e 's,\.so.*,,g'`.so
|
target=`basename "$shlib" | sed -e 's,\.so.*,,g'`.so
|
||||||
ln -sf $shlib $target
|
ln -sf $shlib $target
|
||||||
@ -132,15 +129,13 @@ popd
|
|||||||
|
|
||||||
# Add soname symlink.
|
# Add soname symlink.
|
||||||
/sbin/ldconfig -n $RPM_BUILD_ROOT/%{_lib}/
|
/sbin/ldconfig -n $RPM_BUILD_ROOT/%{_lib}/
|
||||||
rm -f $RPM_BUILD_ROOT/root_marker
|
%endif
|
||||||
|
|
||||||
|
|
||||||
# Create /etc/gcrypt (hardwired, not dependent on the configure invocation) so
|
# Create /etc/gcrypt (hardwired, not dependent on the configure invocation) so
|
||||||
# that _someone_ owns it.
|
# that _someone_ owns it.
|
||||||
mkdir -p -m 755 $RPM_BUILD_ROOT/etc/gcrypt
|
mkdir -p -m 755 $RPM_BUILD_ROOT/etc/gcrypt
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -fr $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
@ -159,8 +154,8 @@ exit 0
|
|||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%dir /etc/gcrypt
|
%dir /etc/gcrypt
|
||||||
/%{_lib}/libgcrypt.so.*
|
%{gcrylibdir}/libgcrypt.so.*
|
||||||
/%{_lib}/.libgcrypt.so.*.hmac
|
%{gcrylibdir}/.libgcrypt.so.*.hmac
|
||||||
%doc COPYING.LIB AUTHORS NEWS THANKS
|
%doc COPYING.LIB AUTHORS NEWS THANKS
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
@ -176,6 +171,11 @@ exit 0
|
|||||||
%doc COPYING
|
%doc COPYING
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 25 2013 Tomáš Mráz <tmraz@redhat.com> 1.5.2-2
|
||||||
|
- silence strict aliasing warning in Rijndael
|
||||||
|
- apply UsrMove
|
||||||
|
- spec file cleanups
|
||||||
|
|
||||||
* Fri Apr 19 2013 Tomáš Mráz <tmraz@redhat.com> 1.5.2-1
|
* Fri Apr 19 2013 Tomáš Mráz <tmraz@redhat.com> 1.5.2-1
|
||||||
- new upstream version
|
- new upstream version
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user