mirror of
https://abf.rosa.ru/djam/ocsinventory-agent.git
synced 2025-04-30 09:39:02 +00:00
Automatic import for version 1.1.2.1
This commit is contained in:
commit
742c0ef5f3
6 changed files with 293 additions and 0 deletions
2
.abf.yml
Normal file
2
.abf.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
sources:
|
||||||
|
"Ocsinventory-Agent-1.1.2.1.tar.gz": ff8395bd281ddfdb9c3f9106b51aa75ac542f169
|
|
@ -0,0 +1,16 @@
|
||||||
|
diff -Naur -x '*~' Ocsinventory-Agent-1.1.2-fix-xen-dom0-identification/lib/Ocsinventory/Agent/Backend/Virtualization/Vmsystem.pm Ocsinventory-Agent-1.1.2-add-bios-informations-for-xen-pv-hosts//lib/Ocsinventory/Agent/Backend/Virtualization/Vmsystem.pm
|
||||||
|
--- Ocsinventory-Agent-1.1.2-fix-xen-dom0-identification/lib/Ocsinventory/Agent/Backend/Virtualization/Vmsystem.pm 2010-05-27 14:26:13.253368333 +0200
|
||||||
|
+++ Ocsinventory-Agent-1.1.2-add-bios-informations-for-xen-pv-hosts//lib/Ocsinventory/Agent/Backend/Virtualization/Vmsystem.pm 2010-05-27 14:37:34.641105626 +0200
|
||||||
|
@@ -90,6 +90,12 @@
|
||||||
|
} else {
|
||||||
|
# domU PV host
|
||||||
|
$status = "Xen";
|
||||||
|
+
|
||||||
|
+ # those information can't be extracted from dmidecode
|
||||||
|
+ $inventory->setBios ({
|
||||||
|
+ SMANUFACTURER => 'Xen',
|
||||||
|
+ SMODEL => 'PVM domU'
|
||||||
|
+ });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
19
Ocsinventory-Agent-1.1.2-fix-dmidecode-version-test.patch
Normal file
19
Ocsinventory-Agent-1.1.2-fix-dmidecode-version-test.patch
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
diff -Naur -x '*~' Ocsinventory-Agent-1.1.2/lib/Ocsinventory/Agent/Backend/Virtualization/Vmsystem.pm Ocsinventory-Agent-1.1.2-fix-dmidecode-version-test/lib/Ocsinventory/Agent/Backend/Virtualization/Vmsystem.pm
|
||||||
|
--- Ocsinventory-Agent-1.1.2/lib/Ocsinventory/Agent/Backend/Virtualization/Vmsystem.pm 2010-01-03 16:04:59.000000000 +0100
|
||||||
|
+++ Ocsinventory-Agent-1.1.2-fix-dmidecode-version-test/lib/Ocsinventory/Agent/Backend/Virtualization/Vmsystem.pm 2010-05-27 13:51:24.597391924 +0200
|
||||||
|
@@ -44,13 +44,14 @@
|
||||||
|
##
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
+use version;
|
||||||
|
|
||||||
|
sub check {
|
||||||
|
if ( can_run("zoneadm")){ # Is a solaris zone system capable ?
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if ( can_run ("dmidecode") ) { # 2.6 and under haven't -t parameter
|
||||||
|
- if ( `dmidecode -V 2>/dev/null` >= 2.7 ) {
|
||||||
|
+ if ( version->parse(`dmidecode -V 2>/dev/null`) >= version->parse('v2.7') ) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
41
Ocsinventory-Agent-1.1.2-fix-syslog-usage.patch
Normal file
41
Ocsinventory-Agent-1.1.2-fix-syslog-usage.patch
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
diff -Naur -x '*~' Ocsinventory-Agent-1.1.2/lib/Ocsinventory/Agent/Config.pm Ocsinventory-Agent-1.1.2-fix-syslog-usage//lib/Ocsinventory/Agent/Config.pm
|
||||||
|
--- Ocsinventory-Agent-1.1.2/lib/Ocsinventory/Agent/Config.pm 2010-01-03 16:04:59.000000000 +0100
|
||||||
|
+++ Ocsinventory-Agent-1.1.2-fix-syslog-usage//lib/Ocsinventory/Agent/Config.pm 2010-04-29 10:12:35.000000000 +0200
|
||||||
|
@@ -16,6 +16,7 @@
|
||||||
|
'local' => '',
|
||||||
|
#'logger' => 'Syslog,File,Stderr',
|
||||||
|
'logger' => 'Stderr',
|
||||||
|
+ 'logfacility' => 'LOG_USER',
|
||||||
|
'logfile' => '',
|
||||||
|
'password' => '',
|
||||||
|
'proxy' => '',
|
||||||
|
diff -Naur -x '*~' Ocsinventory-Agent-1.1.2/lib/Ocsinventory/LoggerBackend/Syslog.pm Ocsinventory-Agent-1.1.2-fix-syslog-usage//lib/Ocsinventory/LoggerBackend/Syslog.pm
|
||||||
|
--- Ocsinventory-Agent-1.1.2/lib/Ocsinventory/LoggerBackend/Syslog.pm 2010-01-03 16:04:59.000000000 +0100
|
||||||
|
+++ Ocsinventory-Agent-1.1.2-fix-syslog-usage//lib/Ocsinventory/LoggerBackend/Syslog.pm 2010-04-29 11:58:59.000000000 +0200
|
||||||
|
@@ -7,10 +7,8 @@
|
||||||
|
|
||||||
|
my $self = {};
|
||||||
|
|
||||||
|
- setlogsock('unix');
|
||||||
|
- openlog("ocs-agent", 'cons,pid', $ENV{'USER'});
|
||||||
|
+ openlog("ocs-agent", 'cons,pid', $params->{config}->{logfacility});
|
||||||
|
syslog('debug', 'syslog backend enabled');
|
||||||
|
- closelog();
|
||||||
|
|
||||||
|
bless $self;
|
||||||
|
}
|
||||||
|
@@ -24,10 +22,12 @@
|
||||||
|
|
||||||
|
return if $message =~ /^$/;
|
||||||
|
|
||||||
|
- openlog("ocs-agent", 'cons,pid', $ENV{'USER'});
|
||||||
|
syslog('info', $message);
|
||||||
|
- closelog();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
+sub DESTROY {
|
||||||
|
+ closelog();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
1;
|
55
Ocsinventory-Agent-1.1.2-fix-xen-dom0-identification.patch
Normal file
55
Ocsinventory-Agent-1.1.2-fix-xen-dom0-identification.patch
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
diff -Naur -x '*~' Ocsinventory-Agent-1.1.2/lib/Ocsinventory/Agent/Backend/Virtualization/Vmsystem.pm Ocsinventory-Agent-1.1.2-fix-xen-dom0-identification/lib/Ocsinventory/Agent/Backend/Virtualization/Vmsystem.pm
|
||||||
|
--- Ocsinventory-Agent-1.1.2/lib/Ocsinventory/Agent/Backend/Virtualization/Vmsystem.pm 2010-01-03 16:04:59.000000000 +0100
|
||||||
|
+++ Ocsinventory-Agent-1.1.2-fix-xen-dom0-identification/lib/Ocsinventory/Agent/Backend/Virtualization/Vmsystem.pm 2010-05-27 14:26:13.253368333 +0200
|
||||||
|
@@ -77,17 +77,19 @@
|
||||||
|
$found = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- # paravirtualized oldstyle Xen - very simple ;)
|
||||||
|
- if(-d '/proc/xen') {
|
||||||
|
- $status = "Xen";
|
||||||
|
+ if (
|
||||||
|
+ -d '/proc/xen' ||
|
||||||
|
+ check_file_content(
|
||||||
|
+ '/sys/devices/system/clocksource/clocksource0/available_clocksource',
|
||||||
|
+ 'xen'
|
||||||
|
+ )
|
||||||
|
+ ) {
|
||||||
|
$found = 1 ;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- # newstyle Xen
|
||||||
|
- if($found == 0 and -r '/sys/devices/system/clocksource/clocksource0/available_clocksource') {
|
||||||
|
- if(`cat /sys/devices/system/clocksource/clocksource0/available_clocksource` =~ /xen/) {
|
||||||
|
+ if (check_file_content('/proc/xen/capabilities', 'control_d')) {
|
||||||
|
+ # dom0 host
|
||||||
|
+ } else {
|
||||||
|
+ # domU PV host
|
||||||
|
$status = "Xen";
|
||||||
|
- $found = 1 ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -209,4 +211,22 @@
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
+sub check_file_content {
|
||||||
|
+ my ($file, $pattern) = @_;
|
||||||
|
+
|
||||||
|
+ return 0 unless -r $file;
|
||||||
|
+
|
||||||
|
+ my $found = 0;
|
||||||
|
+ open (my $fh, '<', $file) or die "Can't open file $file: $!";
|
||||||
|
+ while (my $line = <$fh>) {
|
||||||
|
+ if ($line =~ /$pattern/) {
|
||||||
|
+ $found = 1;
|
||||||
|
+ last;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ close ($fh);
|
||||||
|
+
|
||||||
|
+ return $found;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
1;
|
160
ocsinventory-agent.spec
Normal file
160
ocsinventory-agent.spec
Normal file
|
@ -0,0 +1,160 @@
|
||||||
|
Name: ocsinventory-agent
|
||||||
|
Version: 1.1.2.1
|
||||||
|
Release: %mkrel 2
|
||||||
|
Epoch: 1
|
||||||
|
Summary: Unified client for OCS-Inventory
|
||||||
|
License: GPLv2+
|
||||||
|
Group: System/Servers
|
||||||
|
URL: http://www.ocsinventory-ng.org/
|
||||||
|
Source0: http://launchpad.net/ocsinventory-unix-agent/stable/ocsinventory-unix-agent-1.1.2/+download/Ocsinventory-Agent-%{version}.tar.gz
|
||||||
|
Patch0: Ocsinventory-Agent-1.1.2-fix-syslog-usage.patch
|
||||||
|
Patch1: Ocsinventory-Agent-1.1.2-fix-dmidecode-version-test.patch
|
||||||
|
Patch2: Ocsinventory-Agent-1.1.2-fix-xen-dom0-identification.patch
|
||||||
|
Patch3: Ocsinventory-Agent-1.1.2-add-bios-informations-for-xen-pv-hosts.patch
|
||||||
|
Requires: net-tools
|
||||||
|
Requires: pciutils
|
||||||
|
Requires: nmap
|
||||||
|
Requires: monitor-edid
|
||||||
|
Requires: dmidecode >= 2.6
|
||||||
|
Requires: perl-Net-IP
|
||||||
|
Suggests: perl-Net-CUPS
|
||||||
|
Suggests: perl-Proc-Daemon
|
||||||
|
Suggests: ipmitool
|
||||||
|
Obsoletes: ocsng-linux-agent
|
||||||
|
Obsoletes: perl-Ocsinventory
|
||||||
|
BuildArch: noarch
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}
|
||||||
|
|
||||||
|
%description
|
||||||
|
Linux agent for ocs-inventory. Dialog between client computers and management
|
||||||
|
server is based on actual standards, HTTP protocol and XML data formatting.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n Ocsinventory-Agent-%{version}
|
||||||
|
%patch0 -p 1
|
||||||
|
%patch1 -p 1
|
||||||
|
%patch2 -p 1
|
||||||
|
%patch3 -p 1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
||||||
|
%make
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
rm -f run-postinst
|
||||||
|
%makeinstall_std
|
||||||
|
|
||||||
|
install -d %{buildroot}%{_sbindir}
|
||||||
|
mv %{buildroot}%{_bindir}/* %{buildroot}%{_sbindir}/
|
||||||
|
|
||||||
|
install -d -m 755 %{buildroot}%{_sysconfdir}/ocsinventory
|
||||||
|
cat > %{buildroot}%{_sysconfdir}/ocsinventory/ocsinventory-agent.cfg<<EOF
|
||||||
|
basevardir = %{_localstatedir}/lib/ocsinventory-agent
|
||||||
|
logger = File
|
||||||
|
logfile = %{_localstatedir}/log/ocsinventory-agent/ocsinventory-agent.log
|
||||||
|
EOF
|
||||||
|
|
||||||
|
install -d -m 755 %{buildroot}%{_sysconfdir}/cron.daily
|
||||||
|
cat > %{buildroot}%{_sysconfdir}/cron.daily/ocsinventory-agent<<EOF
|
||||||
|
#!/bin/sh
|
||||||
|
%{_sbindir}/ocsinventory-agent --lazy > /dev/null 2>&1
|
||||||
|
EOF
|
||||||
|
chmod +x %{buildroot}%{_sysconfdir}/cron.daily/ocsinventory-agent
|
||||||
|
|
||||||
|
install -d %{buildroot}%{_sysconfdir}/logrotate.d
|
||||||
|
cat > %{buildroot}%{_sysconfdir}/logrotate.d/ocsinventory-agent<<EOF
|
||||||
|
/var/log/ocsinventory-agent/*.log {
|
||||||
|
missingok
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
install -d %{buildroot}%{_localstatedir}/lib/ocsinventory-agent
|
||||||
|
install -d %{buildroot}%{_localstatedir}/log/ocsinventory-agent
|
||||||
|
|
||||||
|
# cleanup
|
||||||
|
rm -f %{buildroot}%{perl_vendorlib}/Ocsinventory/postinst.pl
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root, root)
|
||||||
|
%doc AUTHORS Changes LICENSE README THANKS
|
||||||
|
%{_sbindir}/%{name}
|
||||||
|
%{_mandir}/man1/%{name}.*
|
||||||
|
%{_mandir}/man3/Ocsinventory::Agent::XML::Inventory.3pm*
|
||||||
|
%{perl_vendorlib}/Ocsinventory
|
||||||
|
%config(noreplace) %{_sysconfdir}/cron.daily/%{name}
|
||||||
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||||
|
%config(noreplace) %{_sysconfdir}/ocsinventory
|
||||||
|
%{_localstatedir}/log/%{name}
|
||||||
|
%{_localstatedir}/lib/%{name}
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Feb 04 2011 Guillaume Rousse <guillomovitch@mandriva.org> 1:1.1.2.1-2mdv2011.0
|
||||||
|
+ Revision: 635830
|
||||||
|
- fix cron task (bug #61969)
|
||||||
|
|
||||||
|
* Sat Nov 27 2010 Guillaume Rousse <guillomovitch@mandriva.org> 1:1.1.2.1-1mdv2011.0
|
||||||
|
+ Revision: 601954
|
||||||
|
- new version
|
||||||
|
|
||||||
|
* Mon Jun 14 2010 Guillaume Rousse <guillomovitch@mandriva.org> 1:1.1.2-4mdv2011.0
|
||||||
|
+ Revision: 548020
|
||||||
|
- drop useless explicit dependencies
|
||||||
|
- cleanup space and tabs mixture
|
||||||
|
|
||||||
|
* Mon Jun 14 2010 Anne Nicolas <ennael@mandriva.org> 1:1.1.2-4mdv2010.1
|
||||||
|
+ Revision: 547999
|
||||||
|
- Fix requires and suggests (#59459)
|
||||||
|
|
||||||
|
* Sat May 29 2010 Guillaume Rousse <guillomovitch@mandriva.org> 1:1.1.2-3mdv2010.1
|
||||||
|
+ Revision: 546575
|
||||||
|
- patch1: fix dmidecode version test
|
||||||
|
- patch2: fix xen dom0 identification
|
||||||
|
- patch3: add bios information for xen PV hosts
|
||||||
|
- suggests optional perl modules and tools (fix #59459)
|
||||||
|
|
||||||
|
* Thu Apr 29 2010 Guillaume Rousse <guillomovitch@mandriva.org> 1:1.1.2-2mdv2010.1
|
||||||
|
+ Revision: 540800
|
||||||
|
- patch0: fix syslog usage
|
||||||
|
- new version
|
||||||
|
- fix cron task
|
||||||
|
|
||||||
|
* Mon Nov 30 2009 Guillaume Rousse <guillomovitch@mandriva.org> 1.02-2mdv2010.1
|
||||||
|
+ Revision: 471940
|
||||||
|
- ensure cron script is executable
|
||||||
|
|
||||||
|
* Sat Jun 06 2009 Guillaume Rousse <guillomovitch@mandriva.org> 1.02-1mdv2010.0
|
||||||
|
+ Revision: 383255
|
||||||
|
- new version
|
||||||
|
- merge perl package, no need for a distinct one
|
||||||
|
- use herein document whenever possible
|
||||||
|
- switch to a daily cron job, as per default installation
|
||||||
|
|
||||||
|
* Sun May 10 2009 Guillaume Rousse <guillomovitch@mandriva.org> 1.0.1-1mdv2010.0
|
||||||
|
+ Revision: 373950
|
||||||
|
- new version
|
||||||
|
- drop patches, not needed anymore
|
||||||
|
|
||||||
|
* Fri Aug 08 2008 Thierry Vignaud <tv@mandriva.org> 0.0.9.2-2mdv2009.0
|
||||||
|
+ Revision: 268323
|
||||||
|
- rebuild early 2009.0 package (before pixel changes)
|
||||||
|
|
||||||
|
+ Pixel <pixel@mandriva.com>
|
||||||
|
- adapt to %%_localstatedir now being /var instead of /var/lib (#22312)
|
||||||
|
|
||||||
|
* Thu May 15 2008 Oden Eriksson <oeriksson@mandriva.com> 0.0.9.2-1mdv2009.0
|
||||||
|
+ Revision: 207628
|
||||||
|
- remove versioned deps
|
||||||
|
|
||||||
|
* Wed May 14 2008 Oden Eriksson <oeriksson@mandriva.com> 0.0.9.2-0.1mdv2009.0
|
||||||
|
+ Revision: 207254
|
||||||
|
- import ocsinventory-agent
|
||||||
|
|
||||||
|
|
||||||
|
* Wed May 14 2008 Oden Eriksson <oeriksson@mandriva.com> 0.0.9.2-0.1mdv2009.0
|
||||||
|
- initial Mandriva package (requested by psycocat)
|
||||||
|
- used the fedora package as a start
|
Loading…
Add table
Reference in a new issue