Fix issues reported by rpmlint.

- Removing shebangs (#!) from a bunch of python libraries
- Don't use a variable name in init scripts for the lock file
- Keep the init script name consistent with the binary name, so renamed
  ipa-kpasswd.init to ipa_kpasswd.init
- Add status option to the init scripts
- Move most python scripts out of /usr/share/ipa and into the python
  site-packages directories (ipaserver and ipaclient)
- Remove unnecessary sys.path.append("/usr/share/ipa")
- Fix the license string in the spec files
- Rename ipa-webgui to ipa_webgui everywhere
- Fix a couple of issues reported by pychecker in ipa-python
This commit is contained in:
Rob Crittenden 2008-01-18 16:20:36 -05:00
parent aaa3cfd58c
commit 042fb11fa1
43 changed files with 188 additions and 148 deletions

View File

@ -1,10 +1,10 @@
Name: ipa-admintools
Version: 0.6.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: IPA authentication server
Group: System Environment/Base
License: GPL
License: GPLv2+
URL: http://www.freeipa.org
Source0: %{name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -35,6 +35,9 @@ rm -rf %{buildroot}
%{_mandir}/man1/*
%changelog
* Thu Jan 17 2008 Rob Crittenden <rcritten@redhat.com> = 0.6.0-2
- Fixed License in specfile
* Fri Dec 21 2007 Karl MacMillan <kmacmill@redhat.com> - 0.6.0-1
- Version bump for release.

View File

@ -1,10 +1,10 @@
Name: ipa-admintools
Version: VERSION
Release: 1%{?dist}
Release: 2%{?dist}
Summary: IPA authentication server
Group: System Environment/Base
License: GPL
License: GPLv2+
URL: http://www.freeipa.org
Source0: %{name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -35,6 +35,9 @@ rm -rf %{buildroot}
%{_mandir}/man1/*
%changelog
* Thu Jan 17 2008 Rob Crittenden <rcritten@redhat.com> = 0.6.0-2
- Fixed License in specfile
* Fri Dec 21 2007 Karl MacMillan <kmacmill@redhat.com> - 0.6.0-1
- Version bump for release.

View File

@ -1,16 +1,18 @@
Name: ipa-client
Version: 0.6.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: IPA client
Group: System Environment/Base
License: GPL
License: GPLv2+
URL: http://www.freeipa.org
Source0: %{name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: python python-ldap python-krbV ipa-python cyrus-sasl-gssapi
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%description
IPA is a server for identity, policy, and audit.
The client package provide install and configuration scripts for clients.
@ -41,7 +43,14 @@ rm -rf %{buildroot}
%dir %{_usr}/share/ipa
%{_usr}/share/ipa/*
%dir %{python_sitelib}/ipaclient
%{python_sitelib}/ipaclient/*.py*
%changelog
* Thu Jan 17 2008 Rob Crittenden <rcritten@redhat.com> = 0.6.0-2
- Fixed License in specfile
- Move client python files to /usr/lib*/python*/site-packages
* Fri Dec 21 2007 Karl MacMillan <kmacmill@redhat.com> - 0.6.0-1
- Version bump for release

View File

@ -1,16 +1,18 @@
Name: ipa-client
Version: VERSION
Release: 1%{?dist}
Release: 2%{?dist}
Summary: IPA client
Group: System Environment/Base
License: GPL
License: GPLv2+
URL: http://www.freeipa.org
Source0: %{name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: python python-ldap python-krbV ipa-python cyrus-sasl-gssapi
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%description
IPA is a server for identity, policy, and audit.
The client package provide install and configuration scripts for clients.
@ -41,7 +43,14 @@ rm -rf %{buildroot}
%dir %{_usr}/share/ipa
%{_usr}/share/ipa/*
%dir %{python_sitelib}/ipaclient
%{python_sitelib}/ipaclient/*.py*
%changelog
* Thu Jan 17 2008 Rob Crittenden <rcritten@redhat.com> = 0.6.0-2
- Fixed License in specfile
- Move client python files to /usr/lib*/python*/site-packages
* Fri Dec 21 2007 Karl MacMillan <kmacmill@redhat.com> - 0.6.0-1
- Version bump for release

View File

@ -22,7 +22,6 @@
VERSION = "%prog .1"
import sys
sys.path.append("/usr/share/ipa")
import krbV
import socket

View File

@ -1,6 +1,6 @@
NULL =
appdir = $(IPA_DATA_DIR)/ipaclient
appdir = $(pythondir)/ipaclient
app_PYTHON = \
__init__.py \
ipachangeconf.py \

View File

@ -1,4 +1,3 @@
#! /usr/bin/python -E
# Authors: Simo Sorce <ssorce@redhat.com>
#
# Copyright (C) 2007 Red Hat

View File

@ -1,4 +1,3 @@
#! /usr/bin/python -E
# Authors: Simo Sorce <ssorce@redhat.com>
#
# Copyright (C) 2007 Red Hat

View File

@ -1,10 +1,10 @@
Name: ipa-python
Version: 0.6.0
Release: 1%{?dist}
Summary: Ipa authentication server
Release: 2%{?dist}
Summary: IPA authentication server
Group: System Environment/Base
License: GPL
License: GPLv2+
URL: http://www.freeipa.org
Source0: http://www.freeipa.org/downloads/%{name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -15,7 +15,7 @@ Requires: PyKerberos
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%description
Ipa is a server for identity, policy, and audit.
IPA is a server for identity, policy, and audit.
%prep
%setup -q
@ -35,6 +35,9 @@ rm -rf %{buildroot}
%config(noreplace) %{_sysconfdir}/ipa/ipa.conf
%changelog
* Thu Jan 17 2008 Rob Crittenden <rcritten@redhat.com> = 0.6.0-2
- Fixed License in specfile
* Fri Dec 21 2007 Karl MacMillan <kmacmill@redhat.com> - 0.6.0-1
- Version bump for release

View File

@ -1,10 +1,10 @@
Name: ipa-python
Version: VERSION
Release: 1%{?dist}
Summary: Ipa authentication server
Release: 2%{?dist}
Summary: IPA authentication server
Group: System Environment/Base
License: GPL
License: GPLv2+
URL: http://www.freeipa.org
Source0: http://www.freeipa.org/downloads/%{name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -15,7 +15,7 @@ Requires: PyKerberos
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%description
Ipa is a server for identity, policy, and audit.
IPA is a server for identity, policy, and audit.
%prep
%setup -q
@ -35,6 +35,9 @@ rm -rf %{buildroot}
%config(noreplace) %{_sysconfdir}/ipa/ipa.conf
%changelog
* Thu Jan 17 2008 Rob Crittenden <rcritten@redhat.com> = 0.6.0-2
- Fixed License in specfile
* Fri Dec 21 2007 Karl MacMillan <kmacmill@redhat.com> - 0.6.0-1
- Version bump for release

View File

@ -17,8 +17,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#!/usr/bin/python
import ipa.rpcclient as rpcclient
import entity
import user

View File

@ -17,12 +17,9 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#!/usr/bin/python
import httplib
import xmlrpclib
import kerberos
from kerberos import GSSError
class KerbTransport(xmlrpclib.SafeTransport):
"""Handles Kerberos Negotiation authentication to an XML-RPC server."""
@ -39,12 +36,12 @@ class KerbTransport(xmlrpclib.SafeTransport):
try:
rc, vc = kerberos.authGSSClientInit(service);
except kerberos.GSSError, e:
raise GSSError(e)
raise kerberos.GSSError(e)
try:
kerberos.authGSSClientStep(vc, "");
except kerberos.GSSError, e:
raise GSSError(e)
raise kerberos.GSSError(e)
extra_headers = [
("Authorization", "negotiate %s" % kerberos.authGSSClientResponse(vc) )

View File

@ -17,8 +17,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#!/usr/bin/python
import xmlrpclib
import socket
import config
@ -579,7 +577,7 @@ class RPCClient:
return ipautil.unwrap_binary_data(result)
def get_all_attrs(self, opts=None):
def get_all_attrs(self):
"""We have a list of hardcoded attributes -> readable labels. Return
that complete list if someone wants it.
"""

View File

@ -1,10 +1,10 @@
Name: ipa-radius-admintools
Version: 0.6.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: IPA authentication server - radius admin tools
Group: System Environment/Base
License: GPL
License: GPLv2+
URL: http://www.freeipa.org
Source0: %{name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -34,6 +34,9 @@ rm -rf %{buildroot}
%{_sbindir}/ipa*
%changelog
* Thu Jan 17 2008 Rob Crittenden <rcritten@redhat.com> = 0.6.0-2
- Fixed License in specfile
* Fri Dec 21 2007 Karl MacMillan <kmacmill@redhat.com> - 0.6.0-1
- Version bump for release

View File

@ -1,10 +1,10 @@
Name: ipa-radius-admintools
Version: VERSION
Release: 1%{?dist}
Release: 2%{?dist}
Summary: IPA authentication server - radius admin tools
Group: System Environment/Base
License: GPL
License: GPLv2+
URL: http://www.freeipa.org
Source0: %{name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -34,6 +34,9 @@ rm -rf %{buildroot}
%{_sbindir}/ipa*
%changelog
* Thu Jan 17 2008 Rob Crittenden <rcritten@redhat.com> = 0.6.0-2
- Fixed License in specfile
* Fri Dec 21 2007 Karl MacMillan <kmacmill@redhat.com> - 0.6.0-1
- Version bump for release

View File

@ -7,7 +7,7 @@ all:
install:
-mkdir -p $(PLUGINS_SHARE)
-mkdir -p $(PLUGINS_PYTHON)
-mkdir -p $(PLUGINS_SBINDIR)
-mkdir -p $(SBINDIR)
install -m 644 plugins/*.py $(PLUGINS_PYTHON)
install -m 644 share/*.template $(PLUGINS_SHARE)
install -m 755 ipa-radius-install $(SBINDIR)
@ -17,4 +17,4 @@ clean:
distclean: clean
test:
test:

View File

@ -19,7 +19,6 @@
#
import sys
sys.path.append("/usr/share/ipa")
import traceback, logging, krbV

View File

@ -1,10 +1,10 @@
Name: ipa-radius-server
Version: 0.6.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: IPA authentication server - radius plugin
Group: System Environment/Base
License: GPL
License: GPLv2+
URL: http://www.freeipa.org
Source0: %{name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -42,12 +42,11 @@ rm -rf %{buildroot}
%{_usr}/share/ipa/ipaserver/plugins/*
%changelog
* Thu Jan 17 2008 Rob Crittenden <rcritten@redhat.com> = 0.6.0-2
- Fixed License in specfile
* Fri Dec 21 2007 Karl MacMillan <kmacmill@redhat.com> - 0.6.0-1
- Version bump for release
* Wed Dec 12 2007 Karl MacMillan <kmacmill@redhat.com> - 0.5.0-1
- Initial version

View File

@ -1,10 +1,10 @@
Name: ipa-radius-server
Version: VERSION
Release: 1%{?dist}
Release: 2%{?dist}
Summary: IPA authentication server - radius plugin
Group: System Environment/Base
License: GPL
License: GPLv2+
URL: http://www.freeipa.org
Source0: %{name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -42,12 +42,11 @@ rm -rf %{buildroot}
%{_usr}/share/ipa/ipaserver/plugins/*
%changelog
* Fri Dec 21 2007 Karl MacMillan <kmacmill@redhat.com> - VERSION-1
* Thu Jan 17 2008 Rob Crittenden <rcritten@redhat.com> = 0.6.0-2
- Fixed License in specfile
* Fri Dec 21 2007 Karl MacMillan <kmacmill@redhat.com> - 0.6.0-1
- Version bump for release
* Wed Dec 12 2007 Karl MacMillan <kmacmill@redhat.com> - 0.5.0-1
- Initial version

View File

@ -1,4 +1,3 @@
#! /usr/bin/python -E
# Authors: John Dennis <jdennis@redhat.com>
#
# Copyright (C) 2007 Red Hat
@ -18,9 +17,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import sys
sys.path.append("/usr/share/ipa")
import subprocess
import string
import tempfile

View File

@ -6,19 +6,19 @@ SUBDIRS = \
$(NULL)
sbin_SCRIPTS = \
ipa-webgui \
ipa_webgui \
$(NULL)
appdir = $(IPA_DATA_DIR)
app_DATA = \
ipa-webgui.cfg \
ipa_webgui.cfg \
$(NULL)
EXTRA_DIST = \
README.txt \
$(sbin_SCRIPTS) \
$(app_DATA) \
ipa-webgui.init \
ipa_webgui.init \
dev.cfg \
sample-prod.cfg \
setup.py \
@ -32,13 +32,13 @@ MAINTAINERCLEANFILES = \
initdir=$(sysconfdir)/rc.d/init.d
install-data-hook: ipa-webgui.init
install-data-hook: ipa_webgui.init
if test '!' -d $(DESTDIR)$(initdir); then \
$(mkinstalldirs) $(DESTDIR)$(initdir); \
chmod 755 $(DESTDIR)$(initdir); \
fi
$(INSTALL_SCRIPT) $(srcdir)/ipa-webgui.init $(DESTDIR)$(initdir)/ipa-webgui
$(INSTALL_SCRIPT) $(srcdir)/ipa_webgui.init $(DESTDIR)$(initdir)/ipa_webgui
uninstall-hook:
rm -f $(DESTDIR)$(initdir)/ipa-webgui
rm -f $(DESTDIR)$(initdir)/ipa_webgui

View File

@ -96,7 +96,7 @@ def main():
update_config(configfile="dev.cfg",
modulename="ipagui.config")
else:
update_config(configfile="/usr/share/ipa/ipa-webgui.cfg",
update_config(configfile="/usr/share/ipa/ipa_webgui.cfg",
modulename="ipagui.config.app")
from ipagui.controllers import Root

View File

@ -1,7 +1,7 @@
[global]
# DATABASE
# no database for ipa-webgui since everything is stored in LDAP
# no database for ipa_webgui since everything is stored in LDAP
# IDENTITY

View File

@ -1,11 +1,11 @@
#!/bin/sh
#
# ipa-webgui This starts and stops ipa-webgui
# ipa_webgui This starts and stops ipa_webgui
#
# chkconfig: - 36 64
# description: ipa-webgui IPA Web User Interface
# processname: /usr/sbin/ipa-webgui
# configdir: /etc/sysconfig/ipa-webgui
# description: ipa_webgui IPA Web User Interface
# processname: /usr/sbin/ipa_webgui
# configdir: /etc/sysconfig/ipa_webgui
#
# Source function library.
@ -24,8 +24,8 @@ then
exit 0
fi
NAME="ipa-webgui"
PROG="/usr/sbin/ipa-webgui"
NAME="ipa_webgui"
PROG="/usr/sbin/ipa_webgui"
RUNAS="apache"
start() {
@ -33,7 +33,7 @@ start() {
daemon --user $RUNAS $PROG
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$NAME || \
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ipa_webgui || \
RETVAL=1
return $RETVAL
}
@ -43,7 +43,7 @@ stop() {
killproc $NAME
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$NAME
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ipa_webgui
return $RETVAL
}
@ -59,14 +59,20 @@ case "$1" in
stop)
stop
;;
status)
status $PROG
;;
restart)
restart
;;
condrestart)
[ -f /var/lock/subsys/$NAME ] && restart || :
[ -f /var/lock/subsys/ipa_webgui ] && restart || :
;;
reload)
exit 3
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart}"
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
exit 2
esac

View File

@ -19,7 +19,6 @@
#
import sys
sys.path.append("/usr/share/ipa")
import tempfile, os, pwd, traceback, logging
from ConfigParser import SafeConfigParser

View File

@ -19,7 +19,6 @@
#
import sys
sys.path.append("/usr/share/ipa")
import getpass, ldap, re, krbV

View File

@ -19,7 +19,6 @@
#
import sys
sys.path.append("/usr/share/ipa")
import logging, tempfile, shutil, os, pwd
from ConfigParser import SafeConfigParser

View File

@ -19,7 +19,6 @@
#
import sys
sys.path.append("/usr/share/ipa")
import traceback

View File

@ -27,8 +27,6 @@
VERSION = "%prog .1"
import sys
sys.path.append("/usr/share/ipa")
import os
import socket
import errno

View File

@ -28,7 +28,7 @@ ipa_kpasswd_LDADD = \
EXTRA_DIST = \
README \
ipa-kpasswd.init \
ipa_kpasswd.init \
$(NULL)
MAINTAINERCLEANFILES = \
@ -37,14 +37,14 @@ MAINTAINERCLEANFILES = \
initdir=$(sysconfdir)/rc.d/init.d
install-data-hook: ipa-kpasswd.init
install-data-hook: ipa_kpasswd.init
if test '!' -d $(DESTDIR)$(initdir); then \
$(mkinstalldirs) $(DESTDIR)$(initdir); \
chmod 755 $(DESTDIR)$(initdir); \
fi
$(INSTALL_SCRIPT) $(srcdir)/ipa-kpasswd.init $(DESTDIR)$(initdir)/ipa-kpasswd
$(INSTALL_SCRIPT) $(srcdir)/ipa_kpasswd.init $(DESTDIR)$(initdir)/ipa_kpasswd
uninstall-hook:
rm -f $(DESTDIR)$(initdir)/ipa-kpasswd
rm -f $(DESTDIR)$(initdir)/ipa_kpasswd

View File

@ -1,9 +1,9 @@
#!/bin/sh
#
# ipa-kpasswd This starts and stops ipa-kpasswd
# ipa_kpasswd This starts and stops ipa_kpasswd
#
# chkconfig: - 36 64
# description: ipa-kpasswd IPA Kpasswd daemon
# description: ipa_kpasswd IPA Kpasswd daemon
# processname: /usr/sbin/ipa_kpasswd
# configdir: /etc/sysconfig/ipa-kpasswd
#
@ -30,13 +30,14 @@ if [ -f /etc/sysconfig/ipa-kpasswd ] ; then
fi
NAME="ipa_kpasswd"
PROG="/usr/sbin/ipa_kpasswd"
start() {
echo -n $"Starting $NAME: "
daemon $NAME
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$NAME || \
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ipa_kpasswd || \
RETVAL=1
return $RETVAL
}
@ -46,7 +47,7 @@ stop() {
killproc $NAME
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$NAME
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ipa_kpasswd
return $RETVAL
}
@ -62,14 +63,20 @@ case "$1" in
stop)
stop
;;
status)
status $PROG
;;
restart)
restart
;;
condrestart)
[ -f /var/lock/subsys/$NAME ] && restart || :
[ -f /var/lock/subsys/ipa_kpasswd ] && restart || :
;;
reload)
exit 3
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart}"
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
exit 2
esac

View File

@ -1,10 +1,10 @@
Name: ipa-server
Version: 0.6.0
Release: 1%{?dist}
Summary: Ipa authentication server
Release: 2%{?dist}
Summary: IPA authentication server
Group: System Environment/Base
License: GPL
License: GPLv2+
URL: http://www.freeipa.org
Source0: %{name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -43,8 +43,10 @@ Requires: libcap
%define httpd_conf /etc/httpd/conf.d
%define plugin_dir %{_libdir}/dirsrv/plugins
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%description
Ipa is a server for identity, policy, and audit.
IPA is a server for identity, policy, and audit.
%prep
%setup -q
@ -70,22 +72,22 @@ rm -rf %{buildroot}
%post
if [ $1 = 1 ]; then
/sbin/chkconfig --add ipa-kpasswd
/sbin/chkconfig --add ipa-webgui
/sbin/chkconfig --add ipa_kpasswd
/sbin/chkconfig --add ipa_webgui
fi
%preun
if [ $1 = 0 ]; then
/sbin/chkconfig --del ipa-kpasswd
/sbin/chkconfig --del ipa-webgui
/sbin/service ipa-kpasswd stop >/dev/null 2>&1 || :
/sbin/service ipa-webgui stop >/dev/null 2>&1 || :
/sbin/chkconfig --del ipa_kpasswd
/sbin/chkconfig --del ipa_webgui
/sbin/service ipa_kpasswd stop >/dev/null 2>&1 || :
/sbin/service ipa_webgui stop >/dev/null 2>&1 || :
fi
%postun
if [ "$1" -ge "1" ]; then
/sbin/service ipa-kpasswd condrestart >/dev/null 2>&1 || :
/sbin/service ipa-webgui condrestart >/dev/null 2>&1 || :
/sbin/service ipa_kpasswd condrestart >/dev/null 2>&1 || :
/sbin/service ipa_webgui condrestart >/dev/null 2>&1 || :
fi
%files
@ -96,13 +98,16 @@ fi
%{_sbindir}/ipa-replica-manage
%{_sbindir}/ipa-server-certinstall
%{_sbindir}/ipa_kpasswd
%{_sbindir}/ipa-webgui
%attr(755,root,root) %{_initrddir}/ipa-kpasswd
%attr(755,root,root) %{_initrddir}/ipa-webgui
%{_sbindir}/ipa_webgui
%attr(755,root,root) %{_initrddir}/ipa_kpasswd
%attr(755,root,root) %{_initrddir}/ipa_webgui
%dir %{_usr}/share/ipa
%{_usr}/share/ipa/*
%dir %{python_sitelib}/ipaserver
%{python_sitelib}/ipaserver/*.py*
%attr(755,root,root) %{plugin_dir}/libipa_pwd_extop.so
%attr(755,root,root) %{plugin_dir}/libipa-memberof-plugin.so
%attr(755,root,root) %{plugin_dir}/libipa-dna-plugin.so
@ -111,6 +116,10 @@ fi
%dir %{_localstatedir}/cache/ipa/sysrestore
%changelog
* Thu Jan 17 2008 Rob Crittenden <rcritten@redhat.com> = 0.6.0-2
- Fixed License in specfile
- Include files from /usr/lib/python*/site-packages/ipaserver
* Fri Dec 21 2007 Karl MacMillan <kmacmill@redhat.com> - 0.6.0-1
- Version bump for release

View File

@ -1,10 +1,10 @@
Name: ipa-server
Version: VERSION
Release: 1%{?dist}
Summary: Ipa authentication server
Release: 2%{?dist}
Summary: IPA authentication server
Group: System Environment/Base
License: GPL
License: GPLv2+
URL: http://www.freeipa.org
Source0: %{name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -43,8 +43,10 @@ Requires: libcap
%define httpd_conf /etc/httpd/conf.d
%define plugin_dir %{_libdir}/dirsrv/plugins
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%description
Ipa is a server for identity, policy, and audit.
IPA is a server for identity, policy, and audit.
%prep
%setup -q
@ -70,22 +72,22 @@ rm -rf %{buildroot}
%post
if [ $1 = 1 ]; then
/sbin/chkconfig --add ipa-kpasswd
/sbin/chkconfig --add ipa-webgui
/sbin/chkconfig --add ipa_kpasswd
/sbin/chkconfig --add ipa_webgui
fi
%preun
if [ $1 = 0 ]; then
/sbin/chkconfig --del ipa-kpasswd
/sbin/chkconfig --del ipa-webgui
/sbin/service ipa-kpasswd stop >/dev/null 2>&1 || :
/sbin/service ipa-webgui stop >/dev/null 2>&1 || :
/sbin/chkconfig --del ipa_kpasswd
/sbin/chkconfig --del ipa_webgui
/sbin/service ipa_kpasswd stop >/dev/null 2>&1 || :
/sbin/service ipa_webgui stop >/dev/null 2>&1 || :
fi
%postun
if [ "$1" -ge "1" ]; then
/sbin/service ipa-kpasswd condrestart >/dev/null 2>&1 || :
/sbin/service ipa-webgui condrestart >/dev/null 2>&1 || :
/sbin/service ipa_kpasswd condrestart >/dev/null 2>&1 || :
/sbin/service ipa_webgui condrestart >/dev/null 2>&1 || :
fi
%files
@ -96,13 +98,16 @@ fi
%{_sbindir}/ipa-replica-manage
%{_sbindir}/ipa-server-certinstall
%{_sbindir}/ipa_kpasswd
%{_sbindir}/ipa-webgui
%attr(755,root,root) %{_initrddir}/ipa-kpasswd
%attr(755,root,root) %{_initrddir}/ipa-webgui
%{_sbindir}/ipa_webgui
%attr(755,root,root) %{_initrddir}/ipa_kpasswd
%attr(755,root,root) %{_initrddir}/ipa_webgui
%dir %{_usr}/share/ipa
%{_usr}/share/ipa/*
%dir %{python_sitelib}/ipaserver
%{python_sitelib}/ipaserver/*.py*
%attr(755,root,root) %{plugin_dir}/libipa_pwd_extop.so
%attr(755,root,root) %{plugin_dir}/libipa-memberof-plugin.so
%attr(755,root,root) %{plugin_dir}/libipa-dna-plugin.so
@ -111,6 +116,10 @@ fi
%dir %{_localstatedir}/cache/ipa/sysrestore
%changelog
* Thu Jan 17 2008 Rob Crittenden <rcritten@redhat.com> = 0.6.0-2
- Fixed License in specfile
- Include files from /usr/lib/python*/site-packages/ipaserver
* Fri Dec 21 2007 Karl MacMillan <kmacmill@redhat.com> - 0.6.0-1
- Version bump for release

View File

@ -1,6 +1,6 @@
NULL =
appdir = $(IPA_DATA_DIR)/ipaserver
appdir = $(pythondir)/ipaserver
app_PYTHON = \
__init__.py \
bindinstance.py \

View File

@ -1,4 +1,3 @@
#! /usr/bin/python -E
# Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
# see inline
#

View File

@ -1,4 +1,3 @@
#! /usr/bin/python -E
# Authors: Simo Sorce <ssorce@redhat.com>
#
# Copyright (C) 2007 Red Hat

View File

@ -1,4 +1,3 @@
#! /usr/bin/python -E
# Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
#
# Copyright (C) 2007 Red Hat

View File

@ -1,4 +1,3 @@
#! /usr/bin/python -E
# Authors: Rich Megginson <richm@redhat.com>
# Rob Crittenden <rcritten@redhat.com
#

View File

@ -1,4 +1,3 @@
#! /usr/bin/python -E
# Authors: Simo Sorce <ssorce@redhat.com>
#
# Copyright (C) 2007 Red Hat
@ -118,7 +117,7 @@ class KrbInstance(service.Service):
def __common_post_setup(self):
self.step("starting the KDC", self.__start_instance)
self.step("configuring KDC to start on boot", self.__enable)
self.step("enabling and starting ipa-kpasswd", self.__enable_kpasswd)
self.step("enabling and starting ipa_kpasswd", self.__enable_kpasswd)
def create_instance(self, ds_user, realm_name, host_name, admin_password, master_password):
self.master_password = master_password
@ -183,10 +182,10 @@ class KrbInstance(service.Service):
logging.critical("krb5kdc service failed to start")
def __enable_kpasswd(self):
sysrestore.backup_state("ipa-kpasswd", "enabled", service.is_enabled("ipa-kpasswd"))
sysrestore.backup_state("ipa-kpasswd", "running", service.is_running("ipa-kpasswd"))
service.chkconfig_on("ipa-kpasswd")
service.start("ipa-kpasswd")
sysrestore.backup_state("ipa_kpasswd", "enabled", service.is_enabled("ipa_kpasswd"))
sysrestore.backup_state("ipa_kpasswd", "running", service.is_running("ipa_kpasswd"))
service.chkconfig_on("ipa_kpasswd")
service.start("ipa_kpasswd")
def __setup_sub_dict(self):
self.sub_dict = dict(FQDN=self.fqdn,
@ -374,8 +373,8 @@ class KrbInstance(service.Service):
sysrestore.backup_file("/var/kerberos/krb5kdc/kpasswd.keytab")
installutils.create_keytab("/var/kerberos/krb5kdc/kpasswd.keytab", "kadmin/changepw")
sysrestore.backup_file("/etc/sysconfig/ipa-kpasswd")
update_key_val_in_file("/etc/sysconfig/ipa-kpasswd", "export KRB5_KTNAME", "/var/kerberos/krb5kdc/kpasswd.keytab")
sysrestore.backup_file("/etc/sysconfig/ipa_kpasswd")
update_key_val_in_file("/etc/sysconfig/ipa_kpasswd", "export KRB5_KTNAME", "/var/kerberos/krb5kdc/kpasswd.keytab")
pent = pwd.getpwnam(self.ds_user)
os.chown("/var/kerberos/krb5kdc/kpasswd.keytab", pent.pw_uid, pent.pw_gid)
@ -383,18 +382,18 @@ class KrbInstance(service.Service):
running = self.restore_state("running")
enabled = self.restore_state("enabled")
kpasswd_running = sysrestore.restore_state("ipa-kpasswd", "running")
kpasswd_enabled = sysrestore.restore_state("ipa-kpasswd", "enabled")
kpasswd_running = sysrestore.restore_state("ipa_kpasswd", "running")
kpasswd_enabled = sysrestore.restore_state("ipa_kpasswd", "enabled")
if not running is None:
self.stop()
if not kpasswd_running is None:
service.stop("ipa-kpasswd")
service.stop("ipa_kpasswd")
if not enabled is None and not enabled:
self.chkconfig_off()
if not kpasswd_enabled is None and not kpasswd_enabled:
service.chkconfig_off("ipa-kpasswd")
service.chkconfig_off("ipa_kpasswd")
for f in ["/var/kerberos/krb5kdc/ldappwd",
"/var/kerberos/krb5kdc/kdc.conf",
@ -406,10 +405,10 @@ class KrbInstance(service.Service):
"/etc/sysconfig/dirsrv",
"/etc/krb5.keytab",
"/var/kerberos/krb5kdc/kpasswd.keytab",
"/etc/sysconfig/ipa-kpasswd"]:
"/etc/sysconfig/ipa_kpasswd"]:
sysrestore.restore_file(f)
if not running is None and running:
self.start()
if not kpasswd_running is None and kpasswd_running:
service.start("ipa-kpasswd")
service.start("ipa_kpasswd")

View File

@ -21,12 +21,12 @@ import service
class WebGuiInstance(service.Service):
def __init__(self):
service.Service.__init__(self, "ipa-webgui")
service.Service.__init__(self, "ipa_webgui")
def create_instance(self):
self.step("starting ipa-webgui", self.__start)
self.step("configuring ipa-webgui to start on boot", self.__enable)
self.start_creation("Configuring ipa-webgui")
self.step("starting ipa_webgui", self.__start)
self.step("configuring ipa_webgui to start on boot", self.__enable)
self.start_creation("Configuring ipa_webgui")
def __start(self):
self.backup_state("running", self.is_running())

View File

@ -10,10 +10,14 @@ html_DATA = \
unauthorized.html \
$(NULL)
serverdir = $(IPA_DATA_DIR)/ipaserver
server_PYTHON = \
coredir = $(pythondir)/ipaserver
core_PYTHON = \
attrs.py \
funcs.py \
$(NULL)
serverdir = $(IPA_DATA_DIR)/ipaserver
server_PYTHON = \
ipaxmlrpc.py \
$(NULL)

View File

@ -18,7 +18,6 @@
#
import sys
sys.path.append("/usr/share/ipa")
import krbV
import ldap
@ -26,7 +25,7 @@ import ldap.dn
import ipaserver.dsinstance
import ipaserver.ipaldap
import copy
import attrs
from ipaserver import attrs
from ipa import ipaerror
from ipa import ipautil
from urllib import quote,unquote

View File

@ -24,7 +24,6 @@
# Rob Crittenden <rcritten@redhat.com>
import sys
sys.path.append("/usr/share/ipa")
import time
@ -34,8 +33,7 @@ from xmlrpclib import Marshaller,loads,dumps,Fault
from mod_python import apache
import logging
import ipaserver
import funcs
from ipaserver import funcs
from ipa import ipaerror, ipautil
import ldap