For building crash extension modules, we need something like a crash-devel rpm, containing whatever header files are customarily used for this. One user for this would be systemtap. In the absence of this, we might have to do a hack like that outlined in <http://sourceware.org/ml/systemtap/2007-q2/msg00373.html>, where a full crash source tree is referenced during the build of an extension.
Crash extensions only require one file, "defs.h", from the crash utility's src.rpm. Hardly seems worth the effort of creating a whole new package just for one file?
The effort involved is pretty small. How else should the correct defs.h file be used by extension authors? Copied from some random old version?
I was thinking maybe just including it in the packages %files list, which currently looks like this: %files %defattr(-,root,root) /usr/bin/crash %{_mandir}/man8/crash.8* %doc README The "defs.h" file could be added to the /usr/share/doc/crash-x.y directory along with the README file.
To be honest with you, whatever's in Fedora hasn't been touched in ages, and I don't keep it up to date... I'm not an RPM-o-phile, but do you off-hand know of any user packages that I can emulate (read: copy) such a -devel package?
> To be honest with you, whatever's in Fedora hasn't been touched in ages, > and I don't keep it up to date... Don't worry, your secret is safe with me. > I'm not an RPM-o-phile, but do you off-hand know of any user packages > that I can emulate (read: copy) such a -devel package? No problem. See for example gpm.spec. One additional "%package", "%description", and "%files" clause. Or see how systemtap.spec includes the "-runtime" subpackage.
Ok, sounds reasonable -- thanks!
crash-devel package prototype created with a patched crash.spec file: $ diff crash/RHEL-5/crash.spec crash.spec 24a25,35 > %package devel > Requires: %{name} = %{version} > Summary: crash utility for live systems; netdump, diskdump, kdump, LKCD or mcore dumpfiles > Group: Development/Debuggers > > %description devel > The core analysis suite is a self-contained tool that can be used to > investigate either live systems, kernel core dumps created from the > netdump, diskdump and kdump packages from Red Hat Linux, the mcore kernel patch > offered by Mission Critical Linux, or the LKCD kernel patch. > 37a49,51 > mkdir -p %{buildroot}%{_includedir}/crash > chmod 0644 defs.h > cp defs.h %{buildroot}%{_includedir}/crash 47a62,65 > %files devel > %defattr(-,root,root) > %{_includedir}/* >
The crash-devel package gets built from the src.rpm in today's upstream 4.0-4.2 crash utility release: From: http://people.redhat.com/anderson/crash.changelog.html - The crash-4.0-4.2.src.rpm package will create an additional package named crash-devel-4.0-4.2.i386.rpm, which is for use by extension modules. The -devel package installs the top-level "defs.h" file in "/usr/include/crash/defs.h". (anderson) In addition, I've added the capability for a crash extension to register a command with the CLEANUP flag. If that flag is set in a command_table_entry's flag member, the command will not show up in the help menu, but will be called prior to the display of each "crash>" prompt: - Implement support for the registration of CLEANUP extension commands that do not show up in help menu, but get called by restore_sanity(). Extension modules may also register HIDDEN_COMMAND functions; and the "help -e" debug output has been enhanced. (anderson) And a new primitive has been added to get the address of a module-specific symbol without needing to worry about a name-space collision with the base kernel or other module: - Implemented a new symbol_value_module() primitive, primarily for use by extension modules to quickly access the address of a module symbol in cases where a name-clash may exist between the base kernel and/or other modules. (anderson) All of the above will be included in the RHEL5-1 crash update.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
When filing the crash utility errata for RHEL5-1, it "found" the crash-devel packages. But they are not included in the file list, and I don't know what supposed to be done to achieve this step.
Sent the following request to release-engineering, returned as ticket: [engineering.redhat.com #13977] With respect to RHEL-5.1 errata RHBA-2007:0553: RHBA-2007:0553 - crash bug fix update http://errata.devel.redhat.com/errata/erratainfo.cgi?advisory=5653 One of the approved bugzillas (241045) requires the addition of a new "crash-devel" subpackage to the crash utility package. When performing the "Update Brew Builds" step, upon entering the following list: crash-4.0-4.3.1 crash-debuginfo-4.0-4.3.1 crash-devel-4.0-4.3.1 and clicking "Find New Brew Builds", all packages are found, including the new "crash-devel" packages: Updated Builds RHEL-5 has new builds Found Build# 62706 crash-4.0-4.3.1 with tag dist-5E-qu-candidate. RPMS in build: crash-4.0-4.3.1.ia64.rpm crash-4.0-4.3.1.s390x.rpm crash-4.0-4.3.1.i386.rpm crash-4.0-4.3.1.ppc64.rpm crash-4.0-4.3.1.x86_64.rpm crash-4.0-4.3.1.s390.rpm crash-4.0-4.3.1.src.rpm crash-debuginfo-4.0-4.3.1.ia64.rpm crash-debuginfo-4.0-4.3.1.s390x.rpm crash-debuginfo-4.0-4.3.1.i386.rpm crash-debuginfo-4.0-4.3.1.ppc64.rpm crash-debuginfo-4.0-4.3.1.x86_64.rpm crash-debuginfo-4.0-4.3.1.s390.rpm crash-devel-4.0-4.3.1.ia64.rpm crash-devel-4.0-4.3.1.s390x.rpm crash-devel-4.0-4.3.1.i386.rpm crash-devel-4.0-4.3.1.ppc64.rpm crash-devel-4.0-4.3.1.x86_64.rpm crash-devel-4.0-4.3.1.s390.rpm However, the file list that gets saved does not include the crash-devel packages, presumably because there's some other previously-existing list/mechanism that that doesn't know anything about the new crash-devel package. Also, there is this bugzilla: Bugzilla Bug 245992: need new crash-devel package https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=245992 Ben Levenson set these flags in that bugzilla: exception: ? rhel-5.1.0: ? pm_ack: ? devel_ack: ? qa_ack: + What needs to be done to move this procedure along? Dave Anderson
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2007-0553.html