|
|
b308c05 |
# Can, optionaly, be define at build time (see README.RPM)
|
|
|
b308c05 |
# - ocstag : administrative tag
|
|
|
b308c05 |
# - ocsserver : OCS Inventory NG communication serveur
|
|
|
b308c05 |
|
|
|
b308c05 |
Name: ocsinventory-agent
|
|
|
b308c05 |
Summary: Open Computer and Software Inventory Next Generation client
|
|
|
b308c05 |
|
|
|
c52a07c |
Version: 1.1.2
|
|
|
164b14f |
Release: 1%{?dist}%{?ocstag:.%{ocstag}}
|
|
|
b308c05 |
|
|
|
d1835b3 |
Source0: http://launchpad.net/ocsinventory-unix-agent/1.1.x/ocsinventory-unix-agent-%{version}/+download/Ocsinventory-Agent-%{version}.tar.gz
|
|
|
b308c05 |
|
|
|
b308c05 |
Source1: %{name}.logrotate
|
|
|
b308c05 |
Source2: %{name}.cron
|
|
|
b308c05 |
|
|
|
b308c05 |
Source11: %{name}.README
|
|
|
b308c05 |
Source12: %{name}.README.fr
|
|
|
b308c05 |
|
|
|
c165f54 |
Patch1: %{name}-options.patch
|
|
|
c165f54 |
|
|
|
b308c05 |
Group: Development/Libraries
|
|
|
164b14f |
License: GPLv2+
|
|
|
b308c05 |
URL: http://www.ocsinventory-ng.org/
|
|
|
b308c05 |
|
|
|
b308c05 |
BuildArch: noarch
|
|
|
b308c05 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
b308c05 |
|
|
|
c52a07c |
%if 0%{?rhel} != 3
|
|
|
c52a07c |
BuildRequires: perl(Module::Install) perl(XML::SAX)
|
|
|
c52a07c |
%endif
|
|
|
c52a07c |
BuildRequires: perl(XML::Simple) perl(LWP) perl(Net::IP)
|
|
|
c52a07c |
BuildRequires: perl(Digest::MD5) perl(File::Temp)
|
|
|
c52a07c |
|
|
|
b308c05 |
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
|
|
b308c05 |
Requires: net-tools, pciutils
|
|
|
b308c05 |
Requires: %{_sysconfdir}/logrotate.d, %{_sysconfdir}/cron.hourly
|
|
|
c52a07c |
Requires: perl(HTTP::Request)
|
|
|
c52a07c |
Requires: perl(Net::SSLeay) perl(Crypt::SSLeay) perl(Net::IP)
|
|
|
d1835b3 |
Requires: nmap monitor-edid which
|
|
|
c52a07c |
%if 0%{?rhel} == 3
|
|
|
c52a07c |
Requires: perl(XML::Parser)
|
|
|
c52a07c |
%else
|
|
|
c52a07c |
Requires: perl(XML::SAX) perl(Proc::Daemon)
|
|
|
c52a07c |
%endif
|
|
|
c52a07c |
%if 0%{?rhel}%{?fedora} <= 4
|
|
|
d1835b3 |
Requires: kernel-utils
|
|
|
d1835b3 |
%else
|
|
|
d1835b3 |
Requires: smartmontools
|
|
|
d1835b3 |
%endif
|
|
|
b308c05 |
# Optionnal : dmidecode on x86, /proc in ppc
|
|
|
b308c05 |
# Requires: %{_sbindir}/dmidecode
|
|
|
be3be39 |
# Optionnal : ipdiscover or nmap, monitor-edid
|
|
|
164b14f |
# Requires: ocsinventory-ipdiscover, nmap, monitor-edid, bridge-utils
|
|
|
b308c05 |
Obsoletes: ocsinventory-client <= 1.01
|
|
|
b308c05 |
Provides: ocsinventory-client = 1.02
|
|
|
b308c05 |
# use the following line when version is strictly above 1.01
|
|
|
b308c05 |
# ocsinventory-client = %{version}-%{release}
|
|
|
b308c05 |
|
|
|
c52a07c |
%if 0%{?rhel} == 3
|
|
|
c52a07c |
%define perl_vendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)
|
|
|
c52a07c |
%endif
|
|
|
c52a07c |
|
|
|
b308c05 |
|
|
|
b308c05 |
%description
|
|
|
b308c05 |
Open Computer and Software Inventory Next Generation is an application
|
|
|
b308c05 |
designed to help a network or system administrator keep track of computer
|
|
|
b308c05 |
configuration and software installed on the network.
|
|
|
b308c05 |
|
|
|
b308c05 |
It also allows deploying softwares, commands or files on Windows and
|
|
|
b308c05 |
Linux client computers.
|
|
|
b308c05 |
|
|
|
b308c05 |
%{name} provides the client for Linux (Unified Unix Agent).
|
|
|
b308c05 |
|
|
|
b308c05 |
|
|
|
b308c05 |
%description -l fr
|
|
|
b308c05 |
Open Computer and Software Inventory Next Generation est une application
|
|
|
b308c05 |
destinée à aider l'administrateur système ou réseau à garder un oeil sur
|
|
|
b308c05 |
la configuration des machines du réseau et sur les logiciels qui y sont
|
|
|
b308c05 |
installés.
|
|
|
b308c05 |
|
|
|
b308c05 |
Elle autorise aussi la télédiffusion (ou déploiement) de logiciels,
|
|
|
b308c05 |
de commandes ou de fichiers sur les clients Windows ou Linux.
|
|
|
b308c05 |
|
|
|
b308c05 |
%{name} fournit le client pour Linux (Agent Unix Unifié)
|
|
|
b308c05 |
|
|
|
b308c05 |
|
|
|
b308c05 |
%prep
|
|
|
c165f54 |
%setup -q -n Ocsinventory-Agent-%{version}
|
|
|
c165f54 |
|
|
|
164b14f |
%patch1 -p1
|
|
|
c52a07c |
chmod -x lib/Ocsinventory/Agent/Backend/OS/MacOS/Hostname.pm
|
|
|
b308c05 |
|
|
|
b308c05 |
cat <<EOF >%{name}.conf
|
|
|
b308c05 |
#
|
|
|
b308c05 |
# OCS Inventory "Unix Unified Agent" Configuration File
|
|
|
b308c05 |
# used by hourly cron job
|
|
|
b308c05 |
#
|
|
|
1e2141d |
|
|
|
1e2141d |
# Add tools directory if needed (tw_cli, hpacucli, ipssend, ...)
|
|
|
3bd66d9 |
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
|
|
1e2141d |
|
|
|
b308c05 |
%if 0%{?ocsserver:1}
|
|
|
b308c05 |
# Mode, change to "none" to disable
|
|
|
b308c05 |
OCSMODE[0]=cron
|
|
|
b308c05 |
|
|
|
b308c05 |
%else
|
|
|
b308c05 |
# Mode, change to "cron" to activate
|
|
|
b308c05 |
OCSMODE[0]=none
|
|
|
b308c05 |
|
|
|
b308c05 |
%endif
|
|
|
b308c05 |
|
|
|
b308c05 |
# can be used to override the %{name}.cfg setup.
|
|
|
0539fc9 |
# OCSSERVER[0]=your.ocsserver.name
|
|
|
b308c05 |
#
|
|
|
b308c05 |
# corresponds with --local=%{_localstatedir}/lib/%{name}
|
|
|
b308c05 |
# OCSSERVER[0]=local
|
|
|
b308c05 |
|
|
|
b308c05 |
# Wait before inventory
|
|
|
b308c05 |
OCSPAUSE[0]=100
|
|
|
b308c05 |
|
|
|
b308c05 |
# Administrative TAG (optional, must be filed before first inventory)
|
|
|
b308c05 |
OCSTAG[0]=%{?ocstag}
|
|
|
b308c05 |
EOF
|
|
|
b308c05 |
|
|
|
b308c05 |
cat <<EOF >%{name}.cfg
|
|
|
b308c05 |
#
|
|
|
b308c05 |
# OCS Inventory "Unix Unified Agent" Configuration File
|
|
|
b308c05 |
#
|
|
|
b308c05 |
# options used by cron job overides this (see /etc/sysconfig/%{name})
|
|
|
b308c05 |
#
|
|
|
b308c05 |
|
|
|
b308c05 |
%if 0%{?ocsserver:1}
|
|
|
b308c05 |
server = http://%{ocsserver}/ocsinventory
|
|
|
b308c05 |
%else
|
|
|
b308c05 |
# Server URL, unconmment if needed
|
|
|
0539fc9 |
# server = your.ocsserver.name
|
|
|
c165f54 |
local = %{_localstatedir}/lib/%{name}
|
|
|
b308c05 |
%endif
|
|
|
b308c05 |
|
|
|
b308c05 |
# Administrative TAG (optional, must be filed before first inventory)
|
|
|
b308c05 |
# tag = your_tag
|
|
|
b308c05 |
|
|
|
b308c05 |
# How to log, can be File,Stderr,Syslog
|
|
|
b308c05 |
logger = Stderr
|
|
|
b308c05 |
logfile = %{_localstatedir}/log/%{name}/%{name}.log
|
|
|
b308c05 |
EOF
|
|
|
b308c05 |
|
|
|
b308c05 |
cp %{SOURCE11} README.RPM
|
|
|
b308c05 |
cp %{SOURCE12} README.RPM.fr
|
|
|
b308c05 |
|
|
|
b308c05 |
|
|
|
b308c05 |
%build
|
|
|
b308c05 |
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
|
|
b308c05 |
make %{?_smp_mflags}
|
|
|
b308c05 |
|
|
|
b308c05 |
|
|
|
b308c05 |
%install
|
|
|
b308c05 |
rm -rf %{buildroot}
|
|
|
b308c05 |
|
|
|
b308c05 |
make pure_install PERL_INSTALL_ROOT=%{buildroot}
|
|
|
b308c05 |
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
|
|
|
b308c05 |
find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null ';'
|
|
|
b308c05 |
|
|
|
b308c05 |
chmod -R u+rwX,go+rX,go-w %{buildroot}/*
|
|
|
b308c05 |
|
|
|
b308c05 |
# Move exe to root directory
|
|
|
b308c05 |
mv %{buildroot}%{_bindir} %{buildroot}%{_sbindir}
|
|
|
b308c05 |
|
|
|
b308c05 |
%{__mkdir_p} %{buildroot}%{_localstatedir}/{log,lib}/%{name}
|
|
|
b308c05 |
%{__mkdir_p} %{buildroot}%{_sysconfdir}/{logrotate.d,sysconfig,cron.hourly,ocsinventory}
|
|
|
b308c05 |
|
|
|
b308c05 |
%{__install} -pm 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
|
|
b308c05 |
%{__install} -m 644 %{name}.conf %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
|
|
b308c05 |
|
|
|
b308c05 |
sed -e 's;/etc/;%{_sysconfdir}/;' \
|
|
|
b308c05 |
-e 's;/var/;%{_localstatedir}/;' \
|
|
|
b308c05 |
-e 's;/usr/sbin/;%{_sbindir}/;' \
|
|
|
b308c05 |
%{SOURCE2} > %{buildroot}%{_sysconfdir}/cron.hourly/%{name}
|
|
|
b308c05 |
chmod +x %{buildroot}%{_sysconfdir}/cron.hourly/%{name}
|
|
|
b308c05 |
|
|
|
b308c05 |
%{__install} -m 644 %{name}.cfg %{buildroot}%{_sysconfdir}/ocsinventory/%{name}.cfg
|
|
|
164b14f |
%{__install} -m 644 etc/ocsinventory-agent/modules.conf %{buildroot}%{_sysconfdir}/ocsinventory/modules.conf
|
|
|
b308c05 |
|
|
|
b308c05 |
# Remove some unusefull files (which brings unresolvable deps)
|
|
|
b308c05 |
rm -rf %{buildroot}%{perl_vendorlib}/Ocsinventory/Agent/Backend/OS/Win32*
|
|
|
b308c05 |
|
|
|
b308c05 |
# Only need for manual installation
|
|
|
b308c05 |
rm %{buildroot}%{perl_vendorlib}/Ocsinventory/postinst.pl
|
|
|
b308c05 |
|
|
|
b308c05 |
|
|
|
b308c05 |
%clean
|
|
|
b308c05 |
rm -rf %{buildroot}
|
|
|
b308c05 |
|
|
|
b308c05 |
|
|
|
b308c05 |
%files
|
|
|
b308c05 |
%defattr(-, root, root, -)
|
|
|
b308c05 |
%doc AUTHORS Changes LICENSE README THANKS README.RPM
|
|
|
b308c05 |
%lang(fr) %doc README.RPM.fr
|
|
|
b308c05 |
%{perl_vendorlib}/Ocsinventory
|
|
|
b308c05 |
%{_sbindir}/%{name}
|
|
|
b308c05 |
%dir %{_localstatedir}/log/%{name}
|
|
|
b308c05 |
%dir %{_localstatedir}/lib/%{name}
|
|
|
b308c05 |
%dir %{_sysconfdir}/ocsinventory
|
|
|
b308c05 |
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
|
|
b308c05 |
%config(noreplace) %{_sysconfdir}/ocsinventory/%{name}.cfg
|
|
|
164b14f |
%config(noreplace) %{_sysconfdir}/ocsinventory/modules.conf
|
|
|
b308c05 |
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
|
|
b308c05 |
%{_sysconfdir}/cron.hourly/%{name}
|
|
|
164b14f |
%{_mandir}/man1/%{name}*
|
|
|
164b14f |
%{_mandir}/man3/Ocs*
|
|
|
b308c05 |
|
|
|
b308c05 |
|
|
|
b308c05 |
%changelog
|
|
|
c52a07c |
* Sun Jan 03 2010 Remi Collet <Fedora@famillecollet.com> 1.1.2-1
|
|
|
c52a07c |
- update to 1.1.2
|
|
|
c52a07c |
- missing perl(Net::IP) requires
|
|
|
c52a07c |
|
|
|
d1835b3 |
* Tue Dec 22 2009 Remi Collet <Fedora@famillecollet.com> 1.1.1-1
|
|
|
d1835b3 |
- update to 1.1.1
|
|
|
d1835b3 |
|
|
|
164b14f |
* Sat Nov 07 2009 Remi Collet <Fedora@famillecollet.com> 1.1-1
|
|
|
164b14f |
- update to 1.1
|
|
|
164b14f |
- add missing modules.conf
|
|
|
164b14f |
- new Requires perl(Net::SSLeay), perl(Crypt::SSLeay), smartmontools
|
|
|
164b14f |
- download URL to launchpad
|
|
|
164b14f |
|
|
|
630a0d9 |
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-5
|
|
|
630a0d9 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
630a0d9 |
|
|
|
3bd66d9 |
* Thu May 14 2009 Remi Collet <Fedora@famillecollet.com> 1.0.1-4
|
|
|
3bd66d9 |
- fix typo
|
|
|
3bd66d9 |
|
|
|
1e2141d |
* Thu May 14 2009 Remi Collet <Fedora@famillecollet.com> 1.0.1-3
|
|
|
1e2141d |
- define PATH in config (workaround for #500594 + tool path if needed)
|
|
|
1e2141d |
|
|
|
0539fc9 |
* Fri Apr 24 2009 Remi Collet <Fedora@famillecollet.com> 1.0.1-2
|
|
|
0539fc9 |
- update the README.RPM (new configuration file)
|
|
|
0539fc9 |
- change from URL to only servername in config comment
|
|
|
0539fc9 |
|
|
|
63ac38b |
* Sun Mar 29 2009 Remi Collet <Fedora@famillecollet.com> 1.0.1-1
|
|
|
63ac38b |
- update to 1.0.1
|
|
|
63ac38b |
|
|
|
dbc457b |
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.9.2-3
|
|
|
dbc457b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
dbc457b |
|
|
|
090999d |
* Wed Oct 20 2008 Remi Collet <Fedora@famillecollet.com> 0.0.9.2-2
|
|
|
090999d |
- fix FTBFS (#465073)
|
|
|
090999d |
|
|
|
9f2eba1 |
* Sun Apr 20 2008 Remi Collet <Fedora@famillecollet.com> 0.0.9.2-1
|
|
|
9f2eba1 |
- update to 0.0.9.2 (minor bug fix)
|
|
|
9f2eba1 |
|
|
|
be3be39 |
* Mon Apr 07 2008 Remi Collet <Fedora@famillecollet.com> 0.0.9.1-2
|
|
|
be3be39 |
- add Requires monitor-edid
|
|
|
be3be39 |
|
|
|
f35fbfe |
* Thu Apr 03 2008 Remi Collet <Fedora@famillecollet.com> 0.0.9.1-1
|
|
|
f35fbfe |
- update to 0.0.9.1 (minor bug fix)
|
|
|
f35fbfe |
- swicth back to nobundle sources
|
|
|
f35fbfe |
|
|
|
c165f54 |
* Wed Apr 02 2008 Remi Collet <Fedora@famillecollet.com> 0.0.9-1
|
|
|
c165f54 |
- update to 0.0.9 finale
|
|
|
c165f54 |
- provides default config to file (need options.patch)
|
|
|
c165f54 |
- add requires nmap (for ipdiscover)
|
|
|
c165f54 |
- add BR perl(XML::SAX) (to avoid install of bundled one)
|
|
|
c165f54 |
|
|
|
fbe2e9d |
* Mon Mar 10 2008 Remi Collet <Fedora@famillecollet.com> 0.0.8.2-0.6.20080305
|
|
|
fbe2e9d |
- rebuild against perl 5.10
|
|
|
fbe2e9d |
|
|
|
b308c05 |
* Fri Mar 7 2008 Remi Collet <Fedora@famillecollet.com> 0.0.8.2-0.5.20080305
|
|
|
b308c05 |
- patches from review (Patrice Dumas)
|
|
|
b308c05 |
|
|
|
b308c05 |
* Wed Mar 5 2008 Remi Collet <Fedora@famillecollet.com> 0.0.8.2-0.4.20080305
|
|
|
b308c05 |
- update to 2008-03-05
|
|
|
b308c05 |
- add /etc/sysconfig/ocsinventory-agent config file for cron job
|
|
|
b308c05 |
|
|
|
b308c05 |
* Mon Mar 3 2008 Remi Collet <Fedora@famillecollet.com> 0.0.8.2-0.3.20080302
|
|
|
b308c05 |
- only enable cron when server is configured
|
|
|
b308c05 |
|
|
|
b308c05 |
* Sun Mar 2 2008 Remi Collet <Fedora@famillecollet.com> 0.0.8.2-0.2.20080302
|
|
|
b308c05 |
- from Review, see #435593
|
|
|
b308c05 |
|
|
|
b308c05 |
* Sun Mar 2 2008 Remi Collet <Fedora@famillecollet.com> 0.0.8.2-0.1.20080302
|
|
|
b308c05 |
- update to 0.0.8.2 from CVS
|
|
|
b308c05 |
|
|
|
b308c05 |
* Fri Feb 22 2008 Remi Collet <Fedora@famillecollet.com> 0.0.8.2-0.1.20080222
|
|
|
b308c05 |
- update to 0.0.8.2 from CVS
|
|
|
b308c05 |
|
|
|
b308c05 |
* Sun Feb 17 2008 Remi Collet <Fedora@famillecollet.com> 0.0.8.1-0.1.20080217
|
|
|
b308c05 |
- update to 0.0.8.1 from CVS
|
|
|
b308c05 |
- change config file used
|
|
|
b308c05 |
from /etc/ocsinventory-agent/ocsinv.conf
|
|
|
b308c05 |
to /etc/ocsinventory/ocsinventory-agent.cfg
|
|
|
b308c05 |
|
|
|
b308c05 |
* Sat Jan 26 2008 Remi Collet <Fedora@famillecollet.com> 0.0.7-1
|
|
|
b308c05 |
- update to 0.0.7
|
|
|
b308c05 |
|
|
|
b308c05 |
* Sat Dec 28 2007 Remi Collet <Fedora@famillecollet.com> 0.0.6.2-1
|
|
|
b308c05 |
- update to 0.0.6.2
|
|
|
b308c05 |
|
|
|
b308c05 |
* Mon Apr 16 2007 Remi Collet <Fedora@famillecollet.com> 0.0.6-1
|
|
|
b308c05 |
- update to 0.0.6
|
|
|
b308c05 |
|
|
|
b308c05 |
* Sat Feb 10 2007 Remi Collet <Fedora@famillecollet.com> 0.0.5-0.20070409
|
|
|
b308c05 |
- cvs update 20070409
|
|
|
b308c05 |
- create cron.daily file
|
|
|
b308c05 |
- create logrotate.d file
|
|
|
b308c05 |
- create ocsinv.conf
|
|
|
b308c05 |
- cvs update 20070405
|
|
|
b308c05 |
- cvs update 20070403
|
|
|
b308c05 |
|
|
|
b308c05 |
* Sat Feb 10 2007 Remi Collet <Fedora@famillecollet.com> 0.0.2-0.20070210
|
|
|
b308c05 |
- initial spec
|