# # set global build and packaging flags # %global _hardened_build 1 %global _python_bytecompile_extra 0 # # version # Version: 23.0.2 Release: 1%{?dist} # # define paths and users # %define conf_dir %{_sysconfdir}/%{name} %define library_dir %{_libdir}/%{name} %define backend_dir %{_libdir}/%{name}/backends %define plugin_dir %{_libdir}/%{name}/plugins %define script_dir /usr/lib/%{name}/scripts %define working_dir /var/lib/%{name} %define pid_dir /var/lib/%{name} %define bsr_dir /var/lib/%{name} # TODO: use /run ? %define _subsysdir /var/lock %define daemon_user bareos %define daemon_group bareos %define director_daemon_user %{daemon_user} %define storage_daemon_user %{daemon_user} %define file_daemon_user root %define storage_daemon_group %{daemon_group} # # default packaging settings # %bcond_with glusterfs %bcond_with droplet %bcond_without python_plugins %bcond_without contrib %if 0%{?rhel} == 7 %bcond_without client_only %bcond_with build_qt_monitor %bcond_with webui # hardcode python3 for brp_python_bytecompile %global __python python3 # ignore pycached files %global _unpackaged_files_terminate_build 0 %define pycached() %{?*} %else %bcond_with client_only %bcond_without build_qt_monitor %bcond_without webui %endif # # define some macros for updating the system settings. # %define create_group() \ getent group %1 > /dev/null || groupadd -r %1 \ %nil %define create_user() \ getent passwd %1 > /dev/null || useradd -r --comment "%1" --home %{working_dir} -g %{daemon_group} --shell /sbin/nologin %1 \ %nil %define post_scsicrypto() \ if [ -f "%{conf_dir}/.enable-cap_sys_rawio" ]; then \ %{script_dir}/bareos-config set_scsicrypto_capabilities; \ fi\ %nil # ########################################################## # # dependency tricks for vixdisklib %global __requires_exclude ^(.*libvixDiskLib.*|.*CXXABI_1.3.9.*)$ %define replace_python_shebang sed -i '1s|^#!.*|#!%{__python3} %{py3_shbang_opts}|' # cmake build directory %define CMAKE_BUILDDIR cmake-build # # distribution-specific settings # # cmake build macros %if 0%{?fedora} >= 29 || 0%{?rhel} > 7 %global _vpath_srcdir .. %global _vpath_builddir . %undefine __cmake_in_source_build %else # cmake build macros %global __cmake3_srcdir .. %global __cmake3_builddir . %undefine __cmake3_in_source_build %endif # # # Name: bareos Summary: Backup Archiving REcovery Open Sourced - metapackage License: AGPL-3.0 BuildRoot: %{_tmppath}/%{name}-root URL: https://www.bareos.org/ Source0: https://github.com/bareos/%{name}/archive/refs/tags/Release/%{version}.tar.gz %{?systemd_requires} %define 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. BuildRequires: systemd BuildRequires: cmake3 >= 3.17 BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: make BuildRequires: glibc BuildRequires: glibc-devel BuildRequires: ncurses-devel BuildRequires: pam-devel BuildRequires: pkgconfig BuildRequires: readline-devel BuildRequires: libacl-devel BuildRequires: libstdc++-devel BuildRequires: zlib-devel BuildRequires: openssl-devel BuildRequires: lzo-devel BuildRequires: logrotate BuildRequires: postgresql-devel BuildRequires: openssl BuildRequires: libcap-devel BuildRequires: mtx BuildRequires: passwd BuildRequires: jansson-devel %if 0%{?rhel} && 0%{?rhel} < 9 BuildRequires: redhat-lsb %endif %if 0%{?fedora} BuildRequires: fedora-release %endif %if 0%{?fedora} >= 28 || 0%{?rhel} > 7 BuildRequires: rpcgen BuildRequires: libtirpc-devel %endif %if 0%{?rhel} == 7 BuildRequires: devtoolset-8-gcc BuildRequires: devtoolset-8-gcc-c++ %endif %if %{with build_qt_monitor} %if 0%{?rhel} > 7 || 0%{?fedora} >= 29 BuildRequires: qt5-qtbase-devel %else BuildRequires: qt-devel %endif %endif %if %{with glusterfs} BuildRequires: glusterfs-devel glusterfs-api-devel %endif %if %{with python_plugins} BuildRequires: python3-rpm-macros BuildRequires: python3-devel >= 3.4 BuildRequires: python3-setuptools %endif Requires: %{name}-director = %{version} Requires: %{name}-storage = %{version} Requires: %{name}-client = %{version} %description %{dscr} %files %doc README.bareos # vim: set ft=spec: %package common Summary: Common files, required by multiple Bareos packages Requires: openssl Requires(pre): shadow-utils Provides: %{name}-libs = %{version} %description common %{dscr} This package contains the shared libraries that are used by multiple daemons and tools. %files common # common shared libraries (without db) %attr(0755, root, %{daemon_group}) %dir %{conf_dir} %if ! %{with client_only} # these directories belong to bareos-common, # as other packages may contain configurations for the director. %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-dir.d %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-dir.d/catalog %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-dir.d/client %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-dir.d/console %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-dir.d/counter %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-dir.d/director %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-dir.d/fileset %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-dir.d/job %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-dir.d/jobdefs %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-dir.d/messages %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-dir.d/pool %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-dir.d/profile %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-dir.d/schedule %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-dir.d/storage %attr(0750, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-dir.d/user # tray monitor configurate is installed by the target daemons %if %{with build_qt_monitor} %attr(0755, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/tray-monitor.d %endif %endif %dir %{backend_dir} %{library_dir}/libbareosfastlz.so* %{library_dir}/libbareos.so* %{library_dir}/libbareosfind.so* %{library_dir}/libbareoslmdb.so* %if ! %{with 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}/bareos-config %{script_dir}/bareos-config-lib.sh %if ! %{with client_only} %{script_dir}/bareos-explorer %endif %{script_dir}/btraceback.gdb %dir %{library_dir} %dir %{plugin_dir} %if ! %{with client_only} %{_sbindir}/bsmtp %{_mandir}/man1/bsmtp.1.gz %endif %{_sbindir}/btraceback %{_mandir}/man8/btraceback.8.gz %attr(0770, %{daemon_user}, %{daemon_group}) %dir %{working_dir} %attr(0775, %{daemon_user}, %{daemon_group}) %dir /var/log/%{name} %doc core/AGPL-3.0.txt core/LICENSE core/README.* # client packages # vim: set ft=spec: %package client Summary: Bareos client Meta-All-In-One package Requires: %{name}-bconsole = %{version} Requires: %{name}-filedaemon = %{version} BuildArch: noarch %description client %{dscr} This package is a meta package requiring the packages containing the fd and the console. This is for client only installation. %files client %doc README.bareos-client # vim: set ft=spec: %package bconsole Summary: Bareos administration console (CLI) Requires: %{name}-common = %{version} %description bconsole %{dscr} This package contains the bconsole (the CLI interface program). %files bconsole %attr(0640, root, %{daemon_group}) %config(noreplace) %{conf_dir}/bconsole.conf %{_sbindir}/bconsole %{_mandir}/man1/bconsole.1.gz %post bconsole %{script_dir}/bareos-config initialize_local_hostname %{script_dir}/bareos-config initialize_passwords # vim: set ft=spec: %package filedaemon Summary: Bareos File daemon (backup and restore client) Requires: %{name}-common = %{version} Provides: %{name}-fd = %{version} Requires(pre): shadow-utils %description filedaemon %{dscr} This package contains the File Daemon (Bareos client daemon to read/write data from the backed up computer). %files filedaemon %attr(0750, %{file_daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-fd.d/ %attr(0750, %{file_daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-fd.d/client %attr(0750, %{file_daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-fd.d/director %attr(0750, %{file_daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-fd.d/messages %attr(0640, %{file_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-fd.d/client/myself.conf %attr(0640, %{file_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-fd.d/director/bareos-dir.conf %attr(0640, %{file_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-fd.d/director/bareos-mon.conf %attr(0640, %{file_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-fd.d/messages/Standard.conf %if %{with build_qt_monitor} %attr(0755, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/tray-monitor.d/client %attr(0644, %{daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/tray-monitor.d/client/FileDaemon-local.conf %endif %{_sbindir}/bareos-fd %{plugin_dir}/bpipe-fd.so %{_mandir}/man8/bareos-fd.8.gz %{_unitdir}/bareos-fd.service %pre filedaemon %create_group %{daemon_group} %create_user %{storage_daemon_user} %post filedaemon %{script_dir}/bareos-config initialize_local_hostname %{script_dir}/bareos-config initialize_passwords %systemd_post bareos-fd.service %preun filedaemon %systemd_preun bareos-fd.service %postun filedaemon %systemd_postun_with_restart bareos-fd.service %if %{with python_plugins} # vim: set ft=spec: %package -n python3-bareos Summary: Backup Archiving REcovery Open Sourced - Python module Provides: python-bareos = %{version} Obsoletes: python-bareos <= %{version} %description -n python3-bareos This packages contains a python module to interact with a Bareos backup system. It also includes some tools based on this module. %files -n python3-bareos %{_bindir}/bareos-fd-connect.py %{_bindir}/bconsole-json.py %{_bindir}/bconsole.py %{python3_sitelib}/bareos %{python3_sitelib}/python_bareos-*.egg-info # vim: set ft=spec: %package filedaemon-python-plugin Summary: Python plugin for Bareos File daemon Requires: %{name}-filedaemon = %{version} Obsoletes: %{name}-filedaemon-python2-plugin <= %{version} Obsoletes: %{name}-filedaemon-python3-plugin <= %{version} Obsoletes: %{name}-filedaemon-python-plugins-common <= %{version} %description filedaemon-python-plugin %{dscr} This package contains the python plugin for the file daemon. %files filedaemon-python-plugin %{plugin_dir}/python3-fd.so %{python3_sitearch}/bareosfd*.so %pycached %{plugin_dir}/bareos-fd-local-fileset.py %pycached %{plugin_dir}/BareosFdPluginBaseclass.py %pycached %{plugin_dir}/BareosFdPluginLocalFilesBaseclass.py %pycached %{plugin_dir}/BareosFdWrapper.py %pycached %{script_dir}/bareos_encode_string.py # vim: set ft=spec: %package filedaemon-ldap-python-plugin Summary: LDAP Python plugin for Bareos File daemon Requires: %{name}-filedaemon = %{version} Requires: %{name}-filedaemon-python-plugin = %{version} Requires: python-ldap BuildArch: noarch %description filedaemon-ldap-python-plugin %{dscr} This package contains the LDAP python plugin for the file daemon. %files filedaemon-ldap-python-plugin %pycached %{plugin_dir}/bareos-fd-ldap.py # vim: set ft=spec: %package filedaemon-libcloud-python-plugin Summary: Libcloud Python plugin for Bareos File daemon Requires: %{name}-filedaemon = %{version} Requires: %{name}-filedaemon-python-plugin = %{version} BuildArch: noarch %description filedaemon-libcloud-python-plugin %{dscr} This package contains the Libcloud python plugin for the file daemon. %files filedaemon-libcloud-python-plugin %pycached %{plugin_dir}/bareos-fd-libcloud.py %pycached %{plugin_dir}/BareosFdPluginLibcloud.py %pycached %{plugin_dir}/BareosLibcloudApi.py %dir %{plugin_dir}/bareos_libcloud_api %pycached %{plugin_dir}/bareos_libcloud_api/*.py # vim: set ft=spec: %package filedaemon-postgresql-python-plugin Summary: PostgreSQL Python plugin for Bareos File daemon Requires: %{name}-filedaemon = %{version} Requires: %{name}-filedaemon-python-plugin = %{version} %if 0%{?rhel} > 7 Suggests: python3-pg8000 %endif BuildArch: noarch %description filedaemon-postgresql-python-plugin %{dscr} This package contains the PostgreSQL python plugin for the file daemon. %files filedaemon-postgresql-python-plugin %pycached %{plugin_dir}/bareos-fd-postgres.py %pycached %{plugin_dir}/bareos-fd-postgresql.py # vim: set ft=spec: %package filedaemon-percona-xtrabackup-python-plugin Summary: Percona xtrabackup Python plugin for Bareos File daemon Requires: %{name}-filedaemon = %{version} Requires: %{name}-filedaemon-python-plugin = %{version} BuildArch: noarch %description filedaemon-percona-xtrabackup-python-plugin %{dscr} This package contains the Percona python plugin for the file daemon. %files filedaemon-percona-xtrabackup-python-plugin %pycached %{plugin_dir}/bareos-fd-percona-xtrabackup.py # vim: set ft=spec: %package filedaemon-mariabackup-python-plugin Summary: Mariabackup Python plugin for Bareos File daemon Requires: %{name}-filedaemon = %{version} Requires: %{name}-filedaemon-python-plugin = %{version} BuildArch: noarch %description filedaemon-mariabackup-python-plugin %{dscr} This package contains the Mariabackup python plugin for the file daemon. %files filedaemon-mariabackup-python-plugin %pycached %{plugin_dir}/bareos-fd-mariabackup.py %if %{with contrib} # vim: set ft=spec: %package contrib-tools Summary: Additional tools, not part of the Bareos project Requires: python-bareos Requires: %{name}-filedaemon BuildArch: noarch %description contrib-tools %{dscr} This package provides some additional tools, not part of the Bareos project. %files contrib-tools %{_bindir}/bareos-triggerjob.py %{_bindir}/bsmc %attr(0640, %{daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bsmc.conf # vim: set ft=spec: %package contrib-filedaemon-python-plugins Summary: Additional File Daemon Python plugins, not part of the Bareos project Requires: %{name}-filedaemon-python-plugin BuildArch: noarch %description contrib-filedaemon-python-plugins %{dscr} This package provides additional File Daemon Python plugins, not part of the Bareos project. %files contrib-filedaemon-python-plugins %{plugin_dir}/bareos_mysql_dump %{plugin_dir}/bareos_tasks %{plugin_dir}/openvz7 %endif %endif %if %{with glusterfs} # vim: set ft=spec: %package filedaemon-glusterfs-plugin Summary: GlusterFS plugin for Bareos File daemon Requires: %{name}-filedaemon = %{version} Requires: glusterfs %description filedaemon-glusterfs-plugin %{dscr} This package contains the GlusterFS plugin for the file daemon %files filedaemon-glusterfs-plugin %{script_dir}/bareos-glusterfind-wrapper %{plugin_dir}/gfapi-fd.so %endif %if ! %{with client_only} # vim: set ft=spec: %package director Summary: Bareos Director daemon Requires: %{name}-common = %{version} Requires: %{name}-database-backend = %{version} Requires: %{name}-database-tools Requires(pre): shadow-utils Provides: %{name}-dir = %{version} %description director %{dscr} This package contains the Director Service (Bareos main service daemon). %files director %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/catalog/MyCatalog.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/client/bareos-fd.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/console/bareos-mon.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/director/bareos-dir.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/fileset/Catalog.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/fileset/LinuxAll.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/fileset/SelfTest.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) "%{conf_dir}/bareos-dir.d/fileset/Windows All Drives.conf" %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/job/backup-bareos-fd.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/job/BackupCatalog.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/jobdefs/DefaultJob.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/job/RestoreFiles.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/messages/Daemon.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/messages/Standard.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/pool/Differential.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/pool/Full.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/pool/Incremental.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/pool/Scratch.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/profile/operator.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/schedule/WeeklyCycleAfterBackup.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/schedule/WeeklyCycle.conf %attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-dir.d/storage/File.conf %attr(0750, %{director_daemon_user}, %{daemon_group}) %{conf_dir}/bareos-dir-export/ %if %{with build_qt_monitor} %attr(0755, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/tray-monitor.d/director %attr(0644, %{daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/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 %{_sbindir}/bareos-dir %{_mandir}/man8/bareos-dir.8.gz %{_mandir}/man8/bareos.8.gz %{_unitdir}/bareos-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 # example configs %doc core/src/plugins/filed/python/ldap/python-ldap-conf.d/bareos-dir.d %doc core/src/plugins/filed/gfapi/gfapi-conf.d/bareos-dir.d %doc core/src/stored/backends/unix_fifo_device.d/bareos-dir.d %doc core/src/stored/backends/droplet_device.d/bareos-dir.d %doc core/src/stored/backends/unix_tape_device.d/bareos-dir.d %doc core/src/stored/backends/gfapi_device.d/bareos-dir.d %doc webui/install/bareos/bareos-dir.d %pre director %create_group %{daemon_group} %create_user %{director_daemon_user} %post director %{script_dir}/bareos-config initialize_local_hostname %{script_dir}/bareos-config initialize_passwords %systemd_post bareos-dir.service %preun director %systemd_preun bareos-dir.service # vim: set ft=spec: %package storage Summary: Bareos Storage daemon Requires: %{name}-common = %{version} Provides: %{name}-sd = %{version} Requires(pre): shadow-utils %if 0%{?rhel} > 7 Recommends: bareos-tools %endif %description storage %{dscr} This package contains the Storage Daemon (Bareos service to read and write data from/to media). %files storage # sd package (bareos-sd, bls, btape, bcopy, bextract) %attr(0750, %{storage_daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-sd.d %attr(0750, %{storage_daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-sd.d/autochanger %attr(0750, %{storage_daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-sd.d/device %attr(0750, %{storage_daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-sd.d/director %attr(0750, %{storage_daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-sd.d/ndmp %attr(0750, %{storage_daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-sd.d/messages %attr(0750, %{storage_daemon_user}, %{daemon_group}) %dir %{conf_dir}/bareos-sd.d/storage %attr(0640, %{storage_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-sd.d/device/FileStorage.conf %attr(0640, %{storage_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-sd.d/director/bareos-dir.conf %attr(0640, %{storage_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-sd.d/director/bareos-mon.conf %attr(0640, %{storage_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-sd.d/messages/Standard.conf %attr(0640, %{storage_daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/bareos-sd.d/storage/bareos-sd.conf %if %{with build_qt_monitor} %attr(0755, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/tray-monitor.d/storage %attr(0644, %{daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/tray-monitor.d/storage/StorageDaemon-local.conf %endif %{_sbindir}/bareos-sd %{script_dir}/disk-changer %{plugin_dir}/autoxflate-sd.so %{backend_dir}/libbareossd-file*.so %{_mandir}/man8/bareos-sd.8.gz %{_unitdir}/bareos-sd.service %attr(0775, %{storage_daemon_user}, %{daemon_group}) %dir /var/lib/%{name}/storage %pre storage %create_group %{daemon_group} %create_user %{storage_daemon_user} %post storage # pre script has already generated the storage daemon user, # but here we add the user to additional groups %{script_dir}/bareos-config setup_sd_user %{script_dir}/bareos-config initialize_local_hostname %{script_dir}/bareos-config initialize_passwords %post_scsicrypto %systemd_post bareos-sd.service %preun storage %systemd_preun bareos-sd.service # vim: set ft=spec: %package storage-tape Summary: Tape support for the Bareos Storage daemon Requires: %{name}-common = %{version} Requires: %{name}-storage = %{version} Requires: mtx Requires: mt-st %description storage-tape %{dscr} This package contains the Storage Daemon tape support (Bareos service to read and write data from/to tape media) %files storage-tape # tape specific files %{backend_dir}/libbareossd-tape*.so %{script_dir}/mtx-changer %config(noreplace) %{conf_dir}/mtx-changer.conf %{_mandir}/man8/bscrypto.8.gz %{_mandir}/man8/btape.8.gz %{_sbindir}/bscrypto %{_sbindir}/btape %doc core/src/stored/backends/unix_tape_device.d/bareos-sd.d %{plugin_dir}/scsicrypto-sd.so %{plugin_dir}/scsitapealert-sd.so %post storage-tape %post_scsicrypto %posttrans storage-tape %post_scsicrypto # vim: set ft=spec: %package storage-fifo Summary: FIFO support for the Bareos Storage backend Requires: %{name}-common = %{version} Requires: %{name}-storage = %{version} %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. %files storage-fifo %{backend_dir}/libbareossd-fifo*.so %if %{with droplet} # vim: set ft=spec: %package storage-droplet Summary: Object Storage support (through libdroplet) for the Bareos Storage daemon Requires: %{name}-common = %{version} Requires: %{name}-storage = %{version} %description storage-droplet %{dscr} This package contains the Storage backend for Object Storage (through libdroplet). %files storage-droplet %{backend_dir}/libbareossd-droplet*.so %dir %{conf_dir}/bareos-sd.d/device/droplet/ %endif %if %{with glusterfs} # vim: set ft=spec: %package storage-glusterfs Summary: GlusterFS support for the Bareos Storage daemon Requires: %{name}-common = %{version} Requires: %{name}-storage = %{version} Requires: glusterfs %description storage-glusterfs %{dscr} This package contains the Storage backend for GlusterFS. %files storage-glusterfs %{backend_dir}/libbareossd-gfapi*.so %doc core/src/stored/backends/gfapi_device.d/bareos-sd.d %endif # vim: set ft=spec: %package database-postgresql Summary: Libs & tools for postgresql catalog Requires: openssl Provides: %{name}-catalog-postgresql = %{version} Provides: %{name}-database-backend = %{version} Provides: %{name}-sql = %{version} Obsoletes: %{name}-database-common <= %{version} %description database-postgresql %{dscr} This package contains the shared libraries to access postgresql as catalog db. %files database-postgresql %{library_dir}/libbareossql*.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 %{script_dir}/ddl/*/postgresql*.sql # vim: set ft=spec: %package database-tools Summary: Bareos CLI tools with database dependencies (bareos-dbcheck, bscan) Requires: %{name}-common = %{version} Requires: %{name}-database-backend = %{version} Provides: %{name}-dbtools = %{version} %description database-tools %{dscr} This package contains Bareos database tools. %files database-tools %{_sbindir}/bareos-dbcheck %{_sbindir}/bscan %{_mandir}/man8/bareos-dbcheck.8.gz %{_mandir}/man8/bscan.8.gz %post database-tools %post_scsicrypto # vim: set ft=spec: %package tools Summary: Bareos CLI tools (bcopy, bextract, bls, bregex, bwild) Requires: %{name}-common = %{version} %description tools %{dscr} This package contains Bareos tools. %files tools # tools without link to db libs (bwild, bregex) %{_sbindir}/bcopy %{_sbindir}/bextract %{_sbindir}/bls %{_sbindir}/testfind %{_sbindir}/bregex %{_sbindir}/bwild %{_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 %post tools %post_scsicrypto %if %{with python_plugins} # vim: set ft=spec: %package director-python-plugin Summary: Python plugin for Bareos Director daemon Requires: %{name}-director = %{version} Obsoletes: %{name}-director-python2-plugin <= %{version} Obsoletes: %{name}-director-python3-plugin <= %{version} Obsoletes: %{name}-director-python-plugins-common <= %{version} %description director-python-plugin %{dscr} This package contains the python plugin for the director daemon. %files director-python-plugin %{plugin_dir}/python3-dir.so %{python3_sitearch}/bareosdir*.so %pycached %{plugin_dir}/BareosDirPluginBaseclass.py %pycached %{plugin_dir}/bareos-dir-class-plugin.py %pycached %{plugin_dir}/BareosDirWrapper.py # vim: set ft=spec: %package storage-python-plugin Summary: Python plugin for Bareos Storage daemon Requires: %{name}-storage = %{version} Obsoletes: %{name}-storage-python2-plugin <= %{version} Obsoletes: %{name}-storage-python3-plugin <= %{version} Obsoletes: %{name}-storage-python-plugins-common <= %{version} %description storage-python-plugin %{dscr} This package contains the python plugin for the storage daemon. %files storage-python-plugin %{plugin_dir}/python3-sd.so %{python3_sitearch}/bareossd*.so %pycached %{plugin_dir}/BareosSdPluginBaseclass.py %pycached %{plugin_dir}/BareosSdWrapper.py %pycached %{plugin_dir}/bareos-sd-class-plugin.py %endif %if 0%{?vmware} # vmware switch is set via --define="vmware 1" in build script when # vix disklib is detected # vim: set ft=spec: %package vadp-dumper Summary: VADP Dumper - vStorage APIs for Data Protection Dumper program Requires: %{name}-vmware-vix-disklib %description vadp-dumper Uses vStorage API to connect to VMWare and dump data like virtual disks snapshots to be used by other programs. %files vadp-dumper %{_sbindir}/bareos_vadp_dumper* %doc core/src/vmware/LICENSE.vadp # vim: set ft=spec: %package vmware-plugin Summary: Bareos VMware plugin Requires: %{name}-vadp-dumper Requires: %{name}-filedaemon-python-plugin = %{version} %description vmware-plugin Uses the VMware API to take snapshots of running VMs and takes full and incremental backup so snapshots. Restore of a snapshot is currently supported to the origin VM. %files vmware-plugin %{_sbindir}/vmware_cbt_tool.py %pycached %{plugin_dir}/bareos-fd-vmware.py %doc core/src/vmware/LICENSE core/src/vmware/README.md # vim: set ft=spec: %package vmware-plugin-compat Summary: Bareos VMware plugin compatibility Requires: %{name}-vmware-plugin %description vmware-plugin-compat Keeps bareos/plugins/vmware_plugin subdirectory, which have been used in Bareos <= 16.2. %files vmware-plugin-compat %{plugin_dir}/vmware_plugin/ %endif %if %{with webui} # vim: set ft=spec: %package webui Summary: Bareos Web User Interface BuildRequires: httpd-devel Requires: php >= 7.0.0 Requires: php-fpm Requires: php-bz2 Requires: php-ctype Requires: php-curl Requires: php-date Requires: php-dom Requires: php-fileinfo Requires: php-filter Requires: php-gettext Requires: php-gd Requires: php-hash Requires: php-iconv Requires: php-intl Requires: php-json Requires: php-mbstring Requires: php-openssl Requires: php-pcre Requires: php-reflection Requires: php-session Requires: php-simplexml Requires: php-spl Requires: php-xml Requires: php-xmlreader Requires: php-xmlwriter Requires: php-zip Requires: php-libxml Requires: httpd BuildArch: noarch %define _apache_conf_dir /etc/httpd/conf.d/ %define www_daemon_user apache %define www_daemon_group apache %description webui %{dscr} This package contains the webui (Bareos Web User Interface). %files webui %doc webui/README.md webui/LICENSE %doc webui/doc/README-TRANSLATION.md %doc webui/tests/selenium %{_datadir}/%{name}-webui/ # attr(-, #daemon_user, #daemon_group) #{_datadir}/#{name}/data %dir /etc/bareos-webui %config(noreplace) /etc/bareos-webui/directors.ini %config(noreplace) /etc/bareos-webui/configuration.ini %config(noreplace) %attr(644,root,root) /etc/bareos/bareos-dir.d/profile/webui-admin.conf %config(noreplace) %attr(644,root,root) /etc/bareos/bareos-dir.d/profile/webui-readonly.conf %config(noreplace) %{_apache_conf_dir}/bareos-webui.conf %endif %if %{with build_qt_monitor} # vim: set ft=spec: %package traymonitor Summary: Bareos Tray Monitor (QT) # Added to by pass the 09 checker rules (conflict with bareos-tray-monitor.conf) # This is mostly wrong cause the two binaries can use it! Conflicts: %{name}-tray-monitor-gtk Provides: %{name}-tray-monitor-qt = %{version} %description traymonitor %{dscr} This package contains the tray monitor (QT based). %files traymonitor %attr(0755, %{daemon_user}, %{daemon_group}) %dir %{conf_dir}/tray-monitor.d/monitor %attr(0644, %{daemon_user}, %{daemon_group}) %config(noreplace) %{conf_dir}/tray-monitor.d/monitor/bareos-mon.conf %config %{_sysconfdir}/xdg/autostart/bareos-tray-monitor.desktop %{_bindir}/bareos-tray-monitor %{_mandir}/man1/bareos-tray-monitor.1.gz /usr/share/applications/bareos-tray-monitor.desktop /usr/share/pixmaps/bareos-tray-monitor.png %post traymonitor %{script_dir}/bareos-config initialize_local_hostname %{script_dir}/bareos-config initialize_passwords %endif %if %{with contrib} # vim: set ft=spec: %package contrib-director-python-plugins Summary: Additional Director Python plugins, not part of the Bareos project Requires: %{name}-director-python-plugin BuildArch: noarch %description contrib-director-python-plugins %{dscr} This package provides additional Bareos Director Python plugins, not part of the Bareos project. %files contrib-director-python-plugins %pycached %{plugin_dir}/BareosDirPluginNscaSender.py %pycached %{plugin_dir}/bareos-dir-nsca-sender.py %endif # client_only %endif %prep # vim: set ft=bash: # this is a hack so we always build in "bareos" and not in "bareos-version" %setup -q -c -n bareos mv bareos-*/* . %if %{with contrib} %replace_python_shebang contrib/misc/bsmc/bin/bsmc %replace_python_shebang contrib/misc/triggerjob/bareos-triggerjob.py %endif %if %{with python_plugins} echo %{version} > python-bareos/bareos/VERSION.txt %endif echo "This meta package emulates the former bareos-client package" > README.bareos-client echo "This is a meta package to install a full bareos system" > README.bareos %build # vim: set ft=bash: [ '%{buildroot}' != '/' ] && rm -rf %{buildroot} export PATH=$PATH:/usr/lib64/qt5/bin:/usr/lib/qt5/bin export MTX=/usr/sbin/mtx mkdir %{CMAKE_BUILDDIR} pushd %{CMAKE_BUILDDIR} # use Developer Toolset 8 compiler as standard is too old %if 0%{?rhel} == 7 source /opt/rh/devtoolset-8/enable %endif CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; %{cmake3} -DDEBUG_PREFIX_MAP:BOOL=OFF \ -Dprefix=%{_prefix}\ -Dlibdir=%{library_dir} \ -Dsbindir=%{_sbindir} \ -Dsbin-perm=755 \ -Dsysconfdir=%{_sysconfdir} \ -Dconfdir=%{conf_dir} \ -Dmandir=%{_mandir} \ -Ddocdir=%{_docdir}/%{name} \ -Darchivedir=/var/lib/%{name}/storage \ -Dbackenddir=%{backend_dir} \ -Dscriptdir=%{script_dir} \ -Dworkingdir=%{working_dir} \ -Dplugindir=%{plugin_dir} \ -Dbsrdir=%{bsr_dir} \ -Dlogdir=/var/log/bareos \ -Dsubsysdir=%{_subsysdir} \ %if %{with python_plugins} -Dpython=yes \ %endif -Dreadline=yes \ -Dbatch-insert=yes \ -Ddynamic-cats-backends=yes \ -Ddynamic-storage-backends=yes \ -Dscsi-crypto=yes \ -Dlmdb=yes \ -Dndmp=yes \ -Dacl=yes \ -Dxattr=yes \ %if 0%{?build_bat} -Dbat=yes \ %endif %if %{with build_qt_monitor} -Dtraymonitor=yes \ %endif %if %{with client_only} -Dclient-only=yes \ %endif -Dpostgresql=yes \ -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 \ -Ddefault_db_backend="XXX_REPLACE_WITH_DATABASE_DRIVER_XXX" \ %if ! %{with webui} -DENABLE_WEBUI=no \ %endif -Dwebuiconfdir=%{_sysconfdir}/bareos-webui \ -DVERSION_STRING=%version %make_build popd %if %{with python_plugins} pushd python-bareos %py3_build popd %endif %if 0%{?make_check:0} %check # vim: set ft=bash: # run unit tests pushd %{CMAKE_BUILDDIR} # run the tests and fail build if test fails REGRESS_DEBUG=1 %{ctest3} -V -S CTestScript.cmake || echo "ctest result:$?" popd %endif %install # vim: set ft=bash: pushd %{CMAKE_BUILDDIR} make DESTDIR=%{buildroot} install/fast popd install -d -m 755 %{buildroot}/usr/share/applications install -d -m 755 %{buildroot}/usr/share/pixmaps install -d -m 755 %{buildroot}%{backend_dir} install -d -m 755 %{buildroot}%{working_dir} install -d -m 755 %{buildroot}%{plugin_dir} #Cleaning for F in \ %if %{with client_only} %{_mandir}/man1/bsmtp.1 \ %{_mandir}/man8/bareos.8 \ %{_unitdir}/bareos-dir.service \ %{_unitdir}/bareos-sd.service \ %endif %if !0%{?vmware} %{_sbindir}/bareos_vadp_dumper \ %{_sbindir}/bareos_vadp_dumper_wrapper.sh \ %{_sbindir}/vmware_cbt_tool.py \ %endif %{_sysconfdir}/rc.d/init.d/bareos-dir \ %{_sysconfdir}/rc.d/init.d/bareos-sd \ %{_sysconfdir}/rc.d/init.d/bareos-fd \ %{_sysconfdir}/init.d/bareos-dir \ %{_sysconfdir}/init.d/bareos-sd \ %{_sysconfdir}/init.d/bareos-fd \ %{_bindir}/bsmtp \ %{_bindir}/bwild \ %{_bindir}/bregex \ %{_bindir}/bconsole \ %{script_dir}/bareos \ %{script_dir}/bareos-ctl-dir \ %{script_dir}/bareos-ctl-sd \ %{script_dir}/bareos-ctl-fd \ %{script_dir}/bareos-ctl-funcs \ %{script_dir}/btraceback.dbx \ %{script_dir}/btraceback.mdb \ %{_sbindir}/btestls \ %{_sbindir}/%{name} do rm -f "%{buildroot}$F" done # remove links to libraries find %{buildroot}%{library_dir} -maxdepth 1 -type l -name "libbareos*.so" -delete %if ! %{with python_plugins} rm -f %{buildroot}%{plugin_dir}/python-*.so rm -f %{buildroot}%{plugin_dir}/*.py* rm -f %{buildroot}%{plugin_dir}/__pycache__/*.pyc rm -f %{buildroot}%{conf_dir}/bareos-dir.d/plugin-python-ldap.conf %else %py_byte_compile %{__python3} %{buildroot}%{plugin_dir} %py_byte_compile %{__python3} %{buildroot}%{script_dir} %endif %if ! %{with glusterfs} rm -f %{buildroot}%{script_dir}/bareos-glusterfind-wrapper %endif # remove man page if qt tray monitor is not built %if ! %{with build_qt_monitor} rm -f %{buildroot}%{_mandir}/man1/bareos-tray-monitor.* %endif # remove vmware plugin files when vmware is not built %if !0%{?vmware} rm -f %{buildroot}%{plugin_dir}/bareos-fd-vmware.py* rm -f %{buildroot}%{plugin_dir}/__pycache__/bareos-fd-vmware.*.pyc %endif # create dir for bareos-vmware-plugin-compat mkdir -p %{buildroot}%{plugin_dir}/vmware_plugin # remove examples find %{buildroot}%{conf_dir} -name '*.example' -delete %if %{with python_plugins} pushd python-bareos %py3_install popd %endif %changelog * Wed Feb 28 2024 Philippe Kueck - 23.0.2-1 - new upstream version * Mon Jan 22 2024 Philippe Kueck - 23.0.1-2 - re-integrate python-bareos * Thu Jan 18 2024 Philippe Kueck - 23.0.1-1 - new upstream version * Wed Jan 17 2024 Philippe Kueck - 23.0.0-2 - split and cleaned up specfile - obsolete/unite python-packages - obsolete/unite database-packages - use correct buildarch - use correct docs * Tue Jan 16 2024 Philippe Kueck - 23.0.0-1 - new upstream version - removed python2 - fixes for el7 - package pycache files