diff options
author | Mateusz Moscicki <m.moscicki2@partner.samsung.com> | 2023-05-17 13:02:21 +0200 |
---|---|---|
committer | Adam Michalski <a.michalski2@partner.samsung.com> | 2023-07-10 14:15:21 +0000 |
commit | 31fca2ed15c6b734a84b581535bbe38f90ecaab1 (patch) | |
tree | eb3788882d9a44ff53d82cae9efa0003069b58be | |
parent | e4e49b101522f46f0c2b8acd55554866f1bd37bc (diff) | |
download | rpm-31fca2ed15c6b734a84b581535bbe38f90ecaab1.tar.gz rpm-31fca2ed15c6b734a84b581535bbe38f90ecaab1.tar.bz2 rpm-31fca2ed15c6b734a84b581535bbe38f90ecaab1.zip |
Add macro %isu_package to generate ISU Packagesubmit/tizen_6.0_base/20230714.091612submit/tizen_6.0_base/20230714.032837accepted/tizen/6.0/base/20230719.141359tizen_6.0_baseaccepted/tizen_6.0_base
The macro makes it easier to prepare a separate configuration for ISU package.
Files from path %{BUILDROOT}/etc/isu/ are packed into a separate rpm
package: %{name}-isu
In addition, pattern occurrences are substituted:
#NAME# - %{name}
#VERSION# - %{version}
#ISU_CONFIG_PATH# - /etc/isu
#ISU_INSTALL_PATH# - /opt/isu
#ISU_RUN_PATH# - /run/isu
Change-Id: Ia60a964165a9a838fb3422ded0410402924c5adf
(cherry picked from commit 0cb94f2a960168fb4cc6eed7acdd19dba633fcd9)
-rw-r--r-- | packaging/find-isufiles.sh | 15 | ||||
-rw-r--r-- | packaging/rpm-tizen_macros | 15 | ||||
-rw-r--r-- | packaging/rpm.spec | 2 |
3 files changed, 32 insertions, 0 deletions
diff --git a/packaging/find-isufiles.sh b/packaging/find-isufiles.sh new file mode 100644 index 000000000..ab8abdeb6 --- /dev/null +++ b/packaging/find-isufiles.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +LIST_FILE_PATH="$1" +pushd "$RPM_BUILD_ROOT" || exit +if [ -d ./etc/isu/ ]; then + echo "Process ISU files" + find etc/isu -type f -printf "/%p\n" \ + -exec sed -i -e "s@#VERSION#@$RPM_PACKAGE_VERSION@g" \ + -e "s@#NAME#@$RPM_PACKAGE_NAME@g" \ + -e "s@#ISU_CONFIG_PATH#@/etc/isu@g" \ + -e "s@#ISU_INSTALL_PATH#@/opt/isu@g" \ + -e "s@#ISU_RUN_PATH#@/run/isu@g" \ + {} \; > "$LIST_FILE_PATH" +fi +popd || exit diff --git a/packaging/rpm-tizen_macros b/packaging/rpm-tizen_macros index e5798b399..843a6587e 100644 --- a/packaging/rpm-tizen_macros +++ b/packaging/rpm-tizen_macros @@ -38,11 +38,16 @@ %{nil} # %{_rpmconfigdir}/tizen/brp-implant-ident-static +# +%__isu_install_post \ + %{_rpmconfigdir}/tizen/find-isufiles.sh %{_builddir}/%{?buildsubdir}/isu.list \ +%{nil} %__spec_install_post\ %{?__debug_package:%{__debug_install_post}}\ %{__arch_install_post}\ %{__os_install_post}\ + %{__isu_install_post}\ %{nil} # macro: %configure_kernel_source @@ -204,6 +209,16 @@ This package provides documentation for package %{name}.\ %defattr(-,root,root,-)\ %{nil} +%isu_package \ +%package isu \ +Summary: ISU Package configuration \ +AutoReqProv: 0\ +%description isu\ +This package provides ISU configuration for package %{name}.\ +%files isu -f isu.list\ +%defattr(-,root,root,-)\ +%{nil} + # Bad hack to set $LANG to C during all RPM builds %prep \ %%prep\ diff --git a/packaging/rpm.spec b/packaging/rpm.spec index 506b1016b..72b4eba25 100644 --- a/packaging/rpm.spec +++ b/packaging/rpm.spec @@ -43,6 +43,7 @@ Source2: db-4.8.30-integration.dif Source4: rpm-tizen_macros Source8: rpmconfigcheck Source13: find-docs.sh +Source14: find-isufiles.sh Source22: device-sec-policy Source23: find-provides.ksyms Source24: debug.manifest @@ -174,6 +175,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/rpm mkdir -p %{buildroot}%{rpmhome}/tizen cp -a tizen_macros %{buildroot}%{rpmhome} install -m 755 %{SOURCE13} %{buildroot}%{rpmhome}/tizen +install -m 755 %{SOURCE14} %{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 |