From a53bd1215e8fc9048a6edc394ab3571d0e4c602a Mon Sep 17 00:00:00 2001 From: Sehong Na Date: Sat, 31 May 2014 12:32:37 +0900 Subject: [PATCH 1/1] Initialize Tizen 2.3 --- packaging/OBS-Accelerator-0.1.tar.bz2 | Bin 0 -> 4419 bytes packaging/baselibs.conf | 1 + packaging/binaries_to_prepare | 1 + packaging/bzip2-x86.changes | 10 ++ packaging/bzip2-x86.spec | 304 ++++++++++++++++++++++++++++++++++ 5 files changed, 316 insertions(+) create mode 100644 packaging/OBS-Accelerator-0.1.tar.bz2 create mode 100644 packaging/baselibs.conf create mode 100644 packaging/binaries_to_prepare create mode 100644 packaging/bzip2-x86.changes create mode 100644 packaging/bzip2-x86.spec diff --git a/packaging/OBS-Accelerator-0.1.tar.bz2 b/packaging/OBS-Accelerator-0.1.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..b569eac78a3951dc29ac8a17d354a5bceacb8220 GIT binary patch literal 4419 zcmV-J5xnj~T4*^jL0KkKSvyAs-T(*r|MmZn0D%Ah|NnpI|BwIw|Ly=lAOHXWf&l;l z00>|cuY2B8;`&fUpifHWSAESr=SK6^Y}TOg>~w2JuZ8bF>rtc?)X*C!GzNgs008Xvlhy14 z9Fgf+M2qo^W~RGJX#$fX0&+0wMDcPEE&KjbP#vi>ATh;;rVWGX+Sb+-8Zm^&2bA64 zGy@W?VI(FH#(Cg_{817TkYS|voZJBx7UTyQjkJwzRg3$sRZ@m(S7F+HXy7Q&BAym) z%OyB>acu1{9^;Tq60LXvhSCrdJU>?{7@`u@3Q9 zPO_n($bhkPRzL!ZfC#l~2uEi0&y~-OYBXTDxU8mTw;|EqI01cPD_>STbQDMn$~cUD zXLwzZ{!+u^l#APu!HUp_zObJG%q64Sg@;s4H6Qc=S~PcJoFuG4hY(43!1aLJlkY*Q zy%-eNo;#frpsH3Qwnw&<+xc4i3$oIHn)4>YnXYn76<|!=FKF4brXx>kAw_E{6mAPI zUbV2;AW_ETreOpdNbgx3%X-xB#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uZ*7uS4Y9dA+M!7OurWNNj=5Z zxCpg*sdWfNBBZsZh4pOVBj2oOuV(V)7}lb!A@RXsa7ZeEU}}zq$^pkTS{=%UR55{@ z6iOtLSj=sPZyA0m(hRF)1-_|KcF3_TynyqOF}M;%wL(QH!NS!+iz3t`NZWKtluLAQ zG9Xf;g!7$^9goJ69;$WXPAv;2hd@d*1teq1iA)e1=&rD%DK{98TfKrPTt*6!Wwz`= z8+xJ>z~2RJAj7xFrST6F0W4RrxdU@XYc$c{nq5oice5A32AmP2Yf9hBuVOU_(6Q)rT-5UJBAY0vaYEf*}A4-g1&OVj)|Ugo@$_ zO71s*9Q#s|?%E1>Ox70Vx0g literal 0 HcmV?d00001 diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf new file mode 100644 index 0000000..a3e67d6 --- /dev/null +++ b/packaging/baselibs.conf @@ -0,0 +1 @@ +arch i586 targets armv5tel:arm armv6l:arm armv7l:arm armv7hl:arm armv7nhl:arm diff --git a/packaging/binaries_to_prepare b/packaging/binaries_to_prepare new file mode 100644 index 0000000..97c1a36 --- /dev/null +++ b/packaging/binaries_to_prepare @@ -0,0 +1 @@ +/usr/bin/bzip2 diff --git a/packaging/bzip2-x86.changes b/packaging/bzip2-x86.changes new file mode 100644 index 0000000..dc29f65 --- /dev/null +++ b/packaging/bzip2-x86.changes @@ -0,0 +1,10 @@ +* Fri Jul 6 14:30:00 KST 2012 - UkJung Kim - 1.0 +- Added and updated OBS-Accelerator-0.1.tar.bz2 + +* Sun Apr 24 08:02:35 UTC 2011 - Jan-Simon Möller - 1.0 +- Add baselibs.conf to src.rpm + +* Mon Jan 3 21:03:00 UTC 2011 Carsten Munk - 1.0 +- Part of BMC#12113 (speedrpm implementation) +- Add armv7hl and armv7nhl support +- Initial version on meego.com (based off Jan-Simon Moller's other -x86 packages) diff --git a/packaging/bzip2-x86.spec b/packaging/bzip2-x86.spec new file mode 100644 index 0000000..1f0be30 --- /dev/null +++ b/packaging/bzip2-x86.spec @@ -0,0 +1,304 @@ +%define __strip /bin/true +%define _build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.vanish.rpm +# meta spec file for cross-chroot setup +# +# Copyright (c) 2009-2011 Martin Mohring (martin.mohring@opensuse.org) +# Copyright (c) 2011 5eEcoSystems (info@5eecosystems.com) +# +# All modifications and additions to the file contributed by third parties +# remain the property of the copyright owners, unless otherwise agreed +# upon. The cross build accelerators as is, and modifications +# and additions to the it, are licensed under the GPLv2. +# In addition, the cross build accelerators are licensed together with +# a package where they will be contained in +# under the license of the prestine package (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +#\/\/\/\/\/\/\/\/\/\/ +### only changes here + +# +# The original package name +%define oldname bzip2 + +# +# The architectures this meta package is built on +%define myexclusive i586 + +# +# The required package for building this package +# This can be distribution dependent. Good start is: +# e.g. rpm grep tar sed patchelf +# +BuildRequires: rpm grep tar sed patchelf + +# +# Additional required packages needed in addition to those of original package +# e.g. (usually empty) for an accelerator to be 100% compatible +# +#Requires: + +# For a real accelerator, also the old packge is required for compatibility +# pls change this only if you know what you do +Requires: %oldname + +# +# Release under which to put the accelerator +# e.g. 1 or higher +# +Release: 8 + +### no changes needed below this line +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +### no changes needed +# +# The new package name - convention is %oldname-x86 +%define newname %{oldname}-x86 +# +# The version of the original package is read from its rpm db info +%{expand:%%define newversion %(rpm -q --qf '[%{version}]' %oldname)} +# +# The license of the original package is read from its rpm db info +%{expand:%%define newlicense %(rpm -q --qf '[%{license}]' %oldname)} +# +# The group information of the original package +%{expand:%%define newgroup %(rpm -q --qf '[%{group}]' %oldname)} +# +# The summary of the original package +%{expand:%%define newsummary %(rpm -q --qf '[%{summary} - special version ]' %oldname)} +# +# New rpath to add to files on request +%define newrpath "/emul/ia32-linux/lib:/emul/ia32-linux/usr/lib" +%define newinterpreter /emul/ia32-linux/lib/ld-linux.so.2 +# +# Some automatic checks for availability +# binaries_to_prepare +%define binaries_to_prepare %{expand:%(test -e %{_sourcedir}/binaries_to_prepare && echo 1 || echo 0)} +%define libraries_to_prepare %{expand:%(test -e %{_sourcedir}/libraries_to_prepare && echo 1 || echo 0)} +%define special_script %{expand:%(test -e %{_sourcedir}/special_script && echo 1 || echo 0)} +%define files_to_ignore %{expand:%(test -e %{_sourcedir}/files_to_ignore && echo 1 || echo 0)} +# +### no changes needed below this line +%define nodebug 1 + + +Name: %newname +Version: %newversion +AutoReqProv: 0 +Provides: %newname +BuildRequires: %oldname +# no auto requirements - they're generated +License: %newlicense +Group: %newgroup +ExclusiveArch: %myexclusive +Summary: Dont use %newsummary ! +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if %binaries_to_prepare +Source10: binaries_to_prepare +%endif +%if %libraries_to_prepare +Source20: libraries_to_prepare +%endif +%if %special_script +Source30: special_script +%endif +%if %files_to_ignore +Source40: files_to_ignore +%endif +Source100: baselibs.conf + +%description +This is a meta-package providing %name. +It is not intended to be used on a normal system/device! +Original description: +%{expand:%(rpm -q --qf '[%{description}]' %oldname)} + + +%prep + +%build + +%install +%if %nodebug +set +x +%endif +mkdir -p %buildroot +rpm -ql %oldname > filestoinclude1 + +# ignore files - construct sed script +sedtmp="sedtmp.$$" +echo "s#^%{_docdir}.*##" >> $sedtmp +echo "s#^%{_mandir}.*##" >> $sedtmp +echo "s#^%{_infodir}.*##" >> $sedtmp + +# evaluate files_to_ignore +%if %files_to_ignore +for i in `cat %{_sourcedir}/files_to_ignore`; do + echo "Ignoring file: $i" + echo "s#^${i}.*##" >> $sedtmp +done +%endif + +# ignore default filesystem files +for i in `rpm -ql filesystem`; do + echo "s#^${i}\$##" >> $sedtmp +done + +#finish up +echo "/^\$/d" >> $sedtmp + +#execute +sed -f $sedtmp -i filestoinclude1 + +# tar copy to buildroot +tar -T filestoinclude1 -cpf - | ( cd %buildroot && tar -xpf - ) +rm filestoinclude1 + +# Todo: refractor +# no directories, in filelist +find %buildroot > filestoinclude2 +cat filestoinclude2 | sed -e "s#%{buildroot}##g" | uniq | sort > filestoinclude1 +for i in `cat filestoinclude1`; do +# no directories + if ! test -d %buildroot/$i ; then + # + echo "$i" >> filestoinclude + fi +done +rm filestoinclude1 +rm filestoinclude2 + +# patchelf the binaries +%if %binaries_to_prepare +echo "" +echo "[ .oO Preparing binaries Oo. ]" +echo "" +mkdir -p %buildroot/%{_prefix}/share/applybinary/ +for binary in `cat %{_sourcedir}/binaries_to_prepare` ; do + echo "Processing binary: $binary" + tmp="tmp.$$" +%if %nodebug + debug= +%else + debug="--debug" +%endif + if file $binary | grep -q dynamic; then + ldd $binary | grep -v "ld-linux" | grep -v "linux-gate" | sed -e "s#=.*##g" -e "s#^\t*##g" > $tmp + deps=$(for i in `cat $tmp` ; do rpm -q --whatprovides "$i" | grep -v "no package"; done) + cleandeps=$(echo "$cleandeps" "$deps" | sort | uniq | sed -e "s/-[0-9].*//g") + patchelf $debug --set-rpath %newrpath %buildroot/$binary + patchelf $debug --set-interpreter %newinterpreter %buildroot/$binary + patchelf $debug --set-rpath %newrpath %buildroot/$binary + patchelf $debug --set-interpreter %newinterpreter %buildroot/$binary + if test -n "$debug"; then + patchelf --print-rpath %buildroot/$binary + patchelf --print-interpreter %buildroot/$binary + fi + fi + echo "$binary" >> %buildroot/%{_prefix}/share/applybinary/%name + echo "" +done +%endif + +# stub +%if %libraries_to_prepare +echo "" +echo "[ .oO Preparing libraries Oo. ]" +echo "" +%endif + +# stub +%if %special_script +echo "" +echo "[ .oO Executing special script Oo. ]" +echo "" +%endif + +# lets start the shellquote nightmare ;) +shellquote() +{ + for arg; do + arg=${arg//\\/\\\\} +# arg=${arg//\$/\$} # already needs quoting ;( +# arg=${arg/\"/\\\"} # dito +# arg=${arg//\`/\`} # dito + arg=${arg//\\|/\|} + arg=${arg//\\|/|} + echo "$arg" + done +} + + +echo "Creating baselibs_new.conf" +echo "" +rm -rRf /tmp/baselibs_new.conf || true + +shellquote "%{name}" >> /tmp/baselibs_new.conf +shellquote " targettype x86 block!" >> /tmp/baselibs_new.conf +shellquote " targettype 32bit block!" >> /tmp/baselibs_new.conf +shellquote " targettype arm autoreqprov off" >> /tmp/baselibs_new.conf + +# automagically fill in basic requirements +for i in $cleandeps ; do + shellquote " targettype arm requires \"${i}-x86-arm\"" >> /tmp/baselibs_new.conf +done + +# we require the native version +shellquote " targettype arm requires \"%{oldname}\" " >> /tmp/baselibs_new.conf +shellquote " targettype arm prefix /emul/ia32-linux" >> /tmp/baselibs_new.conf +shellquote " targettype arm extension -arm" >> /tmp/baselibs_new.conf +shellquote " targettype arm +/" >> /tmp/baselibs_new.conf + +# safe space and download time +shellquote " targettype arm -/%{_mandir}" >> /tmp/baselibs_new.conf +shellquote " targettype arm -/%{_docdir}" >> /tmp/baselibs_new.conf +shellquote " targettype arm requires \"tizen-accelerator\"" >> /tmp/baselibs_new.conf + +# replace native with x86 binaries as defined in file +%if %binaries_to_prepare +# Todo: error handling if .orig-arm is present +for binary in `cat %{_sourcedir}/binaries_to_prepare` ; do + shellquote " targettype arm post \" if test -e ${binary}.orig-arm -a -h ${binary}; then \" " >> /tmp/baselibs_new.conf + shellquote " targettype arm post \" echo \"${binary}.orig-arm already present - skipping.\" \" " >> /tmp/baselibs_new.conf + shellquote " targettype arm post \" else \" " >> /tmp/baselibs_new.conf + shellquote " targettype arm post \" mv ${binary} ${binary}.orig-arm ; ln -s ${binary} ${binary} \"" >> /tmp/baselibs_new.conf + shellquote " targettype arm post \" fi \" " >> /tmp/baselibs_new.conf +done + +shellquote " " >> /tmp/baselibs_new.conf +for binary in `cat %{_sourcedir}/binaries_to_prepare` ; do + + shellquote " targettype arm preun \" if test -e ${binary}.orig-arm ; then \"" >> /tmp/baselibs_new.conf + shellquote " targettype arm preun \" rm -f ${binary} ; mv ${binary}.orig-arm ${binary}\"" >> /tmp/baselibs_new.conf + shellquote " targettype arm preun \" fi \"" >> /tmp/baselibs_new.conf + +done +%endif + +cat /tmp/baselibs_new.conf >> %{_sourcedir}/baselibs.conf + +echo "################################################################################" +echo "" +echo "" +echo "REQUIREMENTS:" +grep "requires" %{_sourcedir}/baselibs.conf | sort | uniq | sed -e "s# targettype.*requires ##g" | while read k ; do + echo "CBinstall: $k" +done +echo "Runscripts: %{newname}-arm" +echo "" +echo "" +echo "################################################################################" +set -x + +%clean +rm -rf $RPM_BUILD_ROOT + +%files -f filestoinclude +%defattr(-,root,root) +%if %binaries_to_prepare +/%{_prefix}/share/applybinary/%name +%endif -- 2.7.4