diff --git a/dev-python/ldaptor/ChangeLog b/dev-python/ldaptor/ChangeLog new file mode 100644 index 0000000..ef46e6c --- /dev/null +++ b/dev-python/ldaptor/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for dev-python/ldaptor +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + +*ldaptor-0.0.43 (17 Oct 2015) + + 17 Oct 2015; Mario Fetka + +files/ldaptor-0.0.43-usage-exception.patch, + +files/ldaptor-0.0.43-zope_interface.patch, +files/ldaptor-prem_test.patch, + +ldaptor-0.0.43.ebuild: + Intial commit of the droped beuild -docs diff --git a/dev-python/ldaptor/Manifest b/dev-python/ldaptor/Manifest new file mode 100644 index 0000000..e97fdae --- /dev/null +++ b/dev-python/ldaptor/Manifest @@ -0,0 +1,6 @@ +AUX ldaptor-0.0.43-usage-exception.patch 473 SHA256 13d07200f908b3428dc4e4095614cf3f6332140d4b9861f04e59b04d1fcdee57 SHA512 865cb73ded7bdb72d780d53aca0a068a208e3c646f4d0a0aebd3edede4d7f0d638459a6edba0a01cce74d810af366faf5234fb61098896cc0fe57ad70559f8e7 WHIRLPOOL 9541e41ecb8338f9c9803bf2653cea677867281549b34f3424d435bf9288ea08d49ff87bbf34bea077f15302c86c3499f64ee7ff513255f2e2289d5f0cdfacc5 +AUX ldaptor-0.0.43-zope_interface.patch 2626 SHA256 bcbc0eb57e3901ecf612f86f0bbc5670bf58c113ab0830db26b043516fd8ebda SHA512 02a43d9d1a153162271cb36df7d5cf88da7c60fea087854b010a21bde74572e84a88bbf925a93c5bf2e735c5af8cd8f1468ed42ed0b1cdcf4bd07a246300a9fd WHIRLPOOL c7867fed34a9134089c32d84c2bb52df000539a2a4a5f76219c053af9fb77660ea98315dba160ce609d64d4b008407fa30ce02702ace1cffb906d77786d0d125 +AUX ldaptor-prem_test.patch 2581 SHA256 a66bb6fcca4eef2e05222669cac234433223ead34377646108a40aa60a71bbf4 SHA512 69aec81d460259312a8227dff5a8dca58570d959925fc992d1439e282d6b2f1fddf5fb5827e1ee31460e855cb244d481b77ba102c9e821e9b798bd64f5102fae WHIRLPOOL 4a4e81f5915ebf28537e5299b361ce4699145bd0a4a6cfe6cf0aae5af4e7f21ea0edb46bc0a20271eb86d7b43f78bbc038b76ee4eb3a451c30ceede7cd53ea3d +DIST python-ldaptor-0.0.43-16.1.src.rpm 393409 SHA256 85d133a90649edea740ddc3aa7b758166e2e66aae196f7774eb02b86f2638a6c SHA512 ef7b4b414c1a48704f892145fbec256e0d790dcfad376272ec805019059092fdd3fde612df73be1c0b9992a7fa8b478f530b9bfb797b13b1716cd362ea02ff7b WHIRLPOOL a1aabf691eb49af76b545e7851594d06fd4b516e066d75b91d4c7a644741b0ab94127fdd9aa7ffef611bd3964764bca60129f74ebba11a17115827cb8f218021 +EBUILD ldaptor-0.0.43.ebuild 2394 SHA256 9a74b6441d7d9831d6a798b2bf0045b694d4cc390772909643ef4f8f3033f249 SHA512 096104842cf653a384f10a3072473f32037bac201e73ea77abad8ea6a85af6087cc304bdf7b2ef03884f5206e6808dc7dcae7a9d2862d231ccda962c0064028c WHIRLPOOL 1d3902f7d0faa42ab3bf96bf66eecc8e6e11a3c37540f3b6e5604c6819469327b12abfc1a4e1f639404e5b45d866f4b115c023a0b4d9eb679c800ea721ac65fb +MISC ChangeLog 395 SHA256 ee94fb4494c22b0eb4c7f115629cb3e35f369f1d285fea463e98e2bc61b407b6 SHA512 3ee7c937f90ba684919bb9447085ad04a654f0a3646334349023b3b2c323a39cb6f297c6be0081086f368e5ec6b3f6cc48945f952bef4c30d2231bb1dabccf89 WHIRLPOOL cdf325340c5f5b71387b699bd6efdc10e5b263f8417671764839d987f348036a85b91779869440e6f829136eb030e8b49e7148bd2e8d3853f6d8aae42520985b diff --git a/dev-python/ldaptor/files/ldaptor-0.0.43-usage-exception.patch b/dev-python/ldaptor/files/ldaptor-0.0.43-usage-exception.patch new file mode 100644 index 0000000..63e3d8f --- /dev/null +++ b/dev-python/ldaptor/files/ldaptor-0.0.43-usage-exception.patch @@ -0,0 +1,13 @@ +diff -uNtr ldaptor-0.0.43.orig/ldaptor/usage.py ldaptor-0.0.43/ldaptor/usage.py +--- ldaptor-0.0.43.orig/ldaptor/usage.py 2008-08-20 12:38:44.000000000 -0430 ++++ ldaptor-0.0.43/ldaptor/usage.py 2008-08-20 20:02:14.000000000 -0430 +@@ -2,6 +2,9 @@ + from ldaptor.protocols import pureldap + from ldaptor.protocols.ldap import distinguishedname + ++class UsageError(usage.UsageError): ++ pass ++ + class Options(usage.Options): + optParameters = () + def postOptions(self): diff --git a/dev-python/ldaptor/files/ldaptor-0.0.43-zope_interface.patch b/dev-python/ldaptor/files/ldaptor-0.0.43-zope_interface.patch new file mode 100644 index 0000000..b9c8e78 --- /dev/null +++ b/dev-python/ldaptor/files/ldaptor-0.0.43-zope_interface.patch @@ -0,0 +1,71 @@ +diff -uNtr ldaptor-0.0.43.orig/ldaptor/apps/webui/iwebui.py ldaptor-0.0.43/ldaptor/apps/webui/iwebui.py +--- ldaptor-0.0.43.orig/ldaptor/apps/webui/iwebui.py 2008-08-20 12:38:44.000000000 -0430 ++++ ldaptor-0.0.43/ldaptor/apps/webui/iwebui.py 2008-08-20 12:44:53.000000000 -0430 +@@ -1,4 +1,4 @@ +-from twisted.python import components ++from zope import interface + +-class ICurrentDN(components.Interface): ++class ICurrentDN(interface.Interface): + """Marker interface for current DN for Ldaptor-webui.""" +diff -uNtr ldaptor-0.0.43.orig/ldaptor/apps/webui/search.py ldaptor-0.0.43/ldaptor/apps/webui/search.py +--- ldaptor-0.0.43.orig/ldaptor/apps/webui/search.py 2008-08-20 12:38:44.000000000 -0430 ++++ ldaptor-0.0.43/ldaptor/apps/webui/search.py 2008-08-20 12:37:42.000000000 -0430 +@@ -1,6 +1,7 @@ + from zope.interface import implements + from twisted.internet import defer +-from twisted.python import components ++#from twisted.python import components ++from zope import interface + from webut.skin import iskin + from ldaptor.protocols.ldap import ldapclient, ldapsyntax + from ldaptor.protocols.ldap import distinguishedname, ldapconnector +@@ -17,7 +18,7 @@ + from nevow import rend, inevow, loaders, url, tags + from formless import annotate, webform, iformless, configurable + +-class IMove(components.Interface): ++class IMove(interface.Interface): + """Entries being moved in the tree.""" + pass + +diff -uNtr ldaptor-0.0.43.orig/ldaptor/interfaces.py ldaptor-0.0.43/ldaptor/interfaces.py +--- ldaptor-0.0.43.orig/ldaptor/interfaces.py 2008-08-20 12:38:44.000000000 -0430 ++++ ldaptor-0.0.43/ldaptor/interfaces.py 2008-08-20 12:38:19.000000000 -0430 +@@ -1,6 +1,7 @@ +-from twisted.python import components ++#from twisted.python import interface ++from zope import interface + +-class ILDAPEntry(components.Interface): ++class ILDAPEntry(interface.Interface): + """ + + Pythonic API for LDAP object access and modification. +@@ -126,7 +127,7 @@ + incorrect. + """ + +-class IEditableLDAPEntry(components.Interface): ++class IEditableLDAPEntry(interface.Interface): + """Interface definition for editable LDAP entries.""" + + def __setitem__(self, key, value): +@@ -206,7 +207,7 @@ + + """ + +-class IConnectedLDAPEntry(components.Interface): ++class IConnectedLDAPEntry(interface.Interface): + """Interface definition for LDAP entries that are part of a bigger whole.""" + + def namingContext(self): +@@ -334,7 +335,7 @@ + + """ + +-class ILDAPConfig(components.Interface): ++class ILDAPConfig(interface.Interface): + """Generic LDAP configuration retrieval.""" + + def getBaseDN(self): diff --git a/dev-python/ldaptor/files/ldaptor-prem_test.patch b/dev-python/ldaptor/files/ldaptor-prem_test.patch new file mode 100644 index 0000000..ce6746b --- /dev/null +++ b/dev-python/ldaptor/files/ldaptor-prem_test.patch @@ -0,0 +1,59 @@ +diff -ur ldaptor-0.0.43.orig/ldaptor/test/test_server.py ldaptor-0.0.43/ldaptor/test/test_server.py +--- ldaptor/test/test_server.py 2006-01-25 19:37:57.000000000 +0800 ++++ ldaptor/test/test_server.py 2013-01-27 14:05:07.998485642 +0800 +@@ -379,31 +379,31 @@ + ]) + return d + +- def test_modifyDN_rdnOnly_noDeleteOldRDN_success(self): +- newrdn = 'cn=thingamagic' +- self.server.dataReceived(str(pureldap.LDAPMessage( +- pureldap.LDAPModifyDNRequest(entry=self.thingie.dn, +- newrdn=newrdn, +- deleteoldrdn=False), +- id=2))) +- self.assertEquals(self.server.transport.value(), +- str(pureldap.LDAPMessage( +- pureldap.LDAPModifyDNResponse( +- resultCode=ldaperrors.Success.resultCode), +- id=2)), +- ) ++# def test_modifyDN_rdnOnly_noDeleteOldRDN_success(self): ++# newrdn = 'cn=thingamagic' ++# self.server.dataReceived(str(pureldap.LDAPMessage( ++# pureldap.LDAPModifyDNRequest(entry=self.thingie.dn, ++# newrdn=newrdn, ++# deleteoldrdn=False), ++# id=2))) ++# self.assertEquals(self.server.transport.value(), ++# str(pureldap.LDAPMessage( ++# pureldap.LDAPModifyDNResponse( ++# resultCode=ldaperrors.Success.resultCode), ++# id=2)), ++# ) + # tree changed +- d = self.stuff.children() +- d.addCallback(self.assertEquals, sets.Set([ +- self.another, +- inmemory.ReadOnlyInMemoryLDAPEntry( +- '%s,ou=stuff,dc=example,dc=com' % newrdn, +- {'objectClass': ['a', 'b'], +- 'cn': ['thingamagic', 'thingie']}), +- ])) +- return d +- test_modifyDN_rdnOnly_noDeleteOldRDN_success.todo = 'Not supported yet.' +- ++# d = self.stuff.children() ++# d.addCallback(self.assertEquals, sets.Set([ ++# self.another, ++# inmemory.ReadOnlyInMemoryLDAPEntry( ++# '%s,ou=stuff,dc=example,dc=com' % newrdn, ++# {'objectClass': ['a', 'b'], ++# 'cn': ['thingamagic', 'thingie']}), ++# ])) ++# return d ++# test_modifyDN_rdnOnly_noDeleteOldRDN_success.todo = 'Not supported yet.' ++# + def test_modify(self): + self.server.dataReceived(str(pureldap.LDAPMessage( + pureldap.LDAPModifyRequest(self.stuff.dn, diff --git a/dev-python/ldaptor/ldaptor-0.0.43.ebuild b/dev-python/ldaptor/ldaptor-0.0.43.ebuild new file mode 100644 index 0000000..1d5d0b4 --- /dev/null +++ b/dev-python/ldaptor/ldaptor-0.0.43.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/ldaptor/Attic/ldaptor-0.0.43.ebuild,v 1.21 2015/03/24 02:49:38 idella4 dead $ + +EAPI="4" +PYTHON_DEPEND="2:2.6" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3.* 2.5 *-jython 2.7-pypy-*" # pypy fails several tests +DISTUTILS_SRC_TEST="trial" +DISTUTILS_DISABLE_TEST_DEPENDENCY="1" + +inherit distutils eutils rpm + +RPM_VER="16.1" +OPSI="opsi40" +SUSE="openSUSE_13.2" + +DESCRIPTION="set of LDAP utilities for use from the command line" +HOMEPAGE="http://www.inoi.fi/open/trac/ldaptor" +SRC_URI="http://download.opensuse.org/repositories/home:/uibmz:/opsi:/${OPSI}/${SUSE}/src/python-${P}-${RPM_VER}.src.rpm" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="alpha amd64 ia64 ppc sparc x86" +IUSE="samba web" + +DEPEND="dev-python/pyparsing + >=dev-python/twisted-core-2 + dev-python/twisted-mail + dev-python/twisted-names + samba? ( dev-python/pycrypto ) + web? ( + >=dev-python/nevow-0.3 + dev-python/twisted-web + dev-python/webut + )" +RDEPEND="${DEPEND}" + +DOCS="README TODO ldaptor.schema" + +S="${WORKDIR}"/python-${P} + +src_prepare() { + distutils_src_prepare + epatch "${FILESDIR}/${P}-zope_interface.patch" + epatch "${FILESDIR}/${P}-usage-exception.patch" + epatch "${FILESDIR}"/${PN}-prem_test.patch + # Delete test with additional dependencies. + if ! use web; then + rm -f ldaptor/test/test_webui.py + fi +} + +src_compile() { + distutils_src_compile + + if use doc; then + cp "${WORKDIR}/ldaptor-pictures/"*.dia.png doc/ + pushd doc > /dev/null + # skip the slides generation because it doesn't work + sed -e "/\$(SLIDES:%\.xml=%\/index\.html) /d" -i Makefile + # replace the docbook.xsl with something that exists + stylesheet='xsl-stylesheets' + sed -e "s#stylesheet/xsl/nwalsh#${stylesheet}#" -i Makefile + emake || die "make failed" + popd > /dev/null + fi +} + +src_install() { + distutils_src_install + + delete_tests() { + rm -fr "${ED}$(python_get_sitedir)/ldaptor/test" + } + python_execute_function -q delete_tests + + if ! use web; then + rm -f "${ED}"usr/bin/ldaptor-webui* + delete_webui() { + rm -fr "${ED}$(python_get_sitedir)/ldaptor/apps/webui" + } + python_execute_function -q delete_webui + else + copy_skin-default() { + cp ldaptor/apps/webui/skin-default.html "${D}$(python_get_sitedir)/ldaptor/apps/webui" + } + python_execute_function -q copy_skin-default + fi + +}