Commit 86370bac authored by Francesco Colista's avatar Francesco Colista
Browse files

community/bareos: upgrade to 20.0.4

Fixed compliancy with AGPL 3.0 (Fixes #12641)

Fixed permissions in bareos dirs

Fixed nginx configuration
- needs php($ver)-fpm and client_max_body_size >1MB

Fixed apache2 configuration
- bareos needs mod_rewrite
parent e54a8aca
......@@ -2,7 +2,7 @@
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=bareos
pkgver=20.0.3
pkgver=20.0.4
pkgrel=0
pkgdesc="Bareos - Backup Archiving REcovery Open Sourced"
url="http://www.bareos.org"
......@@ -34,10 +34,11 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/bareos/bareos/archive/Releas
$pkgname-fd.initd
add-libintl.patch
nginx-conf.patch
apache2-conf.patch
path-mounted.patch
support-alpine-dist.patch
xattr-include.patch
disable-systemtest-minio.patch
alpine-agpl3-compat.patch
"
builddir="$srcdir"/$pkgname-Release-$pkgver
......@@ -124,6 +125,10 @@ package() {
# remove http configuration
rm -r "$pkgdir"/etc/httpd
chown $pkgusers "$pkgdir"/var/lib/bareos
chown $pkgusers "$pkgdir"/var/log/bareos
chown -R $pkgusers "$pkgdir"/etc/bareos
}
_mysql() {
......@@ -175,7 +180,7 @@ _webui() {
_webui_apache2() {
description="$description (webui apache2 configuration)"
depends="$pkgname-webui $_php-apache2"
depends="$pkgname-webui apache2 $_php-apache2"
mkdir -p "$subpkgdir"/etc/apache2/conf.d
cp "$builddir"/webui/install/apache/bareos-webui.conf "$subpkgdir"/etc/apache2/conf.d/
......@@ -184,7 +189,7 @@ _webui_apache2() {
_webui_nginx() {
description="$description (webui apache2 configuration)"
depends="$pkgname-webui nginx"
depends="$pkgname-webui nginx $_php-fpm"
mkdir -p "$subpkgdir"/etc/nginx/http.d
cp "$builddir"/webui/install/nginx/bareos-webui.conf "$subpkgdir"/etc/nginx/http.d/
......@@ -192,14 +197,15 @@ _webui_nginx() {
sha512sums="
3f9bf020e0d519da75221ebd200634713c791e2fdc90a13482ffb3294912d5e2ee28f8338dbef06ba6c98727bae447f6f8bb8d4a06520001f7cefa3614769082 bareos-20.0.3.tar.gz
37edb550b44d883adba2f699e828156714e61b8ac068c4b3c699b3cb05e0ccedd3175d30a9cb193e56be102d64166dc8201a7a5772c9d4a875489496be65741f bareos-20.0.4.tar.gz
eb1e7072b579bf9ae21f2e351d6900abb277db64e373f4760bac8188b82929376e4a196d2c935cefe1ae4cc2c396f2fcba1a25642b26e2f92a0d008fbdc4b5f2 bareos-dir.initd
c770b1d041fafef93d4eb0269ba8d9733e85ef465657fe8dd5d5c68a27ec773cec9c5c582d4a16596d95bbf6dbd3f7194dc9c0d8ed73138e9fb438fba9aa9445 bareos-sd.initd
c6347079dbcef5f4a69ec0c4ecc31803520d715d599d89c6bbfbb3741a86c50d7295c30432889b13ee9c16f2feaa84b1c6ae992cfee6505d569c6493d7e85a5b bareos-fd.initd
9d12f26d77d384ab122fdb133667b17a1e83c748d9fca9ca810c368b8f4f3cb2fc258f7c54628e96a0347e7f996c00f46d89655aad2fee373a61e7433fd783b9 add-libintl.patch
c2fd44d5880b74b24d8001b0798a1a42936347284633b9dd93d604a642c7b15220e5af66cbceb8919263e85b3cfee866cf3f956046ab7cc0d93edce96ad1ecda nginx-conf.patch
46b21a0b3c81d7be7d992d267441684c23b39eb2227326d7a8500aef8de3100146f2af98835cea555830d6490dd16fa58575095ba1ab833b697c24bddb68babd nginx-conf.patch
d7950b298306986d28b7c2e6b1d93d5a289c0e29cdd05825e667ea72da34ac2f078c7de344124d7cab2f342067f67725c40117a06cf95b1ef67f19f67e682521 apache2-conf.patch
2053eb72bbdb8c02d9ee7dcf387a973e0203485eb85304f1e1513ad501f6738d9fc0bb97596d6d9a1a8c96f6675fd2d2edafc85e961a5bd370b5f22f320c7cbf path-mounted.patch
e427e32bd5d589618cc8efc6d9a679f62e01904a76f2ce3f56bdbba7df31bf12922380c848bb409291f685fdb80a6ed25d842d44728a363103ab99591b473232 support-alpine-dist.patch
754d383abeafaac2668a59f21031959024d343da210bc1b0f82c11b4132e0f71a4b64a38a44f21bc583f4ea4c4910a865e1b306be6ee1c88a883065e3bf2170b xattr-include.patch
a30d6c52b0c7cc6608639cca62bdf0322f502b50be06943bc0f9178aa21680d5f7331e48f5ca860cf7bca0681fd03ddc581dde65f55ec2b079f856e43353f3e6 disable-systemtest-minio.patch
6396341ed241df3e5cb19cd8b0ec6553078adb99deac068e36e0324ee0d2c620f7c0cbf29def56ab93aa793a6547295f663a7963e23053f7798b5509782136a3 alpine-agpl3-compat.patch
"
diff --git a/webui/module/Application/view/layout/login.phtml.in b/webui/module/Application/view/layout/login.phtml.in
index 6dce80f..4e2a02c 100644
--- a/webui/module/Application/view/layout/login.phtml.in
+++ b/webui/module/Application/view/layout/login.phtml.in
@@ -32,6 +32,17 @@ echo $this->doctype();
<head>
+ <script>
+ function showhide() {
+ var x = document.getElementById("alpine-patches");
+ if (x.style.display === "none") {
+ x.style.display = "block";
+ } else {
+ x.style.display = "none";
+ }
+ }
+ </script>
+
<meta charset="utf-8">
<?php echo $this->headTitle('Bareos','PREPEND')->setSeparator(' - ')->setAutoEscape(false) ?>
@@ -71,6 +82,19 @@ echo $this->doctype();
<br /><br /><br />
<?php echo $this->content; ?>
<br />
+ <div id="alpine">
+ In order to be compliant with AGPL 3.0, you should be noticed that Alpine package has patched BareOS source with the following patches:<br />
+ <button onclick="showhide()">Alpine Linux Patches</button>
+ <div id="alpine-patches" style="display:none">
+ <a href="https://git.alpinelinux.org/aports/tree/community/bareos/path-mounted.patch">Link to Alpine Patch</a><br />
+ <code>
+ This patch has been part of Alpine BareOS package since<br>
+ Date: Wed May 18 16:28:14 2016 +0000<br>
+ See: commit <a href="https://git.alpinelinux.org/aports/commit/?id=3f7f468646b60bd49dc0d33533086d15a2348692">3f7f468646b60bd49dc0d33533086d15a2348692</a>
+ </code>
+ <br />
+ </div>
+ </div>
<p class="text-muted">
<a href="@BareosComSubscriptionLink@" title="@BareosComSubscriptionLink@" target="_blank">@BareosGetOfficialBinariesAndSupportOnBareosComLoginPage@</a><br/>
Version <?php echo $bareos_full_version; ?> &copy; 2013 - <?php echo date('Y') ?> <a href="http://www.bareos.com/" target="_blank">Bareos GmbH &amp; Co. KG</a>,<br />
diff --git a/webui/install/apache/bareos-webui.conf b/webui/install/apache/bareos-webui.conf
index 8539f7a..587321e 100644
--- a/webui/install/apache/bareos-webui.conf
+++ b/webui/install/apache/bareos-webui.conf
@@ -2,6 +2,8 @@
# Bareos WebUI Apache configuration file
#
+LoadModule rewrite_module modules/mod_rewrite.so
+
# Environment Variable for Application Debugging
# Set to "development" to turn on debugging mode or
# "production" to turn off debugging mode.
Fix default configuration for bareos-webui to work on alpine
--- old/webui/install/nginx/bareos-webui.conf
+++ new/webui/install/nginx/bareos-webui.conf
@@ -2,7 +2,7 @@
diff --git a/webui/install/nginx/bareos-webui.conf b/webui/install/nginx/bareos-webui.conf
index 96d249e..9d629d0 100644
--- a/webui/install/nginx/bareos-webui.conf
+++ b/webui/install/nginx/bareos-webui.conf
@@ -2,7 +2,8 @@ server {
listen 9100;
server_name bareos;
- root /var/www/bareos-webui/public;
+ root /usr/share/bareos-webui/public;
+ client_max_body_size 20M;
location / {
index index.php;
@@ -11,17 +11,9 @@
@@ -11,17 +12,9 @@ server {
location ~ .php$ {
......@@ -30,4 +31,4 @@ Fix default configuration for bareos-webui to work on alpine
+ fastcgi_pass 127.0.0.1:9000;
# Set APPLICATION_ENV to either 'production' or 'development'
diff --git a/core/src/droplet/configure.ac b/core/src/droplet/configure.ac
index a7d088a..d82d202 100644
--- a/core/src/droplet/configure.ac
+++ b/core/src/droplet/configure.ac
@@ -69,8 +69,6 @@ AC_MSG_NOTICE("Using JSON libs: $JSON_LIBS")
AC_SEARCH_LIBS([sqrt], [m], [], [AC_MSG_ERROR([libm library missing])])
AX_PTHREAD
-AC_CHECK_HEADER([attr/xattr.h],[],AC_MSG_ERROR([libattr1 missing]))
-
AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage],
[Build with test coverage instrumentation]))
if test "$enable_coverage" = yes ; then
diff --git a/core/src/droplet/libdroplet/src/backend/posix/backend.c b/core/src/droplet/libdroplet/src/backend/posix/backend.c
index 373a47b..fe95456 100644
--- a/core/src/droplet/libdroplet/src/backend/posix/backend.c
+++ b/core/src/droplet/libdroplet/src/backend/posix/backend.c
@@ -39,7 +39,13 @@
#include <sys/stat.h>
#include <dirent.h>
#include <sys/types.h>
-#include <linux/xattr.h>
+#ifdef HAVE_ATTR_XATTR_H
+# include <attr/xattr.h>
+#else
+# ifdef HAVE_SYS_XATTR_H
+# include <sys/xattr.h>
+# endif
+#endif
#include <utime.h>
#include <pwd.h>
#include <grp.h>
diff --git a/core/src/droplet/libdroplet/src/backend/posix/replyparser.c b/core/src/droplet/libdroplet/src/backend/posix/replyparser.c
index 1e7b2e5..de200b9 100644
--- a/core/src/droplet/libdroplet/src/backend/posix/replyparser.c
+++ b/core/src/droplet/libdroplet/src/backend/posix/replyparser.c
@@ -38,7 +38,13 @@
#include <sys/stat.h>
#include <dirent.h>
#include <sys/types.h>
-#include <linux/xattr.h>
+#ifdef HAVE_ATTR_XATTR_H
+# include <attr/xattr.h>
+#else
+# ifdef HAVE_SYS_XATTR_H
+# include <sys/xattr.h>
+# endif
+#endif
#include <utime.h>
#include <pwd.h>
#include <grp.h>
diff --git a/core/src/droplet/libdroplet/src/backend/posix/reqbuilder.c b/core/src/droplet/libdroplet/src/backend/posix/reqbuilder.c
index 1c74de1..8a83da9 100644
--- a/core/src/droplet/libdroplet/src/backend/posix/reqbuilder.c
+++ b/core/src/droplet/libdroplet/src/backend/posix/reqbuilder.c
@@ -38,8 +38,13 @@
#include <sys/stat.h>
#include <dirent.h>
#include <sys/types.h>
-#include <linux/xattr.h>
-#include <attr/xattr.h>
+#ifdef HAVE_ATTR_XATTR_H
+# include <attr/xattr.h>
+#else
+# ifdef HAVE_SYS_XATTR_H
+# include <sys/xattr.h>
+# endif
+#endif
#include <utime.h>
#include <pwd.h>
#include <grp.h>
diff --git a/core/src/droplet/libdroplet/src/utils.c b/core/src/droplet/libdroplet/src/utils.c
index 8114229..4fe947d 100644
--- a/core/src/droplet/libdroplet/src/utils.c
+++ b/core/src/droplet/libdroplet/src/utils.c
@@ -32,9 +32,14 @@
* https://github.com/scality/Droplet
*/
#include <dropletp.h>
-#include <linux/xattr.h>
-#include <attr/xattr.h>
#include <errno.h>
+#ifdef HAVE_ATTR_XATTR_H
+# include <attr/xattr.h>
+#else
+# ifdef HAVE_SYS_XATTR_H
+# include <sys/xattr.h>
+# endif
+#endif
/** @file */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment