Update to 3.1.2

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
epel9
Igor Raits 5 years ago
parent dd0fb7654f
commit d2c0cf4b3b
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C

2
.gitignore vendored

@ -9,3 +9,5 @@
/fish-3.0.2.tar.gz
/fish-3.1.0.tar.gz
/fish-3.1.0.tar.gz.asc
/fish-3.1.2.tar.gz
/fish-3.1.2.tar.gz.asc

@ -1,56 +0,0 @@
From b54f5ba56e6315028186af5d9e3b914dfae5a74f Mon Sep 17 00:00:00 2001
From: Fabian Homborg <FHomborg@gmail.com>
Date: Fri, 14 Feb 2020 17:18:27 +0100
Subject: [PATCH 1/4] parser: Stop crashing when cwd isn't readable
Everything seems to be working, so instead of crashing just print an
error and return.
Fixes #6597
(cherry picked from commit ceba851d44dea68b9e1b2b551e37fd6834767357)
---
src/parser.cpp | 2 +-
tests/checks/init-unreadable-cwd.fish | 17 +++++++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
create mode 100644 tests/checks/init-unreadable-cwd.fish
diff --git a/src/parser.cpp b/src/parser.cpp
index 381b8ac06..1eae37392 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -85,7 +85,7 @@ parser_t::parser_t(std::shared_ptr<env_stack_t> vars) : variables(std::move(vars
int cwd = open_cloexec(".", O_RDONLY);
if (cwd < 0) {
perror("Unable to open the current working directory");
- abort();
+ return;
}
libdata().cwd_fd = std::make_shared<const autoclose_fd_t>(cwd);
}
diff --git a/tests/checks/init-unreadable-cwd.fish b/tests/checks/init-unreadable-cwd.fish
new file mode 100644
index 000000000..fee220847
--- /dev/null
+++ b/tests/checks/init-unreadable-cwd.fish
@@ -0,0 +1,17 @@
+#RUN: %fish -C 'set -g fish %fish' %s
+# Test that fish doesn't crash if cwd is unreadable at the start (#6597)
+
+set -l oldpwd $PWD
+set -l tmpdir (mktemp -d)
+
+# $fish might be a relative path (e.g. "../test/root/bin/fish")
+set -l fish (builtin realpath $fish)
+cd $tmpdir
+chmod 000 .
+$fish -c 'echo Look Ma! No crashing!'
+#CHECK: Look Ma! No crashing!
+#CHECKERR: Unable to open the current working directory: Permission denied
+
+# Careful here, Solaris' rm tests if the directory is in $PWD, so we need to cd back
+cd $oldpwd
+rmdir $tmpdir
--
2.25.0

@ -1,31 +0,0 @@
From ca740a87d86009badba0b4e767836eaee449e0a4 Mon Sep 17 00:00:00 2001
From: Fabian Homborg <FHomborg@gmail.com>
Date: Fri, 14 Feb 2020 20:41:17 +0100
Subject: [PATCH 2/4] iothread: Include cstdint
For uint64_t.
Needed for some configurations with glibc.
Fixes #6604.
(cherry picked from commit d80d39dd6a0576e5923184815832b0938356530c)
---
src/iothread.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/iothread.cpp b/src/iothread.cpp
index 21017fbe7..9e252260b 100644
--- a/src/iothread.cpp
+++ b/src/iothread.cpp
@@ -14,6 +14,7 @@
#include <atomic>
#include <condition_variable>
+#include <cstdint> // for uint64_t
#include <functional>
#include <queue>
--
2.25.0

@ -1,44 +0,0 @@
From ebf8bc0db4a089c575e9208c07fd8ae8c869c7da Mon Sep 17 00:00:00 2001
From: Fabian Homborg <FHomborg@gmail.com>
Date: Fri, 14 Feb 2020 20:51:54 +0100
Subject: [PATCH 3/4] iothread: include cstdint, correctly
Yeah, this was needed in the *header*.
God I hate headers.
Fixes #6604, for real this time
(cherry picked from commit f79ff7209627cc12e55cadf8b275a00ed4a378e7)
---
src/iothread.cpp | 1 -
src/iothread.h | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/iothread.cpp b/src/iothread.cpp
index 9e252260b..21017fbe7 100644
--- a/src/iothread.cpp
+++ b/src/iothread.cpp
@@ -14,7 +14,6 @@
#include <atomic>
#include <condition_variable>
-#include <cstdint> // for uint64_t
#include <functional>
#include <queue>
diff --git a/src/iothread.h b/src/iothread.h
index 5d91b2b34..bdb045dfc 100644
--- a/src/iothread.h
+++ b/src/iothread.h
@@ -4,6 +4,7 @@
#include <pthread.h>
+#include <cstdint> // for uint64_t
#include <functional>
#include <type_traits>
--
2.25.0

@ -1,35 +0,0 @@
From 4d2bb0681fab9ffa019483974a8bca8551ec5d7f Mon Sep 17 00:00:00 2001
From: Fabian Homborg <FHomborg@gmail.com>
Date: Sat, 15 Feb 2020 10:10:59 +0100
Subject: [PATCH 4/4] Fix build on 32-bit systems
This was a weird case of the integer converseys.
Fixes #6609.
(cherry picked from commit 399a71645e76ec103c32dae4caa0778b4bf57eaa)
---
src/wutil.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/wutil.cpp b/src/wutil.cpp
index ea7bdf694..1d1f0764a 100644
--- a/src/wutil.cpp
+++ b/src/wutil.cpp
@@ -305,10 +305,11 @@ int fd_check_is_remote(int fd) {
}
// Linux has constants for these like NFS_SUPER_MAGIC, SMB_SUPER_MAGIC, CIFS_MAGIC_NUMBER but
// these are in varying headers. Simply hard code them.
- switch (buf.f_type) {
+ // NOTE: The cast is necessary for 32-bit systems because of the 4-byte CIFS_MAGIC_NUMBER
+ switch ((unsigned int)buf.f_type) {
case 0x6969: // NFS_SUPER_MAGIC
case 0x517B: // SMB_SUPER_MAGIC
- case 0xFF534D42: // CIFS_MAGIC_NUMBER
+ case 0xFF534D42u: // CIFS_MAGIC_NUMBER
return 1;
default:
// Other FSes are assumed local.
--
2.25.0

@ -3,7 +3,7 @@
%global _python_bytecompile_extra 1
Name: fish
Version: 3.1.0
Version: 3.1.2
Release: 1%{?dist}
Summary: Friendly interactive shell
@ -24,23 +24,19 @@ Summary: Friendly interactive shell
# - share/completions/grunt.fish
# - share/tools/web_config/js/angular-sanitize.js
# - share/tools/web_config/js/angular.js
# - user_doc/html/_static/jquery.js
# - user_doc/html/_static/underscore.js
License: GPLv2 and BSD and ISC and LGPLv2+ and MIT
URL: https://fishshell.com
Source0: https://github.com/fish-shell/fish-shell/releases/download/%{version}/%{name}-%{version}.tar.gz
Source1: https://github.com/fish-shell/fish-shell/releases/download/%{version}/%{name}-%{version}.tar.gz.asc
Source2: gpgkey-003837986104878835FA516D7A67D962D88A709A.gpg
# Backported from upstream
Patch0001: 0001-parser-Stop-crashing-when-cwd-isn-t-readable.patch
Patch0002: 0002-iothread-Include-cstdint.patch
Patch0003: 0003-iothread-include-cstdint-correctly.patch
Patch0004: 0004-Fix-build-on-32-bit-systems.patch
BuildRequires: cmake >= 3.2
BuildRequires: ninja-build
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: gettext
BuildRequires: doxygen
BuildRequires: ncurses-devel
BuildRequires: pcre2-devel
BuildRequires: gnupg2
@ -53,6 +49,8 @@ Recommends: man-pages
Recommends: groff-base
Provides: bundled(js-angular) = 1.0.8
Provides: bundled(js-jquery) = 3.3.1
Provides: bundled(js-underscore) = 1.9.1
%description
fish is a fully-equipped command line shell (like bash or zsh) that is
@ -61,8 +59,8 @@ highlighting, autosuggestions, and tab completions that just work, with
nothing to learn or configure.
%prep
%autosetup -p1
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -p1
rm -vrf pcre2-*
# Change the bundled scripts to invoke the python binary directly.
@ -81,11 +79,6 @@ done
cp -a README.md %{buildroot}%{_pkgdocdir}
cp -a CONTRIBUTING.md %{buildroot}%{_pkgdocdir}
# filesystem will own a couple of config directories so that other packages
# can ship fish config snippets without requiring fish:
rmdir %{buildroot}%{_datadir}/fish/vendor_completions.d
rmdir %{buildroot}%{_datadir}/fish/vendor_conf.d
%find_lang %{name}
%check
@ -118,6 +111,9 @@ fi
%{_pkgdocdir}
%changelog
* Wed May 06 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 3.1.2-1
- Update to 3.1.2
* Sat Feb 15 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 3.1.0-1
- Update to 3.1.0

@ -1,2 +1,2 @@
SHA512 (fish-3.1.0.tar.gz) = 143e462b5329790fa9834e135109e1397c3525756a0209d0ec68a53f7d2a1f581cd45fbbdcde6a5b53dff447da18ed6a62277993d851e7b18ef7f1a6b6d49cff
SHA512 (fish-3.1.0.tar.gz.asc) = 7d99a513653298ea1866445bb9a29f5c6844f49ab6354993eee4416d427061926b351ecf511ac53692feafa73878a473a80c8122d3d9f240789797e0708807f4
SHA512 (fish-3.1.2.tar.gz) = b6ae2c928774a2eaccf35312d3a9446bfa3e1335182c8f2b2d6198161d0916904f4964fb20ed13a5bf850c1c819e003905d13db3bc8b1faa5b401a60b47dc563
SHA512 (fish-3.1.2.tar.gz.asc) = ebfc1d4b7ef3db0d11ef59019bbe2e742adf368dfaa28f630c7982b957f4069d6aee70a856d4c922e554ff19ad9fec54554486cd03c3c463d9dd8c35c8e7680c

Loading…
Cancel
Save