Unverified Commit f3be72d9 authored by boklm's avatar boklm
Browse files

Bug 19067: start adding build scripts for a testsuite bundle

parent 59782207
[submodule "packages/rbm"]
path = packages/rbm
url = https://github.com/boklm/rbm
rbm=./rbm/rbm
all: tbb-testsuite
tbb-testsuite: tbb-testsuite-linux-x86_64
tbb-testsuite-linux-x86_64: submodule-update
$(rbm) build tbb-testsuite --target linux-x86_64
tbb-testsuite-linux-i686: submodule-update
$(rbm) build tbb-testsuite --target linux-i686
submodule-update:
git submodule update --init
fetch:
$(rbm) fetch
#!/bin/sh
set -e
echo 1 > [% dest_dir %]/[% c('filename') %]
echo Creating [% dest_dir %]/[% c('filename') %]
# vim: filetype=yaml sw=2
filename: '[% sha256(c("pre")).substr(0, 12) %]'
remote_docker: 1
docker_image_prefix: 'tbb-testsuite_[% GET ENV.RBM_BUILDNAME ? ENV.RBM_BUILDNAME : ENV.USER ? ENV.USER : c("uid") %]'
docker_save_image: '[% c("docker_image_prefix") %]:[% c("filename") %]'
pkg_type: build
docker_image: '[% c("lsb_release/id").lower %]:[% c("lsb_release/release") %]'
lsb_release:
id: '[% pc(c("origin_project", { no_distro => 1 }), "lsb_release/id", { no_distro => 1 }) %]'
release: '[% pc(c("origin_project", { no_distro => 1 }), "lsb_release/release", { no_distro => 1 }) %]'
codename: '[% pc(c("origin_project", { no_distro => 1 }), "lsb_release/codename", { no_distro => 1 }) %]'
pre: |
#!/bin/sh
# [% c('docker_image') %]
set -e
[% IF c('lsb_release/release') == '14.10' -%]
sed -i 's/archive\.ubuntu\.com/old-releases.ubuntu.com/' /etc/apt/sources.list
[% END -%]
[% IF pc(c('origin_project'), 'var/pre_pkginst') -%]
[% pc(c('origin_project'), 'var/pre_pkginst') %]
[% END -%]
[% IF c('lsb_release/id') == 'Ubuntu' || c('lsb_release/id') == 'Debian' %]
apt-get update -y
apt-get upgrade -y
[% END %]
[%
deps = [];
IF pc(c('origin_project'), 'var/deps');
CALL deps.import(pc(c('origin_project'), 'var/deps').sort);
END;
IF pc(c('origin_project'), 'var/arch_deps');
CALL deps.import(pc(c('origin_project'), 'var/arch_deps').sort);
END;
IF deps.size;
FOREACH pkg IN deps;
SET p = tmpl(pkg);
IF p;
GET c('install_package', { pkg_name => p });
GET "\n";
END;
END;
END;
-%]
[% IF pc(c('origin_project'), 'var/post_pkginst') -%]
[% pc(c('origin_project'), 'var/post_pkginst') %]
[% END -%]
#!/bin/sh
set -e
distdir=/home/$(whoami)/dist/[% project %]
mkdir -p $distdir
tar xf [% project %]-[% c("version") %].tar.bz2
cd [% project %]-[% c("version") %]
./Configure -des -Dprefix=$distdir -Dusethreads -Duseithreads -Duserelocatableinc [% c("var/configure_opt") %]
make
make test
make install
cd "$distdir/.."
[% c('tar', {
tar_src => [ project ],
tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
}) %]
# vim: filetype=yaml sw=2
version: 5.24.0
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
remote_docker: 1
var:
deps:
- build-essential
targets:
linux-i686:
var:
configure_opt: '-Acflags=-m32 -Aldflags=-m32'
input_files:
- project: docker-image
- name: perl
URL: 'http://www.cpan.org/src/5.0/perl-[% c("version") %].tar.bz2'
sha256sum: 62328a53d157e8153b33e137594155f6f8b64418f7f9238210feb809585290e0
#!/bin/sh
set -e
rootdir=$(pwd)
mkdir -p /var/tmp/dist
tar -C/var/tmp/dist -xf $rootdir/[% c('input_files_by_name/perl') %]
export PATH=/var/tmp/dist/perl/bin:$PATH
mkdir -p /var/tmp/dist/ImageMagick
tar xf ImageMagick-[% c("var/imagemagick_version") %].tar.xz
cd ImageMagick-[% c("var/imagemagick_version") %]
./configure --enable-shared \
--disable-static \
--with-modules \
--without-perl \
--with-threads \
--prefix=/
make
echo "Running make install"
make install DESTDIR=/var/tmp/dist/ImageMagick
cd ..
modules='
Data-Dump-1.23 File-Path-2.12 IO-1.25 LWP-Protocol-https-6.06
XML-LibXML-2.0128 DateTime-1.39 File-Slurp-9999.19 IO-CaptureOutput-1.1104
PathTools-3.62 YAML-Syck-1.29 Digest-SHA-5.96 File-Temp-0.2304 IPC-Run-0.94
Email-Sender-1.300030 File-Type-0.22 JSON-2.90 Storable-2.51 Email-Simple-2.210
Getopt-Long-2.49.1 libwww-perl-6.15 Template-Toolkit-2.26
'
for module in $modules
do
tar xf $module.tar.gz
cd $module
perl Makefile.PL
make
# make check
make install
cd ..
done
cd /var/tmp/dist
[% c('tar', {
tar_src => [ 'perl', 'ImageMagick' ],
tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
}) %]
# vim: filetype=yaml sw=2
version: 0.1
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
remote_docker: 1
var:
deps:
- build-essential
- libxml2-dev
- zlib1g-dev
- libltdl-dev
- chrpath
- libfftw3-dev
- liblcms2-dev
- liblqr-1-0-dev
- libbz2-dev
- libjpeg-dev
- libpng-dev
imagemagick_version: 7.0.3-4
input_files:
- project: docker-image
- project: perl
name: perl
- URL: 'https://www.imagemagick.org/download/ImageMagick-[% c("var/imagemagick_version") %].tar.xz'
file_gpg_id: 1
sig_ext: asc
gpg_keyring: ImageMagick.gpg
- URL: https://cpan.metacpan.org/authors/id/G/GA/GAAS/Data-Dump-1.23.tar.gz
sha256sum: af53b05ef1387b4cab4427e6789179283e4f0da8cf036e8db516ddb344512b65
- URL: https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-1.39.tar.gz
sha256sum: 2d876b624b9c0a18acea9d30495649daf11fb0e01171ef20780072ee97c4a494
- URL: https://cpan.metacpan.org/authors/id/M/MS/MSHELOR/Digest-SHA-5.96.tar.gz
sha256sum: 2b8e0a9b6e359d5e14159661647cc0fbde06beb7f2a24bf003f5fad0a3a2786a
- URL: https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Email-Sender-1.300030.tar.gz
sha256sum: a7ec45897b131cd9534877cf81ccc03b699e2cb6bad265366601973a99f8dda2
- URL: https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Email-Simple-2.210.tar.gz
sha256sum: c8633fa462538967c036e3077617de9e5e8f6acc68d25546ba1d5bb1e12bd319
- URL: https://cpan.metacpan.org/authors/id/R/RI/RICHE/File-Path-2.12.tar.gz
sha256sum: bbf61a0d37c135c694e80f4ea344932bdc5474c213025ae307ea52cb6886d17e
- URL: https://cpan.metacpan.org/authors/id/U/UR/URI/File-Slurp-9999.19.tar.gz
sha256sum: ce29ebe995097ebd6e9bc03284714cdfa0c46dc94f6b14a56980747ea3253643
- URL: https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/File-Temp-0.2304.tar.gz
sha256sum: 13415323e48f7c9f34efdedf3d35141a7c3435e2beb8c6b922229dc317d321ac
- URL: https://cpan.metacpan.org/authors/id/P/PM/PMISON/File-Type-0.22.tar.gz
sha256sum: d35cd95fef57fd4dfd8831f62c34e294d7c4b861fc909e02b76071739d52d341
- URL: https://cpan.metacpan.org/authors/id/J/JV/JV/Getopt-Long-2.49.1.tar.gz
sha256sum: 98fad4235509aa24608d9ef895b5c60fe2acd2bca70ebdf1acaf6824e17a882f
- URL: https://cpan.metacpan.org/authors/id/G/GB/GBARR/IO-1.25.tar.gz
sha256sum: 89790db8b9281235dc995c1a85d532042ff68a90e1504abd39d463f05623e7b5
- URL: https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/IO-CaptureOutput-1.1104.tar.gz
sha256sum: fcc732fcb438f97a72b30e8c7796484bef2562e374553b207028e2fbf73f8330
- URL: https://cpan.metacpan.org/authors/id/T/TO/TODDR/IPC-Run-0.94.tar.gz
sha256sum: 2eb336c91a2b7ea61f98e5b2282d91020d39a484f16041e2365ffd30f8a5605b
- URL: https://cpan.metacpan.org/authors/id/M/MA/MAKAMAKA/JSON-2.90.tar.gz
sha256sum: 4ddbb3cb985a79f69a34e7c26cde1c81120d03487e87366f9a119f90f7bdfe88
- URL: https://cpan.metacpan.org/authors/id/E/ET/ETHER/libwww-perl-6.15.tar.gz
sha256sum: 6f349d45c21b1ec0501c4437dfcb70570940e6c3d5bff783bd91d4cddead8322
- URL: https://cpan.metacpan.org/authors/id/M/MS/MSCHILLI/LWP-Protocol-https-6.06.tar.gz
sha256sum: b86c83cc1dcf4a6f84e2fbe32f9c39591a36e6e418af00533505f3452496adef
- URL: https://cpan.metacpan.org/authors/id/R/RJ/RJBS/PathTools-3.62.tar.gz
sha256sum: 36350e12f58871437ba03391f80a506e447e3c6630cc37d0625bc25ff1c7b4d2
- URL: https://cpan.metacpan.org/authors/id/J/JC/JCRISTY/PerlMagick-6.89-1.tar.gz
sha256sum: c8f81869a4f007be63e67fddf724b23256f6209f16aa95e14d0eaef283772a59
- URL: https://cpan.metacpan.org/authors/id/A/AM/AMS/Storable-2.51.tar.gz
sha256sum: a566b792112bbba21131ec1d7a2bf78170c648484895283ae53c7f0c3dc2f0be
- URL: https://cpan.metacpan.org/authors/id/A/AB/ABW/Template-Toolkit-2.26.tar.gz
sha256sum: e7e1cf36026f1ef96d8233e18a3fb39e1eafe9109edc639ecf25b20651cd76be
- URL: https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/XML-LibXML-2.0128.tar.gz
sha256sum: 26e7ba451f3bade4d29ff00653a2ee01d13fe38b9a2ebcd0b0f3f82f9f688f2b
- URL: https://cpan.metacpan.org/authors/id/T/TO/TODDR/YAML-Syck-1.29.tar.gz
sha256sum: d3567b3653e610a2a0fd28286ddc7869ccdeba5e6663f9638c22bc17d6cfc939
#!/bin/sh
set -e
rootdir=$(pwd)
tar xf [% project %]-[% c("version") %].tar.gz
cd [% project %]-[% c("version") %]
mkdir bundle
cd bundle
tar xf $rootdir/[% c("input_files_by_name/tbb-testsuite-deps") %]
cat > set-env << EOF
basedir="$(readlink -f ${BASH_SOURCE%/*})"
export PATH="$basedir/perl/bin:$basedir/ImageMagick/bin:$PATH"
export LD_LIBRARY_PATH="$basedir/ImageMagick/lib"
EOF
echo [% c("git_hash") %] > bundle_commit.txt
echo [% c("version") %] > bundle_version.txt
cd ../..
mv [% project %]-[% c("version") %] [% project %]
[% c('tar', {
tar_src => [ project ],
tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
}) %]
# vim: filetype=yaml sw=2
version: 0.1.1
git_url: https://git.torproject.org/boklm/tor-browser-bundle-testsuite.git
git_hash: 59782207d2e5976d11226496f3dec57917cc5962
filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
input_files:
- project: tbb-testsuite-deps
name: tbb-testsuite-deps
Subproject commit a1e67d4963fa0f7594d35995c6bf59014a999b32
compress_tar: xz
# vim: filetype=yaml sw=2
debug: 1
compress_tar: gz
output_dir: "out/[% project %]"
pkg_type: build
docker_image: '[% pc("docker-image", "docker_save_image") %]'
var:
build_id: '[% sha256(c("var/build_id_txt")).substr(0, 6) %]'
build_id_txt: |
[% c("version") %]
[% IF c("git_hash"); GET c("abbrev"); END; %]
[% IF c("remote_docker") -%]
[% c("distribution") %]
[% END -%]
input_files: [% c("input_files_id") %]
build:
[% c("build", { filename => 'f', output_dir => '/out' }) %]
input_files_list: |
[% FOREACH file IN c("input_files_by_name").keys.sort -%]
[% c("input_files_by_name/" _ file) %]
[% END -%]
targets:
notarget: linux-x86_64
noint:
debug: 0
linux-x86_64:
distribution: Debian-7.11
arch: x86_64
var:
linux: 1
osname: linux-x86_64
linux-i686:
distribution: Debian-7.11
arch: i686
var:
linux: 1
osname: linux-i686
configure_opt: '--host=i686-linux-gnu CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32'
pre_pkginst: dpkg --add-architecture i386
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment