%bcond_with vmware %if %{with vmware} %global build_vmware 1 %else %global build_vmware 0 %endif %global _hardened_build 1 %global my_cmake my-build %global my_cmake_vmware my-build_vmware %global library_dir %{_libdir}/%{name} %global backend_dir %{_libdir}/%{name}/backends %global plugin_dir %{_libdir}/%{name}/plugins %global script_dir %{_sharedstatedir}/%{name}/scripts %global working_dir %{_sharedstatedir}/%{name} %global pid_dir %{_sharedstatedir}/%{name} %global bsr_dir %{_sharedstatedir}/%{name} %global _subsysdir %{_localstatedir}/lock %global daemon_user bareos %global daemon_group bareos %global director_daemon_user %{daemon_user} %global storage_daemon_user %{daemon_user} %global file_daemon_user root %global storage_daemon_group %{daemon_group} %global client_only 0 %global build_qt_monitor 1 %global build_sqlite3 1 %global glusterfs 1 %global droplet 1 %global have_git 1 %global ceph 1 %global python_plugins 1 %global webui 1 %global dscr Bareos - Backup Archiving Recovery Open Sourced. \ Bareos is a set of computer programs that permit you (or the system \ administrator) to manage backup, recovery, and verification of computer \ data across a network of computers of different kinds. In technical terms, \ it is a network client/server based backup program. Bareos is relatively \ easy to use and efficient, while offering many advanced storage management \ features that make it easy to find and recover lost or damaged files. \ Bareos source code has been released under the AGPL version 3 license. Name: bareos Version: 19.2.6 Release: 1%{?dist} License: AGPLv3 URL: http://www.bareos.org/ Source0: %{name}-Release-%{version}.tar.gz Patch0: %{name}-version.patch # fedora don't support it, to new for bareos %if 0%{?fedora} %global droplet 0 %if 0%{?fedora} >= 30 %global glusterfs 1 %endif %endif %if %{with vmware} BuildRequires: VMware-vix-disklib-devel %endif BuildRequires: systemd %{?systemd_requires} %if 0%{?droplet} BuildRequires: pkgconfig(droplet-3.0) %endif %if 0%{?glusterfs} BuildRequires: pkgconfig(glusterfs-api) %endif %if 0%{?ceph} BuildRequires: libradosstriper-devel libcephfs-devel %endif %if 0%{?have_git} BuildRequires: git-core %endif %if 0%{?build_sqlite3} BuildRequires: pkgconfig(sqlite3) %endif %if 0%{?build_qt_monitor} BuildRequires: pkgconfig(Qt5) %endif %if 0%{?python_plugins} BuildRequires: python3-devel %endif %if 0%{?fedora} BuildRequires: rpcgen %endif BuildRequires: pkgconfig(ncurses) pkgconfig(zlib) pkgconfig(openssl) pkgconfig(libcap) pkgconfig(jansson) BuildRequires: pam-devel glibc-devel readline-devel libstdc++-devel libacl-devel lzo-devel libfastlz-devel BuildRequires: mysql-devel postgresql-devel php-cli procps-ng pam_wrapper percona-xtrabackup BuildRequires: cmake3 perl gcc gcc-c++ make logrotate mtx passwd BuildRequires: glibc-common BuildRequires: pkgconfig(libtirpc) pkgconfig(gmock) #For the tests BuildRequires: pamtester chromedriver gtest-devel python3dist(selenium) Summary: Backup Archiving REcovery Open Sourced - metapackage Requires: %{name}-director = %{version} Requires: %{name}-storage = %{version} Requires: %{name}-client = %{version} %description %{dscr} %package bconsole Summary: Bareos administration console (CLI) Requires: %{name}-common = %{version} %package client Summary: Bareos client Meta-All-In-One package Requires: %{name}-bconsole = %{version} Requires: %{name}-filedaemon = %{version} %package director Summary: Bareos Director daemon Requires: %{name}-common = %{version} Requires: %{name}-database-common = %{version} Requires: %{name}-database-tools Requires(pre): shadow-utils Provides: %{name}-dir = %{version} %package storage Summary: Bareos Storage daemon Requires: %{name}-common = %{version} Provides: %{name}-sd = %{version} Requires(pre): shadow-utils Requires: %{name}-tools %if 0%{?droplet} %package storage-droplet Summary: Object Storage support (through libdroplet) for the Bareos Storage daemon Requires: %{name}-common = %{version} Requires: %{name}-storage = %{version} %endif %if 0%{?glusterfs} %package storage-glusterfs Summary: GlusterFS support for the Bareos Storage daemon Requires: %{name}-common = %{version} Requires: %{name}-storage = %{version} Requires: glusterfs %endif %if 0%{?ceph} %package storage-ceph Summary: CEPH support for the Bareos Storage daemon Requires: %{name}-common = %{version} Requires: %{name}-storage = %{version} %endif %package storage-tape Summary: Tape support for the Bareos Storage daemon Requires: %{name}-common = %{version} Requires: %{name}-storage = %{version} Requires: mtx mt-st %package storage-fifo Summary: FIFO support for the Bareos Storage backend Requires: %{name}-common = %{version} Requires: %{name}-storage = %{version} %package filedaemon Summary: Bareos File daemon (backup and restore client) Requires: %{name}-common = %{version} Provides: %{name}-fd = %{version} Requires(pre): shadow-utils %package common Summary: Common files, required by multiple Bareos packages Requires: openssl Requires(pre): shadow-utils Provides: %{name}-libs = %{version} %package database-common Summary: Generic abstraction libs and files to connect to a database Requires: %{name}-common = %{version} Requires: %{name}-database-backend = %{version} Requires: openssl Provides: %{name}-sql = %{version} %package database-postgresql Summary: Libs & tools for postgresql catalog Requires: %{name}-database-common = %{version} Provides: %{name}-catalog-postgresql = %{version} Provides: %{name}-database-backend = %{version} %package database-mysql Summary: Libs & tools for mysql catalog Requires: %{name}-database-common = %{version} Provides: %{name}-catalog-mysql = %{version} Provides: %{name}-database-backend = %{version} %if 0%{?build_sqlite3} %package database-sqlite3 Summary: Libs & tools for sqlite3 catalog Requires: %{name}-database-common = %{version} Provides: %{name}-catalog-sqlite3 = %{version} Provides: %{name}-database-backend = %{version} %endif %package database-tools Summary: Bareos CLI tools with database dependencies (bareos-dbcheck, bscan) Requires: %{name}-common = %{version} Requires: %{name}-database-common = %{version} Provides: %{name}-dbtools = %{version} %package tools Summary: Bareos CLI tools (bcopy, bextract, bls, bregex, bwild) Requires: %{name}-common = %{version} %if 0%{build_qt_monitor} %package traymonitor Summary: Bareos Tray Monitor (QT) Conflicts: %{name}-tray-monitor-gtk Provides: %{name}-tray-monitor-qt = %{version} %endif %package devel Summary: Devel headers Requires: %{name}-common = %{version} Requires: pkgconfig(zlib) pkgconfig(libcap) pkgconfig(openssl) Requires: libacl-devel postgresql-devel mariadb-devel %if 0%{?build_sqlite3} Requires: pkgconfig(sqlite3) %endif %package regress-config Summary: Required files for bareos-regress Requires: %{name}-common = %{version} %if 0%{?python_plugins} %package director-python-plugin Summary: Python plugin for Bareos Director daemon Requires: %{name}-director = %{version} Requires: python2-sslpsk %package filedaemon-python-plugin Summary: Python plugin for Bareos File daemon Requires: %{name}-filedaemon = %{version} Requires: python2-sslpsk %package filedaemon-ldap-python-plugin Summary: LDAP Python plugin for Bareos File daemon Requires: %{name}-filedaemon = %{version} Requires: %{name}-filedaemon-python-plugin = %{version} Requires: python2-sslpsk %package storage-python-plugin Summary: Python plugin for Bareos Storage daemon Requires: %{name}-storage = %{version} Requires: python2-sslpsk %description director-python-plugin %{dscr} This package contains the python plugin for the director daemon %description filedaemon-python-plugin %{dscr} This package contains the python plugin for the file daemon %description filedaemon-ldap-python-plugin %{dscr} This package contains the LDAP python plugin for the file daemon %description storage-python-plugin %{dscr} This package contains the python plugin for the storage daemon %endif %if 0%{?glusterfs} %package filedaemon-glusterfs-plugin Summary: GlusterFS plugin for Bareos File daemon Requires: %{name}-filedaemon = %{version} %description filedaemon-glusterfs-plugin %{dscr} This package contains the GlusterFS plugin for the file daemon %endif %if 0%{?ceph} %package filedaemon-ceph-plugin Summary: CEPH plugin for Bareos File daemon Requires: %{name}-filedaemon = %{version} %description filedaemon-ceph-plugin %{dscr} This package contains the CEPH plugins for the file daemon %endif %description client %{dscr} This package is a meta package requiring the packages containing the fd and the console. This is for client only installation. %description bconsole %{dscr} This package contains the bconsole (the CLI interface program) %description director %{dscr} This package contains the Director Service (Bareos main service daemon) %description storage %{dscr} This package contains the Storage Daemon (Bareos service to read and write data from/to media) %description storage-tape %{dscr} This package contains the Storage Daemon tape support (Bareos service to read and write data from/to tape media) %if 0%{?droplet} %description storage-droplet %{dscr} This package contains the Storage backend for Object Storage (through libdroplet). %endif %if 0%{?glusterfs} %description storage-glusterfs %{dscr} This package contains the Storage backend for GlusterFS. %endif %if 0%{?ceph} %description storage-ceph %{dscr} This package contains the Storage backend for CEPH. %endif %description storage-fifo %{dscr} This package contains the Storage backend for FIFO files. This package is only required, when a resource "Archive Device = fifo" should be used by the Bareos Storage Daemon. %description filedaemon %{dscr} This package contains the File Daemon (Bareos client daemon to read/write data from the backed up computer) %description common %{dscr} This package contains the shared libraries that are used by multiple daemons and tools. %description database-common %{dscr} This package contains the shared libraries that abstract the catalog interface %description database-postgresql %{dscr} This package contains the shared library to access postgresql as catalog db. %description database-mysql %{dscr} This package contains the shared library to use mysql as catalog db. %if 0%{?build_sqlite3} %description database-sqlite3 %{dscr} This package contains the shared library to use sqlite as catalog db. %endif %description database-tools %{dscr} This package contains Bareos database tools. %description tools %{dscr} This package contains Bareos tools. %if 0%{?build_qt_monitor} %description traymonitor %{dscr} This package contains the tray monitor (QT based). %endif %description devel %{dscr} This package contains bareos development files. %description regress-config %{dscr} This package contains required files for Bareos regression testing. %if 0%{?webui} %package webui Summary: Bareos webui Requires: httpd Buildarch: noarch %description webui %{dscr} %endif %prep %autosetup -n %{name}-Release-%{version} -p1 mkdir %{my_cmake} mkdir %{my_cmake_vmware} #For the checks sed -i "s/ctest/ctest3/g" core/CMakeLists.txt sed -i "s|LD_LIBRARY_PATH=|LD_LIBRARY_PATH=%{buildroot}%{_libdir}/%{name}:|g" core/src/tests/CMakeLists.txt %build export MTX=/usr/sbin/mtx pushd %{my_cmake} %cmake3 \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_INSTALL_PREFIX:PATH=/usr \ -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib \ -DINCLUDE_INSTALL_DIR:PATH=/usr/include \ -DLIB_INSTALL_DIR:PATH=/usr/lib \ -DSYSCONF_INSTALL_DIR:PATH=/etc \ -DSHARE_INSTALL_PREFIX:PATH=/usr/share \ -DBUILD_SHARED_LIBS:BOOL=ON \ -Dprefix=%{_prefix}\ -Dlibdir=%{library_dir} \ -Dsbindir=%{_sbindir} \ -Dsbin-perm=755 \ -Dsysconfdir=%{_sysconfdir} \ -Dconfdir=%{_sysconfdir}/bareos \ -Dmandir=%{_mandir} \ -Ddocdir=%{_docdir}/%{name} \ -Dhtmldir=%{_docdir}/%{name}/html \ -Darchivedir=/var/lib/%{name}/storage \ -Dbackenddir=%{backend_dir} \ -Dscriptdir=%{script_dir} \ -Dworkingdir=%{working_dir} \ -Dplugindir=%{plugin_dir} \ -Dpiddir=%{pid_dir} \ -Dbsrdir=%{bsr_dir} \ -Dlogdir=/var/log/bareos \ -Dsubsysdir=%{_subsysdir} \ %if 0%{?python_plugins} -Dpython=yes \ %endif -Dsmartalloc=yes \ -Ddisable-conio=yes \ -Dreadline=yes \ -Dbatch-insert=yes \ -Ddynamic-cats-backends=yes \ -Ddynamic-storage-backends=yes \ -Dscsi-crypto=yes \ -Dlmdb=yes \ -Dndmp=yes \ -Dbuild_ndmjob=yes \ -Dipv6=yes \ -Dacl=yes \ -Dxattr=yes \ -Dlockmgr=yes \ %if 0%{?build_qt_monitor} -Dtraymonitor=yes \ %endif %if 0%{?client_only} -Dclient-only=yes \ %endif -Dpostgresql=yes \ -Dmysql=yes \ %if 0%{?build_sqlite3} -Dsqlite3=yes \ %endif -Ddir-user=%{director_daemon_user} \ -Ddir-group=%{daemon_group} \ -Dsd-user=%{storage_daemon_user} \ -Dsd-group=%{storage_daemon_group} \ -Dfd-user=%{file_daemon_user} \ -Dfd-group=%{daemon_group} \ -Ddir-password="XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX" \ -Dfd-password="XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX" \ -Dsd-password="XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX" \ -Dmon-dir-password="XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX" \ -Dmon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" \ -Dmon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX" \ -Dopenssl=yes \ -Dbasename="XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX" \ -Dhostname="XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX" \ -Dsystemd=yes \ -Dincludes=yes \ .. make %{?_smp_mflags} %if 0%{?build_vmware} popd pushd %{my_cmake_vmware} %cmake3 ../vmware make %{?_smp_mflags} %endif %check pushd %{my_cmake} make check %install pushd %{my_cmake} %make_install #popd %if 0%{?build_vmware} pushd %{my_cmake_vmware} %make_install popd %endif install -d -m 755 %{buildroot}%{_datarootdir}/applications install -d -m 755 %{buildroot}%{_datarootdir}/pixmaps install -d -m 755 %{buildroot}%{backend_dir} install -d -m 755 %{buildroot}%{working_dir} install -d -m 755 %{buildroot}%{plugin_dir} #change network target to network-online for unit in $(ls %{buildroot}/%{_unitdir}); do sed -i "s/network\.target/network-online\.target/g" %{buildroot}/%{_unitdir}/${unit} done #Cleaning for F in \ %if 0%{?client_only} %{_mandir}/man1/bregex.1.gz \ %{_mandir}/man1/bsmtp.1.gz \ %{_mandir}/man1/bwild.1.gz \ %{_mandir}/man8/%{name}-dbcheck.8.gz \ %{_mandir}/man8/%{name}-dir.8.gz \ %{_mandir}/man8/%{name}-sd.8.gz \ %{_mandir}/man8/%{name}.8.gz \ %{_mandir}/man8/bcopy.8.gz \ %{_mandir}/man8/bextract.8.gz \ %{_mandir}/man8/bls.8.gz \ %{_mandir}/man8/bpluginfo.8.gz \ %{_mandir}/man8/bscan.8.gz \ %{_mandir}/man8/bscrypto.8.gz \ %{_mandir}/man8/btape.8.gz \ %{_sysconfdir}/logrotate.d/%{name}-dir \ %{_sysconfdir}/rc.d/init.d/%{name}-dir \ %{_sysconfdir}/rc.d/init.d/%{name}-sd \ %{script_dir}/disk-changer \ %{script_dir}/mtx-changer \ %{_sysconfdir}/%{name}/mtx-changer.conf \ %endif %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}-dir \ %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}-sd \ %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}-fd \ %{_sysconfdir}/rc.d/init.d/%{name}-dir \ %{_sysconfdir}/rc.d/init.d/%{name}-sd \ %{_sysconfdir}/rc.d/init.d/%{name}-fd \ %{_sysconfdir}/init.d/%{name}-dir \ %{_sysconfdir}/init.d/%{name}-sd \ %{_sysconfdir}/init.d/%{name}-fd \ %{script_dir}/%{name}_config \ %{script_dir}/btraceback.dbx \ %{script_dir}/btraceback.mdb \ %{_docdir}/%{name}/INSTALL \ %{_sbindir}/%{name} do rm -f "%{buildroot}/$F" done # remove links to libraries # for i in #{buildroot}/#{_libdir}/libbareos*; do printf "$i: "; readelf -a $i | grep SONAME; done find %{buildroot}/%{library_dir} -type l -name "libbareos*.so" -maxdepth 1 -exec rm {} \; %if ! 0%{?python_plugins} rm -f %{buildroot}/%{plugin_dir}/python-*.so rm -f %{buildroot}/%{plugin_dir}/*.py* rm -f %{buildroot}/%{_sysconfdir}/%{name}/%{name}-dir.d/plugin-python-ldap.conf %endif %if ! 0%{?glusterfs} rm -f %{buildroot}/%{script_dir}/%{name}-glusterfind-wrapper %endif # remove man page if qt tray monitor is not built %if !0%{?build_qt_monitor} rm %{buildroot}%{_mandir}/man1/%{name}-tray-monitor.* %endif # Create the Readme files for the meta packages [ -d %{buildroot}%{_docdir}/%{name}/ ] || install -d -m 755 %{buildroot}%{_docdir}/%{name} echo "This meta package emulates the former bareos-client package" > %{buildroot}%{_docdir}/%{name}/README.%{name}-client echo "This is a meta package to install a full bareos system" > %{buildroot}%{_docdir}/%{name}/README.%{name} #Clean up #Double installed files for double in bregex bconsole bsmtp timelimit bwild;do rm %{buildroot}%{_sbindir}/$double done rm -rf %{buildroot}%{_datadir}/%{name}-webui/tests mkdir -p %{buildroot}%{_prefix}/lib/%{name} find %{buildroot}%{_datadir} \( -name ".coveralls.yml" -o -name ".gitignore" -o -name ".editorconfig" \) -delete %files %defattr(-, root, root) %{_docdir}/%{name}/README.%{name} %files client %defattr(-, root, root) %dir %{_docdir}/%{name} %{_docdir}/%{name}/README.%{name}-client %files bconsole # console package %defattr(-, root, root) %attr(0640, root, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/bconsole.conf %{_bindir}/bconsole %{_mandir}/man1/bconsole.1.gz %if !0%{?client_only} %files director # dir package (bareos-dir) %defattr(-, root, root) %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/catalog/MyCatalog.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/client/%{name}-fd.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/console/%{name}-mon.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/console/admin.conf.example %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/director/%{name}-dir.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/fileset/Catalog.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/fileset/LinuxAll.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/fileset/SelfTest.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) "%{_sysconfdir}/%{name}/%{name}-dir.d/fileset/Windows All Drives.conf" %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/job/backup-bareos-fd.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/job/BackupCatalog.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/jobdefs/DefaultJob.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/job/RestoreFiles.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/messages/Daemon.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/messages/Standard.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/pool/Differential.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/pool/Full.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/pool/Incremental.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/pool/Scratch.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/profile/operator.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/profile/webui-admin.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/schedule/WeeklyCycleAfterBackup.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/schedule/WeeklyCycle.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-dir.d/storage/File.conf %attr(0750, %{director_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/bareos-dir-export/ %if 0%{?build_qt_monitor} %attr(0755, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/tray-monitor.d/director %attr(0644, %{daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/tray-monitor.d/director/Director-local.conf %endif %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}-dir # we do not have any dir plugin but the python plugin #%%{plugin_dir}/*-dir.so %{script_dir}/delete_catalog_backup %{script_dir}/make_catalog_backup %{script_dir}/make_catalog_backup.pl %{_sbindir}/%{name}-dir %dir %{_docdir}/%{name} %{_mandir}/man8/%{name}-dir.8.gz %{_mandir}/man8/%{name}.8.gz %{_unitdir}/%{name}-dir.service # query.sql is not a config file, # but can be personalized by end user. # a rpmlint rule is add to filter the warning %config(noreplace) %{script_dir}/query.sql %files storage # sd package (bareos-sd, bls, btape, bcopy, bextract) %defattr(-, root, root) %attr(0750, %{storage_daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-sd.d %attr(0750, %{storage_daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-sd.d/autochanger %attr(0750, %{storage_daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-sd.d/device %attr(0750, %{storage_daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-sd.d/director %attr(0750, %{storage_daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-sd.d/ndmp %attr(0750, %{storage_daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-sd.d/messages %attr(0750, %{storage_daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-sd.d/storage %attr(0640, %{storage_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-sd.d/device/FileStorage.conf %attr(0640, %{storage_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-sd.d/director/%{name}-dir.conf %attr(0640, %{storage_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-sd.d/director/%{name}-mon.conf %attr(0640, %{storage_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-sd.d/messages/Standard.conf %attr(0640, %{storage_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-sd.d/storage/%{name}-sd.conf %if 0%{?build_qt_monitor} %attr(0755, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/tray-monitor.d/storage %attr(0644, %{daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/tray-monitor.d/storage/StorageDaemon-local.conf %endif %{_sbindir}/%{name}-sd %{script_dir}/disk-changer %{plugin_dir}/autoxflate-sd.so %{_mandir}/man8/%{name}-sd.8.gz %{_unitdir}/%{name}-sd.service %attr(0775, %{storage_daemon_user}, %{daemon_group}) %dir %{_sharedstatedir}/%{name}/storage %files storage-tape # tape specific files %defattr(-, root, root) %{backend_dir}/libbareossd-gentape*.so %{backend_dir}/libbareossd-tape*.so %{script_dir}/mtx-changer %config(noreplace) %{_sysconfdir}/%{name}/mtx-changer.conf %{_mandir}/man8/bscrypto.8.gz %{_mandir}/man8/btape.8.gz %{_sbindir}/bscrypto %{_sbindir}/btape %attr(0640, %{director_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-dir.d/storage/Tape.conf.example %attr(0640, %{storage_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-sd.d/autochanger/autochanger-0.conf.example %attr(0640, %{storage_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-sd.d/device/tapedrive-0.conf.example %{plugin_dir}/scsicrypto-sd.so %{plugin_dir}/scsitapealert-sd.so %files storage-fifo %defattr(-, root, root) %{backend_dir}/libbareossd-fifo*.so %attr(0640, %{director_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-dir.d/storage/NULL.conf.example %attr(0640, %{storage_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-sd.d/device/NULL.conf.example %if 0%{?droplet} %files storage-droplet %defattr(-, root, root) %{backend_dir}/libbareossd-chunked*.so %{backend_dir}/libbareossd-droplet*.so %attr(0640, %{director_daemon_user},%{daemon_group}) %{_sysconfdir}/%{name}/%{name}-dir.d/storage/S3_Object.conf.example %attr(0640, %{storage_daemon_user},%{daemon_group}) %{_sysconfdir}/%{name}/%{name}-sd.d/device/S3_ObjectStorage.conf.example %dir %{_sysconfdir}/%{name}/bareos-sd.d/device/droplet/ %attr(0640, %{storage_daemon_user},%{daemon_group}) %{_sysconfdir}/%{name}/%{name}-sd.d/device/droplet/*.example %endif %if 0%{?glusterfs} %files storage-glusterfs %defattr(-, root, root) %{backend_dir}/libbareossd-gfapi*.so %attr(0640, %{director_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-dir.d/storage/Gluster.conf.example %attr(0640, %{storage_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-sd.d/device/GlusterStorage.conf.example %endif %if 0%{?ceph} %files storage-ceph %defattr(-, root, root) %{backend_dir}/libbareossd-rados*.so %{backend_dir}/libbareossd-cephfs*.so %attr(0640, %{director_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-dir.d/storage/Rados.conf.example %attr(0640, %{storage_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-sd.d/device/RadosStorage.conf.example %endif # not client_only %endif %files filedaemon # fd package (bareos-fd, plugins) %defattr(-, root, root) %attr(0750, %{file_daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-fd.d/ %attr(0750, %{file_daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-fd.d/client %attr(0750, %{file_daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-fd.d/director %attr(0750, %{file_daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-fd.d/messages %attr(0640, %{file_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-fd.d/client/myself.conf %attr(0640, %{file_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-fd.d/director/%{name}-dir.conf %attr(0640, %{file_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-fd.d/director/%{name}-mon.conf %attr(0640, %{file_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-fd.d/messages/Standard.conf %if 0%{?build_qt_monitor} %attr(0755, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/tray-monitor.d/client %attr(0644, %{daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/tray-monitor.d/client/FileDaemon-local.conf %endif %{_sbindir}/%{name}-fd %{plugin_dir}/bpipe-fd.so %{_mandir}/man8/%{name}-fd.8.gz # tray monitor %{_unitdir}/%{name}-fd.service %files common # common shared libraries (without db) %defattr(-, root, root) %attr(0755, root, %{daemon_group}) %dir %{_sysconfdir}/%{name} %if !0%{?client_only} # these directories belong to bareos-common, # as other packages may contain configurations for the director. %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-dir.d %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-dir.d/catalog %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-dir.d/client %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-dir.d/console %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-dir.d/counter %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-dir.d/director %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-dir.d/fileset %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-dir.d/job %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-dir.d/jobdefs %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-dir.d/messages %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-dir.d/pool %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-dir.d/profile %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-dir.d/schedule %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/%{name}-dir.d/storage # tray monitor configurate is installed by the target daemons %if 0%{?build_qt_monitor} %attr(0755, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/tray-monitor.d %endif %endif %dir %{backend_dir} %{library_dir}/libbareos.so* %{library_dir}/libbareosfind.so* %{library_dir}/libbareoslmdb.so* %if !0%{?client_only} %{library_dir}/libbareosndmp.so* %{library_dir}/libbareossd.so* %endif # generic stuff needed from multiple bareos packages %dir /usr/lib/%{name}/ %dir %{script_dir} %{script_dir}/%{name}-config %{script_dir}/%{name}-config-lib.sh %{script_dir}/%{name}-explorer %{script_dir}/btraceback.gdb %if "%{_libdir}" != "/usr/lib/" %dir %{_libdir}/%{name}/ %endif %dir %{plugin_dir} %if !0%{?client_only} %{_bindir}/bsmtp %endif %{_sbindir}/btraceback %if !0%{?client_only} %{_mandir}/man1/bsmtp.1.gz %endif %{_mandir}/man8/btraceback.8.gz %attr(0770, %{daemon_user}, %{daemon_group}) %dir %{working_dir} %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{_localstatedir}/log/%{name} %doc core/AGPL-3.0.txt core/LICENSE core/README.* CHANGELOG.* AUTHORS SPONSORS.* #TODO: cmake does not create build directory #doc build/ %if !0%{?client_only} %files database-common # catalog independent files %defattr(-, root, root) %{library_dir}/libbareossql*.so.* %{library_dir}/libbareoscats*.so.* %dir %{script_dir}/ddl %dir %{script_dir}/ddl/creates %dir %{script_dir}/ddl/drops %dir %{script_dir}/ddl/grants %dir %{script_dir}/ddl/updates %{script_dir}/create_bareos_database %{script_dir}/drop_bareos_database %{script_dir}/drop_bareos_tables %{script_dir}/grant_bareos_privileges %{script_dir}/make_bareos_tables %{script_dir}/update_bareos_tables %{script_dir}/ddl/versions.map %files database-postgresql # postgresql catalog files %defattr(-, root, root) %{script_dir}/ddl/*/postgresql*.sql %{backend_dir}/libbareoscats-postgresql.so* %files database-mysql # mysql catalog files %defattr(-, root, root) %{script_dir}/ddl/*/mysql*.sql %{backend_dir}/libbareoscats-mysql.so* %if 0%{?build_sqlite3} %files database-sqlite3 # sqlite3 catalog files %defattr(-, root, root) %{script_dir}/ddl/*/sqlite3*.sql %{backend_dir}/libbareoscats-sqlite3.so* %endif %files database-tools # dbtools with link to db libs (dbcheck, bscan) %defattr(-, root, root) %{_sbindir}/%{name}-dbcheck %{_sbindir}/bscan %{_mandir}/man8/%{name}-dbcheck.8.gz %{_mandir}/man8/bscan.8.gz %files tools # tools without link to db libs (bwild, bregex) %defattr(-, root, root) %{_bindir}/bregex %{_bindir}/bwild %{_sbindir}/bcopy %{_sbindir}/bextract %{_sbindir}/bls %{_sbindir}/bpluginfo %{_mandir}/man1/bwild.1.gz %{_mandir}/man1/bregex.1.gz %{_mandir}/man8/bcopy.8.gz %{_mandir}/man8/bextract.8.gz %{_mandir}/man8/bls.8.gz %{_mandir}/man8/bpluginfo.8.gz %if 0%{?build_qt_monitor} %files traymonitor %defattr(-,root, root) %attr(0755, %{daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/tray-monitor.d/monitor %attr(0644, %{daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/tray-monitor.d/monitor/%{name}-mon.conf %config(noreplace) %{_sysconfdir}/xdg/autostart/%{name}-tray-monitor.desktop %{_bindir}/%{name}-tray-monitor %{_mandir}/man1/%{name}-tray-monitor.1.gz %{_datarootdir}/applications/%{name}-tray-monitor.desktop %{_datarootdir}/pixmaps/%{name}-tray-monitor.xpm %endif # client_only %endif %files devel %defattr(-, root, root) %{_includedir}/%{name} %if 0%{?python_plugins} %files filedaemon-python-plugin %defattr(-, root, root) %{plugin_dir}/python-fd.so %{plugin_dir}/bareos-fd.py* %{plugin_dir}/bareos-fd-local-fileset.py* %{plugin_dir}/bareos-fd-mock-test.py* %{plugin_dir}/BareosFdPluginBaseclass.py* %{plugin_dir}/BareosFdPluginLocalFileset.py* %{plugin_dir}/BareosFdWrapper.py* %{plugin_dir}/bareos_fd_consts.py* %files filedaemon-ldap-python-plugin %defattr(-, root, root) %{plugin_dir}/bareos-fd-ldap.py* %{plugin_dir}/BareosFdPluginLDAP.py* %attr(0640, %{director_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-dir.d/fileset/plugin-ldap.conf.example %attr(0640, %{director_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-dir.d/job/backup-ldap.conf.example %attr(0640, %{director_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-dir.d/job/restore-ldap.conf.example %files director-python-plugin %defattr(-, root, root) %{plugin_dir}/python-dir.so %{plugin_dir}/bareos-dir.py* %{plugin_dir}/bareos_dir_consts.py* %{plugin_dir}/BareosDirPluginBaseclass.py* %{plugin_dir}/bareos-dir-class-plugin.py* %{plugin_dir}/BareosDirWrapper.py* %files storage-python-plugin %defattr(-, root, root) %{plugin_dir}/python-sd.so %{plugin_dir}/bareos-sd.py* %{plugin_dir}/bareos_sd_consts.py* %{plugin_dir}/BareosSdPluginBaseclass.py* %{plugin_dir}/BareosSdWrapper.py* %{plugin_dir}/bareos-sd-class-plugin.py* # python_plugins %endif %if 0%{?glusterfs} %files filedaemon-glusterfs-plugin %{script_dir}/%{name}-glusterfind-wrapper %{plugin_dir}/gfapi-fd.so %attr(0640, %{director_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-dir.d/fileset/plugin-gfapi.conf.example %attr(0640, %{director_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-dir.d/job/BackupGFAPI.conf.example %attr(0640, %{director_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-dir.d/job/RestoreGFAPI.conf.example %endif %if 0%{?ceph} %files filedaemon-ceph-plugin %{plugin_dir}/cephfs-fd.so %attr(0640, %{director_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-dir.d/fileset/plugin-cephfs.conf.example %attr(0640, %{director_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-dir.d/job/BackupCephfs.conf.example %attr(0640, %{director_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-dir.d/job/RestoreCephfs.conf.example %{plugin_dir}/rados-fd.so %attr(0640, %{director_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-dir.d/fileset/plugin-rados.conf.example %attr(0640, %{director_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-dir.d/job/BackupRados.conf.example %attr(0640, %{director_daemon_user}, %{daemon_group}) %{_sysconfdir}/%{name}/%{name}-dir.d/job/RestoreRados.conf.example %endif %files regress-config %defattr(-, root, root) %{script_dir}/%{name} %{script_dir}/%{name}-ctl-* %{_bindir}/timelimit %{_sbindir}/btestls # must be readable by package build user of bareos-regress. %attr(0644, %{daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-regress.conf %if 0%{?webui} %files webui %dir %{_datadir}/%{name}-webui %dir %{_sysconfdir}/%{name}-webui %{_datadir}/%{name}-webui/* %config(noreplace) %{_sysconfdir}/%{name}-webui/configuration.ini %config(noreplace) %{_sysconfdir}/%{name}-webui/directors.ini %config(noreplace) %{_sysconfdir}/httpd/conf.d/bareos-webui.conf %endif # # Define some macros for updating the system settings. # %global create_group() \ getent group %1 > /dev/null || groupadd -r %1 \ %nil %global create_user() \ getent passwd %1 > /dev/null || useradd -r -c "%1 user" -d %{working_dir} -g %{daemon_group} -s /sbin/nologin %1 \ %nil %post director %{script_dir}/%{name}-config initialize_local_hostname %{script_dir}/%{name}-config initialize_passwords %{script_dir}/%{name}-config initialize_database_driver %systemd_post %{name}-dir.service %post storage # pre script has already generated the storage daemon user, # but here we add the user to additional groups %{script_dir}/%{name}-config setup_sd_user %{script_dir}/%{name}-config initialize_local_hostname %{script_dir}/%{name}-config initialize_passwords %systemd_post %{name}-sd.service %post filedaemon %{script_dir}/%{name}-config initialize_local_hostname %{script_dir}/%{name}-config initialize_passwords %systemd_post %{name}-fd.service %post bconsole %{script_dir}/bareos-config initialize_local_hostname %{script_dir}/bareos-config initialize_passwords %post common -p /sbin/ldconfig %postun common -p /sbin/ldconfig %post database-common -p /sbin/ldconfig %postun database-common -p /sbin/ldconfig %post database-postgresql -p /sbin/ldconfig %postun database-postgresql -p /sbin/ldconfig %post database-mysql -p /sbin/ldconfig %postun database-mysql -p /sbin/ldconfig %if 0%{?build_sqlite3} %post database-sqlite3 -p /sbin/ldconfig %postun database-sqlite3 -p /sbin/ldconfig %endif %if 0%{?build_qt_monitor} %post traymonitor %{script_dir}/bareos-config initialize_local_hostname %{script_dir}/bareos-config initialize_passwords %endif %pre director %create_group %{daemon_group} %create_user %{director_daemon_user} exit 0 %pre storage %create_group %{daemon_group} %create_user %{storage_daemon_user} exit 0 %pre filedaemon %create_group %{daemon_group} %create_user %{storage_daemon_user} exit 0 %pre common %create_group %{daemon_group} %create_user %{daemon_user} exit 0 %preun director %systemd_preun %{name}-dir.service %preun storage %systemd_preun %{name}-sd.service %preun filedaemon %systemd_preun %{name}-fd.service %postun director %systemd_postun_with_restart %{name}-dir.service %postun storage %systemd_postun_with_restart %{name}-sd.service %postun filedaemon %systemd_postun_with_restart %{name}-fd.service %changelog * Wed Feb 26 2020 Frank Büttner - 19.2.6-1 - Update to 19.2.6 * Mon Feb 03 2020 Frank Büttner - 19.2.5-1 - Update to 19.2.5 * Sat Feb 01 2020 Frank Büttner - 19.2.4-1 - Update to 19.2.4 - Use python3 only. * Sat Jan 04 2020 Frank Büttner - 18.2.7-2 - Restart storage daemon on update - Restart director on update - Add needed Python sslpsk module - Change the permission for the log dir to 0750 - Require network-online instand of network target for the unit files - Fix php build requires - Add Fedora 31 * Fri Dec 13 2019 Frank Büttner - 18.2.7-1 - Update to 18.2.7 * Sun Mar 31 2019 Frank Büttner 18.2.6-1 - Update to 18.2.6 - Remove old Fedora (<28) support - Remove unneeded scripts * Sun Jan 27 2019 Frank Büttner 18.2.4-1 - Build rc2