Bug 841741
Summary: | ksh build change request: shared libshell, not static; plus how-to spec attached | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Kenneth Salerno <kennethsalerno> | ||||||||
Component: | ksh | Assignee: | Michal Hlavinka <mhlavink> | ||||||||
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
Severity: | low | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | 6.6 | CC: | kdudka, mhlavink | ||||||||
Target Milestone: | rc | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2014-12-10 14:50:35 UTC | Type: | Bug | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Created attachment 599311 [details]
ast-ksh PATCH file
This patch is to be used by the previously attached spec file
Created attachment 599438 [details]
SPEC file
This message is a reminder that Fedora 17 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 17. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '17'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 17's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 17 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior to Fedora 17's end of life. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. This message is a reminder that Fedora 18 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 18. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '18'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 18's end of life. Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 18 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior to Fedora 18's end of life. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. We've considered this change and decided not to change the packaging of ksh for now. It would mean to keep non-upstreamable patches and differ from upstream, which we do not wan to do right now. Also we do not wan to do this change in released product. We may reconsider this in the future, but for now I'm going to close this request. |
Created attachment 599310 [details] SPEC file Description of problem: I am requesting that the "ksh" package maintainer for Fedora considers building using shared libshell/libast libraries to reduce redundant code in memory when we have multiple copies of ksh running. Currently, the ast-ksh package is compiled using the default static configuration of rolling libshell.a into a very large ksh binary: ls -lh: -rwxr-xr-x 1 root root 1.6M Apr 14 11:47 /bin/ksh ldd: linux-vdso64.so.1 => (0x00000fff8a6a0000) libdl.so.2 => /lib64/libdl.so.2 (0x00000fff8a660000) libm.so.6 => /lib64/libm.so.6 (0x00000fff8a560000) libc.so.6 => /lib64/libc.so.6 (0x00000fff8a370000) /lib64/ld64.so.1 (0x000000005a2a0000) That's your big boy: 1.6 MegaBytes for a shell that is not bash. Linking pmain.o to libshell.so and libast (plus libcmd, libcoshell, and libdll) however produces a very small ksh binary and we can allow the dynamic linker to share one copy of the ast libraries in memory: ls -lh: -rwxr-xr-x 1 root root 5.3K Jul 20 12:07 /bin/ksh -rwxr-xr-x 1 root root 1.2M Jul 20 12:07 /usr/lib64/libast-ast.so -rwxr-xr-x 1 root root 300K Jul 20 12:07 /usr/lib64/libast-cmd.so -rwxr-xr-x 1 root root 42K Jul 20 12:07 /usr/lib64/libast-coshell.so -rwxr-xr-x 1 root root 24K Jul 20 12:07 /usr/lib64/libast-dll.so -rwxr-xr-x 1 root root 866K Jul 20 12:07 /usr/lib64/libast-shell.so ldd: linux-vdso64.so.1 => (0x00000fff8da40000) libm.so.6 => /lib64/libm.so.6 (0x00000fff8d930000) libdl.so.2 => /lib64/libdl.so.2 (0x00000fff8d900000) libast-shell.so => /usr/lib64/libast-shell.so (0x00000fff8d820000) libast-ast.so => /usr/lib64/libast-ast.so (0x00000fff8d6e0000) libc.so.6 => /lib64/libc.so.6 (0x00000fff8d4f0000) /lib64/ld64.so.1 (0x000000004e7d0000) libast-dll.so => /usr/lib64/libast-dll.so (0x00000fff8d4d0000) libast-coshell.so => /usr/lib64/libast-coshell.so (0x00000fff8d4b0000) libast-cmd.so => /usr/lib64/libast-cmd.so (0x00000fff8d450000) libnsl.so.1 => /lib64/libnsl.so.1 (0x00000fff8d410000) 5.3 kiloBytes, that's more like it. Version-Release number of selected component (if applicable): 20120229-2 Additional info: Please refer to the rpm spec file attached for one of the ways (please pardon my personal spec file, it obviously is not up to the level of professional spec files for the Fedora project) to go about building ksh with shared ast libraries. The linking steps were taken directly from the makefile in the ast-ksh source tree. There is also a small patch attached as well, used by the spec file, for what appears to be an accidental omission of the -fPIC flag on three source file compilation rules in the file ksh93/Mamfile that would otherwise prevent you from creating the shared object file libshell.so successfully as it would complain these three object files cannot have relocatable code. Another note: only Debian seems to build the AT&T ksh in this manner of shared objects for libast these days, both Fedora and OpenSUSE build ksh using the default Mamfiles resulting in the huge ksh binary. Also wish AT&T research team would switch to using autoconf/automake/make rather than their build system...