From 00be13634a886c94a1550324cadecba51a487cb8 Mon Sep 17 00:00:00 2001 From: Stephen Smalley Date: Mon, 31 Oct 2016 13:09:09 -0400 Subject: [PATCH] Move policycoreutils/restorecond to restorecond. Signed-off-by: Stephen Smalley --- .gitignore | 1 + Makefile | 6 ++++++ policycoreutils/.gitignore | 1 - policycoreutils/Makefile | 6 ------ {policycoreutils/restorecond => restorecond}/Makefile | 6 ++++-- .../org.selinux.Restorecond.service | 0 {policycoreutils/restorecond => restorecond}/restorecond.8 | 0 {policycoreutils/restorecond => restorecond}/restorecond.c | 2 +- .../restorecond => restorecond}/restorecond.conf | 0 .../restorecond => restorecond}/restorecond.desktop | 0 {policycoreutils/restorecond => restorecond}/restorecond.h | 0 .../restorecond => restorecond}/restorecond.init | 0 .../restorecond => restorecond}/restorecond.service | 0 .../restorecond => restorecond}/restorecond_user.conf | 0 {policycoreutils/restorecond => restorecond}/stringslist.c | 0 {policycoreutils/restorecond => restorecond}/stringslist.h | 0 {policycoreutils/restorecond => restorecond}/user.c | 0 {policycoreutils/restorecond => restorecond}/utmpwatcher.c | 0 {policycoreutils/restorecond => restorecond}/utmpwatcher.h | 0 {policycoreutils/restorecond => restorecond}/watch.c | 0 20 files changed, 12 insertions(+), 10 deletions(-) rename {policycoreutils/restorecond => restorecond}/Makefile (89%) rename {policycoreutils/restorecond => restorecond}/org.selinux.Restorecond.service (100%) rename {policycoreutils/restorecond => restorecond}/restorecond.8 (100%) rename {policycoreutils/restorecond => restorecond}/restorecond.c (99%) rename {policycoreutils/restorecond => restorecond}/restorecond.conf (100%) rename {policycoreutils/restorecond => restorecond}/restorecond.desktop (100%) rename {policycoreutils/restorecond => restorecond}/restorecond.h (100%) rename {policycoreutils/restorecond => restorecond}/restorecond.init (100%) rename {policycoreutils/restorecond => restorecond}/restorecond.service (100%) rename {policycoreutils/restorecond => restorecond}/restorecond_user.conf (100%) rename {policycoreutils/restorecond => restorecond}/stringslist.c (100%) rename {policycoreutils/restorecond => restorecond}/stringslist.h (100%) rename {policycoreutils/restorecond => restorecond}/user.c (100%) rename {policycoreutils/restorecond => restorecond}/utmpwatcher.c (100%) rename {policycoreutils/restorecond => restorecond}/utmpwatcher.h (100%) rename {policycoreutils/restorecond => restorecond}/watch.c (100%) diff --git a/.gitignore b/.gitignore index 7b5c52b6..265cd23a 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ cscope.* .*.swp # Failsafes !.gitignore +restorecond/restorecond diff --git a/Makefile b/Makefile index 7ebe36e4..ed1e3b29 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,12 @@ SUBDIRS=libsepol libselinux libsemanage sepolgen checkpolicy secilc policycoreut PYSUBDIRS=libselinux libsemanage DISTCLEANSUBDIRS=libselinux libsemanage +INOTIFYH = $(shell ls /usr/include/sys/inotify.h 2>/dev/null) + +ifeq (${INOTIFYH}, /usr/include/sys/inotify.h) + SUBDIRS += restorecond +endif + ifeq ($(DEBUG),1) export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror export LDFLAGS = -g diff --git a/policycoreutils/.gitignore b/policycoreutils/.gitignore index 53d5d558..6869d85d 100644 --- a/policycoreutils/.gitignore +++ b/policycoreutils/.gitignore @@ -1,6 +1,5 @@ load_policy/load_policy newrole/newrole -restorecond/restorecond run_init/open_init_pty run_init/run_init secon/secon diff --git a/policycoreutils/Makefile b/policycoreutils/Makefile index c9cccb8a..1d07125e 100644 --- a/policycoreutils/Makefile +++ b/policycoreutils/Makefile @@ -1,11 +1,5 @@ SUBDIRS = sepolicy setfiles semanage load_policy newrole run_init sandbox secon audit2allow sestatus semodule_package semodule semodule_link semodule_expand semodule_deps sepolgen-ifgen setsebool scripts po man hll -INOTIFYH = $(shell ls /usr/include/sys/inotify.h 2>/dev/null) - -ifeq (${INOTIFYH}, /usr/include/sys/inotify.h) - SUBDIRS += restorecond -endif - all install relabel clean indent: @for subdir in $(SUBDIRS); do \ (cd $$subdir && $(MAKE) $@) || exit 1; \ diff --git a/policycoreutils/restorecond/Makefile b/restorecond/Makefile similarity index 89% rename from policycoreutils/restorecond/Makefile rename to restorecond/Makefile index 93050f00..7a517171 100644 --- a/policycoreutils/restorecond/Makefile +++ b/restorecond/Makefile @@ -16,8 +16,10 @@ SELINUXDIR = $(DESTDIR)/etc/selinux DBUSFLAGS = -DHAVE_DBUS $(shell $(PKG_CONFIG) --cflags dbus-glib-1) DBUSLIB = $(shell $(PKG_CONFIG) --libs dbus-glib-1) +SETFILESDIR ?= ../policycoreutils/setfiles + CFLAGS ?= -g -Werror -Wall -W -override CFLAGS += -I$(PREFIX)/include $(DBUSFLAGS) +override CFLAGS += -I$(PREFIX)/include $(DBUSFLAGS) -I$(SETFILESDIR) USE_PCRE2 ?= n ifeq ($(USE_PCRE2),y) @@ -32,7 +34,7 @@ all: restorecond restorecond.o utmpwatcher.o stringslist.o user.o watch.o: restorecond.h -restorecond: ../setfiles/restore.o restorecond.o utmpwatcher.o stringslist.o user.o watch.o +restorecond: $(SETFILESDIR)/restore.o restorecond.o utmpwatcher.o stringslist.o user.o watch.o $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) install: all diff --git a/policycoreutils/restorecond/org.selinux.Restorecond.service b/restorecond/org.selinux.Restorecond.service similarity index 100% rename from policycoreutils/restorecond/org.selinux.Restorecond.service rename to restorecond/org.selinux.Restorecond.service diff --git a/policycoreutils/restorecond/restorecond.8 b/restorecond/restorecond.8 similarity index 100% rename from policycoreutils/restorecond/restorecond.8 rename to restorecond/restorecond.8 diff --git a/policycoreutils/restorecond/restorecond.c b/restorecond/restorecond.c similarity index 99% rename from policycoreutils/restorecond/restorecond.c rename to restorecond/restorecond.c index 7746427c..4c8c99cf 100644 --- a/policycoreutils/restorecond/restorecond.c +++ b/restorecond/restorecond.c @@ -55,7 +55,7 @@ #include #include #include -#include "../setfiles/restore.h" +#include "restore.h" #include #include #include diff --git a/policycoreutils/restorecond/restorecond.conf b/restorecond/restorecond.conf similarity index 100% rename from policycoreutils/restorecond/restorecond.conf rename to restorecond/restorecond.conf diff --git a/policycoreutils/restorecond/restorecond.desktop b/restorecond/restorecond.desktop similarity index 100% rename from policycoreutils/restorecond/restorecond.desktop rename to restorecond/restorecond.desktop diff --git a/policycoreutils/restorecond/restorecond.h b/restorecond/restorecond.h similarity index 100% rename from policycoreutils/restorecond/restorecond.h rename to restorecond/restorecond.h diff --git a/policycoreutils/restorecond/restorecond.init b/restorecond/restorecond.init similarity index 100% rename from policycoreutils/restorecond/restorecond.init rename to restorecond/restorecond.init diff --git a/policycoreutils/restorecond/restorecond.service b/restorecond/restorecond.service similarity index 100% rename from policycoreutils/restorecond/restorecond.service rename to restorecond/restorecond.service diff --git a/policycoreutils/restorecond/restorecond_user.conf b/restorecond/restorecond_user.conf similarity index 100% rename from policycoreutils/restorecond/restorecond_user.conf rename to restorecond/restorecond_user.conf diff --git a/policycoreutils/restorecond/stringslist.c b/restorecond/stringslist.c similarity index 100% rename from policycoreutils/restorecond/stringslist.c rename to restorecond/stringslist.c diff --git a/policycoreutils/restorecond/stringslist.h b/restorecond/stringslist.h similarity index 100% rename from policycoreutils/restorecond/stringslist.h rename to restorecond/stringslist.h diff --git a/policycoreutils/restorecond/user.c b/restorecond/user.c similarity index 100% rename from policycoreutils/restorecond/user.c rename to restorecond/user.c diff --git a/policycoreutils/restorecond/utmpwatcher.c b/restorecond/utmpwatcher.c similarity index 100% rename from policycoreutils/restorecond/utmpwatcher.c rename to restorecond/utmpwatcher.c diff --git a/policycoreutils/restorecond/utmpwatcher.h b/restorecond/utmpwatcher.h similarity index 100% rename from policycoreutils/restorecond/utmpwatcher.h rename to restorecond/utmpwatcher.h diff --git a/policycoreutils/restorecond/watch.c b/restorecond/watch.c similarity index 100% rename from policycoreutils/restorecond/watch.c rename to restorecond/watch.c