Something went wrong. Try again.
forked from cz-nic/bird
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108{% for distro in distros %}{% if distro.name == target -%}{% set d = distro.docker -%}{% if d == "static" %}{{ fail("Docker for " ~ target ~ " is static, edit that file directly and don't forget to commit the changes into Git.") }}{% endif -%}# Autogenerated Dockerfile for {{ target }}.# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2# to change this file.# Request a manual pipeline to rebuild the image here:# https://gitlab.nic.cz/labs/bird/-/pipelines/newFROM {{ d.parent }}{%- if distro.type == "deb" %}ENV DEBIAN_FRONTEND=noninteractiveRUN find /etc/apt/sourc* -type f -exec grep -nH '.*' '{}' +{%- for ca in distro.crossarch %}RUN dpkg --add-architecture {{ ca }}{%- endfor %}{%- if distro.name == "ubuntu-22.04-amd64" %}RUN find /etc/apt/sourc* -type f -exec sed -i 's/^deb /deb [arch=amd64] /' '{}' +RUN find /etc/apt/sourc* -type f -exec sed -r '/^deb /{s#arch=amd64#arch={{ distro.crossarch | join(",") }}#;s#https?://[^ ]+#http://ports.ubuntu.com/ubuntu-ports/#}' '{}' + > /etc/apt/sources.list.d/crossbuild.list{%- elif distro.shortname == "ubuntu" and distro.crossarch %}RUN find /etc/apt/sourc* -type f -exec sed -i '/Components: /a\Architectures: amd64' '{}' +RUN find /etc/apt/sourc* -type f -exec sed 's#URIs: .*#URIs: http://ports.ubuntu.com/ubuntu-ports/#;s#Architectures: amd64#Architectures: {{ distro.crossarch | join(",") }}#' '{}' + > /etc/apt/sources.list.d/crossbuild.sources{%- endif %}RUN find /etc/apt/sourc* -type f -exec grep -nH '.*' '{}' +RUN apt-get -y updateRUN apt-get -y upgradeRUN apt-get -y --no-install-recommends install \ {%- if distro.shortname == "ubuntu" %} tzdata \ {%- endif %} build-essential \ flex \ bison \ autoconf \ ncurses-dev \ libreadline-dev \ {{ d.libssh_kind }}-dev \ {%- for ca in distro.crossarch %} crossbuild-essential-{{ ca }} \ libreadline-dev:{{ ca }} \ ncurses-dev:{{ ca }} \ {%- endfor %} {%- if distro.crossarch %} qemu-user \ qemu-user-binfmt \ binfmt-support \ {%- endif %} linuxdoc-tools-latex \ texlive-latex-extra \ opensp \ docbook-xsl \ xsltproc{% if d.needs_adduser %} \ adduser{% endif %}RUN apt-get -y --no-install-recommends install \ git \ dpkg-dev \ debhelper \ lsb-release \ apt-utils \ quilt \ python3 \ python3-pip \ python3-setuptools \ python3-venvRUN apt-get -y clean{%- elif distro.type == "rpm" %}{%- if d.preinstall %}{{ d.preinstall }}{%- endif %}RUN {{ d.installer }} up{% if d.installer[:6] != "zypper" %}grade{% endif %}RUN {{ d.installer }} install \ gcc \ make \ flex \ bison \ autoconf \ {%- if d.pkgconfig %} pkgconfig \ {%- endif %} libssh-devel \ ncurses-devel \ readline-develRUN {{ d.installer }} install \ git \ {%- if d.alternative_lsb %} {{ d.alternative_lsb }} \ {%- else %} lsb-release \ {%- endif %} rpm-build \ {%- if d.faketime == "lib" %} libfaketime \ {%- elif d.faketime %} faketime \ {%- endif %} {%- if d.systemd %} systemd \ {%- endif %} systemd-rpm-macros \ {%- if d.sysuser %} sysuser-tools \ {%- endif %} python3 \ python3-pip \ python3-setuptools{%- endif %}{%- endif %}{% endfor %}