Skip to content

Commit

Permalink
improve Univention UCS 4.x AppCenter integration
Browse files Browse the repository at this point in the history
After review from Univention, a couple of things gets adapted.
Most notably, the package univention-bareos-schema have been discarded.
Instead the join script from univention-bareos registers the LDAP schema
extension.
  • Loading branch information
joergsteffens committed Jan 20, 2016
1 parent 297f2d5 commit f06c291
Show file tree
Hide file tree
Showing 20 changed files with 359 additions and 136 deletions.
5 changes: 0 additions & 5 deletions autoconf/configure.in
Expand Up @@ -4188,7 +4188,6 @@ debian|ubuntu|univention)
TAPEDRIVE="/dev/nst0"
PSCMD="ps -e -o pid,command"
DEBIAN_CONTROL_UNIVENTION_BAREOS=/dev/null
DEBIAN_CONTROL_UNIVENTION_BAREOS_SCHEMA=/dev/null
PFILES="${PFILES} ${DEBIAN_CONTROL} \
debian/bareos-bat.install \
debian/bareos-bat.postinst \
Expand Down Expand Up @@ -4243,10 +4242,7 @@ debian|ubuntu|univention)
;;
univention)
DEBIAN_CONTROL_UNIVENTION_BAREOS=./debian/control.univention-bareos
DEBIAN_CONTROL_UNIVENTION_BAREOS_SCHEMA=./debian/control.univention-bareos-schema
PFILES="${PFILES} \
debian/univention-bareos-schema.install \
debian/univention-bareos-schema.postinst \
debian/univention-bareos.install \
debian/univention-bareos.postinst \
platforms/univention/Makefile \
Expand All @@ -4255,7 +4251,6 @@ debian|ubuntu|univention)
;;
esac
AC_SUBST_FILE(DEBIAN_CONTROL_UNIVENTION_BAREOS)
AC_SUBST_FILE(DEBIAN_CONTROL_UNIVENTION_BAREOS_SCHEMA)
;;
freebsd)
VER=`echo $DISTVER | cut -c 1`
Expand Down
2 changes: 0 additions & 2 deletions debian/control.in
Expand Up @@ -315,5 +315,3 @@ Description: Backup Archiving Recovery Open Sourced - common tools
@DEBIAN_CONTROL_TRAYMONITOR@

@DEBIAN_CONTROL_UNIVENTION_BAREOS@

@DEBIAN_CONTROL_UNIVENTION_BAREOS_SCHEMA@
9 changes: 7 additions & 2 deletions debian/control.univention-bareos
@@ -1,13 +1,18 @@
Package: univention-bareos
Architecture: all
# univention-postgresql is required to be configured before bareos-database-common (bareos-database-postgresql)
Pre-Depends: univention-postgresql
Depends: bareos (= ${binary:Version}),
bareos-database-postgresql,
bareos-webui,
univention-bareos-schema (= ${binary:Version}),
univention-config,
univention-join (>> 5.0.20-1.436),
univention-postgresql,
shell-univention-lib (>> 2.0.17-1.125),
shell-univention-lib (>> 2.0.17-1.125)
# Older versions do require the package univention-bareos-schema,
# which does no longer exist.
Provides: univention-bareos-schema
Replaces: univention-bareos-schema
Description: Backup Archiving Recovery Open Sourced - UCS integration
This package integrates the Bareos backup solution into
UCS. The package provides automatic configuration of the
Expand Down
8 changes: 0 additions & 8 deletions debian/control.univention-bareos-schema

This file was deleted.

1 change: 0 additions & 1 deletion debian/univention-bareos-schema.install.in

This file was deleted.

13 changes: 0 additions & 13 deletions debian/univention-bareos-schema.postinst.in

This file was deleted.

2 changes: 2 additions & 0 deletions debian/univention-bareos.install.in
Expand Up @@ -8,3 +8,5 @@
/usr/lib/univention-install/62univention-bareos.inst
/usr/lib/univention-uninstall/63univention-bareos.uinst
/usr/share/univention-bareos/restart_director
/usr/share/univention-bareos/univention-bareos.schema

30 changes: 1 addition & 29 deletions debian/univention-bareos.postinst.in
Expand Up @@ -25,7 +25,7 @@ if [ "$1" = "configure" ]; then
bareos/max_incr_volume_bytes?1 \
bareos/max_incr_volumes?1 \
bareos/backup_myself?no \
bareos/webui/console/user1/username?admin \
bareos/webui/console/user1/username?Administrator \
bareos/webui/console/user1/password?

# commit defaults
Expand Down Expand Up @@ -53,34 +53,6 @@ if [ "$1" = "configure" ]; then
# reload apache
invoke-rc.d apache2 reload

# Setting link to the web interface in ucs-overview administration
export P="ucs/web/overview/entries/admin"
export APP="bareos-webui"
export APPICON="../bareos-webui/img/bareos-logo.png"

ucr set \
"$P/$APP"/description/de="Bareos Backup Monitoring und Management" \
"$P/$APP"/description="Bareos Backup monitoring and management" \
"$P/$APP"/label/de="Bareos Backup - Web User Interface" \
"$P/$APP"/label="Bareos Backup - Web User Interface" \
"$P/$APP"/link="../bareos-webui/" \
"$P/$APP"/icon="$APPICON"
#"$P/$APP"/priority=xx-digits-for-sorting-or-just-dont-set

# Setting link to univention configuration registry in in ucs-overview administration
export P="ucs/web/overview/entries/admin"
export APP="bareos-core"
export APPICON="../bareos-webui/img/bareos-logo.png"

ucr set \
"$P/$APP"/description/de="Grundlegende Bareos Konfiguration mittels UCR Variablen bareos/*" \
"$P/$APP"/description="Basic configuration of Bareos by UCR variables bareos/*" \
"$P/$APP"/label/de="Bareos Backup - Konfiguration" \
"$P/$APP"/label="Bareos Backup - Configuration" \
"$P/$APP"/link="../univention-management-console/#module=ucr::0:" \
"$P/$APP"/icon="$APPICON"
#"$P/$APP"/priority=xx-digits-for-sorting-or-just-dont-set

call_joinscript 62univention-bareos.inst
fi

Expand Down
12 changes: 0 additions & 12 deletions platforms/packaging/bareos-Univention_3.1.dsc

This file was deleted.

12 changes: 0 additions & 12 deletions platforms/packaging/bareos-Univention_3.2.dsc

This file was deleted.

4 changes: 2 additions & 2 deletions platforms/packaging/bareos-Univention_4.0.dsc
@@ -1,9 +1,9 @@
Format: 1.0
Source: bareos
Binary: bareos, bareos-bat, bareos-bconsole, bareos-client, bareos-common, bareos-database-common, bareos-database-postgresql, bareos-database-mysql, bareos-database-sqlite3, bareos-database-tools, bareos-devel, bareos-director, bareos-director-python-plugin, bareos-filedaemon, bareos-filedaemon-python-plugin, bareos-storage, bareos-storage-fifo, bareos-storage-tape, bareos-storage-python-plugin, bareos-tools, bareos-traymonitor, univention-bareos, univention-bareos-schema
Binary: bareos, bareos-bat, bareos-bconsole, bareos-client, bareos-common, bareos-database-common, bareos-database-postgresql, bareos-database-mysql, bareos-database-sqlite3, bareos-database-tools, bareos-devel, bareos-director, bareos-director-python-plugin, bareos-filedaemon, bareos-filedaemon-python-plugin, bareos-storage, bareos-storage-fifo, bareos-storage-tape, bareos-storage-python-plugin, bareos-tools, bareos-traymonitor, univention-bareos
Architecture: any
Version: 15.2.2
Maintainer: Joerg Steffens <joerg.steffens@bareos.com>
Maintainer: Bareos Packaging Team <packager@bareos.com>
Homepage: http://www.bareos.org/
Standards-Version: 3.9.4
Build-Depends: acl-dev, autotools-dev, bc, chrpath, debhelper (>= 7.0.50~), dpkg-dev (>= 1.13.19), git-core, libacl1-dev, libcap-dev, libfastlz-dev, libjansson-dev, liblzo2-dev, libqt4-dev, libreadline-dev, libssl-dev, libwrap0-dev, libx11-dev, libsqlite3-dev, libmysqlclient-dev, libpq-dev (>= 8.4), logrotate, lsb-release, mtx, ncurses-dev, openssl, pkg-config, po-debconf (>= 0.8.2), python-dev, ucslint, univention-config-dev, zlib1g-dev
Expand Down
2 changes: 1 addition & 1 deletion platforms/packaging/bareos.dsc
Expand Up @@ -3,7 +3,7 @@ Source: bareos
Binary: bareos, bareos-bat, bareos-bconsole, bareos-client, bareos-common, bareos-database-common, bareos-database-postgresql, bareos-database-mysql, bareos-database-sqlite3, bareos-database-tools, bareos-devel, bareos-director, bareos-director-python-plugin, bareos-filedaemon, bareos-filedaemon-python-plugin, bareos-storage, bareos-storage-fifo, bareos-storage-tape, bareos-storage-python-plugin, bareos-tools, bareos-traymonitor
Architecture: any
Version: 15.2.2
Maintainer: Joerg Steffens <joerg.steffens@bareos.com>
Maintainer: Bareos Packaging Team <packager@bareos.com>
Homepage: http://www.bareos.org/
Standards-Version: 3.9.4
Build-Depends: acl-dev, autotools-dev, bc, chrpath, debhelper (>= 7.0.50~), dpkg-dev (>= 1.13.19), git-core, libacl1-dev, libcap-dev, libcmocka-dev (>= 1.0.1), libfastlz-dev, libjansson-dev, liblzo2-dev, libqt4-dev, libreadline-dev, libssl-dev, libwrap0-dev, libx11-dev, libsqlite3-dev, libmysqlclient-dev, libpq-dev, logrotate, lsb-release, mtx, ncurses-dev, openssl, pkg-config, po-debconf (>= 0.8.2), python-dev, zlib1g-dev
Expand Down
8 changes: 6 additions & 2 deletions platforms/univention/62univention-bareos.inst
@@ -1,6 +1,6 @@
#!/bin/sh

VERSION=1
VERSION=2

. /usr/share/univention-lib/base.sh
. /usr/share/univention-lib/ldap.sh
Expand All @@ -11,8 +11,11 @@ eval "$(univention-config-registry shell)"

ucs_addServiceToLocalhost "Bareos Backup" "$@"

ucs_registerLDAPExtension "$@" --schema /usr/share/univention-bareos/univention-bareos.schema

# keep "cn=custom attributes,cn=univention,$ldap_base" clean
univention-directory-manager container/cn create "$@" --ignore_exists \
univention-directory-manager container/cn create "$@" \
--ignore_exists \
--position "cn=custom attributes,cn=univention,$ldap_base" \
--set name="bareos" || die

Expand Down Expand Up @@ -40,3 +43,4 @@ univention-directory-manager settings/extended_attribute create "$@" \
joinscript_save_current_version

exit 0

30 changes: 30 additions & 0 deletions platforms/univention/AppCenter/README
@@ -0,0 +1,30 @@
<p>
After installation, the Bareos Director is ready for backup jobs.
Before you continue, you should review the UCR variables
<ul>
<li><b>bareos/filestorage</b> (default: /var/lib/bareos/storage)</li>
<li><b>bareos/backup_myself</b> (default: no)</li>
<li><b>bareos/max_*_volume*</b></li>
</ul>
to limit the local disk space it uses.
</p>

<p>
In addition to that, you should set the login credentials for the Bareos WebUI with the following UCR variables:
<ul>
<li><b>bareos/webui/console/user1/username</b> (default: Administrator)</li>
<li><b>bareos/webui/console/user1/password</b> (no default, must be set)</li>
</ul>
</p>

<p>
<a href="javascript:void(0)" onclick='require("umc/app").openModule("ucr", null, {})'>Univention Configuration Registry Module</a> to manage the bareos/* UCR variables on this system.
</p>

<p>
For more details, see the <a href="http://doc.bareos.org/master/html/bareos-manual-main-reference.html#sec:UniventionCorporateServer" target="_blank">Bareos documentation</a>.
</p>

<p>
<a href="/bareos-webui" target="_blank">Bareos Web User Interface</a> to monitor and manage Bareos.
</p>
30 changes: 30 additions & 0 deletions platforms/univention/AppCenter/README_DE
@@ -0,0 +1,30 @@
<p>
Nach der Installation ist der Bareos Director einsatzbereit.
Es sollten jedoch noch die folgenden UCR Variablen
<ul>
<li><b>bareos/filestorage</b> (Standardwert: /var/lib/bareos/storage)</li>
<li><b>bareos/backup_myself</b> (Standardwert: no)</li>
<li><b>bareos/max_*_volume*</b></li>
</ul>
geprüft werden, um den maximal verfügbaren Festplattenspeicher zu begrenzen.
</p>

<p>
Zusätzlich sollten Sie die Anmelden-Informationen für das Bareos WebUI mit den folgenden UCR Variablen setzen:
<ul>
<li><b>bareos/webui/console/user1/username</b> (Standardwert: Administrator)</li>
<li><b>bareos/webui/console/user1/password</b> (ohne Standardwert)</li>
</ul>
</p>

<p>
<a href="javascript:void(0)" onclick='require("umc/app").openModule("ucr", null, {})'>Univention Configuration Registry Module</a> ermöglicht die Konfiguration der <tt>bareos/*</tt> UCR Variablen auf diesem System.
</p>

<p>
Für genauere Informationen lesen sie bitte die entsprechenden Abschnitte der <a href="http://doc.bareos.org/master/html/bareos-manual-main-reference.html#sec:UniventionCorporateServer" target="_blank">Bareos Dokumentation</a>.
</p>

<p>
<a href="/bareos-webui" target="_blank">Bareos Web User Interface</a> ermöglicht das Monitoring und Management von Bareos.
</p>
10 changes: 0 additions & 10 deletions platforms/univention/AppCenter/README_POST_INSTALL

This file was deleted.

61 changes: 30 additions & 31 deletions platforms/univention/AppCenter/univention-bareos.ini.in
@@ -1,59 +1,58 @@
[Application]
ID=bareos
Name=Bareos Backup
Logo=bareos-logo.svg
LogoDetailPage=bareos-logo-full.svg

# 2-char Code for this App ID
Code=BR
Name=Bareos Backup Server
Version=@VERSION@

EmailRequired=True
NotifyVendor=True

Description=scalable open source network backup solution
Description=Scalable open source network backup solution
LongDescription=Bareos (Backup Archiving Recovery Open Sourced) is a reliable,
network-based open source software for backup, archiving and recovery
of data for all well-established operating systems. The source code of
Bareos is available on Github under the AGPL v3 license. Additionally
Bareos offers binary package repositories for the most important Linux
distributions as well as for Windows. ATTENTION: After installation,
you need to review at least the UCR variables
bareos/filestorage, bareos/backup_myself and bareos/max_*_volumes
for proper operation.
Set the login credentials for the webui with the UCR variables
bareos/webui/console/user1/username and bareos/webui/console/user1/password.

Screenshot=bareos-webui_screenshot.png
network-based open source software for backup, archiving and recovery
of data for all well-established operating systems (Linux, UN*X, MacOS, Windows).
It has a WebUI and Univention Management Console integration.
Thumbnails=bareos-webui_screenshot.png
Categories=Administration

Vendor=Bareos GmbH und Co. KG
Website=http://www.bareos.org/en/HOWTO/articles/bareos-univention-documentation.html
WebsiteVendor=http://www.bareos.com
SupportURL=http://www.bareos.com/en/support.html
SupportURL=http://www.bareos.com/en/Support.html
Contact=sales@bareos.com
NotificationEmail=info@bareos.com
LicenseFile=LICENSE_AGREEMENT

WebInterface=/bareos-webui
WebInterfaceName=Bareos Backup - Web User Interface
UCSOverviewCategory=admin

ConflictedApps=
ConflictedSystemPackages=univention-bacula,bacula-director-common,bacula-fd,bacula-sd
DefaultPackages=univention-bareos
DefaultPackagesMaster=univention-bareos-schema

# allow installation on these server roles
ServerRole=domaincontroller_master,domaincontroller_backup,domaincontroller_slave

# whether a "Shop" button is displayed in the App details, leading to the ShopURL
UseShop=True

# URL that the user is directed to. Only makes sense in combination with UseShop=True.
#ShopURL=https://www.bareos.com/en/Buy.html
ShopURL=https://appcenter.univention.com/bareos.html

ApplianceCreate=True
# ApplianceName=
# ApplianceLogo=
AppliancePagesBlackList=software
ApplianceFieldsBlackList=basesystem
# ApplianceBlackList=
# ApplianceWhiteList=
# ApplianceMemory=
# ApplianceAdditionalApps=

[de]
Description=Leistungsfähige Open-Source-Backup-Lösung
LongDescription=Bareos (Backup Archiving Recovery Open Sourced) ist eine zuverlässige,
netzwerkübergreifende Open Source Software zur Sicherung, Archivierung
und Wiederherstellung von Daten aller gängigen Betriebssysteme. Der
Quellcode von Bareos ist auf Github verfügbar und steht unter der Lizenz
AGPL v3. Zudem stellt Bareos fertige Pakete über Repositories für die
wichtigsten Linux Distributionen sowie für Windows bereit.
ACHTUNG: Nach der Installation sollten die UCR-Variablen
bareos/filestorage, bareos/backup_myself und bareos/max_*_volumes geprüft werden,
um einen korrekten Betrieb zu gewährleisten. Die anzupassenden Anmeldedaten für
die webui sind in den UCR-Variablen bareos/webui/console/user1/username und
bareos/webui/console/user1/password hinterlegt.
und Wiederherstellung von Daten aller gängigen Betriebssysteme (Linux, UN*X, MacOS, Windows).
Es bietet ein eigenes Webfrontend sowie Integration in die Univention Management Console.
ShopURL=https://appcenter.univention.de/bareos.html
12 changes: 6 additions & 6 deletions platforms/univention/Makefile.in
Expand Up @@ -14,9 +14,11 @@ all:
@$(MKDIR) ../../AppCenter/
$(INSTALL_DATA) AppCenter/univention-bareos.ini ../../AppCenter/
$(INSTALL_DATA) AppCenter/LICENSE_AGREEMENT ../../AppCenter/
$(INSTALL_DATA) AppCenter/README_POST_INSTALL ../../AppCenter/
$(INSTALL_DATA) AppCenter/README ../../AppCenter/
$(INSTALL_DATA) AppCenter/README_DE ../../AppCenter/
$(INSTALL_DATA) AppCenter/bareos-webui_screenshot.png ../../AppCenter/
$(INSTALL_DATA) ../../src/images/bareos_logo_shadow.png ../../AppCenter/bareos.png
$(INSTALL_DATA) ../../src/images/bareos-logo.svg ../../AppCenter/
$(INSTALL_DATA) ../../src/images/bareos-logo-full.svg ../../AppCenter/

install:
(cd ../debian; $(MAKE) $@;)
Expand Down Expand Up @@ -47,10 +49,8 @@ install:
@$(INSTALL_PROGRAM) 63univention-bareos.uinst $(DESTDIR)/usr/lib/univention-uninstall/

@$(MKDIR) $(DESTDIR)/usr/share/univention-bareos/
@$(INSTALL_PROGRAM) restart_director $(DESTDIR)/usr/share/univention-bareos/

@$(MKDIR) $(DESTDIR)/usr/share/univention-bareos-schema/
@$(INSTALL_CONFIG) univention-bareos.schema $(DESTDIR)/usr/share/univention-bareos-schema/univention-bareos.schema
@$(INSTALL_PROGRAM) restart_director $(DESTDIR)/usr/share/univention-bareos/
@$(INSTALL_CONFIG) univention-bareos.schema $(DESTDIR)/usr/share/univention-bareos/

@$(MKDIR) $(DESTDIR)/etc/univention/templates/scripts/etc/bareos/
@$(INSTALL_PROGRAM) bareos-dir.conf $(DESTDIR)/etc/univention/templates/scripts/etc/bareos/
Expand Down

0 comments on commit f06c291

Please sign in to comment.