Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'maint' into patch-3
  • Loading branch information
Maria-12648430 committed Sep 7, 2021
2 parents 9d0c949 + 4632ac9 commit b784dd1
Show file tree
Hide file tree
Showing 4,216 changed files with 668,388 additions and 423,013 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .dir-locals.el
Expand Up @@ -6,6 +6,7 @@
(perl-mode (indent-tabs-mode . nil))
(xml-mode (indent-tabs-mode . nil))
;; In C code indentation is 4 spaces and in C++ 2 spaces
;; erts/ overrides C++ to 4 spaces
(c++-mode
(indent-tabs-mode . nil)
(c-basic-offset . 2))
Expand Down
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,23 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Affected versions**
The OTP versions that are affected by this bug.

**Additional context**
Add any other context about the problem here. If you wish to attach Erlang code you can either write it directly in the post using [code tags](https://guides.github.com/features/mastering-markdown/), create a [gist](https://gist.github.com), or attach it as a zip file to this post.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
11 changes: 10 additions & 1 deletion .github/dockerfiles/Dockerfile.32-bit
Expand Up @@ -12,9 +12,18 @@ RUN cd /buildroot && tar -xzf ./otp.tar.gz

WORKDIR /buildroot/otp/

RUN ./configure --prefix=/otp && make && make install && \
ENV CFLAGS="-O2 -g -Werror"

## Configure, check that no application are disabled, then make and then build doc chunks
RUN ./configure --with-ssl --prefix=/otp && \
if cat lib/*/CONF_INFO || cat lib/*/SKIP || cat lib/SKIP-APPLICATIONS; then exit 1; fi

RUN make && make install && \
make install-docs DOC_TARGETS=chunks

## Disable -Werror as testcases do not compile with it on
ENV CFLAGS="-O2 -g"

RUN TESTSUITE_ROOT=/tests ./otp_build tests

ENTRYPOINT ["bash","-c"]
14 changes: 12 additions & 2 deletions .github/dockerfiles/Dockerfile.64-bit
@@ -1,5 +1,4 @@
FROM docker.pkg.github.com/erlang/otp/ubuntu-base

## We do a SSA lint check here
ENV ERL_COMPILER_OPTIONS=ssalint

Expand All @@ -15,7 +14,18 @@ RUN cd /buildroot && tar -xzf ./otp.tar.gz

WORKDIR /buildroot/otp/

RUN ./configure --prefix=/otp && make && make install
ENV CC=clang CXX=clang++ \
CFLAGS="-O2 -g -Werror"

## Configure, check that no application are disabled and then make
# We need --with-ssl-lib-subdir=lib/x86_64-linux-gnu since clang does not
# give us this information such as gcc does...
RUN ./configure --with-ssl --with-ssl-lib-subdir=lib/x86_64-linux-gnu --prefix=/otp && \
if cat lib/*/CONF_INFO || cat lib/*/SKIP || cat lib/SKIP-APPLICATIONS; then exit 1; fi && \
make && make install

## Disable -Werror as testcases do not compile with it on
ENV CFLAGS="-O2 -g"

RUN TESTSUITE_ROOT=/tests ./otp_build tests

Expand Down
42 changes: 27 additions & 15 deletions .github/dockerfiles/Dockerfile.cross-compile
Expand Up @@ -3,47 +3,59 @@
##
FROM docker.pkg.github.com/erlang/otp/i386-debian-base as build

ARG HOST_ARCH=amd64
ARG HOST_TRIP=x86_64-linux-gnu

ARG MAKEFLAGS=-j4
ENV MAKEFLAGS=$MAKEFLAGS \
ERLC_USE_SERVER=yes \
ERL_TOP=/buildroot/otp
ERL_TOP=/buildroot/bootstrap/otp

WORKDIR /buildroot/bootstrap

ARG ARCHIVE=./otp.tar.gz
COPY $ARCHIVE /buildroot/otp.tar.gz
RUN cd /buildroot && tar xzf ./otp.tar.gz

WORKDIR /buildroot/otp/
RUN tar xzf ../otp.tar.gz

## Build the bootstrap system
RUN ./configure && make && make install
RUN cd $ERL_TOP && CFLAGS="-Wall -O2 -g" ./configure && make && make install

## Build pre-build tar ball
RUN scripts/build-otp-tar -o /buildroot/otp_clean_src.tar.gz /buildroot/otp_src.tar.gz -b /buildroot/otp/ /buildroot/otp.tar.gz
RUN cd $ERL_TOP && scripts/build-otp-tar -o /buildroot/otp_clean_src.tar.gz /buildroot/otp_src.tar.gz \
-b /buildroot/bootstrap/otp/ /buildroot/otp.tar.gz

## Prepare for a new build using pre-built tar ball
RUN cd .. && rm -rf otp && tar -xzf ./otp_src.tar.gz
RUN cd ../ && tar -xzf ./otp_src.tar.gz

ENV HOST=$HOST_TRIP \
CC=$HOST_TRIP-gcc \
CPPFLAGS="--sysroot=/buildroot/sysroot" \
CFLAGS="--sysroot=/buildroot/sysroot -O2 -g -Werror" \
CPP=$HOST_TRIP-cpp \
CXX=$HOST_TRIP-g++ \
LD=$CC \
DED_LDFLAGS="-shared -Wl,-Bsymbolic" \
LD_FLAGS="--sysroot=/buildroot/sysroot" \
DED_CFLAGS="$CFLAGS" \
DED_LDFLAGS="$LDFLAGS -shared -Wl,-Bsymbolic" \
RANLIB=$HOST_TRIP-ranlib \
AR=$HOST_TRIP-ar \
erl_xcomp_sysroot=/buildroot/sysroot
erl_xcomp_sysroot=/buildroot/sysroot \
ERL_TOP=/buildroot/otp

WORKDIR /buildroot/otp

## Build the cross system
RUN ./configure --prefix=/otp/ --host=$HOST --build=`erts/autoconf/config.guess` && \
make && make install
# We cannot use config.guess for --build since its value clashes with the
# canonical value of host...
RUN ./configure --prefix=/otp/ --host=$HOST --build=x86-pc-linux-gnu
RUN OTP_SMALL_BUILD=true V=1 make

RUN make odbc && make install

## Build the cross tests
ENV CFLAGS="--sysroot=/buildroot/sysroot -O2 -g"
RUN ./otp_build tests
RUN cd release/tests/test_server && \
erl -sname test@docker -noshell -eval "ts:install([{cross,\"yes\"},{crossflags,[{\"host\",\"$HOST\"}]},{crossroot,\"/$ERL_TOP\"}])." -s ts compile_testcases -s init stop
erl -sname test@docker -noshell \
-eval "ts:install([{cross,\"yes\"},{crossflags,[{\"host\",\"$HOST\"}]},{crossroot,\"/$ERL_TOP\"}])." \
-s ts compile_testcases -s init stop

FROM debian as install

Expand Down
57 changes: 34 additions & 23 deletions .github/dockerfiles/Dockerfile.debian-base
Expand Up @@ -2,33 +2,44 @@
## This docker file will build a base image for building Erlang/OTP
##
ARG BASE=debian
FROM $BASE
FROM $BASE:bullseye
## Need to have a second arg here as the first does not expose the $BASE in the script below
ARG BASE=debian

ARG HOST_ARCH=amd64
ARG HOST_TRIP=x86_64-linux-gnu
ENV HOST_TRIP=$HOST_TRIP
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8

ENV INSTALL_LIBS="zlib1g-dev libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev libwxbase3.0-dev libwxgtk3.0-dev libsctp-dev lksctp-tools"
ENV INSTALL_LIBS="zlib1g-dev libncurses5-dev libssl-dev unixodbc-dev libgmp3-dev libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libsctp-dev lksctp-tools"

## See https://wiki.debian.org/Multiarch/HOWTO for details on how to install things
RUN if [ "$BASE" = "i386/debian" ]; then BUILD_ARCH=`dpkg --print-architecture` && \
dpkg --add-architecture $HOST_ARCH && \
sed -i "s:deb http:deb [arch=$BUILD_ARCH,$HOST_ARCH] http:g" /etc/apt/sources.list; \
fi

RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y build-essential m4 autoconf fop xsltproc \
default-jdk libxml2-utils $INSTALL_LIBS

RUN if [ "$BASE" = "i386/debian" ]; then apt-get install -y \
crossbuild-essential-$HOST_ARCH \
$(for LIB in $INSTALL_LIBS; do echo "$LIB:$HOST_ARCH"; done) && \
for dir in `find / -type d -name $HOST_TRIP`; do \
echo -n "$dir: /buildroot/sysroot"; \
echo `dirname $dir`; \
mkdir -p /buildroot/sysroot$dir; \
cp -r `dirname $dir`/* `dirname /buildroot/sysroot$dir`; \
cp -r $dir/* `dirname /buildroot/sysroot$dir`; \
done; fi
##
## 1. Install build-essential to get access to dpkg-architecture
## 2. Use dpkg-architecture to figure out what we are runnon on
## 3. If the HOST_TRIP does not equal BUILD_TRIP we should cross compile
RUN apt-get update && apt-get -y upgrade && apt-get install -y build-essential && \
BUILD_TRIP=`dpkg-architecture -t${HOST_TRIP} -qDEB_BUILD_MULTIARCH` && \
BUILD_ARCH=`dpkg-architecture -t${HOST_TRIP} -qDEB_BUILD_ARCH` && \
if [ "$HOST_TRIP" != "$BUILD_TRIP" ]; then \
HOST_ARCH=`dpkg-architecture -t${HOST_TRIP} -qDEB_HOST_ARCH` && \
dpkg --add-architecture $HOST_ARCH && \
sed -i "s:deb http:deb [arch=$BUILD_ARCH,$HOST_ARCH] http:g" /etc/apt/sources.list; \
fi && \
apt-get update && \
apt-get install -y build-essential m4 autoconf fop xsltproc default-jdk libxml2-utils \
$INSTALL_LIBS && \
if [ "$HOST_TRIP" != "$BUILD_TRIP" ]; then \
apt-get install -y -f \
crossbuild-essential-$HOST_ARCH \
$(for LIB in $INSTALL_LIBS; do echo "$LIB:$HOST_ARCH"; done) && \
for dir in `find / -type d -name $HOST_TRIP`; do \
echo -n "$dir: /buildroot/sysroot"; \
echo `dirname $dir`; \
mkdir -p /buildroot/sysroot$dir; \
cp -r `dirname $dir`/* `dirname /buildroot/sysroot$dir`; \
cp -r $dir/* `dirname /buildroot/sysroot$dir`; \
done; \
fi && \
update-alternatives --set wx-config /usr/lib/${BUILD_TRIP}/wx/config/gtk3-unicode-3.0 && \
rm -rf /var/lib/apt/lists/*
3 changes: 1 addition & 2 deletions .github/dockerfiles/Dockerfile.documentation
Expand Up @@ -12,8 +12,7 @@ RUN cd /buildroot && tar -xzf ./otp.tar.gz

WORKDIR /buildroot/otp/

## We don't build pdf in order to save some time
ENV RELEASE_ROOT=/otp DOC_TARGETS="html man chunks"
ENV RELEASE_ROOT=/otp

RUN ./configure --prefix=/otp && make && make release

Expand Down
6 changes: 4 additions & 2 deletions .github/dockerfiles/Dockerfile.ubuntu-base
Expand Up @@ -3,11 +3,13 @@
##
FROM ubuntu

ENV INSTALL_LIBS="zlib1g-dev libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev libwxbase3.0-dev libwxgtk3.0-gtk3-dev libsctp-dev lksctp-tools"
ENV INSTALL_LIBS="zlib1g-dev libncurses5-dev libssl-dev unixodbc-dev libgmp3-dev libwxbase3.0-dev libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libsctp-dev lksctp-tools"

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y build-essential m4 autoconf fop xsltproc \
apt-get install -y build-essential m4 autoconf fop xsltproc clang clang-format \
default-jdk libxml2-utils $INSTALL_LIBS

RUN update-alternatives --set wx-config /usr/lib/x86_64-linux-gnu/wx/config/gtk3-unicode-3.0
20 changes: 20 additions & 0 deletions .github/scripts/base-tag
@@ -0,0 +1,20 @@
#!/bin/bash

set -x

case "$1" in
*i386-debian-base)
BASE="i386/debian"
BASE_TYPE=debian-base
;;
*debian-base)
BASE="debian"
BASE_TYPE=debian-base
;;
*ubuntu-base)
BASE="ubuntu"
BASE_TYPE=ubuntu-base
;;
esac
echo "::set-output name=BASE::${BASE}"
echo "::set-output name=BASE_TYPE::${BASE_TYPE}"
12 changes: 12 additions & 0 deletions .github/scripts/create-artifacts.sh
@@ -0,0 +1,12 @@
#!/bin/sh

DIR=${1}
TAG=${2}
VSN=${TAG#OTP-}

mkdir ${DIR}
tar -xzf otp_src.tar.gz
mv otp otp_src_${VSN}
tar -czf ${DIR}/otp_src_${VSN}.tar.gz otp_src_${VSN}
mv otp_doc_man.tar.gz ${DIR}/otp_doc_man_${VSN}.tar.gz
mv otp_doc_html.tar.gz ${DIR}/otp_doc_html_${VSN}.tar.gz
26 changes: 26 additions & 0 deletions .github/scripts/init-pre-release.sh
@@ -0,0 +1,26 @@
#!/bin/sh

## We create a tar ball that has generated configure
## (old versions might not have these included)
## This is used later by build-otp-tar to create
## the pre-built tar ball

if [ -f ./configure ]; then
git archive --prefix otp/ -o otp_src.tar.gz HEAD
else
ERL_TOP=`pwd`
./otp_build autoconf
find . -name aclocal.m4 | xargs git add -f
find . -name configure | xargs git add -f
find . -name config.h.in | xargs git add -f
find . -name config.guess | xargs git add -f
find . -name config.sub | xargs git add -f
find . -name install-sh | xargs git add -f
if ! git config user.name; then
git config user.email "you@example.com"
git config user.name "Your Name"
fi
git commit --no-verify -m 'Add generated configure files'
git archive --prefix otp/ -o otp_src.tar.gz HEAD
git reset --hard HEAD~1
fi
8 changes: 8 additions & 0 deletions .github/scripts/release-docs.sh
@@ -0,0 +1,8 @@
#!/bin/sh

docker run -v $PWD/:/github otp "make release docs release_docs && make release_docs DOC_TARGETS='man html pdf' RELEASE_ROOT=/github/docs"
sudo chown -R `whoami` docs
cd docs
tar czf ../otp_doc_man.tar.gz man
rm -rf man
tar czf ../otp_doc_html.tar.gz *

0 comments on commit b784dd1

Please sign in to comment.