![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package mksh for openSUSE:Factory checked in at 2013-10-30 15:45:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mksh (Old) and /work/SRC/openSUSE:Factory/.mksh.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "mksh" Changes: -------- --- /work/SRC/openSUSE:Factory/mksh/mksh.changes 2013-10-17 17:42:22.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.mksh.new/mksh.changes 2013-10-30 15:45:46.000000000 +0100 @@ -1,0 +2,8 @@ +Fri Oct 18 15:09:53 UTC 2013 - gber@opensuse.org + +- replace pdksh in openSUSE >= 13.2, lksh provides backwards + compatibility + - create corresponding symlinks + - use update-alternatives to allow for lksh as (/usr)/bins/ksh + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mksh.spec ++++++ --- /var/tmp/diff_new_pack.hohH60/_old 2013-10-30 15:45:47.000000000 +0100 +++ /var/tmp/diff_new_pack.hohH60/_new 2013-10-30 15:45:47.000000000 +0100 @@ -16,23 +16,31 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + + # Please see OBS home:mirabile/mksh for a package for other distributions. Name: mksh Version: 48b Release: 0 -License: MirOS and ISC Summary: MirBSD Korn Shell -Url: http://www.mirbsd.org/mksh.htm +License: MirOS and ISC Group: System/Shells +Url: http://www.mirbsd.org/mksh.htm Source: https://www.mirbsd.org/MirOS/dist/mir/mksh/%{name}-R%{version}.tgz -%if 0%{?suse_version} # 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 BuildRequires: ed # for %%check BuildRequires: perl -# only for versions not yet supporting mksh +%if 0%{?suse_version} >= 1320 +# replaces pdksh in openSUSE >= 13.2 +Provides: pdksh = %{version} +Obsoletes: pdksh < %{version} +Requires(post): update-alternatives +Requires(preun): update-alternatives +%else +# for SLES or openSUSE < 13.2 which do not mksh Requires(post): grep Requires(postun): awk %endif @@ -45,8 +53,8 @@ %prep %setup -q -n %{name} -%if 0%{?suse_version} %patch0 -p1 + ed -s sh.h <<'EOF' ,s/#define MKSH_VERSION "R\([^"]*\)"/#define MKSH_VERSION "R\1 openSUSE"/ w @@ -55,14 +63,12 @@ ,s/@(#)\(MIRBSD\|LEGACY\) KSH R\(.*\)/@(#)\1 KSH R\2 openSUSE/ w EOF -%endif + ln -s . examples %build export CFLAGS='%{optflags}' -%if 0%{?suse_version} export CPPFLAGS='-DMKSH_VENDOR_MKSHRC_PATH=\"/etc/mkshrc\"' -%endif # filter compiler warnings and errors from configuration tests { # work around bugs in gcc 4.8 (deb#717734 rh#922974) and gcc 4.1.2 in SLE 10 @@ -91,6 +97,18 @@ done install -d %{buildroot}%{_sysconfdir} ln -s %{_sysconfdir}/bash.bashrc %{buildroot}%{_sysconfdir}/mkshrc +%if 0%{?suse_version} >= 1320 +# compatibility symlinks for pdksh, lksh replaces pdksh in openSUSE >= 13.2 +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} +# ghost files for update-alternatives +ln -sf /bin/true %{buildroot}/bin/ksh +ln -sf /bin/true %{buildroot}/%{_bindir}/ksh +ln -sf %{_mandir}/man1/lksh.1%{ext_man} \ + %{buildroot}/%{_mandir}/man1/ksh.1%{ext_man} +%endif %check for shell in mksh lksh; do @@ -100,8 +118,19 @@ %clean rm -Rf %{buildroot} -# only for versions not yet supporting mksh -%if 0%{?suse_version} <= 1310 +%if 0%{?suse_version} >= 1320 +%post +%{_sbindir}/update-alternatives \ + --install /bin/ksh ksh /bin/lksh 15 \ + --slave %{_bindir}/ksh usr-bin-ksh %{_bindir}/lksh \ + --slave %{_mandir}/man1/ksh.1.gz ksh.1.gz %{_mandir}/man1/lksh.1%{ext_man} + +%preun +if test $1 -eq 0 ; then + %{_sbindir}/update-alternatives --remove ksh /bin/lksh +fi +%else +# for SLE or openSUSE < 13.2 which do not support mksh %post for entry in /bin/mksh %{_bindir}/mksh; do grep -q ${entry} %{_sysconfdir}/shells ||\ @@ -128,7 +157,15 @@ /bin/lksh %{_bindir}/mksh %{_bindir}/lksh -%{_mandir}/man1/mksh.1* -%{_mandir}/man1/lksh.1* +%{_mandir}/man1/mksh.1%{ext_man} +%{_mandir}/man1/lksh.1%{ext_man} +%if 0%{?suse_version} >= 1320 +/bin/pdksh +%{_bindir}/pdksh +%{_mandir}/man1/pdksh.1%{ext_man} +%ghost %verify(not link) /bin/ksh +%ghost %verify(not link) %{_bindir}/ksh +%ghost %verify(not link) %{_mandir}/man1/ksh.1%{ext_man} +%endif %changelog -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org