[oi-dev] shell/ksh93
stes@PANDORA.BE
stes at telenet.be
Tue Mar 30 15:53:00 UTC 2021
Thanks for the clarification.
I think there is no need to do bulk conversion of OpenIndiana packages,
due to the change (the commit c063eb990f530561e469b3c1e4bb64230456c0da in illumos-gate).
2755 split ksh93 from core package
518 ksh documentation should be moved out of SUNWcsr
I'm perhaps not aware of all of the implications, but I think this is a compatible change,
that does not require any changes on the OpenIndiana side.
Older versions of packages that depend on SUNWcs (core solaris or core system) continue to work fine.
New versions of packages can modify their manifest and Makefile and require pkg:/shell/ksh93.
But there is no need (I think) for a script to bulk convert all packages.
>From the manpage of pkgdepend resolve:
Scripts Shell scripts that contain #! lines referencing an inter-
preter result in a dependency on the package that deliv-
ers that interpreter.
So when pkgdepend resolve runs, it finds on new OI systems that shell/ksh93 is required,
and on older OI systems that SUNWcs is required.
The conversion of manifests and Makefiles to shells/ksh93 can (and should) be done gradually.
I don't think a script to convert all manifests at once is required.
Older packages that just use SUNWcs can be installed, and will work,
because /bin/sh which was provided in the past by SUNWcs is now simply present provided by ksh93.
Regards,
David Stes
----- Op 30 mar 2021 om 11:24 schreef Jim Klimov jimklimov at cos.ru:
> On March 29, 2021 5:55:46 PM UTC, "stes at PANDORA.BE" <stes at telenet.be> wrote:
>>
>>After upgrading an OI system to
>>
>>consolidation/osnet/osnet-incorporation 0.5.11-2020.0.1.20430
>> i--
>>developer/opensolaris/osnet 0.5.11-2020.0.1.20430
>> i--
>>
>>the /bin/sh is now provided by shell/ksh93
>>
>>stat /bin/sh
>> File: /bin/sh -> i86/ksh93
>>
>>which is now in the shell/ksh93 package.
>>
>>Without changing anything else, when I build squeak-5 and run gmake
>>REQUIRED_PACKAGES
>>it automagically finds (perhaps via pkgdepend resolve)
>>
>>REQUIRED_PACKAGES += shell/ksh93
>>
>>it did NOT find the old
>>
>>-REQUIRED_PACKAGES += SUNWcs
>>
>>so I removed SUNWcs from the Makefile. I did not even change
>>
>>shared-macros.mk:REQUIRED_PACKAGES += SUNWcs
>>
>>I thought first that perhaps a change of 'shared-macros.mk' would have
>>been required, but apparently not.
>>
>>Then a publish of the package publishes with the following required
>>packages:
>>
>>depend type=require
>>fmri=pkg:/shell/ksh93 at 93.21.1.20120801-2020.0.1.20430
>>depend type=require fmri=pkg:/system/library/math at 0.5.11-2020.0.1.20430
>>depend type=require fmri=pkg:/system/library at 0.5.11-2020.0.1.20430
>>
>>so basically it replaced SUNWcs by shell/ksh93.
>>
>>I suspect that if I submit a new Pull Request (PR) for the squeak
>>packages,
>>the old:
>>
>># pkg contents -t depend squeak-4-nodisplay
>>TYPE FMRI
>>require pkg:/SUNWcs at 0.5.11-2020.0.1.20416
>>require pkg:/system/library/math at 0.5.11-2020.0.1.20416
>>require pkg:/system/library at 0.5.11-2020.0.1.20416
>>
>>the old pkg:/SUNWcs will simply be replaced by the 'new' shell/ksh93.
>>
>>I'm fine with this, I think it is more or less a design decision
>>imposed by Illumos.org,
>>unless OpenIndiana would somehow change/modify/undo or reject that
>>illumos choice ...
>>
>>Perhaps one could argue that the package Korn shell is an odd
>>dependency,
>>for a package which simply delivers a few Bourne shell scripts
>>(/bin/sh).
>>
>>However isn't that the logical consequence in some sense of delivering
>>/bin/sh in shell/ksh93 ?
>>
>>David Stes
>>
>>_______________________________________________
>>oi-dev mailing list
>>oi-dev at openindiana.org
>>https://openindiana.org/mailman/listinfo/oi-dev
>
> I believe this is part of a bigger rearrangement that I campaigned for a decade
> ago, with the system shell /sbin/sh and the libs it needs moving out from /usr
> where it got put relatively late in Solaris 10/OpenSolaris days - which unlike
> earlier releases precluded easy runs without a /usr (e.g. to mount it later
> from a compressed dataset over a necessarily not-compressed but now small
> rootfs due to grub limitations back then, or using NFS, etc.).
>
> The system (primarily programmatic and optimized for that) shell /sbin/sh is
> what recovery root user uses, and system-provided scripts (SMF methods...)
> should use AFAIK. In Solarish systems that is "dictated" to be a ksh variant.
> Historically it was also a static binary to stay cached in RAM and never fail
> if the disk gave out (oh the fun of running with bits that are still remembered
> but can no longer be read, if only to inspect and shutdown), but not any
> longer.
>
> The default (primarily interactive) shell /bin/sh (with /bin being a symlink to
> /usr/bin lately) may be same or different (bash, dash are common choices that
> power-users can easily symlink). Userland scripts expecting a particular syntax
> may be better off saying so in the shebang ("I need ksh", "I use bash
> features") and not expect their current /bin/sh to handle anything beyond
> standard basic POSIX (no "local", "declare", arrays, maths, maybe even $(...)
> vs `...`, etc).
>
> Then again, ksh also handles the baseline syntax, and is "guaranteed" to be
> present, so you can depend on it as a package if you don't care and not bloat
> the footprint. After all, if your package delivers scripts it should depend on
> *some* interpreter (which was until recently part of big SUNWcs wad). Kudos to
> AndyF et al for finally splitting that up.
>
> Hope that helps,
> Jim Klimov
>
>
> --
> Typos courtesy of K-9 Mail on my Android
More information about the oi-dev
mailing list