summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile28
-rw-r--r--ipa-python/ipautil.py1
-rw-r--r--ipa-python/radius_util.py2
-rw-r--r--ipa-radius-server/Makefile20
-rw-r--r--ipa-radius-server/ipa-radius-install (renamed from ipa-server/ipa-install/ipa-radius-install)3
-rwxr-xr-xipa-radius-server/ipa-radius-server.spec50
-rwxr-xr-xipa-radius-server/ipa-radius-server.spec.in50
-rw-r--r--ipa-radius-server/plugins/__init__.py1
-rw-r--r--ipa-radius-server/plugins/radiusinstance.py (renamed from ipa-server/ipaserver/radiusinstance.py)4
-rw-r--r--ipa-radius-server/share/radius.radiusd.conf.template (renamed from ipa-server/ipa-install/share/radius.radiusd.conf.template)0
-rw-r--r--ipa-server/ipa-install/Makefile.am1
-rw-r--r--ipa-server/ipa-install/share/Makefile.am1
-rwxr-xr-xipa-server/ipa-server.spec1
-rw-r--r--ipa-server/ipa-server.spec.in1
-rw-r--r--ipa-server/ipaserver/Makefile.am1
15 files changed, 154 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 0461144a..25af8533 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-SUBDIRS=ipa-server ipa-admintools ipa-python ipa-client
+SUBDIRS=ipa-server ipa-admintools ipa-python ipa-client ipa-radius-server
PRJ_PREFIX=ipa
@@ -35,6 +35,13 @@ CLI_VERSION=$(CLI_MAJOR).$(CLI_MINOR).$(CLI_RELEASE)
CLI_TARBALL_PREFIX=$(PRJ_PREFIX)-client-$(CLI_VERSION)
CLI_TARBALL=$(CLI_TARBALL_PREFIX).tgz
+RADIUS_SERVER_MAJOR=0
+RADIUS_SERVER_MINOR=5
+RADIUS_SERVER_RELEASE=0
+RADIUS_SERVER_VERSION=$(RADIUS_SERVER_MAJOR).$(RADIUS_SERVER_MINOR).$(RADIUS_SERVER_RELEASE)
+RADIUS_SERVER_TARBALL_PREFIX=$(PRJ_PREFIX)-radius-server-$(RADIUS_SERVER_VERSION)
+RADIUS_SERVER_TARBALL=$(RADIUS_SERVER_TARBALL_PREFIX).tgz
+
LIBDIR ?= /usr/lib
all: bootstrap-autogen
@@ -77,6 +84,9 @@ version-update:
sed s/VERSION/$(CLI_VERSION)/ ipa-client/ipa-client.spec.in \
> ipa-client/ipa-client.spec
+ sed s/VERSION/$(RADIUS_SERVER_VERSION)/ ipa-radius-server/ipa-radius-server.spec.in \
+ > ipa-radius-server/ipa-radius-server.spec
+
archive:
-mkdir -p dist
@@ -120,6 +130,13 @@ tarballs:
cd dist; tar cfz sources/$(CLI_TARBALL) $(CLI_TARBALL_PREFIX)
rm -fr dist/$(CLI_TARBALL_PREFIX)
+ # ipa-radius-server
+ mv dist/ipa/ipa-radius-server dist/$(RADIUS_SERVER_TARBALL_PREFIX)
+ rm -f dist/sources/$(RADIUS_SERVER_TARBALL)
+ cd dist; tar cfz sources/$(RADIUS_SERVER_TARBALL) $(RADIUS_SERVER_TARBALL_PREFIX)
+ rm -fr dist/$(RADIUS_SERVER_TARBALL_PREFIX)
+
+
rpmroot:
mkdir -p $(RPMBUILD)/BUILD
mkdir -p $(RPMBUILD)/RPMS
@@ -155,7 +172,14 @@ rpm-ipa-client:
cp rpmbuild/RPMS/*/$(PRJ_PREFIX)-client-$(CLI_VERSION)-*.rpm dist/rpms/
cp rpmbuild/SRPMS/$(PRJ_PREFIX)-client-$(CLI_VERSION)-*.src.rpm dist/srpms/
-rpms: rpmroot rpmdistdir rpm-ipa-server rpm-ipa-admin rpm-ipa-python rpm-ipa-client
+rpm-ipa-radius-server:
+ cp dist/sources/$(RADIUS_SERVER_TARBALL) $(RPMBUILD)/SOURCES/.
+ rpmbuild --define "_topdir $(RPMBUILD)" -ba ipa-radius-server/ipa-radius-server.spec
+ cp rpmbuild/RPMS/noarch/$(PRJ_PREFIX)-radius-server-$(RADIUS_SERVER_VERSION)-*.rpm dist/rpms/
+ cp rpmbuild/SRPMS/$(PRJ_PREFIX)-radius-server-$(RADIUS_SERVER_VERSION)-*.src.rpm dist/srpms/
+
+
+rpms: rpmroot rpmdistdir rpm-ipa-server rpm-ipa-admin rpm-ipa-python rpm-ipa-client rpm-ipa-radius-server
repodata:
-createrepo -p dist
diff --git a/ipa-python/ipautil.py b/ipa-python/ipautil.py
index 3c2b37f7..c617854e 100644
--- a/ipa-python/ipautil.py
+++ b/ipa-python/ipautil.py
@@ -18,6 +18,7 @@
#
SHARE_DIR = "/usr/share/ipa/"
+PLUGINS_SHARE_DIR = "/usr/share/ipa/plugins"
import string
import tempfile
diff --git a/ipa-python/radius_util.py b/ipa-python/radius_util.py
index 1f6e7902..40b0bd25 100644
--- a/ipa-python/radius_util.py
+++ b/ipa-python/radius_util.py
@@ -79,7 +79,7 @@ RADIUS_USER = 'radiusd'
RADIUS_IPA_KEYTAB_FILEPATH = os.path.join(RADIUS_PKG_CONFIG_DIR, 'ipa.keytab')
RADIUS_LDAP_ATTR_MAP_FILEPATH = os.path.join(RADIUS_PKG_CONFIG_DIR, 'ldap.attrmap')
RADIUSD_CONF_FILEPATH = os.path.join(RADIUS_PKG_CONFIG_DIR, 'radiusd.conf')
-RADIUSD_CONF_TEMPLATE_FILEPATH = os.path.join(ipautil.SHARE_DIR, 'radius.radiusd.conf.template')
+RADIUSD_CONF_TEMPLATE_FILEPATH = os.path.join(ipautil.PLUGINS_SHARE_DIR, 'radius.radiusd.conf.template')
RADIUSD = '/usr/sbin/radiusd'
diff --git a/ipa-radius-server/Makefile b/ipa-radius-server/Makefile
new file mode 100644
index 00000000..7de51b46
--- /dev/null
+++ b/ipa-radius-server/Makefile
@@ -0,0 +1,20 @@
+PLUGINS_SHARE = $(DESTDIR)/usr/share/ipa/plugins
+PLUGINS_PYTHON = $(DESTDIR)/usr/share/ipa/ipaserver/plugins
+SBINDIR = $(DESTDIR)/usr/sbin
+
+all:
+
+install:
+ -mkdir -p $(PLUGINS_SHARE)
+ -mkdir -p $(PLUGINS_PYTHON)
+ -mkdir -p $(PLUGINS_SBINDIR)
+ install -m 644 plugins/*.py $(PLUGINS_PYTHON)
+ install -m 644 share/*.template $(PLUGINS_SHARE)
+ install -m 755 ipa-radius-install $(SBINDIR)
+
+clean:
+ rm -fr *.pyc *~
+
+distclean: clean
+
+test: \ No newline at end of file
diff --git a/ipa-server/ipa-install/ipa-radius-install b/ipa-radius-server/ipa-radius-install
index 84e10e42..3e759d8d 100644
--- a/ipa-server/ipa-install/ipa-radius-install
+++ b/ipa-radius-server/ipa-radius-install
@@ -23,7 +23,8 @@ sys.path.append("/usr/share/ipa")
import traceback, logging, krbV
-from ipaserver import radiusinstance, installutils
+from ipaserver import installutils
+from ipaserver.plugins import radiusinstance
from ipa import ipautil
diff --git a/ipa-radius-server/ipa-radius-server.spec b/ipa-radius-server/ipa-radius-server.spec
new file mode 100755
index 00000000..2b8b6162
--- /dev/null
+++ b/ipa-radius-server/ipa-radius-server.spec
@@ -0,0 +1,50 @@
+Name: ipa-radius-server
+Version: 0.5.0
+Release: 1%{?dist}
+Summary: IPA authentication server - radius plugin
+
+Group: System Environment/Base
+License: GPL
+URL: http://www.freeipa.org
+Source0: %{name}-%{version}.tgz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch: noarch
+
+Requires: python
+Requires: ipa-server
+Requires: freeradius
+
+%description
+Radius plugin for an IPA server
+
+%prep
+%setup -q
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{_sbindir}
+
+make install DESTDIR=%{buildroot}
+
+
+%clean
+rm -rf %{buildroot}
+
+
+%files
+%defattr(-,root,root,-)
+%{_sbindir}/ipa*
+
+%dir %{_usr}/share/ipa/plugins
+%{_usr}/share/ipa/plugins/*
+
+%dir %{_usr}/share/ipa/ipaserver/plugins
+%{_usr}/share/ipa/ipaserver/plugins/*
+
+%changelog
+* Wed Dec 12 2007 Karl MacMillan <kmacmill@redhat.com> - 0.5.0-1
+- Initial version
+
+
+
+
diff --git a/ipa-radius-server/ipa-radius-server.spec.in b/ipa-radius-server/ipa-radius-server.spec.in
new file mode 100755
index 00000000..5937d3b1
--- /dev/null
+++ b/ipa-radius-server/ipa-radius-server.spec.in
@@ -0,0 +1,50 @@
+Name: ipa-radius-server
+Version: VERSION
+Release: 1%{?dist}
+Summary: IPA authentication server - radius plugin
+
+Group: System Environment/Base
+License: GPL
+URL: http://www.freeipa.org
+Source0: %{name}-%{version}.tgz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch: noarch
+
+Requires: python
+Requires: ipa-server
+Requires: freeradius
+
+%description
+Radius plugin for an IPA server
+
+%prep
+%setup -q
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{_sbindir}
+
+make install DESTDIR=%{buildroot}
+
+
+%clean
+rm -rf %{buildroot}
+
+
+%files
+%defattr(-,root,root,-)
+%{_sbindir}/ipa*
+
+%dir %{_usr}/share/ipa/plugins
+%{_usr}/share/ipa/plugins/*
+
+%dir %{_usr}/share/ipa/ipaserver/plugins
+%{_usr}/share/ipa/ipaserver/plugins/*
+
+%changelog
+* Wed Dec 12 2007 Karl MacMillan <kmacmill@redhat.com> - 0.5.0-1
+- Initial version
+
+
+
+
diff --git a/ipa-radius-server/plugins/__init__.py b/ipa-radius-server/plugins/__init__.py
new file mode 100644
index 00000000..636bc1a8
--- /dev/null
+++ b/ipa-radius-server/plugins/__init__.py
@@ -0,0 +1 @@
+# intentionally empty
diff --git a/ipa-server/ipaserver/radiusinstance.py b/ipa-radius-server/plugins/radiusinstance.py
index 4250b4bd..743a1d8a 100644
--- a/ipa-server/ipaserver/radiusinstance.py
+++ b/ipa-radius-server/plugins/radiusinstance.py
@@ -19,6 +19,8 @@
#
import sys
+sys.path.append("/usr/share/ipa")
+
import subprocess
import string
import tempfile
@@ -30,7 +32,7 @@ import sys
from ipa.ipautil import *
from ipa import radius_util
-import service
+from ipaserver import service
import os
import re
diff --git a/ipa-server/ipa-install/share/radius.radiusd.conf.template b/ipa-radius-server/share/radius.radiusd.conf.template
index 3bc4927d..3bc4927d 100644
--- a/ipa-server/ipa-install/share/radius.radiusd.conf.template
+++ b/ipa-radius-server/share/radius.radiusd.conf.template
diff --git a/ipa-server/ipa-install/Makefile.am b/ipa-server/ipa-install/Makefile.am
index 37dd325e..8a3e4a97 100644
--- a/ipa-server/ipa-install/Makefile.am
+++ b/ipa-server/ipa-install/Makefile.am
@@ -9,7 +9,6 @@ sbin_SCRIPTS = \
ipa-replica-install \
ipa-replica-prepare \
ipa-server-certinstall \
- ipa-radius-install \
$(NULL)
EXTRA_DIST = \
diff --git a/ipa-server/ipa-install/share/Makefile.am b/ipa-server/ipa-install/share/Makefile.am
index 36837356..5d117dec 100644
--- a/ipa-server/ipa-install/share/Makefile.am
+++ b/ipa-server/ipa-install/share/Makefile.am
@@ -20,7 +20,6 @@ app_DATA = \
krbrealm.con.template \
ntp.conf.server.template \
preferences.html.template \
- radius.radiusd.conf.template \
referint-conf.ldif \
dna-posix.ldif \
master-entry.ldif \
diff --git a/ipa-server/ipa-server.spec b/ipa-server/ipa-server.spec
index 8c8df82e..910f4627 100755
--- a/ipa-server/ipa-server.spec
+++ b/ipa-server/ipa-server.spec
@@ -37,7 +37,6 @@ Requires: python-krbV
Requires: TurboGears
Requires: python-tgexpandingformwidget
Requires: acl
-Requires: freeradius
Requires: pyasn1
Requires: libcap
diff --git a/ipa-server/ipa-server.spec.in b/ipa-server/ipa-server.spec.in
index 21f46556..b0c13c06 100644
--- a/ipa-server/ipa-server.spec.in
+++ b/ipa-server/ipa-server.spec.in
@@ -37,7 +37,6 @@ Requires: python-krbV
Requires: TurboGears
Requires: python-tgexpandingformwidget
Requires: acl
-Requires: freeradius
Requires: pyasn1
Requires: libcap
diff --git a/ipa-server/ipaserver/Makefile.am b/ipa-server/ipaserver/Makefile.am
index f1c094b3..b1d00a80 100644
--- a/ipa-server/ipaserver/Makefile.am
+++ b/ipa-server/ipaserver/Makefile.am
@@ -9,7 +9,6 @@ app_PYTHON = \
krbinstance.py \
httpinstance.py \
ntpinstance.py \
- radiusinstance.py \
webguiinstance.py \
service.py \
installutils.py \