Commit f8aab787 authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Łukasz Nowak

playbook: Install gcc 4.9 on Debian 9

As standalone-shared is for ERP5-related mainly, and those do require
old gcc version, install (in hackich way) gcc-4.9 on Debian 9.

Also gcc and g++ (and others) are set to be default as 4.9.

The hackish way is based on https://unix.stackexchange.com/questions/334888/how-install-g-4-9-on-debian-stretch

/reviewed-on !44
parent 7a706b57
---
- name: Install Debian Jessie repository for Debian 9 for gcc-4.9
apt_repository: repo='deb http://ftp.us.debian.org/debian/ jessie main contrib non-free' state=present update_cache=no
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
- name: Update repos for debian 9
shell: apt update --allow-insecure-repositories
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
- name: Install gcc-4.9 on Debian 9
apt: name=gcc-4.9 state=present update_cache=yes cache_valid_time=3600
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
- name: Install g++-4.9 on Debian 9
apt: name=g++-4.9 state=present update_cache=yes cache_valid_time=3600
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
- name: Default to cpp-4.9
file:
src: /usr/bin/cpp-4.9
dest: /usr/bin/cpp
state: link
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
- name: Default to gcc-4.9
file:
src: /usr/bin/gcc-4.9
dest: /usr/bin/gcc
state: link
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
- name: Default to gcc-ar-4.9
file:
src: /usr/bin/gcc-ar-4.9
dest: /usr/bin/gcc-ar
state: link
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
- name: Default to gcc-nm-4.9
file:
src: /usr/bin/gcc-nm-4.9
dest: /usr/bin/gcc-nm
state: link
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
- name: Default to gcc-ranlib-4.9
file:
src: /usr/bin/gcc-ranlib-4.9
dest: /usr/bin/gcc-ranlib
state: link
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
- name: Default to gcov-4.9
file:
src: /usr/bin/gcov-4.9
dest: /usr/bin/gcov
state: link
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
- name: Default to g++-4.9
file:
src: /usr/bin/g++-4.9
dest: /usr/bin/g++
state: link
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
\ No newline at end of file
---
- include: debian9-gcc-4.9.yml
- name: fetch shared vars
include_vars: erp5-common.yml
......
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