build: use the same technique to disable upstream profile on all distribution.
Only enabled on Ubuntu & opensuse
This commit is contained in:
parent
c40c3e1c98
commit
34973baaea
6 changed files with 45 additions and 95 deletions
7
Makefile
7
Makefile
|
|
@ -12,7 +12,7 @@ P = $(filter-out dpkg,$(notdir $(wildcard ${BUILD}/apparmor.d/*)))
|
|||
.PHONY: all build enforce full install local $(P) pkg dpkg rpm tests lint clean
|
||||
|
||||
all: build
|
||||
@./${BUILD}/prebuild --complain
|
||||
@./${BUILD}/prebuild --complain
|
||||
|
||||
build:
|
||||
@go build -o ${BUILD}/ ./cmd/aa-log
|
||||
|
|
@ -26,6 +26,7 @@ full: build
|
|||
|
||||
ROOT = $(shell find "${BUILD}/root" -type f -printf "%P\n")
|
||||
PROFILES = $(shell find "${BUILD}/apparmor.d" -type f -printf "%P\n")
|
||||
DISABLES = $(shell find "${BUILD}/apparmor.d" -type l -printf "%P\n")
|
||||
install:
|
||||
@install -Dm0755 ${BUILD}/aa-log ${DESTDIR}/usr/bin/aa-log
|
||||
@for file in ${ROOT}; do \
|
||||
|
|
@ -34,6 +35,10 @@ install:
|
|||
@for file in ${PROFILES}; do \
|
||||
install -Dm0644 "${BUILD}/apparmor.d/$${file}" "${DESTDIR}/etc/apparmor.d/$${file}"; \
|
||||
done;
|
||||
@for file in ${DISABLES}; do \
|
||||
mkdir -p "${DESTDIR}/etc/apparmor.d/disable"; \
|
||||
cp -d "${BUILD}/apparmor.d/$${file}" "${DESTDIR}/etc/apparmor.d/$${file}"; \
|
||||
done;
|
||||
@for file in ${BUILD}/systemd/system/*; do \
|
||||
service="$$(basename "$$file")"; \
|
||||
install -Dm0644 "$${file}" "${DESTDIR}/usr/lib/systemd/system/$${service}.d/apparmor.conf"; \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue