Skip to content

Commit

Permalink
added support for the 'crash' package (optional build time arg) inclu…
Browse files Browse the repository at this point in the history
…ding the 'pykdump' extension
  • Loading branch information
msmith626 committed Nov 1, 2024
1 parent 51399ed commit 4a7c42f
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHECKSUM.MD5
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ b2d97e20db9b81b460ce1b9dad5bf54e freeipmi-1.6.3.tar.gz
fbfdaebbbc6d7e5fbbf6ffdb3e139573 libgcrypt-1.8.4.tar.bz2
eff437f397e858a9127b76c0d87fa5ed libgpg-error-1.36.tar.bz2
c044b7146903ec51c9d2337a29aee93b gdb-10.2.tar.xz
b1976b20980a179572bd4d709cc5f209 crash-8.0.5.tar.gz
65e102d47c672fb5d95a1578006631f9 pykdump-master_20241031.tar.xz
46e5fbdcbc3502a5976a317a0860a975 valgrind-3.15.0.tar.bz2
8c7c4866beeecf3a964934cc6e5d49c9 strace-5.1.tar.xz
178d31a6ff5256c093227ab45a3f52aa smartmontools-7.4.tar.gz
Expand Down
2 changes: 2 additions & 0 deletions CHECKSUM.SHA256
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ aad4e735a7ac4a1f8ade20caadb35dfefc2a352fa2ef41d3f6e589179917e1e9 freeipmi-1.6.3
f638143a0672628fde0cad745e9b14deb85dffb175709cacc1f4fe24b93f2227 libgcrypt-1.8.4.tar.bz2
babd98437208c163175c29453f8681094bcaf92968a15cafb1a276076b33c97c libgpg-error-1.36.tar.bz2
aaa1223d534c9b700a8bec952d9748ee1977513f178727e1bee520ee000b4f29 gdb-10.2.tar.xz
b3ec57a844706ef044b607ba67bc5ef62d9deef8aec3fb2d7ea4f77dff24f1ef crash-8.0.5.tar.gz
05825cd285b914156ada809419811635d4a6a0615de04624ff02b2f73da3164e pykdump-master_20241031.tar.xz
417c7a9da8f60dd05698b3a7bc6002e4ef996f14c13f0ff96679a16873e78ab1 valgrind-3.15.0.tar.bz2
f5a341b97d7da88ee3760626872a4899bf23cf8dee56901f114be5b1837a9a8b strace-5.1.tar.xz
e9a61f641ff96ca95319edfb17948cd297d0cd3342736b2c49c99d4716fb993d smartmontools-7.4.tar.gz
Expand Down
34 changes: 34 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ MOUNTPOINT := @mountpoint@

enable_debug := @enable_debug@
enable_gdb := @enable_gdb@
enable_crash := @enable_crash@
enable_valgrind := @enable_valgrind@
enable_strace := @enable_strace@
enable_nginx := @enable_nginx@
Expand Down Expand Up @@ -452,6 +453,12 @@ ifeq ($(enable_gdb),yes)
dist_files += $(addprefix $(DIST_FILES_DIR)/,gdb-10.2.tar.xz)
chroot_tgts += gdb.chroot
endif
ifeq ($(enable_crash),yes)
dist_files += $(addprefix $(DIST_FILES_DIR)/,crash-8.0.5.tar.gz)
dist_files += $(addprefix $(DIST_FILES_DIR)/,pykdump-master_20241031.tar.xz)
chroot_tgts += crash.chroot
chroot_tgts += pykdump.chroot
endif
ifeq ($(enable_valgrind),yes)
dist_files += $(addprefix $(DIST_FILES_DIR)/,valgrind-3.15.0.tar.bz2)
chroot_tgts += valgrind.chroot
Expand Down Expand Up @@ -2104,6 +2111,33 @@ gdb.chroot: glibc.chroot ncurses.chroot zlib.chroot readline.chroot \
$(TOUCH) $(@)
$(QUIET) $(ECHO) "### Done $(@)"

crash.chroot: glibc.chroot ncurses.chroot zlib.chroot readline.chroot \
Python.chroot
$(QUIET) $(ECHO) "### Building $(@)"
$(call chroot_only)
$(MAKE) --directory=$(tgt_src_dir)
$(MAKE) --directory=$(tgt_src_dir) install
$(TOUCH) $(@)
$(QUIET) $(ECHO) "### Done $(@)"

pykdump.chroot: crash_src = $(wildcard /sources/crash-*)
pykdump.chroot: python_src = $(wildcard /sources/Python-*)
pykdump.chroot: crash.chroot Python.chroot
$(QUIET) $(ECHO) "### Building $(@)"
$(call chroot_only)
- $(MAKE) --directory=$(python_src) distclean
cd $(python_src) && ./configure CFLAGS=-fPIC --disable-shared
$(CP) $(tgt_src_dir)/Extension/Setup.local-3.9 \
$(python_src)/Modules/Setup.local
$(MAKE) --directory=$(python_src)
cd $(tgt_src_dir)/Extension && ./configure \
-p $(python_src) -c $(crash_src)
$(MAKE) --jobs=1 --directory=$(tgt_src_dir)/Extension
$(INSTALL) -D -m 0755 $(tgt_src_dir)/Extension/mpykdump.so \
/usr/lib/crash/extensions/mpykdump.so
$(TOUCH) $(@)
$(QUIET) $(ECHO) "### Done $(@)"

valgrind.chroot: glibc.chroot
$(QUIET) $(ECHO) "### Building $(@)"
$(call chroot_only)
Expand Down
10 changes: 10 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,16 @@ AS_IF([test "x$enable_gdb" = "xyes"],
AC_SUBST(enable_gdb, ${enable_gdb})
AC_MSG_NOTICE([gdb: ${enable_gdb}])

dnl Optional feature crash
AC_ARG_ENABLE(crash,
AS_HELP_STRING([--enable-crash], [build and include crash]),
AS_IF([test "x${enableval}" = "xyes" || test "x${enableval}" = "xno"],
[enable_crash="${enableval}"], [enable_crash="no"]), enable_crash="no")
AS_IF([test "x$enable_crash" = "xyes"],
[build_opts="${build_opts} crash"; opt_suffix="${opt_suffix}k"])
AC_SUBST(enable_crash, ${enable_crash})
AC_MSG_NOTICE([crash: ${enable_crash}])

dnl Optional feature valgrind
AC_ARG_ENABLE(valgrind,
AS_HELP_STRING([--enable-valgrind], [build and include valgrind]),
Expand Down

0 comments on commit 4a7c42f

Please sign in to comment.