Skip to contentSkip to conversation

Update make clean instructions and .gitgnore files

PATCH Applied Nicolas Iooss 2 participants 5 messages May 5, 2016 – May 9, 2016 SELinux security module

lore
Share & tools
lore
#0 lore raw

cover Update make clean instructions and .gitgnore files

Hello,

While working on testing the selinux-userspace project on several configurations (compiler, compiler flags, libc, Python version...) it is quite convenient that "make clean" leaves the directory clean, both from a git prespective ("git ls-files --ignored --others --exclude-standard") and from a build point of view (all generated and cached files are removed).

These patches update the relevant .gitignore and Makefile files to achieve this.

Cheers,
Nicolas

Nicolas Iooss (3):
Update .gitignore files
sepolgen: remove additional files when cleaning
libsepol: remove libsepol.map when cleaning

 libselinux/utils/.gitignore        | 5 +++++
 libsemanage/tests/.gitignore       | 1 +
 libsepol/src/Makefile              | 2 +-
 libsepol/tests/.gitignore          | 1 +
 libsepol/tests/policies/.gitignore | 3 +++
 sepolgen/src/sepolgen/Makefile     | 3 +--
 sepolgen/tests/.gitignore          | 4 ++++
 sepolgen/tests/Makefile            | 3 +++
 8 files changed, 19 insertions(+), 3 deletions(-)
 create mode 100644 libsemanage/tests/.gitignore
 create mode 100644 libsepol/tests/.gitignore
 create mode 100644 libsepol/tests/policies/.gitignore
 create mode 100644 sepolgen/tests/.gitignore
Signature · 1 line
2.8.2
#1 lore raw

PATCH 1/3 Update .gitignore files

---
 libselinux/utils/.gitignore        | 5 +++++
 libsemanage/tests/.gitignore       | 1 +
 libsepol/tests/.gitignore          | 1 +
 libsepol/tests/policies/.gitignore | 3 +++
 sepolgen/tests/.gitignore          | 4 ++++
 5 files changed, 14 insertions(+)
 create mode 100644 libsemanage/tests/.gitignore
 create mode 100644 libsepol/tests/.gitignore
 create mode 100644 libsepol/tests/policies/.gitignore
 create mode 100644 sepolgen/tests/.gitignore
libselinux/utils/.gitignore +5 -0
index 060eaabd1a72..ed3bf0bb28f9 100644
@@ -14,7 +14,12 @@ getseuser
 matchpathcon
 policyvers
 sefcontext_compile
+selabel_digest
+selabel_lookup
+selabel_lookup_best_match
+selabel_partial_match
 selinux_check_securetty_context
+selinux_restorecon
 selinuxenabled
 selinuxexeccon
 setenforce
libsemanage/tests/.gitignore new file +1 -0
new file mode 100644
index 000000000000..f07111dba429
@@ -0,0 +1 @@
+libsemanage-tests
libsepol/tests/.gitignore new file +1 -0
new file mode 100644
index 000000000000..c3f60fd2b945
@@ -0,0 +1 @@
+libsepol-tests
libsepol/tests/policies/.gitignore new file +3 -0
new file mode 100644
index 000000000000..5a547a8aa9df
@@ -0,0 +1,3 @@
+test-downgrade/
+test-*/*.mls
+test-*/*.std
sepolgen/tests/.gitignore new file +4 -0
new file mode 100644
index 000000000000..c120af8a0067
@@ -0,0 +1,4 @@
+module_compile_test.fc
+module_compile_test.if
+output
+tmp/
Signature · 1 line
2.8.2
#2 lore raw

PATCH 2/3 sepolgen: remove additional files when cleaning

In reply to Nicolas Iooss

Remove the files created by Python 3 and refpolicy building process.

---
 sepolgen/src/sepolgen/Makefile | 3 +--
 sepolgen/tests/Makefile        | 3 +++
 2 files changed, 4 insertions(+), 2 deletions(-)
sepolgen/src/sepolgen/Makefile +1 -2
index 9ac765151478..d3aa7715c488 100644
@@ -11,5 +11,4 @@ install: all
 clean:
 	rm -f parser.out parsetab.py
 	rm -f *~ *.pyc
-
-
+	rm -rf __pycache__
sepolgen/tests/Makefile +3 -0
index 924a9bed6bcd..e17eef229ff3 100644
@@ -4,8 +4,11 @@ clean:
 	rm -f *~ *.pyc
 	rm -f parser.out parsetab.py
 	rm -f out.txt
+	rm -f module_compile_test.fc
+	rm -f module_compile_test.if
 	rm -f module_compile_test.pp
 	rm -f output
+	rm -rf __pycache__ tmp
 
 test:
 	$(PYTHON) run-tests.py
Signature · 1 line
2.8.2
#3 lore raw

PATCH 3/3 libsepol: remove libsepol.map when cleaning

In reply to Nicolas Iooss
---
 libsepol/src/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libsepol/src/Makefile +1 -1
index db6c2bac7692..c0c3274a9197 100644
@@ -76,7 +76,7 @@ relabel:
 	/sbin/restorecon $(SHLIBDIR)/$(LIBSO)
 
 clean: 
-	-rm -f $(LIBPC) $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(TARGET) $(CIL_GENERATED)
+	-rm -f $(LIBPC) $(LIBMAP) $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(TARGET) $(CIL_GENERATED)
 
 indent:
 	../../scripts/Lindent $(wildcard *.[ch])
Signature · 1 line
2.8.2
#4 lore raw
In reply to Nicolas Iooss
Quoted 11 lines · Nicolas Iooss

Hello,

While working on testing the selinux-userspace project on several configurations (compiler, compiler flags, libc, Python version...) it is quite convenient that "make clean" leaves the directory clean, both from a git prespective ("git ls-files --ignored --others --exclude-standard") and from a build point of view (all generated and cached files are removed).

These patches update the relevant .gitignore and Makefile files to achieve this.

Thanks, applied.

Quoted 23 lines

Cheers,
Nicolas

Nicolas Iooss (3):
Update .gitignore files
sepolgen: remove additional files when cleaning
libsepol: remove libsepol.map when cleaning

 libselinux/utils/.gitignore        | 5 +++++
 libsemanage/tests/.gitignore       | 1 +
 libsepol/src/Makefile              | 2 +-
 libsepol/tests/.gitignore          | 1 +
 libsepol/tests/policies/.gitignore | 3 +++
 sepolgen/src/sepolgen/Makefile     | 3 +--
 sepolgen/tests/.gitignore          | 4 ++++
 sepolgen/tests/Makefile            | 3 +++
 8 files changed, 19 insertions(+), 3 deletions(-)
 create mode 100644 libsemanage/tests/.gitignore
 create mode 100644 libsepol/tests/.gitignore
 create mode 100644 libsepol/tests/policies/.gitignore
 create mode 100644 sepolgen/tests/.gitignore