Bug 435593 - Review Request: ocsinventory-agent - Open Computer and Software Inventory Next Generation client
Review Request: ocsinventory-agent - Open Computer and Software Inventory Ne...
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Patrice Dumas
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-02 04:01 EST by Remi Collet
Modified: 2008-03-08 15:44 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-08 15:44:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
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 04:14 EST, 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 04:15 EST, Patrice Dumas
no flags Details | Diff

  None (edit)
Description Remi Collet 2008-03-02 04:01:39 EST
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 04:06:07 EST
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 05:34:26 EST
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 05:38:05 EST
Shouldn't postinst.pl be installed under _sbindir (with a better
name)?
Comment 4 Remi Collet 2008-03-02 06:04:05 EST
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 08:14:07 EST
(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 13:59:08 EST
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 18:50:35 EST
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 18:51:24 EST
Also in the first comment, it should be README.RPM instead of
README.fedora.
Comment 9 Remi Collet 2008-03-03 01:16:24 EST
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 06:10:23 EST
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 11:28:55 EST
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 15:15:01 EST
clearning cvs flag here until this is re-approved. 
Comment 13 Patrice Dumas 2008-03-03 15:18:12 EST
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 01:25:00 EST
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 16:01:24 EST
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 04:12:55 EST
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 04:14:08 EST
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 04:15:07 EST
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 13:21:19 EST
> 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 08:35:44 EST
You should remove /home/extras/SOURCES/ in the generate tarball
comment.

Any reapproved.
Comment 21 Remi Collet 2008-03-08 09:18:32 EST
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 14:39:46 EST
cvs done.

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