### Typical procps Installation Source: https://gitlab.com/procps-ng/procps/-/blob/master/INSTALL.md Standard commands to build and install procps from source. Ensure you have a configure script or run autogen.sh first. ```bash ./autogen.sh ./configure make make install ``` -------------------------------- ### procps-ng Buildroot Makefile Source: https://gitlab.com/procps-ng/procps/-/blob/master/doc/howto-uClibc-buildroot-compilation.txt This Makefile snippet defines how to build and install the procps-ng package in Buildroot. ```diff --- /dev/null +++ b/package/procps-ng/procps-ng.mk @@ -0,0 +1,24 @@ +############################################################# +# +# procps-ng +# +############################################################# + +PROCPS_NG_VERSION = 8c15d52bfddb582e5a43ce72f3d5d2d98f03b613 +PROCPS_NG_SITE = git://gitorious.org/procps/procps.git +UTIL_LINUX_AUTORECONF = YES + +PROCPS_NG_DEPENDENCIES = ncurses + +define PROCPS_NG_AUTOGEN + AM_OPTS='--copy' $(@D)/autogen.sh +endef + +PROCPS_NG_POST_PATCH_HOOKS += PROCPS_NG_AUTOGEN + +define PROCPS_NG_UNINSTALL_TARGET_CMDS + $(MAKE) DESTDIR=$(TARGET_DIR) uninstall -C $(FILE_DIR) +endef + +$(eval $(call AUTOTARGETS)) +$(eval $(call AUTOTARGETS,host)) ``` -------------------------------- ### Running procps Tests Source: https://gitlab.com/procps-ng/procps/-/blob/master/INSTALL.md Command to execute the test suite for procps. Requires DejaGNU to be installed. ```bash make check ``` -------------------------------- ### Get Latest Translations Source: https://gitlab.com/procps-ng/procps/-/blob/master/doc/translations.md Synchronizes the latest translated .po files for both programs and man pages using rsync. ```bash make get-trans ``` -------------------------------- ### Create Translation Templates Source: https://gitlab.com/procps-ng/procps/-/blob/master/doc/translations.md Generates the .pot files used as a base for translators. These should be sent to the tp-coordinator before release. ```bash make -C po-man translate-templates ``` -------------------------------- ### Add procps-ng to Buildroot Configuration Source: https://gitlab.com/procps-ng/procps/-/blob/master/doc/howto-uClibc-buildroot-compilation.txt This snippet shows how to include the procps-ng package configuration in the main Buildroot configuration file. ```diff --- a/package/Config.in +++ b/package/Config.in @@ -583,6 +583,7 @@ source "package/kmod/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/module-init-tools/Config.in" +source "package/procps-ng/Config.in" source "package/psmisc/Config.in" source "package/rsyslog/Config.in" source "package/sysklogd/Config.in" ``` -------------------------------- ### Capturing strace Output Source: https://gitlab.com/procps-ng/procps/-/blob/master/doc/bugs.md Use `strace` to trace system calls and `bzip2` to compress the output. This is helpful for understanding program behavior and diagnosing issues. ```bash strace -o output-file ps --blah ``` ```bash bzip2 output-file ``` -------------------------------- ### procps-ng Package Configuration Source: https://gitlab.com/procps-ng/procps/-/blob/master/doc/howto-uClibc-buildroot-compilation.txt Defines the configuration options for the procps-ng package within Buildroot. ```diff --- /dev/null +++ b/package/procps-ng/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PROCPS_NG + bool "procps-ng" + select BR2_PACKAGE_NCURSES + help + Standard informational utilities and process-handling tools. + Provides things like kill, ps, uptime, free, top, etc... + + https://gitorious.org/procps ``` -------------------------------- ### Running a Program with GDB Source: https://gitlab.com/procps-ng/procps/-/blob/master/doc/bugs.md Use the GNU Debugger (GDB) to run a program and capture a stack trace. This is essential for diagnosing crashes. ```bash gdb prog ``` ```bash run ``` ```bash bt ``` -------------------------------- ### Cloning the procps-ng Repository Source: https://gitlab.com/procps-ng/procps/-/blob/master/doc/bugs.md Clone the procps-ng project from GitLab using SSH. This is the first step for contributing patches. ```bash git clone git@gitlab.com:procps-ng/procps.git ``` -------------------------------- ### Translate Man Pages Source: https://gitlab.com/procps-ng/procps/-/blob/master/doc/translations.md Generates translated man pages by combining original man pages with relevant .po files. This command is also invoked during the dist-hook. ```bash make -C po-man translate-mans ``` -------------------------------- ### Generating a Git Patch Source: https://gitlab.com/procps-ng/procps/-/blob/master/doc/bugs.md Use `git format-patch` to create patches from your commits. This is a standard way to submit code changes. ```bash git request-pull commit-id \\ git://gitorious.org/~yourlogin/procps/your-clone.git ``` -------------------------------- ### Conditional Patching Based on Kernel Version Source: https://gitlab.com/procps-ng/procps/-/blob/master/doc/bugs.md Use the `linux_version_code` variable to conditionally apply patches based on the running kernel version. This ensures compatibility across different kernel releases. ```c if (linux_version_code < LINUX_VERSION(2,5,41)) /* blah blah blah */ ``` -------------------------------- ### Compiling with Debug Symbols Source: https://gitlab.com/procps-ng/procps/-/blob/master/doc/bugs.md Recompile the program with debug symbols and optimization disabled for better debugging. This is useful when a program crashes and you need to generate a stack trace. ```bash make CFLAGS="-ggdb -O" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.