From 08e94744bab64cb2f56ea939b9f77afab5d88528 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Mon, 23 Sep 2019 10:32:20 +0200 Subject: [PATCH 1/4] ltrace: Add version 0.7.3 ltrace intercepts and records dynamic library calls which are called by an executed process and the signals received by that process. It can also intercept and print the system calls executed by the program. http://www.ltrace.org/ buczek@theinternet:~/git/bee-files (add-ltrace)$ ltrace /bin/echo bla 2>&1 getenv("POSIXLY_CORRECT") = nil strrchr("/bin/echo", '/') = "/echo" setlocale(LC_ALL, "") = "LC_CTYPE=en_US.UTF-8;LC_NUMERIC="... bindtextdomain("coreutils", "/usr/share/locale") = "/usr/share/locale" textdomain("coreutils") = "coreutils" __cxa_atexit(0x401ce0, 0, 0, 0x736c6974756572) = 0 strcmp("bla", "--help") = 53 strcmp("bla", "--version") = 53 fputs_unlocked(0x7ffeb9e2ba79, 0x7f6db23d0760, 0, 45) = 1 __overflow(0x7f6db23d0760, 10, 0x609342, 0xfbad2a84bla) = 10 __fpending(0x7f6db23d0760, 0, 0x401ce0, 1) = 0 fileno(0x7f6db23d0760) = 1 __freading(0x7f6db23d0760, 0, 0x401ce0, 1) = 0 __freading(0x7f6db23d0760, 0, 2052, 1) = 0 fflush(0x7f6db23d0760) = 0 fclose(0x7f6db23d0760) = 0 __fpending(0x7f6db23d0680, 0, 0x7f6db23cb760, 2880) = 0 fileno(0x7f6db23d0680) = 2 __freading(0x7f6db23d0680, 0, 0x7f6db23cb760, 2880) = 0 __freading(0x7f6db23d0680, 0, 4, 2880) = 0 fflush(0x7f6db23d0680) = 0 fclose(0x7f6db23d0680) = 0 +++ exited (status 0) +++ buczek@theinternet:~/git/bee-files (add-ltrace)$ --- ltrace.be0 | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100755 ltrace.be0 diff --git a/ltrace.be0 b/ltrace.be0 new file mode 100755 index 000000000..fc8ba2668 --- /dev/null +++ b/ltrace.be0 @@ -0,0 +1,79 @@ +#!/usr/bin/env beesh + +# BEE_VERSION ltrace-0.7.3-0 + +## this file was created by bee init and should be executed to build a +## bee-package. (Additional hints are located at the end of this file.) + +############################################################################### +## The source URL(s) define the location of the sources that will be +## downloaded. Version variables may be used to simplify reuse of this bee-file. + +SRCURL[0]="https://www.ltrace.org/ltrace_${PKGVERSION}.orig.tar.bz2" + +############################################################################### +## Add URLs/pathes to patch files to the PATCHURL array. +## The sources will be patched in the order of the array. + +# PATCHURL+=() + +############################################################################### +## Uncomment the next statement, if the software may not be able to be built +## outside the source directory and needs to be built inside the source +## directory. + +# build_in_sourcedir + +############################################################################### +## bee cannot detect buildtypes specified in subdirectories. +## Sometimes packages "hide" the real sources in a subdirectory named +## 'src' or 'cmake' or .. +## use 'sourcesubdir_append' to specify this directory if known. + +# sourcesubdir_append src + + +############################################################################### +## Change the default (auto-detected) steps to +## extract, patch, configure/setup, build and install the software. +## Make sure the mee_install function does install everything to the +## image directory "${D}" + +#mee_extract() { +# bee_extract "${@}" +#} + +#mee_patch() { +# bee_patch "${@}" +#} + +#mee_configure() { +# bee_configure +#} + +#mee_build() { +# bee_build +#} + +#mee_install() { +# bee_install +#} +## by default this may be 'make install DESTDIR="${D}"' + +############################################################################### +## +## Additional hints: +## +## The name of this bee-file should follow the following naming convention: +## pkgname-pkgversion-pkgrevision.bee +## +## You may remove all comments as long as SRCURL[0] is set. +## +## Everything in this file will be executed in a bash environment. +## +## Build the package by executing +## './pkg-version-N.bee' or +## 'beesh ./pkg-version-N.bee' +## +## see http://beezinga.org/ +## From 05ae781b84e1a2044806f063224a7ce647bd13f9 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Mon, 23 Sep 2019 10:35:47 +0200 Subject: [PATCH 2/4] ltrace: Add -Wno-deprecated-declarations Add option to ignore the following issue: source/sysdeps/linux-gnu/proc.c:245:3: error: 'readdir_r' is deprecated [-Werror=deprecated-declarations] if (readdir_r(d, &entry, &result) != 0) { ^~ In file included from .../source/sysdeps/linux-gnu/proc.c:31:0: /usr/include/dirent.h:183:12: note: declared here extern int readdir_r (DIR *__restrict __dirp, ^~~~~~~~~ cc1: all warnings being treated as errors --- ltrace.be0 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ltrace.be0 b/ltrace.be0 index fc8ba2668..40f3ea3ab 100755 --- a/ltrace.be0 +++ b/ltrace.be0 @@ -51,9 +51,9 @@ SRCURL[0]="https://www.ltrace.org/ltrace_${PKGVERSION}.orig.tar.bz2" # bee_configure #} -#mee_build() { -# bee_build -#} +mee_build() { + bee_build CFLAGS='-Wno-deprecated-declarations' +} #mee_install() { # bee_install From ae3640d0cb901664769520f0ae7c41164071c38c Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Mon, 23 Sep 2019 10:41:08 +0200 Subject: [PATCH 3/4] ltrace: Add -Wno-bool-compare Add option to ignore the following issue: source/ltrace-elf.c: In function 'elf_read_u16': source/ltrace-elf.c:221:42: error: comparison of constant '0' with boolean expression is always false [-Werror=bool-compare] if (!need_data(data, offset, SIZE / 8) < 0) \ ^ source/ltrace-elf.c:238:1: note: in expansion of macro 'DEF_READER' DEF_READER(elf_read_u16, 16) ^~~~~~~~~~ cc1: all warnings being treated as errors --- ltrace.be0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ltrace.be0 b/ltrace.be0 index 40f3ea3ab..c6a761d78 100755 --- a/ltrace.be0 +++ b/ltrace.be0 @@ -52,7 +52,7 @@ SRCURL[0]="https://www.ltrace.org/ltrace_${PKGVERSION}.orig.tar.bz2" #} mee_build() { - bee_build CFLAGS='-Wno-deprecated-declarations' + bee_build CFLAGS='-Wno-deprecated-declarations -Wno-bool-compare' } #mee_install() { From ef665c0693a173de7b42588daaccbd07761dc3e3 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Mon, 23 Sep 2019 10:43:59 +0200 Subject: [PATCH 4/4] ltrace: Add -Wno-unused-local-typedefs Add option to ignore the following issue: source/value.c:287:15: error: typedef 'assert__long_enough_long' locally defined but not used [-Werror=unused-local-typedefs] typedef char assert__long_enough_long[-(sizeof(l) < sizeof(void *))]; ^~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors --- ltrace.be0 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ltrace.be0 b/ltrace.be0 index c6a761d78..b158d8d97 100755 --- a/ltrace.be0 +++ b/ltrace.be0 @@ -52,7 +52,8 @@ SRCURL[0]="https://www.ltrace.org/ltrace_${PKGVERSION}.orig.tar.bz2" #} mee_build() { - bee_build CFLAGS='-Wno-deprecated-declarations -Wno-bool-compare' + bee_build CFLAGS='-Wno-deprecated-declarations -Wno-bool-compare -Wno-logical-not-parentheses \ + -Wno-unused-local-typedefs' } #mee_install() {