summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorjk7744.park <jk7744.park@samsung.com>2015-09-08 22:37:34 +0900
committerjk7744.park <jk7744.park@samsung.com>2015-09-08 22:37:34 +0900
commit949280f9e145d767ec9f3861f5820b7ac1832be8 (patch)
treeb6d684db859040155b8d8860ba93b354ab9846e3 /packaging
parent5e5a2cd798c3ce7c75f480ed38902bd05588bd64 (diff)
downloaddlog-949280f9e145d767ec9f3861f5820b7ac1832be8.tar.gz
dlog-949280f9e145d767ec9f3861f5820b7ac1832be8.tar.bz2
dlog-949280f9e145d767ec9f3861f5820b7ac1832be8.zip
Diffstat (limited to 'packaging')
-rw-r--r--packaging/dlog.changes10
-rw-r--r--packaging/dlog.conf.in65
-rwxr-xr-x[-rw-r--r--]packaging/dlog.spec106
-rw-r--r--packaging/dlog_logger.conf-micro-debug.in3
-rw-r--r--packaging/dlog_logger.conf-micro.in3
-rw-r--r--packaging/dlog_logger.conf.in3
-rw-r--r--packaging/dlog_logger.path5
-rw-r--r--packaging/dlog_logger.service9
-rw-r--r--packaging/dlogutil.manifest14
-rw-r--r--packaging/libdlog.manifest10
10 files changed, 200 insertions, 28 deletions
diff --git a/packaging/dlog.changes b/packaging/dlog.changes
new file mode 100644
index 0000000..8e4c40f
--- /dev/null
+++ b/packaging/dlog.changes
@@ -0,0 +1,10 @@
+* Thu Jan 03 2013 Anas Nashif <anas.nashif@intel.com> accepted/trunk/20121212.102709@5168da3
+- fixed build with new compilers
+- spec cleanup
+- check for archiver in configure.ac
+
+* Thu Jun 28 2012 Patrick McCarty <patrick.mccarty@linux.intel.com> - 0.4.1
+- Fix initscript symlinks
+
+* Fri Jun 22 2012 William Douglas <william.douglas@intel.com> - 0.4.1
+- Add system unit files
diff --git a/packaging/dlog.conf.in b/packaging/dlog.conf.in
new file mode 100644
index 0000000..ea201a5
--- /dev/null
+++ b/packaging/dlog.conf.in
@@ -0,0 +1,65 @@
+#
+# Dlog configuration file.
+#
+# Lines beginning with '#' are comments.
+#
+# Following file configures dlog library.
+# First section contains global configuration for library.
+# It allows to disable or enable platform logs and log limiter features.
+
+PlatformLogs on # Possible values are 'on' and 'off'
+LogLimiter off
+
+# Second section controls filtering rules for dlog limiter.
+# Each line represent a rule for a filter. Filtering is done
+# at runtime, but configuration is read only at the boot time.
+# Log lines filtered out are not written to log buffers.
+# Filtering is done for "TAG"|priority pair, where TAG is string defined by application.
+# Which should be quoted with '"' character. It may contain spaces but not TABs.
+# Priority is one character from the following values:
+#
+# V or v or 1 - Verbose messages,
+# D or d or 2 - Debug messages,
+# I or i or 3 - Informational messages,
+# W or w or 4 - Warning messages,
+# E or e or 5 - Error messages,
+# F or f or 6 - Fatal messages.
+#
+# Limiter can define rules 'for all' by using an '*' character.
+# It's a wildcard replacing all TAGs not mentioned in this file.
+# '*' could be used also as wildcard for priority.
+# An asterisk is not evaluated, which means rules like "WOR*" are threated as a TAGs.
+# Log filter works according to rules presented below:
+#
+# case 1) The "TAG"|priority pair is not presented on the list.
+# - Use "TAG"|* rule to decide what to do.
+# - If "TAG"|* is not defined, use "*"|priority rule to decide what to do.
+# - If "*"|priority pair is not present, use "*"|* rule.
+# - If rule "*"|* is not present, then allow logging.
+#
+# case 2) The "TAG"|priority pair is on the list (applies to
+# "*" |priority and "*"|* rules).
+# - If policy = ALLOW, then log speed is unlimited.
+# - If policy = <number> then limit to <number> logs per minute.
+# - If policy = DENY then forbid logging.
+#
+# Maximum <number> is 10000, which gives 10000 log line per minute.
+# Please keep in mind that dlog uses constant size log storage, thus
+# when the application writes many logs, it may cause older entries overwriting.
+#
+# The configuration file has following format:
+# Lines beginning with # are threated as comments.
+# TAG can contain any ASCII letter or digit and spaces, but
+# not a TAB character. TAG has to be quoted using '"' character.
+# TAG is separated from priority with pipe '|' character.
+# Priority is one character long, the possible values are presented above.
+# Policy is separated from the "TAG"|priority pair with TAB character.
+# Policy is expressed as ALLOW, DENY or number from 0 to 10000 (not case sensitive).
+# Setting policy as 0 is the same as DENY.
+# Setting policy to more than 10000 is threated as allow.
+
+
+
+
+# TAG|priority POLICY
+"*"|* ALLOW
diff --git a/packaging/dlog.spec b/packaging/dlog.spec
index 0f9a51c..5eda452 100644..100755
--- a/packaging/dlog.spec
+++ b/packaging/dlog.spec
@@ -1,13 +1,26 @@
Name: dlog
Summary: Logging service
-Version: 0.4.0
-Release: 5.1
-Group: TO_BE/FILLED_IN
+Version: 0.4.1
+Release: 15
+Group: System/Libraries
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
-
+Source101: packaging/dlogutil.manifest
+Source102: packaging/libdlog.manifest
+Source201: packaging/dlog.conf.in
+Source202: packaging/dlog_logger.conf.in
+Source203: packaging/dlog_logger.conf-micro.in
+Source204: packaging/dlog_logger.conf-micro-debug.in
+Source301: packaging/dlog_logger.service
+Source302: packaging/dlog_logger.path
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: libtool
+%if "%{HAVE_SYSTEMD_JOURNAL}" == "yes"
+BuildRequires: pkgconfig(libsystemd-journal)
+%endif
+BuildRequires: pkgconfig(capi-base-common)
+Requires(post): coreutils
%description
dlog API library
@@ -15,6 +28,7 @@ dlog API library
%package -n libdlog
Summary: Logging service dlog API
Group: Development/Libraries
+Requires(post): smack-utils
%description -n libdlog
dlog API library
@@ -22,7 +36,7 @@ dlog API library
%package -n libdlog-devel
Summary: Logging service dlog API
Group: Development/Libraries
-Requires: lib%{name} = %{version}-%{release}
+Requires: lib%{name} = %{?epoch:%{epoch}:}%{version}-%{release}
%description -n libdlog-devel
dlog API library
@@ -31,56 +45,92 @@ dlog API library
%package -n dlogutil
Summary: print log data to the screen
Group: Development/Libraries
-Requires: lib%{name} = %{version}-%{release}
+Requires: lib%{name} = %{?epoch:%{epoch}:}%{version}-%{release}
+Requires(post): /usr/bin/systemctl
+Requires(postun): /usr/bin/systemctl
+Requires(preun): /usr/bin/systemctl
%description -n dlogutil
-utilities for print log data
-
-
+Utilities for print log data
%prep
%setup -q
-
%build
-
+cp %{SOURCE101} .
+cp %{SOURCE102} .
%autogen --disable-static
-%configure --disable-static
+%configure --disable-static \
+%if 0%{?tizen_build_binary_release_type_daily}
+ --enable-fatal_on \
+%endif
+%if 0%{?tizen_build_binary_release_type_eng}
+ --enable-engineer_mode \
+%endif
+%if 0%{?sec_build_binary_debug_enable}
+ --enable-debug_enable \
+%endif
+ --without-systemd-journal
make %{?jobs:-j%jobs}
%install
rm -rf %{buildroot}
%make_install
-mkdir -p %{buildroot}/opt/etc/
-cp %{_builddir}/%{name}-%{version}/.debuglevel %{buildroot}/opt/etc/.debuglevel
+mkdir -p %{buildroot}/usr/bin/
+cp %{_builddir}/%{name}-%{version}/scripts/dlogctrl %{buildroot}/usr/bin/dlogctrl
+
+mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/
+install -m 0644 %SOURCE301 %{buildroot}%{_libdir}/systemd/system/
+install -m 0644 %SOURCE302 %{buildroot}%{_libdir}/systemd/system/
+
+ln -s ../dlog_logger.path %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/dlog_logger.path
+
+mkdir -p %{buildroot}/usr/share/license
+cp LICENSE.Apache-2.0 %{buildroot}/usr/share/license/%{name}
+cp LICENSE.Apache-2.0 %{buildroot}/usr/share/license/libdlog
+cp LICENSE.Apache-2.0 %{buildroot}/usr/share/license/dlogutil
+
+mkdir -p %{buildroot}/opt/etc
+cp %SOURCE201 %{buildroot}/opt/etc/dlog.conf
+
+# default set log output to external files
+cp %SOURCE202 %{buildroot}/opt/etc/dlog_logger.conf
+
+%preun -n dlogutil
%post -n dlogutil
-#Add boot sequence script
-mkdir -p /etc/rc.d/rc5.d
-rm -f /etc/rc.d/rc3.d/S47dlog /etc/rc.d/rc5.d/S05dlog
-ln -s /etc/rc.d/init.d/dlog.sh /etc/rc.d/rc3.d/S47dlog
-ln -s /etc/rc.d/init.d/dlog.sh /etc/rc.d/rc5.d/S05dlog
+systemctl daemon-reload
+%postun -n dlogutil
+systemctl daemon-reload
%post -n libdlog
-chmod +x /opt/etc/.debuglevel
-rm -f /etc/profile.d/dlevel.sh
-ln -s /opt/etc/.debuglevel /etc/profile.d/dlevel.sh
/sbin/ldconfig
%postun -n libdlog
/sbin/ldconfig
+%files
+/usr/share/license/%{name}
+
%files -n dlogutil
%manifest dlogutil.manifest
-%{_bindir}/dlogutil
-%{_sysconfdir}/rc.d/init.d/dlog.sh
+/usr/share/license/dlogutil
+%attr(755,root,app_logging) %{_bindir}/dlog_logger
+%attr(755,root,app_logging) %{_bindir}/dlogutil
+%attr(755,root,app_logging) %{_bindir}/dlogctrl
+%attr(755,root,app_logging) /opt/etc/dlog_logger.conf
+%{_libdir}/systemd/system/dlog_logger.service
+%{_libdir}/systemd/system/dlog_logger.path
+%{_libdir}/systemd/system/multi-user.target.wants/dlog_logger.path
+
%files -n libdlog
-%doc LICENSE
-/opt/etc/.debuglevel
+%manifest libdlog.manifest
+/usr/share/license/libdlog
%{_libdir}/libdlog.so.0
%{_libdir}/libdlog.so.0.0.0
+%attr(664,root,app_logging) /opt/etc/dlog.conf
%files -n libdlog-devel
%{_includedir}/dlog/dlog.h
diff --git a/packaging/dlog_logger.conf-micro-debug.in b/packaging/dlog_logger.conf-micro-debug.in
new file mode 100644
index 0000000..a9c892f
--- /dev/null
+++ b/packaging/dlog_logger.conf-micro-debug.in
@@ -0,0 +1,3 @@
+dlogutil -b system -r 5120 -n 1 -f /var/log/dlog_system -v dump *:I
+dlogutil -b main -r 3072 -n 1 -f /var/log/dlog_main -v dump *:W
+dlogutil -b radio -r 2048 -n 4 -f /var/log/dlog_radio -v dump
diff --git a/packaging/dlog_logger.conf-micro.in b/packaging/dlog_logger.conf-micro.in
new file mode 100644
index 0000000..d8c301d
--- /dev/null
+++ b/packaging/dlog_logger.conf-micro.in
@@ -0,0 +1,3 @@
+dlogutil -b system -r 5120 -n 1 -f /var/log/dlog_system -v dump *:I
+dlogutil -b main -r 3072 -n 1 -f /var/log/dlog_main -v dump *:W
+dlogutil -b radio -r 1024 -n 1 -f /var/log/dlog_radio -v dump
diff --git a/packaging/dlog_logger.conf.in b/packaging/dlog_logger.conf.in
new file mode 100644
index 0000000..5445824
--- /dev/null
+++ b/packaging/dlog_logger.conf.in
@@ -0,0 +1,3 @@
+dlogutil -b system -r 512 -n 1 -f /var/log/dlog_system -v dump *:I
+dlogutil -b main -r 256 -n 1 -f /var/log/dlog_main -v dump *:W
+dlogutil -b radio -r 512 -n 1 -f /var/log/dlog_radio -v dump
diff --git a/packaging/dlog_logger.path b/packaging/dlog_logger.path
new file mode 100644
index 0000000..8557d54
--- /dev/null
+++ b/packaging/dlog_logger.path
@@ -0,0 +1,5 @@
+[Unit]
+Description=Path activation for dlog_logger
+
+[Path]
+PathExists=/var/log
diff --git a/packaging/dlog_logger.service b/packaging/dlog_logger.service
new file mode 100644
index 0000000..7ee6f1d
--- /dev/null
+++ b/packaging/dlog_logger.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Dumps dlog logs onto disk
+
+[Service]
+ExecStart=/usr/bin/dlog_logger -b 99 -t 600
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/packaging/dlogutil.manifest b/packaging/dlogutil.manifest
new file mode 100644
index 0000000..fc0a1bf
--- /dev/null
+++ b/packaging/dlogutil.manifest
@@ -0,0 +1,14 @@
+<manifest>
+ <define>
+ <domain name="dlogutil"/>
+ </define>
+ <assign>
+ <filesystem path="/usr/bin/dlog_logger" label="_" exec_label="none"/>
+ <filesystem path="/usr/bin/dlogutil" label="_" exec_label="none"/>
+ <filesystem path="/usr/bin/dlogctrl" label="_" exec_label="none"/>
+ <filesystem path="/opt/etc/dlog_logger.conf" label="_" exec_label="none"/>
+ </assign>
+ <request>
+ <domain name="dlogutil"/>
+ </request>
+</manifest>
diff --git a/packaging/libdlog.manifest b/packaging/libdlog.manifest
new file mode 100644
index 0000000..6247853
--- /dev/null
+++ b/packaging/libdlog.manifest
@@ -0,0 +1,10 @@
+<manifest>
+ <assign>
+ <filesystem path="/usr/lib/libdlog.so.0" label="_" exec_label="none"/>
+ <filesystem path="/usr/lib/libdlog.so.0.0" label="_" exec_label="none"/>
+ <filesystem path="/opt/etc/dlog.conf" label="*" exec_label="none"/>
+ </assign>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>