Final reorginzation to reflect packaging.

This commit is contained in:
Karl MacMillan
-
parent 1d8d4222ab
commit 7d95cd612c
18 changed files with 35 additions and 52 deletions

View File

@@ -1,4 +1,4 @@
SUBDIRS=ipa-server ipa-admintools
SUBDIRS=ipa-server ipa-admintools ipa-python
PRJ_PREFIX=freeipa
@@ -9,7 +9,6 @@ SERV_MAJOR=0
SERV_MINOR=1
SERV_RELEASE=0
SERV_VERSION=$(SERV_MAJOR).$(SERV_MINOR).$(SERV_RELEASE)
SERV_TARBALL_PREFIX=$(PRJ_PREFIX)-server-$(SERV_VERSION)
SERV_TARBALL=$(SERV_TARBALL_PREFIX).tgz
@@ -17,10 +16,16 @@ ADMIN_MAJOR=0
ADMIN_MINOR=1
ADMIN_RELEASE=0
ADMIN_VERSION=$(ADMIN_MAJOR).$(ADMIN_MINOR).$(ADMIN_RELEASE)
ADMIN_TARBALL_PREFIX=$(PRJ_PREFIX)-admintools-$(ADMIN_VERSION)
ADMIN_TARBALL=$(ADMIN_TARBALL_PREFIX).tgz
PYTHON_MAJOR=0
PYTHON_MINOR=1
PYTHON_RELEASE=0
PYTHON_VERSION=$(PYTHON_MAJOR).$(PYTHON_MINOR).$(PYTHON_RELEASE)
PYTHON_TARBALL_PREFIX=$(PRJ_PREFIX)-admintools-$(PYTHON_VERSION)
PYTHON_TARBALL=$(PYTHON_TARBALL_PREFIX).tgz
all:
@for subdir in $(SUBDIRS); do \
(cd $$subdir && $(MAKE) $@) || exit 1; \
@@ -35,6 +40,7 @@ clean:
@for subdir in $(SUBDIRS); do \
(cd $$subdir && $(MAKE) $@) || exit 1; \
done
rm -f *~
version-update:
sed s/VERSION/$(SERV_VERSION)/ ipa-server/freeipa-server.spec.in \
@@ -55,6 +61,12 @@ tarballs:
cd dist; tar cfz $(ADMIN_TARBALL) $(ADMIN_TARBALL_PREFIX)
rm -fr dist/$(ADMIN_TARBALL_PREFIX)
# ipa-python
mv dist/freeipa/ipa-python dist/$(PYTHON_TARBALL_PREFIX)
rm -f dist/$(PYTHON_TARBALL)
cd dist; tar cfz $(PYTHON_TARBALL) $(PYTHON_TARBALL_PREFIX)
rm -fr dist/$(PYTHON_TARBALL_PREFIX)
# cleanup
rm -fr dist/freeipa

View File

@@ -1,8 +1,10 @@
SBINDIR = $(DESTDIR)/usr/sbin
all: ;
install:
$(MAKE) -C src $@
install -m 755 ipa-adduser $(SBINDIR)
install -m 755 ipa-finduser $(SBINDIR)
clean:
$(MAKE) -C src $@
rm -f *~
rm -f *~ *.pyc

View File

@@ -1,10 +0,0 @@
SBINDIR = $(DESTDIR)/usr/sbin
all: ;
install:
install -m 755 ipa-adduser $(SBINDIR)
install -m 755 ipa-finduser $(SBINDIR)
clean:
rm -f *~ *.pyc

View File

@@ -1,4 +1,4 @@
SUBDIRS=ipa-install
SUBDIRS=ipa-install xmlrpc-server
PYTHONDIR=$(DESTDIR)/usr/share/ipa/ipaserver
all:

View File

@@ -1,9 +0,0 @@
all: ;
install:
$(MAKE) -C api $@
$(MAKE) -C client $@
clean:
$(MAKE) -C api $@
rm -f *~

View File

@@ -1,4 +1,4 @@
SHAREDIR = $(DESTDIR)/usr/share/ipa
SHAREDIR = $(DESTDIR)/usr/share/ipa/ipaserver
HTTPDIR = $(DESTDIR)/etc/httpd/conf.d/
all: ;

View File

@@ -17,10 +17,12 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import sys
sys.path.append("/usr/share/ipa")
import ldap
import ipa
import ipa.dsinstance
import ipa.ipaldap
import ipaserver.dsinstance
import ipaserver.ipaldap
import pdb
import string
from types import *
@@ -44,11 +46,11 @@ def get_user (username):
# FIXME: Is this the filter we want or should it be more specific?
filter = "(uid=" username ")"
try:
m1 = ipa.ipaldap.IPAdmin(host,port,binddn,bindpw)
m1 = ipaserver.ipaldap.IPAdmin(host,port,binddn,bindpw)
ent = m1.getEntry(basedn, scope, filter, None)
except ldap.LDAPError, e:
raise xmlrpclib.Fault(1, e)
except ipa.ipaldap.NoSuchEntryError:
except ipaserver.ipaldap.NoSuchEntryError:
raise xmlrpclib.Fault(2, "No such user")
# Convert to LDIF
@@ -84,7 +86,7 @@ def get_user (username):
def add_user (user):
"""Add a user in LDAP"""
dn="uid=%s,ou=users,ou=default,dc=greyoak,dc=com" % user['uid']
entry = ipa.ipaldap.Entry(dn)
entry = ipaserver.ipaldap.Entry(dn)
# some required objectclasses
entry.setValues('objectClass', 'top', 'posixAccount', 'shadowAccount', 'account', 'person', 'inetOrgPerson', 'organizationalPerson', 'krbPrincipalAux', 'krbTicketPolicyAux')
@@ -104,7 +106,7 @@ def add_user (user):
entry.setValues(u, user[u])
try:
m1 = ipa.ipaldap.IPAdmin(host,port,binddn,bindpw)
m1 = ipaserver.ipaldap.IPAdmin(host,port,binddn,bindpw)
res = m1.addEntry(entry)
return res
except ldap.ALREADY_EXISTS:

View File

@@ -1,8 +1,8 @@
# LoadModule auth_kerb_module modules/mod_auth_kerb.so
Alias /ipa "/usr/share/ipa/XMLRPC"
Alias /ipa "/usr/share/ipa/ipaserver/XMLRPC"
<Directory "/usr/share/ipa">
<Directory "/usr/share/ipaserver">
# AuthType Kerberos
# AuthName "Kerberos Login"
# KrbMethodNegotiate on

View File

@@ -30,7 +30,7 @@ import pprint
from xmlrpclib import Marshaller,loads,dumps,Fault
from mod_python import apache
import ipa
import ipaserver
import funcs
import string
import base64
@@ -154,7 +154,7 @@ class ModXMLRPCRequestHandler(object):
func = self.funcs.get(method,None)
if func is None:
raise Fault(1, "Invalid method: %s" % method)
params,opts = ipa.decode_args(*params)
params,opts = ipaserver.decode_args(*params)
ret = func(*params,**opts)
@@ -272,17 +272,3 @@ def handler(req, profiling=False):
finally:
pass
return apache.OK
diff -r 0afcf345979d ipa-server/ipa-web/client/Makefile
--- a/dev/null Thu Jan 01 00:00:00 1970 0000
b/ipa-server/ipa-web/client/Makefile Wed Jul 19 20:17:24 2007 -0400
PYTHONLIBDIR ?= $(shell python -c "from distutils.sysconfig import *; print get_python_lib(1)")
PACKAGEDIR ?= $(DESTDIR)/$(PYTHONLIBDIR)/ipa
all: ;
install:
-mkdir -p $(PACKAGEDIR)
install -m 644 *.py $(PACKAGEDIR)
clean:
rm -f *~ *.pyc