kalev pushed to compat-gnutls28 (master). "Initial import (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Tue Apr 28 17:10:39 UTC 2015
>From d8d8f2df5fba17aa60f1d5c80c207c4ace738c98 Mon Sep 17 00:00:00 2001
From: Kalev Lember <kalevlember at gmail.com>
Date: Tue, 28 Apr 2015 19:03:54 +0200
Subject: Initial import
https://bugzilla.redhat.com/show_bug.cgi?id=1215997
diff --git a/.gitignore b/.gitignore
index e69de29..422838d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/gnutls-3.3.14-hobbled.tar.xz
diff --git a/compat-gnutls28.spec b/compat-gnutls28.spec
new file mode 100644
index 0000000..e452777
--- /dev/null
+++ b/compat-gnutls28.spec
@@ -0,0 +1,101 @@
+Summary: Compat package with gnutls library ABI version 28
+Name: compat-gnutls28
+Version: 3.3.14
+Release: 1%{?dist}
+# The libraries are LGPLv2.1+, utilities are GPLv3+
+License: LGPLv2+
+Group: System Environment/Libraries
+BuildRequires: p11-kit-devel >= 0.21.3, gettext
+BuildRequires: zlib-devel, readline-devel, libtasn1-devel >= 4.3
+BuildRequires: libtool, automake, autoconf, texinfo
+BuildRequires: autogen-libopts-devel >= 5.18 autogen
+BuildRequires: nettle-devel >= 2.7.1
+BuildRequires: trousers-devel >= 0.3.11.2
+BuildRequires: libidn-devel
+BuildRequires: gperf
+Requires: crypto-policies
+Requires: p11-kit-trust
+Requires: libtasn1 >= 4.3
+
+URL: http://www.gnutls.org/
+#Source0: ftp://ftp.gnutls.org/gcrypt/gnutls/%{name}-%{version}.tar.xz
+#Source1: ftp://ftp.gnutls.org/gcrypt/gnutls/%{name}-%{version}.tar.xz.sig
+# XXX patent tainted code removed.
+Source0: gnutls-%{version}-hobbled.tar.xz
+Source2: hobble-gnutls
+Patch1: gnutls-3.2.7-rpath.patch
+Patch3: gnutls-3.1.11-nosrp.patch
+Patch4: gnutls-3.3.6-default-policy.patch
+Patch5: gnutls-3.3.14-sigpipe.patch
+
+# Explicitly conflict with older gnutls packages that ship libraries
+# with the same soname as this compat package
+Conflicts: gnutls < 3.4
+
+# Wildcard bundling exception https://fedorahosted.org/fpc/ticket/174
+Provides: bundled(gnulib) = 20130424
+
+%description
+Compatibility package with gnutls library ABI version 28.
+
+%prep
+%setup -q -n gnutls-%{version}
+
+%patch1 -p1 -b .rpath
+%patch3 -p1 -b .nosrp
+%patch4 -p1 -b .default-policy
+%patch5 -p1 -b .sigpipe
+sed 's/gnutls_srp.c//g' -i lib/Makefile.in
+sed 's/gnutls_srp.lo//g' -i lib/Makefile.in
+rm -f lib/minitasn1/*.c lib/minitasn1/*.h
+rm -f src/libopts/*.c src/libopts/*.h src/libopts/compat/*.c src/libopts/compat/*.h
+sed -i -e 's|sys_lib_dlsearch_path_spec="/lib /usr/lib|sys_lib_dlsearch_path_spec="/lib /usr/lib %{_libdir}|g' configure
+
+%{SOURCE2} -e
+
+%build
+
+# this overrides the -znow from hardened builds.
+CFLAGS="$RPM_OPT_FLAGS -Wl,-z,lazy"
+export CFLAGS
+
+%configure --with-libtasn1-prefix=%{_prefix} \
+ --with-included-libcfg \
+ --disable-static \
+ --disable-openssl-compatibility \
+ --disable-srp-authentication \
+ --disable-non-suiteb-curves \
+ --with-system-priority-file=%{_sysconfdir}/crypto-policies/back-ends/gnutls.config \
+ --with-default-trust-store-pkcs11="pkcs11:model=p11-kit-trust;manufacturer=PKCS%2311%20Kit" \
+ --disable-guile \
+ --disable-dane \
+ --disable-rpath
+make %{?_smp_mflags} V=1
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+
+# remove files that shouldn't go in the compat package
+rm -rf $RPM_BUILD_ROOT%{_bindir}
+rm -rf $RPM_BUILD_ROOT%{_includedir}
+rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
+rm -rf $RPM_BUILD_ROOT%{_libdir}/*.so
+rm -rf $RPM_BUILD_ROOT%{_libdir}/libgnutls-dane.so*
+rm -rf $RPM_BUILD_ROOT%{_libdir}/libgnutlsxx.so*
+rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig/
+rm -rf $RPM_BUILD_ROOT%{_datadir}
+
+%check
+make check %{?_smp_mflags}
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%{_libdir}/libgnutls.so.28*
+%license COPYING COPYING.LESSER
+
+%changelog
+* Tue Apr 28 2015 Kalev Lember <kalevlember at gmail.com> - 3.3.14-1
+- gnutls ABI version 28 compatibility package (#1215997)
diff --git a/gnutls-3.1.11-nosrp.patch b/gnutls-3.1.11-nosrp.patch
new file mode 100644
index 0000000..29227c0
--- /dev/null
+++ b/gnutls-3.1.11-nosrp.patch
@@ -0,0 +1,12 @@
+diff -up gnutls-3.1.10/tests/srp/mini-srp.c.noecc gnutls-3.1.10/tests/srp/mini-srp.c
+--- gnutls-3.1.10/tests/srp/mini-srp.c.noecc 2013-03-21 21:42:28.000000000 +0100
++++ gnutls-3.1.10/tests/srp/mini-srp.c 2013-03-25 13:42:20.753422209 +0100
+@@ -27,7 +27,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+
+-#if defined(_WIN32)
++#if defined(_WIN32) || !defined(ENABLE_SRP)
+
+ int main()
+ {
diff --git a/gnutls-3.2.7-rpath.patch b/gnutls-3.2.7-rpath.patch
new file mode 100644
index 0000000..4e6aed3
--- /dev/null
+++ b/gnutls-3.2.7-rpath.patch
@@ -0,0 +1,12 @@
+diff -ur gnutls-3.2.7.orig/configure gnutls-3.2.7/configure
+--- gnutls-3.2.7.orig/configure 2013-11-23 11:09:49.000000000 +0100
++++ gnutls-3.2.7/configure 2013-11-25 16:53:05.559440656 +0100
+@@ -39652,7 +39652,7 @@
+ shlibpath_overrides_runpath=unknown
+ version_type=none
+ dynamic_linker="$host_os ld.so"
+-sys_lib_dlsearch_path_spec="/lib /usr/lib"
++sys_lib_dlsearch_path_spec="/lib /usr/lib /lib64 /usr/lib64"
+ need_lib_prefix=unknown
+ hardcode_into_libs=no
+
diff --git a/gnutls-3.3.14-sigpipe.patch b/gnutls-3.3.14-sigpipe.patch
new file mode 100644
index 0000000..871b473
--- /dev/null
+++ b/gnutls-3.3.14-sigpipe.patch
@@ -0,0 +1,12 @@
+diff --git a/tests/mini-loss-time.c b/tests/mini-loss-time.c
+index 6a10606..e76ff05 100644
+--- a/tests/mini-loss-time.c
++++ b/tests/mini-loss-time.c
+@@ -287,6 +287,7 @@ void doit(void)
+ time_t tstart, tstop;
+
+ signal(SIGCHLD, ch_handler);
++ signal(SIGPIPE, SIG_IGN);
+
+ tstart = time(0);
+ start(2, -1);
diff --git a/gnutls-3.3.6-default-policy.patch b/gnutls-3.3.6-default-policy.patch
new file mode 100644
index 0000000..94185e8
--- /dev/null
+++ b/gnutls-3.3.6-default-policy.patch
@@ -0,0 +1,31 @@
+diff -ur gnutls-3.3.6.orig/lib/gnutls_priority.c gnutls-3.3.6/lib/gnutls_priority.c
+--- gnutls-3.3.6.orig/lib/gnutls_priority.c 2014-07-22 23:43:41.000000000 +0200
++++ gnutls-3.3.6/lib/gnutls_priority.c 2014-07-23 10:13:30.456310043 +0200
+@@ -1110,6 +1110,7 @@
+ int algo;
+ rmadd_func *fn;
+ bulk_rmadd_func *bulk_fn;
++ unsigned dset = 0;
+
+ if (err_pos)
+ *err_pos = priorities;
+@@ -1129,10 +1130,16 @@
+
+ (*priority_cache)->max_empty_records = DEFAULT_MAX_EMPTY_RECORDS;
+
+- if (priorities == NULL)
+- priorities = "NORMAL";
++ if (priorities == NULL) {
++ priorities = "@SYSTEM";
++ dset = 1;
++ }
+
+ darg = resolve_priorities(priorities);
++ if (darg == NULL && dset == 1) {
++ priorities = "NORMAL";
++ darg = resolve_priorities(priorities);
++ }
+ if (darg == NULL) {
+ gnutls_assert();
+ goto error;
+Only in gnutls-3.3.6/lib: gnutls_priority.c.orig
diff --git a/hobble-gnutls b/hobble-gnutls
new file mode 100755
index 0000000..3302104
--- /dev/null
+++ b/hobble-gnutls
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -x
+
+if [ "$1" = "-e" ] ; then
+ CMD="cat < /dev/null >"
+else
+ CMD="rm -f"
+fi
+
+# SRP
+for f in auth/srp_sb64.c auth/srp_passwd.c auth/srp_rsa.c \
+ gnutls_srp.c auth/srp.c ext/srp.c ; do
+ eval "$CMD lib/$f"
+done
+
diff --git a/sources b/sources
index e69de29..f7bfc51 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+f5a7efed423f07e1336161f492edf478 gnutls-3.3.14-hobbled.tar.xz
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/compat-gnutls28.git/commit/?h=master&id=d8d8f2df5fba17aa60f1d5c80c207c4ace738c98
More information about the scm-commits
mailing list