summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McCarty <patrick.mccarty@linux.intel.com>2014-03-13 23:37:59 -0700
committerJosé Bollo <jose.bollo@open.eurogiciel.org>2014-12-22 10:37:57 +0100
commit6ef6e917328de16e510f6033bf976f778e10bc03 (patch)
tree60b912689549f0110e9f9855aa3e638101fedea3
parentcdb66e9cd012afe1eeef730a5145b4b2f32e8bd2 (diff)
downloadbuxton-6ef6e917328de16e510f6033bf976f778e10bc03.tar.gz
buxton-6ef6e917328de16e510f6033bf976f778e10bc03.tar.bz2
buxton-6ef6e917328de16e510f6033bf976f778e10bc03.zip
packaging initial: Add packaging for v1
Change-Id: Ie5ea21561cc7a899d327755ff6d3397b859e4fc5 Signed-off-by: Patrick McCarty <patrick.mccarty@linux.intel.com>
-rw-r--r--packaging/buxton.manifest8
-rw-r--r--packaging/buxton.spec97
-rw-r--r--packaging/tizen.conf37
3 files changed, 142 insertions, 0 deletions
diff --git a/packaging/buxton.manifest b/packaging/buxton.manifest
new file mode 100644
index 0000000..d4745d6
--- /dev/null
+++ b/packaging/buxton.manifest
@@ -0,0 +1,8 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+ <assign>
+ <filesystem path="/var/lib/buxton" label="System"/>
+ </assign>
+</manifest>
diff --git a/packaging/buxton.spec b/packaging/buxton.spec
new file mode 100644
index 0000000..3e99269
--- /dev/null
+++ b/packaging/buxton.spec
@@ -0,0 +1,97 @@
+Name: buxton
+Version: 1
+Release: 0
+License: LGPL-2.1+
+Summary: A security-enabled configuration system
+Url: https://github.com/sofar/buxton
+Group: System/Configuration
+Source0: %{name}-%{version}.tar.xz
+Source1: tizen.conf
+Source1001: %{name}.manifest
+BuildRequires: attr-devel
+BuildRequires: gdbm-devel
+BuildRequires: pkgconfig(check)
+BuildRequires: pkgconfig(systemd)
+BuildRequires: pkgconfig(libsystemd-daemon)
+Requires(post): buxton
+Requires(post): smack
+Requires(post): /usr/bin/chown
+
+%description
+Buxton is a security-enabled configuration management system. It
+features a layered approach to configuration storage, with each
+layer containing an arbitrary number of groups, each of which may
+contain key-value pairs. Mandatory Access Control (MAC) is
+implemented at the group level and at the key-value level.
+
+Buxton provides a C library (libbuxton) for client applications to
+use. Internally, buxton uses a daemon (buxtond) for processing
+client requests and enforcing MAC. Also, a CLI (buxtonctl) is
+provided for interactive use and for use in shell scripts.
+
+%package devel
+Summary: A security-enabled configuration system - development files
+Requires: %{name} = %{version}
+
+%description devel
+Buxton is a security-enabled configuration management system. It
+features a layered approach to configuration storage, with each
+layer containing an arbitrary number of groups, each of which may
+contain key-value pairs. Mandatory Access Control (MAC) is
+implemented at the group level and at the key-value level.
+
+Buxton provides a C library (libbuxton) for client applications to
+use. Internally, buxton uses a daemon (buxtond) for processing
+client requests and enforcing MAC. Also, a CLI (buxtonctl) is
+provided for interactive use and for use in shell scripts.
+
+This package provides development files for Buxton.
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+
+%build
+%configure
+make %{?_smp_mflags}
+
+%install
+%make_install
+# TODO: need to define needed layers for Tizen in tizen.conf
+install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/buxton.conf
+
+%post
+/sbin/ldconfig
+buxtonctl create-db base
+buxtonctl create-db isp
+if [ "$1" -eq 1 ] ; then
+ # The initial DBs will not have the correct labels and
+ # permissions when created in postinstall during image
+ # creation, so we set these file attributes here.
+ chsmack -a System %{_localstatedir}/lib/buxton/*.db
+ chown buxton:buxton %{_localstatedir}/lib/buxton/*.db
+fi
+
+%postun -p /sbin/ldconfig
+
+%docs_package
+%license docs/LICENSE.MIT
+
+%files
+%manifest %{name}.manifest
+%license LICENSE.LGPL2.1
+%config(noreplace) %{_sysconfdir}/buxton.conf
+%{_bindir}/buxtonctl
+%{_libdir}/buxton/*.so
+%{_libdir}/libbuxton.so.*
+%{_prefix}/lib/systemd/system/buxton.service
+%{_prefix}/lib/systemd/system/buxton.socket
+%{_prefix}/lib/systemd/system/sockets.target.wants/buxton.socket
+%{_sbindir}/buxtond
+%attr(0700,buxton,buxton) %dir %{_localstatedir}/lib/buxton
+
+%files devel
+%manifest %{name}.manifest
+%{_includedir}/buxton.h
+%{_libdir}/libbuxton.so
+%{_libdir}/pkgconfig/*.pc
diff --git a/packaging/tizen.conf b/packaging/tizen.conf
new file mode 100644
index 0000000..dabe2b6
--- /dev/null
+++ b/packaging/tizen.conf
@@ -0,0 +1,37 @@
+#
+# buxton config file for Tizen
+#
+
+[Configuration]
+#ModuleDirectory=${libdir}/buxton
+#DatabasePath=${localstatedir}/lib/buxton
+#SmackLoadFile=/sys/fs/smackfs/load2
+#SocketPath=/run/buxton-0
+
+[base]
+Type=System
+Backend=gdbm
+Description=Operating System configuration layer
+Priority=0
+# This will end up being a file at @@DB_PATH@@/base.db
+
+[isp]
+Type=System
+Backend=gdbm
+Description=ISP specific settings
+Priority=1
+# This will end up being a file at @@DB_PATH@@/isp.db
+
+[temp]
+Type=System
+Backend=memory
+Priority=99
+Description=A termporary layer for scratch settings and data
+# This will not end up in any file
+
+[user]
+Type=User
+Backend=gdbm
+Priority=1000
+Description=Per-user settings
+# This will end up in @@DB_PATH@@/user-<uid>.db