From 5989f030f935da197eb128a3c48530417153632e Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Tue, 5 Mar 2024 17:42:42 +0100 Subject: [PATCH] Simplify build instructions by providing a Makefile This creates a gitignore file to deal with generated files. The Makefile replaces the manual instructions and makes sure CI and user instructions are in sync. It even allows for parallel builds, even though the building is already super fast. --- .github/workflows/tests.yml | 4 +--- .gitignore | 5 +++++ Makefile | 6 +++++- staging_docs/admin/index.md | 5 +---- 4 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 .gitignore diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0e5e4b6..63576e1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,6 +20,4 @@ jobs: run: yum install -y selinux-policy-devel policycoreutils - name: Build policies run: | - make -f /usr/share/selinux/devel/Makefile pulpcore_port.pp - make -f /usr/share/selinux/devel/Makefile pulpcore.pp - make -f /usr/share/selinux/devel/Makefile pulpcore_rhsmcertd.pp + make build diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5c1baa9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.pp +pulpcore_port.fc +pulpcore_port.if +pulpcore_rhsmcertd.fc +pulpcore_rhsmcertd.if diff --git a/Makefile b/Makefile index 26161df..5b838fb 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +include /usr/share/selinux/devel/Makefile + +build: pulpcore_port.pp pulpcore.pp pulpcore_rhsmcertd.pp ## Build SELinux policies + help: ## Show this help. @sed -ne '/@sed/!s/## //p' $(MAKEFILE_LIST) @@ -7,4 +11,4 @@ docs: ## Build unified docs. servedocs: ## Serves unified docs. pulp-docs serve -.PHONY: docs servedocs help +.PHONY: build docs servedocs help diff --git a/staging_docs/admin/index.md b/staging_docs/admin/index.md index a640b55..917ecb6 100644 --- a/staging_docs/admin/index.md +++ b/staging_docs/admin/index.md @@ -10,10 +10,7 @@ The SELinux policy for Pulp 3.Y releases. sudo yum install -y selinux-policy-devel policycoreutils git clone https://github.com/pulp/pulpcore-selinux cd pulpcore-selinux - -make -f /usr/share/selinux/devel/Makefile pulpcore_port.pp -make -f /usr/share/selinux/devel/Makefile pulpcore.pp -make -f /usr/share/selinux/devel/Makefile pulpcore_rhsmcertd.pp +make build ``` ### Installing