Skip to content

Commit 8bd06df

Browse files
committed
Fish-shell 4.x added
1 parent 57e4279 commit 8bd06df

File tree

9 files changed

+174
-0
lines changed

9 files changed

+174
-0
lines changed

build/fish/build.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/bash
2+
#
3+
# {{{ CDDL HEADER
4+
#
5+
# This file and its contents are supplied under the terms of the
6+
# Common Development and Distribution License ("CDDL"), version 1.0.
7+
# You may only use this file in accordance with the terms of version
8+
# 1.0 of the CDDL.
9+
#
10+
# A full copy of the text of the CDDL should have accompanied this
11+
# source. A copy of the CDDL is also available via the Internet at
12+
# http://www.illumos.org/license/CDDL.
13+
# }}}
14+
15+
# Copyright 2025 OmniOS Community Edition (OmniOSce) Association.
16+
17+
. ../../lib/build.sh
18+
19+
PROG=fish
20+
VER=4.0.9
21+
PKG=ooce/shell/fish
22+
SUMMARY="Fish is a smart and user-friendly command line shell"
23+
DESC="friendly interactive shell"
24+
25+
SKIP_SSP_CHECK=1
26+
SKIP_LICENCES=COPYING
27+
28+
BUILD_DEPENDS_IPS="ooce/developer/rust library/pcre2"
29+
30+
set_arch 64
31+
32+
CONFIGURE_OPTS+="
33+
DFISH_USE_SYSTEM_PCRE2=ON
34+
"
35+
36+
init
37+
download_source $PROG fish-$VER ""
38+
patch_source
39+
prep_build
40+
build_rust
41+
run_testsuite check
42+
install_rust
43+
strip_install
44+
make_package
45+
clean_up
46+
47+
# Vim hints
48+
# vim:ts=4:sw=4:et:fdm=marker

build/fish/local.mog

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# {{{ CDDL HEADER
2+
#
3+
# This file and its contents are supplied under the terms of the
4+
# Common Development and Distribution License ("CDDL"), version 1.0.
5+
# You may only use this file in accordance with the terms of version
6+
# 1.0 of the CDDL.
7+
#
8+
# A full copy of the text of the CDDL should have accompanied this
9+
# source. A copy of the CDDL is also available via the Internet at
10+
# http://www.illumos.org/license/CDDL.
11+
# }}}
12+
13+
# Copyright 2025 OmniOS Community Edition (OmniOSce) Association.
14+
15+
license COPYING license=GPLv2
16+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--- fish-4.0.1/src/wutil/dir_iter.rs.~1~ 2025-03-12 23:16:55.000000000 -0400
2+
+++ fish-4.0.1/src/wutil/dir_iter.rs 2025-04-23 05:22:37.541215899 -0400
3+
@@ -291,6 +291,8 @@
4+
{
5+
self.entry.inode = dent.d_ino;
6+
}
7+
+ #[cfg(not(target_os = "illumos"))]
8+
+ {
9+
let typ = dirent_type_to_entry_type(dent.d_type);
10+
// Do not store symlinks as we will need to resolve them.
11+
if typ != Some(DirEntryType::lnk) {
12+
@@ -298,6 +300,7 @@
13+
}
14+
// This entry could be a link if it is a link or unknown.
15+
self.entry.possible_link = typ.map(|t| t == DirEntryType::lnk);
16+
+ }
17+
18+
Some(Ok(&self.entry))
19+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
--- fish-4.0.1/src/wutil/dir_iter.rs.old 2025-04-13 23:32:47.449072755 -0400
2+
+++ fish-4.0.1/src/wutil/dir_iter.rs 2025-04-13 23:34:42.689522160 -0400
3+
@@ -20,7 +20,7 @@
4+
chr, // character device
5+
dir, // directory
6+
blk, // block device
7+
- reg, // regular file
8+
+ regr, // regular file
9+
lnk, // symlink
10+
sock, // socket
11+
whiteout, // whiteout (from BSD)
12+
@@ -140,7 +140,7 @@
13+
DT_CHR => Some(DirEntryType::chr),
14+
DT_DIR => Some(DirEntryType::dir),
15+
DT_BLK => Some(DirEntryType::blk),
16+
- DT_REG => Some(DirEntryType::reg),
17+
+ DT_REG => Some(DirEntryType::regr),
18+
DT_LNK => Some(DirEntryType::lnk),
19+
DT_SOCK => Some(DirEntryType::sock),
20+
// todo!("whiteout")
21+
@@ -154,7 +154,7 @@
22+
S_IFCHR => Some(DirEntryType::chr),
23+
S_IFDIR => Some(DirEntryType::dir),
24+
S_IFBLK => Some(DirEntryType::blk),
25+
- S_IFREG => Some(DirEntryType::reg),
26+
+ S_IFREG => Some(DirEntryType::regr),
27+
S_IFLNK => Some(DirEntryType::lnk),
28+
S_IFSOCK => Some(DirEntryType::sock),
29+
_ => {
30+
@@ -447,9 +447,9 @@
31+
let expected = if entry.name == dirname {
32+
Some(DirEntryType::dir)
33+
} else if entry.name == regname {
34+
- Some(DirEntryType::reg)
35+
+ Some(DirEntryType::regr)
36+
} else if entry.name == reglinkname {
37+
- Some(DirEntryType::reg)
38+
+ Some(DirEntryType::regr)
39+
} else if entry.name == dirlinkname {
40+
Some(DirEntryType::dir)
41+
} else if entry.name == badlinkname {
42+
--- fish-4.0.1/src/wildcard.rs.old 2025-04-13 23:39:07.237912731 -0400
43+
+++ fish-4.0.1/src/wildcard.rs 2025-04-13 23:39:26.301942052 -0400
44+
@@ -379,7 +379,7 @@
45+
// regular file *excludes* broken links - we have no use for them as commands.
46+
let is_regular_file = entry
47+
.check_type()
48+
- .map(|x| x == DirEntryType::reg)
49+
+ .map(|x| x == DirEntryType::regr)
50+
.unwrap_or(false);
51+
if executables_only && (!is_regular_file || waccess(filepath, X_OK) != 0) {
52+
return false;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--- fish-4.0.6/src/path.rs.~1~ 2025-09-12 05:47:41.000000000 -0400
2+
+++ fish-4.0.6/src/path.rs 2025-09-12 16:08:23.976139451 -0400
3+
@@ -737,14 +737,14 @@
4+
}
5+
// ST_LOCAL is a flag to statvfs, which is itself standardized.
6+
// In practice the only system to define it is NetBSD.
7+
- #[cfg(target_os = "netbsd")]
8+
+ #[cfg(any(target_os = "netbsd", target_os = "illumos"))]
9+
let remoteness = remoteness_via_statfs(
10+
libc::statvfs,
11+
|stat: &libc::statvfs| stat.f_flag,
12+
crate::libc::ST_LOCAL(),
13+
&narrow,
14+
);
15+
- #[cfg(not(target_os = "netbsd"))]
16+
+ #[cfg(not(any(target_os = "netbsd", target_os = "illumos")))]
17+
let remoteness = remoteness_via_statfs(
18+
libc::statfs,
19+
|stat: &libc::statfs| stat.f_flags,
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--- fish-4.0.6/Cargo.toml~ 2025-11-01 07:18:01.887587486 +0000
2+
+++ fish-4.0.6/Cargo.toml 2025-11-01 07:18:30.152119232 +0000
3+
4+
@@ -71,6 +71,10 @@ serial_test = { version = "1.0.0", default-features = false }
5+
cc = "1.0.94"
6+
rsconf = "0.2.2"
7+
8+
+[patch.crates-io]
9+
+libc = { git = "https://github.com/extrowerk/libc", branch = "illumos" }
10+
+nix = { git = "https://github.com/extrowerk/nix", branch = "illumos" }
11+
+
12+
[lib]
13+
crate-type = ["rlib"]
14+
path = "src/lib.rs"

build/fish/patches/series

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
01-no-d_type.patch
2+
02-fix-reg.patch
3+
03-fix-statfs.patch
4+
Cargo.toml.patch

doc/baseline

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ extra.omnios ooce/server/nginx
267267
extra.omnios ooce/server/nginx-128
268268
extra.omnios ooce/server/nginx-common
269269
extra.omnios ooce/server/webservd-common
270+
extra.omnios.ooce/shell/fish
270271
extra.omnios ooce/storage/minio
271272
extra.omnios ooce/storage/minio-mc
272273
extra.omnios ooce/system/clamav

doc/packages.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@
219219
| ooce/server/haproxy | 3.2.7 | https://www.haproxy.org/ | [omniosorg](https://github.com/omniosorg)
220220
| ooce/server/nginx | 1.29.2 | https://nginx.org/en/download.html | [omniosorg](https://github.com/omniosorg)
221221
| ooce/server/nginx-128 | 1.28.0 | https://nginx.org/en/download.html | [omniosorg](https://github.com/omniosorg)
222+
| ooce/shell/fish | 4.0.9 | https://github.com/fish-shell/fish-shell | [omniosorg](http://github.com/omniosorg)
222223
| ooce/storage/minio | 2025-10-15T17-29-55Z | https://github.com/minio/minio/releases | [omniosorg](https://github.com/omniosorg)
223224
| ooce/storage/minio-mc | 2025-08-13T08-35-41Z | https://github.com/minio/mc/releases | [omniosorg](https://github.com/omniosorg)
224225
| ooce/system/file-system/ntfs-3g | 2022.10.3 | https://github.com/tuxera/ntfs-3g/releases | [omniosorg](https://github.com/omniosorg)

0 commit comments

Comments
 (0)