# # spec file for package smdba # # Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %global debug_package %{nil} %{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")} Name: smdba Version: 1.7.12 Release: 0.230900.1.6.uyuni3 Summary: Tool to maintain the SUSE Manager Database License: MIT Group: Productivity/Databases/Tools URL: https://github.com/suse/smdba Source0: %{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python3-devel %if 0%{?suse_version} Provides: spacewalk-dobby = 2.1 Obsoletes: spacewalk-dobby < 2.1 %endif Requires: sudo %description SUSE Manager database control to operate various database backends. %prep %setup %build CFLAGS="$RPM_OPT_FLAGS" python3 setup.py build for i in `find . -type f`; do sed -i '1s=^#!/usr/bin/\(python\|env python\)[0-9.]*=#!/usr/bin/python3=' $i; done %install python3 setup.py install --skip-build --root="$RPM_BUILD_ROOT" --prefix=%{_prefix} mkdir -p $RPM_BUILD_ROOT/%{_bindir} mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 install -m0755 src/smdba/smdba $RPM_BUILD_ROOT/%{_bindir} install -m0644 doc/smdba.1 $RPM_BUILD_ROOT%{_mandir}/man1/ install -m0644 doc/smdba-netswitch.1 $RPM_BUILD_ROOT%{_mandir}/man1/ # compat link ln -sf smdba $RPM_BUILD_ROOT/%{_bindir}/db-control %if 0%{?rhel} rm -Rf $RPM_BUILD_ROOT%{python3_sitelib}/SUSE_Manager_Database_Control-%{version}-py*.egg-info %endif %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{python3_sitelib}/smdba %if ! 0%{?rhel} %{python3_sitelib}/SUSE_Manager_Database_Control-%{version}-py3.6.egg-info %endif %doc doc/README %license LICENSE %{_mandir}/man1/*.1* %{_bindir}/* %changelog * Fri Sep 29 2023 Michael Calmer - Version 1.7.12 * re-use configured max_connection value * keep previous selected value for SSD configuration * Mon Oct 24 2022 Michael Calmer - Version 1.7.11 * fix config update from wal_keep_segments to wal_keep_size for newer postgresql versions (bsc#1204519) * Mon Jun 6 2022 Julio González Gil - Declare the LICENSE file as license and not doc * Thu May 5 2022 Julio González Gil - Make EL egginfo removal more generic * Wed Apr 20 2022 Stefan Bluhm - Don't package egg-info file for Enterprise Linux. * Sun Feb 20 2022 Michael Calmer - Version 1.7.10 * adapt pgtune using new defaults for new postgres versions * support special configuration for SSD storage * make argument "--backup-dir" symlink aware * Wed Aug 4 2021 Michael Calmer - Version 1.7.9 - allow different standard configuration file location for other OSes * Thu Jan 28 2021 Jordi Massaguer - Version 1.7.8 - Do not remove the database if there is no backup and deal with manifest * Tue Dec 15 2020 Jordi Massaguer - Version 1.7.7 - fix smdba throws error on mgr-setup/installation - Raise an exception on failed external process call - Fix TablePrint formatting * Fri Dec 11 2020 Jordi Massaguer - Version 1.7.6 - Rename configuration parameter wal_keep_segments to wal_keep_size (jsc#SLE-17030) * Sat Nov 28 2020 Michael Calmer - Version 1.7.5 - revert modifying cpu_tuple_cost * Sat Nov 21 2020 Stefan Bluhm - Version 1.7.4-1 - Adapted spec file for RHEL8 * Mon Mar 9 2020 Michael Calmer - Version 1.7.4 - adapt recover mechanism for postgresql12 and later * Tue May 14 2019 bo@suse.de - Version 1.7.3 - More cleanup on Py3 port * Thu May 9 2019 bo - Version 1.7.2 - Cleanup Py3 port - Add static typing * Tue Apr 23 2019 Julio González Gil - version 1.7.1 - Port to Python3 * Mon Apr 1 2019 mantel@suse.de - make 'smdba space-overview' postgresql version agnostic (bsc#1129956) - fix version mismatch * Wed Jan 16 2019 jgonzalez@suse.com - Version 1.6.3 - Tuning: add cpu_tuple_cost (bsc#1105791) * Mon Oct 1 2018 mantel@suse.de - version 1.6.2 - add support for postgresql 10 (FATE#325659) * Mon Aug 21 2017 mantel@suse.de - version 1.6.0 - several autotuning fixes; ensure cleanup of existing too low value for default_statistics_target (bsc#1022286) * Tue Aug 15 2017 mantel@suse.de - version 1.5.9 - do not set default_statistics_target (bsc#1022286) * Mon Jul 17 2017 mantel@suse.de - version 1.5.8 - support postgresql96 (bsc#1045152) * Wed Feb 15 2017 bmaryniuk@suse.com - version 1.5.7 - prevent use of /var/lib/pgsql/data (bsc#1024058) - remove copyright message every time shown (and fix its data) - cleanup stale pid for killed postmaster (ver 9.x) - minor code cleanup * Wed Feb 15 2017 bmaryniuk@suse.com - version 1.5.6 - On systemd-enabled systems use it for start/stop PostgreSQL. Issue mentioned in bsc#1024058 * Wed Oct 5 2016 mc@suse.de - version 1.5.5 - Fix recovery.conf permissions and ownership for latest PostgreSQL (bsc#1002231) * Thu Jul 14 2016 bmaryniuk@suse.com - version 1.5.4 - Bugfix: Use backup directory temp space on restore (bsc#986955) - Bugfix: Enable --silent option working - Bugfix: Prevent access uninitialized variable (possible crash) - Bugfix: Return values from the backup locator (possible crash) - Bugfix: Do not proceed of backups weren't enabled (CLI) * Tue Jun 21 2016 dleidi@suse.com - version 1.5.3 - On postgres, compute space-overview with the size(available and used) of the partition disk - BugFix: compute the db usage percentage on the amount of the partition instead of the remaining space (bsc#977888) * Tue Oct 13 2015 bmaryniuk@suse.com - version 1.5.2 - bnc#932966: memory calculation optimization bugfix - Added "max_locks_per_transaction" and "max_connections" tuning parameters * Wed Jan 28 2015 bmaryniuk@suse.com - version 1.5.1 - bnc#915140: Archival of PosgreSQL transaction log does not recover if previously no space left on device * Wed Nov 26 2014 bmaryniuk@suse.com - version 1.5 - bnc#906850: space reclamation caused ORA-00942: table or view does not exist - Optimized space reclamation for Oracle * Thu Nov 6 2014 bmaryniuk@suse.com - version 1.4 - Backup permissiong pre-check - CLI improvements - Fully hot operations for PostgreSQL - Updated manpages - Bugfix: System check breaks backup and other configuration - bnc#896244: Rotating PostgreSQL backup (feature) * Mon Jul 7 2014 smoioli@suse.com - installation directory updated * Mon Jan 13 2014 mc@suse.de - version 1.3 - set postgres max connections to the same value as for oracle * Tue Dec 17 2013 mc@suse.de - change rpm group to Productivity/Databases/Tools * Thu Sep 12 2013 bmaryniuk@suse.com - bnc#814954: Fixed hot-backup rolling. * Tue Sep 10 2013 bmaryniuk@suse.com - bnc#823350: RMAN errors upon a problem differentiation. * Tue Jul 2 2013 bmaryniuk@suse.com - bnc#799068: Added sudo permission check. * Mon May 27 2013 bmaryniuk@suse.com - Automatically adjust free space for the hot backup (bnc#809927) * Tue Nov 20 2012 mc@suse.de - print header on STDOUT and add a copyright year (bnc#790310) * Tue Oct 16 2012 mc@suse.de - set version to 1.2 - add man page for smdba * Wed Sep 19 2012 mc@suse.de - Backup recovery from a complete disaster on Oracle (bnc#756824) - fix space-overview header * Thu Aug 16 2012 mc@suse.de - provide/obsolete spacewalk-dobby (bnc#776161) * Tue Aug 14 2012 mc@suse.de - set Pg option bytea_output = 'escape' (bnc#775591) * Mon Aug 13 2012 mc@suse.de - set Pg option standard_conforming_strings to off like in older Pg versions. * Wed Aug 8 2012 mc@suse.de - write recovery.conf to start db in recovery mode after restore - fix smdba-pgarchive checksum handling - lower wal_keep_segments default value to limit disk usage - make recreate of a base backup possible in an already existing backup dir - improve help text - rename postgresql backup-hot parameter --destination to - -backup-dir similar to the oracle backup-hot command. * Tue Aug 7 2012 mc@suse.de - fix postgresql backup and restore - set max_connections to 80 * Sun Aug 5 2012 mc@suse.de - do autotuning in system-check only if requested - postgres commands should not return header for table output - fix oracle DB backup recover * Fri Aug 3 2012 mc@suse.de - strip logon path from db_name to get the sid - use the stripped dbsid string for ORACLE_SID * Thu Aug 2 2012 mc@suse.de - improve help texts - add PostgreSQL auto-tuning * Fri Jun 29 2012 bmaryniuk@suse.com - Fix bnc#766342 * Thu Jun 21 2012 jrenner@suse.de - Added pre-set Oracle owner backup dir * Tue May 29 2012 mc@suse.de - install smdba-netswitch - fix smdba-netswitch start/stop DB * Wed May 23 2012 mc@suse.de - Add Separate script to put Oracle DB in localhost or worldwide listening mode - Sync'ed tnsnames.ora file to avoid clash - Refactored Oracle DB handling. * Thu May 10 2012 mc@suse.de - add compat db-control link * Thu May 10 2012 mc@suse.de - initial release 1.0