checked in
OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=20
This commit is contained in:
parent
66d5d81e65
commit
86c70f2730
@ -1,9 +1,3 @@
|
|||||||
-------------------------------------------------------------------
|
|
||||||
Mon Sep 28 13:59:18 UTC 2009 - rhafer@novell.com
|
|
||||||
|
|
||||||
- Added schema2ldif tool to openldap2-client subpackage
|
|
||||||
(bnc#541819)
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Sep 23 15:35:13 UTC 2009 - rhafer@novell.com
|
Wed Sep 23 15:35:13 UTC 2009 - rhafer@novell.com
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package openldap2 (Version 2.4.17)
|
# spec file for package openldap2-client (Version 2.4.17)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
@ -50,7 +50,6 @@ Source2: addonschema.tar.gz
|
|||||||
Source3: DB_CONFIG
|
Source3: DB_CONFIG
|
||||||
Source4: sasl-slapd.conf
|
Source4: sasl-slapd.conf
|
||||||
Source5: README.update
|
Source5: README.update
|
||||||
Source6: schema2ldif
|
|
||||||
Source100: openldap-2.3.37.tar.bz2
|
Source100: openldap-2.3.37.tar.bz2
|
||||||
Patch: openldap2.dif
|
Patch: openldap2.dif
|
||||||
Patch2: slapd_conf.dif
|
Patch2: slapd_conf.dif
|
||||||
@ -288,7 +287,6 @@ install -m 755 -d $RPM_BUILD_ROOT/var/lib/ldap
|
|||||||
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/liblber.so*
|
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/liblber.so*
|
||||||
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/libldap_r.so*
|
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/libldap_r.so*
|
||||||
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/libldap.so*
|
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/libldap.so*
|
||||||
install -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/sbin/schema2ldif
|
|
||||||
%if "%{name}" == "openldap2"
|
%if "%{name}" == "openldap2"
|
||||||
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
|
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
|
||||||
install -m 644 sysconfig.openldap $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.openldap
|
install -m 644 sysconfig.openldap $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.openldap
|
||||||
@ -369,7 +367,6 @@ cat > openldap2-client.filelist <<EOF
|
|||||||
/usr/bin/ldappasswd
|
/usr/bin/ldappasswd
|
||||||
/usr/bin/ldapurl
|
/usr/bin/ldapurl
|
||||||
/usr/bin/ldapwhoami
|
/usr/bin/ldapwhoami
|
||||||
/usr/sbin/schema2ldif
|
|
||||||
%doc %{_mandir}/man1/ldap*
|
%doc %{_mandir}/man1/ldap*
|
||||||
%doc %{_mandir}/man5/ldap.conf*
|
%doc %{_mandir}/man5/ldap.conf*
|
||||||
%doc %{_mandir}/man5/ldif.*
|
%doc %{_mandir}/man5/ldif.*
|
||||||
|
@ -1,9 +1,3 @@
|
|||||||
-------------------------------------------------------------------
|
|
||||||
Mon Sep 28 13:59:18 UTC 2009 - rhafer@novell.com
|
|
||||||
|
|
||||||
- Added schema2ldif tool to openldap2-client subpackage
|
|
||||||
(bnc#541819)
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Sep 23 15:35:13 UTC 2009 - rhafer@novell.com
|
Wed Sep 23 15:35:13 UTC 2009 - rhafer@novell.com
|
||||||
|
|
||||||
|
@ -50,7 +50,6 @@ Source2: addonschema.tar.gz
|
|||||||
Source3: DB_CONFIG
|
Source3: DB_CONFIG
|
||||||
Source4: sasl-slapd.conf
|
Source4: sasl-slapd.conf
|
||||||
Source5: README.update
|
Source5: README.update
|
||||||
Source6: schema2ldif
|
|
||||||
Source100: openldap-2.3.37.tar.bz2
|
Source100: openldap-2.3.37.tar.bz2
|
||||||
Patch: openldap2.dif
|
Patch: openldap2.dif
|
||||||
Patch2: slapd_conf.dif
|
Patch2: slapd_conf.dif
|
||||||
@ -288,7 +287,6 @@ install -m 755 -d $RPM_BUILD_ROOT/var/lib/ldap
|
|||||||
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/liblber.so*
|
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/liblber.so*
|
||||||
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/libldap_r.so*
|
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/libldap_r.so*
|
||||||
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/libldap.so*
|
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/libldap.so*
|
||||||
install -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/sbin/schema2ldif
|
|
||||||
%if "%{name}" == "openldap2"
|
%if "%{name}" == "openldap2"
|
||||||
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
|
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
|
||||||
install -m 644 sysconfig.openldap $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.openldap
|
install -m 644 sysconfig.openldap $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.openldap
|
||||||
@ -369,7 +367,6 @@ cat > openldap2-client.filelist <<EOF
|
|||||||
/usr/bin/ldappasswd
|
/usr/bin/ldappasswd
|
||||||
/usr/bin/ldapurl
|
/usr/bin/ldapurl
|
||||||
/usr/bin/ldapwhoami
|
/usr/bin/ldapwhoami
|
||||||
/usr/sbin/schema2ldif
|
|
||||||
%doc %{_mandir}/man1/ldap*
|
%doc %{_mandir}/man1/ldap*
|
||||||
%doc %{_mandir}/man5/ldap.conf*
|
%doc %{_mandir}/man5/ldap.conf*
|
||||||
%doc %{_mandir}/man5/ldif.*
|
%doc %{_mandir}/man5/ldif.*
|
||||||
|
52
schema2ldif
52
schema2ldif
@ -1,52 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# This is a simple tool to convert OpenLDAP Schema files to
|
|
||||||
# LDIF suitable for usage with OpenLDAP's dynamic configuration
|
|
||||||
# backend (cn=config)
|
|
||||||
#
|
|
||||||
# usage:
|
|
||||||
# schema2ldif <input file>
|
|
||||||
#
|
|
||||||
# The generated LDIF is printed to stdout.
|
|
||||||
#
|
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
echo 'usage: schema2ldif <input file>'
|
|
||||||
exit;
|
|
||||||
fi
|
|
||||||
|
|
||||||
cn=`basename $1 .schema`
|
|
||||||
|
|
||||||
echo "dn: cn=$cn,cn=schema,cn=config";
|
|
||||||
echo "objectclass: olcSchemaConfig";
|
|
||||||
echo "cn: $cn";
|
|
||||||
|
|
||||||
/usr/bin/awk '
|
|
||||||
BEGIN {
|
|
||||||
buffer = "";
|
|
||||||
width=78 ;
|
|
||||||
}
|
|
||||||
function wrap(data)
|
|
||||||
{
|
|
||||||
if (length(data) > 0) {
|
|
||||||
do {
|
|
||||||
print substr(data,0,width);
|
|
||||||
data = " " substr(data, width+1);
|
|
||||||
}
|
|
||||||
while (length(data) > 1 )
|
|
||||||
};
|
|
||||||
}
|
|
||||||
/^[\t ]*$/ {wrap(buffer); buffer=""; print "#"; next; }
|
|
||||||
/^#.*$/ { wrap(buffer); buffer=""; print $0; next }
|
|
||||||
/^[\t ]+/ { gsub("^[\t ]+",""); buffer = buffer " " $0; next; }
|
|
||||||
{
|
|
||||||
wrap(buffer);
|
|
||||||
$1 = tolower($1) ;
|
|
||||||
gsub("^objectclass$","olcObjectclasses:",$1)
|
|
||||||
gsub("^attributetype$","olcAttributeTypes:",$1)
|
|
||||||
gsub("^objectidentifier$","olcObjectIdentifier:",$1)
|
|
||||||
buffer = $0;
|
|
||||||
}
|
|
||||||
END { wrap(buffer); print "" }
|
|
||||||
' "$@"
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user