From 042fb11fa107718a831d468d16188e02f6ae3712 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Fri, 18 Jan 2008 16:20:36 -0500 Subject: 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 --- ipa-python/ipa-python.spec | 11 +++++++---- ipa-python/ipa-python.spec.in | 11 +++++++---- ipa-python/ipaclient.py | 2 -- ipa-python/krbtransport.py | 7 ++----- ipa-python/rpcclient.py | 4 +--- 5 files changed, 17 insertions(+), 18 deletions(-) (limited to 'ipa-python') diff --git a/ipa-python/ipa-python.spec b/ipa-python/ipa-python.spec index ca8c4e33..2e8a24b2 100755 --- a/ipa-python/ipa-python.spec +++ b/ipa-python/ipa-python.spec @@ -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 = 0.6.0-2 +- Fixed License in specfile + * Fri Dec 21 2007 Karl MacMillan - 0.6.0-1 - Version bump for release diff --git a/ipa-python/ipa-python.spec.in b/ipa-python/ipa-python.spec.in index 54923f90..a0c8862b 100755 --- a/ipa-python/ipa-python.spec.in +++ b/ipa-python/ipa-python.spec.in @@ -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 = 0.6.0-2 +- Fixed License in specfile + * Fri Dec 21 2007 Karl MacMillan - 0.6.0-1 - Version bump for release diff --git a/ipa-python/ipaclient.py b/ipa-python/ipaclient.py index c05abd51..6d2e58a6 100644 --- a/ipa-python/ipaclient.py +++ b/ipa-python/ipaclient.py @@ -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 diff --git a/ipa-python/krbtransport.py b/ipa-python/krbtransport.py index 95d3bc64..c3bbe886 100644 --- a/ipa-python/krbtransport.py +++ b/ipa-python/krbtransport.py @@ -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) ) diff --git a/ipa-python/rpcclient.py b/ipa-python/rpcclient.py index 4d6b3a70..752b1c38 100644 --- a/ipa-python/rpcclient.py +++ b/ipa-python/rpcclient.py @@ -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. """ -- cgit