Bug 427273 - Review Request: firstaidkit - System Rescue Tool
Review Request: firstaidkit - System Rescue Tool
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Parag AN(पराग)
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-02 12:25 EST by Joel Andres Granados
Modified: 2008-01-15 04:00 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-01-15 04:00:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
panemade: fedora‑review+
kevin: fedora‑cvs+


Attachments (Terms of Use)
Modified SPEC (2.72 KB, text/x-rpm-spec)
2008-01-09 03:48 EST, Parag AN(पराग)
no flags Details

  None (edit)
Description Joel Andres Granados 2008-01-02 12:25:43 EST
Spec URL: http://jgranado.fedorapeople.org/firstaidkit.spec
SRPM URL: http://jgranado.fedorapeople.org/firstaidkit-0.1.0-1.fc8.src.rpm
Description: A tool that automates simple and common system recovery tasks.
feature page: http://fedoraproject.org/wiki/Anaconda/Features/FirstAidKit
Comment 1 manuel wolfshant 2008-01-02 23:48:32 EST
Given the second paragraph from
https://fedorahosted.org/firstaidkit/browser/firstaidkit, I guess the license
tag should be GPLv2+

Unrelated to the spec/rpm: lots of links such as 
https://fedorahosted.org/firstaidkit/browser/PLUGINS
https://fedorahosted.org/firstaidkit/browser/firstaidkit?format=txt
https://fedorahosted.org/firstaidkit/browser/firstaidkit?format=raw

give as output:

Oops…
Trac detected an internal error:

If you think this really should work and you can reproduce it, you should
consider reporting this problem to the Trac team.

Go to http://trac.edgewall.org/ and create a new ticket where you describe the
problem, how to reproduce it. Don't forget to include the Python traceback found
below.

TracGuide — The Trac User and Administration Guide
Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 406, in
dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.4/site-packages/trac/versioncontrol/web_ui/browser.py",
line 113, in process_request
    node = get_existing_node(req, repos, path, rev_or_latest)
  File "/usr/lib/python2.4/site-packages/trac/versioncontrol/web_ui/util.py",
line 98, in get_existing_node
    return repos.get_node(path, rev)
  File "/usr/lib/python2.4/site-packages/gitplugin/git_fs.py", line 59, in get_node
    return GitNode(self.git, path, rev)
  File "/usr/lib/python2.4/site-packages/gitplugin/git_fs.py", line 131, in __init__
    [(self.perm,k,self.sha,fn)]=git.tree_ls(rev, p)
ValueError: need more than 0 values to unpack

Comment 2 Parag AN(पराग) 2008-01-03 01:38:23 EST
You need to follow http://fedoraproject.org/wiki/Packaging/Python/Eggs. From F9,
you will see egg-info files generated automatically and you need to add them in
%files.
This is missing in this package that's why build.log showed =>
error: Installed (but unpackaged) file(s) found:
/usr/lib/python2.5/site-packages/firstaidkit-0.1.0-py2.5.egg-info
Comment 3 Joel Andres Granados 2008-01-03 05:25:56 EST
Package now includes eggs.  The links are the same.
Comment 4 Parag AN(पराग) 2008-01-03 23:34:18 EST
missing BR: python-setuptools-devel
see 
http://fedoraproject.org/wiki/Packaging/Python/Eggs#head-3e899702195642d7d12483e0d73451b70e8d3e9c

koji build failed with log
http://koji.fedoraproject.org/koji/getfile?taskID=323739&name=build.log
Comment 5 Parag AN(पराग) 2008-01-03 23:35:21 EST
provide new updated spec and SRPM links by increasing release tag and adding
changelog in spec file.
Comment 6 Joel Andres Granados 2008-01-04 05:33:33 EST
I added the if-else stuff to the spec file addressing the python-setuptool-devel
issue.  I also modified the spec file to include man pages.
Bumped the release tag.  I don't think the if-else is needed, being that this
package is only going to be in f9 for now, but I'll leave it just in case;)
Comment 7 Joel Andres Granados 2008-01-04 05:36:25 EST
The url for the srpm is
http://jgranado.fedorapeople.org/firstaidkit-0.1.0-2.fc8.src.rpm
Comment 8 Parag AN(पराग) 2008-01-04 09:20:37 EST
rpmlint is not happy 
firstaidkit.noarch: W: spurious-executable-perm /usr/share/man/man1/fakplugin.1.gz
==>The file is installed with executable permissions, but was identified as one
that probably should not be executable.  Verify if the executable bits are
desired, and remove if not.

also,
  Can't see this package owns 
/usr/libexec/firstaidkit/plugins
is there any other package intended to own this directory?
Comment 9 Parag AN(पराग) 2008-01-04 09:23:49 EST
License is GPLv2+ from COPYING
Comment 10 Joel Andres Granados 2008-01-04 11:58:22 EST
ok, rpmlint likes fak :)
changed the gpl thing
corrected permissions.
the link for the srpm is:
http://jgranado.fedorapeople.org/firstaidkit-0.1.0-3.fc8.src.rpm

Hope this time we pass :)
Comment 11 Parag AN(पराग) 2008-01-04 22:29:06 EST
needs some more work.
see rpmlint is still not happy
firstaidkit.noarch: I: checking
firstaidkit.noarch: E: non-standard-uid /usr/share/man/man1/fakplugin.1.gz mockbuild
A file in this package is owned by a non standard user.
Standard users are:
root, bin, daemon, adm, lp, sync, shutdown, halt, mail, news, uucp,
operator, games, gopher, ftp, nobody

firstaidkit.noarch: E: non-standard-gid /usr/share/man/man1/fakplugin.1.gz mockbuild
A file in this package is owned by a non standard group.
Standard groups are:
root, bin, daemon, sys, adm, tty, disk, lp, mem, kmem, wheel, mail,
news, uucp, man, games, gopher, dip, ftp, lock, nobody, users

from comment #8,
   also,
  Can't see this package owns 
/usr/libexec/firstaidkit/plugins
is there any other package intended to own this directory?

Comment 12 Joel Andres Granados 2008-01-07 15:34:43 EST
I'm running rpmlint in my box and did not see the standard User/Group stuff. 
I'm basically running `rpmlint firstaidkit.srpm firstaidkit.rpm and firstaidkit
(when installed)`.  what am I missing?  I fixed the issue anyway.
Regarding comment 1.  I have created a ticket for the trac in fedorahosted.

Regarding the /usr/libexec/firstaidkit/plugins.  Don't know what to do here. 
The idea is to have firsaidkit-PLUGINNAME packages install into a given
directory that firstaidkit knows about.  I saw the way yum did it but the
yum.spec file did not use macros. instead it defined "/usr/lib/" and put the
"yum-plugins" directory in there.  If I do that in firstaidkit, rpmlint screams.

I try to use bindir but it uses "/usr/lib64" in 64 bit archs.  Yum also screams
in this case because it says that there are non binary files in /usr/lib64.  I
would really prefer to have it in /usr/lib, but don't know what macro to use. 
What macro to use to install the files in /usr/lib ?

With all this discussion (REALLY GOOD BTW!!!!) I realized that the firstaidkit
packaging stuff would need a little change to be more .... logical :). The idea
is to add a dummy package that brings all the other firstaidkit packages in. 
The plugin system will be in a package called firstaidkit-pluginsystem and the
dummy package would be called firstaidkit.  The main idea is for the user to do
a yum install firstaidkit and get all the default plugin packages.  And for the
plugin developer to just install the firstaidkit-devel and get the
firstaidkit-pluginsystem with the examples, and develop with that. 

I'll but up all the material and post it on fedorapeople.  FYI rpmlint will
scream because of the /usr/lib64 stuff.  Please advise.

Links :
srpm : http://jgranado.fedorapeople.org/firstaidkit-0.1.0-4.fc8.src.rpm
spec : http://jgranado.fedorapeople.org/firstaidkit.spec
Comment 13 Joel Andres Granados 2008-01-08 11:21:56 EST
spoke to rvokal and he suggested a solution.  to put the
firstaidkit-pluginsystem in the firstaidkit package, make firstaidkit-devel
require firstaidkit and make the plugins require firstaidkit.  The only question
left is how to get the proper behavior.  That is: when user installs
firstaidkit, firstaidkit and all its plugins install.  and when plugin developer
installs firstaidkit-devel, firstaidkit and firstaidkit-devel installs.  rvokal
told me that it can be done with groups.  Any ideas on what needs to be done for
this to happen?
Please advise.

I'll change the package structure for it to reflect what is suggested in this
comment.
Comment 14 Joel Andres Granados 2008-01-08 13:58:57 EST
made the respective changes given in comment 13.  There is still the matter of
the /usr/lib64 rpmlint warning ( please advise)
Links :
srpm : http://jgranado.fedorapeople.org/firstaidkit-0.1.0-5.fc8.src.rpm
spec : http://jgranado.fedorapeople.org/firstaidkit.spec
Comment 15 Parag AN(पराग) 2008-01-08 23:57:50 EST
your packaging should work like this.

firstaidkit developer when installs firstaidkit-devel, he will get firstaidkit
and firstaidkit-devel gets installed on his system.

Any specific reason to let user install all plugins when he try to install only
firstaidkit rpm?

when a developer creates new plugins he will create new
firstaidkit-plugins-<pluginNAME> package and submit it. Newly developed plugin
should go to %{_libdir}/firstaidkit-plugins/pluginNAME/

Now you can either create a empty firstaidkit-plugins-all which will pull all
newly added plugins packages. 
(See nagios-plugins SPEC)
Or let end user install it separately only with no -all subpackage.

Comment 16 Parag AN(पराग) 2008-01-09 00:01:23 EST
make requires in -devel as
Requires: %{name} = %{version}-%{release} 

install or cp commands should use -p option. see
http://fedoraproject.org/wiki/Packaging/Guidelines#head-0239576e441f9ef53d175c4aec8c12868dffb5ab

Comment 17 Parag AN(पराग) 2008-01-09 00:09:12 EST
As, -devel only provides examples. I will suggest to create examples directory
under %{_libdir}/firstaidkit-plugins and install example files there.
so you just need to change following line in %install
%{__cp} -rf plugins/ $RPM_BUILD_ROOT/%{_libdir}/firstaidkit-plugins
to
%{__install} -d $RPM_BUILD_ROOT/%{_libdir}/firstaidkit-plugins/examples
%{__cp} -rf plugins/* $RPM_BUILD_ROOT/%{_libdir}/firstaidkit-plugins/examples


I think good example for you is to look in libextractor SPEC file.
Comment 18 Parag AN(पराग) 2008-01-09 03:47:41 EST
I did some SPEC modifications. I am attaching modified SPEC below. I have not
added plugins subpackage yet. 
Comment 19 Parag AN(पराग) 2008-01-09 03:48:24 EST
Created attachment 291123 [details]
Modified SPEC
Comment 20 Joel Andres Granados 2008-01-09 11:07:05 EST
> Any specific reason to let user install all plugins when he try to install only
> firstaidkit rpm?
> 

I want to be friendly to our end user.  I would hate the user to have to hunt
down the plugins that he needs.  A more automated approach would be the install
all relevant plugins.  The idea of the firstaidkit-plugins-all is excellent,
This would look at the system for stuff and according to what it finds it will
install the relative plugin. (For example, if the system is using lvm, the
install-all script would install the firstaidkit-plugin-lvm)
So this package would not bring all the plugins but the relative ones.  I would
run some test scripts at install time that return true/false and make the
decision from there.  Any comments,  maybe you know an simpler way of achieving
this?
thx.
Comment 21 Joel Andres Granados 2008-01-09 11:13:28 EST
Sorry for the double reply.  just wanted to address that install-all issue
separately.

(In reply to comment #15)
> your packaging should work like this.
> 
> firstaidkit developer when installs firstaidkit-devel, he will get firstaidkit
> and firstaidkit-devel gets installed on his system.
> 

Yep thats the way I left it :)

> 
> when a developer creates new plugins he will create new
> firstaidkit-plugins-<pluginNAME> package and submit it. Newly developed plugin
> should go to %{_libdir}/firstaidkit-plugins/pluginNAME/

yes this is correct, but the plugin doesn't necessarily have to be a dir.

> 
> Now you can either create a empty firstaidkit-plugins-all which will pull all
> newly added plugins packages. 
> (See nagios-plugins SPEC)

I'll take a peak.

> Or let end user install it separately only with no -all subpackage.

I would maybe like the liberty to do both.  The user might want to just install
one plugin, so he will use `yum install firstaidkit-plugin-lvm` but if he wants
a system wide rescue/check he will do a `yum install firstaidkit-plugin-all`.
Comment 22 Joel Andres Granados 2008-01-09 11:54:53 EST
(In reply to comment #17)
> As, -devel only provides examples. I will suggest to create examples directory
> under %{_libdir}/firstaidkit-plugins and install example files there.
> so you just need to change following line in %install
> %{__cp} -rf plugins/ $RPM_BUILD_ROOT/%{_libdir}/firstaidkit-plugins
> to
> %{__install} -d $RPM_BUILD_ROOT/%{_libdir}/firstaidkit-plugins/examples
> %{__cp} -rf plugins/* $RPM_BUILD_ROOT/%{_libdir}/firstaidkit-plugins/examples

Was looking through your posted spec file, and you change this issue slightly by
putting the examples in %{_datadir} instead of %{_libdir}.  I would want them in
libdir and for sample3plugin/plugin to be executable so the plugin developer can
run the examples by calling firstaidkit `-execute=example1`.  What do you think?
Comment 23 Joel Andres Granados 2008-01-09 13:30:14 EST
I generated new spec and srpm.  I included most of the changes to the spec file.
comments:  currently rpmling has two issues:
firstaidkit-devel.noarch: E: only-non-binary-in-usr-lib
firstaidkit-plugin-all.noarch: W: no-documentation
FYI, these issues are also present in nagios-plugins packages.

srpm : http://jgranado.fedorapeople.org/firstaidkit-0.1.0-6.fc8.src.rpm
spec : http://jgranado.fedorapeople.org/firstaidkit.spec
Comment 24 Parag AN(पराग) 2008-01-09 22:41:13 EST
Review:
+ package builds in mock (rawhide i386).
+ rpmlint is silent for SRPM. But not for RPM.
firstaidkit-devel.noarch: E: only-non-binary-in-usr-lib
==>this is ok here.
+ source files match upstream.
7a4e783e4c95d875cb8b15d2d119dfc6  firstaidkit-0.1.0.tar.bz2
+ package meets naming and packaging guidelines.
+ specfile is properly named, is cleanly written
+ Spec file is written in American English.
+ Spec file is legible.
+ dist tag is present.
+ build root is correct.
+ license is open source-compatible.
+ License text is included in package.
+ %doc files present.
+ BuildRequires are proper.
+ %clean is present.
+ package installed properly.
+ Macro use appears rather consistent.
+ Package contains code.
+ no static libraries.
+ no .pc file present.
+ -devel and -plugins-all subpackage exists.
+ no .la files.
+ no translations are available.
+ Does owns the directories it creates.
+ no duplicates in %files.
+ file permissions are appropriate.
+ no scriptlets are used.
+ Not a GUI app.

SHOULD:
  Add some lines of text in SPEC in comments on how to create tarball. Upstream
does not provide any direct download links.

I am approving this with assuming you will add above comment.

APPROVED.
Comment 25 Parag AN(पराग) 2008-01-09 22:42:29 EST
abd don't forget to remove duplicate line in SPEC
%{__install} -d $RPM_BUILD_ROOT%{_libdir}/firstaidkit-plugins/examples
Comment 26 Joel Andres Granados 2008-01-11 07:35:50 EST
New Package CVS Request
=======================
Package Name: firstaidkit
Short Description: A tool that automates simple and common system recovery tasks.
Owners: joelGranados, martinSivak
Branches: f8
InitialCC: 
Cvsextras Commits: yes
Comment 27 Kevin Fenzi 2008-01-11 16:45:36 EST
Please use Fedora Account System names? 
Reset fedora-cvs flag when you are ready. 
Comment 28 Joel Andres Granados 2008-01-14 03:25:57 EST
Joel Andres Granados:
Fedora Name: joelGranados
Fedora Account : jgranado

Martin Sivak:
Fedora Name: martinSivak
Fedora Account: msivak

Guess you are refering to what fedora system calls account
(http://fedoraproject.org/wiki/JoelGranados).  right?
Comment 29 Kevin Fenzi 2008-01-14 12:38:48 EST
yes, we need the fedora account names for adding a package to the package
database, not wiki names or the like. 

cvs done.
Comment 30 Joel Andres Granados 2008-01-15 04:00:30 EST
firstaidkit successfully built. closing :)

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