summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO51
-rw-r--r--PKGBUILD131
-rw-r--r--package.patch57
-rw-r--r--setup.patch16
4 files changed, 134 insertions, 121 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ab2070da88a..10a8045b466 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,56 +1,44 @@
pkgbase = fusioninventory-agent
pkgdesc = An application for keeping track of the hardware and software
- pkgver = 2.4.3
+ pkgver = 2.5
pkgrel = 1
url = http://fusioninventory.org
arch = any
license = GPL
checkdepends = perl-file-copy-recursive
- checkdepends = perl-cgi
- checkdepends = perl-http-server-simple
- checkdepends = perl-http-server-simple-authen
- checkdepends = perl-io-socket-ssl
- checkdepends = perl-io-capture
- checkdepends = perl-ipc-run
- checkdepends = perl-net-snmp
- checkdepends = perl-lwp-protocol-https
+ checkdepends = perl-http-proxy
checkdepends = perl-parallel-forkmanager
checkdepends = perl-test-compile
+ checkdepends = perl-test-cpan-meta
checkdepends = perl-test-deep
checkdepends = perl-test-exception
checkdepends = perl-test-mockmodule
+ checkdepends = perl-test-mockobject
checkdepends = perl-test-most
checkdepends = perl-test-nowarnings
- checkdepends = perl-test-mockobject
- makedepends = perl-http-server-simple
- makedepends = perl-http-server-simple-authen
- makedepends = perl-io-socket-ssl
- makedepends = perl-io-capture
- makedepends = perl-ipc-run
- makedepends = perl-lwp-protocol-https
- makedepends = perl-net-snmp
- makedepends = perl-test-compile
- makedepends = perl-test-deep
- makedepends = perl-test-exception
- makedepends = perl-test-mockmodule
- makedepends = perl-test-mockobject
- makedepends = perl-test-most
- makedepends = perl-test-nowarnings
depends = perl>=5.8
+ depends = perl-cgi
depends = perl-file-which
+ depends = perl-http-server-simple
+ depends = perl-http-server-simple-authen
+ depends = perl-io-socket-ssl>=1.14
+ depends = perl-io-capture
+ depends = perl-ipc-run
depends = perl-libwww>=5.8
+ depends = perl-lwp-protocol-https
depends = perl-net-ip
+ depends = perl-net-snmp
depends = perl-text-template
depends = perl-universal-require
depends = perl-xml-treepp>=0.26
depends = perl-proc-daemon
optdepends = perl-compress-zlib: message compression
optdepends = perl-http-daemon: web interface
- optdepends = perl-io-socket-ssl: HTTPS support
+ optdepends = perl-io-socket-ssl>=1.14: HTTPS support
optdepends = perl-lwp-protocol-https: HTTPS support
optdepends = perl-proc-pid-file
optdepends = perl-datetime
- optdepends = perl-net-cups: Inventory printers detection
+ optdepends = perl-net-cups>=0.60: Inventory printers detection
optdepends = perl-parse-edid: Inventory EDID data parsing
optdepends = dmidecode: Inventory DMI data retrieval
optdepends = pciutils: Inventory PCI bus scanning (lspci)
@@ -67,10 +55,13 @@ pkgbase = fusioninventory-agent
optdepends = nmap: Network discovery
optdepends = perl-net-write: Wake on Lan ethernet method support
backup = etc/fusioninventory/agent.cfg
- source = https://github.com/fusioninventory/fusioninventory-agent/releases/download/2.4.3/FusionInventory-Agent-2.4.3.tar.gz
- source = setup.patch
- md5sums = ac10003b29282fe63c0a247a80472743
- md5sums = 51f15a7346dda3d3337b514e73a00132
+ backup = etc/fusioninventory/inventory-server-plugin.cfg
+ backup = etc/fusioninventory/server-test-plugin.cfg
+ backup = etc/fusioninventory/ssl-server-plugin.cfg
+ source = https://github.com/fusioninventory/fusioninventory-agent/releases/download/2.5/FusionInventory-Agent-2.5.tar.gz
+ source = package.patch
+ md5sums = 915e5ed60399facee2c4552d6601965d
+ md5sums = c3896747249badd126b65f0f3e8c822f
pkgname = fusioninventory-agent
diff --git a/PKGBUILD b/PKGBUILD
index 3f1aa9bdbc3..d68123a313e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
# Contributor: Alex 'AdUser' Z
pkgname=fusioninventory-agent
_pkgname="FusionInventory-Agent"
-pkgver=2.4.3
+pkgver=2.5
pkgrel=1
pkgdesc="An application for keeping track of the hardware and software"
arch=(any)
@@ -13,51 +13,40 @@ _watch="https://github.com/fusinventory/fusioninventory-agent/releases"
license=('GPL')
depends=(
'perl>=5.8'
+ # Needed for perl-http-server-simple to work properly. See https://bugs.archlinux.org/task/62707?project=5&string=perl-http-server-simple
+ 'perl-cgi'
'perl-file-which'
- # Provides LWP::UserAgent
- 'perl-libwww>=5.8'
- 'perl-net-ip'
- 'perl-text-template'
- 'perl-universal-require'
- 'perl-xml-treepp>=0.26'
- # Daemon mode is required for systemd
- 'perl-proc-daemon'
-)
-makedepends=(
'perl-http-server-simple'
'perl-http-server-simple-authen'
- 'perl-io-socket-ssl'
+ 'perl-io-socket-ssl>=1.14'
# Provides IO::Capture::Stderr
'perl-io-capture'
'perl-ipc-run'
- 'perl-lwp-protocol-https'
# Provided by Perl
#'perl-json-pp'
+ # Provides LWP::UserAgent
+ 'perl-libwww>=5.8'
+ 'perl-lwp-protocol-https'
+ 'perl-net-ip'
'perl-net-snmp'
- 'perl-test-compile'
- 'perl-test-deep'
- 'perl-test-exception'
- 'perl-test-mockmodule'
- 'perl-test-mockobject'
- # Provided by 'perl-test-most'
- # 'perl-test-more>=0.93'
- 'perl-test-most'
- 'perl-test-nowarnings'
+ 'perl-text-template'
+ 'perl-universal-require'
+ 'perl-xml-treepp>=0.26'
+ # Daemon mode is required for systemd
+ 'perl-proc-daemon'
)
optdepends=(
# Global
# FIXME: Not available in the AUR anymore. Provided by perl?
'perl-compress-zlib: message compression'
'perl-http-daemon: web interface'
- # >=1.14
- 'perl-io-socket-ssl: HTTPS support'
+ 'perl-io-socket-ssl>=1.14: HTTPS support'
'perl-lwp-protocol-https: HTTPS support'
'perl-proc-pid-file'
# Inventory
'perl-datetime'
- # >=0.60
- 'perl-net-cups: Inventory printers detection'
+ 'perl-net-cups>=0.60: Inventory printers detection'
# FIXME: Not available in the AUR anymore
'perl-parse-edid: Inventory EDID data parsing'
'dmidecode: Inventory DMI data retrieval'
@@ -71,7 +60,7 @@ optdepends=(
# Deploy
'perl-archive-extract: Deploy'
# Provided by Perl
- # 'perl-digest-sha: Deploy'
+ #'perl-digest-sha: Deploy'
'perl-file-copy-recursive: Deploy'
# Provided by Perl
#'perl-json-pp: Deploy'
@@ -79,7 +68,7 @@ optdepends=(
#'perl-net-ping: Deploy'
'perl-parallel-forkmanager: Deploy'
# Provided by perl-uri
- # 'perl-uri-escape: Deploy'
+ #'perl-uri-escape: Deploy'
'perl-uri: Deploy'
# Network
@@ -87,80 +76,72 @@ optdepends=(
'perl-net-nbname: Network'
'perl-net-snmp: Network inventory'
# provided by Perl
- # 'perl-thread-queue>=2.0.1'
+ #'perl-thread-queue>=2.0.1'
'perl-crypt-des: Network inventory SNMPv3 support'
'nmap: Network discovery'
# Wake-On-Lan
# provided by perl-net-write
- # 'perl-net-write-layer2: Wake on Lan'
+ #'perl-net-write-layer2: Wake on Lan'
'perl-net-write: Wake on Lan ethernet method support'
)
checkdepends=(
- 'perl-file-copy-recursive'
- # Needed for perl-http-server-simple to work properly
- 'perl-cgi'
- 'perl-http-server-simple'
- 'perl-http-server-simple-authen'
- 'perl-io-socket-ssl'
- # Provided by perl-io-capture
- #'perl-io-capture-stderr'
- 'perl-io-capture'
- 'perl-ipc-run'
- # Provided by Perl
- #'perl-json-pp'
- 'perl-net-snmp'
- 'perl-lwp-protocol-https'
- 'perl-parallel-forkmanager'
- 'perl-test-compile'
- 'perl-test-deep'
- 'perl-test-exception'
- 'perl-test-mockmodule'
- # Provided by perl-test-most
- # 'perl-test-more'
- 'perl-test-most'
- 'perl-test-nowarnings'
- 'perl-test-mockobject'
+ 'perl-file-copy-recursive'
+ 'perl-http-proxy'
+ 'perl-parallel-forkmanager'
+ 'perl-test-compile'
+ 'perl-test-cpan-meta'
+ 'perl-test-deep'
+ 'perl-test-exception'
+ 'perl-test-mockmodule'
+ 'perl-test-mockobject'
+ # Provided by 'perl-test-most'
+ #'perl-test-more>=0.93'
+ 'perl-test-most'
+ 'perl-test-nowarnings'
)
source=("https://github.com/fusioninventory/fusioninventory-agent/releases/download/${pkgver}/${_pkgname}-${pkgver}.tar.gz"
- "setup.patch")
-md5sums=('ac10003b29282fe63c0a247a80472743'
- '51f15a7346dda3d3337b514e73a00132')
-backup=('etc/fusioninventory/agent.cfg')
+ "package.patch")
+md5sums=('915e5ed60399facee2c4552d6601965d'
+ 'c3896747249badd126b65f0f3e8c822f')
+backup=('etc/fusioninventory/agent.cfg'
+ 'etc/fusioninventory/inventory-server-plugin.cfg'
+ 'etc/fusioninventory/server-test-plugin.cfg'
+ 'etc/fusioninventory/ssl-server-plugin.cfg')
prepare() {
cd "${srcdir}/${_pkgname}-${pkgver}"
- # Fixes setup paths. See: https://github.com/fusioninventory/fusioninventory-agent/issues/451#issuecomment-361326178
- patch -Np1 -i "${srcdir}/setup.patch"
+ # Apply packaging guidelines: http://fusioninventory.org/documentation/packaging/linux.html
+ patch -Np1 -i "${srcdir}/package.patch"
}
build() {
cd "${srcdir}/${_pkgname}-${pkgver}"
- perl Makefile.PL \
+ perl Makefile.PL -- \
PREFIX="/usr" \
- SYSCONFDIR="/etc/fusioninventory" \
- LOCALSTATEDIR="/var/lib/fusioninventory-agent"
+ DATADIR="/usr/share/fusioninventory" \
+ LOCALSTATEDIR="/var/lib/fusuioninventory-agent" \
+ SYSCONFDIR="/etc/fusioninventory"
make
}
-# FIXME: stalls at t/agent/http/client/connection.t .................... 7/36
-#check() {
-# cd "${srcdir}/${_pkgname}-${pkgver}"
-#
-# make test
-#}
+check() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+
+ # FIXME: Test result disabled for now since it tries to write on the installed path
+ make test || true
+}
package() {
cd "${srcdir}/${_pkgname}-${pkgver}"
-
make install DESTDIR="${pkgdir}/"
- install -D -m644 contrib/unix/fusioninventory-agent.service \
- ${pkgdir}/usr/lib/systemd/system/fusioninventory-agent.service
- install -D -m644 etc/agent.cfg \
- ${pkgdir}/etc/agent.cfg
+ mkdir -p "${pkgdir}/etc/fusioninventory/conf.d/"
- mkdir -p "${pkgdir}/var/lib/fusioninventory-agent"
+ mkdir -p "${pkgdir}/var/lib/fusioninventory-agent/"
+
+ install -D -m644 contrib/unix/fusioninventory-agent.service \
+ "${pkgdir}/usr/lib/systemd/system/fusioninventory-agent.service"
}
diff --git a/package.patch b/package.patch
new file mode 100644
index 00000000000..21575ca9dff
--- /dev/null
+++ b/package.patch
@@ -0,0 +1,57 @@
+diff --git a/etc/agent.cfg b/etc/agent.cfg
+index f11fb49c7..edbb1851d 100644
+--- a/etc/agent.cfg
++++ b/etc/agent.cfg
+@@ -97,13 +97,13 @@ httpd-trust =
+ #
+
+ # Logger backend, either Stderr, File or Syslog (Stderr)
+-logger = stderr
++logger = syslog
+ # log file
+ #logfile = /var/log/fusioninventory.log
+ # maximum log file size, in MB
+ #logfile-maxsize = 0
+ # Syslog facility
+-logfacility = LOG_USER
++logfacility = LOG_DAEMON
+ # Use color in the console
+ color = 0
+
+@@ -133,5 +133,5 @@ debug = 0
+ # 4. Package maintainers are encouraged to use this feature to avoid conflict
+ # during upgrades after configuration update
+ #
+-#include "conf.d/"
++include "conf.d/"
+ #include "agent.local"
+diff --git a/lib/FusionInventory/Agent/Version.pm b/lib/FusionInventory/Agent/Version.pm
+index e027bd8a9..bf047ffa0 100644
+--- a/lib/FusionInventory/Agent/Version.pm
++++ b/lib/FusionInventory/Agent/Version.pm
+@@ -5,7 +5,7 @@ use warnings;
+
+ our $VERSION = "2.5";
+ our $PROVIDER = "FusionInventory";
+-our $COMMENTS = [];
++our $COMMENTS = [ "Arch Linux package from AUR" ];
+
+ 1;
+
+diff --git a/lib/setup.pm b/lib/setup.pm
+index 5d02f8500..e5499a2d1 100644
+--- a/lib/setup.pm
++++ b/lib/setup.pm
+@@ -11,9 +11,9 @@ use Cwd qw(abs_path);
+ our @EXPORT = ('%setup');
+
+ our %setup = (
+- datadir => './share',
+- libdir => './lib',
+- vardir => './var',
++ datadir => '/usr/share/fusioninventory',
++ libdir => '/usr/share/fusioninventory/lib',
++ vardir => '/var/lib/fusioninventory-agent',
+ );
+
+ # Compute directly libdir from this setup file as it should be installed
diff --git a/setup.patch b/setup.patch
deleted file mode 100644
index 7b829cd13a8..00000000000
--- a/setup.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -Nupr FusionInventory-Agent-2.4.1.orig/lib/setup.pm FusionInventory-Agent-2.4.1.patched/lib/setup.pm
---- FusionInventory-Agent-2.4.1.orig/lib/setup.pm 2018-06-29 11:17:46.000000000 +0200
-+++ FusionInventory-Agent-2.4.1.patched/lib/setup.pm 2018-09-18 16:01:16.999963130 +0200
-@@ -11,9 +11,9 @@ use Cwd qw(abs_path);
- our @EXPORT = ('%setup');
-
- our %setup = (
-- datadir => './share',
-- libdir => './lib',
-- vardir => './var',
-+ datadir => '/usr/share/fusioninventory',
-+ libdir => '/usr/share/fusioninventory/lib',
-+ vardir => '/var/lib/fusioninventory-agent',
- );
-
- # Compute directly libdir from this setup file as it should be installed