chiark / gitweb /
f9f81fe08aca96c5744ff4f17e6dda8db8e86592
[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-7-jdk
55     openjdk-8-jdk
56     optipng
57     p7zip
58     pandoc
59     perlmagick
60     pkg-config
61     python-gnupg
62     python-magic
63     python-setuptools
64     python3-gnupg
65     python3-requests
66     python3-yaml
67     qt5-default
68     qtbase5-dev
69     quilt
70     realpath
71     scons
72     subversion
73     swig
74     texinfo
75     transfig
76     unzip
77     vorbis-tools
78     xsltproc
79     yasm
80     zip
81   }.each do |pkg|
82   package pkg do
83     action :install
84   end
85 end
86
87 if node['kernel']['machine'] == "x86_64"
88   %w{libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386}.each do |pkg|
89     package pkg do
90       action :install
91     end
92   end
93 end
94
95 easy_install_package "compare-locales" do
96   options "-U"
97   action :install
98 end
99
100 execute "set-default-java" do
101   command "update-java-alternatives --set java-1.7.0-openjdk-i386"
102 end
103
104 # Ubuntu trusty 14.04's paramiko does not work with jessie's openssh's default settings
105 # https://stackoverflow.com/questions/7286929/paramiko-incompatible-ssh-peer-no-acceptable-kex-algorithm/32691055#32691055
106 execute "support-ubuntu-trusty-paramiko" do
107   only_if { node[:settings][:ubuntu_trusty] == 'true' }
108   command "echo Ciphers aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes128-ctr >> /etc/ssh/sshd_config"
109   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"
110   command "echo KexAlgorithms diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1 >> /etc/ssh/sshd_config"
111 end