10 Commits

Author SHA256 Message Date
8fa8aeeb7f Accepting request 1306964 from shells
- Fix bug boo#1225398 that is link libast.so against -lm

OBS-URL: https://build.opensuse.org/request/show/1306964
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ksh?expand=0&rev=119
2025-09-24 15:13:13 +00:00
21f493ccc7 .
OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=250
2025-09-24 13:55:53 +00:00
640c1396c0 .
OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=249
2025-09-24 13:25:39 +00:00
0839b8e8bf .
OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=248
2025-09-24 12:32:31 +00:00
ea15489635 .
OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=247
2025-09-24 11:25:13 +00:00
2de6036efd .
OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=246
2025-09-24 11:24:31 +00:00
951530e5a7 Fix bug boo#1225398
OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=245
2025-09-24 11:23:19 +00:00
e5d416b305 Accepting request 1299826 from shells
- Switch over to libalternatives for etags to provide a ksh
  variant [bsc#1245908]

OBS-URL: https://build.opensuse.org/request/show/1299826
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ksh?expand=0&rev=118
2025-08-15 19:52:43 +00:00
760c9f46ba libalternatives
OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=243
2025-08-15 12:47:02 +00:00
d5b439c795 libalternatives
OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=242
2025-08-15 12:23:43 +00:00
3 changed files with 65 additions and 17 deletions

View File

@@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed Sep 24 11:21:55 UTC 2025 - Dr. Werner Fink <werner@suse.de>
- Fix bug boo#1225398 that is link libast.so against -lm
-------------------------------------------------------------------
Fri Aug 15 12:23:01 UTC 2025 - Dr. Werner Fink <werner@suse.de>
- Switch over to libalternatives for etags to provide a ksh
variant [bsc#1245908]
-------------------------------------------------------------------
Thu Aug 1 14:04:27 CEST 2024 - mls@suse.de
@@ -2082,7 +2093,7 @@ Mon May 25 15:00:58 CEST 2009 - werner@suse.de
- Assigning to SECONDS in a subshell causes crash (bnc#502622)
-------------------------------------------------------------------
Mon Feb 16 11:11:27 CET 2009 - werner@suse.de
Mon Feb 16 11:12:27 CET 2009 - werner@suse.de
- Update to 2009-03-10 beta test of ksh93t+ for bug fixes
@@ -2840,4 +2851,3 @@ Wed Feb 2 19:14:49 CET 2005 - werner@suse.de
- Initial version of the AT&T ksh now under CPL1.0 (bug #3698)
-------------------------------------------------------------------

View File

@@ -1,7 +1,7 @@
#
# spec file for package ksh
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -33,6 +33,11 @@ Name: ksh
%define libdir /%{_lib}
%define bindir /bin
%endif
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
BuildRequires: bind-utils
BuildRequires: bison
BuildRequires: flex
@@ -43,7 +48,11 @@ BuildRequires: libbz2-devel
BuildRequires: ncurses-devel
BuildRequires: procps
BuildRequires: psmisc
%if %{with libalternatives}
BuildRequires: alts
%else
BuildRequires: update-alternatives
%endif
BuildRequires: zlib-devel
# /bin/ex and /bin/ed required for build
BuildRequires: awk
@@ -52,9 +61,14 @@ BuildRequires: strace
BuildRequires: vim
URL: http://www.research.att.com/~gsf/download/
Requires(post): /bin/ln /bin/rm /etc/bash.bashrc /bin/true
Requires(postun):/bin/ln /bin/rm /etc/bash.bashrc /bin/true
Requires(postun): /bin/ln /bin/rm /etc/bash.bashrc /bin/true
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(preun):update-alternatives
Requires(preun): update-alternatives
%endif
%if %use_suid_exe
PreReq: permissions
%endif
@@ -465,7 +479,7 @@ fi
RPM_OPT_FLAGS=$(echo "${RPM_OPT_FLAGS}"|sed -r 's/([[:blank:]]+)-g[[:digit:]]+/\1-g2/g;s/([[:blank:]]+)-g([[:blank:]]+|$)/\1-g2\2/g')
UNIVERSE=att
LDFLAGS="-lm"
LDSOFLG=""
LDSOFLG="-lm"
cflags -std=gnu99 RPM_OPT_FLAGS
cflags -fPIC RPM_OPT_FLAGS
cflags -fno-strict-aliasing RPM_OPT_FLAGS
@@ -710,6 +724,16 @@ fi
%if %use_suid_exe
install bin/suid_exec %{buildroot}%{libdir}/ast/bin/
%endif
%if %{with libalternatives}
mkdir -p %{buildroot}%{_datadir}/libalternatives/ksh
ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/ksh
cat > %{buildroot}%{_datadir}/libalternatives/ksh/20.conf <<-EOF
binary=%{_bindir}/ksh93
man=ksh93.1
group=ksh
EOF
ln -sf ksh93.1.gz %{buildroot}/%{_mandir}/man1/rksh.1.gz
%else
# create update-alternatives symlinks
mkdir -p %{buildroot}%{_sysconfdir}/alternatives/
touch %{buildroot}/%{_sysconfdir}/alternatives/ksh
@@ -722,6 +746,7 @@ fi
ln -sf %{_sysconfdir}/alternatives/ksh %{buildroot}%{bindir}/ksh
ln -sf %{_sysconfdir}/alternatives/ksh.1.gz %{buildroot}/%{_mandir}/man1/ksh.1.gz
ln -sf %{_sysconfdir}/alternatives/rksh.1.gz %{buildroot}/%{_mandir}/man1/rksh.1.gz
%endif
ln -sf %{bindir}/ksh93 %{buildroot}%{_bindir}/rksh
ln -sf ../../bin/ksh93 %{buildroot}%{libdir}/ast/ksh
ln -sf ast %{buildroot}%{libdir}/ksh
@@ -820,6 +845,7 @@ test -e etc/bash.bashrc && ln -sf bash.bashrc etc/ksh.kshrc || true
%set_permissions %{libdir}/ast/bin/suid_exec
%endif
%endif
%if ! %{with libalternatives}
if test -x %{libdir}/ast/bin/ksh ; then
%{_sbindir}/update-alternatives \
--quiet \
@@ -835,6 +861,7 @@ fi
%endif
--slave %{_mandir}/man1/ksh.1.gz ksh.1.gz %{_mandir}/man1/ksh93.1.gz \
--slave %{_mandir}/man1/rksh.1.gz rksh.1.gz %{_mandir}/man1/ksh93.1.gz
%endif
%postun
if test $1 -eq 0 -a ! -x bin/ksh ; then
@@ -842,9 +869,11 @@ if test $1 -eq 0 -a ! -x bin/ksh ; then
rm -f etc/ksh.kshrc
fi
fi
%if ! %{with libalternatives}
if [ ! -f %{bindir}/ksh93 ] ; then
%{_sbindir}/update-alternatives --quiet --remove ksh %{bindir}/ksh93
fi
%endif
%posttrans
if test -x bin/ksh -o -x bin/pdksh ; then
@@ -857,9 +886,21 @@ fi
%config %attr(0644,root,root) %{_sysconfdir}/permissions.d/ksh
%config %attr(0644,root,root) %{_sysconfdir}/permissions.d/ksh.paranoid
%endif
%doc LICENSE EPL-1.0 CPL-1.0 src/cmd/ksh93/COMPATIBILITY src/cmd/ksh93/RELEASE*
%if %{defined license} && 0%{?suse_version} > 1315
%license LICENSE EPL-1.0 CPL-1.0
%else
%doc LICENSE EPL-1.0 CPL-1.0
%endif
%doc src/cmd/ksh93/COMPATIBILITY src/cmd/ksh93/RELEASE*
%doc Builtins PROMO OBSOLETE MEMORANDUM
%{_bindir}/ksh
%if %{with libalternatives}
%dir %{_datadir}/libalternatives/
%dir %{_datadir}/libalternatives/ksh/
%{_datadir}/libalternatives/ksh/20.conf
%doc %{_mandir}/man1/rksh.1.gz
%doc %{_mandir}/man1/ksh93.1.gz
%else
%doc %{_mandir}/man1/ksh.1.gz
%doc %{_mandir}/man1/rksh.1.gz
%doc %{_mandir}/man1/ksh93.1.gz
@@ -871,6 +912,7 @@ fi
%endif
%ghost %{_sysconfdir}/alternatives/ksh.1.gz
%ghost %{_sysconfdir}/alternatives/rksh.1.gz
%endif
%doc %{_mandir}/man1/shcomp.1ast.gz
%if %use_opt_bins
%doc %{_mandir}/man1/pty.1ast.gz
@@ -894,7 +936,12 @@ fi
%files -n ksh-devel
%defattr(-,root,root)
%doc LICENSE Warning
%if %{defined license} && 0%{?suse_version} > 1315
%license LICENSE
%else
%doc LICENSE
%endif
%doc Warning
%dir %{_libdir}/ast/
%{_libdir}/ast/*.so
%{_libdir}/ast/*.a

View File

@@ -279,15 +279,6 @@
pid=$!
--- src/cmd/ksh93/tests/locale.sh
+++ src/cmd/ksh93/tests/locale.sh 2011-05-24 14:46:02.000000000 +0000
@@ -62,7 +62,7 @@ done
# this locale is supported by ast on all platforms
# EU for { decimal_point="," thousands_sep="." }
-locale=C_EU.UTF-8
+locale=de_DE.UTF-8
export LC_ALL=C
@@ -111,11 +111,11 @@ set -- $($SHELL -c "
unset LC_CTYPE
export LANG=$locale