Skip to content

Commit

Permalink
[dirmngr] Disable build of ldap executable.
Browse files Browse the repository at this point in the history
dirmngr_ldap executable is not required at the moment for the S/MIME
signing process and is thus disabled to avoid a dependency on an
ldap library.
  • Loading branch information
dcaliste committed Jul 16, 2018
1 parent 42bdb36 commit 2adda19
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 336 deletions.
5 changes: 5 additions & 0 deletions README
Expand Up @@ -4,3 +4,8 @@ tree is not available anymore. Tarball was downloaded from ftp://ftp.gnupg.org/g

The tarball was signed with a key that is not available anymore. Current signing keys
of the GnuPG project are listed in https://www.gnupg.org/signature_key.html

The dirmngr_ldap executable was disabled by a commit, modifying the configure not to fail
on ldap detection, and also src/Makefile.in not to build and install dirmngr_ldap.
Currently this executable is not required for Mer purposes and avoid to add a dependency
on openldap.
333 changes: 1 addition & 332 deletions dirmngr-1.0.3/configure
Expand Up @@ -2426,7 +2426,7 @@ have_gpg_error=no
have_libgcrypt=no
have_libassuan=no
have_ksba=no
have_ldap=no
have_ldap=unchecked
have_pth=no
{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
Expand Down Expand Up @@ -8173,337 +8173,6 @@ fi
fi
#
# LDAP libraries/includes
#
# From gnupg 1.4:
# Try and link a LDAP test program to weed out unusable LDAP
# libraries. -lldap [-llber [-lresolv]] is for older OpenLDAPs.
# OpenLDAP, circa 1999, was terrible with creating weird dependencies.
# This seems to have all been resolved, so I'm simplifying this code
# significantly. If all else fails, the user can play
# guess-the-dependency by using something like ./configure
# LDAPLIBS="-Lfoo -lbar"
#
for MY_LDAPLIBS in ${LDAPLIBS+"$LDAPLIBS"} "-lldap" "-lldap -llber" "-lldap -llber -lresolv" "-lwldap32"; do
_ldap_save_libs=$LIBS
LIBS="$MY_LDAPLIBS $NETLIBS $LIBS"
{ echo "$as_me:$LINENO: checking whether LDAP via \"$MY_LDAPLIBS\" is present and sane" >&5
echo $ECHO_N "checking whether LDAP via \"$MY_LDAPLIBS\" is present and sane... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef _WIN32
#include <winsock2.h>
#include <winldap.h>
#else
#include <ldap.h>
#endif
int
main ()
{
ldap_open("foobar",1234);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
gnupg_cv_func_ldap_init=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
gnupg_cv_func_ldap_init=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $gnupg_cv_func_ldap_init" >&5
echo "${ECHO_T}$gnupg_cv_func_ldap_init" >&6; }
if test "$gnupg_cv_func_ldap_init" = yes ; then
LDAPLIBS=$MY_LDAPLIBS
have_ldap=yes
for ac_func in ldap_get_option ldap_set_option
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
#define $ac_func innocuous_$ac_func
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
#undef $ac_func
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
#endif
int
main ()
{
return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
# The extra test for ldap_start_tls_sA is for W32 because
# that is the actual function in the library.
for ac_func in ldap_start_tls_s ldap_start_tls_sA
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
#define $ac_func innocuous_$ac_func
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
#undef $ac_func
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
#endif
int
main ()
{
return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
if test "$ac_cv_func_ldap_get_option" != yes ; then
{ echo "$as_me:$LINENO: checking whether LDAP supports ld_errno" >&5
echo $ECHO_N "checking whether LDAP supports ld_errno... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ldap.h>
int
main ()
{
LDAP *ldap; ldap->ld_errno;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
gnupg_cv_func_ldap_ld_errno=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
gnupg_cv_func_ldap_ld_errno=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $gnupg_cv_func_ldap_ld_errno" >&5
echo "${ECHO_T}$gnupg_cv_func_ldap_ld_errno" >&6; }
if test "$gnupg_cv_func_ldap_ld_errno" = yes ; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_LDAP_LD_ERRNO 1
_ACEOF
fi
fi
fi
LIBS=$_ldap_save_libs
if test $have_ldap = yes ; then break; fi
done
Expand Down
4 changes: 2 additions & 2 deletions dirmngr-1.0.3/src/Makefile.in
Expand Up @@ -76,7 +76,7 @@ CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS)
PROGRAMS = $(bin_PROGRAMS)
am_dirmngr_OBJECTS = dirmngr.$(OBJEXT) server.$(OBJEXT) \
crlcache.$(OBJEXT) crlfetch.$(OBJEXT) ldapserver.$(OBJEXT) \
certcache.$(OBJEXT) b64dec.$(OBJEXT) cdblib.$(OBJEXT) \
Expand Down Expand Up @@ -592,7 +592,7 @@ install-data-am:

install-dvi: install-dvi-am

install-exec-am: install-binPROGRAMS install-libexecPROGRAMS
install-exec-am: install-binPROGRAMS

install-html: install-html-am

Expand Down
2 changes: 0 additions & 2 deletions rpm/dirmngr.spec
Expand Up @@ -12,7 +12,6 @@ BuildRequires: libassuan-devel >= 1.0.4
BuildRequires: libgpg-error-devel
BuildRequires: libksba-devel
BuildRequires: pth-devel
BuildRequires: openldap-devel

%description
A module that handles the Certificate Revocation Lists (CRLs)
Expand All @@ -38,5 +37,4 @@ rm -rf %{buildroot}%{_datadir}/man
%defattr(-,root,root,-)
%doc COPYING
%{_bindir}/*
%{_libexecdir}/*

0 comments on commit 2adda19

Please sign in to comment.