summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2017-01-18 15:35:33 +0900
committerMyungJoo Ham <myungjoo.ham@samsung.com>2017-01-18 15:35:33 +0900
commit45fcac9fb30e56d57a49266a04c33b2e9314cd3b (patch)
treec23004ebef6ddbe1bc06b256d57a989b1157dcde
parent152beb71c8bfae7bf0fd93be887a58892378140b (diff)
downloadrpm-sandbox/mzx/upstream.tar.gz
rpm-sandbox/mzx/upstream.tar.bz2
rpm-sandbox/mzx/upstream.zip
Bringing it upsandbox/mzx/upstream
Change-Id: Ida34340e5a33085d0d72a8ce2d5b367b021332bc Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
-rw-r--r--packaging/db-4.8.30-integration.dif82
-rw-r--r--packaging/db-4.8.30.tar.bz2bin0 -> 19969243 bytes
-rw-r--r--packaging/device-sec-policy46
-rw-r--r--packaging/find-docs.sh33
-rwxr-xr-xpackaging/find-provides.ksyms41
-rw-r--r--packaging/libsymlink.attr4
-rw-r--r--packaging/rpm-tizen_macros324
-rw-r--r--packaging/rpm.changes102
-rw-r--r--packaging/rpm.manifest5
-rw-r--r--packaging/rpm.spec334
-rw-r--r--packaging/rpmconfigcheck80
11 files changed, 1051 insertions, 0 deletions
diff --git a/packaging/db-4.8.30-integration.dif b/packaging/db-4.8.30-integration.dif
new file mode 100644
index 000000000..dbfb2939f
--- /dev/null
+++ b/packaging/db-4.8.30-integration.dif
@@ -0,0 +1,82 @@
+--- db/db/db.c.orig 2010-04-12 20:25:22.000000000 +0000
++++ db/db/db.c 2011-05-12 11:38:59.000000000 +0000
+@@ -646,6 +646,8 @@ __env_mpool(dbp, fname, flags)
+ MAKE_INMEM(dbp);
+ return (ret);
+ }
++ if (LF_ISSET(DB_NOFSYNC) && mpf->mfp)
++ F_SET(mpf->mfp, MP_NOFSYNC);
+
+ /*
+ * Set the open flag. We use it to mean that the dbp has gone
+--- db/db/db_iface.c.orig 2010-04-12 20:25:22.000000000 +0000
++++ db/db/db_iface.c 2011-05-12 11:21:32.000000000 +0000
+@@ -1230,6 +1230,7 @@ __db_open_arg(dbp, txn, fname, dname, ty
+ #define OKFLAGS \
+ (DB_AUTO_COMMIT | DB_CREATE | DB_EXCL | DB_FCNTL_LOCKING | \
+ DB_MULTIVERSION | DB_NOMMAP | DB_NO_AUTO_COMMIT | DB_RDONLY | \
++ DB_NOFSYNC | \
+ DB_RDWRMASTER | DB_READ_UNCOMMITTED | DB_THREAD | DB_TRUNCATE)
+ if ((ret = __db_fchk(env, "DB->open", flags, OKFLAGS)) != 0)
+ return (ret);
+--- db/dbinc/mp.h.orig 2010-04-12 20:25:22.000000000 +0000
++++ db/dbinc/mp.h 2011-05-12 12:01:32.000000000 +0000
+@@ -467,6 +467,7 @@ struct __mpoolfile {
+ #define MP_FAKE_UOC 0x080 /* Unlink_on_close field: fake flag. */
+ #define MP_NOT_DURABLE 0x100 /* File is not durable. */
+ #define MP_TEMP 0x200 /* Backing file is a temporary. */
++#define MP_NOFSYNC 0x400 /* Don't fsync */
+ u_int32_t flags;
+ };
+
+--- db/dbinc_auto/api_flags.in.orig 2011-05-12 11:40:57.000000000 +0000
++++ db/dbinc_auto/api_flags.in 2011-05-12 11:55:10.000000000 +0000
+@@ -83,6 +83,7 @@
+ #define DB_NOORDERCHK 0x00000002
+ #define DB_NOPANIC 0x00000800
+ #define DB_NO_AUTO_COMMIT 0x00001000
++#define DB_NOFSYNC 0x00040000
+ #define DB_ODDFILESIZE 0x00000080
+ #define DB_ORDERCHKONLY 0x00000004
+ #define DB_OVERWRITE 0x00001000
+--- db/dist/s_config.orig 2010-04-12 20:25:23.000000000 +0000
++++ db/dist/s_config 2011-05-12 12:00:34.000000000 +0000
+@@ -8,7 +8,8 @@ trap 'rm -f aclocal.m4 ; exit 0' 0 1 2 3
+ . ./RELEASE
+
+ echo "autoconf: building aclocal.m4..."
+-cat aclocal/*.m4 aclocal_java/*.m4 > aclocal.m4
++cat aclocal/*.m4 aclocal_java/*.m4 > acinclude.m4
++aclocal
+
+ echo "autoconf: running autoheader to build config.hin..."
+ rm -f config.hin
+--- db/mp/mp_sync.c.orig 2010-04-12 20:25:34.000000000 +0000
++++ db/mp/mp_sync.c 2011-05-12 11:36:58.000000000 +0000
+@@ -578,7 +578,7 @@ done: /*
+ if (ret == 0 && required_write) {
+ if (dbmfp == NULL)
+ ret = __memp_sync_files(env);
+- else
++ else if (!F_ISSET(dbmfp->mfp, MP_NOFSYNC))
+ ret = __os_fsync(env, dbmfp->fhp);
+ }
+
+@@ -665,7 +665,7 @@ __memp_sync_file(env, mfp, argp, countp,
+ "%s: unable to flush", (char *)
+ R_ADDR(dbmp->reginfo, mfp->path_off));
+ }
+- } else
++ } else if (!F_ISSET(dbmfp->mfp, MP_NOFSYNC))
+ ret = __os_fsync(env, dbmfp->fhp);
+
+ /*
+@@ -801,6 +801,8 @@ __memp_mf_sync(dbmp, mfp, locked)
+ COMPQUIET(hp, NULL);
+ env = dbmp->env;
+
++ if (F_ISSET(mfp, MP_NOFSYNC))
++ return 0;
+ /*
+ * We need to be holding the hash lock: we're using the path name
+ * and __memp_nameop might try and rename the file.
diff --git a/packaging/db-4.8.30.tar.bz2 b/packaging/db-4.8.30.tar.bz2
new file mode 100644
index 000000000..794dc770b
--- /dev/null
+++ b/packaging/db-4.8.30.tar.bz2
Binary files differ
diff --git a/packaging/device-sec-policy b/packaging/device-sec-policy
new file mode 100644
index 000000000..83c0c46eb
--- /dev/null
+++ b/packaging/device-sec-policy
@@ -0,0 +1,46 @@
+<config>
+ <sw_source name="root" rankkey="/10020/10000.root">
+ <origin>
+ <keyinfo>
+mQENBE6MJTABCAC6pAFNW9tCbLQtgmwxzNf7ftSL5RrsjVTlPtpyeFLhxSmqmeHr
+KB10C6Co1zYB/fW8zvGXU613g3WEo4SKlS2lnOVBxviet0qn58zwCQASbdFYtckk
+thtkxiSInoKbj4n/Z+hHB9dvcyqcWqp2IFQEDDpxgP4KuzCvvj6W+e9EtYsdGt9P
+ZHsVjIAe0w+j7Hs4Q7FYWD+mdQAjgBsLlc16Ci8EPYnvBL/xdbJ3Ryfi59tTdfGG
+HnwpjM2J1WshooyvsOtHZU+T1nHtuegEzdRMVFo502Lkb60dJRsREE2iyPWFX2TE
+ZdaQqUMmkPaROUlWhGBSWIKbOVARwWBn94KDABEBAAG0CXJvb3QudGVzdIkBPgQT
+AQIAKAUCTowlMAIbAwUJA8JnAAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQ
+TTk+Qq2l7P210wgApKVLpdve9jDsy/y//gSAGvfA4fXFuGhHkH5+QW7L+QkUAo0Z
+vv0KB0Pw5qZjV+k8jlq3Q3f/vcIEKxc40d0coa3m+bUlL2vy0+0gLSTiZ4MNFAk5
+LvJgEj+7ks75/qtJVWfCZeXo9NiugSoW9D+jNflmfstd8k2wT2ucH7IJHHzK1lGm
+vZHXeJeSULRHiibVyK5cG+NH/1Akuxkgo2jOzqhLjhp4/UiJlyAD0k/J4ULfmWp8
+C9/sIhWBoS5OcrtMVQtUMTx85I2dEC/01hnfLUk8mi5VscLu3xQoJ9hNrMEgji6H
+S+MmxcPGnVziEA0Z7VNN6DpuG/xZ1i9fgXXVfLkBDQROjCUwAQgA6fyD7eqaoah/
+za0X+Xv3o1y52UHmeHMmyzM/W4UlVsd01h7KzSHWyQKHi0i0pxRtUj+pkV+r+QjV
+BiAowq2HVpyXsmre29PEgAuIVv6/pZjfZEWFKjSDsvdXpS+mT+J6LjRxYh7ZbGvv
+SR3hMiMocWYENj13XDRw5USGhC0UxlmmMfjQfWJ6eHeQTiyZWW+CZUAJ2IbEkPVP
+nBDH/fTuVMfOo4g0HwqUSJmwV47BPLec1ArSaPG1YgKX1Y+UYoNfUvo/ieiF59At
+A8UbjQMzZggIfkvJsDL8U5n4ojFL8Rs/aMYuH76OlA4wuKPAnBSt+fVBnjaAAadf
+FCy/CHZt/wARAQABiQElBBgBAgAPBQJOjCUwAhsMBQkDwmcAAAoJEE05PkKtpez9
+S7IH/j44MxOP6dAycQAreWVAzdMiw82DjP7c6jMxYZj8ss1x++iO5GW82qm0WJ6h
+IOEdll+wBhPX0acKvE4KrlNzfsB2WzDRwOyiZfuSQI0J3Jrytj8zyCVKwHTsI8VC
+RkOzaMYsEqmPc+ve+wxxcwWXC0EtoyhMRjRZlMy55IeJcEfM8bcE4wcsyotsura6
+o1fmU223Xj1k5xXxDvXalPUoXnhvsev7kMBnIQRac194qkSkTzVXGLGu5Ng7Bfxl
+BMhf6RSk31+Q43ASbn4ralnswMhsHSatJIeasbHyvsTJzMnfEoSdpb8/dQI8KnHf
+tRrR5cbqmVr8tkFjS/QK6TWfNMM=
+</keyinfo>
+ </origin>
+ <package name="unknown-sw-source"/>
+ <package name="ac-domain-system">
+ <provide>
+ <ac_domain name="_" policy="shared"/>
+ <ac_domain name="Isolated"/>
+ </provide>
+ </package>
+ <package name="root"/>
+ <sw_source name="_default_" rankkey="/10020/11000/10000._default_">
+ <allow>
+ <ac_domain match="*"/>
+ </allow>
+ </sw_source>
+ </sw_source>
+</config>
diff --git a/packaging/find-docs.sh b/packaging/find-docs.sh
new file mode 100644
index 000000000..afe4e22b7
--- /dev/null
+++ b/packaging/find-docs.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+usage () {
+cat << EOF
+Usage: $0 TOP_DIR
+
+EOF
+exit 1
+}
+
+if [ -z "$1" ] ; then usage
+elif [ $1 = / ] ; then echo $0: expects non-/ argument for '$1' 1>&2
+elif [ ! -d $1 ] ; then
+ echo $0: $1: no such directory
+ exit 1
+else TOP_DIR="`echo $1|sed -e 's:/$::'`"
+fi
+shift
+
+DOC_NAME=documentation.list
+touch $DOC_NAME
+
+find $TOP_DIR -type f -o -type l | sed '
+s:'"$TOP_DIR"'::
+s:\(.*/man/man./.*\.[0-9]\):%doc \1:
+s:\(.*/man/*/man./.*\.[0-9]\):%doc \1:
+s:\(.*/gtk-doc/html/.*\):%doc \1:
+s:\(.*/info/.*\info.*\):%doc \1:
+s:^\([^%].*\)::
+/^$/d' >> $DOC_NAME
+
+
+exit 0
diff --git a/packaging/find-provides.ksyms b/packaging/find-provides.ksyms
new file mode 100755
index 000000000..c8f2ccda6
--- /dev/null
+++ b/packaging/find-provides.ksyms
@@ -0,0 +1,41 @@
+#! /bin/sh
+
+IFS=$'\n'
+
+case "$1" in
+kernel-module-*) ;; # Fedora kernel module package names start with
+ # kernel-module.
+kernel*) kernel_flavor=${1#kernel-} ;;
+esac
+
+trap 'rm -f "$tmp"' EXIT
+tmp=$(mktemp)
+while read f; do
+ test -e "$f" || continue
+ case "$f" in
+ *.debug)
+ continue
+ ;;
+ */lib/modules/*/*.ko | */lib/modules/*/*.ko.gz | */boot/vmlinu[xz]*)
+ ;;
+ *)
+ continue
+ esac
+ unzip=false
+ case "$f" in
+ *.gz | */boot/vmlinuz*)
+ unzip=true
+ esac
+ if $unzip && gzip -cd "$f" >"$tmp"; then
+ f=$tmp
+ fi
+ flavor=$(/usr/sbin/modinfo -F vermagic "$f")
+ flavor=${flavor%% *}
+ flavor=${flavor##*-}
+ if test -z "$flavor"; then
+ flavor=$kernel_flavor
+ fi
+ nm "$f" \
+ | sed -r -ne "s/^0*([0-9a-f]+) A __crc_(.+)/ksym($flavor:\\2) = \\1/p"
+done \
+| sort -u
diff --git a/packaging/libsymlink.attr b/packaging/libsymlink.attr
new file mode 100644
index 000000000..fc9ed82b4
--- /dev/null
+++ b/packaging/libsymlink.attr
@@ -0,0 +1,4 @@
+# Make libfoo.so symlinks require the soname-provide of the target library
+%__libsymlink_requires %{_rpmconfigdir}/elfdeps --provides --soname-only
+%__libsymlink_magic ^symbolic link to .*lib.*\.so\..*$
+%__libsymlink_exclude_path ^.*[[:digit:]\]$|^/usr/lib/debug/
diff --git a/packaging/rpm-tizen_macros b/packaging/rpm-tizen_macros
new file mode 100644
index 000000000..d20c04d66
--- /dev/null
+++ b/packaging/rpm-tizen_macros
@@ -0,0 +1,324 @@
+# directories
+%_infodir %{_prefix}/share/info
+%_mandir %{_prefix}/share/man
+%_sysconfdir /etc
+%_localstatedir /var
+%_defaultdocdir %{_usr}/share/doc/packages
+
+# _rootprefix can be set to (/,%{_prefix}) to customize systemd installation)
+%_rootprefix %{_prefix}
+%_unitdir_user %{_prefix}/lib/systemd/user
+%_unitdir %{_rootprefix}/lib/systemd/system
+
+# package build macros
+# %make_install make install DESTDIR=%{?buildroot}
+# %makeinstall make DESTDIR=%{?buildroot:%{buildroot}} install
+%rb_arch %(echo %{_host_cpu}-linux | sed -e "s/i686/i586/" -e "s/armv5tel/armv4l/" -e "s/hppa2.0/hppa/")
+%rb_ver %(/usr/bin/ruby -e 'puts VERSION.sub(/\\\.\\\d$/, "")')
+
+# external kernel module helper macro(s)
+%kernel_devel_uname_r %(/bin/rpm -q --provides $(/bin/rpm -q --whatprovides kernel-devel-uname-r) | sed -ne 's,kernel-devel-uname-r = ,, p')
+%kernel_release %(/bin/rpm -q --queryformat '%{RPMTAG_VERSION}-%{RPMTAG_RELEASE}' $(/bin/rpm -q --whatprovides kernel))
+%kernel_name %(/bin/rpm -q --queryformat '%{RPMTAG_NAME}' $(/bin/rpm -q --whatprovides kernel))
+
+# this script calls all scripts in /usr/lib/rpm/brp-tizen.d
+%__arch_install_post /usr/lib/rpm/check-buildroot
+
+%__strip_install_post \
+ %{!?__debug_package:/usr/lib/rpm/brp-strip %{__strip}} \
+ /usr/lib/rpm/brp-strip-static-archive %{__strip} \
+# /usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump} \
+%{nil}
+
+%__os_install_post \
+ /usr/lib/rpm//brp-compress \
+ %{!?_rpm_strip_disable:%{__strip_install_post}}\
+ /usr/lib/rpm/brp-python-hardlink \
+ %{!?disable_docs_package:/usr/lib/rpm/tizen/find-docs.sh %{buildroot}} \
+%{nil}
+
+# /usr/lib/rpm/tizen/brp-implant-ident-static
+
+%__spec_install_post\
+ %{?__debug_package:%{__debug_install_post}}\
+ %{__arch_install_post}\
+ %{__os_install_post}\
+%{nil}
+
+# macro: %configure_kernel_source
+#
+#
+%configure_kernel_source() \
+ if test -d /usr/src/linux ; then \
+ pushd /usr/src/linux \
+ test -f .config || cp arch/%_arch/defconfig.default .config \
+ yes "" | make oldconfig \
+ make dep \
+ popd \
+ fi \
+ %nil
+
+%install_info(:-:) \
+ ALL_ARGS=(%{**}) \
+ NUM_ARGS=${#ALL_ARGS[@]} \
+ if test -x /sbin/install-info ; then \
+ if test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \
+ /sbin/install-info "${ALL_ARGS[@]}" \
+ fi \
+ fi ;
+
+%install_info_delete(:-:) \
+ ALL_ARGS=(%{**}) \
+ NUM_ARGS=${#ALL_ARGS[@]} \
+ if test -x /sbin/install-info ; then \
+ if ! test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \
+ /sbin/install-info --quiet --delete "${ALL_ARGS[@]}" \
+ fi ; \
+ fi ;
+
+# find-supplements.ksyms parses this macro directly out of the spec file:
+%supplements_kernel_module() \
+ %{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)}
+
+%do_profiling 1
+%cflags_profile_generate -fprofile-generate
+%cflags_profile_feedback -fprofile-use
+
+
+
+# Tizen
+#
+%configure \
+ CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
+ CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
+ FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
+ ./configure --build=%{_build} --host=%{_host} \\\
+ --program-prefix=%{?_program_prefix} \\\
+ --prefix=%{_prefix} \\\
+ --exec-prefix=%{_exec_prefix} \\\
+ --bindir=%{_bindir} \\\
+ --sbindir=%{_sbindir} \\\
+ --sysconfdir=%{_sysconfdir} \\\
+ --datadir=%{_datadir} \\\
+ --includedir=%{_includedir} \\\
+ --libdir=%{_libdir} \\\
+ --libexecdir=%{_libexecdir} \\\
+ --localstatedir=%{_localstatedir} \\\
+ --sharedstatedir=%{_sharedstatedir} \\\
+ --mandir=%{_mandir} \\\
+ --infodir=%{_infodir}
+
+
+%reconfigure \
+ CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
+ CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
+ FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
+ autoreconf -v --install --force || exit 1 \
+ ./configure --build=%{_build} --host=%{_host} \\\
+ --program-prefix=%{?_program_prefix} \\\
+ --prefix=%{_prefix} \\\
+ --exec-prefix=%{_exec_prefix} \\\
+ --bindir=%{_bindir} \\\
+ --sbindir=%{_sbindir} \\\
+ --sysconfdir=%{_sysconfdir} \\\
+ --datadir=%{_datadir} \\\
+ --includedir=%{_includedir} \\\
+ --libdir=%{_libdir} \\\
+ --libexecdir=%{_libexecdir} \\\
+ --localstatedir=%{_localstatedir} \\\
+ --sharedstatedir=%{_sharedstatedir} \\\
+ --mandir=%{_mandir} \\\
+ --infodir=%{_infodir}
+
+%autogen \
+ CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
+ CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
+ FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
+ ./autogen.sh --build=%{_build} --host=%{_host} \\\
+ --program-prefix=%{?_program_prefix} \\\
+ --prefix=%{_prefix} \\\
+ --exec-prefix=%{_exec_prefix} \\\
+ --bindir=%{_bindir} \\\
+ --sbindir=%{_sbindir} \\\
+ --sysconfdir=%{_sysconfdir} \\\
+ --datadir=%{_datadir} \\\
+ --includedir=%{_includedir} \\\
+ --libdir=%{_libdir} \\\
+ --libexecdir=%{_libexecdir} \\\
+ --localstatedir=%{_localstatedir} \\\
+ --sharedstatedir=%{_sharedstatedir} \\\
+ --mandir=%{_mandir} \\\
+ --infodir=%{_infodir}
+
+
+%makeinstall \
+ %{__make} \\\
+ prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\
+ exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\
+ bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\
+ sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\
+ sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\
+ datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\
+ includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\
+ libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\
+ libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\
+ localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\
+ sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\
+ mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\
+ infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
+ install
+
+
+%make_install \
+ %{__make} \\\
+ DESTDIR=%{?buildroot:%{buildroot}} \\\
+ INSTALL_ROOT=%{?buildroot:%{buildroot}} \\\
+ install \
+ rm -f %{?buildroot:%{buildroot}}%{_infodir}/dir \
+ find %{?buildroot:%{buildroot}} -regex ".*\\.la$" | xargs rm -f -- \
+ %{!?keepstatic:find %{?buildroot:%{buildroot}} -regex ".*\\.a$" | xargs rm -f --}
+
+%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
+ && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
+ [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
+
+%lang_package(n:f:) \
+%package %{-n:-n %{-n*}-}locale \
+Summary: Translations and Locale for package %{name}\
+Requires: %{-n:%{-n*}}%{!-n:%{name}} = %{version} \
+Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \
+BuildArch: noarch \
+%description %{-n:-n %{-n*}-}locale\
+This package provides translations for package %{name}.\
+%files %{-n:-n %{-n*}-}locale -f %{-f:%{-f*}.lang} %{!-f:%{name}.lang}\
+%defattr(-,root,root,-)\
+%{nil}
+
+%docs_package \
+%package docs \
+Summary: Documentation for package %{name}\
+AutoReqProv: 0\
+%description docs\
+This package provides documentation for package %{name}.\
+%files docs -f documentation.list\
+%defattr(-,root,root,-)\
+%{nil}
+
+# Bad hack to set $LANG to C during all RPM builds
+%prep \
+%%prep\
+LANG=C\
+export LANG\
+unset DISPLAY\
+%{nil}
+
+%build %%build\
+LANG=C\
+export LANG\
+unset DISPLAY\
+CFLAGS="%optflags" ; export CFLAGS ; \
+CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
+FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
+LDFLAGS="${LDFLAGS:-%{?global_LDFLAGS}}"; export LDFLAGS ; \
+LD_AS_NEEDED=1; export LD_AS_NEEDED ; \
+%{nil}
+
+%install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
+%%install\
+LANG=C\
+export LANG\
+unset DISPLAY\
+rm -rf %{?buildroot:%{buildroot}} \
+mkdir -p %{?buildroot:%{buildroot}} \
+%{nil}
+
+
+%clean %%clean\
+rm -rf %{?buildroot:%{buildroot}} \
+%{nil}
+
+%find_lang /usr/lib/rpm/find-lang.sh %{buildroot}
+%find_docs /usr/lib/rpm/tizen/find-docs.sh %{buildroot}
+
+
+
+#==============================================================================
+# ---- default .desktop directories per the desktop-entry freedesktop.org spec
+
+%_desktopdir %{_datadir}/applications
+
+#==============================================================================
+# ---- Generic auto req/prov filtering macros
+#
+# http://fedoraproject.org/wiki/PackagingDrafts/AutoProvidesAndRequiresFiltering
+
+# prevent anything matching from being scanned for provides
+%filter_provides_in(P) %{expand: \
+%global __filter_prov_cmd %{?__filter_prov_cmd} %{__grep} -v %{-P} '%*' | \
+}
+
+# prevent anything matching from being scanned for requires
+%filter_requires_in(P) %{expand: \
+%global __filter_req_cmd %{?__filter_req_cmd} %{__grep} -v %{-P} '%*' | \
+}
+
+# filter anything matching out of the provides stream
+%filter_from_provides() %{expand: \
+%global __filter_from_prov %{?__filter_from_prov} | %{__sed} -e '%*' \
+}
+
+# filter anything matching out of the requires stream
+%filter_from_requires() %{expand: \
+%global __filter_from_req %{?__filter_from_req} | %{__sed} -e '%*' \
+}
+
+# actually set up the filtering bits
+%filter_setup %{expand: \
+%global _use_internal_dependency_generator 0 \
+%global __deploop() while read FILE; do /usr/lib/rpm/rpmdeps -%{1} ${FILE}; done | /bin/sort -u \
+%global __find_provides /bin/sh -c "%{?__filter_prov_cmd} %{__deploop P} %{?__filter_from_prov}" \
+%global __find_requires /bin/sh -c "%{?__filter_req_cmd} %{__deploop R} %{?__filter_from_req}" \
+}
+
+%remove_docs \
+ rm -rf %{?buildroot:%{buildroot}}%{_infodir} \
+ rm -rf %{?buildroot:%{buildroot}}%{_defaultdocdir} \
+ rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc/%{name} \
+ rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc/%{name}-%{version} \
+ rm -rf %{?buildroot:%{buildroot}}%{_datadir}/gtk-doc \
+ rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc \
+ rm -rf %{?buildroot:%{buildroot}}%{_datadir}/man \
+ find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]" | xargs rm -f -- \
+ find %{?buildroot:%{buildroot}} -regex ".*/man/../man./.*\.[0-9]" | xargs rm -f -- \
+ find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]pm" | xargs rm -f --
+
+
+%install_service() \
+mkdir -p %{buildroot}/%{_unitdir}/%{1} \
+ln -s ../%{2} %{buildroot}/%{_unitdir}/%{1}/%{2} \
+%{nil}
+
+
+%_fontsdir %{_usr}/share/fonts
+%_ttfontsdir %{_fontsdir}/truetype
+%_miscfontsdir %{_fontsdir}/misc
+%_fontsconfdir %{_sysconfdir}/fonts
+%_fontsconfddir %{_fontsconfdir}/conf.d
+%_fontsconfavaildir %{_datadir}/%{name}/conf.avail
+
+%devel_package \
+%package devel \
+Summary: Development files for package %{name}\
+Group: Development\
+%description devel\
+This package provides header files and other developer releated files for package %{name}.\
+%files devel \
+%{_includedir}/*\
+%{_libdir}/pkgconfig/*.pc\
+%{_libdir}/*.so\
+%{nil}
+
+%devel_desc This package contains all necessary include files and libraries needed \
+to develop applications that require %{name}.\
+%{nil}
+
diff --git a/packaging/rpm.changes b/packaging/rpm.changes
new file mode 100644
index 000000000..c654c5e8b
--- /dev/null
+++ b/packaging/rpm.changes
@@ -0,0 +1,102 @@
+* Wed Jan 29 2014 Patrick McCarty <patrick.mccarty@linux.intel.com> 940f59b
+- Add three new RPM macros to use in packages with build dependencies on a
+ platform's kernel and/or kernel-devel package. The macros are
+ '%kernel_devel_uname_r', '%kernel_release', and '%kernel_name'.
+
+* Fri Jan 17 2014 Mikko Ylinen <mikko.ylinen@intel.com> accepted/tizen/generic/20140106.135159@e9e247d
+- MSM: fix access type length and validation
+- Security plugin: change policy to advisory
+- Security plugin: adding support for l access type
+
+* Tue Dec 03 2013 Rusty Lynch <rusty.lynch@intel.com> accepted/tizen/20131115.212447@d460069
+- Security plugin: removing exec label restriction
+
+* Fri Nov 15 2013 Rusty Lynch <rusty.lynch@intel.com> accepted/tizen/20131108.201843@93d4902
+- Fix rpmlint error
+- PTREL-155: fix build python-rpm
+- armv7l:fix faulty line in rpmrc.in
+- msm: check libxml/{xmlreader,tree}.h
+- Security plugin: Removing definition of System domain from default device policy
+
+* Wed Sep 25 2013 Jacek Bukarewicz <j.bukarewicz@samsung.com> accepted/tizen/20130916.211819@a771cdf
+- Introduction of -locale and -docs subpackages. Moved package to another group
+- update changes
+
+* Mon Sep 16 2013 Anas Nashif <anas.nashif@intel.com> accepted/tizen/20130913.024734@b487cf5
+- remove --target from %configure macros
+
+* Mon Sep 02 2013 Anas Nashif <anas.nashif@intel.com> submit/tizen/20130820.223822@6ebf41a
+- Security plugin: adding checking of return code for dbus policy verification
+
+* Wed Aug 21 2013 Anas Nashif <anas.nashif@intel.com> submit/tizen/20130820.223822@6ec9c11
+- Security plugin: small fixes
+- Security plugin: removing disable-dchecks option
+- update changes and release
+
+* Mon Aug 05 2013 Anas Nashif <anas.nashif@intel.com> accepted/tizen/20130710.214747@675aeea
+- Security plugin: support for --root option
+- Security plugin: pkg_name allocation in conflict
+- Security plugin: allowing multiple domains definition
+- resetting manifest requested domain to floor
+- update changelog
+
+* Wed Jun 12 2013 Anas Nashif <anas.nashif@intel.com> accepted/tizen/20130520.094313@a3c78e0
+- update macros from project conf
+- Security plugin: Adding configuration option --disable-dchecks
+- Security-plugin: Fix the null pointer comparison possibility in msmXattrSupport
+- Set license using %license
+- Fix 32bit kernel builds by not using eu-strip
+- Cleaning up code identation
+- Fix the missing path prefix for Plugin init hook
+- Fixes to rpm security plugin - stricter control over smack64exec label assigment - strciter control over dbus interface labels
+- Add VCS tag into .src.rpm
+- add find-provides.ksyms
+
+* Fri Mar 29 2013 Anas Nashif <anas.nashif@intel.com> submit/trunk/20130322.180734@fcbf4ed
+- find-provides.ksyms added for kernel packages and symbols
+
+* Fri Mar 29 2013 Anas Nashif <anas.nashif@intel.com> submit/trunk/20130322.180734@fcbf4ed
+- init message test [Elena Reshetova]
+- Adding Isolated domain to policy [Elena Reshetova]
+- Changing smack load path [Elena Reshetova]
+
+* Fri Mar 22 2013 Anas Nashif <anas.nashif@intel.com> submit/trunk/20130318.200853@1a584da
+- Fixed package groups
+
+* Mon Mar 18 2013 Anas Nashif <anas.nashif@intel.com> accepted/trunk/20130309.052847@1a584da
+- Adding a new attribute tag to manifest [Elena Reshetova]
+
+* Mon Mar 04 2013 Anas Nashif <anas.nashif@intel.com> submit/trunk/20130207.030314@31fe202
+- Fixed package groups
+- add macro no_lang_C
+- update find-lang
+- Call ldconfig
+- Include %{VCS} in rpm -q --info output
+
+* Wed Feb 06 2013 Anas Nashif <anas.nashif@intel.com> submit/trunk/20130206.154747@e2d13a6
+- Call ldconfig
+
+* Wed Feb 06 2013 Anas Nashif <anas.nashif@intel.com> submit/trunk/20130203.005409@caedd28
+- Move libs back to main package
+
+* Sat Feb 02 2013 Anas Nashif <anas.nashif@intel.com> rpm-4.11.0-release@531803c
+- Update to 4.11.0.1
+
+* Tue Jan 29 2013 Markus Lehtonen <markus.lehtonen@linux.intel.com> accepted/trunk/20130119.012137@c917b46
+- Temporally making loading of a configured plugin optional [Elena Reshetova]
+
+* Thu Jan 17 2013 Anas Nashif <anas.nashif@intel.com> submit/trunk/20130117.002510@77a88bd
+- fixing error in cleanup if magic db can't be loaded [Elena Reshetova]
+
+* Wed Jan 16 2013 Anas Nashif <anas.nashif@intel.com> accepted/trunk/20130114.165627@8999b08
+- Enable security plugin/Smack
+
+* Mon Jan 14 2013 Anas Nashif <anas.nashif@intel.com> accepted/trunk/20121215.193208@ed3861a
+- Move build related files to rpm-build
+
+* Sat Dec 15 2012 Anas Nashif <anas.nashif@intel.com> submit/trunk/20121215.171010@735e3f1
+- cleanup macros
+
+* Sat Dec 15 2012 Anas Nashif <anas.nashif@intel.com> rpm-4.11.0-beta1@be4c7d8
+- Update to 4.11 beta1
+
diff --git a/packaging/rpm.manifest b/packaging/rpm.manifest
new file mode 100644
index 000000000..017d22d3a
--- /dev/null
+++ b/packaging/rpm.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/rpm.spec b/packaging/rpm.spec
new file mode 100644
index 000000000..702817fc3
--- /dev/null
+++ b/packaging/rpm.spec
@@ -0,0 +1,334 @@
+%define rpmlibdir %{_prefix}/lib
+%define rpmhome %{rpmlibdir}/rpm
+
+Name: rpm
+Summary: The Package Manager
+License: GPL-2.0+
+Group: Base/Package Management
+Version: 4.13.0
+Release: 0
+Url: http://www.rpm.org
+BuildRequires: binutils
+BuildRequires: bzip2
+BuildRequires: file-devel
+BuildRequires: findutils
+BuildRequires: gcc
+BuildRequires: gettext-tools
+BuildRequires: glibc-devel
+BuildRequires: gzip
+BuildRequires: libacl-devel
+BuildRequires: libattr-devel
+BuildRequires: pkgconfig(bzip2)
+BuildRequires: pkgconfig(libcap)
+BuildRequires: libelf-devel
+BuildRequires: libtool
+BuildRequires: pkgconfig(lua)
+BuildRequires: make
+BuildRequires: pkgconfig(ncurses)
+BuildRequires: patch
+BuildRequires: pkgconfig(popt)
+BuildRequires: xz-devel
+BuildRequires: pkgconfig(zlib)
+BuildRequires: pkgconfig(nss)
+BuildRequires: uthash-devel
+BuildRequires: pkgconfig(libxml-2.0)
+BuildRequires: pkgconfig(libsmack)
+BuildRequires: fdupes
+
+Provides: rpminst
+Provides: rpm-libs
+
+Source1: db-4.8.30.tar.bz2
+Source2: db-4.8.30-integration.dif
+Source4: rpm-tizen_macros
+Source8: rpmconfigcheck
+Source13: find-docs.sh
+Source22: device-sec-policy
+Source23: find-provides.ksyms
+Source1001: rpm.manifest
+Source0: rpm-%{version}.tar.bz2
+Source9: libsymlink.attr
+
+# avoid bootstrapping problem
+%define _binary_payload w9.bzdio
+
+%description
+RPM Package Manager is the main tool for managing the software packages
+of Tizen.
+
+RPM can be used to install and remove software packages. With rpm, it
+is easy to update packages. RPM keeps track of all these manipulations
+in a central database. This way it is possible to get an overview of
+all installed packages. RPM also supports database queries.
+
+%package devel
+Summary: Include Files and Libraries mandatory for Development
+Requires: rpm = %{version}
+Requires: pkgconfig(popt)
+
+%description devel
+This package contains the RPM C library and header files. These
+development files will simplify the process of writing programs which
+manipulate RPM packages and databases and are intended to make it
+easier to create graphical package managers or any other tools that
+need an intimate knowledge of RPM packages in order to function.
+
+%package build
+Summary: Tools and Scripts to create rpm packages
+Requires: rpm = %{version}
+Provides: rpmbuild rpm:%{_bindir}/rpmbuild
+Requires: bzip2
+Requires: xz
+Requires: gzip
+Requires: binutils
+Requires: make
+Requires: gcc
+Requires: findutils
+Requires: patch
+Requires: glibc-devel
+
+%description build
+If you want to build a rpm, you need this package. It provides rpmbuild
+and requires some packages that are usually required
+
+%package security-plugin
+Summary: MSM security plugin for rpm
+Requires: rpm = %{version}-%{release}
+Requires: smack
+Requires: nss
+
+%description security-plugin
+This package contains the MSM security plugin for rpm that performs
+security-related functionality.
+
+%post security-plugin
+echo "%__transaction_plugins msm" >> /usr/lib/rpm/macros
+echo "%__plugindir %{_libdir}/rpm-plugins" >> /usr/lib/rpm/macros
+echo "%__transaction_msm %{__plugindir}/msm.so" >> /usr/lib/rpm/macros
+echo "%__transaction_msm_default_policy %{_libdir}/rpm-plugins/msm-device-sec-policy" >> /usr/lib/rpm/macros
+
+%package -n python-rpm
+Summary: Python Bindings for Manipulating RPM Packages
+Requires: rpm = %{version}
+BuildRequires: pkgconfig(python)
+
+%description -n python-rpm
+The python-rpm package contains a module that permits applications
+written in the Python programming language to use the interface
+supplied by RPM Package Manager libraries.
+
+This package should be installed if you want to develop Python programs
+that will manipulate RPM packages and databases.
+
+%prep
+%setup -q -n rpm-%{version}
+cp %{SOURCE1001} .
+rm -rf sqlite
+tar xjf %{S:1}
+ln -sfn db-4.8.30 db
+chmod -R u+w db/*
+# will get linked from db3
+rm -f rpmdb/db.h
+patch -p0 < %{S:2}
+if [ -s %{_sysconfdir}/rpm/tizen_macros ]; then
+ cp -a %{_sysconfdir}/rpm/tizen_macros %{SOURCE4}
+fi
+cp -a %{SOURCE4} tizen_macros
+rm -f m4/libtool.m4
+rm -f m4/lt*.m4
+
+%build
+CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`"
+export CPPFLAGS
+export CFLAGS="%{optflags} -ffunction-sections"
+export LDFLAGS="${LDFLAGS} -Wl,-Bsymbolic-functions -ffunction-sections"
+%ifarch armv5tel
+export CFLAGS="-g -O0 -fno-strict-aliasing -ffunction-sections"
+%endif
+
+%reconfigure \
+ --disable-dependency-tracking \
+ --with-lua \
+ --with-acl \
+ --with-cap \
+ --enable-shared \
+ --enable-python \
+ --with-vendor=tizen \
+ --with-msm
+
+make %{?_smp_mflags}
+
+%install
+mkdir -p %{buildroot}%{rpmlibdir}
+mkdir -p %{buildroot}%{_datadir}/locale
+ln -s ../share/locale %{buildroot}%{rpmlibdir}/locale
+%make_install
+install -m 644 db3/db.h %{buildroot}%{_includedir}/rpm
+mkdir -p %{buildroot}%{_sysconfdir}/rpm
+cp -a tizen_macros %{buildroot}%{rpmhome}
+mkdir -p %{buildroot}%{rpmhome}/tizen
+install -m 755 %{SOURCE13} %{buildroot}%{rpmhome}/tizen
+install -m 755 %{SOURCE23} %{buildroot}%{rpmhome}
+install -m 644 %{SOURCE9} %{buildroot}%{rpmhome}/fileattrs/libsymlink.attr
+install -m 644 %{SOURCE22} %{buildroot}%{_sysconfdir}/device-sec-policy
+install -m 644 %{SOURCE22} %{buildroot}%{__plugindir}/msm-device-sec-policy
+ln -s ../tizen_macros %{buildroot}%{rpmhome}/tizen/macros
+for d in BUILD RPMS SOURCES SPECS SRPMS BUILDROOT ; do
+ mkdir -p %{buildroot}%{_usrsrc}/packages/$d
+ chmod 755 %{buildroot}%{_usrsrc}/packages/$d
+done
+for d in %{buildroot}%{rpmhome}/platform/*-linux/macros ; do
+ dd=${d%%-linux/macros}
+ dd=${dd##*/}
+ mkdir -p %{buildroot}%{_usrsrc}/packages/RPMS/$dd
+ chmod 755 %{buildroot}%{_usrsrc}/packages/RPMS/$dd
+done
+mkdir -p %{buildroot}%{_localstatedir}/lib/rpm
+gzip -9 %{buildroot}%{_mandir}/man[18]/*.[18]
+export RPM_BUILD_ROOT
+chmod 755 doc/manual
+rm -rf doc/manual/Makefile*
+rm -f %{buildroot}%{rpmlibdir}/rpmpopt
+rm -rf %{buildroot}%{_mandir}/{fr,ja,ko,pl,ru,sk}
+rm -f %{buildroot}%{_datadir}/locale/de/LC_MESSAGES/rpm.mo
+rm -f %{buildroot}%{rpmhome}/cpanflute %{buildroot}%{rpmhome}/cpanflute2
+install -m 755 scripts/find-supplements %{buildroot}%{rpmhome}
+install -m 755 scripts/find-supplements.ksyms %{buildroot}%{rpmhome}
+install -m 755 scripts/firmware.prov %{buildroot}%{rpmhome}
+install -m 755 scripts/debuginfo.prov %{buildroot}%{rpmhome}
+rm -f %{buildroot}%{rpmlibdir}/locale %{buildroot}%{rpmlibdir}/rpmrc
+mkdir -p %{buildroot}%{_sysconfdir}/rpm
+chmod 755 %{buildroot}%{_sysconfdir}/rpm
+mkdir -p %{buildroot}%{rpmhome}/macros.d
+# remove some nonsense or non-working scripts
+for f in rpm2cpio.sh rpm.daily rpmdiff* rpm.log rpm.xinetd freshen.sh u_pkg.sh \
+ magic magic.mgc magic.mime* rpmfile *.pl javadeps brp-redhat \
+ vpkg-provides*.sh http.req sql.req tcl.req \
+ rpmdb_* brp-sparc64-linux brp-java-gcjcompile
+do
+ rm -f %{buildroot}%{rpmhome}/$f
+done
+for i in %{_datadir}/automake-*/*; do
+ if test -f "$i" && test -f %{buildroot}%{rpmhome}/"${i##*/}"; then
+ rm -f %{buildroot}%{rpmhome}/"${i##*/}"
+ fi
+done
+%ifarch aarch64 ppc64le
+install -m 755 config.guess %{buildroot}/usr/lib/rpm
+install -m 755 config.sub %{buildroot}/usr/lib/rpm
+%endif
+rm -f %{buildroot}%{_libdir}/*.la
+rm -f %{buildroot}%{__plugindir}/*.la
+
+%fdupes %{buildroot}%{rpmhome}/platform
+
+sh %{buildroot}%{rpmhome}/find-lang.sh %{buildroot} rpm
+
+%ifarch armv7hl armv7l
+# rpm is using the host_cpu as default for the platform,
+#but armv7hl is not known by the kernel.
+# so we need to enforce the platform here.
+echo -n %{_target_cpu}-tizen-linux-gnueabi > %{buildroot}%{_sysconfdir}/rpm/platform
+%endif
+
+%post
+/sbin/ldconfig
+test -f %{_dbpath}/Packages || rpm --initdb
+rm -f %{_dbpath}/Filemd5s \
+ %{_dbpath}/Filedigests \
+ %{_dbpath}/Requireversion \
+ %{_dbpath}/Provideversion
+
+%postun
+/sbin/ldconfig
+
+%files
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%license COPYING
+%{_sysconfdir}/rpm
+/bin/rpm
+%{_bindir}/rpm2cpio
+%{_bindir}/rpmdb
+%{_bindir}/rpmkeys
+%{_bindir}/rpmquery
+%{_bindir}/rpmverify
+%{_bindir}/rpmqpack
+%attr(0755, root, root) %dir %{rpmhome}
+%{rpmhome}/macros
+%{rpmhome}/macros.d
+%{rpmhome}/rpmpopt*
+%{rpmhome}/rpmrc
+%{rpmhome}/tizen/macros
+%{rpmhome}/tizen_macros
+%{rpmhome}/rpm.supp
+%{rpmhome}/tgpg
+%{rpmhome}/platform
+%dir %{__plugindir}
+%{__plugindir}/exec.so
+%{_libdir}/librpm.so.*
+%{_libdir}/librpmio.so.*
+%{_libdir}/librpmbuild.so.*
+%{_libdir}/librpmsign.so.*
+%dir %{_localstatedir}/lib/rpm
+%dir %attr(755,root,root) %{_usrsrc}/packages/BUILD
+%dir %attr(755,root,root) %{_usrsrc}/packages/SPECS
+%dir %attr(755,root,root) %{_usrsrc}/packages/SOURCES
+%dir %attr(755,root,root) %{_usrsrc}/packages/SRPMS
+%dir %attr(755,root,root) %{_usrsrc}/packages/RPMS
+%dir %attr(755,root,root) %{_usrsrc}/packages/BUILDROOT
+%dir %attr(755,root,root) %{_usrsrc}/packages/RPMS/*
+
+%files build
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%{_bindir}/rpmbuild
+%{_bindir}/gendiff
+%{_bindir}/rpmspec
+%{_bindir}/rpmsign
+%{rpmhome}/tizen/find-*
+%{rpmhome}/brp-*
+%{rpmhome}/find-supplements*
+%{rpmhome}/check-*
+%{rpmhome}/debugedit
+%{rpmhome}/find-debuginfo.sh
+%{rpmhome}/find-lang.sh
+%{rpmhome}/find-provides.ksyms
+%{rpmhome}/*provides*
+%{rpmhome}/*requires*
+%{rpmhome}/*deps*
+%{rpmhome}/*.prov
+%{rpmhome}/*.req
+%{rpmhome}/macros.*
+%{rpmhome}/fileattrs
+%ifarch aarch64 ppc64le
+%{rpmhome}/config.*
+%endif
+
+%files devel
+%manifest %{name}.manifest
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/rpmgraph
+%{_includedir}/rpm
+%{_libdir}/librpm.so
+%{_libdir}/librpmbuild.so
+%{_libdir}/librpmio.so
+%{_libdir}/librpmsign.so
+%{_libdir}/pkgconfig/rpm.pc
+
+%files security-plugin
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%{__plugindir}/msm.so
+%{__plugindir}/msm-device-sec-policy
+%config(noreplace) %{_sysconfdir}/device-sec-policy
+
+%files -n python-rpm
+%defattr(-,root,root)
+%{python_sitearch}/rpm
+%attr(755,root,root) %{python_sitearch}/rpm/transaction.py
+
+%lang_package
+
+%docs_package
+%doc GROUPS
diff --git a/packaging/rpmconfigcheck b/packaging/rpmconfigcheck
new file mode 100644
index 000000000..97bba74ee
--- /dev/null
+++ b/packaging/rpmconfigcheck
@@ -0,0 +1,80 @@
+#! /bin/bash
+# Copyright (c) 2002 SuSE GmbH Nuernberg, Germany.
+#
+# Author: Michael Schroeder <feedback@suse.de>
+#
+# /etc/init.d/rpmconfigcheck
+# /usr/sbin/rcrpmconfigcheck
+#
+# Script to scan for unresolved .rpmnew, .rpmorig, and .rpmsave files
+#
+### BEGIN INIT INFO
+# Provides: rpmconfigcheck
+# Required-Start: $remote_fs
+# Required-Stop: $null
+# Default-Start: 2 3 5
+# Default-Stop:
+# Description: rpm config file scan
+### END INIT INFO
+
+. /etc/rc.status
+
+# First reset status of this service
+rc_reset
+
+configcheckfile=/var/adm/rpmconfigcheck
+packages=/var/lib/rpm/Packages
+
+test -z "$1" && set start
+
+case "$1" in
+ start|restart|try-restart|reload|force-reload)
+ if test -s $packages -a \( ! -e $configcheckfile -o -s $configcheckfile -o ! $packages -ot $configcheckfile \) ; then
+ echo -n "Searching for unresolved configuration files"
+ if test ! -e $configcheckfile -o ! $packages -ot $configcheckfile ; then
+ test -e $configcheckfile && mv -f $configcheckfile $configcheckfile.old
+ rpm -qalc | sort | perl -lne '-e "$_.rpmnew" and print "$_.rpmnew"; -e "$_.rpmorig" and print "$_.rpmorig"; -e "$_.rpmsave" and print "$_.rpmsave"' > $configcheckfile
+ else
+ mv -f $configcheckfile $configcheckfile.old
+ while read l; do
+ test -e $l && echo $l
+ done < $configcheckfile.old > $configcheckfile
+ true
+ fi
+ rc_status -v
+ if test -s $configcheckfile; then
+ echo "Please check the following files (see /var/adm/rpmconfigcheck):"
+ sed -e 's/^/ /' < $configcheckfile
+ touch $configcheckfile.old
+ cat $configcheckfile $configcheckfile.old | sort | uniq -d > $configcheckfile.dup
+ cat $configcheckfile $configcheckfile.dup | sort | uniq -u > $configcheckfile.new
+ if test -s $configcheckfile.new ; then
+ (
+ echo "----------------------------------------------------------------------"
+ echo "----------------------------------------------------------------------"
+ echo "rpmconfigcheck"
+ date
+ echo "----------------------------------------"
+ echo "This is a warning message."
+ echo "rpmconfigcheck has found the following new unresolved config files"
+ echo "(all files are listed in /var/adm/rpmconfigcheck):"
+ cat $configcheckfile.new
+ echo "----------------------------------------"
+ ) >> /var/log/update-messages
+ fi
+ fi
+ rm -f $configcheckfile.old $configcheckfile.dup $configcheckfile.new
+ fi
+ ;;
+ stop)
+ ;;
+ status)
+ rc_failed 4
+ rc_status -v
+ ;;
+ *)
+ echo "Usage: $0 {start}"
+ exit 1
+ ;;
+esac
+rc_exit