public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-metrics/fusioninventory-agent/, app-metrics/fusioninventory-agent/files/
@ 2020-05-26 23:45 Alexey Shvetsov
  0 siblings, 0 replies; 2+ messages in thread
From: Alexey Shvetsov @ 2020-05-26 23:45 UTC (permalink / raw
  To: gentoo-commits

commit:     042f96e8f848bc61f3a428ebe528304109e360dc
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Tue May 26 23:45:30 2020 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Tue May 26 23:45:47 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=042f96e8

app-metrics/fusioninventory-agent: add startup files

Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>

 .../files/fusioninventory-agent-2.5.2-dirs.patch   | 23 ++++++++++++++++++++++
 .../files/fusioninventory-agent.confd              |  2 ++
 .../files/fusioninventory-agent.initd              | 21 ++++++++++++++++++++
 .../fusioninventory-agent-2.5.2.ebuild             | 11 +++++++----
 4 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/app-metrics/fusioninventory-agent/files/fusioninventory-agent-2.5.2-dirs.patch b/app-metrics/fusioninventory-agent/files/fusioninventory-agent-2.5.2-dirs.patch
new file mode 100644
index 00000000000..d4c0f4eadb0
--- /dev/null
+++ b/app-metrics/fusioninventory-agent/files/fusioninventory-agent-2.5.2-dirs.patch
@@ -0,0 +1,23 @@
+--- a/Makefile.PL	2020-05-27 02:16:42.106531746 +0300
++++ b/Makefile.PL	2020-05-27 02:17:30.568531767 +0300
+@@ -170,18 +170,15 @@
+         INSTALLSCRIPT        => '$(PREFIX)/bin',
+         INSTALLSITESCRIPT    => '$(PREFIX)/bin',
+         INSTALLVENDORSCRIPT  => '$(PREFIX)/bin',
+-        INSTALLLIB           => '$(DATADIR)/lib',
+-        INSTALLSITELIB       => '$(DATADIR)/lib',
+-        INSTALLVENDORLIB     => '$(DATADIR)/lib',
+         INSTALLMAN1DIR       => '$(PREFIX)/share/man/man1',
+         INSTALLSITEMAN1DIR   => '$(PREFIX)/share/man/man1',
+         INSTALLVENDORMAN1DIR => '$(PREFIX)/share/man/man1',
+         INSTALLMAN3DIR       => '$(PREFIX)/share/man/man3',
+         INSTALLSITEMAN3DIR   => '$(PREFIX)/share/man/man3',
+         INSTALLVENDORMAN3DIR => '$(PREFIX)/share/man/man3',
+-        SYSCONFDIR           => '$(PREFIX)/etc/fusioninventory',
++        SYSCONFDIR           => '/etc/fusioninventory',
+         DATADIR              => '$(PREFIX)/share/fusioninventory',
+-        LOCALSTATEDIR        => '$(PREFIX)/var/fusioninventory',
++        LOCALSTATEDIR        => '/var/lib/fusioninventory',
+     );
+ 
+     # allow variables defined on command line to override defaults

diff --git a/app-metrics/fusioninventory-agent/files/fusioninventory-agent.confd b/app-metrics/fusioninventory-agent/files/fusioninventory-agent.confd
new file mode 100644
index 00000000000..8a68458e346
--- /dev/null
+++ b/app-metrics/fusioninventory-agent/files/fusioninventory-agent.confd
@@ -0,0 +1,2 @@
+# additional args for fusioninventory-agent
+FUSIONINVENTORY_OPTIONS=""

diff --git a/app-metrics/fusioninventory-agent/files/fusioninventory-agent.initd b/app-metrics/fusioninventory-agent/files/fusioninventory-agent.initd
new file mode 100644
index 00000000000..58bd3bbf2b4
--- /dev/null
+++ b/app-metrics/fusioninventory-agent/files/fusioninventory-agent.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile=${RC_PREFIX%/}/run/${SVCNAME}.pid
+
+name="fusioninventory-agent daemon"
+description="FusionInventroy agent"
+command=/usr/bin/fusioninventory-agent
+command_args="--daemon --pidfile ${pidfile} ${FUSIONINVENTORY_OPTIONS}"
+extra_started_commands="reload"
+
+depend() {
+	need net
+}
+
+reload() {
+        ebegin "Reloading ${SVCNAME}"
+        start-stop-daemon --signal HUP --pidfile "${pidfile}"
+        eend $?
+}

diff --git a/app-metrics/fusioninventory-agent/fusioninventory-agent-2.5.2.ebuild b/app-metrics/fusioninventory-agent/fusioninventory-agent-2.5.2.ebuild
index b5a7d0a0a61..3350194f9c0 100644
--- a/app-metrics/fusioninventory-agent/fusioninventory-agent-2.5.2.ebuild
+++ b/app-metrics/fusioninventory-agent/fusioninventory-agent-2.5.2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit perl-module
+inherit perl-module systemd
 
 DESCRIPTION="The FusionInventory agent is a generic management agent"
 HOMEPAGE="http://fusioninventory.org/"
@@ -31,9 +31,12 @@ RDEPEND="${DEPEND}"
 BDEPEND="
 	dev-perl/Module-Install
 	"
+PATCHES=( "${FILESDIR}/${P}-dirs.patch" )
 
-src_prepare() {
-	sed -e 's:\$(PREFIX)/etc:/etc:g' \
-		-i Makefile.PL || die "sed failed"
+src_install() {
 	default
+	systemd_dounit contrib/unix/fusioninventory-agent.service
+	doinitd "${FILESDIR}/${PN}.initd"
+	doconfd "${FILESDIR}/${PN}.confd"
+	keepdir /var/lib/fusioninventory
 }


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-metrics/fusioninventory-agent/, app-metrics/fusioninventory-agent/files/
@ 2020-05-27 11:20 Alexey Shvetsov
  0 siblings, 0 replies; 2+ messages in thread
From: Alexey Shvetsov @ 2020-05-27 11:20 UTC (permalink / raw
  To: gentoo-commits

commit:     17a913b066ba5750abc500964b9aaed5b227ece4
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Wed May 27 11:20:09 2020 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Wed May 27 11:20:20 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17a913b0

app-metrics/fusioninventory-agent: Fix agent daemon startup

Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>

 .../files/fusioninventory-agent-2.5.2-dirs.patch   | 44 +++++++++++++++-------
 .../fusioninventory-agent-2.5.2.ebuild             |  1 +
 2 files changed, 31 insertions(+), 14 deletions(-)

diff --git a/app-metrics/fusioninventory-agent/files/fusioninventory-agent-2.5.2-dirs.patch b/app-metrics/fusioninventory-agent/files/fusioninventory-agent-2.5.2-dirs.patch
index e37b58c43a0..a3a6b439713 100644
--- a/app-metrics/fusioninventory-agent/files/fusioninventory-agent-2.5.2-dirs.patch
+++ b/app-metrics/fusioninventory-agent/files/fusioninventory-agent-2.5.2-dirs.patch
@@ -1,5 +1,33 @@
---- a/Makefile.PL	2020-05-27 02:16:42.106531746 +0300
-+++ b/Makefile.PL	2020-05-27 02:17:30.568531767 +0300
+diff -urN a/lib/FusionInventory/Agent/Config.pm b/lib/FusionInventory/Agent/Config.pm
+--- a/lib/FusionInventory/Agent/Config.pm	2020-05-27 11:09:31.969999393 -0000
++++ b/lib/FusionInventory/Agent/Config.pm	2020-05-27 11:09:39.833332729 -0000
+@@ -67,7 +67,7 @@
+     my ($class, %params) = @_;
+ 
+     my $self = {
+-        '_confdir' => undef, # SYSCONFDIR replaced here from Makefile
++        '_confdir' => '/etc/fusioninventory', # SYSCONFDIR replaced here from Makefile
+     };
+     bless $self, $class;
+     $self->_loadDefaults();
+diff -urN a/lib/setup.pm b/lib/setup.pm
+--- a/lib/setup.pm	2020-05-27 11:09:31.989999393 -0000
++++ b/lib/setup.pm	2020-05-27 11:11:02.233332727 -0000
+@@ -11,9 +11,9 @@
+ our @EXPORT = ('%setup');
+ 
+ our %setup = (
+-    datadir => './share',
++    datadir => '/usr/share/fusioninventory',
+     libdir  => './lib',
+-    vardir  => './var',
++    vardir  => '/var/lib/fusioninventory',
+ );
+ 
+ # Compute directly libdir from this setup file as it should be installed
+diff -urN a/Makefile.PL b/Makefile.PL
+--- a/Makefile.PL	2020-05-27 11:09:31.966666059 -0000
++++ b/Makefile.PL	2020-05-27 11:09:39.833332729 -0000
 @@ -170,18 +170,15 @@
          INSTALLSCRIPT        => '$(PREFIX)/bin',
          INSTALLSITESCRIPT    => '$(PREFIX)/bin',
@@ -21,15 +49,3 @@
      );
  
      # allow variables defined on command line to override defaults
---- a/lib/FusionInventory/Agent/Config.pm     2020-05-27 10:06:21.248964808 +0300
-+++ b/lib/FusionInventory/Agent/Config.pm     2020-05-27 10:06:57.324964823 +0300
-@@ -67,7 +67,7 @@
-     my ($class, %params) = @_;
- 
-     my $self = {
--        '_confdir' => undef, # SYSCONFDIR replaced here from Makefile
-+        '_confdir' => '/etc/fusioninventory', # SYSCONFDIR replaced here from Makefile
-     };
-     bless $self, $class;
-     $self->_loadDefaults();
-

diff --git a/app-metrics/fusioninventory-agent/fusioninventory-agent-2.5.2.ebuild b/app-metrics/fusioninventory-agent/fusioninventory-agent-2.5.2.ebuild
index 9b0a5d9d145..50d906752ad 100644
--- a/app-metrics/fusioninventory-agent/fusioninventory-agent-2.5.2.ebuild
+++ b/app-metrics/fusioninventory-agent/fusioninventory-agent-2.5.2.ebuild
@@ -21,6 +21,7 @@ DEPEND="
 	dev-perl/Text-Template
 	dev-perl/UNIVERSAL-require
 	dev-perl/XML-TreePP
+	dev-perl/XML-XPath
 	virtual/perl-IO-Compress
 	dev-perl/HTTP-Daemon
 	dev-perl/IO-Socket-SSL


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-27 11:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-26 23:45 [gentoo-commits] repo/gentoo:master commit in: app-metrics/fusioninventory-agent/, app-metrics/fusioninventory-agent/files/ Alexey Shvetsov
  -- strict thread matches above, loose matches on Subject: below --
2020-05-27 11:20 Alexey Shvetsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox