diff --git a/.gitignore b/.gitignore index 64dc436..612ee18 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,3 @@ /sensible-utils_0.0.9.tar.gz /sensible-utils_0.0.11.tar.xz /sensible-utils_0.0.12.tar.xz -/sensible-utils_0.0.14.tar.xz -/sensible-utils_0.0.16.tar.xz -/sensible-utils_0.0.17.tar.xz -/sensible-utils_0.0.18.tar.xz -/sensible-utils_0.0.19.tar.xz -/sensible-utils_0.0.20.tar.xz -/sensible-utils_0.0.21.tar.xz -/sensible-utils_0.0.22.tar.xz -/sensible-utils_0.0.23.tar.xz -/sensible-utils_0.0.24.tar.xz -/sensible-utils_0.0.25.tar.xz -/sensible-utils_0.0.26.tar.xz diff --git a/sensible-utils.spec b/sensible-utils.spec index 6f65a9f..e5dab29 100644 --- a/sensible-utils.spec +++ b/sensible-utils.spec @@ -1,10 +1,10 @@ Name: sensible-utils -Version: 0.0.26 -Release: 3%{?dist} +Version: 0.0.12 +Release: 6%{?dist} Summary: Utilities for sensible alternative selection BuildArch: noarch -License: GPL-2.0-or-later +License: GPLv2+ URL: https://packages.debian.org/unstable/admin/%{name} Source0: http://ftp.de.debian.org/debian/pool/main/s/%{name}/%{name}_%{version}.tar.xz @@ -12,10 +12,15 @@ BuildRequires: automake autoconf BuildRequires: make BuildRequires: po4a -# See Patch0 -Requires: /usr/bin/gettext -Requires: /usr/bin/realpath +# Needed by select-editor +Requires: gettext +# Silence stderr when looking for $EDITOR, $VISUAL and $SELECTED_EDITOR (#1467077) +Patch0: sensible-utils_stderr.patch +# Use --config instead of --list in update-alternatives --config editor (#1489159) +Patch1: sensible-utils_editors.patch +# Just require gettext instead of installing a wrapper +Patch2: sensible-utils_gettext.patch %description This package provides a number of small utilities which are used by programs to @@ -23,11 +28,11 @@ sensibly select and spawn an appropriate browser, editor, or pager. %prep -%autosetup -p1 -n %{name}-%{version} +%autosetup -p1 -n %{name}.git %build -# Needed for Patch0 +# Needed for Patch2 autoreconf -ifv %configure @@ -48,81 +53,6 @@ autoreconf -ifv %changelog -* Fri Jul 17 2026 Fedora Release Engineering - 0.0.26-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild - -* Sat Jan 17 2026 Fedora Release Engineering - 0.0.26-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild - -* Fri Aug 22 2025 Sandro Mani - 0.0.26-1 -- Update to 0.0.26 - -* Fri Jul 25 2025 Fedora Release Engineering - 0.0.25-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Wed Apr 23 2025 Sandro Mani - 0.0.25-1 -- Update to 0.0.25 - -* Sun Jan 19 2025 Fedora Release Engineering - 0.0.24-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Sat Jul 20 2024 Fedora Release Engineering - 0.0.24-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Tue Jun 25 2024 Sandro Mani - 0.0.24-1 -- Update to 0.0.24 - -* Tue Jun 18 2024 Sandro Mani - 0.0.23-1 -- Update to 0.0.23 - -* Tue Feb 06 2024 Sandro Mani - 0.0.22-1 -- Update to 0.0.22 - -* Sat Jan 27 2024 Fedora Release Engineering - 0.0.21-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sat Jul 22 2023 Fedora Release Engineering - 0.0.21-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Thu Jul 06 2023 Sandro Mani - 0.0.21-1 -- Update to 0.0.21 - -* Sun Jun 18 2023 Sandro Mani - 0.0.20-1 -- Update to 0.0.20 - -* Tue May 09 2023 Sandro Mani - 0.0.19-1 -- Update to 0.0.19 - -* Sun Mar 19 2023 Sandro Mani - 0.0.18-1 -- Update to 0.0.18 - -* Sat Jan 21 2023 Fedora Release Engineering - 0.0.17-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Tue Aug 30 2022 Sandro Mani - 0.0.17-4 -- Require gettext-runtime - -* Sat Jul 23 2022 Fedora Release Engineering - 0.0.17-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Sat Jan 22 2022 Fedora Release Engineering - 0.0.17-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Mon Aug 30 2021 Sandro Mani - 0.0.17-1 -- Update to 0.0.17 - -* Fri Aug 27 2021 Sandro Mani - 0.0.16-1 -- Update to 0.0.16 - -* Fri Jul 23 2021 Fedora Release Engineering - 0.0.14-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Wed Jan 27 2021 Fedora Release Engineering - 0.0.14-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Fri Jan 15 2021 Sandro Mani - 0.0.14-1 -- Update to 0.0.14 - * Wed Jul 29 2020 Fedora Release Engineering - 0.0.12-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sensible-utils_editors.patch b/sensible-utils_editors.patch new file mode 100644 index 0000000..131d275 --- /dev/null +++ b/sensible-utils_editors.patch @@ -0,0 +1,21 @@ +diff -rupN sensible-utils.git/select-editor.in sensible-utils.git-new/select-editor.in +--- sensible-utils.git/select-editor.in 2017-11-15 11:33:17.000000000 +0100 ++++ sensible-utils.git-new/select-editor.in 2018-03-13 10:11:14.612976126 +0100 +@@ -14,7 +14,7 @@ EASIEST="/bin/nano" + touch $HOME/.selected_editor || exit 1 + + sorted_list_of_editors() { +- update-alternatives --query editor | while read emptyline; do ++ update-alternatives --config editor | while read emptyline; do + # skip the first entry (header) as well as the rest of processed entries + if [ -z "$emptyline" ]; then continue; fi + +@@ -35,7 +35,7 @@ sorted_list_of_editors() { + } + + +-editors=`update-alternatives --list editor | wc -l` ++editors=`update-alternatives --config editor | wc -l` + if [ $editors -gt 1 ]; then + # fix simple to 1 see #777168 + simple=1 diff --git a/sensible-utils_gettext.patch b/sensible-utils_gettext.patch new file mode 100644 index 0000000..a5b21a1 --- /dev/null +++ b/sensible-utils_gettext.patch @@ -0,0 +1,31 @@ +diff -rupN sensible-utils.git/Makefile.am sensible-utils.git-new/Makefile.am +--- sensible-utils.git/Makefile.am 2018-03-12 11:17:53.000000000 +0100 ++++ sensible-utils.git-new/Makefile.am 2018-03-13 10:11:14.618976126 +0100 +@@ -7,8 +7,6 @@ TESTS = test/ed-as-sensible-editor test/ + AM_TESTS_ENVIRONMENT=\ + PATH="$(topsrcdir):$$PATH"; export PATH; + +-binpkgdatadir = $(pkgdatadir)/bin +- + edit = sed \ + -e 's|@binpkgdatadir[@]|$(binpkgdatadir)|g' \ + -e 's|@prefix[@]|$(prefix)|g' +@@ -25,4 +23,3 @@ select-editor: $(srcdir)/select-editor.i + + + bin_SCRIPTS = sensible-browser sensible-editor sensible-pager select-editor +-binpkgdata_SCRIPTS = tools/gettext +diff -rupN sensible-utils.git/select-editor.in sensible-utils.git-new/select-editor.in +--- sensible-utils.git/select-editor.in 2018-03-13 10:11:14.617976126 +0100 ++++ sensible-utils.git-new/select-editor.in 2018-03-13 10:11:14.618976126 +0100 +@@ -3,10 +3,6 @@ + # To generate localization information, run: + # xgettext -o - -L Shell select-editor + +-# if no gettext it will fallback to gettext on /usr/share/sensible-utils/bin +-# see #728612 +-PATH=$PATH:/usr/sbin:@binpkgdatadir@ +- + # EASIEST editor + EASIEST="/bin/nano" + diff --git a/sensible-utils_stderr.patch b/sensible-utils_stderr.patch new file mode 100644 index 0000000..0802d54 --- /dev/null +++ b/sensible-utils_stderr.patch @@ -0,0 +1,16 @@ +diff -rupN sensible-utils.git/sensible-editor sensible-utils.git-new/sensible-editor +--- sensible-utils.git/sensible-editor 2013-06-06 03:10:34.000000000 +0200 ++++ sensible-utils.git-new/sensible-editor 2018-03-13 10:11:14.605976126 +0100 +@@ -4,9 +4,9 @@ ret="$?" + + # Prevent recursive loops, where these values are set to this script + p="$(which sensible-editor)" +-[ "$(which $EDITOR || true)" = "$p" ] && EDITOR= +-[ "$(which $VISUAL || true)" = "$p" ] && VISUAL= +-[ "$(which $SELECTED_EDITOR || true)" = "$p" ] && SELECTED_EDITOR= ++[ "$(which $EDITOR 2> /dev/null || true)" = "$p" ] && EDITOR= ++[ "$(which $VISUAL 2> /dev/null || true)" = "$p" ] && VISUAL= ++[ "$(which $SELECTED_EDITOR 2> /dev/null || true)" = "$p" ] && SELECTED_EDITOR= + + if [ -n "$VISUAL" ]; then + ${VISUAL} "$@" diff --git a/sources b/sources index 89e5559..0e19cad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sensible-utils_0.0.26.tar.xz) = afc313ac57379987ef61f656386bb9e4ea14746a266584b4e49953449a1d4869d156d79211ab07826b2473c63e4e2903044751f67b905fab61363c6ba3967ec1 +SHA512 (sensible-utils_0.0.12.tar.xz) = b1e2fbd984d97a74a2b254990514b4b83ce7c4a89a3f27f5fbc9ebffb536e05d7fbfda748228b3d2dbe3469c9ae6f327d8371481da92a4b37397d5d011e5b403