Cleanup spec 39/4539/2 accepted/tizen/20130628.202129 submit/tizen/20130628.130547
authorAnas Nashif <anas.nashif@intel.com>
Fri, 28 Jun 2013 07:46:40 +0000 (03:46 -0400)
committerAnas Nashif <anas.nashif@intel.com>
Fri, 28 Jun 2013 11:01:52 +0000 (07:01 -0400)
- Use lua instead of shell for %post to minimize dependencies
- Split library package
- Reset group, licenses
- Do not create directories as part of %post
- Reset git file permissions

Change-Id: Ie336c2b6906e838646e62ea5202a4d904fe938c0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
AUTHORS [changed mode: 0755->0644]
LICENSE.APLv2 [changed mode: 0755->0644]
NOTICE [changed mode: 0755->0644]
coredumpctrl.sh [changed mode: 0755->0644]
packaging/sys-assert.changes
packaging/sys-assert.spec

diff --git a/AUTHORS b/AUTHORS
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/NOTICE b/NOTICE
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 87cf6cf5bd55074c2122b37f6ba6da8d88acbc4f..3bfad5eb3c185de138be136bd40d62c603d6e005 100644 (file)
@@ -1,3 +1,12 @@
+* Fri Jun 28 2013 Anas Nashif <anas.nashif@intel.com> accepted/tizen/20130611.123358@59a542a
+- Cleanup spec
+- - Use lua instead of shell for %post to minimize dependencies
+- - Split library package
+- - Reset group, licenses
+- - Do not create directories as part of %post
+- - Reset git file permissions
+- Signed-off-by: Anas Nashif <anas.nashif@intel.com>
+
 * Wed Jun 05 2013 Xavier Roche <xavrock.os@gmail.com> accepted/tizen/20130604.172001@441fcdd
 - Replace manifest with default floor
 
index fe131ebe63be3a22cc5a0e4942afe1833928c737..9f08f3b68b96925f01f9b1a74f132242f3f31204 100644 (file)
@@ -1,17 +1,22 @@
 Name:       sys-assert
-Summary:    Libsys-assert (shared object)
+Summary:    System Assert
 Version:    0.3.3
 Release:    5
-Group:      Framework/system
-License:    Apache License, Version 2.0
+Group:      System/Debug
+License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
-
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  cmake
-Requires(post): coreutils
 
 %description
-libsys-assert (shared object).
+System Assert.
+
+%package -n libsys-assert
+Summary:    System Assert Library
+%description -n libsys-assert
+System Assert Library.
+
+This package provides the library for %name.
 
 %prep
 %setup -q
@@ -26,34 +31,38 @@ export CFLAGS+=" -fPIC"
 make %{?_smp_mflags}
 
 %install
-rm -rf %{buildroot}
 %make_install
-mkdir -p %{buildroot}/usr/share/license
-cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/crash/info
+
+%post -p <lua>
+--Do not run this script inside the build environemt, it will cause issues.
+if posix.stat("/.build") == nil then
+    local f = assert(io.open("/etc/ld.so.preload", "a"))
+    local t = f:write("%{_libdir}/libsys-assert.so\n")
+    f:close()
+    posix.chmod("/etc/ld.so.preload", 644)
+end
+
 
-%post
-/sbin/ldconfig
-mkdir -p /opt/share/crash/info
-chown root:crash /opt/share/crash/info
-chmod 775 /opt/share/crash/info
+%postun
+# TBD: we need to remove the above, otherwise we will fail on everything
+#that tries to preload that lib
+#
 
-chown root:crash /opt/share/crash
-chmod 775 /opt/share/crash
+%post -n libsys-assert -p /sbin/ldconfig
 
-if [ -f %{_libdir}/rpm-plugins/msm.so ]; then
-       find /opt/share/crash -print0 | xargs -0 chsmack -a 'sys-assert::core'
-       find /opt/share/crash -type d -print0 | xargs -0 chsmack -t
-fi
+%postun -n libsys-assert -p /sbin/ldconfig
 
-if [ ! -d /.build ]; then
-       echo "%{_libdir}/libsys-assert.so" >> /etc/ld.so.preload
-       chmod 644 /etc/ld.so.preload
-fi
 
 %files
 %manifest sys-assert.manifest
+%attr(775,root,crash) /opt/share/crash
+%attr(775,root,crash) /opt/share/crash/info
+%license LICENSE.APLv2
 %{_bindir}/coredumpctrl.sh
-%{_libdir}/libsys-assert.so
 /opt/etc/.debugmode
-/usr/share/license/%{name}
 /usr/lib/sysctl.d/sys-assert.conf
+
+%files -n libsys-assert
+%{_libdir}/libsys-assert.so
+