cvsdist 14b0010
Name: libgcrypt
d1e5e24
Version: 1.4.6
db9fb5d
Release: 2%{?dist}
e56dfeb
URL: http://www.gnupg.org/
0b312a8
Source0: libgcrypt-%{version}-hobbled.tar.bz2
0b312a8
# The original libgcrypt sources now contain potentially patented ECC
0b312a8
# cipher support. We have to remove it in the tarball we ship with
0b312a8
# the hobble-libgcrypt script.
0b312a8
#Source0: ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.bz2
0b312a8
#Source1: ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.bz2.sig
cvsdist 43bf1a0
Source2: wk@g10code.com
0b312a8
Source3: hobble-libgcrypt
c9eae97
# make FIPS hmac compatible with fipscheck - non upstreamable
4b8542a
Patch2: libgcrypt-1.4.4-use-fipscheck.patch
6d243f3
# fix ImplicitDSOLinking (missing -lgpg-error linkage in tests/), upstreamable
6d243f3
Patch3: libgcrypt-1.4.5-ImplicitDSOLinking.patch
16991a5
# use /dev/urandom in the FIPS mode
16991a5
Patch4: libgcrypt-1.4.5-urandom.patch
16991a5
# fix tests in the FIPS mode, fix the FIPS-186-3 DSA keygen
16991a5
Patch5: libgcrypt-1.4.5-tests.patch
db9fb5d
# make the FIPS-186-3 DSA CAVS testable
db9fb5d
Patch6: libgcrypt-1.4.6-cavs.patch
0b312a8
cfb3452
# Technically LGPLv2.1+, but Fedora's table doesn't draw a distinction.
c9eae97
# Documentation and some utilities are GPLv2+ licensed. These files
c9eae97
# are in the devel subpackage.
b03ca47
License: LGPLv2+
0be77fc
Summary: A general-purpose cryptography library
c9eae97
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
cfb3452
BuildRequires: gawk, libgpg-error-devel >= 1.4, pkgconfig
4b8542a
BuildRequires: fipscheck
cvsdist 14b0010
Group: System Environment/Libraries
cvsdist 14b0010
cvsdist 14b0010
%package devel
c9de6ac
Summary: Development files for the %{name} package
c9eae97
License: LGPLv2+ and GPLv2+
cvsdist 14b0010
Group: Development/Libraries
e56dfeb
Requires(pre): /sbin/install-info
e56dfeb
Requires(post): /sbin/install-info
cvsdist 5ec77af
Requires: libgpg-error-devel
cvsdist 14b0010
Requires: %{name} = %{version}-%{release}
cvsdist 14b0010
cvsdist 14b0010
%description
cvsdist 14b0010
Libgcrypt is a general purpose crypto library based on the code used
cvsdist 14b0010
in GNU Privacy Guard.  This is a development version.
cvsdist 14b0010
cvsdist 14b0010
%description devel
cvsdist 14b0010
Libgcrypt is a general purpose crypto library based on the code used
cvsdist 14b0010
in GNU Privacy Guard.  This package contains files needed to develop
cvsdist 14b0010
applications using libgcrypt.
cvsdist 14b0010
cvsdist 14b0010
%prep
cvsdist 14b0010
%setup -q
0b312a8
%{SOURCE3}
4b8542a
%patch2 -p1 -b .use-fipscheck
6d243f3
%patch3 -p1 -b .ImplicitDSOLinking
16991a5
%patch4 -p1 -b .urandom
16991a5
%patch5 -p1 -b .tests
cvsdist 14b0010
c9eae97
mv AUTHORS AUTHORS.iso88591
c9eae97
iconv -f ISO-8859-1 -t UTF-8 AUTHORS.iso88591 >AUTHORS
c9eae97
cvsdist 14b0010
%build
328eebc
%configure --disable-static \
328eebc
%ifarch sparc64
328eebc
     --disable-asm \
328eebc
%endif
0b312a8
     --enable-noexecstack \
4b8542a
     --enable-hmac-binary-check \
9b68232
     --enable-pubkey-ciphers='dsa elgamal rsa' \
9b68232
     --disable-O-flag-munging
6e274ad
make %{?_smp_mflags}
665b2f3
665b2f3
%check
4b8542a
fipshmac src/.libs/libgcrypt.so.??
f0681c1
make check
cvsdist 14b0010
4b8542a
# Add generation of HMAC checksums of the final stripped binaries 
4b8542a
%define __spec_install_post \
4b8542a
    %{?__debug_package:%{__debug_install_post}} \
4b8542a
    %{__arch_install_post} \
4b8542a
    %{__os_install_post} \
4b8542a
    fipshmac $RPM_BUILD_ROOT/%{_lib}/*.so.?? \
4b8542a
%{nil}
4b8542a
cvsdist 14b0010
%install
cvsdist 14b0010
rm -fr $RPM_BUILD_ROOT
c9eae97
make install DESTDIR=$RPM_BUILD_ROOT
cvsdist 14b0010
884ac1e
# Change /usr/lib64 back to /usr/lib.  This saves us from having to patch the
884ac1e
# script to "know" that -L/usr/lib64 should be suppressed, and also removes
884ac1e
# a file conflict between 32- and 64-bit versions of this package.
884ac1e
sed -i -e 's,^libdir="/usr/lib.*"$,libdir="/usr/lib",g' $RPM_BUILD_ROOT/%{_bindir}/libgcrypt-config
cvsdist 14b0010
cvsdist 5ec77af
rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir ${RPM_BUILD_ROOT}/%{_libdir}/*.la
cvsdist 584927c
/sbin/ldconfig -n $RPM_BUILD_ROOT/%{_libdir}
cvsdist 14b0010
1b380ca
# Relocate the shared libraries to /%{_lib}.
1b380ca
mkdir -p $RPM_BUILD_ROOT/%{_lib}
1b380ca
for shlib in $RPM_BUILD_ROOT/%{_libdir}/*.so* ; do
1b380ca
	if test -L "$shlib" ; then
1b380ca
		rm "$shlib"
1b380ca
	else
1b380ca
		mv "$shlib" $RPM_BUILD_ROOT/%{_lib}/
1b380ca
	fi
1b380ca
done
665b2f3
1b380ca
# Figure out where /%{_lib} is relative to %{_libdir}.
1b380ca
touch $RPM_BUILD_ROOT/root_marker
1b380ca
relroot=..
1b380ca
while ! test -f $RPM_BUILD_ROOT/%{_libdir}/$relroot/root_marker ; do
1b380ca
	relroot=$relroot/..
1b380ca
done
665b2f3
1b380ca
# Overwrite development symlinks.
1b380ca
pushd $RPM_BUILD_ROOT/%{_libdir}
1b380ca
for shlib in $relroot/%{_lib}/lib*.so.* ; do
1b380ca
	shlib=`echo "$shlib" | sed -e 's,//,/,g'`
1b380ca
	target=`basename "$shlib" | sed -e 's,\.so.*,,g'`.so
1b380ca
	ln -sf $shlib $target
1b380ca
done
1b380ca
popd
665b2f3
9f9b613
# Add soname symlink.
9f9b613
/sbin/ldconfig -n $RPM_BUILD_ROOT/%{_lib}/
1b380ca
rm -f $RPM_BUILD_ROOT/root_marker
1b380ca
0be77fc
# Create /etc/gcrypt (hardwired, not dependent on the configure invocation) so
0be77fc
# that _someone_ owns it.
0be77fc
mkdir -p -m 755 $RPM_BUILD_ROOT/etc/gcrypt
0be77fc
cvsdist 14b0010
%clean
cvsdist 14b0010
rm -fr $RPM_BUILD_ROOT
cvsdist 14b0010
cvsdist 14b0010
%post -p /sbin/ldconfig
cvsdist 14b0010
cvsdist 14b0010
%postun -p /sbin/ldconfig
cvsdist 14b0010
cvsdist 14b0010
%post devel
f235e63
[ -f %{_infodir}/gcrypt.info.gz ] && \
f235e63
    /sbin/install-info %{_infodir}/gcrypt.info.gz %{_infodir}/dir
2b15591
exit 0
cvsdist 14b0010
cvsdist 14b0010
%preun devel
f235e63
if [ $1 = 0 -a -f %{_infodir}/gcrypt.info.gz ]; then
cvsdist 14b0010
    /sbin/install-info --delete %{_infodir}/gcrypt.info.gz %{_infodir}/dir
cvsdist 14b0010
fi
2b15591
exit 0
cvsdist 14b0010
cvsdist 14b0010
%files
c9eae97
%defattr(-,root,root,-)
0be77fc
%dir /etc/gcrypt
4b8542a
/%{_lib}/libgcrypt.so.*
4b8542a
/%{_lib}/.libgcrypt.so.*.hmac
c9eae97
%doc COPYING.LIB AUTHORS NEWS THANKS
cvsdist 14b0010
cvsdist 14b0010
%files devel
c9eae97
%defattr(-,root,root,-)
cvsdist 14b0010
%{_bindir}/%{name}-config
665b2f3
%{_bindir}/dumpsexp
569a423
%{_bindir}/hmac256
cvsdist 14b0010
%{_includedir}/*
cvsdist 14b0010
%{_libdir}/*.so
cvsdist 14b0010
%{_datadir}/aclocal/*
cvsdist 14b0010
cvsdist 14b0010
%{_infodir}/gcrypt.info*
c9eae97
%doc COPYING
cvsdist 14b0010
cvsdist 14b0010
%changelog
db9fb5d
* Mon May 30 2011 Tomas Mraz <tmraz@redhat.com> 1.4.6-2
db9fb5d
- Make the FIPS-186-3 DSA implementation CAVS testable
db9fb5d
d1e5e24
* Fri Feb 11 2011 Tomas Mraz <tmraz@redhat.com> 1.4.6-1
d1e5e24
- new upstream version with minor changes
d1e5e24
1a76790
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.5-7
1a76790
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
1a76790
474b273
* Thu Feb  4 2011 Tomas Mraz <tmraz@redhat.com> 1.4.5-6
474b273
- fix a bug in the fips-186-3 dsa parameter generation code
474b273
16991a5
* Tue Feb  1 2011 Tomas Mraz <tmraz@redhat.com> 1.4.5-5
16991a5
- use /dev/urandom for seeding in the FIPS mode
16991a5
- make the tests to pass in the FIPS mode also fixing
16991a5
  the FIPS-186-3 DSA keygen
16991a5
6d243f3
* Sun Feb 14 2010 Rex Dieter <rdieter@fedoraproject.org> 1.4.5-4
6d243f3
- FTBFS libgcrypt-1.4.5-3.fc13: ImplicitDSOLinking (#564973)
6d243f3
c9eae97
* Wed Feb  3 2010 Tomas Mraz <tmraz@redhat.com> 1.4.5-3
c9eae97
- drop the S390 build workaround as it is no longer needed
c9eae97
- additional spec file cleanups for merge review (#226008)
c9eae97
9b68232
* Mon Dec 21 2009 Tomas Mraz <tmraz@redhat.com> 1.4.5-1
9b68232
- workaround for build on S390 (#548825)
9b68232
- spec file cleanups
9b68232
- upgrade to new minor upstream release
e56dfeb
f235e63
* Tue Aug 11 2009 Tomas Mraz <tmraz@redhat.com> 1.4.4-8
f235e63
- fix warning when installed with --excludedocs (#515961)
f235e63
2a6e183
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.4-7
2a6e183
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
2a6e183
06cc870
* Thu Jun 18 2009 Tomas Mraz <tmraz@redhat.com> 1.4.4-6
06cc870
- and now really apply the padlock patch
06cc870
0d713cc
* Wed Jun 17 2009 Tomas Mraz <tmraz@redhat.com> 1.4.4-5
0d713cc
- fix VIA padlock RNG inline assembly call (#505724)
0d713cc
e569e43
* Thu Mar  5 2009 Tomas Mraz <tmraz@redhat.com> 1.4.4-4
e569e43
- with the integrity verification check the library needs to link to libdl
e569e43
  (#488702)
e569e43
4b8542a
* Tue Mar  3 2009 Tomas Mraz <tmraz@redhat.com> 1.4.4-3
4b8542a
- add hmac FIPS integrity verification check
4b8542a
7de5049
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.4-2
7de5049
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
7de5049
0b312a8
* Fri Jan 30 2009 Tomas Mraz <tmraz@redhat.com> 1.4.4-1
0b312a8
- update to 1.4.4
0b312a8
- do not abort when the fips mode kernel flag is inaccessible
0b312a8
  due to permissions (#470219)
0b312a8
- hobble the library to drop the ECC support
0b312a8
328eebc
* Mon Oct 20 2008 Dennis Gilmore <dennis@ausil.us> 1.4.3-2
328eebc
- disable asm on sparc64
328eebc
0be77fc
* Thu Sep 18 2008 Nalin Dahyabhai <nalin@redhat.com> 1.4.3-1
0be77fc
- update to 1.4.3
0be77fc
- own /etc/gcrypt
0be77fc
6e274ad
* Mon Sep 15 2008 Nalin Dahyabhai <nalin@redhat.com>
6e274ad
- invoke make with %%{?_smp_mflags} to build faster on multi-processor
6e274ad
  systems (Steve Grubb)
6e274ad
569a423
* Mon Sep  8 2008 Nalin Dahyabhai <nalin@redhat.com> 1.4.2-1
569a423
- update to 1.4.2
569a423
cfb3452
* Tue Apr 29 2008 Nalin Dahyabhai <nalin@redhat.com> 1.4.1-1
cfb3452
- update to 1.4.1
cfb3452
- bump libgpgerror-devel requirement to 1.4, matching the requirement enforced
cfb3452
  by the configure script
cfb3452
a562621
* Thu Apr  3 2008 Joe Orton <jorton@redhat.com> 1.4.0-3
a562621
- add patch from upstream to fix severe performance regression
a562621
  in entropy gathering
a562621
dac6bc7
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.4.0-2
dac6bc7
- Autorebuild for GCC 4.3
dac6bc7
665b2f3
* Mon Dec 10 2007 Nalin Dahyabhai <nalin@redhat.com> - 1.4.0-1
665b2f3
- update to 1.4.0
665b2f3
9f9b613
* Tue Oct 16 2007 Nalin Dahyabhai <nalin@redhat.com> - 1.2.4-6
9f9b613
- use ldconfig to build the soname symlink for packaging along with the
9f9b613
  shared library (#334731)
9f9b613
710edd9
* Wed Aug 22 2007 Nalin Dahyabhai <nalin@redhat.com> - 1.2.4-5
710edd9
- add missing gawk buildrequirement
710edd9
- switch from explicitly specifying the /dev/random RNG to just verifying
710edd9
  that the non-LGPL ones were disabled by the configure script
710edd9
b03ca47
* Thu Aug 16 2007 Nalin Dahyabhai <nalin@redhat.com> - 1.2.4-4
b03ca47
- clarify license
b03ca47
- force use of the linux /dev/random RNG, to avoid accidentally falling back
b03ca47
  to others which would affect the license of the resulting library
b03ca47
db8737b
* Mon Jul 30 2007 Nalin Dahyabhai <nalin@redhat.com> - 1.2.4-3
db8737b
- disable static libraries (part of #249815)
db8737b
1b380ca
* Fri Jul 27 2007 Nalin Dahyabhai <nalin@redhat.com> - 1.2.4-2
e56dfeb
- move libgcrypt shared library to /%%{_lib} (#249815)
1b380ca
13d88a8
* Tue Feb  6 2007 Nalin Dahyabhai <nalin@redhat.com> - 1.2.4-1
13d88a8
- update to 1.2.4
13d88a8
2b15591
* Mon Jan 22 2007 Nalin Dahyabhai <nalin@redhat.com> - 1.2.3-2
2b15591
- make use of install-info more failsafe (Ville Skyttä, #223705)
2b15591
ceaccca
* Fri Sep  1 2006 Nalin Dahyabhai <nalin@redhat.com> - 1.2.3-1
ceaccca
- update to 1.2.3
ceaccca
38f71b7
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.2.2-3.1
38f71b7
- rebuild
38f71b7
dc30f1f
* Mon Jun 05 2006 Jesse Keating <jkeating@redhat.com> 1.2.2-3
dc30f1f
- Added missing buildreq pkgconfig
dc30f1f
884ac1e
* Tue May 16 2006 Nalin Dahyabhai <nalin@redhat.com> 1.2.2-2
884ac1e
- remove file conflicts in libgcrypt-config by making the 64-bit version
884ac1e
  think the libraries are in /usr/lib (which is wrong, but which it also
884ac1e
  prunes from the suggest --libs output, so no harm done, hopefully)
884ac1e
d9774b4
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.2.2-1.2.1
d9774b4
- bump again for double-long bug on ppc(64)
d9774b4
9d0e976
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.2.2-1.2
9d0e976
- rebuilt for new gcc4.1 snapshot and glibc changes
9d0e976
6578d14
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
6578d14
- rebuilt
6578d14
1725944
* Wed Oct  5 2005 Nalin Dahyabhai <nalin@redhat.com> 1.2.2-1
1725944
- update to 1.2.2
1725944
1725944
* Wed Mar 16 2005 Nalin Dahyabhai <nalin@redhat.com> 1.2.1-1
f0681c1
- update to 1.2.1
f0681c1
cvsdist 584927c
* Fri Jul 30 2004 Florian La Roche <Florian.LaRoche@redhat.de>
cvsdist 584927c
- another try to package the symlink
cvsdist 584927c
cvsdist 61ab57a
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
cvsdist 61ab57a
- rebuilt
cvsdist 61ab57a
cvsdist 5ec77af
* Sun May  2 2004 Bill Nottingham <notting@redhat.com> - 1.2.0-1
cvsdist 5ec77af
- update to official 1.2.0
cvsdist 5ec77af
cvsdist 5ec77af
* Fri Apr 16 2004 Bill Nottingham <notting@redhat.com> - 1.1.94-1
cvsdist 5ec77af
- update to 1.1.94
cvsdist 5ec77af
cvsdist 90149ee
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
cvsdist 90149ee
- rebuilt
cvsdist 90149ee
cvsdist 90149ee
* Sat Feb 21 2004 Florian La Roche <Florian.LaRoche@redhat.de>
cvsdist 90149ee
- add symlinks to shared libs at compile time
cvsdist 90149ee
cvsdist 90149ee
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
cvsdist 90149ee
- rebuilt
cvsdist 90149ee
cvsdist 43bf1a0
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
cvsdist 43bf1a0
- rebuilt
cvsdist 43bf1a0
cvsdist 43bf1a0
* Thu Mar 20 2003 Jeff Johnson <jbj@redhat.com> 1.1.12-1
cvsdist 43bf1a0
- upgrade to 1.1.12 (beta).
cvsdist 43bf1a0
cvsdist 14b0010
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
cvsdist 14b0010
- automated rebuild
cvsdist 14b0010
cvsdist 14b0010
* Sun May 26 2002 Tim Powers <timp@redhat.com>
cvsdist 14b0010
- automated rebuild
cvsdist 14b0010
cvsdist 14b0010
* Tue May 21 2002 Jeff Johnson <jbj@redhat.com>
cvsdist 14b0010
- update to 1.1.7
cvsdist 14b0010
- change license to LGPL.
cvsdist 14b0010
- include splint annotations patch.
cvsdist 14b0010
- install info pages.
cvsdist 14b0010
cvsdist 14b0010
* Tue Apr  2 2002 Nalin Dahyabhai <nalin@redhat.com> 1.1.6-1
cvsdist 14b0010
- update to 1.1.6
cvsdist 14b0010
cvsdist 14b0010
* Thu Jan 10 2002 Nalin Dahyabhai <nalin@redhat.com> 1.1.5-1
cvsdist 14b0010
- fix the Source tag so that it's a real URL
cvsdist 14b0010
cvsdist 14b0010
* Wed Dec 20 2001 Nalin Dahyabhai <nalin@redhat.com>
cvsdist 14b0010
- initial package