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