common: Make it compile

* Provide our own hal_attribute macro but without neverallows
* Workaround silly issue when compiling system_ext public sepolicy
  without any rules

Change-Id: Id7eb04bd049b13380e69a0367fb588f226a93980
diff --git a/common/public/attributes b/common/public/attributes
index 5661aa4..6fb39b0 100644
--- a/common/public/attributes
+++ b/common/public/attributes
@@ -1,7 +1,7 @@
 # HALs
-hal_attribute(lineage_camera_motor)
-hal_attribute(lineage_fod)
-hal_attribute(lineage_livedisplay)
-hal_attribute(lineage_touch)
-hal_attribute(lineage_trust)
-hal_attribute(lineage_powershare)
+hal_attribute_lineage(lineage_camera_motor)
+hal_attribute_lineage(lineage_fod)
+hal_attribute_lineage(lineage_livedisplay)
+hal_attribute_lineage(lineage_touch)
+hal_attribute_lineage(lineage_trust)
+hal_attribute_lineage(lineage_powershare)
diff --git a/common/public/file.te b/common/public/file.te
new file mode 100644
index 0000000..871b09e
--- /dev/null
+++ b/common/public/file.te
@@ -0,0 +1 @@
+type dummy_type_meant_to_prevent_selinux_compilation_from_failing_when_system_ext_public_dir_has_nothing_but_attributes;
diff --git a/common/public/te_macros b/common/public/te_macros
new file mode 100644
index 0000000..2af4893
--- /dev/null
+++ b/common/public/te_macros
@@ -0,0 +1,10 @@
+#####################################
+# hal_attribute_lineage(hal_name)
+define(`hal_attribute_lineage', `
+attribute hal_$1;
+expandattribute hal_$1 true;
+attribute hal_$1_client;
+expandattribute hal_$1_client true;
+attribute hal_$1_server;
+expandattribute hal_$1_server false;
+')