mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-12-25 14:36:33 +01:00
build: root -> share.
This commit is contained in:
parent
116272b8ad
commit
ebdeef152c
7 changed files with 6 additions and 5 deletions
7
Makefile
7
Makefile
|
@ -24,13 +24,14 @@ enforce: build
|
||||||
full: build
|
full: build
|
||||||
@./${BUILD}/prebuild --complain --full
|
@./${BUILD}/prebuild --complain --full
|
||||||
|
|
||||||
ROOT = $(shell find "${BUILD}/root" -type f -not -name "*.md" -printf "%P\n")
|
SHARE = $(shell find "${BUILD}/share" -type f -not -name "*.md" -printf "%P\n")
|
||||||
PROFILES = $(shell find "${BUILD}/apparmor.d" -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")
|
DISABLES = $(shell find "${BUILD}/apparmor.d" -type l -printf "%P\n")
|
||||||
install:
|
install:
|
||||||
|
@install -Dm0755 ${BUILD}/aa ${DESTDIR}/usr/bin/aa
|
||||||
@install -Dm0755 ${BUILD}/aa-log ${DESTDIR}/usr/bin/aa-log
|
@install -Dm0755 ${BUILD}/aa-log ${DESTDIR}/usr/bin/aa-log
|
||||||
@for file in ${ROOT}; do \
|
@for file in ${SHARE}; do \
|
||||||
install -Dm0644 "${BUILD}/root/$${file}" "${DESTDIR}/$${file}"; \
|
install -Dm0644 "${BUILD}/share/$${file}" "${DESTDIR}/usr/share/$${file}"; \
|
||||||
done;
|
done;
|
||||||
@for file in ${PROFILES}; do \
|
@for file in ${PROFILES}; do \
|
||||||
install -Dm0644 "${BUILD}/apparmor.d/$${file}" "${DESTDIR}/etc/apparmor.d/$${file}"; \
|
install -Dm0644 "${BUILD}/apparmor.d/$${file}" "${DESTDIR}/etc/apparmor.d/$${file}"; \
|
||||||
|
|
|
@ -27,14 +27,14 @@ func init() {
|
||||||
|
|
||||||
func (p Synchronise) Apply() ([]string, error) {
|
func (p Synchronise) Apply() ([]string, error) {
|
||||||
res := []string{}
|
res := []string{}
|
||||||
dirs := paths.PathList{prebuild.RootApparmord, prebuild.Root.Join("root"), prebuild.Root.Join("systemd")}
|
dirs := paths.PathList{prebuild.RootApparmord, prebuild.Root.Join("share"), prebuild.Root.Join("systemd")}
|
||||||
for _, dir := range dirs {
|
for _, dir := range dirs {
|
||||||
if err := dir.RemoveAll(); err != nil {
|
if err := dir.RemoveAll(); err != nil {
|
||||||
return res, err
|
return res, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if p.Path == "" {
|
if p.Path == "" {
|
||||||
for _, name := range []string{"apparmor.d", "root"} {
|
for _, name := range []string{"apparmor.d", "share"} {
|
||||||
if err := util.CopyTo(paths.New(name), prebuild.Root.Join(name)); err != nil {
|
if err := util.CopyTo(paths.New(name), prebuild.Root.Join(name)); err != nil {
|
||||||
return res, err
|
return res, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue