diff --git a/opencryptoki-3.2-missing-sources-and-libraries.patch b/opencryptoki-3.2-missing-sources-and-libraries.patch index 5e4509f..f6d79f5 100644 --- a/opencryptoki-3.2-missing-sources-and-libraries.patch +++ b/opencryptoki-3.2-missing-sources-and-libraries.patch @@ -10,15 +10,6 @@ diff --git a/configure.in b/configure.in dnl Checks for header files. AC_DISABLE_STATIC -@@ -571,7 +571,7 @@ fi - AM_CONDITIONAL([ENABLE_PKCSCCA_MIGRATE], [test "x$enable_pkcscca_migrate" = "xyes"]) - AM_CONDITIONAL([ENABLE_PKCSEP11_MIGRATE], [test "x$enable_pkcsep11_migrate" = "xyes"]) - --CFLAGS="$CFLAGS -DPKCS64 -D_XOPEN_SOURCE=500" -+CFLAGS="$CFLAGS -DPKCS64 -D_XOPEN_SOURCE=500 -Wl,--no-undefined" - - CFLAGS+=' -DCONFIG_PATH=\"$(localstatedir)/lib/opencryptoki\" -DSBIN_PATH=\"$(sbindir)\" -DLIB_PATH=\"$(libdir)\" -DLOCKDIR_PATH=\"$(lockdir)\" -DOCK_CONFDIR=\"$(sysconfdir)/opencryptoki\"' - diff --git a/usr/lib/pkcs11/cca_stdll/cca_specific.c b/usr/lib/pkcs11/cca_stdll/cca_specific.c --- a/usr/lib/pkcs11/cca_stdll/cca_specific.c +++ b/usr/lib/pkcs11/cca_stdll/cca_specific.c diff --git a/opencryptoki-3.2-no-undefined.patch b/opencryptoki-3.2-no-undefined.patch new file mode 100644 index 0000000..200de6a --- /dev/null +++ b/opencryptoki-3.2-no-undefined.patch @@ -0,0 +1,12 @@ +diff --git a/configure.in b/configure.in +--- a/configure.in ++++ b/configure.in +@@ -571,7 +571,7 @@ fi + AM_CONDITIONAL([ENABLE_PKCSCCA_MIGRATE], [test "x$enable_pkcscca_migrate" = "xyes"]) + AM_CONDITIONAL([ENABLE_PKCSEP11_MIGRATE], [test "x$enable_pkcsep11_migrate" = "xyes"]) + +-CFLAGS="$CFLAGS -DPKCS64 -D_XOPEN_SOURCE=500" ++CFLAGS="$CFLAGS -DPKCS64 -D_XOPEN_SOURCE=500 -Wl,--no-undefined" + + CFLAGS+=' -DCONFIG_PATH=\"$(localstatedir)/lib/opencryptoki\" -DSBIN_PATH=\"$(sbindir)\" -DLIB_PATH=\"$(libdir)\" -DLOCKDIR_PATH=\"$(lockdir)\" -DOCK_CONFDIR=\"$(sysconfdir)/opencryptoki\"' + diff --git a/opencryptoki.spec b/opencryptoki.spec index ae14978..6d8e30e 100644 --- a/opencryptoki.spec +++ b/opencryptoki.spec @@ -15,6 +15,10 @@ Patch0: %{name}-2.4-group.patch Patch1: %{name}-3.2-conditional-manpages.patch # Fix missing sources and libraries in makefiles causing undefined symbols (#1193560) Patch2: %{name}-3.2-missing-sources-and-libraries.patch + +# Use --no-undefined to debug missing symbols +#Patch100: %{name}-3.2-no-undefined.patch + Requires(pre): shadow-utils coreutils sed BuildRequires: openssl-devel BuildRequires: trousers-devel @@ -181,6 +185,8 @@ configured with Enterprise PKCS#11 (EP11) firmware. %patch1 -p1 -b .man %patch2 -p1 -b .source +#%patch100 -p1 -b .no-undefined + # Upstream tarball has unnecessary executable perms set on the sources find . -name '*.[ch]' -print0 | xargs -0 chmod -x