1 ################################################################################
2 # OBS Project config for Tizen:Base
7 # vim: set syntax=spec:
8 ################################################################################
10 Patterntype: rpm-md comps
11 Release: <CI_CNT>.<B_CNT>
13 Support: build-compare build-mkbaselibs
14 # Support: rpmlint-mini rpmlint-tizen
16 # new cycle handling (gbs version >= 0.25.29)
17 BuildFlags: genmetaalgo:1
19 ############################# conflicts resolution #############################
29 Prefer: mono-data-sqlite
31 # Set a preference for ambiguous libs to use *-64bit libs
32 # *-64bit libs on 32bit build environment are required for .Net build (e.g., coreclr, corefx)
33 # But when building 64bit target, they could make 'have choice' error with original libs in 64bit repository.
34 # e.g., libstdc++ and libstdc++-64bit provides same libs. It's ambiguous to choose appropriate one.
35 # Owner : Jiyoung Yun (jy910.yun@samsung.com)
36 # libopenssl11 : Dongsun Lee (ds73.lee@samsung.com)
37 Prefer: libgcc libstdc++ libunwind libuuid zlib libopenssl libopenssl11
40 ############################# base definition ###############################
42 # %release_name and %tizen_full_version are used in platform/upstream/tizen-release
45 %release_name Tizen8.0/Unified
47 %tizen_version_major 8
48 %tizen_version_minor 0
49 %tizen_version_patch 0
51 %tizen_version %{tizen_version_major}.%{tizen_version_minor}
52 %tizen_full_version %{tizen_version}.%{tizen_version_patch}
58 #### %__spec_check_pre exit 0
59 #### %run_check_section 0
62 %_default_patch_fuzz 2
64 %_binary_payload w5T.xzdio
67 #### %%__spec_check_pre exit 0
68 #### %%run_check_section 0
70 # skip %%check section
73 %_skip_check_packages autogen bison boost expat findutils flex fribidi glibc \\\
74 gmp gn golang grep libgc libgcrypt libogg libsigc++ libvorbis libxml2 libzio \\\
75 m4 nspr openssl openssl1.1 perl-Devel-Symdump perl-gettext perl-Pod-Coverage \\\
76 perl-Test-Pod perl-Test-Pod-Coverage perl-TimeDate procps-ng python3-mako \\\
77 python3-mock python3-ply python-funcsigs python-mako python-mock python-ply \\\
78 setup zlib openssl3 autoconf
81 for name in %_skip_check_packages \
83 if [ "$name" = "%{name}" ]; then \
92 ############################# build config #####################################
94 ########## targets ##########
97 Target: i686-tizen-linux
101 Target: armv7hl-tizen-linux
105 Target: armv7l-tizen-linux
109 Target: aarch64-tizen-linux
112 ########## cross build ##########
114 %define build_hostarch x86_64
116 %build_hostarch x86_64
119 %ifarch %arm armv7l armv7hl aarch64
121 # cross build support for the build hosts
122 Preinstall: qemu-linux-user-%{build_hostarch}-cross
123 Runscripts: qemu-linux-user-%{build_hostarch}-cross
124 Keep: qemu-linux-user-%{build_hostarch}-cross
126 %qemu_user_space_build 1
131 Preinstall: qemu-accel-%{build_hostarch}-armv7l
132 Runscripts: qemu-accel-%{build_hostarch}-armv7l
133 Preinstall: libmount libblkid libuuid
137 Preinstall: qemu-accel-%{build_hostarch}-armv7hl
138 Runscripts: qemu-accel-%{build_hostarch}-armv7hl
139 Preinstall: libmount libblkid libuuid
143 Preinstall: qemu-accel-%{build_hostarch}-aarch64
144 Runscripts: qemu-accel-%{build_hostarch}-aarch64
145 Preinstall: libmount libblkid libuuid
148 Substitute: python-accel-armv7l-cross-arm python-accel-%{build_hostarch}-armv7l
149 Substitute: python-accel-armv7hl-cross-arm python-accel-%{build_hostarch}-armv7hl
150 Substitute: python-accel-aarch64-cross-aarch64 python-accel-%{build_hostarch}-aarch64
152 Substitute: clang-accel-armv7l-cross-arm clang-accel-%{build_hostarch}-armv7l
153 Substitute: clang-accel-armv7hl-cross-arm clang-accel-%{build_hostarch}-armv7hl
154 Substitute: clang-accel-aarch64-cross-aarch64 clang-accel-%{build_hostarch}-aarch64
156 ########## exports for different architectures ##########
158 ExportFilter: \.armv7l\.rpm$ armv7l
159 ExportFilter: \.armv7hl\.rpm$ armv7hl
160 ExportFilter: \.aarch64\.rpm$ aarch64
161 ExportFilter: \.i586\.rpm$ i586
162 ExportFilter: \.x86_64\.rpm$ x86_64
164 ########## buildroot config ##########
166 Preinstall: setup filesystem
169 Preinstall: bash bzip2 coreutils diffutils grep rpm
170 Preinstall: glibc libacl libattr
173 Preinstall: libpopt sed tar zlib
174 Preinstall: libncurses libreadline
175 Preinstall: libelf libbz2
177 Preinstall: nss nspr libfreebl3 libsoftokn3
180 Preinstall: smack libsmack libxml2 libmagic libmagic-data
181 Preinstall: libsqlite
182 #Preinstall: rpm-security-plugin
183 Preinstall: util-linux util-linux-su
186 VMinstall: perl libmount libblkid libext2fs libuuid grep libpcre util-linux libsmartcols procps-ng
188 Required: binutils gcc glibc rpm-build libtool
191 Support: glibc-locale
194 Support: cpio findutils
195 Support: file findutils zlib bzip2
196 Support: gzip hostname net-tools
197 Support: make patch sed gawk tar grep coreutils pkg-config
201 Support: which elfutils
202 Support: update-alternatives
203 Support: libstdc++-devel
209 Keep: libstdc++-devel
210 Keep: cpp gcc libstdc++
212 Keep: binutils cpp libmagic-data file findutils gawk gcc gcc-c++
213 Keep: gdbm gzip libada libunwind glibc-devel libpcre xz-lzma-compat
214 Keep: make gmp libcap groff cpio
215 Keep: patch rpm-build nss nspr elfutils python grep libgcc gcc-c++
216 Keep: kernel-headers perl-libs perl
217 Keep: pkgconfig glib2 tizen-rpm-config
218 Keep: libmpc libmpfr libppl libgmp libppl_c
219 Keep: libcloog libppl libgmpxx
220 Keep: nss-softokn-freebl libmagic libmagic-data
222 Keep: update-alternatives
229 Substitute: gettext gettext-tools
232 Substitute: glibc-devel-32bit glibc-devel-32bit glibc-32bit
233 Substitute: libgcc_s1-32bit libgcc-32bit
235 Substitute: glibc-devel-32bit
238 ########## compilation flags ##########
239 %define __global_cflags -O2 -g2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong -Wformat-security -fmessage-length=0 -frecord-gcc-switches -Wl,-z,relro,--as-needed
241 Optflags: armv7l %{__global_cflags} --param=ssp-buffer-size=4 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -mthumb -Wp,-D__SOFTFP__ -Wl,-O1 -Wl,--hash-style=gnu -Wa,-mimplicit-it=thumb
242 Optflags: armv7hl %{__global_cflags} --param=ssp-buffer-size=4 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=hard -mthumb -Wl,-O1 -Wl,--hash-style=gnu -Wa,-mimplicit-it=thumb
243 Optflags: aarch64 %{__global_cflags} -feliminate-unused-debug-types -Wformat -march=armv8-a+fp+simd+crc+crypto -mtune=cortex-a57.cortex-a53
244 Optflags: i686 %{__global_cflags} -feliminate-unused-debug-types --param=ssp-buffer-size=4 -fdiagnostics-color=never -m32 -march=i686 -mtune=i686 -msse4.2 -mfpmath=sse -fasynchronous-unwind-tables -fno-omit-frame-pointer -mstackrealign -Wl,-z,noseparate-code
245 Optflags: x86_64 %{__global_cflags} -feliminate-unused-debug-types --param=ssp-buffer-size=4 -fdiagnostics-color=never -m64 -march=nehalem -msse4.2 -mfpmath=sse -fasynchronous-unwind-tables -fno-omit-frame-pointer
247 #### Enable ASan for the project
253 ### To Disable ASAN ####
254 ### Disabled about packages of base-tool ###
256 %asan_incompatible_pkgs acl attr autoconf autoconf-archive automake bash binutils binutils-aarch64 binutils-armv7l binutils-armv7hl bison build build-compare bzip2 \\\
257 coreutils cpio db4 diffutils e2fsprogs elfutils expat fdupes file filesystem findutils flex gawk gdbm \\\
258 gettext gmp grep gzip help2man hostname intltool less libcap libffi libtool libunistring libxml2 libzio linux-glibc-devel lua \\\
259 m4 make ncurses net-tools nspr nss openssl1.1 pam patch pcre perl perl-gettext perl-XML-Parser pkg-config popt procps-ng python python3 \\\
260 python3-base qemu-linux-user readline rpm sed setup smack sqlite tar texinfo tzdata update-alternatives uthash util-linux which \\\
261 xz zip zlib autogen cmake dash dejagnu expect guile icecream libarchive libgc libgcrypt libgpg-error libunwind libxslt llvm patchelf \\\
262 python-appdirs python-magic python-packaging python-pyparsing python-setuptools python-six rpmlint rpmlint-mini rpmlint-tizen shadow-utils \\\
263 tcl unzip vim python-ply zstd pbzip2 groff
266 Preinstall: asan-build-env libasan libstdc++
267 Preinstall: asan-force-options findutils
269 RunScripts: asan-build-env
270 RunScripts: asan-force-options
273 %__spec_check_pre exit 0