Bug 435593 - Review Request: ocsinventory-agent - Open Computer and Software Inventory Next Generation client
Summary: Review Request: ocsinventory-agent - Open Computer and Software Inventory Ne...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Patrice Dumas
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-02 09:01 UTC by Remi Collet
Modified: 2008-03-08 20:44 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-03-08 20:44:20 UTC
Type: ---
Embargoed:
pertusus: fedora-review+
kevin: fedora-cvs+


Attachments (Terms of Use)
set the local and server options only if they are set (616 bytes, patch)
2008-03-07 09:14 UTC, Patrice Dumas
no flags Details | Diff
set server or local in the .cfg file, use rpm macros for cron script (1.96 KB, patch)
2008-03-07 09:15 UTC, Patrice Dumas
no flags Details | Diff

Description Remi Collet 2008-03-02 09:01:39 UTC
Spec URL: http://remi.fedorapeople.org/ocsinventory-agent.spec
SRPM URL: http://remi.fedorapeople.org/ocsinventory-agent-0.0.8.2-0.1.20080302.fc8.remi.src.rpm
Mock log: http://remi.fedorapeople.org/ocsinventory-agent-build.log

Description: 
Open Computer and Software Inventory Next Generation is an application
designed to help a network or system administrator keep track of computer
configuration and software installed on the network.

It also allows deploying softwares, commands or files on Windows and
Linux client computers.

ocsinventory-agent provide the client for Linux (Unified Unix Agent).


-------
rpmlint is silent
build in mock (rawhide)

Note : i submit the SVN version because I need some new option for packaging (--wait and --lazy).

Comment 1 Remi Collet 2008-03-02 09:06:07 UTC
Patrice, i put you in CC as you have reviewed ocsinventory-client which is
obsoleted by this new package (#217275).

I used this new agent in "production" for more than 1 year and I like to push
this "official" OCS new client in Fedora and EPEL.

It will be great to have it on the repo at the same time than official
annoucement on OCS web site.

Regards.

Comment 2 Patrice Dumas 2008-03-02 10:34:26 UTC
Missing BR perl(Digest::MD5) and perl(File::Temp). 

You should not use fedora in the README file names, but instead
something that can be in any derived package, so something like
distribution (and in my opinion it is better to avoid writing 
Fedora as much as possible because of potential trademark issues).

Obsoletes: ocsinventory-client <= 1.01
is right, but
Provides:  ocsinventory-client = %{version}-%{release}
is wrong since version is 0.0.8.2, so it provides a version older 
than the obsoleted version. I am not completly sure what to do in 
that case. I see 2 possibilities
* have 
Provides:  ocsinventory-client = 1.02
# use the following line when version is strictly above 1.01
# ocsinventory-client = %{version}-%{release}

* no uncommented Provides but the following comment:
# as soon as version is strictly above 1.01 uncomment the following line 
# ocsinventory-client = %{version}-%{release}



The cvs -z3 co command should use a date or a tag such that the 
same code is checked out in the future.


Comment 3 Patrice Dumas 2008-03-02 10:38:05 UTC
Shouldn't postinst.pl be installed under _sbindir (with a better
name)?

Comment 4 Remi Collet 2008-03-02 11:04:05 UTC
Yes i forget postinst.pl

I think i should simply remove it as .cfg is provided and the use of this script
may conflict with rpm stuff (mainly the cron.d != cron.hourly).

About ocsinventory-client, i'm thinking of using epoch (i must check if this is ok)
ocsinventory-client = 1:%{version}-%{release}

I haven't add perl(Digest::MD5) and perl(File::Temp) because provided by perl
main packages, but i will add it (in case of a package split).

Thank's for the quick feedback.

Comment 5 Patrice Dumas 2008-03-02 13:14:07 UTC
(In reply to comment #4)
> Yes i forget postinst.pl
> 
> I think i should simply remove it as .cfg is provided and the use of this script
> may conflict with rpm stuff (mainly the cron.d != cron.hourly).

Indeed. Or patch it if it is worth it. 

> About ocsinventory-client, i'm thinking of using epoch (i must check if this
is ok)
> ocsinventory-client = 1:%{version}-%{release}

It is possible, but it would be better, in my opinion to avoid
epochs. 



Comment 6 Remi Collet 2008-03-02 18:59:08 UTC
Spec URL: http://remi.fedorapeople.org/ocsinventory-agent.spec
SRPM URL:
http://remi.fedorapeople.org/ocsinventory-agent-0.0.8.2-0.2.20080302.fc8.src.rpm

- Fix CVS command in comment
- Fix BR
- Provides:  ocsinventory-client = 1.02
- rename to README.RPM (as it provides information for RPM customisation)


Comment 7 Patrice Dumas 2008-03-02 23:50:35 UTC
It is a bit strange to use svn in the tarball name when it is a
cvs snapshot.

Otherwise I checked the source, it is the same.

In the description, I believe it should be 'provides':

%{name} provides the client for Linux (Unified Unix Agent).

* rpmlint is silent
* follow packaging guidelines
* sane provides and requires
* %files section right
* free software, license included


APPROVED. But please consider renaming svn to cvs.

Comment 8 Patrice Dumas 2008-03-02 23:51:24 UTC
Also in the first comment, it should be README.RPM instead of
README.fedora.

Comment 9 Remi Collet 2008-03-03 06:16:24 UTC
Thanks for the review.


New Package CVS Request
=======================
Package Name: ocsinventory-agent
Short Description: Open Computer and Software Inventory Next Generation client
Owners: remi
Branches: F-8, F-7, EL-5, EL-4
InitialCC: 
Cvsextras Commits:yes


Comment 10 Patrice Dumas 2008-03-03 11:10:23 UTC
After some thinking and testing, I think there is something
wrong with enabling the cron job automatically. 
A user may want to use the software without having it run 
automatically.

You can either isolate the cron file in a subpackage, or have
a file in /etc/sysconfig sourced in the cron script with
a variable which value has to be changed for ocs to be run
in te cron script. In that case you can also do a subpackage 
with a /etc/sysconfig/ocs... file with the variable set.

Comment 11 Remi Collet 2008-03-03 16:28:55 UTC
In fact i work with upstream to merge the old "client" config file in the main
new .cfg and to avoid having 2 config files.

One proposal was to have a "mode" option in the config which can be set to :
none, hourly, daily, weekly or service. But this is wasn't accepted.

I will propose, for the RPM to enable the cron when "server" is configured.

So after installation, mode is "local", so cron is installed but deactivated.

Also, add comments in the config file.

See : 
Spec URL: http://remi.fedorapeople.org/ocsinventory-agent.spec
SRPM URL:
http://remi.fedorapeople.org/ocsinventory-agent-0.0.8.2-0.3.20080302.fc8.src.rpm

What about this "simple" solution ?

Comment 12 Kevin Fenzi 2008-03-03 20:15:01 UTC
clearning cvs flag here until this is re-approved. 

Comment 13 Patrice Dumas 2008-03-03 20:18:12 UTC
I think that it makes sense to have a different config file for
the cron file and for ocsinventory-agent itself. I will try to do 
a patch tomorrow that does a file for ocs cron file and set 
the file content according to %ocsserver.

Comment 14 Remi Collet 2008-03-04 06:25:00 UTC
OK.

Probably we can't take the old launcher in ocsinventory-client, change path to 
/etc/sysconfig/ocsinventory-agent and add a OCSMODE option (none, cron,
daemon...). In a future release we'll can also add an daemon mode (not enough
mature in this upstream release)

Having OCSPAUSE (wait parameter) as an option (back) will be usefull too.

I'm also thinking a way to give multiple servers in this config (usefull in some
case to send inventory to more than 1 server, and new tree in /var/lib allow
it). Well in this case the provided .cfg will become unused, except for manual
inventory.

I will be AFK for the next 2 days, I will work on this Wednesday evening.

Regards

Comment 15 Remi Collet 2008-03-05 21:01:24 UTC
Spec URL: http://remi.fedorapeople.org/ocsinventory-agent.spec
SRPM URL:
http://remi.fedorapeople.org/ocsinventory-agent-0.0.8.2-0.4.20080305.fc8.src.rpm
Mock log: http://remi.fedorapeople.org/ocsinventory-agent-build.log

Changes :
- update to 2008-03-05
- add /etc/sysconfig/ocsinventory-agent config file for cron job


Comment 16 Patrice Dumas 2008-03-07 09:12:55 UTC
I think that the local and server config in the cfg file should not
be overriden by the sysconfig file in the default case. But it 
could be possible to override them, especially if you have multiple
config in the sysconfig file. 

I propose patches for the spec file and the cron script to do that. 

In the spec diff, I also added a sed substitution on the cron script
to use the rpm macros (and added a -p to an install).

Comment 17 Patrice Dumas 2008-03-07 09:14:08 UTC
Created attachment 297152 [details]
set the local and server options only if they are set

also this is a bash script, it uses a lot of bashisms.

Comment 18 Patrice Dumas 2008-03-07 09:15:07 UTC
Created attachment 297153 [details]
set server or local in the .cfg file, use rpm macros for cron script

Comment 19 Remi Collet 2008-03-07 18:21:19 UTC
> bashisms
I hope this is not copyrighted.. I love this term ;)

Spec URL: http://remi.fedorapeople.org/ocsinventory-agent.spec
SRPM URL:
http://remi.fedorapeople.org/ocsinventory-agent-0.0.8.2-0.5.20080305.fc8.src.rpm

- patches included
- remove "local" from .cfg (because priority is higher than "server" option from
command line)

Actually, running from command line try to contact "hardcoded" server.
I will work with upstream to have command line option "server" working if
"local" option in config file.

Comment 20 Patrice Dumas 2008-03-08 13:35:44 UTC
You should remove /home/extras/SOURCES/ in the generate tarball
comment.

Any reapproved.


Comment 21 Remi Collet 2008-03-08 14:18:32 UTC
New Package CVS Request
=======================
Package Name: ocsinventory-agent
Short Description: Open Computer and Software Inventory Next Generation client
Owners: remi
Branches: F-8, F-7, EL-5, EL-4
InitialCC: 
Cvsextras Commits:yes


Comment 22 Kevin Fenzi 2008-03-08 19:39:46 UTC
cvs done.


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