diff options
author | William A. Kennington III <william@wkennington.com> | 2015-01-09 15:01:01 -0800 |
---|---|---|
committer | William A. Kennington III <william@wkennington.com> | 2015-01-09 15:01:30 -0800 |
commit | db62c43a45bdff471ae886972c97f82b596d83b2 (patch) | |
tree | 8f3a2cc496fe75d38d8de7e6369efff59bc71465 /pkgs/servers/ldap | |
parent | d3940e05426718b698c71dbaa29f98d44da2782a (diff) |
389-ds-base: Fix perl scripts
Diffstat (limited to 'pkgs/servers/ldap')
-rw-r--r-- | pkgs/servers/ldap/389/default.nix | 25 | ||||
-rw-r--r-- | pkgs/servers/ldap/389/no-etc.patch | 12 | ||||
-rw-r--r-- | pkgs/servers/ldap/389/perl-path.patch | 34 |
3 files changed, 66 insertions, 5 deletions
diff --git a/pkgs/servers/ldap/389/default.nix b/pkgs/servers/ldap/389/default.nix index 658c35289be2..f2ed57b4eb7d 100644 --- a/pkgs/servers/ldap/389/default.nix +++ b/pkgs/servers/ldap/389/default.nix @@ -1,9 +1,11 @@ { stdenv, fetchurl, pkgconfig, perl, pam, nspr, nss, openldap, db, cyrus_sasl -, svrcore, icu, net_snmp, kerberos, pcre +, svrcore, icu, net_snmp, kerberos, pcre, perlPackages }: - +let + version = "1.3.3.5"; +in stdenv.mkDerivation rec { - name = "389-ds-base-1.3.3.5"; + name = "389-ds-base-${version}"; src = fetchurl { url = "http://directory.fedoraproject.org/binaries/${name}.tar.bz2"; @@ -13,9 +15,20 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig perl pam nspr nss openldap db cyrus_sasl svrcore icu net_snmp kerberos pcre - ]; + ] ++ (with perlPackages; [ MozillaLdap NetAddrIP DBFile ]); + + # TODO: Fix bin/ds-logpipe.py, bin/logconv, bin/cl-dump - patches = [ ./no-etc.patch ]; + patches = [ ./no-etc.patch ./perl-path.patch ]; + + preConfigure = '' + # Create perl paths for library imports in perl scripts + PERLPATH="" + for P in $(echo $PERL5LIB | sed 's/:/ /g'); do + PERLPATH="$PERLPATH $(echo $P/*/*)" + done + export PERLPATH + ''; configureFlags = [ "--sysconfdir=/etc" @@ -31,6 +44,8 @@ stdenv.mkDerivation rec { mkdir -p $out/lib/dirsrv ''; + passthru.version = version; + meta = with stdenv.lib; { homepage = https://directory.fedoraproject.org/; description = "enterprise-class Open Source LDAP server for Linux"; diff --git a/pkgs/servers/ldap/389/no-etc.patch b/pkgs/servers/ldap/389/no-etc.patch index c3dcd79363ea..a894ffd40056 100644 --- a/pkgs/servers/ldap/389/no-etc.patch +++ b/pkgs/servers/ldap/389/no-etc.patch @@ -1,3 +1,12 @@ +From bcdd781b01beba59b9f6993355732070b9487603 Mon Sep 17 00:00:00 2001 +From: "William A. Kennington III" <william@wkennington.com> +Date: Fri, 9 Jan 2015 14:51:46 -0800 +Subject: [PATCH 1/2] Makefile: Don't install files to /etc or /var + +--- + Makefile.in | 17 ++++++++--------- + 1 file changed, 8 insertions(+), 9 deletions(-) + diff --git a/Makefile.in b/Makefile.in index 24a9ddf..c97d1e1 100644 --- a/Makefile.in @@ -48,3 +57,6 @@ index 24a9ddf..c97d1e1 100644 install-taskSCRIPTS install-updateDATA install-updateSCRIPTS install-dvi: install-dvi-am +-- +2.1.4 + diff --git a/pkgs/servers/ldap/389/perl-path.patch b/pkgs/servers/ldap/389/perl-path.patch new file mode 100644 index 000000000000..73af83a9d6aa --- /dev/null +++ b/pkgs/servers/ldap/389/perl-path.patch @@ -0,0 +1,34 @@ +From 78a814e4d5e8708893b6ed8b673a4577abae05f4 Mon Sep 17 00:00:00 2001 +From: "William A. Kennington III" <william@wkennington.com> +Date: Fri, 9 Jan 2015 14:52:11 -0800 +Subject: [PATCH 2/2] Makefile: Add PERLPATH to perl files + +--- + Makefile.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index c97d1e1..763bf3b 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -2870,7 +2870,7 @@ rsearch_bin_LDADD = $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(LIBS + @BUNDLE_FALSE@ -e 's,@CONSOLE_VERSION\@,$(CONSOLE_VERSION),g' \ + @BUNDLE_FALSE@ -e 's,@BUILDNUM\@,$(BUILDNUM),g' \ + @BUNDLE_FALSE@ -e 's,@NQBUILD_NUM\@,$(NQBUILDNUM),g' \ +-@BUNDLE_FALSE@ -e 's,@perlpath\@,$(perldir),g' \ ++@BUNDLE_FALSE@ -e 's,@perlpath\@,$(perldir) $(PERLPATH),g' \ + @BUNDLE_FALSE@ -e 's,@defaultuser\@,$(defaultuser),g' \ + @BUNDLE_FALSE@ -e 's,@defaultgroup\@,$(defaultgroup),g' \ + @BUNDLE_FALSE@ -e 's,@with_fhs_opt\@,@with_fhs_opt@,g' \ +@@ -2947,7 +2947,7 @@ rsearch_bin_LDADD = $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(LIBS + @BUNDLE_TRUE@ -e 's,@CONSOLE_VERSION\@,$(CONSOLE_VERSION),g' \ + @BUNDLE_TRUE@ -e 's,@BUILDNUM\@,$(BUILDNUM),g' \ + @BUNDLE_TRUE@ -e 's,@NQBUILD_NUM\@,$(NQBUILDNUM),g' \ +-@BUNDLE_TRUE@ -e 's,@perlpath\@,$(perldir) $(libdir)/perl/arch $(libdir)/perl,g' \ ++@BUNDLE_TRUE@ -e 's,@perlpath\@,$(perldir) $(PERLPATH) $(libdir)/perl/arch $(libdir)/perl,g' \ + @BUNDLE_TRUE@ -e 's,@defaultuser\@,$(defaultuser),g' \ + @BUNDLE_TRUE@ -e 's,@defaultgroup\@,$(defaultgroup),g' \ + @BUNDLE_TRUE@ -e 's,@with_fhs_opt\@,@with_fhs_opt@,g' \ +-- +2.1.4 + |