Compare commits
3 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| f87a7b4e6b | |||
| 57f0dd518d | |||
| 4d675fb33e |
26
mksh-R59c-fgrep.patch
Normal file
26
mksh-R59c-fgrep.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
check.t | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/check.t
|
||||
+++ b/check.t 2025-07-15 08:18:18.844041945 +0000
|
||||
@@ -6627,7 +6627,7 @@ stdin:
|
||||
echo FNORD-7
|
||||
typeset -
|
||||
echo FNORD-8
|
||||
- } | fgrep FNORD
|
||||
+ } | grep -F FNORD
|
||||
fnord=(42 23)
|
||||
typeset -p fnord
|
||||
echo FNORD-9
|
||||
@@ -8313,8 +8313,8 @@ stdin:
|
||||
(echo x; exit 12) | (cat; exit 23) | (cat; exit 42)
|
||||
echo 5 $? , $PIPESTATUS , ${PIPESTATUS[0]} , ${PIPESTATUS[1]} , ${PIPESTATUS[2]} , ${PIPESTATUS[3]} .
|
||||
echo 6 ${PIPESTATUS[0]} .
|
||||
- set | fgrep PIPESTATUS
|
||||
- echo 8 $(set | fgrep PIPESTATUS) .
|
||||
+ set | grep -F PIPESTATUS
|
||||
+ echo 8 $(set | grep -F PIPESTATUS) .
|
||||
expected-stdout:
|
||||
1 0 .
|
||||
2 0 .
|
||||
@@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 15 08:36:12 UTC 2025 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Switch over to libalternatives for etags to provide a ksh
|
||||
variant (bsc#1245908)
|
||||
- Add patch mksh-R59c-fgrep.patch
|
||||
* Replace `fgrep' with `grep -F'
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 4 07:04:01 UTC 2025 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
|
||||
33
mksh.spec
33
mksh.spec
@@ -20,6 +20,11 @@
|
||||
|
||||
# Please see OBS home:mirabile/mksh for a package for other distributions.
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
Name: mksh
|
||||
Version: 59c
|
||||
Release: 0
|
||||
@@ -30,12 +35,18 @@ URL: https://mbsd.evolvis.org/mksh.htm
|
||||
Source: https://mbsd.evolvis.org/MirOS/dist/mir/%{name}/%{name}-R%{version}.tgz
|
||||
# PATCH-FEATURE-OPENSUSE mksh-vendor-mkshrc.patch gber@opensuse.org -- Add support for a vendor-supplied kshrc which is read by interactive shells before $ENV or $HOME/.mkshrc are processed
|
||||
Patch0: mksh-vendor-mkshrc.patch
|
||||
# PATCH-FEATURE-OPENSUSE There is no fgrep anymore
|
||||
Patch1: mksh-R59c-fgrep.patch
|
||||
BuildRequires: ed
|
||||
# for %%check
|
||||
BuildRequires: perl
|
||||
BuildRequires: screen
|
||||
BuildRequires: sed
|
||||
%if %{with libalternatives}
|
||||
BuildRequires: alts
|
||||
%else
|
||||
BuildRequires: update-alternatives
|
||||
%endif
|
||||
Provides: pdksh = %{version}
|
||||
Obsoletes: pdksh < %{version}
|
||||
%if !0%{?is_opensuse}
|
||||
@@ -43,8 +54,12 @@ Provides: ksh = %{version}
|
||||
Obsoletes: ksh < %{version}
|
||||
%endif
|
||||
Provides: /bin/ksh
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
The MirBSD Korn Shell is an actively developed free implementation of the Korn
|
||||
@@ -138,6 +153,15 @@ ln -s /bin/lksh %{buildroot}/bin/pdksh
|
||||
ln -s %{_bindir}/lksh %{buildroot}%{_bindir}/pdksh
|
||||
ln -s %{_mandir}/man1/lksh.1%{ext_man} \
|
||||
%{buildroot}%{_mandir}/man1/pdksh.1%{ext_man}
|
||||
%if %{with libalternatives}
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ksh
|
||||
ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/ksh
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ksh/10.conf <<-EOF
|
||||
binary=%{_bindir}/mksh
|
||||
man=mksh.1
|
||||
group=ksh
|
||||
EOF
|
||||
%else
|
||||
# symlinks for update-alternatives
|
||||
touch %{buildroot}%{_sysconfdir}/alternatives/ksh \
|
||||
%if 0%{?suse_version} < 1550
|
||||
@@ -152,6 +176,7 @@ ln -sf %{_sysconfdir}/alternatives/usr-bin-ksh %{buildroot}/%{_bindir}/ksh
|
||||
%endif
|
||||
ln -sf %{_sysconfdir}/alternatives/ksh.1%{ext_man} \
|
||||
%{buildroot}/%{_mandir}/man1/ksh.1%{ext_man}
|
||||
%endif
|
||||
|
||||
%check
|
||||
# should always run in a clean environment as otherwise
|
||||
@@ -187,6 +212,7 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post
|
||||
%{_sbindir}/update-alternatives \
|
||||
%if 0%{?suse_version} >= 1550
|
||||
@@ -207,6 +233,7 @@ if [ ! -f /bin/lksh ] ; then
|
||||
%{_sbindir}/update-alternatives --remove ksh /bin/lksh
|
||||
fi
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%files
|
||||
%doc examples/dot.mkshrc
|
||||
@@ -218,6 +245,11 @@ fi
|
||||
%{_bindir}/pdksh
|
||||
%{_mandir}/man1/pdksh.1%{?ext_man}
|
||||
%{_bindir}/ksh
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives/
|
||||
%dir %{_datadir}/libalternatives/ksh/
|
||||
%{_datadir}/libalternatives/ksh/10.conf
|
||||
%else
|
||||
%{_mandir}/man1/ksh.1%{?ext_man}
|
||||
%ghost %{_sysconfdir}/alternatives/ksh
|
||||
%ghost %{_sysconfdir}/alternatives/ksh.1%{?ext_man}
|
||||
@@ -228,5 +260,6 @@ fi
|
||||
/bin/pdksh
|
||||
%ghost %{_sysconfdir}/alternatives/usr-bin-ksh
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user