rpms/phpldapadmin/devel phpldapadmin-0.9.7.1-config.patch, NONE, 1.1 phpldapadmin-0.9.7.1-namingcontexts.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 phpldapadmin.spec, 1.4, 1.5 sources, 1.2, 1.3 phpldapadmin-0.9.7-config.patch, 1.1, NONE phpldapadmin-0.9.7-namingcontexts.patch, 1.1, NONE

Dmitry Butskoy (buc) fedora-extras-commits at redhat.com
Tue Nov 1 16:36:13 UTC 2005


Author: buc

Update of /cvs/extras/rpms/phpldapadmin/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18278

Modified Files:
	.cvsignore phpldapadmin.spec sources 
Added Files:
	phpldapadmin-0.9.7.1-config.patch 
	phpldapadmin-0.9.7.1-namingcontexts.patch 
Removed Files:
	phpldapadmin-0.9.7-config.patch 
	phpldapadmin-0.9.7-namingcontexts.patch 
Log Message:


phpldapadmin-0.9.7.1-config.patch:

--- NEW FILE phpldapadmin-0.9.7.1-config.patch ---
diff -Nrbu phpldapadmin-0.9.7.1/config/config.php phpldapadmin-0.9.7.1-OK/config/config.php
--- phpldapadmin-0.9.7.1/config/config.php	2005-11-01 18:05:41.000000000 +0300
+++ phpldapadmin-0.9.7.1-OK/config/config.php	2005-11-01 18:05:06.000000000 +0300
@@ -21,6 +21,8 @@
  * as many as you like. You can also specify your language, and
  * many other options.
  */
+// $config->custom->appearance['language'] = 'en';
+// $config->custom->appearance['show_clear_password'] = true;
 
 /**                                         **/
 /** Miscellaneous Configuration overrides   **/
@@ -55,16 +57,16 @@
 
 /* A convenient name that will appear in the tree viewer and throughout phpLDAPadmin to
    identify this LDAP server to users. */
-$ldapservers->SetValue($i,'server','name','My LDAP Server');
+$ldapservers->SetValue($i,'server','name','Local LDAP Server');
 
 /* Examples:
    'ldap.example.com',
    'ldaps://ldap.example.com/',
    'ldapi://%2fusr%local%2fvar%2frun%2fldapi' (Unix socket at /usr/local/var/run/ldap) */
-// $ldapservers->SetValue($i,'server','host','127.0.0.1');
+$ldapservers->SetValue($i,'server','host','localhost');
 
 /* The port your LDAP server listens on (no quotes). 389 is standard. */
-// $ldapservers->SetValue($i,'server','port','389');
+$ldapservers->SetValue($i,'server','port','389');
 
 /* Array of base DNs of your LDAP server. Leave this blank to have phpLDAPadmin auto-detect it for you. */
 // $ldapservers->SetValue($i,'server','base',array(''));
@@ -80,7 +82,7 @@
    Choose wisely to protect your authentication information appropriately for your situation. If
    you choose 'cookie', your cookie contents will be encrypted using blowfish and the secret your specify
    above as session['blowfish']. */
-// $ldapservers->SetValue($i,'server','auth_type','cookie');
+$ldapservers->SetValue($i,'server','auth_type','session');
 
 /* The DN of the user for phpLDAPadmin to bind with. For anonymous binds or 'cookie' or 'session' auth_types,
    leave the login_dn and login_pass blank. If you specify a login_attr in conjunction with a cookie or
@@ -100,7 +102,7 @@
 
 /* Default password hashing algorithm. One of md5, ssha, sha, md5crpyt, smd5, blowfish, crypt or
    leave blank for now default algorithm. */
-// $ldapservers->SetValue($i,'appearance','password_hash','md5');
+$ldapservers->SetValue($i,'appearance','password_hash','');
 
 /* If you specified 'cookie' or 'session' as the auth_type above, you can optionally specify here an attribute
    to use when logging in. If you enter 'uid' and login as 'dsmith', phpLDAPadmin will search for (uid=dsmith)
@@ -108,7 +110,7 @@
    LDAP server requires you to login to perform searches, you can enter the DN to use when searching in 'login_dn'
    and 'login_pass' above. You may also specify 'string', in which case you can provide a string to use for
    logging users in. See 'login_string' directly below. */
-// $ldapservers->SetValue($i,'login','attr','uid');
+$ldapservers->SetValue($i,'login','attr','uid');
 
 /* If you specified 'cookie' or 'session' as the auth_type above, and you specified 'string' for 'login_attr'
    above, you must provide a string here for logging users in. If, for example, I have a lot of user entries with
@@ -192,7 +194,7 @@
 
 $i++;
 $ldapservers->SetValue($i,'server','name','LDAP Server');
-$ldapservers->SetValue($i,'server','host','127.0.0.1');
+$ldapservers->SetValue($i,'server','host','');
 $ldapservers->SetValue($i,'server','port','389');
 $ldapservers->SetValue($i,'server','base',array(''));
 $ldapservers->SetValue($i,'server','auth_type','cookie');

phpldapadmin-0.9.7.1-namingcontexts.patch:

--- NEW FILE phpldapadmin-0.9.7.1-namingcontexts.patch ---
diff -Nrbu phpldapadmin-0.9.7.1/lib/server_functions.php phpldapadmin-0.9.7.1-OK/lib/server_functions.php
--- phpldapadmin-0.9.7.1/lib/server_functions.php	2005-11-01 13:06:53.000000000 +0300
+++ phpldapadmin-0.9.7.1-OK/lib/server_functions.php	2005-11-01 18:01:32.000000000 +0300
@@ -357,6 +357,18 @@
 
 					return $this->_baseDN;
 
+				}
+				/*  There is a restriction in php-ldap versions <= 5.0.5 --
+				  @ldap_read treat an empty ('') base_dn argument as NULL base_dn.
+				  Because of this it is impossible to obtain namingcontexts when
+				  a default base is set in a system wide ldap-config file
+				  (i.e. /etc/openldap/ldap.conf), which is a typical case indeed...
+				  In such a situation @ldap_read returns this default base though, but
+				  as a value for "dn". Therefore we have a chance to ugly hacking here.
+				*/
+				else if( isset( $r[0]['dn'] ) ) {
+					$this->_baseDN = array ($r[0]['dn']);
+					return $this->_baseDN;
 				} else {
 					return array('');
 				}


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/phpldapadmin/devel/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .cvsignore	26 Sep 2005 21:52:07 -0000	1.2
+++ .cvsignore	1 Nov 2005 16:36:11 -0000	1.3
@@ -1 +1 @@
-phpldapadmin-0.9.7.tar.gz
+phpldapadmin-0.9.7.1.tar.gz


Index: phpldapadmin.spec
===================================================================
RCS file: /cvs/extras/rpms/phpldapadmin/devel/phpldapadmin.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- phpldapadmin.spec	27 Sep 2005 12:26:27 -0000	1.4
+++ phpldapadmin.spec	1 Nov 2005 16:36:11 -0000	1.5
@@ -1,24 +1,13 @@
-
 Name: phpldapadmin
 Summary: Web-based tool for managing LDAP servers
-Version: 0.9.7
-Release: 2
+Version: 0.9.7.1
+Release: 1
 Group: Applications/Internet
 License: GPL
 URL: http://phpldapadmin.sourceforge.net
 Source: http://dl.sourceforge.net/sourceforge/phpldapadmin/phpldapadmin-%{version}.tar.gz
-Source1: phpldapadmin-strip-debug.sh
-
-# cvs -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/phpldapadmin login 
-##Just type Enter as password
-# cvs -z3 -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/phpldapadmin co -P phpldapadmin
-# mv phpldapadmin phpldapadmin-YYYYMMDD
-# tar -cvf - phpldapadmiin-YYYYMMDD | gzip -c -9 >phpldapadmin-YYYYMMDD.tar.gz
-#
-#Source: %{name}-%{cvs}.tar.gz
-
-Patch1: phpldapadmin-0.9.7-namingcontexts.patch
-Patch2: phpldapadmin-0.9.7-config.patch
+Patch1: phpldapadmin-0.9.7.1-namingcontexts.patch
+Patch2: phpldapadmin-0.9.7.1-config.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
@@ -46,7 +35,7 @@
 %prep
 %setup -q -n %{name}-%{version}
 
-cp config.php.example config.php
+cp config/config.php.example config/config.php
 
 %patch1 -p1
 %patch2 -p1
@@ -54,46 +43,44 @@
 
 %build
 
-# remove all "debug_log()" calls
-find . -name "*.php" -exec sh %{SOURCE1} {} \; -print
-
-find . \( -name "*.orig" -o -name "*~" \) -print0 | xargs -0 rm -f
+find . \( -name "*.orig" -o -name "*~" -o -name .cvsignore \) -print0 | \
+								xargs -0 rm -f
+find . -type f -print0 | xargs -0 chmod -x
 
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-install -d -m755 $RPM_BUILD_ROOT/%{_datadir}/%{name}
-cp -a * $RPM_BUILD_ROOT/%{_datadir}/%{name}
+install -d -m755 $RPM_BUILD_ROOT%{_datadir}/%{name}
+cp -a * $RPM_BUILD_ROOT%{_datadir}/%{name}
 
-pushd $RPM_BUILD_ROOT/%{_datadir}/%{name}
-rm -rf doc/ INSTALL LICENSE VERSION .cvsignore
+pushd $RPM_BUILD_ROOT%{_datadir}/%{name}
+rm -rf doc/ INSTALL LICENSE VERSION
 popd
 
 
-install -d -m755 $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}
+install -d -m755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
 
-mv $RPM_BUILD_ROOT/%{_datadir}/%{name}/config.php \
-	$RPM_BUILD_ROOT/%{_sysconfdir}/%{name}
-ln -s ../../../..%{_sysconfdir}/%{name}/config.php \
-	$RPM_BUILD_ROOT/%{_datadir}/%{name}/config.php
-mv $RPM_BUILD_ROOT/%{_datadir}/%{name}/config.php.example \
-	$RPM_BUILD_ROOT/%{_sysconfdir}/%{name}
+mv $RPM_BUILD_ROOT%{_datadir}/%{name}/config/* \
+	$RPM_BUILD_ROOT%{_sysconfdir}/%{name}
+rmdir $RPM_BUILD_ROOT%{_datadir}/%{name}/config
+ln -s ../../../..%{_sysconfdir}/%{name} \
+	$RPM_BUILD_ROOT%{_datadir}/%{name}/config
 
-mv $RPM_BUILD_ROOT/%{_datadir}/%{name}/templates/template_config.php \
-	$RPM_BUILD_ROOT/%{_sysconfdir}/%{name}
+mv $RPM_BUILD_ROOT%{_datadir}/%{name}/templates/template_config.php \
+	$RPM_BUILD_ROOT%{_sysconfdir}/%{name}
 ln -s ../../../..%{_sysconfdir}/%{name}/template_config.php \
-	$RPM_BUILD_ROOT/%{_datadir}/%{name}/templates/template_config.php
+	$RPM_BUILD_ROOT%{_datadir}/%{name}/templates/template_config.php
 
 cat <<EOF >%{name}.conf
 #
 #  %{summary}
 #
 
-Alias /%{name} %{_datadir}/%{name}
-Alias /ldapadmin %{_datadir}/%{name}
+Alias /%{name} %{_datadir}/%{name}/htdocs
+Alias /ldapadmin %{_datadir}/%{name}/htdocs
 
-<Directory %{_datadir}/%{name}>
+<Directory %{_datadir}/%{name}/htdocs>
   Order Deny,Allow
   Deny from all
   Allow from 127.0.0.1
@@ -101,8 +88,8 @@
 
 EOF
 
-install -d $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d
-install -m644 %{name}.conf $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
+install -m644 %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
 
 
 %clean
@@ -120,13 +107,18 @@
 %defattr(-,root,root)
 %config %dir %{_sysconfdir}/%{name}
 %attr(640,root,apache) %config(noreplace) %{_sysconfdir}/%{name}/*.php
-%attr(640,root,apache) %{_sysconfdir}/%{name}/*.example
+%{_sysconfdir}/%{name}/*.example
 %config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf
 %{_datadir}/%{name}
-%doc INSTALL LICENSE doc/CREDITS doc/ChangeLog
+%doc INSTALL LICENSE doc/CREDITS doc/ChangeLog doc/hooks.sgml
 
 
 %changelog
+* Tue Nov  1 2005 Dmitry Butskoy <Dmitry at Butskoy.name> - 0.9.7.1-1
+- upgrade to 0.9.7.1
+- adapt patches and spec to new upstream layout.
+- don't strip debug anymore -- all seems to work fast enough now.
+
 * Tue Sep 27 2005 Dmitry Butskoy <Dmitry at Butskoy.name> - 0.9.7-2
 - patch cleanups.
 - accepted for Fedora Extras devel


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/phpldapadmin/devel/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources	26 Sep 2005 21:52:07 -0000	1.2
+++ sources	1 Nov 2005 16:36:11 -0000	1.3
@@ -1 +1 @@
-a9a6f8dd289210a3d732552d38eb2d25  phpldapadmin-0.9.7.tar.gz
+7491767e6a6c1166217472daa9b4c45c  phpldapadmin-0.9.7.1.tar.gz


--- phpldapadmin-0.9.7-config.patch DELETED ---


--- phpldapadmin-0.9.7-namingcontexts.patch DELETED ---




More information about the fedora-extras-commits mailing list