Bug 192311 - Review Request: cobbler
Review Request: cobbler
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: John Mahowald
Fedora Package Reviews List
:
Depends On:
Blocks: FE-ACCEPT 192313
  Show dependency treegraph
 
Reported: 2006-05-18 17:09 EDT by Michael DeHaan
Modified: 2010-05-17 11:11 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-28 09:59:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
tibbs: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description Michael DeHaan 2006-05-18 17:09:38 EDT
Spec URL: http://michaeldehaan.net/software/RPMS/cobbler.spec
SRPM URL: http://michaeldehaan.net/software/RPMS/cobbler-0.1.0-1.src.rpm

Description: 

Cobbler is a command line tool for simplified configuration of a provisioning server. It supports provisioning via PXE (Link), Xen (Link), and re-provisioning an existing Linux system via a method called "auto-kickstarting", made popular by Red Hat Network (Link). The last two modes require usage of a program called "koan" on the remote system.

Koan stands for "kickstart-over-a-network" and allows for both network provisioning of new Xen guests and auto-kickstarting. It interacts with a centralized boot server that has been configured with cobbler.

Documentation for each is contained in the manpages for the respective programs (for now). Both applications are written in Python and are released under the GPL.
Comment 1 Michael DeHaan 2006-05-18 17:14:35 EDT
This is associated with a program submitted here, but for just using PXE, the
"koan" program is not required.  

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=192313

Comment 2 John Mahowald 2006-05-20 21:01:33 EDT
rpmlint:
E: cobbler description-line-too-long Cobbler is a command line tool for
simplified configuration of boot/provisioning servers.  It is also accessible as
a Python library.  Cobbler supports PXE, Xen, and re-provisioning an existing
Linux system via auto-kickstart.  The last two modes require 'koan' to be run on
the remote system.

Wrap at 80 characters.

E: cobbler no-changelogname-tag

You need a %changelog

E: cobbler non-executable-script
/usr/lib/python2.4/site-packages/cobbler/cobbler.py 0644

Begins with #!/usr/bin/python, ignorable.

* Package is marked as relocatable, please check.
  (wiki: Packaging/Guidelines#RelocatablePackages)
* Spec file: tag Vendor is forbidden
  (wiki: Packaging/Guidelines#tags)
* No downloadable source. Please give the full URL in the Source tag.
* The BuildRoot must be cleaned at the beginning of %install
Comment 3 Parag AN(पराग) 2006-06-01 00:22:49 EDT
SPEC file required following changes
  * Also You need to use dist tag instead of coding release
  * Source tag is not a URL
  * Add Changelog
Comment 4 Michael DeHaan 2006-06-28 17:50:45 EDT
All items are now fixed except for the part about the 'dist tag', which I did
not understand, and the relocatable part, which AFAIK, I have not marked the
package relocatable.  Pointers on these two items would be greatly appreciated.

I've updated the src rpms, noarch rpms, and spec files accordingly.

===

Wrap at 80 characters.
* Fixed

E: cobbler no-changelogname-tag
You need a %changelog
* Fixed

E: cobbler non-executable-script
/usr/lib/python2.4/site-packages/cobbler/cobbler.py 0644
Begins with #!/usr/bin/python, ignorable.
* Fixed anyway

Package is marked as relocatable, please check.
  (wiki: Packaging/Guidelines#RelocatablePackages)
* I don't see "relocatable" in the spec file.  So I'm not sure how the package
is marked as such.

Spec file: tag Vendor is forbidden
  (wiki: Packaging/Guidelines#tags)
* Fixed

No downloadable source. Please give the full URL in the Source tag.
* Fixed.  The source is also in the bugzilla entry at the top of this page.

The BuildRoot must be cleaned at the beginning of %install
* Fixed.

Also You need to use dist tag instead of coding release
* Can you elaborate on what needs to be done here?

Source tag is not a URL
* Fixed

Add Changelog
* Fixed

===


Comment 5 Michael DeHaan 2006-06-28 18:07:43 EDT
DistTag should be fixed now as well.
Comment 6 John Mahowald 2006-07-05 00:04:01 EDT
Now that we have some changes please increment the release every time you make
some changes. It allows for tracking of stuff via %changelog and ensures we all
have the latest version. Different packages circulating with the same version
and release is bad.

Don't bother with defining your own macros for name, version, and release, rpm
does that.

Typically the URL points at an informational page. Does one exist? Is your
packages the only release?

Seems INSTALLED_FILES doesn't list directories, so don't use that.
http://fedoraproject.org/wiki/Packaging/Python  (this page has some other hints
for python packaging as well)
Comment 7 Michael DeHaan 2006-07-05 12:17:19 EDT
 please increment the release every time you make
some changes.

-- The installed product didn't technically change.  Regardless, this can be done.

Don't bother with defining your own macros for name, version, and release, rpm
does that.

-- If I remove the version macro, 'version' will be seperately hard coded into 3
parts of the file.  Having the version macro at the top of the file is most
convient for editing and is very much D.R.Y.  If i need to call it something
other than 'version', this can be done, though I need to understand the
technical reason for this.

Typically the URL points at an informational page. Does one exist?

-- Not *yet*.  Full documentation is provided in the man pages and can be saved
to file if required.

Seems INSTALLED_FILES doesn't list directories, so don't use that.

-- Directories will be added.
Comment 8 Paul Howarth 2006-07-05 13:03:39 EDT
(In reply to comment #7)
> Don't bother with defining your own macros for name, version, and release, rpm
> does that.
> 
> -- If I remove the version macro, 'version' will be seperately hard coded into 3
> parts of the file.  Having the version macro at the top of the file is most
> convient for editing and is very much D.R.Y.  If i need to call it something
> other than 'version', this can be done, though I need to understand the
> technical reason for this.

If you remove the line:
%define version 0.1.0

And replace:
Version: %{version}
with:
Version: 0.1.0

then rpm will define the %{version} macro for you, which you can use in the rest
of the spec file just as you are now. Defining it manually is simply redundant.

Same goes for the %{name} and %{release} macros; there is no need to define them
manually.

Comment 9 Michael DeHaan 2006-07-10 18:44:18 EDT
Updated.
- added doc URL
- added directories
- removed redundant macros
- bumped release

New RPM:  
http://et.redhat.com/~mdehaan/software/cobbler/cobbler-0.1.0-2.src.rpm

New spec file:  
http://et.redhat.com/~mdehaan/software/cobbler/cobbler.spec

Documentation URL as listed in spec:
http://et.redhat.com/page/Cobbler_%26_Koan_Provisioning_Tools
(largely a manpage copy for now)
Comment 10 Dave Malcolm 2006-07-11 17:01:40 EDT
Looks like you're missing a dep on yaml:
rpm -q cobbler
cobbler-0.1.0-2

cobbler help
Traceback (most recent call last):
  File "/usr/bin/cobbler", line 18, in ?
    import cobbler.cobbler as app
  File "/usr/lib/python2.4/site-packages/cobbler/cobbler.py", line 18, in ?
    import api
  File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 17, in ?
    import config
  File "/usr/lib/python2.4/site-packages/cobbler/config.py", line 27, in ?
    import serializer
  File "/usr/lib/python2.4/site-packages/cobbler/serializer.py", line 15, in ?
    import yaml   # Howell-Clark version
ImportError: No module named yaml
Comment 11 Michael DeHaan 2006-07-11 18:34:28 EDT
Thanks.  Fixed (per my email to David) at 17:38 EST.  Same URLs are still valid.
  The setup.py file was not updated after doing some work to make the code
build/run on RHEL, which involved swapping out yaml modules.  


Comment 12 Michael DeHaan 2006-07-13 15:49:17 EDT
Added kickstart templating support in cobbler using Cheetah.  Kickstart
templating works for PXE, Xen, and auto-kickstart re-provisioning alike.

http://et.redhat.com/~mdehaan/software/cobbler/cobbler-0.1.1-3.src.rpm
http://et.redhat.com/~mdehaan/software/cobbler/cobbler.spec

Comment 13 Michael DeHaan 2006-07-20 16:53:44 EDT
I see no one has attempted to run the code yet :)

Several of our development systems are tainted from having a yaml module
installed on them that RHN uses, therefore I didn't detect that the load paths
from the yaml module were not correct.  These are corrected versions of cobber
with relative imports:

http://et.redhat.com/~mdehaan/software/cobbler/cobbler-0.1.1-4.src.rpm
http://et.redhat.com/~mdehaan/software/cobbler/cobbler.spec

For convience of anyone wanting to try this out, I also have uploaded noarch's.

http://et.redhat.com/~mdehaan/software/cobbler/cobbler-0.1.1-4.noarch.rpm
Comment 14 Michael DeHaan 2006-08-14 10:03:16 EDT
It's been a month over the last response from anyone.   Can anyone take a look
at this?

It seems the earlier RPM issues are resolved and it would be nice if someone
could confirm packaging issues are ok so I we can go forward with the next steps.
Comment 15 Jason Tibbitts 2006-08-14 11:01:33 EDT
The stalled review policy indicates that we give John one more week to respond
and then he can be unassigned from the package.

However, just a quick once over from me:

Source0: does not contain a URL to the upstream tarball.  I'd consider this a
blocker unless somehow there is no upstream other than this package.

rpmlint on SRPM says:

W: cobbler strange-permission cobbler.spec 01664
  Really odd for the sticky bit to be set on a spec file.
W: cobbler setup-not-quiet
  Not a big deal; pass -q to the %setup macro if you want to quiet this.

rpmlint on the built RPM says:

E: cobbler non-executable-script /usr/lib/python2.4/site-packages/cobbler/gui.py
0644
  rpmlint fires this off anytime it sees a shebang line in a file that's not
executable.  For Python source this is often bogus; it depends on whether the
code is actually runnable (i.e. contains something other than class
definitions).  This seems to be the case here, so the rpmlint complaint can be
ignored.
Comment 16 John Mahowald 2006-08-16 16:47:31 EDT
The downloads page has all source rpms so I assume this srpm is the canonical
source.

I agree with the rest of comment 15.

The scripts in %install seemed to have worked around the warning in the python
packaging guidelines about INSATLLED_FILES and directories.
http://fedoraproject.org/wiki/Packaging/Python

Needs work:
rpm added a Requires of python(abi) = 2.4. This makes Requiring python >= 2.3
redundant on FC4+.

Good:
+ noarch
+ permissions
+ uses setuptools
+ clean section
+ macros
Comment 17 Michael DeHaan 2006-08-16 17:09:55 EDT
"""
Source0: does not contain a URL to the upstream tarball.  I'd consider this a
blocker unless somehow there is no upstream other than this package.
"""

I am the upstream; the SRPM is canonical.  This app is not expected to work
outside of RHEL4+/FC5+ without modification.  Seeing it includes kickstart
features (which are already very distro specific) that shouldn't be a problem.

--------------

"Really odd for the sticky bit to be set on a spec file."

Fixed.  

--------------

"""
W: cobbler setup-not-quiet
  Not a big deal; pass -q to the %setup macro if you want to quiet this.
"""

Fixed.

----------------------------

"""
cobbler non-executable-script /usr/lib/python2.4/site-packages/cobbler/gui.py
0644
"""

Fixed.  That file should not have been in the release.

--------------------

rpmlint on both RPM's yields no output at this point and unit tests pass.

New versions:

http://et.redhat.com/~mdehaan/software/cobbler/cobbler-0.1.1-5.src.rpm
http://et.redhat.com/~mdehaan/software/cobbler/cobbler-0.1.1-5.noarch.rpm

Comment 18 Michael DeHaan 2006-08-16 17:27:36 EDT
"""
rpm added a Requires of python(abi) = 2.4. This makes Requiring python >= 2.3
redundant on FC4+.
"""

There's a good reason for this.  Currently the same SRPM file can be used to
build the RPM on RHEL4/Centos, which is desirable to preserve.  The noarch has a
2.4 abi because it was built using distutils on a FC5 system.  Cobbler itself
will build on either platform as it only requires Python 2.3 (no Python 2.4
features and no extensions included).

Using the example of IETF RFC 2119 the Wiki entry about abi appears to be more
of a "SHOULD NOT" than a "MUST NOT".  The redundancy will not break a build
system or RPM, so it shouldn't be a problem.  If it is, it can be dealt with,
though it seems sensible to me.

Comment 19 Michael DeHaan 2006-08-25 10:16:34 EDT
Ping.
Comment 20 John Mahowald 2006-08-30 12:36:15 EDT
Seems you have combined the list of files and dirs into INSTALLED_OBJECTS but
the files section is %files -f INSTALLED_FILES. Thus cobbler does not own its
dir in site-packages.

Good:
+ License: GPL
+ noarch python package
+ macro use
+ %clean section
+ file permissions
+ rpmlint clean
+ follows packaging guidelines

APPROVED

Just fix the %files before building.
Comment 21 Michael DeHaan 2006-09-11 09:53:34 EDT
John (et al),

Thanks!  Would you mind sponsoring me on this?

I'm currently lacking sponsorship and can't submit otherwise.   The CLA is in
the mail.

Michael
Comment 22 Michael DeHaan 2006-09-20 14:39:52 EDT
Newness:

Source code of released builds is now available in Mercurial:

http://hg.et.redhat.com/hg/emd/applications/cobbler

New home for files:

http://et.redhat.com/~mdehaan/software/repo/

Accessible via yum:

http://et.redhat.com/~mdehaan/software/mdehaan.repo

All of this info is updated on the Wiki page:

http://et.redhat.com/page/Cobbler_%26_Koan_Provisioning_Tools

Comment 23 Michael DeHaan 2006-09-20 15:04:58 EDT
John:  ping on the above sponsorship request...  

%files has been fixed to Python packaging guidelines.

Comment 24 Jeremy Katz 2006-09-27 15:51:08 EDT
Sponsored you, should eb good to go for building
Comment 25 Scott J Henson 2010-05-17 10:59:46 EDT
Package Change Request
======================
Package Name: cobbler
New Branches: EL-6
Owners: shenson jeckersb awood
Comment 26 Jason Tibbitts 2010-05-17 11:11:53 EDT
This package already seems to have an EL-6 branch.

Note You need to log in before you can comment on or make changes to this bug.