From: Michael Tremer Date: Wed, 19 Jul 2023 10:16:54 +0000 (+0000) Subject: build: Remove BUILDROOT check X-Git-Tag: 0.9.29~98 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1443b80e6d66c58db13c0f5fdce580efe457828;p=pakfire.git build: Remove BUILDROOT check This searched for any references to BUILDROOT in any generated files. However, this is hard to implement without using the nested function which unfortunately requires an executable stack which is not permitted in IPFire. Since the check is usually not having a massive impact, this patch removes it for now with the intention to bring it back at a later time. Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/build.c b/src/libpakfire/build.c index 963149e21..28c6ad796 100644 --- a/src/libpakfire/build.c +++ b/src/libpakfire/build.c @@ -1174,42 +1174,6 @@ static int pakfire_build_post_check_broken_symlinks( PAKFIRE_BUILD_ERROR_IF_NOT_EMPTY); } -/* - BUILDROOT Check -*/ -static int pakfire_build_post_check_buildroot( - struct pakfire_build* build, struct pakfire_filelist* filelist) { - const char* buildroot = pakfire_relpath(build->pakfire, build->buildroot); - - // Nested function to keep a reference to buildroot - int __pakfire_build_post_check_buildroot( - struct pakfire* pakfire, struct pakfire_file* file, void* data) { - struct pakfire_filelist* matches = (struct pakfire_filelist*)data; - int r; - - // Fetch the path - const char* path = pakfire_file_get_path(file); - if (!path) - return 1; - - // Do not run this for Python bytecode files - if (pakfire_path_match("**.pyc", path)) - return 0; - - if (pakfire_file_payload_matches(file, buildroot, strlen(buildroot))) { - r = pakfire_filelist_add(matches, file); - if (r) - return r; - } - - return 0; - } - - return pakfire_build_post_process_files( - build, filelist, "Files containing BUILDROOT:", - __pakfire_build_post_check_buildroot, PAKFIRE_BUILD_ERROR_IF_NOT_EMPTY); -} - /* File Issues */ @@ -1285,11 +1249,6 @@ static int pakfire_build_run_post_build_checks(struct pakfire_build* build) { if (r) goto ERROR; - // Check for BUILDROOT - r = pakfire_build_post_check_buildroot(build, filelist); - if (r) - goto ERROR; - // Check files r = pakfire_build_post_check_files(build, filelist); if (r)