rpms/ocsinventory-client/devel .cvsignore, 1.2, 1.3 ocsinventory-client.README, 1.1, 1.2 ocsinventory-client.README.fr, 1.1, 1.2 ocsinventory-client.patch, 1.1, 1.2 ocsinventory-client.spec, 1.2, 1.3 sources, 1.2, 1.3

Remi Collet (remi) fedora-extras-commits at redhat.com
Sun Jan 28 08:25:18 UTC 2007


Author: remi

Update of /cvs/extras/rpms/ocsinventory-client/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29182

Modified Files:
	.cvsignore ocsinventory-client.README 
	ocsinventory-client.README.fr ocsinventory-client.patch 
	ocsinventory-client.spec sources 
Log Message:
	- update to 1.0 Final
	- add sleep in cron task (time balancing for large network)
	- build for RHEL2
	- switch back from sed to perl (no sed -i on RHEL2)
	- add manual perl requires on RHEL2
	- grep output of dmidecode (no --version option available on older distro)



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/ocsinventory-client/devel/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .cvsignore	30 Nov 2006 06:04:25 -0000	1.2
+++ .cvsignore	28 Jan 2007 08:24:47 -0000	1.3
@@ -1 +1 @@
-OCSNG_LINUX_AGENT_1.0RC3.tar.gz
+OCSNG_LINUX_AGENT_1.0.tar.gz


Index: ocsinventory-client.README
===================================================================
RCS file: /cvs/extras/rpms/ocsinventory-client/devel/ocsinventory-client.README,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ocsinventory-client.README	30 Nov 2006 06:04:25 -0000	1.1
+++ ocsinventory-client.README	28 Jan 2007 08:24:47 -0000	1.2
@@ -10,7 +10,7 @@
 	/etc/ocsinventory-client/ocsinv.conf
 
 Change the line
-	<OCSFSERVER>local</OCSFSERVER>
+	<OCSFSERVER>__local__</OCSFSERVER>
 To
 	<OCSFSERVER>ocsserver.domain.tld:port</OCSFSERVER>
 


Index: ocsinventory-client.README.fr
===================================================================
RCS file: /cvs/extras/rpms/ocsinventory-client/devel/ocsinventory-client.README.fr,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ocsinventory-client.README.fr	30 Nov 2006 06:04:25 -0000	1.1
+++ ocsinventory-client.README.fr	28 Jan 2007 08:24:47 -0000	1.2
@@ -10,7 +10,7 @@
 	/etc/ocsinventory-client/ocsinv.conf
 
 Modifiez la ligne
-	<OCSFSERVER>local</OCSFSERVER>
+	<OCSFSERVER>__local__</OCSFSERVER>
 en
 	<OCSFSERVER>ocsserver.domain.tld:port</OCSFSERVER>
 

ocsinventory-client.patch:

Index: ocsinventory-client.patch
===================================================================
RCS file: /cvs/extras/rpms/ocsinventory-client/devel/ocsinventory-client.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ocsinventory-client.patch	30 Nov 2006 06:04:25 -0000	1.1
+++ ocsinventory-client.patch	28 Jan 2007 08:24:47 -0000	1.2
@@ -1,8 +1,8 @@
---- Ocsinventory/ocsinventory-client.pl.fedora	2006-07-03 22:27:03.000000000 +0200
-+++ Ocsinventory/ocsinventory-client.pl	2006-11-28 19:04:59.000000000 +0100
-@@ -35,7 +35,8 @@
+--- Ocsinventory/ocsinventory-client.pl.fedora	2007-01-28 08:24:43.000000000 +0100
++++ Ocsinventory/ocsinventory-client.pl	2007-01-28 08:29:29.000000000 +0100
+@@ -38,7 +38,8 @@
  #
- use constant VERSION =>13;
+ use constant VERSION =>15;
  #
 -my $log_path		= "/var/log/ocsinventory-client/ocsinv.log";
 +my $log_folder		= "/var/log/ocsinventory-client";
@@ -10,55 +10,32 @@
  my $default_server	= "ocsinventory-ng";
  my $install_path	= "/etc/ocsinventory-client";
  my $exe_path		= "/usr/sbin";
-@@ -263,9 +264,6 @@
+@@ -306,6 +307,9 @@
  	}elsif(-e "/etc/mandrake-release"){
  		$distro = 'Mandrake';
  		$distro_file = "/etc/mandrake-release";
--	}elsif(-e "/etc/redhat-release"){
--		$distro = 'Redhat';
--		$distro_file = "/etc/redhat-release";
- 	}elsif(-e "/etc/SuSE-release"){
- 		$distro = 'SuSe';
- 		$distro_file = "/etc/SuSE-release";
-@@ -276,11 +274,14 @@
++	}elsif(-e "/etc/fedora-release"){
++	   	$distro = 'Fedora';
++		$distro_file = "/etc/fedora-release";
+ 	}elsif(-e "/etc/redhat-release"){
+ 		$distro = 'Redhat';
+ 		$distro_file = "/etc/redhat-release";
+@@ -318,9 +322,6 @@
+ 	}elsif(-e "/etc/knoppix_version"){
  		$distro = 'Knoppix'; 
  		$distro_file = "/etc/knoppix_version";
- 	}elsif(-e "/etc/fedora-release"){
+-	}elsif(-e "/etc/fedora-release"){
 -	   	$distro = 'Fedora Core';
-+	   	$distro = 'Fedora';
- 		$distro_file = "/etc/fedora-release";
+-		$distro_file = "/etc/fedora-release";
  	}elsif(-e "/etc/trustix-release"){
  	   	$distro = 'Trustix';
  		$distro_file = "/etc/trustix-release";
-+	}elsif(-e "/etc/redhat-release"){
-+		$distro = 'Redhat';
-+		$distro_file = "/etc/redhat-release";
- 	}
- 	
- 	open DISTRO, $distro_file;
-@@ -713,6 +714,7 @@
- 
- sub _monitors{
- 	# Looking for XFConfig
-+	-e "/etc/X11/xorg.conf" and $xfree = "/etc/X11/xorg.conf";
- 	-e "/etc/X11/XF86Config" and $xfree = "/etc/X11/XF86Config";
- 	-e "/etc/X11/XF86Config-4" and $xfree = "/etc/X11/XF86Config-4";
- 	-e "/etc/XF86Config" and $xfree = "/etc/XF86Config";
-@@ -846,7 +848,7 @@
- 		my $dpkg_path = &_get_path('dpkg');
- 		@liste = `$dpkg_path -l`;
- 		$dpkg = 1;
--	}elsif($distro=~/mandrake|redhat|suse/i){
-+	}elsif($distro=~/mandrake|redhat|fedora|suse/i){
- 		my $rpm_path = &_get_path('rpm');
- 		my $buff;
- 		foreach(`rpm -qa --queryformat "%{NAME} %{VERSION}-%{RELEASE} %{SUMMARY}\n--\n"`) {
-@@ -894,23 +896,16 @@
+@@ -1003,23 +1004,15 @@
  
  	# If $ServerName is local, we know that the inventory is generated on the local machine
- 	if(($ServerName eq 'local') or $xml){
+ 	if(($ServerName eq '__local__') or $xml){
 -		$err=1;
- 
+-
 -		while($err){
 -			print "\n\n\tChoose your target directory ? :  ";
 -
@@ -80,7 +57,7 @@
  				open XML, ">$ptmontage/$DeviceID.ocs" or die localtime()." => Cannot create file : $!\n";
  
  				if($xml){
-@@ -924,8 +919,6 @@
+@@ -1033,8 +1026,6 @@
  				close XML;
  			}
  


Index: ocsinventory-client.spec
===================================================================
RCS file: /cvs/extras/rpms/ocsinventory-client/devel/ocsinventory-client.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ocsinventory-client.spec	30 Nov 2006 06:33:22 -0000	1.2
+++ ocsinventory-client.spec	28 Jan 2007 08:24:47 -0000	1.3
@@ -1,4 +1,4 @@
-%define tarname OCSNG_LINUX_AGENT_1.0RC3
+%define tarname OCSNG_LINUX_AGENT_1.0
 
 # Can, optionaly, be define at build time (see README.fedora)
 # - ocstag    : administrative tag
@@ -8,7 +8,7 @@
 
 Name:      ocsinventory-client
 Version:   1.0
-Release:   0.6.RC3%{?dist}%{?ocstag:.}%{?ocstag}
+Release:   1%{?dist}%{?ocstag:.}%{?ocstag}
 Summary:   Open Computer and Software Inventory Next Generation client
 
 Group:     Development/Libraries
@@ -28,9 +28,28 @@
 %else
 %define perl_vendorlib  %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)
 %endif
-Requires:  perl(HTTP::Request)
-Requires:  %{_sbindir}/dmidecode, coreutils, net-tools, pciutils
+Requires:  %{_sbindir}/dmidecode, net-tools, pciutils
 Requires:  %{_sysconfdir}/logrotate.d, %{_sysconfdir}/cron.daily
+%if "%{?rhel}0" == "20"
+# No auto-requires on RHEL2
+Requires: perl(Compress::Zlib)  
+Requires: perl(Exporter)  
+Requires: perl(Fcntl)  
+Requires: perl(File::Path)  
+Requires: perl(Net::IP)  
+Requires: perl(Net::SSLeay)  
+Requires: perl(Socket)  
+Requires: perl(XML::Simple)  
+Requires: perl(constant)  
+Requires: perl(strict)  
+# Dosen't work when this extension installed
+Conflicts: perl-XML-SAX
+# No virtual provides for this
+Requires: perl-Digest-MD5 perl-libwww-perl
+%else
+# Only vitual provides (but not detected) on non RHEL2
+Requires:  perl(HTTP::Request)
+%endif
 
 %description
 Open Computer and Software Inventory Next Generation is an application
@@ -56,14 +75,14 @@
 %prep
 %setup -q -n %{tarname}
 %patch0 -p0 -b .fedora
-%{__sed} -i -e 's/\r//' changelogs
+%{__perl} -pi -e 's/\r//' changelogs
 
 cat <<EOF >ocsinv.conf
 <CONF>
   <DEVICEID>OCS_AGENT_DEVICE_ID</DEVICEID>
-  <DMIVERSION>$(%{_sbindir}/dmidecode --version)</DMIVERSION>
+  <DMIVERSION>$(%{_sbindir}/dmidecode 2>/dev/null | grep "# dmidecode" | cut -d' ' -f3)</DMIVERSION>
   <IPDISCOVER_VERSION>3</IPDISCOVER_VERSION>
-  <OCSFSERVER>%{?ocsserver}%{!?ocsserver:local}</OCSFSERVER>
+  <OCSFSERVER>%{?ocsserver}%{!?ocsserver:__local__}</OCSFSERVER>
   <UPDATE>0</UPDATE>
 </CONF>
 EOF
@@ -79,10 +98,13 @@
 
 cat <<EOF >cron
 #!/bin/sh
+# Time balancing - Wait up to 10mn
+sleep \$((RANDOM % 600 + 1))
+# Do Inventory
 %{_sbindir}/ocsinventory-client.pl &>/dev/null
 EOF
 
-%{__sed} -i -e 's|PATH_TO_LOG_DIRECTORY|%{_localstatedir}/log/%{name}|' logrotate.ocsinventory-client
+%{__perl} -pi -e 's|PATH_TO_LOG_DIRECTORY|%{_localstatedir}/log/%{name}|' logrotate.ocsinventory-client
 
 cp %{SOURCE1} README.fedora
 cp %{SOURCE2} README.fedora.fr
@@ -126,7 +148,10 @@
 if [ "$1" -eq "1" ]
 then   
     OCS_AGENT_DEVICE_ID=$(hostname)-$(date +%%Y-%%m-%%d-%%H-%%M-%%S)
-    %{__sed} -i -e "s/OCS_AGENT_DEVICE_ID/$OCS_AGENT_DEVICE_ID/" %{_sysconfdir}/%{name}/ocsinv.conf
+    %{__perl} -pi -e "s/OCS_AGENT_DEVICE_ID/$OCS_AGENT_DEVICE_ID/" %{_sysconfdir}/%{name}/ocsinv.conf
+else
+# Update from RC3
+    %{__perl} -pi -e "s/>local</>__local__</" %{_sysconfdir}/%{name}/ocsinv.conf
 fi
 
 %files
@@ -144,6 +169,16 @@
 
 
 %changelog
+* Sun Jan 28 2007 Remi Collet <Fedora at famillecollet.com> 1.0-1
+- update to 1.0 Final
+- add sleep in cron task (time balancing for large network)
+
+* Tue Jan 09 2007 Remi Collet <Fedora at famillecollet.com> 1.0-0.7.RC3
+- build for RHEL2
+- switch back from sed to perl (no sed -i on RHEL2)
+- add manual perl requires on RHEL2
+- grep output of dmidecode (no --version option available on older distro)
+
 * Thu Nov 30 2006 Remi Collet <Fedora at famillecollet.com> 1.0-0.6.RC3
 - ExclusiveArch: i386 x86_64 (no dmidecode on other arch)
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/ocsinventory-client/devel/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources	30 Nov 2006 06:04:25 -0000	1.2
+++ sources	28 Jan 2007 08:24:47 -0000	1.3
@@ -1 +1 @@
-34edd057f1937245d06c3515c0ff50ad  OCSNG_LINUX_AGENT_1.0RC3.tar.gz
+2103290f3dd7e02f9174899d22a2dc3c  OCSNG_LINUX_AGENT_1.0.tar.gz




More information about the fedora-extras-commits mailing list