# Prevent /usr/lib/rpm/check-buildroot from running # because the only remedy we've found to silence its error messages # also corrupts the .so files it complains about. %define __arch_install_post /usr/lib/rpm/check-rpaths # Filter some specific requires by name %global __provides_exclude ^perl.* %global __requires_exclude (^perl.*|/usr/bin/perl) Name: ocsinventory-agent-allinone Version: 2.6.0 Release: 6%{?dist} Summary: Relocatable OCSInventory Agent License: GPL, MIT, and others URL: https://ocsinventory-ng.org/ Source0: relocatable-perl.tar.bz2 Source1: perl-5.30.0.tar.gz Source99: monitor-edid-3.2.tar.gz Source100: Ocsinventory-Unix-Agent-2.6.0.tar.gz Source101: modules-0.04.tar.gz Source102: Encode-Locale-1.05.tar.gz Source103: HTTP-Date-6.02.tar.gz Source104: File-Listing-6.04.tar.gz Source105: HTML-Tagset-3.20.tar.gz Source106: HTML-Parser-3.72.tar.gz Source107: Test-Needs-0.002006.tar.gz Source108: Test-RequiresInternet-0.05.tar.gz Source109: Try-Tiny-0.30.tar.gz Source110: Test-Fatal-0.014.tar.gz Source111: URI-1.76.tar.gz Source112: LWP-MediaTypes-6.04.tar.gz Source113: IO-HTML-1.001.tar.gz Source114: HTTP-Message-6.18.tar.gz Source115: HTTP-Cookies-6.04.tar.gz Source116: ExtUtils-MakeMaker-7.36.tar.gz Source117: ExtUtils-Config-0.008.tar.gz Source118: ExtUtils-InstallPaths-0.012.tar.gz Source119: ExtUtils-Helpers-0.026.tar.gz Source120: Module-Build-Tiny-0.039.tar.gz Source121: HTTP-Daemon-6.05.tar.gz Source122: HTTP-Negotiate-6.01.tar.gz Source123: Net-HTTP-6.19.tar.gz Source124: WWW-RobotRules-6.02.tar.gz Source125: libwww-perl-6.39.tar.gz Source126: Data-Dump-1.23.tar.gz Source127: File-Temp-0.2309.tar.gz Source128: Net-IP-1.26.tar.gz Source129: Digest-MD5-2.55.tar.gz Source130: Data-UUID-1.224.tar.gz Source131: Net-SSLeay-1.88.tar.gz Source132: YAML-Tiny-1.73.tar.gz Source133: inc-latest-0.500.tar.gz Source134: Module-Build-0.4229.tar.gz Source135: Test-Requires-0.10.tar.gz Source136: Module-ScanDeps-1.27.tar.gz Source137: File-Remove-1.58.tar.gz Source138: Path-Class-0.37.tar.gz Source139: IO-Interactive-Tiny-0.2.tar.gz Source140: Module-Install-1.19.tar.gz Source141: Test-Simple-1.302167.tar.gz Source142: Importer-0.025.tar.gz Source143: Term-Table-0.013.tar.gz Source144: Sub-Info-0.002.tar.gz Source145: Module-Pluggable-5.2.tar.gz Source146: Scope-Guard-0.21.tar.gz Source147: Test2-Suite-0.000125.tar.gz Source148: Crypt-DES-2.07.tar.gz Source149: Digest-HMAC-1.03.tar.gz Source150: Digest-SHA1-2.13.tar.gz Source151: Net-SNMP-v6.0.1.tar.gz Source152: Proc-ProcessTable-0.59.tar.gz Source153: Proc-Daemon-0.23.tar.gz Source154: Mozilla-CA-20180117.tar.gz Source155: IO-Socket-SSL-2.066.tar.gz Source156: LWP-Protocol-https-6.07.tar.gz Source157: Test-UseAllModules-0.17.tar.gz Source158: Net-Netmask-1.9104.tar.gz Source159: Crypt-SSLeay-0.72a.tar.gz Source160: XML-NamespaceSupport-1.12.tar.gz Source161: XML-SAX-Base-1.09.tar.gz Source162: XML-SAX-1.02.tar.gz Source163: XML-Parser-2.44.tar.gz Source164: XML-SAX-Expat-0.51.tar.gz Source165: XML-SAX-ExpatXS-1.33.tar.gz Source166: XML-Simple-2.25.tar.gz Source167: Proc-PID-File-1.29.tar.gz Source168: Net-CUPS-0.64.tar.gz Source169: XML-Twig-3.52.tar.gz Source170: Compress-Raw-Zlib-2.087.tar.gz Source171: Compress-Raw-Bzip2-2.087.tar.gz Source172: Spiffy-0.46.tar.gz Source173: Algorithm-Diff-1.1903.tar.gz Source174: Text-Diff-1.45.tar.gz Source175: Test-Base-0.89.tar.gz Source176: Test-YAML-1.07.tar.gz Source177: Test-Deep-1.128.tar.gz Source178: IO-Compress-2.087.tar.gz Source179: Nmap-Parser-1.37.tar.gz Source180: YAML-1.29.tar.gz Source181: Module-Runtime-0.016.tar.gz Source182: Time-HiRes-1.9760.tar.gz Source183: Net-Ping-2.72.tar.gz Source184: common-sense-3.74.tar.gz Source185: PathTools-3.75.tar.gz Source186: Clone-0.43.tar.gz Source187: IO-String-1.08.tar.gz Source188: Hook-LexWrap-0.26.tar.gz Source189: Test-NoWarnings-1.04.tar.gz Source190: Test-Object-0.08.tar.gz Source191: Test-SubCalls-1.10.tar.gz Source192: Params-Util-1.07.tar.gz Source193: Task-Weaken-1.06.tar.gz Source194: Class-Inspector-1.36.tar.gz Source195: AutoLoader-5.74.tar.gz Source196: ExtUtils-Constant-0.25.tar.gz Source197: HTML-Tree-5.07.tar.gz Source198: Locale-Maketext-1.28.tar.gz Source199: XSLoader-0.24.tar.gz Source200: Sub-Name-0.26.tar.gz Source201: Sub-Uplevel-0.2800.tar.gz Source202: Capture-Tiny-0.48.tar.gz Source203: Test-Warn-0.36.tar.gz Source204: Test-Warnings-0.028.tar.gz Source205: Test-FailWarnings-0.008.tar.gz Source206: CPAN-Meta-Requirements-2.140.tar.gz Source207: CPAN-Meta-Check-0.014.tar.gz Source208: File-pushd-1.016.tar.gz Source209: Module-CPANfile-1.1004.tar.gz Source210: Class-Accessor-0.51.tar.gz Source211: Data-Binary-0.01.tar.gz Source212: CPAN-DistnameInfo-0.12.tar.gz Source213: Text-Template-1.58.tar.gz Source214: ExtUtils-MakeMaker-CPANfile-0.09.tar.gz Source215: Sub-Install-0.928.tar.gz Source216: Scalar-List-Utils-1.54.tar.gz Source217: Data-OptList-0.110.tar.gz Source218: Sub-Exporter-0.987.tar.gz Source219: MRO-Compat-0.13.tar.gz Source220: Data-Section-0.200007.tar.gz Source221: Software-License-0.103014.tar.gz Source222: Regexp-Trie-0.02.tar.gz Source223: Class-XSAccessor-1.19.tar.gz Source224: File-Find-Object-0.3.5.tar.gz Source225: Module-CoreList-5.20200120.tar.gz Source226: CPAN-Meta-2.150010.tar.gz Source227: Perl-PrereqScanner-NotQuiteLite-0.9909.tar.gz Source228: Array-Diff-0.09.tar.gz Source229: IO-1.42.tar.gz Source230: IO-Zlib-1.10.tar.gz Source231: File-Path-2.16.tar.gz Source232: Time-Local-1.30.tar.gz Source233: Archive-Zip-1.67.tar.gz Source234: Archive-Tar-2.36.tar.gz Source235: Archive-Any-Lite-0.11.tar.gz Source236: Module-Find-0.15.tar.gz Source237: Module-CPANTS-Analyse-1.01.tar.gz Source238: Test-Kwalitee-1.28.tar.gz Source239: Parse-EDID-1.0.7.tar.gz Source240: PPI-1.270.tar.gz # Make sure this is the last of the long source list Source399: Perl-Strip-1.1.tar.gz Source400: ocsinventory-agent.service Source401: ocsinventory-agent-onboot.timer Source402: ocsinventory-agent-hourly.timer Source403: ocsinventory-agent-daily.timer Source404: ocsinventory-agent.logrotate Source405: ocsinventory-agent.cron # Private Perl Patches Patch000: 000-static-link-perl.patch Patch001: 001-no-web-requires.patch # OCS Patches Patch500: 500-fix-download.patch BuildRequires: bash bzip2-devel coreutils findutils gcc gcc-c++ gdbm-devel sed BuildRequires: glibc-common groff-base libdb-devel make procps tar zlib-devel BuildRequires: perl-interpreter chrpath findutils cups-devel cups-filters-devel BuildRequires: libxml2-devel libstdc++-devel dos2unix openssl openssl-devel BuildRequires: expat-devel grep BuildRequires: perl(Devel::PatchPerl) BuildRequires: perl(IPC::Run3) %ifarch %{ix86} x86_64 ia64 Requires: dmidecode %endif %ifarch %{ix86} x86_64 Requires: libx86 BuildRequires: libx86-devel %endif Requires: %{_sysconfdir}/logrotate.d Requires: net-tools Requires: pciutils Requires: smartmontools Requires: which %if 0%{?fedora} >= 25 || 0%{?rhel} >= 8 Suggests: nmap %endif %if 0%{?rhel} >= 7 BuildRequires: systemd %else BuildRequires: systemd-rpm-macros %endif # one for runtime and one for postscript actions Requires: systemd Requires(post): systemd Obsoletes: ocsinventory-client < %{version} Provides: ocsinventory-client = %{version}-%{release} Provides: ocsinventory-agent = %{version}-%{release} %description This is an all-in-one OCSInventory Agent that includes its own private perl and utilities. %prep %setup -q -n relocatable-perl %patch000 -p1 %patch001 -p1 %build cat <ocsinventory-agent.sysconf # # OCS Inventory "Unix Unified Agent" Configuration File # used by the ocsinventory-agent.service and # related timers. # # Add tools directory if needed (tw_cli, hpacucli, ipssend, ...) PATH=/sbin:/bin:/usr/sbin:/usr/bin %if 0%{?ocsserver:1} # Mode, change to "none" to disable OCSMODE[0]=cron # used to override the ocsinventory-agent.cfg setup. OCSSERVER[0]=%{ocsserver} # runs in addition to the remote report # corresponds with --local=%{_localstatedir}/lib/ocsinventory-agent # OCSSERVER[1]=local %else # Mode, change to "cron" to activate OCSMODE[0]=none # can be used to override the %{name}.cfg setup. # OCSSERVER[0]=your.ocsserver.name # # corresponds with --local=%{_localstatedir}/lib/ocsinventory-agent # OCSSERVER[0]=local %endif # Wait before inventory OCSPAUSE[0]=100 # Administrative TAG (optional, must be filed before first inventory) OCSTAG[0]=%{?ocstag} # If you need an HTTP/HTTPS proxy, fill this out # OCSPROXYSERVER='http://user:pass@proxy:port' EOF cat <ocsinventory-agent.cfg # # OCS Inventory "Unix Unified Agent" Configuration File # # options used by timers or /etc/sysconfig/ocsinventory-agent overide these. # # Server URL, unconmment if needed # server = your.ocsserver.name local = %{_localstatedir}/lib/ocsinventory-agent # Administrative TAG (optional, must be filed before first inventory) # tag = %{?ocsserver:yourtag} # How to log, can be File,Stderr,Syslog logger = Stderr logfile = %{_localstatedir}/log/ocsinventory-agent/ocsinventory-agent.log EOF %install # We actually compile here so use default build flags %set_build_flags # Size, not speed is the issue here CFLAGS="${CFLAGS} -Os" export CFLAGS CXXFLAGS="${CXXFLAGS} -Os" export CXXFLAGS mkdir -p %{buildroot}/%{_libexecdir}/ocsinventory-agent/ perl build/relocatable-perl-build --tarball %{SOURCE1} --prefix=%{buildroot}/%{_libexecdir}/ocsinventory-agent/ --jobs 4 || (cat /tmp/perl-build-*.log ; exit 1) for module in %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE104} %{SOURCE105} %{SOURCE106} %{SOURCE107} %{SOURCE108} %{SOURCE109} %{SOURCE110} %{SOURCE111} %{SOURCE112} %{SOURCE113} %{SOURCE114} %{SOURCE115} %{SOURCE116} %{SOURCE117} %{SOURCE118} %{SOURCE119} %{SOURCE120} %{SOURCE121} %{SOURCE122} %{SOURCE123} %{SOURCE124} %{SOURCE125} %{SOURCE126} %{SOURCE127} %{SOURCE128} %{SOURCE129} %{SOURCE130} %{SOURCE131} %{SOURCE132} %{SOURCE133} %{SOURCE134} %{SOURCE135} %{SOURCE136} %{SOURCE137} %{SOURCE138} %{SOURCE139} %{SOURCE140} %{SOURCE141} %{SOURCE142} %{SOURCE143} %{SOURCE144} %{SOURCE145} %{SOURCE146} %{SOURCE147} %{SOURCE148} %{SOURCE149} %{SOURCE150} %{SOURCE151} %{SOURCE152} %{SOURCE153} %{SOURCE154} %{SOURCE155} %{SOURCE156} %{SOURCE157} %{SOURCE158} %{SOURCE159} %{SOURCE160} %{SOURCE161} %{SOURCE162} %{SOURCE163} %{SOURCE164} %{SOURCE165} %{SOURCE166} %{SOURCE167} %{SOURCE168} %{SOURCE169} %{SOURCE170} %{SOURCE171} %{SOURCE172} %{SOURCE173} %{SOURCE174} %{SOURCE175} %{SOURCE176} %{SOURCE177} %{SOURCE178} %{SOURCE179} %{SOURCE180} %{SOURCE181} %{SOURCE182} %{SOURCE183} %{SOURCE184} %{SOURCE185} %{SOURCE186} %{SOURCE187} %{SOURCE188} %{SOURCE189} %{SOURCE190} %{SOURCE191} %{SOURCE192} %{SOURCE193} %{SOURCE194} %{SOURCE195} %{SOURCE196} %{SOURCE197} %{SOURCE198} %{SOURCE199} %{SOURCE200} %{SOURCE201} %{SOURCE202} %{SOURCE203} %{SOURCE204} %{SOURCE205} %{SOURCE206} %{SOURCE207} %{SOURCE208} %{SOURCE209} %{SOURCE210} %{SOURCE211} %{SOURCE212} %{SOURCE213} %{SOURCE214} %{SOURCE215} %{SOURCE216} %{SOURCE217} %{SOURCE218} %{SOURCE219} %{SOURCE220} %{SOURCE221} %{SOURCE222} %{SOURCE223} %{SOURCE224} %{SOURCE225} %{SOURCE226} %{SOURCE227} %{SOURCE228} %{SOURCE229} %{SOURCE230} %{SOURCE231} %{SOURCE232} %{SOURCE233} %{SOURCE234} %{SOURCE235} %{SOURCE236} %{SOURCE237} %{SOURCE238} %{SOURCE239} %{SOURCE240} do ( date tar xf ${module} mydir=$(tar tf ${module} | head -1 | sed 's|\./||' | cut -d'/' -f1) cd ${mydir} if [[ -e Makefile.PL ]]; then echo "Setup build for ${module}" %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/perl Makefile.PL < /dev/null echo "make for ${module}" make set +e # rpm exits if something returns non-zero # These modules don't run tests well in mock SKIP_TESTS=$(echo ${module} | grep -E 'IO-Socket-SSL|Net-Ping|Example') if [[ $? -eq 0 ]]; then echo "skipping 'make test' for ${module}" else set -e echo "------------------------------------------" echo "make test for ${module}" echo "------------------------------------------" make test fi set -e make pure_install elif [[ -e Build.PL ]]; then # old style builds echo "Setup build for ${module}" %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/perl Build.PL echo "make for ${module}" ./Build echo "------------------------------------------" echo "make test for ${module}" echo "------------------------------------------" ./Build test ./Build install else echo "Cannot build ${module}" exit 1 fi ) done for module in %{SOURCE399} do ( date tar xf ${module} mydir=$(tar tf ${module} | head -1 | sed 's|\./||' | cut -d'/' -f1) cd ${mydir} if [[ -e Makefile.PL ]]; then echo "Setup build for ${module}" %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/perl Makefile.PL < /dev/null echo "make for ${module}" make set +e # rpm exits if something returns non-zero # These modules don't run tests well in mock SKIP_TESTS=$(echo ${module} | grep -E 'IO-Socket-SSL|Net-Ping|Example') if [[ $? -eq 0 ]]; then echo "skipping 'make test' for ${module}" else set -e echo "------------------------------------------" echo "make test for ${module}" echo "------------------------------------------" make test fi set -e make pure_install elif [[ -e Build.PL ]]; then # old style builds echo "Setup build for ${module}" %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/perl Build.PL echo "make for ${module}" ./Build echo "------------------------------------------" echo "make test for ${module}" echo "------------------------------------------" ./Build test ./Build install else echo "Cannot build ${module}" exit 1 fi ) done # Open up monitor-edid and build a private copy ( %ifarch %{ix86} x86_64 # Remove -Wl,--as-needed from LDFLAGS as that is not compatible with libx86 LDFLAGS=$(echo ${LDFLAGS} | sed -e 's/-Wl,--as-needed//') export LDFLAGS %endif tar xf %{SOURCE99} cd monitor-edid-3.2 make make install bindir=%{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/ sbindir=%{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/ rm -f %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/monitor-probe* ) date if [[ -e %{buildroot}/%{_libexecdir}/ocsinventory-agent/lib/perl5/5.30.0/%{_arch}-linux/Config_heavy.pl ]]; then sed -i -e 's|%{buildroot}||g' %{buildroot}/%{_libexecdir}/ocsinventory-agent/lib/perl5/5.30.0/%{_arch}-linux/Config_heavy.pl else ls -l %{buildroot}/%{_libexecdir}/ocsinventory-agent/lib/perl5/5.30.0/%{_arch}-linux/ fi if [[ -e %{buildroot}/%{_libexecdir}/ocsinventory-agent/lib/perl5/5.30.0/%{_arch}-linux/CORE/config.h ]]; then sed -i -e 's|%{buildroot}||g' %{buildroot}/%{_libexecdir}/ocsinventory-agent/lib/perl5/5.30.0/%{_arch}-linux/CORE/config.h else ls -l %{buildroot}/%{_libexecdir}/ocsinventory-agent/lib/perl5/5.30.0/%{_arch}-linux/CORE/ fi # SOURCE100 is actually OCS inventory, so do it last or things might break for module in %{SOURCE100}; do ( date tar xf ${module} mydir=$(tar tf ${module} | head -1 | sed 's|\./||' | cut -d'/' -f1) cd ${mydir} patch -p1 < %{PATCH500} if [[ -e Makefile.PL ]]; then echo "Setup build for ${module}" %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/perl Makefile.PL echo "make for ${module}" make echo "------------------------------------------" echo "make test for ${module}" echo "------------------------------------------" make test make pure_install elif [[ -e Build.PL ]]; then echo "Setup build for ${module}" %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/perl Build.PL echo "make for ${module}" ./Build echo "------------------------------------------" echo "make test for ${module}" echo "------------------------------------------" ./Build test ./Build install else echo "Cannot build ${module}" exit 1 fi ) done date mkdir -p %{buildroot}%{_sbindir} # clean up wonky "binaries" we don't need mv %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/monitor-parse-edid %{buildroot}/ mv %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/monitor-edid %{buildroot}/ mv %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/monitor-get* %{buildroot}/ mv %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/perl %{buildroot}/ mv %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/perlstrip ./ mv %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/ocsinventory-agent %{buildroot}/%{_sbindir}/ rm -rf %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/* mv %{buildroot}/perl %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/perl mv %{buildroot}/monitor-parse-edid %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/ mv %{buildroot}/monitor-edid %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/ mv %{buildroot}/monitor-get* %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/ # quiet SAX warning ( cd %{buildroot}/usr/libexec/ocsinventory-agent/lib/perl5/site_perl/5*/XML/SAX touch ParserDetails.ini ) # Fix perl path sed -i -e 's|%{buildroot}||g' %{buildroot}/%{_sbindir}/ocsinventory-agent sed -i -e 's|/usr/bin/perl|%{_libexecdir}/ocsinventory-agent/bin/perl|g' %{buildroot}/%{_sbindir}/ocsinventory-agent for perl_program in $(cd %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/ ; grep -l '/usr/bin/perl' *); do ( cd %{buildroot}/%{_libexecdir}/ocsinventory-agent/bin/ sed -i -e 's|/usr/bin/perl|%{_libexecdir}/ocsinventory-agent/bin/perl|g' ${perl_program} ) done # make things writable to me so I can mess with them..... find %{buildroot} -type f -exec chmod u+w {} \; # fix debuginfo and rpath find %{buildroot} -type f -name \*.so -exec chrpath --delete {} \; # Remove permissions for any non-root access find %{buildroot} -type f -exec chmod g-rwx {} \; find %{buildroot} -type f -exec chmod o-rwx {} \; # clean up doc we don't need rm -rf %{buildroot}/%{_libexecdir}/ocsinventory-agent/man find %{buildroot} -type f -name .packlist -delete find %{buildroot} -type f -name \*.pod -exec rm {} \; find %{buildroot} -type d | sort -r | xargs -i rmdir {} >/dev/null 2>&1 || : date find %{buildroot} -name *.pm | sort | xargs -i ./perlstrip -v --size {} find %{buildroot} -name *.pl | sort | xargs -i -exec ./perlstrip -v --size {} mkdir -p %{buildroot}/%{_unitdir} install -pm 644 %{SOURCE400} %{buildroot}/%{_unitdir}/ install -pm 644 %{SOURCE401} %{buildroot}/%{_unitdir}/ install -pm 644 %{SOURCE402} %{buildroot}/%{_unitdir}/ install -pm 644 %{SOURCE403} %{buildroot}/%{_unitdir}/ mkdir -p %{buildroot}%{_localstatedir}/{log,lib}/ocsinventory-agent mkdir -p %{buildroot}%{_localstatedir}/lib/ocsinventory-agent/download mkdir -p %{buildroot}%{_sysconfdir}/{logrotate.d,sysconfig,ocsinventory/softwares} ocsdir=$(tar tf %{SOURCE100} | head -1 | sed 's|\./||' | cut -d'/' -f1) cp -pr ${ocsdir}/snmp %{buildroot}%{_localstatedir}/lib/ocsinventory-agent/snmp find %{buildroot}%{_localstatedir}/lib/ocsinventory-agent/snmp -type f -exec dos2unix {} {} \; install -m 640 ocsinventory-agent.sysconf %{buildroot}/%{_sysconfdir}/sysconfig/ocsinventory-agent install -m 640 ocsinventory-agent.cfg %{buildroot}/%{_sysconfdir}/ocsinventory/ocsinventory-agent.cfg install -m 644 ${ocsdir}/etc/ocsinventory-agent/modules.conf %{buildroot}/%{_sysconfdir}/ocsinventory/modules.conf install -pm 644 %{SOURCE404} %{buildroot}%{_sysconfdir}/logrotate.d/ocsinventory-agent install -pm 700 %{SOURCE405} %{buildroot}%{_libexecdir}/ocsinventory-agent/ocsinventory-agent.cron mkdir -p %{buildroot}/%{_var}/log/ocsinventory-agent %post # See if sysadmin requested ocs agent run on boot %systemd_post ocsinventory-agent-onboot.timer # See if sysadmin requested ocs agent hourly run %systemd_post ocsinventory-agent-hourly.timer # See if sysadmin requested ocs agent daily run %systemd_post ocsinventory-agent-daily.timer %files %defattr(-, root, root, 0700) %{_libexecdir}/ocsinventory-agent/bin/perl %{_libexecdir}/ocsinventory-agent/bin/monitor-parse-edid %{_libexecdir}/ocsinventory-agent/bin/monitor-edid %{_libexecdir}/ocsinventory-agent/bin/monitor-get* %{_libexecdir}/ocsinventory-agent/lib %{_libexecdir}/ocsinventory-agent/ocsinventory-agent.cron %config(noreplace) %{_sysconfdir}/sysconfig/ocsinventory-agent %config(noreplace) %{_sysconfdir}/logrotate.d/ocsinventory-agent %config(noreplace) %{_sysconfdir}/ocsinventory/ocsinventory-agent.cfg %config(noreplace) %{_sysconfdir}/ocsinventory/modules.conf %dir %{_sysconfdir}/ocsinventory %dir %{_sysconfdir}/ocsinventory/softwares %dir %{_localstatedir}/lib/ocsinventory-agent %dir /%{_var}/log/ocsinventory-agent %{_sbindir}/ocsinventory-agent %{_localstatedir}/lib/ocsinventory-agent/download %{_localstatedir}/lib/ocsinventory-agent/snmp %{_unitdir}/* %changelog * Wed Aug 26 2020 Pat Riehecky 2.6.0-6 - More graceful under error conditions * Wed Feb 19 2020 Pat Riehecky 2.6.0-5 - Also permit proxy easily * Wed Feb 12 2020 Pat Riehecky 2.6.0-2 - Also load monitor-edid into the private tools area