-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use 4.19.1 brp-strip with xargs parallel processing and filtering
From: https://github.com/rpm-software-management/rpm/blob/rpm-4.19.1-release/scripts/brp-strip Added js, rb files to the go filtering in upstream version Curl brp-strip 4.19.1 and patch it at image build time
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
container-assets/Add-js-rb-filtering-on-top-of-4.19.1.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
From 7d0f0d9c34a934327cfdd68e721c250af39a5c13 Mon Sep 17 00:00:00 2001 | ||
From: Joe Rafaniello <[email protected]> | ||
Date: Tue, 9 Jan 2024 15:00:25 -0500 | ||
Subject: [PATCH] Add js/rb filtering on top of 4.19.1 | ||
|
||
--- | ||
scripts/brp-strip | 3 +++ | ||
1 file changed, 3 insertions(+) | ||
|
||
diff --git a/scripts/brp-strip b/scripts/brp-strip | ||
index 799bf2bc2..b258debc8 100755 | ||
--- a/scripts/brp-strip | ||
+++ b/scripts/brp-strip | ||
@@ -20,6 +20,7 @@ esac | ||
|
||
# Below is the explanation of commands in the order of their appearance | ||
# Ignore /usr/lib/debug entries | ||
+# Ignore all js and rb javascript and ruby files | ||
# Ignore all go(guile objects & golang) files | ||
# Consider files with only single link | ||
# Run the file command to find relevant non-stripped binaries, with bundle size of 32 | ||
@@ -33,6 +34,8 @@ strip_elf_binaries() | ||
|
||
find "$RPM_BUILD_ROOT" -type f \ | ||
! -regex "${RPM_BUILD_ROOT}/*usr/lib/debug.*" \ | ||
+ ! -name "*.js" \ | ||
+ ! -name "*.rb" \ | ||
! -name "*.go" -links "${nlinks}" -print0 | \ | ||
xargs -0 -r -P${nprocs} -n${MAX_ARGS} sh -c "file \"\$@\" | \ | ||
sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped.*/\1/p' | \ | ||
-- | ||
2.42.0 | ||
|