[Freeipa-devel] [PATCH] Fix slew of errors reported by rpmlint (and do some re-org)

Rob Crittenden rcritten at redhat.com
Fri Jan 18 17:06:26 UTC 2008


Mark McLoughlin wrote:
> Hi Rob,
> 
> On Thu, 2008-01-17 at 14:39 -0500, Rob Crittenden wrote:
> 
>> diff -r 4b1cc593766e -r 34d00b243c8e ipa-client/ipa-client.spec
>> --- a/ipa-client/ipa-client.spec        Wed Jan 16 10:26:53 2008 -0500
>> +++ b/ipa-client/ipa-client.spec        Thu Jan 17 14:57:34 2008 -0500
> ...
>>  
>>  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()")}
>> +%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
> 
> 	You only need %{python_sitelib}

Ok, goof on my part. We ship some arch-specific binaries in the 
ipa-client package but no shared libs so python_sitelib should be good 
enough.

>  
>>  %description
>>  IPA is a server for identity, policy, and audit.
>> @@ -41,7 +44,13 @@ rm -rf %{buildroot}
>>  %dir %{_usr}/share/ipa
>>  %{_usr}/share/ipa/*
>>  
>> +%{python_sitearch}/*
>> +
> 
> 	This would break on x86_64, you want to use %{python_sitelib} instead,
> and probably something more like:
> 
> %dir %{python_sitelib}/ipaclient
> %{python_sitelib}/ipaclient/*.py*
> 
> 	See:
> 
>   http://fedoraproject.org/wiki/Packaging/Python
> 
> 	(The page is inconsistent on whether *.pyo should be packaged or not)

Ok.

> 
>> diff -r 4b1cc593766e -r 34d00b243c8e ipa-server/ipa-gui/ipa-webgui.init
>> --- a/ipa-server/ipa-gui/ipa-webgui.init        Wed Jan 16 10:26:53 2008 -0500
>> +++ b/ipa-server/ipa-gui/ipa-webgui.init        Thu Jan 17 14:57:34 2008 -0500
>> @@ -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 || \
> 
> 	Out of curiosity, why?

To shut up rpmlint. It complains if you have a variable. I figured that 
there was a low probability of changing the init script name in the 
future so a variable wasn't really necessary. I can add this to the 
changelog.

> 
>> diff -r 4b1cc593766e -r 34d00b243c8e ipa-server/ipa-kpasswd/Makefile.am
>> --- a/ipa-server/ipa-kpasswd/Makefile.am        Wed Jan 16 10:26:53 2008 -0500
>> +++ b/ipa-server/ipa-kpasswd/Makefile.am        Thu Jan 17 14:57:34 2008 -0500
>> @@ -28,7 +28,7 @@ ipa_kpasswd_LDADD =           \
>>  
>>  EXTRA_DIST =                   \
>>         README                  \
>> -       ipa-kpasswd.init        \
>> +       ipa_kpasswd.init        \
> 
> 	Personally, I'd prefer to rename ipa_kpasswd to ipa-kpasswd in order to
> be consistent with ipa-webgui and save all those poor baby seals :-)

Ok, I'll check with Simo to be sure. This will affect the SELinux policy 
that Karl just submitted though.

> 
> 
>> @@ -38,10 +38,12 @@ Requires: python-tgexpandingformwidget
>>  Requires: python-tgexpandingformwidget
>>  Requires: acl
>>  Requires: pyasn1
>> -Requires: libcap
> 
> 	Not doubting this, but I don't think you had anything in the changelog
> for this.

rpmlint whined about explicit libraries in Requires.

> 
>>  
>>  %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()")}
>> +%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
> 
>>  %{_usr}/share/ipa/*
>> +
>> +%{python_sitearch}/*
> 
> 	Same thing here, should be using %{python_sitelib} - %{python_sitearch}
> is for shlib modules.

Ok, same issue as before. I was doing global multilib even when it 
didn't apply to python.

> 
>> diff -r 4b1cc593766e -r 34d00b243c8e ipa-server/xmlrpc-server/Makefile.am
>> --- a/ipa-server/xmlrpc-server/Makefile.am      Wed Jan 16 10:26:53 2008 -0500
>> +++ b/ipa-server/xmlrpc-server/Makefile.am      Thu Jan 17 14:57:34 2008 -0500
>> @@ -10,10 +10,14 @@ html_DATA =                 \
>>         unauthorized.html       \
>>         $(NULL)
>>  
>> +funcdir = $(pythondir)/ipaserver
>> +func_PYTHON =                  \
>> +       attrs.py                \
>> +       funcs.py                \
>> +       $(NULL)
>> +
> 
> 	Just one point on this - it'd be nice to easily be able to run
> ipa-webgui out of a hg working dir; this makes it harder. Why not move
> the code under ipa-server/ipaserver/ ?

It should still work (it did for me). One is always going to have to do 
a make install before running the gui.

I'll double check this though. I do all my UI development in the tree so 
this is pretty important.

rob

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3245 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20080118/2ec39f58/attachment.bin>


More information about the Freeipa-devel mailing list