Skip to content

Commit

Permalink
Merge branch 'bareos-17.2' into bareos-18.2
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz committed Jun 25, 2018
2 parents 0dd0390 + 000ccba commit 084505c
Show file tree
Hide file tree
Showing 21 changed files with 194 additions and 141 deletions.
10 changes: 10 additions & 0 deletions core/debian/bareos-director.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ SuccessExitStatus=0 1 15
# This daemon should be able to reload the conf file
#ExecReload=/sbin/killproc -p @piddir@/bareos-dir.pid -HUP @sbindir@/bareos-dir
#Restart=on-failure
# Allow unlimited restarts,
# required for automatic restarting on Univention Corporate Servers (UCS).
# Since systemd >= 230 this is a deprecated in favor for:
# [Unit]
# StartLimitIntervalSec=0
# However, as this also have to work for systems with older version of systemd,
# we stick to this old setting.
StartLimitInterval=0



[Install]
Alias=bareos-dir.service
Expand Down
64 changes: 0 additions & 64 deletions core/platforms/opsi/CLIENT_DATA/readme.txt

This file was deleted.

64 changes: 51 additions & 13 deletions core/platforms/opsi/OPSI/control
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ incremental: False
[Product]
type: localboot
id: winbareos
name: Bareos file daemon
description: backup software
name: Bareos File Daemon
description: backup and restore client
advice:
version: $ProductVersion
priority: 0
Expand Down Expand Up @@ -51,49 +51,83 @@ type: unicode
name: filedaemon_client_address
multivalue: False
editable: True
description: address of the filedaemon. Leave empty for HostID-fd
description: FQDN of the Bareos File Daemon. Default is the detected HostID.
default: [""]

[ProductProperty]
type: unicode
name: filedaemon_monitor_name
multivalue: False
editable: True
description: filedaemon bareos name. Leave empty for HostID-mon
description: Name used by monitoring (eg. Tray Monitor) to connect to this Bareos File Daemon. Default is HostID-mon.
default: [""]

[ProductProperty]
type: unicode
name: filedaemon_monitor_password
multivalue: False
editable: True
description: password used by monitoring (eg. tray-monitor) to connect to this filedaemon
description: password used by monitoring (eg. Tray Monitor) to connect to this Bareos File Daemon.
default: ["filedaemon_monitor_password"]

[ProductProperty]
type: unicode
name: director_name
name: director_address
multivalue: False
editable: True
description: access to Bareos director for bconsole and bat
default: ["director_name"]
description: FQDN/IP of the Bareos Director. Used by the locally initiated console connections.
default: ["director_address"]

[ProductProperty]
type: unicode
name: director_address
name: director_name
multivalue: False
editable: True
description: access to Bareos director for bconsole and bat
default: ["director_address"]
description: Name of the Bareos Director. Used by the locally initiated console connections.
default: ["bareos-dir"]

[ProductProperty]
type: unicode
name: director_password
multivalue: False
editable: True
description: access to Bareos director for bconsole and bat
description: Password of the Bareos Director. Used by the locally initiated console connections.
default: ["director_password"]

[ProductProperty]
type: unicode
name: jobdefs
multivalue: False
editable: True
description: Only used by Bareos OPSI integration script: use a predefined job definitions (JobDefs).
default: ["DefaultJob"]

[ProductProperty]
type: unicode
name: fileset
multivalue: False
editable: True
description: Only used by Bareos OPSI integration script: if set, let the backup job use this explicitly defined FileSet.
default: ["Windows All Drives"]

#[ProductProperty]
#type: BoolProductProperty
#name: ConnectionFromDirectorToClient
#multivalue: False
#editable: False
#description: Network connections are initiated from the Director to the Client.
#values: ["false", "true"]
#default: ["true"]

#[ProductProperty]
#type: BoolProductProperty
#name: ConnectionFromClientToDirector
#multivalue: False
#editable: False
#description: Network connections are initiated from the Client to the Director.
#values: ["false", "true"]
#default: ["false"]

[ProductProperty]
type: unicode
name: install_architecture
Expand All @@ -104,13 +138,17 @@ values: ["32 only", "64 only", "both", "system specific"]
default: ["system specific"]

[Changelog]
20180222, Jörg Steffens
* cleanup
* add ProductProperty jobdefs and fileset.

20130627, Daniel Neuberger
* added ProductProperty Update_KeepConfig

20130215, Joerg Steffens
* adapted to be build with http://build.opensuse.org

20130129, , Daniel Neuberger
20130129, Daniel Neuberger
* inital Bareos
* added properties filedaemon_client_address
* added Variables in setup
Expand Down
2 changes: 1 addition & 1 deletion core/platforms/packaging/bareos-aix.spec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# SPEC File for Bareos on AIX
#
Name: bareos
Version: 17.2.4
Version: 17.2.6
Release: 0
Group: Productivity/Archiving/Backup
License: AGPL-3.0
Expand Down
17 changes: 7 additions & 10 deletions core/platforms/packaging/bareos.spec
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ URL: http://www.bareos.org/
Vendor: The Bareos Team
#Packager: {_packager}

#%%define _libversion 16.4.3

%define library_dir %{_libdir}/%{name}
%define backend_dir %{_libdir}/%{name}/backends
%define plugin_dir %{_libdir}/%{name}/plugins
Expand Down Expand Up @@ -46,13 +44,12 @@ Vendor: The Bareos Team
%define have_git 1
%define ceph 0
%define install_suse_fw 0
%define systemd 0
%define systemd_support 0
%define python_plugins 1

# cmake build directory
%define CMAKE_BUILDDIR cmake-build


# fedora 28 deprecated libwrap
%if 0%{?fedora} >= 28 || 0%{?rhel} > 7
%define use_libwrap 0
Expand Down Expand Up @@ -96,7 +93,6 @@ BuildRequires: libtirpc-devel
# therefore build it only for SLE_12 and SLE_12_SP1
%if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120100
%define ceph 1
%define objectstorage 1
%endif

#
Expand Down Expand Up @@ -148,7 +144,7 @@ BuildRequires: systemd-rpm-macros
%{?systemd_requires}
%endif

%if 0%{droplet}
%if 0%{?droplet}
BuildRequires: libdroplet-devel
%endif

Expand Down Expand Up @@ -337,7 +333,7 @@ Requires(pre): shadow-utils
Requires: bareos-tools
%endif

%if 0%{droplet}
%if 0%{?droplet}
%package storage-droplet
Summary: Object Storage support (through libdroplet) for the Bareos Storage daemon
Group: Productivity/Archiving/Backup
Expand Down Expand Up @@ -609,7 +605,7 @@ This package contains the Storage Daemon
This package contains the Storage Daemon tape support
(Bareos service to read and write data from/to tape media)

%if 0%{droplet}
%if 0%{?droplet}
%description storage-droplet
%{dscr}

Expand Down Expand Up @@ -805,7 +801,8 @@ cmake .. \
%endif
-Dincludes=yes

make DESTDIR=%{buildroot}
#Add flags
%__make CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags};

%check
# run unit tests
Expand Down Expand Up @@ -1076,7 +1073,7 @@ echo "This is a meta package to install a full bareos system" > %{buildroot}%{_d
%attr(0640, %{director_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/bareos-dir.d/storage/NULL.conf.example
%attr(0640, %{storage_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/bareos-sd.d/device/NULL.conf.example

%if 0%{droplet}
%if 0%{?droplet}
%files storage-droplet
%defattr(-, root, root)
%{backend_dir}/libbareossd-chunked*.so
Expand Down
14 changes: 10 additions & 4 deletions core/platforms/systemd/bareos-dir.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ After=nss-lookup.target network.target remote-fs.target time-sync.target postgre
ConditionPathIsDirectory=@working_dir@
# Before=
# Conflicts=
#
# allow unlimited restarts,
# required for automatic restarting on Univention Corporate Servers (UCS)
StartLimitIntervalSec=0

[Service]
Type=forking
Expand All @@ -42,6 +38,16 @@ SuccessExitStatus=0 1 15
# This daemon should be able to reload the conf file
#ExecReload=/sbin/killproc -p @piddir@/bareos-dir.pid -HUP @sbindir@/bareos-dir
#Restart=on-failure
# Allow unlimited restarts,
# required for automatic restarting on Univention Corporate Servers (UCS).
# Since systemd >= 230 this is a deprecated in favor for:
# [Unit]
# StartLimitIntervalSec=0
# However, as this also have to work for systems with older version of systemd,
# we stick to this old setting.
StartLimitInterval=0



[Install]
Alias=bareos-director.service
Expand Down
2 changes: 1 addition & 1 deletion core/platforms/univention/AppCenter/LICENSE_AGREEMENT.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<td>Copyright (C) 2000-2012 Free Software Foundation Europe e.V.</td>
</tr>
<tr>
<td>Copyright (C) 2013-2017 Bareos GmbH &amp; Co. KG</td>
<td>Copyright (C) 2013-2018 Bareos GmbH &amp; Co. KG</td>
</tr>
</table>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ if username and password:
#bareos_sign_key_id = 'F93C028C093BFBA2'

ucs_version = configRegistry.get('version/version')
bareos_univention_dist = 'Univention_4.0'
bareos_univention_dist = '@OBS_DISTRIBUTION@'

#
# example:
# http://download.bareos.com/bareos/release/15.2/Univention_4.0/
# https does not work on UCS 4.0, even if apt-transport-https is installed.
# With UCS 4.2, https can and will be used.
#
bareos_com_url = "http://{username}:{password}@download.bareos.com/bareos/release/{version}/{dist}".format(username=quote(username), password=password, version=bareos_major_version, dist=bareos_univention_dist)
bareos_com_url = "https://{username}:{password}@download.bareos.com/bareos/release/{version}/{dist}".format(username=quote(username), password=password, version=bareos_major_version, dist=bareos_univention_dist)

# import the bareos signing key from a keyserver (does work, if internet connection is available)
#cmd = subprocess.Popen(['apt-key', 'adv', '--keyserver', 'pool.sks-keyservers.net', '--recv-key', bareos_sign_key_id], stdout=sys.stderr, stderr=sys.stderr)
Expand Down
5 changes: 5 additions & 0 deletions core/scripts/bareos-config-lib.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,11 @@ set_config_param_in_directory()
# value to set
VALUE="${5}"

if ! [ -e "${DIRECTORY}/${SECTION}" ]; then
warn "failed to set parameter ${SECTION} ${NAME} ${PARAM} = ${VALUE}: directory ${DIRECTORY}/${SECTION} does not exist"
return 1
fi

FILE="${DIRECTORY}/${SECTION}/${NAME}.conf"
if ! [ -f "${FILE}" ]; then
printf "%s {\n Name = %s\n}\n" "${SECTION}" "${NAME}" > "${FILE}"
Expand Down
1 change: 1 addition & 0 deletions core/src/cats/dml/0047_bvfs_select
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ FROM Job,
WHERE T1.JobTDate = Job.JobTDate
AND Job.JobId = File.JobId
AND T1.PathId = File.PathId
AND T1.Name = File.Name
AND File.FileIndex > 0
AND Job.JobId IN
(SELECT DISTINCT JobId
Expand Down
13 changes: 6 additions & 7 deletions core/src/cats/dml/0072_get_orphaned_paths_0
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#
# dbcheck: eliminate_orphaned_path_records
#
# get all Paths not used by Files
# and are not substrings to others Paths.
# get all Paths not used by Files or BVFS
#
# LIKE: _% wildcard, but at least one character
#
SELECT DISTINCT ParentPath.PathId,File.PathId,ParentPath.Path
FROM Path AS ParentPath LEFT OUTER JOIN File USING(PathId)
SELECT DISTINCT Path.PathId, File.PathId, Path.Path
FROM Path
LEFT JOIN File USING (PathId)
LEFT JOIN PathHierarchy ON (Path.Pathid = PathHierarchy.PPathId)
WHERE File.PathId IS NULL
AND NOT EXISTS (SELECT 1 FROM Path WHERE Path LIKE ParentPath.Path || '_%%')
AND PathHierarchy.PPathId IS NULL
LIMIT 300000
Loading

0 comments on commit 084505c

Please sign in to comment.