[Freeipa-devel] [PATCH] Debian client support

Lukas Slebodnik lslebodn at redhat.com
Thu Nov 28 20:26:18 UTC 2013


On (05/09/13 23:25), Lukas Slebodnik wrote:
>On (03/09/13 00:43), Timo Aaltonen wrote:
>>
>>This fixes https://fedorahosted.org/freeipa/ticket/1887
>>and
>>https://fedorahosted.org/freeipa/ticket/2455
>>
>>the first three patches fix some bugs in how python is used
>>fourth patch checks if dbus is already running before trying to start it
>>fifth fixes some compilation warnings
>>sixth finally adds the Debian platform module
>>
>>
>>
>>there are also distro patches that aren't upstreamable as-is, that do
>>stuff like
>>- give--install-layout=deb to setup.py
>>- disable make-testcert since it needs a server running
>>- fix hardcoded NFS related paths and a variable in ipa-client-automount
>>- fix ldap.conf path in ipa-client-install
>>- fix ntpdate options in ntpconf.py (Debian doesn't patch ntpdate like
>>Fedora)
>>- change nss includes in ipa_pwd.c (<nss/..> not <nss3/..>)
>Solution is simple. Use pkg-config generated NSS_CFLAGS
>
>bash$ pkg-config --cflags nss
>-I/usr/include/nss -I/usr/include/nspr
>bash$ uname -a
>Linux positron 3.10-2-686-pae #1 SMP Debian 3.10.5-1 (2013-08-07) i686 GNU/Linux
>
>bash$pkg-config --cflags nss
>-I/usr/include/nss3 -I/usr/include/nspr4
>bash$uname -a
>Linux unused-4-233.brq.redhat.com 3.10.10-200.fc19.x86_64 #1 SMP Thu Aug 29 19:05:45 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
>
>It works in sssd. I can send a patch.
>
>LS
>
Attached patch should fix problem with compilation on different distros.

debian:
http://anonscm.debian.org/gitweb/?p=pkg-freeipa/freeipa.git;a=blob;f=debian/patches/fix-nss-include.diff;h=1dac0709ed7344c7546c55225365c9434e6a930a;hb=HEAD
arch:
https://github.com/chenxiaolong/ArchLinux-Packages/blob/master/freeipa/0006_Fix_nss_includes.patch

Timo can you test patch on debian/ubuntu?

LS
-------------- next part --------------
>From 2d9e290970e71d373b91cd0cd1db52b991636889 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Thu, 28 Nov 2013 15:32:07 +0100
Subject: [PATCH] BUILD: Fix portability of NSS in file ipa_pwd.c

---
 daemons/ipa-kdb/Makefile.am                         | 4 +++-
 daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am | 1 +
 util/ipa_pwd.c                                      | 8 ++++----
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/daemons/ipa-kdb/Makefile.am b/daemons/ipa-kdb/Makefile.am
index dc543dd..b3d6a1b 100644
--- a/daemons/ipa-kdb/Makefile.am
+++ b/daemons/ipa-kdb/Makefile.am
@@ -21,6 +21,7 @@ AM_CPPFLAGS =						\
 	$(KRB5_CFLAGS)					\
 	$(WARN_CFLAGS)					\
 	$(NDRPAC_CFLAGS)				\
+	$(NSS_CFLAGS)					\
 	$(NULL)
 
 plugindir = $(libdir)/krb5/plugins/kdb
@@ -51,6 +52,7 @@ ipadb_la_LIBADD = 		\
 	$(LDAP_LIBS)		\
 	$(NDRPAC_LIBS)		\
 	$(UNISTRING_LIBS)	\
+	$(NSS_LIBS)             \
 	$(NULL)
 
 if HAVE_CHECK
@@ -77,7 +79,7 @@ ipa_kdb_tests_LDADD =          \
        $(KRB5_LIBS)            \
        $(LDAP_LIBS)            \
        $(NDRPAC_LIBS)          \
-       -lnss3                  \
+       $(NSS_LIBS)             \
        -lkdb5                  \
        -lsss_idmap             \
        $(NULL)
diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am b/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am
index b53b2e1..3323d72 100644
--- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am
+++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am
@@ -22,6 +22,7 @@ AM_CPPFLAGS =							\
 	$(LDAP_CFLAGS)					\
 	$(KRB5_CFLAGS)						\
 	$(SSL_CFLAGS)						\
+	$(NSS_CFLAGS)						\
 	$(WARN_CFLAGS)						\
 	$(NULL)
 	
diff --git a/util/ipa_pwd.c b/util/ipa_pwd.c
index 761d1ef..f6564c8 100644
--- a/util/ipa_pwd.c
+++ b/util/ipa_pwd.c
@@ -27,10 +27,10 @@
 #include <stdio.h>
 #include <time.h>
 #include <ctype.h>
-#include <nss3/nss.h>
-#include <nss3/nssb64.h>
-#include <nss3/hasht.h>
-#include <nss3/pk11pub.h>
+#include <nss.h>
+#include <nssb64.h>
+#include <hasht.h>
+#include <pk11pub.h>
 #include <errno.h>
 #include "ipa_pwd.h"
 
-- 
1.8.4.2



More information about the Freeipa-devel mailing list