Skip to content

Commit f31d518

Browse files
committed
fix: clean up some binaries
Clean up binaries that either don't work on Talos (as they are shell scripts), or are not needed (e.g. `openssl`, `getcap`, etc.) Fixes #1226 Signed-off-by: Andrey Smirnov <[email protected]>
1 parent 0f74b9b commit f31d518

File tree

6 files changed

+20
-0
lines changed

6 files changed

+20
-0
lines changed

iptables/pkg.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ steps:
3232
install:
3333
- |
3434
make install DESTDIR=/rootfs
35+
- |
36+
# remove all shell scripts
37+
find /rootfs/usr/bin -type f -perm /111 -exec grep -slIE '^#!' {} + | tee /dev/stderr | xargs rm
3538
- |
3639
# fix up symlinks which point to legacy version to point to nft version
3740
for f in /rootfs/usr/bin/*; do

libattr/pkg.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ steps:
3838
make install DESTDIR=/rootfs
3939
4040
rm -rf /rootfs/share
41+
- |
42+
# remove all binaries
43+
rm -r /rootfs/usr/bin
4144
test:
4245
- |
4346
fhs-validator /rootfs

libcap2/pkg.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ dependencies:
66
- image: "{{ .TOOLS_PREFIX }}tools-libcap:{{ .TOOLS_REV }}"
77
to: /rootfs
88
steps:
9+
- install:
10+
- |
11+
# remove all binaries
12+
rm -r /rootfs/usr/bin
913
- test:
1014
- |
1115
fhs-validator /rootfs

lvm2/pkg.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ steps:
5656
rm -r /rootfs/usr/share
5757
# LVM activation is handled by Talos itself
5858
rm -f /rootfs/usr/lib/udev/rules.d/69-dm-lvm.rules
59+
- |
60+
# remove all shell scripts
61+
find /rootfs/usr/bin -type f -perm /111 -exec grep -slIE '^#!' {} + | tee /dev/stderr | xargs rm
5962
test:
6063
- |
6164
fhs-validator /rootfs

openssl/pkg.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ dependencies:
66
- image: "{{ .TOOLS_PREFIX }}tools-openssl:{{ .TOOLS_REV }}"
77
to: /rootfs
88
steps:
9+
- install:
10+
- |
11+
# remove all binaries
12+
rm -r /rootfs/usr/bin
913
- test:
1014
- |
1115
fhs-validator /rootfs

xfsprogs/pkg.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ steps:
3333
make install DESTDIR=/rootfs
3434
rm -rf /rootfs/usr/share/man
3535
rm -rf /rootfs/usr/share/doc
36+
- |
37+
# remove all shell scripts
38+
find /rootfs/usr/bin -type f -perm /111 -exec grep -slIE '^#!' {} + | tee /dev/stderr | xargs rm
3639
test:
3740
- |
3841
fhs-validator /rootfs

0 commit comments

Comments
 (0)