Skip to content

Commit

Permalink
fix: do not build unneeded utilities and man for SELinux libraries
Browse files Browse the repository at this point in the history
Utilities end up on rootfs increasing size and binary count

Fixes #1067

Signed-off-by: Dmitry Sharshakov <[email protected]>
  • Loading branch information
dsseng committed Nov 11, 2024
1 parent b15a3d9 commit 567a14a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libselinux/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ steps:
patch -p1 < /pkg/patches/0001-libselinux-set-free-d-data-to-NULL.patch
build:
- |
make -j $(nproc) FTS_LDLIBS="-l:libfts.a -L/toolchain/lib"
make -j $(nproc) FTS_LDLIBS="-l:libfts.a -L/toolchain/lib" SUBDIRS="include src"
install:
- |
make install DESTDIR=/rootfs
make install DESTDIR=/rootfs SUBDIRS="include src"
finalize:
- from: /rootfs
to: /
31 changes: 31 additions & 0 deletions libsepol/patches/dont-build-utils.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/Makefile b/Makefile
index 5b5d03e2..5744d7a4 100644
--- a/Makefile
+++ b/Makefile
@@ -4,26 +4,21 @@ export DISABLE_CIL

all:
$(MAKE) -C src
- $(MAKE) -C utils

install:
$(MAKE) -C include install
$(MAKE) -C src install
- $(MAKE) -C utils install
- $(MAKE) -C man install

relabel:
$(MAKE) -C src relabel

clean:
$(MAKE) -C src clean
- $(MAKE) -C utils clean
$(MAKE) -C tests clean

indent:
$(MAKE) -C src $@
$(MAKE) -C include $@
- $(MAKE) -C utils $@

test:
$(MAKE) -C tests test
2 changes: 2 additions & 0 deletions libsepol/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ steps:
# TODO: remove upstream patches when updating to 3.8
patch -p1 < /pkg/patches/0001-libsepol-sepol_compute_sid-Do-not-destroy-uninitiali.patch
patch -p1 < /pkg/patches/0001-libsepol-cil-Check-that-sym_index-is-within-bounds.patch
# Do not build CLI utilities we do not use
patch -p1 < /pkg/patches/dont-build-utils.patch
build:
- |
make -j $(nproc)
Expand Down

0 comments on commit 567a14a

Please sign in to comment.