]> TLD Linux GIT Repositories - packages/rpm-tld-macros.git/blob - macros.selinux
- merged 2.029 from PLD
[packages/rpm-tld-macros.git] / macros.selinux
1 # SELinux specific macro definitions.
2
3 # Desired selinux policy tree
4 %__policy_tree  %{expand:%%global __policy_tree %{lua:\
5 t="targeted"\
6 f = io.open("/etc/selinux/config")\
7 if f then\
8   for l in f:lines() do\
9     if "SELINUXTYPE=" == string.sub(l,0,12) then t=string.sub(l,13); end\
10   end\
11   f:close()\
12 end\
13 print (t)\
14 }}%{__policy_tree}
15
16 # Path to selinux file context patterns.
17 %__file_context_path /etc/selinux/%{__policy_tree}/contexts/files/file_contexts
18
19 #
20 # Path to selinux file context patterns used to add
21 # RPMTAG_FILECONTEXTS to packages when building.
22 #
23 # Undefined, missing or %{nil} will disable.
24 %_build_file_context_path       %{nil}
25
26 #
27 # Path to selinux file context patterns used to set
28 # (or override package content) file contexts when installing.
29 #
30 # Undefined, missing or %{nil} will use package content (if available).
31 %_install_file_context_path     %{__file_context_path}
32
33 #
34 # Path to selinux file context patterns used to verify
35 # file contexts on file system.
36 #
37 # Undefined, missing or %{nil} will use package content (if available).
38 %_verify_file_context_path      %{__file_context_path}