#11 FTBFS: Fix incompatible type errors
Opened 3 months ago by sgallagh. Modified 3 months ago
rpms/ sgallagh/openldap f40ftbfs  into  rawhide

@@ -0,0 +1,70 @@ 

+ From ffd24aaf5447302bca91d470652e284e5dc6811e Mon Sep 17 00:00:00 2001

+ From: Stephen Gallagher <sgallagh@redhat.com>

+ Date: Tue, 6 Feb 2024 21:38:24 -0500

+ Subject: [PATCH] Explicitly cast private values

+ 

+ Fixes issues with -Werror=incompatible-pointer-types

+ 

+ Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>

+ ---

+  servers/slapd/config.c              | 2 +-

+  servers/slapd/overlays/constraint.c | 2 +-

+  servers/slapd/overlays/dyngroup.c   | 2 +-

+  servers/slapd/overlays/valsort.c    | 2 +-

+  4 files changed, 4 insertions(+), 4 deletions(-)

+ 

+ diff --git a/servers/slapd/config.c b/servers/slapd/config.c

+ index 80333f359c6f3e2fc74ee643e8eda6647de46e54..987c862d917d6746edf285d26e657c3c204136dc 100644

+ --- a/servers/slapd/config.c

+ +++ b/servers/slapd/config.c

+ @@ -151,7 +151,7 @@ int config_check_vals(ConfigTable *Conf, ConfigArgs *c, int check_only ) {

+  	int rc, arg_user, arg_type, arg_syn, iarg;

+  	unsigned uiarg;

+  	long larg;

+ -	size_t ularg;

+ +	unsigned long ularg;

+  	ber_len_t barg;

+  	

+  	if(Conf->arg_type == ARG_IGNORED) {

+ diff --git a/servers/slapd/overlays/constraint.c b/servers/slapd/overlays/constraint.c

+ index f939b37762b947d82b917c0bde7af0c1afba1e42..0d6156af4d8ff63fd04f1a03c610c48556b36b92 100644

+ --- a/servers/slapd/overlays/constraint.c

+ +++ b/servers/slapd/overlays/constraint.c

+ @@ -557,7 +557,7 @@ done:;

+  				a2->restrict_filter = ap.restrict_filter;

+  				a2->restrict_val = ap.restrict_val;

+  

+ -				for ( app = &on->on_bi.bi_private; *app; app = &(*app)->ap_next )

+ +				for ( app = (constraint **)&on->on_bi.bi_private; *app; app = &(*app)->ap_next )

+  					/* Get to the end */ ;

+  

+  				a2->ap_next = *app;

+ diff --git a/servers/slapd/overlays/dyngroup.c b/servers/slapd/overlays/dyngroup.c

+ index 5d890d66503287c683c548f5afd23f9173faab5a..e0e70af2d91e8ad1d98c10f7888427e9bc0f39cd 100644

+ --- a/servers/slapd/overlays/dyngroup.c

+ +++ b/servers/slapd/overlays/dyngroup.c

+ @@ -111,7 +111,7 @@ static int dgroup_cf( ConfigArgs *c )

+  		 */

+  		a2 = ch_malloc( sizeof(adpair) );

+  

+ -		for ( app = &on->on_bi.bi_private; *app; app = &(*app)->ap_next )

+ +		for ( app = (adpair **)&on->on_bi.bi_private; *app; app = &(*app)->ap_next )

+  			/* Get to the end */ ;

+  

+  		a2->ap_mem = ap.ap_mem;

+ diff --git a/servers/slapd/overlays/valsort.c b/servers/slapd/overlays/valsort.c

+ index 3d998e2fcb6cb7cc5d1e1dbbdeef20c949ff5350..e251500d0b89b49009200e482ca822d6a3d68281 100644

+ --- a/servers/slapd/overlays/valsort.c

+ +++ b/servers/slapd/overlays/valsort.c

+ @@ -201,7 +201,7 @@ valsort_cf_func(ConfigArgs *c) {

+  		return(1);

+  	}

+  

+ -	for ( vip = &on->on_bi.bi_private; *vip; vip = &(*vip)->vi_next )

+ +	for ( vip = (valsort_info **)&on->on_bi.bi_private; *vip; vip = &(*vip)->vi_next )

+  		/* Get to the end */ ;

+  

+  	vi = ch_malloc( sizeof(valsort_info) );

+ -- 

+ 2.43.0

+ 

@@ -0,0 +1,51 @@ 

+ From de89b06b031537fb2d14a532d79f7b0772fc1700 Mon Sep 17 00:00:00 2001

+ From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= <ondra@mistotebe.net>

+ Date: Thu, 27 Jul 2023 11:19:20 +0100

+ Subject: [PATCH] ITS#10074 Fix type mismatches in lloadd

+ 

+ ---

+  servers/lloadd/libevent_support.c | 8 +++++++-

+  servers/lloadd/module_init.c      | 1 -

+  2 files changed, 7 insertions(+), 2 deletions(-)

+ 

+ diff --git a/servers/lloadd/libevent_support.c b/servers/lloadd/libevent_support.c

+ index 252980bfeaeec4034aa1a319b54e0557a202ec96..79e7845adb246dbcd2f025eba11bb69ba1b2f67b 100644

+ --- a/servers/lloadd/libevent_support.c

+ +++ b/servers/lloadd/libevent_support.c

+ @@ -131,6 +131,12 @@ lload_libevent_cond_timedwait(

+      return ldap_pvt_thread_cond_wait( cond, mutex );

+  }

+  

+ +unsigned long

+ +lload_libevent_thread_self( void )

+ +{

+ +    return (unsigned long)ldap_pvt_thread_self();

+ +}

+ +

+  int

+  lload_libevent_init( void )

+  {

+ @@ -152,7 +158,7 @@ lload_libevent_init( void )

+  

+      evthread_set_lock_callbacks( &cbs );

+      evthread_set_condition_callbacks( &cond_cbs );

+ -    evthread_set_id_callback( ldap_pvt_thread_self );

+ +    evthread_set_id_callback( lload_libevent_thread_self );

+      return 0;

+  }

+  

+ diff --git a/servers/lloadd/module_init.c b/servers/lloadd/module_init.c

+ index 19323c73132ffa4f38ed40fdb2cc383cf6afcda8..a122a529625bf15d766a60df0c1bf6c00dfb542f 100644

+ --- a/servers/lloadd/module_init.c

+ +++ b/servers/lloadd/module_init.c

+ @@ -151,7 +151,6 @@ lload_back_initialize( BackendInfo *bi )

+  {

+      bi->bi_flags = SLAP_BFLAG_STANDALONE;

+      bi->bi_open = lload_back_open;

+ -    bi->bi_config = config_generic_wrapper;

+      bi->bi_pause = lload_pause_cb;

+      bi->bi_unpause = lload_unpause_cb;

+      bi->bi_close = lload_back_close;

+ -- 

+ 2.43.0

+ 

file modified
+15 -1
@@ -14,7 +14,7 @@ 

  

  Name: openldap

  Version: 2.6.6

- Release: 3%{?dist}

+ Release: 4%{?dist}

  Summary: LDAP support libraries

  License: OpenLDAP

  URL: http://www.openldap.org/
@@ -51,6 +51,14 @@ 

  Patch90: check-password-makefile.patch

  Patch91: check-password.patch

  

+ # Fix incompatible pointer type error by casting from private

+ # data

+ Patch10: 0001-Explicitly-cast-private-values.patch

+ 

+ # Upstream patch fixing type errors:

+ # https://git.openldap.org/openldap/openldap/-/commit/de89b06b031537fb2d14a532d79f7b0772fc1700

+ Patch11: 0001-ITS-10074-Fix-type-mismatches-in-lloadd.patch

+ 

  BuildRequires: cyrus-sasl-devel

  BuildRequires: gcc

  BuildRequires: glibc-devel
@@ -154,6 +162,8 @@ 

  %patch6 -p1

  %patch7 -p1

  %patch8 -p1

+ %patch10 -p1

+ %patch11 -p1

  

  # build smbk5pwd with other overlays

  ln -s ../../../contrib/slapd-modules/smbk5pwd/smbk5pwd.c servers/slapd/overlays
@@ -504,6 +514,10 @@ 

  %{_libdir}/libslapi-2.4*.so.*

  

  %changelog

+ * Tue Feb 06 2024 Stephen Gallagher <sgallagh@redhat.com> - 2.6.6-4

+ - Fix incompatible type errors

+ - Resolves: rhbz#2261427

+ 

  * Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.6-3

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

  

Resolves: rhbz#2261427
Signed-off-by: Stephen Gallagher sgallagh@redhat.com

@sgallagh Have you submitted your own patch upstream?

I attempted it, but git.openldap.org (OpenLDAP Gitlab) does not support self-registration and will only accept registration attempts from known contributors. As such, I'm hoping the Fedora maintainer will take the patch upstream for me, since I'm having no luck.

@sgallagh the scratch build failed on i686

@sgallagh the scratch build failed on i686

Thanks, I'll fix that up too.

@sgallagh Have you submitted your own patch upstream?

They actually just responded and granted me access to the Gitlab, so I'll get it submitted there as well.

rebased onto 763db67

3 months ago

I've fixed the i686 issue, updated this branch and submitted the patch to upstream at https://git.openldap.org/openldap/openldap/-/merge_requests/683

ping @spichugi

pong.
I monitor the issue, and I'll be ready to make a new build when Upstream accepts it.

Or do you need anything else from me?

@sgallagh thank you for the fix, BTW! Much appreciated.

Fedora 40 and RHEL 10 branching is on Tuesday, so we're looking for a fixed build in rawhide by Monday. Will this land in time?

Fedora 40 and RHEL 10 branching is on Tuesday, so we're looking for a fixed build in rawhide by Monday. Will this land in time?

Yes, I'll do the F40 build tomorrow using the patch as it is if it still won't be accepted by Upstream. I checked it, and the fix looks good to me.