From fa2bd693b326dfcd9a9cf94744eed8fbecd8126a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20B=C5=99ezina?= Date: Wed, 29 Jan 2020 13:23:12 +0100 Subject: [PATCH] authselect-1.1-6: cli: fix auto backup when --force is set --- ...li-fix-auto-backup-when-force-is-set.patch | 31 +++++++++++++++++++ authselect.spec | 7 ++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 0001-cli-fix-auto-backup-when-force-is-set.patch diff --git a/0001-cli-fix-auto-backup-when-force-is-set.patch b/0001-cli-fix-auto-backup-when-force-is-set.patch new file mode 100644 index 0000000..781689b --- /dev/null +++ b/0001-cli-fix-auto-backup-when-force-is-set.patch @@ -0,0 +1,31 @@ +From fbbe095c15233f0411fdd7218e9021125c93a807 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pavel=20B=C5=99ezina?= +Date: Wed, 15 Jan 2020 14:00:20 +0100 +Subject: [PATCH] cli: fix auto backup when --force is set + +3e2e51df4d145daed2ed9b57ebec468cde2ddd52 adds backup ability to +multiple functions, unfortunately it introduced a regression +that backup is not performed automatically when --force is set. + +Resolves: +https://github.com/pbrezina/authselect/issues/192 +--- + src/cli/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cli/main.c b/src/cli/main.c +index 6caa0435de5dd1b61284dc973042bddc77d82d64..a5e9c877755763285c53570c8f540255c3c82489 100644 +--- a/src/cli/main.c ++++ b/src/cli/main.c +@@ -189,7 +189,7 @@ static errno_t activate(struct cli_cmdline *cmdline) + } + + if (backup || backup_name != NULL || (enforce && !nobackup)) { +- ret = perform_backup(quiet, backup, backup_name); ++ ret = perform_backup(quiet, 1, backup_name); + if (ret != EOK) { + goto done; + } +-- +2.20.1 + diff --git a/authselect.spec b/authselect.spec index 7113754..832c91b 100644 --- a/authselect.spec +++ b/authselect.spec @@ -3,7 +3,7 @@ Name: authselect Version: 1.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Configures authentication and identity sources from supported profiles URL: https://github.com/pbrezina/authselect @@ -13,6 +13,8 @@ Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Source1: translations.tar.gz %endif +Patch0001: 0001-cli-fix-auto-backup-when-force-is-set.patch + %global makedir %{_builddir}/%{name}-%{version} BuildRequires: autoconf @@ -265,6 +267,9 @@ exit 0 exit 0 %changelog +* Wed Jan 29 2020 Pavel Březina - 1.1-6 +- cli: fix auto backup when --force is set + * Tue Jan 28 2020 Fedora Release Engineering - 1.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild