chiark / gitweb /
all: switch to jdk8 as default
[fdroidserver.git] / buildserver / cookbooks / fdroidbuild-general / recipes / default.rb
1
2 user = node[:settings][:user]
3 debian_mirror = node[:settings][:debian_mirror]
4
5 execute 'set_debian_mirror' do
6   command "sed -i 's,http://ftp.uk.debian.org/debian/,#{debian_mirror},g' /etc/apt/sources.list"
7 end
8
9 execute "jessie_backports" do
10   command "echo 'deb #{debian_mirror} jessie-backports main' > /etc/apt/sources.list.d/backports.list"
11   only_if "grep jessie /etc/apt/sources.list"
12 end
13
14 execute "apt-get-update" do
15   command "apt-get update"
16 end
17
18 %w{
19     ant
20     ant-contrib
21     autoconf
22     autoconf2.13
23     automake1.11
24     autopoint
25     bison
26     bzr
27     cmake
28     curl
29     expect
30     faketime
31     flex
32     gettext
33     git-core
34     git-svn
35     gperf
36     graphviz
37     imagemagick
38     inkscape
39     javacc
40     libarchive-zip-perl
41     libexpat1-dev
42     libglib2.0-dev
43     liblzma-dev
44     librsvg2-bin
45     libsaxonb-java
46     libssl-dev
47     libssl1.0.0
48     libtool
49     libtool-bin
50     make
51     maven
52     mercurial
53     nasm
54     openjdk-8-jdk-headless
55     optipng
56     p7zip
57     pandoc
58     perlmagick
59     pkg-config
60     python-gnupg
61     python-magic
62     python-setuptools
63     python3-gnupg
64     python3-requests
65     python3-yaml
66     qt5-default
67     qtbase5-dev
68     quilt
69     realpath
70     scons
71     subversion
72     swig
73     texinfo
74     transfig
75     unzip
76     vorbis-tools
77     xsltproc
78     yasm
79     zip
80   }.each do |pkg|
81   package pkg do
82     action :install
83   end
84 end
85
86 if node['kernel']['machine'] == "x86_64"
87   %w{libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386}.each do |pkg|
88     package pkg do
89       action :install
90     end
91   end
92 end
93
94 easy_install_package "compare-locales" do
95   options "-U"
96   action :install
97 end
98
99 execute "set-default-java" do
100   command "update-java-alternatives --set java-1.8.0-openjdk-i386"
101 end
102
103 # Ubuntu trusty 14.04's paramiko does not work with jessie's openssh's default settings
104 # https://stackoverflow.com/questions/7286929/paramiko-incompatible-ssh-peer-no-acceptable-kex-algorithm/32691055#32691055
105 execute "support-ubuntu-trusty-paramiko" do
106   only_if { node[:settings][:ubuntu_trusty] == 'true' }
107   command "echo Ciphers aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes128-ctr >> /etc/ssh/sshd_config"
108   command "echo MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,hmac-sha1 >> /etc/ssh/sshd_config"
109   command "echo KexAlgorithms diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1 >> /etc/ssh/sshd_config"
110 end