summaryrefslogtreecommitdiff
path: root/app-admin/ocsinventory-agent
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-11-10 22:34:27 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-11-10 22:34:27 +0000
commit04b35f566703f8bb84d52e8d2ff2f0f54c21900b (patch)
tree8c04f83d8fb3c828c1eea4e4bc7ac14a4e902661 /app-admin/ocsinventory-agent
parenta6611f9bc959724ec73dbaa6f1c608698c387a8c (diff)
gentoo auto-resync : 10:11:2023 - 22:34:26
Diffstat (limited to 'app-admin/ocsinventory-agent')
-rw-r--r--app-admin/ocsinventory-agent/Manifest8
-rw-r--r--app-admin/ocsinventory-agent/files/modules.conf10
-rw-r--r--app-admin/ocsinventory-agent/files/ocsinventory-agent.cfg1
-rw-r--r--app-admin/ocsinventory-agent/files/ocsinventory-agent.crond1
-rw-r--r--app-admin/ocsinventory-agent/files/ocsinventory-agent.service10
-rw-r--r--app-admin/ocsinventory-agent/files/ocsinventory-agent.timer11
-rw-r--r--app-admin/ocsinventory-agent/metadata.xml10
-rw-r--r--app-admin/ocsinventory-agent/ocsinventory-agent-2.10.0.ebuild54
8 files changed, 105 insertions, 0 deletions
diff --git a/app-admin/ocsinventory-agent/Manifest b/app-admin/ocsinventory-agent/Manifest
new file mode 100644
index 000000000000..5149d63a0242
--- /dev/null
+++ b/app-admin/ocsinventory-agent/Manifest
@@ -0,0 +1,8 @@
+AUX modules.conf 279 BLAKE2B 50c55ad874899bbbe24c546717e5aad65f191e75a25a1c806e5cd2c4e49558940b453f2aafd000344dc8d8f729865ce484ea3df5625435edf836320c0fc68767 SHA512 b23fc6ef033d198866eeaf9752460f0833b9a56f3452fa3c91a70959f3b8b183a2412c1e07b6e18f3fc6e50904682b21b2b19f02a17b0c372a83166f8dfa5e43
+AUX ocsinventory-agent.cfg 33 BLAKE2B 13ef69e6af5deebc51426b4f4a35d946f316cbfa869c94d307cb361d80a8ed5ba8efc0084699ac8c39787cc1f28e66b6509ff70e19b0d9eb748bd1f573797b83 SHA512 084f17b577b0ae53af2d86013152ab64adb1ef0134bc1ef032af79fc59d5151c380fcb4f969a58b8ad2539b0dd0df77879f9bf4cab95b87eb3e308ddedcb73ec
+AUX ocsinventory-agent.crond 68 BLAKE2B 8cd5344c98d802365ea1d5cd4b7c8436a6fd220ce84defca07e287e77943e25022afdbcc1a5f2c2cb62019b12ca4234c0f89a927d56149e1482842eb288d308b SHA512 8f3fbfe93dbd7c1213f13c4be55e63a423d2628fac4cf58fb1d01ab5153e29821ce724e548251679f241fa845d20c6ef22d5738055f1a3fb04cbe96de11898a1
+AUX ocsinventory-agent.service 177 BLAKE2B 5ea7533f4d5a47a3d1859c9d126af04ef527c2b2dfb9d4249a855b30e103a7f8e1e0e2eda7ed7c6c08e3bc7c094f69b1ce82658595fda6e92c6ac0ea06ceb224 SHA512 81b462adfdb9167c2933c732ce19f1d26c44f575612974819e2274e6cbadb8fdc7a2f69f268aa22bcb6996a4236ac18130227b2661fa108754b19a1c6578dcb5
+AUX ocsinventory-agent.timer 146 BLAKE2B 5bde5c361709d1c907ce7aff5f0376fd77463994ecd65c8d9462187f0697199e07520ac2f42b79b9b8ab177ca87f4b3c9fc869769016ccfd8c916c9210e8d0d6 SHA512 0b4d9c39344d2b857de39bfd71bfee81d35a7cb555ce1cd7f44c43c45ef1529caa288660ce6a95596cb5d34b408607743476d4ad1e9a11b0afe65d37e44298e1
+DIST Ocsinventory-Unix-Agent-2.10.0.tar.gz 2319357 BLAKE2B 5a4a403d90dc68f95ac8b1efb22b3d4fe700a6a819aea44c991f13346c2aacb0fef2f63e9cc83607054e8b7518d48c11c431e0245fa91dc20ad0c4cafcd46cf3 SHA512 61881caaebd869abf39ebe641feb6dfceb31cfc64b2208de4be7ddf6923c2c7382b0832bb932a6378d32ffb0d5969e0ebb8d976ac09e2493c0ac5ffd938bd2e8
+EBUILD ocsinventory-agent-2.10.0.ebuild 1204 BLAKE2B 54608fea97b900a16e57270a1f8e932dc02169ea978414bc50dc06de755656536155fa3b24e55b09917abe346fe3cf6ecfb4ff849b6a23cdc8047b8205b1df5e SHA512 2a15d30e083dcca7ffebd1c8884487265653ab21bf9dd40220ba420944183c1def8247f871842c2c47bcbb3cedbf1c2f52856aceb90e060282c2e0b033f58cdd
+MISC metadata.xml 307 BLAKE2B 5ca3ad567fec25472789970048c4127a4e2719088465ec3d3c4507a0f592513e3d8e586468f45748566ce100f03f21b032ae3eb1a2735f9a13c37e2796aa2365 SHA512 8be94609b3fd3e40d61549684dd2ab30a746b28910809cb9a179042fb410523b2018f772ee82d7da54e1fc9383a1933f246523378f3d81ecf9ff129bc721ba29
diff --git a/app-admin/ocsinventory-agent/files/modules.conf b/app-admin/ocsinventory-agent/files/modules.conf
new file mode 100644
index 000000000000..7e3eb3fed7f6
--- /dev/null
+++ b/app-admin/ocsinventory-agent/files/modules.conf
@@ -0,0 +1,10 @@
+# this list of module will be loaded by the agent at run time
+# to check its syntax do:
+# $perl modules.conf
+# You must have NO error. Else the content will be ignored
+
+use Ocsinventory::Agent::Modules::Download;
+use Ocsinventory::Agent::Modules::Snmp;
+
+# DO NO REMOVE the 1;
+1;
diff --git a/app-admin/ocsinventory-agent/files/ocsinventory-agent.cfg b/app-admin/ocsinventory-agent/files/ocsinventory-agent.cfg
new file mode 100644
index 000000000000..30dec1a71c4f
--- /dev/null
+++ b/app-admin/ocsinventory-agent/files/ocsinventory-agent.cfg
@@ -0,0 +1 @@
+server=servername.yourdomain.com
diff --git a/app-admin/ocsinventory-agent/files/ocsinventory-agent.crond b/app-admin/ocsinventory-agent/files/ocsinventory-agent.crond
new file mode 100644
index 000000000000..66cb83335b7d
--- /dev/null
+++ b/app-admin/ocsinventory-agent/files/ocsinventory-agent.crond
@@ -0,0 +1 @@
+43 2 * * * root /usr/bin/ocsinventory-agent --lazy > /dev/null 2>&1
diff --git a/app-admin/ocsinventory-agent/files/ocsinventory-agent.service b/app-admin/ocsinventory-agent/files/ocsinventory-agent.service
new file mode 100644
index 000000000000..daf311e98c8a
--- /dev/null
+++ b/app-admin/ocsinventory-agent/files/ocsinventory-agent.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Cron job for OCS-Inventory agent
+After=network.target
+
+[Service]
+User=root
+ExecStart=/usr/bin/ocsinventory-agent --lazy
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-admin/ocsinventory-agent/files/ocsinventory-agent.timer b/app-admin/ocsinventory-agent/files/ocsinventory-agent.timer
new file mode 100644
index 000000000000..01dd060c8960
--- /dev/null
+++ b/app-admin/ocsinventory-agent/files/ocsinventory-agent.timer
@@ -0,0 +1,11 @@
+[Unit]
+Description=Launch audit
+
+[Timer]
+OnCalendar=daily
+AccuracySec=1h
+RandomizedDelaySec=240
+Persistent=true
+
+[Install]
+WantedBy=timers.target
diff --git a/app-admin/ocsinventory-agent/metadata.xml b/app-admin/ocsinventory-agent/metadata.xml
new file mode 100644
index 000000000000..444bedc3a166
--- /dev/null
+++ b/app-admin/ocsinventory-agent/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>pacho@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">OCSInventory-NG/UnixAgent</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-admin/ocsinventory-agent/ocsinventory-agent-2.10.0.ebuild b/app-admin/ocsinventory-agent/ocsinventory-agent-2.10.0.ebuild
new file mode 100644
index 000000000000..68cdbc95dde1
--- /dev/null
+++ b/app-admin/ocsinventory-agent/ocsinventory-agent-2.10.0.ebuild
@@ -0,0 +1,54 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit perl-module systemd
+
+DESCRIPTION="Hardware and software inventory tool (client)"
+HOMEPAGE="http://www.ocsinventory-ng.org https://github.com/OCSInventory-NG/UnixAgent"
+SRC_URI="https://github.com/OCSInventory-NG/UnixAgent/releases/download/v${PV}/Ocsinventory-Unix-Agent-${PV}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="
+ dev-perl/Crypt-SSLeay
+ dev-perl/Net-IP
+ dev-perl/Net-SNMP
+ dev-perl/Net-SSLeay
+ dev-perl/Proc-Daemon
+ dev-perl/XML-NamespaceSupport
+ dev-perl/XML-SAX
+ dev-perl/XML-Simple
+ dev-perl/libwww-perl
+ sys-apps/dmidecode
+ sys-apps/pciutils
+"
+RDEPEND="${DEPEND}"
+BDEPEND=""
+
+S="${WORKDIR}/Ocsinventory-Unix-Agent-${PV}"
+
+src_compile() {
+ perl-module_src_compile
+ rm run-postinst || die
+}
+
+src_install() {
+ perl-module_src_install
+
+ keepdir "/var/lib/${PN}"
+ keepdir "/var/log/${PN}"
+
+ insinto /etc/ocsinventory
+ doins "${FILESDIR}/${PN}.cfg"
+ doins "${FILESDIR}/modules.conf"
+
+ insinto /etc/cron.d
+ newins "${FILESDIR}/${PN}.crond" ${PN}
+ systemd_dounit "${FILESDIR}/${PN}".{service,timer}
+
+ insinto /etc/logrotate.d
+ doins "contrib/cron/${PN}.logrotate"
+}