Hi.
I was trying to change rpm package's name by using %if condition. It seems no good approach. I always got below message when starting to build. I expected to see "****hello****"
probably it's not possible to use define for the name of package.
[spec file]
%if "%{tizen_version}" == "3.0"
%define pkg_name hello
%{echo:****hello****}
%else
%define pkg_name world
%{echo:****world****}
%endif
Name: %{pkg_name}
[build package]
# gbs build -A armv7l --include-all
info: generate repositories ...
info: build conf has been downloaded at:
/var/tmp/boram1288-gbs/tizen.conf
info: start building packages from: /home/boram1288/samba/src/tizen/public_3.0/xf86-video-exynos (git)
info: prepare sources...
info: start export source from: /home/boram1288/samba/src/tizen/public_3.0/xf86-video-exynos/ ...
info: the following uncommitted changes would be included:
packaging/xf86-video-exynos.spec
****world********world****info: Creating (native) source archive world-1.0.0.tar.gz from '4e4f8e8f3b7434df09d07b6b4f823fcda3d5eab9'
****world********world****info: package files have been exported to:
/home/boram1288/GBS-ROOT/local/sources/tizen/world-1.0.0-1
warning: spec file xf86-video-exynos.spec has not been exported to /home/boram1288/GBS-ROOT/local/sources/tizen/hello-1.0.0-1/ correctly, please check if there're special macros in Name/Version/Release fields
error: no spec files to build.
BTW, as you said, it works if I try to print %{pkg_name} in the middle of spec file.
Thanks for your help.
------- Original Message -------
Sender : Ilya Palachev<[email protected]> Engineer/SRR-IM Compiler Group/삼성전자
Date : 2014-07-02 17:46 (GMT+09:00)
Title : Re: [Tizen General] How can we check tizen's version in spec file?
Here is used configuration:
$ git remote -vHere is used ~/.gbs.conf:
origin ssh://[email protected]:29418/platform/kernel/linux-3.10.git (fetch)
origin ssh://[email protected]:29418/platform/kernel/linux-3.10.git (push)
$ git status
# On branch dev/v3.10-aarch64-tizen
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: packaging/linux-kernel.spec
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git diff
diff --git a/packaging/linux-kernel.spec b/packaging/linux-kernel.spec
index 5e64441..cba6bac 100644
--- a/packaging/linux-kernel.spec
+++ b/packaging/linux-kernel.spec
@@ -52,6 +52,9 @@ Prebuilt linux kernel for out-of-tree modules.
%prep
%setup -q
+%if "%{tizen_version}" == "3.0"
+echo "Hello, world!"
+%endif
%build
# 1. Create main build directory
[general]Here is the beginning of the build log:
profile = "">
[profile.tizen]
repos = repo_default
buildroot = ~/GBS-ROOT-profile.tizen3/
[repo_default]
url = "" class=moz-txt-link-freetext href="http://download.tizen.org/releases/weekly/tizen/common/common-wayland-ia32/tizen_20140602.25/">http://download.tizen.org/releases/weekly/tizen/common/common-wayland-ia32/tizen_20140602.25/
ilya@ilya-toolchain:~/ws/ws-tizen-org/tizen-git/linux-3.10$ gbs build -A i586 --include-all --noinit --no-patch-export
warning: ignore repo_default, repo section name should start with string "repo."
info: start building packages from: /home/ilya/ws/ws-tizen-org/tizen-git/linux-3.10 (git)
2014-07-02 12:42 +0400
info: prepare sources...
info: start export source from: /home/ilya/ws/ws-tizen-org/tizen-git/linux-3.10 ...
info: the following uncommitted changes would be included:
packaging/linux-kernel.spec
info: tracking branch: origin/upstream -> upstream
info: linux-kernel-3.10.19-tizen_defconfig.current.tar.gz does not exist, creating from 'd7782357a6f4f5c6be4bb18454f5564b6507347a'
info: package files have been exported to:
/home/ilya/GBS-ROOT-profile.tizen3/local/sources/tizen/linux-kernel-3.10.19-1
info: retrieving repo metadata...
info: parsing package data...
info: building repo metadata ...
info: package dependency resolving ...
info: *** [1/1] building linux-kernel-3.10.19-1 i586 tizen (worker: 0) ***
VM_IMAGE: , VM_SWAP:
--repository /home/ilya/GBS-ROOT-profile.tizen3/local/repos/tizen/i586/RPMS
logging output to /home/ilya/GBS-ROOT-profile.tizen3/local/BUILD-ROOTS/scratch.i586.0/.build.log...
[ 0s] Memory limit set to 44231764KB
[ 0s] Using BUILD_ROOT=/home/ilya/GBS-ROOT-profile.tizen3/local/BUILD-ROOTS/scratch.i586.0
[ 0s] Using BUILD_ARCH=i686:i586:i486:i386:noarch
[ 0s]
[ 0s]
[ 0s] ilya-toolchain started "build linux-kernel.spec" at Wed Jul 2 08:43:08 UTC 2014.
[ 0s]
[ 0s]
[ 0s] processing specfile /home/ilya/GBS-ROOT-profile.tizen3/local/sources/tizen/linux-kernel-3.10.19-1/linux-kernel.spec ...
[ 1s] -----------------------------------------------------------------
[ 1s] ----- building linux-kernel.spec (user abuild)
[ 1s] -----------------------------------------------------------------
[ 1s] -----------------------------------------------------------------
[ 1s] + exec rpmbuild --define '_srcdefattr (-,root,root)' --nosignature --target=i686-tizen-linux --define '_build_create_debug 1' -ba /home/abuild/rpmbuild/SOURCES/linux-kernel.spec
[ 1s] Building target platforms: i686-tizen-linux
[ 1s] Building for target i686-tizen-linux
[ 1s] Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.h67rIe
[ 1s] + umask 022
[ 1s] + cd /home/abuild/rpmbuild/BUILD
[ 1s] + cd /home/abuild/rpmbuild/BUILD
[ 1s] + rm -rf linux-kernel-3.10.19
[ 1s] + /bin/gzip -dc /home/abuild/rpmbuild/SOURCES/linux-kernel-3.10.19-tizen_defconfig.current.tar.gz
[ 1s] + /bin/tar -xf -
[ 5s] + STATUS=0
[ 5s] + '[' 0 -ne 0 ']'
[ 5s] + cd linux-kernel-3.10.19
[ 5s] + /bin/chmod -Rf a+rX,u+w,g-w,o-w .
[ 5s] + echo 'Hello, world!'
[ 6s] Hello, world!
[ 6s] + exit 0
Maybe it will help you.
Best regards,
Ilya Palachev
From: Boram Park
Sent: Wednesday, July 02, 2014 5:37AM
To: Ilya Palachev, [email protected]
Subject: Re: Re: [Tizen General] How can we check tizen's version in spec file?
Thanks for your advice.
When I tried to build with http://download.tizen.org/releases/weekly/tizen/common/common-wayland-ia32/tizen_20140602.25/, it's still not working.
I wrote this to the beginning of the spec file. But I can see only "world" message.
%if "%{tizen_version}" == "3.0"
%{echo:Hello}
%else
%{echo:world}
%endif
Could you give me more information how you test it? about git repository path, branch name, or any options and defines if you used.
Then, it will be very helpful.
------- Original Message -------
Sender : Ilya Palachev<[email protected]> Engineer/SRR-IM Compiler Group/삼성전자
Date : 2014-07-02 02:01 (GMT+09:00)
Title : Re: [Tizen General] How can we check tizen's version in spec file?
You should write %if condition as follows:
%if "%{tizen_version}" == "3.0"
echo "Hello, world!"
%endif
I have checked it for repository http://download.tizen.org/releases/weekly/tizen/common/common-wayland-ia32/tizen_20140602.25/
It works and message "Hello, world!" is printed.
Best regards,
Ilya Palachev
Tizen Toolchain Team
From: Boram Park
Sent: Tuesday, July 01, 2014 6:53PM
To: [email protected]
Subject: [Tizen General] How can we check tizen's version in spec file?
Hello
Is is possible to check whether tizen version is 3.0 in spec file?
I saw "%tizen_version 3.0" macro in project configuration of Tizen:Common.
Can anyone help me about this?
%if %{tizen_version} == "3.0"
If I write above line in spec file, gbs returns "parseExpressionBoolean returns -1" message.
Cheers
------------------------------------------
Boram Park
Senior engineer
SAMSUNG ELECTRONICS CO.,LTD
E-Mail : [email protected]
------------------------------------------
Boram Park
Senior engineer
SAMSUNG ELECTRONICS CO.,LTD
E-Mail : [email protected]
|
|
_______________________________________________ General mailing list [email protected] https://lists.tizen.org/listinfo/general
