Merge branch 'signalwire:master' into master
This commit is contained in:
commit
68d6e5c6cb
184
.drone.yml
184
.drone.yml
|
@ -1,184 +0,0 @@
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
name: unit-tests
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: bootstrap
|
|
||||||
image: signalwire/freeswitch-public-base:bullseye
|
|
||||||
pull: always
|
|
||||||
commands:
|
|
||||||
- cat /proc/sys/kernel/core_pattern
|
|
||||||
- ./bootstrap.sh -j
|
|
||||||
|
|
||||||
- name: configure
|
|
||||||
image: signalwire/freeswitch-public-base:bullseye
|
|
||||||
pull: always
|
|
||||||
environment:
|
|
||||||
REPOTOKEN:
|
|
||||||
from_secret: repotoken
|
|
||||||
commands:
|
|
||||||
- echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf
|
|
||||||
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libsofia-sip-ua0 libspandsp-dev
|
|
||||||
- DEBIAN_FRONTEND=noninteractive apt-get -yq install libspandsp3-dev
|
|
||||||
- export REPOTOKEN=''
|
|
||||||
- rm -rf /etc/apt/auth.conf
|
|
||||||
- git clone https://github.com/freeswitch/sofia-sip.git
|
|
||||||
- cd sofia-sip && ./autogen.sh && ./configure.gnu && make -j`nproc` && make install && cd ..
|
|
||||||
- echo 'codecs/mod_openh264' >> modules.conf
|
|
||||||
- sed -i '/applications\\/mod_http_cache/s/^#//g' modules.conf
|
|
||||||
- sed -i '/event_handlers\\/mod_rayo/s/^#//g' modules.conf
|
|
||||||
- sed -i '/formats\\/mod_opusfile/s/^#//g' modules.conf
|
|
||||||
- sed -i '/languages\\/mod_lua/s/^#//g' modules.conf
|
|
||||||
- export ASAN_OPTIONS=log_path=stdout:disable_coredump=0:unmap_shadow_on_exit=1:fast_unwind_on_malloc=0
|
|
||||||
- ./configure --enable-address-sanitizer --enable-fake-dlclose
|
|
||||||
|
|
||||||
- name: build
|
|
||||||
image: signalwire/freeswitch-public-base:bullseye
|
|
||||||
pull: always
|
|
||||||
environment:
|
|
||||||
REPOTOKEN:
|
|
||||||
from_secret: repotoken
|
|
||||||
commands:
|
|
||||||
- echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf
|
|
||||||
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libsofia-sip-ua0 libspandsp-dev
|
|
||||||
- DEBIAN_FRONTEND=noninteractive apt-get -yq install libspandsp3-dev
|
|
||||||
- export REPOTOKEN=''
|
|
||||||
- rm -rf /etc/apt/auth.conf
|
|
||||||
- cd sofia-sip && make install && cd ..
|
|
||||||
- echo '#!/bin/bash\nmake -j`nproc --all` |& tee ./unit-tests-build-result.txt\nexitstatus=$${PIPESTATUS[0]}\necho $$exitstatus > ./build-status.txt\n' > build.sh
|
|
||||||
- chmod +x build.sh
|
|
||||||
- ./build.sh
|
|
||||||
|
|
||||||
- name: run-tests
|
|
||||||
image: signalwire/freeswitch-public-base:bullseye
|
|
||||||
pull: always
|
|
||||||
environment:
|
|
||||||
REPOTOKEN:
|
|
||||||
from_secret: repotoken
|
|
||||||
commands:
|
|
||||||
- echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf
|
|
||||||
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libsofia-sip-ua0 libspandsp-dev
|
|
||||||
- DEBIAN_FRONTEND=noninteractive apt-get -yq install libspandsp3-dev
|
|
||||||
- export REPOTOKEN=''
|
|
||||||
- rm -rf /etc/apt/auth.conf
|
|
||||||
- cd sofia-sip && make install && cd ..
|
|
||||||
- make install || true
|
|
||||||
- cd tests/unit
|
|
||||||
- export ASAN_OPTIONS=log_path=stdout:disable_coredump=0:unmap_shadow_on_exit=1:fast_unwind_on_malloc=0
|
|
||||||
- ./run-tests.sh
|
|
||||||
- ls -la /cores
|
|
||||||
- mkdir logs && (mv log_run-tests_*.html logs || true) && (mv backtrace_*.txt logs || true)
|
|
||||||
- echo 0 > run-tests-status.txt
|
|
||||||
- ./collect-test-logs.sh && exit 0 || echo 'Some tests failed'
|
|
||||||
- echo 1 > run-tests-status.txt
|
|
||||||
- cd logs && ls -la
|
|
||||||
|
|
||||||
- name: notify
|
|
||||||
image: signalwire/drone-notify
|
|
||||||
pull: always
|
|
||||||
environment:
|
|
||||||
SLACK_WEBHOOK_URL:
|
|
||||||
from_secret: slack_webhook_url
|
|
||||||
ENV_FILE:
|
|
||||||
from_secret: notify_env
|
|
||||||
commands:
|
|
||||||
- /root/unit-tests-notify.sh
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- master
|
|
||||||
event:
|
|
||||||
- pull_request
|
|
||||||
- push
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
name: scan-build
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: bootstrap
|
|
||||||
image: signalwire/freeswitch-public-base:bookworm
|
|
||||||
pull: always
|
|
||||||
commands:
|
|
||||||
- apt-get update && apt-get -yq install autoconf
|
|
||||||
- ./bootstrap.sh -j
|
|
||||||
|
|
||||||
- name: configure
|
|
||||||
image: signalwire/freeswitch-public-base:bookworm
|
|
||||||
pull: always
|
|
||||||
environment:
|
|
||||||
REPOTOKEN:
|
|
||||||
from_secret: repotoken
|
|
||||||
commands:
|
|
||||||
- echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf
|
|
||||||
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libspandsp-dev
|
|
||||||
- DEBIAN_FRONTEND=noninteractive apt-get -yq install libsofia-sip-ua-dev libspandsp3-dev
|
|
||||||
- export REPOTOKEN=''
|
|
||||||
- rm -rf /etc/apt/auth.conf
|
|
||||||
- cp build/modules.conf.most modules.conf
|
|
||||||
#Enable/Uncomment mods
|
|
||||||
- echo 'codecs/mod_openh264' >> modules.conf
|
|
||||||
- sed -i "/mod_mariadb/s/^#//g" modules.conf
|
|
||||||
- sed -i "/mod_v8/s/^#//g" modules.conf
|
|
||||||
#Disable/Comment out mods
|
|
||||||
- sed -i '/mod_ilbc/s/^/#/g' modules.conf
|
|
||||||
- sed -i '/mod_isac/s/^/#/g' modules.conf
|
|
||||||
- sed -i '/mod_mp4/s/^/#/g' modules.conf
|
|
||||||
- sed -i '/mod_mongo/s/^/#/g' modules.conf
|
|
||||||
- sed -i '/mod_pocketsphinx/s/^/#/g' modules.conf
|
|
||||||
- sed -i '/mod_sangoma_codec/s/^/#/g' modules.conf
|
|
||||||
- sed -i '/mod_siren/s/^/#/g' modules.conf
|
|
||||||
#Comment out mods for a while
|
|
||||||
- sed -i '/mod_avmd/s/^/#/g' modules.conf
|
|
||||||
- sed -i '/mod_basic/s/^/#/g' modules.conf
|
|
||||||
- sed -i '/mod_cdr_mongodb/s/^/#/g' modules.conf
|
|
||||||
- sed -i '/mod_cv/s/^/#/g' modules.conf
|
|
||||||
- sed -i '/mod_erlang_event/s/^/#/g' modules.conf
|
|
||||||
- sed -i '/mod_perl/s/^/#/g' modules.conf
|
|
||||||
- sed -i '/mod_rtmp/s/^/#/g' modules.conf
|
|
||||||
- sed -i '/mod_unimrcp/s/^/#/g' modules.conf
|
|
||||||
- sed -i '/mod_xml_rpc/s/^/#/g' modules.conf
|
|
||||||
- ./configure
|
|
||||||
|
|
||||||
- name: scan-build
|
|
||||||
image: signalwire/freeswitch-public-base:bookworm
|
|
||||||
pull: always
|
|
||||||
environment:
|
|
||||||
REPOTOKEN:
|
|
||||||
from_secret: repotoken
|
|
||||||
commands:
|
|
||||||
- echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf
|
|
||||||
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libspandsp-dev
|
|
||||||
- DEBIAN_FRONTEND=noninteractive apt-get -yq install libsofia-sip-ua-dev libspandsp3-dev
|
|
||||||
- export REPOTOKEN=''
|
|
||||||
- rm -rf /etc/apt/auth.conf
|
|
||||||
- mkdir -p scan-build
|
|
||||||
- echo '#!/bin/bash\nscan-build-14 --force-analyze-debug-code -o ./scan-build/ make -j`nproc --all` |& tee ./scan-build-result.txt\nexitstatus=$${PIPESTATUS[0]}\necho $$exitstatus > ./scan-build-status.txt\n' > scan.sh
|
|
||||||
- chmod +x scan.sh
|
|
||||||
- ./scan.sh
|
|
||||||
- exitstatus=`cat ./scan-build-status.txt`
|
|
||||||
- echo "*** Exit status is $exitstatus"
|
|
||||||
|
|
||||||
- name: notify
|
|
||||||
image: signalwire/drone-notify
|
|
||||||
pull: always
|
|
||||||
environment:
|
|
||||||
SLACK_WEBHOOK_URL:
|
|
||||||
from_secret: slack_webhook_url
|
|
||||||
ENV_FILE:
|
|
||||||
from_secret: notify_env
|
|
||||||
commands:
|
|
||||||
- /root/scan-build-notify.sh
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- master
|
|
||||||
event:
|
|
||||||
- pull_request
|
|
||||||
- push
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: signature
|
|
||||||
hmac: 7e5f6cafc88da0be59243daf47a2a5607ff00b45f441ce4c1041d4b690e8a853
|
|
||||||
|
|
||||||
...
|
|
|
@ -8,7 +8,6 @@ ARG MAINTAINER_EMAIL="andrey@signalwire.com"
|
||||||
# Credentials
|
# Credentials
|
||||||
ARG REPO_DOMAIN=freeswitch.signalwire.com
|
ARG REPO_DOMAIN=freeswitch.signalwire.com
|
||||||
ARG REPO_USERNAME=user
|
ARG REPO_USERNAME=user
|
||||||
ARG REPO_PASSWORD=password
|
|
||||||
|
|
||||||
ARG BUILD_NUMBER=42
|
ARG BUILD_NUMBER=42
|
||||||
ARG GIT_SHA=0000000000
|
ARG GIT_SHA=0000000000
|
||||||
|
@ -51,19 +50,10 @@ deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${COD
|
||||||
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
|
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
RUN --mount=type=secret,id=REPO_PASSWORD \
|
|
||||||
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \
|
|
||||||
printf "login ${REPO_USERNAME} " >> ~/.netrc && \
|
|
||||||
printf "password " >> ~/.netrc && \
|
|
||||||
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \
|
|
||||||
cp -f ~/.netrc /etc/apt/auth.conf
|
|
||||||
|
|
||||||
RUN git config --global --add safe.directory '*' \
|
RUN git config --global --add safe.directory '*' \
|
||||||
&& git config --global user.name "${MAINTAINER_NAME}" \
|
&& git config --global user.name "${MAINTAINER_NAME}" \
|
||||||
&& git config --global user.email "${MAINTAINER_EMAIL}"
|
&& git config --global user.email "${MAINTAINER_EMAIL}"
|
||||||
|
|
||||||
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg
|
|
||||||
|
|
||||||
# Bootstrap and Build
|
# Bootstrap and Build
|
||||||
COPY . ${DATA_DIR}
|
COPY . ${DATA_DIR}
|
||||||
WORKDIR ${DATA_DIR}
|
WORKDIR ${DATA_DIR}
|
||||||
|
@ -72,9 +62,25 @@ RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
|
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
|
||||||
|
|
||||||
RUN apt-get -q update && \
|
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
|
||||||
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
|
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
||||||
apt-get -y -f install
|
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
||||||
|
printf "password " >> /etc/apt/auth.conf && \
|
||||||
|
cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \
|
||||||
|
sha512sum /run/secrets/REPO_PASSWORD && \
|
||||||
|
curl \
|
||||||
|
--fail \
|
||||||
|
--netrc-file /etc/apt/auth.conf \
|
||||||
|
--output ${GPG_KEY} \
|
||||||
|
https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg && \
|
||||||
|
file ${GPG_KEY} && \
|
||||||
|
apt-get --quiet update && \
|
||||||
|
mk-build-deps \
|
||||||
|
--install \
|
||||||
|
--remove debian/control \
|
||||||
|
--tool "apt-get --yes --no-install-recommends" && \
|
||||||
|
apt-get --yes --fix-broken install && \
|
||||||
|
rm -f /etc/apt/auth.conf
|
||||||
|
|
||||||
ENV DEB_BUILD_OPTIONS="parallel=1"
|
ENV DEB_BUILD_OPTIONS="parallel=1"
|
||||||
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
|
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
|
||||||
|
|
|
@ -8,7 +8,6 @@ ARG MAINTAINER_EMAIL="andrey@signalwire.com"
|
||||||
# Credentials
|
# Credentials
|
||||||
ARG REPO_DOMAIN=freeswitch.signalwire.com
|
ARG REPO_DOMAIN=freeswitch.signalwire.com
|
||||||
ARG REPO_USERNAME=user
|
ARG REPO_USERNAME=user
|
||||||
ARG REPO_PASSWORD=password
|
|
||||||
|
|
||||||
ARG BUILD_NUMBER=42
|
ARG BUILD_NUMBER=42
|
||||||
ARG GIT_SHA=0000000000
|
ARG GIT_SHA=0000000000
|
||||||
|
@ -51,19 +50,10 @@ deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev ${CODE
|
||||||
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev ${CODENAME} main
|
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev ${CODENAME} main
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
RUN --mount=type=secret,id=REPO_PASSWORD \
|
|
||||||
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \
|
|
||||||
printf "login ${REPO_USERNAME} " >> ~/.netrc && \
|
|
||||||
printf "password " >> ~/.netrc && \
|
|
||||||
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \
|
|
||||||
cp -f ~/.netrc /etc/apt/auth.conf
|
|
||||||
|
|
||||||
RUN git config --global --add safe.directory '*' \
|
RUN git config --global --add safe.directory '*' \
|
||||||
&& git config --global user.name "${MAINTAINER_NAME}" \
|
&& git config --global user.name "${MAINTAINER_NAME}" \
|
||||||
&& git config --global user.email "${MAINTAINER_EMAIL}"
|
&& git config --global user.email "${MAINTAINER_EMAIL}"
|
||||||
|
|
||||||
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev/signalwire-freeswitch-repo.gpg
|
|
||||||
|
|
||||||
# Bootstrap and Build
|
# Bootstrap and Build
|
||||||
COPY . ${DATA_DIR}
|
COPY . ${DATA_DIR}
|
||||||
WORKDIR ${DATA_DIR}
|
WORKDIR ${DATA_DIR}
|
||||||
|
@ -72,9 +62,25 @@ RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
|
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
|
||||||
|
|
||||||
RUN apt-get -q update && \
|
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
|
||||||
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
|
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
||||||
apt-get -y -f install
|
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
||||||
|
printf "password " >> /etc/apt/auth.conf && \
|
||||||
|
cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \
|
||||||
|
sha512sum /run/secrets/REPO_PASSWORD && \
|
||||||
|
curl \
|
||||||
|
--fail \
|
||||||
|
--netrc-file /etc/apt/auth.conf \
|
||||||
|
--output ${GPG_KEY} \
|
||||||
|
https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev/signalwire-freeswitch-repo.gpg && \
|
||||||
|
file ${GPG_KEY} && \
|
||||||
|
apt-get --quiet update && \
|
||||||
|
mk-build-deps \
|
||||||
|
--install \
|
||||||
|
--remove debian/control \
|
||||||
|
--tool "apt-get --yes --no-install-recommends" && \
|
||||||
|
apt-get --yes --fix-broken install && \
|
||||||
|
rm -f /etc/apt/auth.conf
|
||||||
|
|
||||||
ENV DEB_BUILD_OPTIONS="parallel=1"
|
ENV DEB_BUILD_OPTIONS="parallel=1"
|
||||||
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
|
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
|
||||||
|
|
|
@ -8,7 +8,6 @@ ARG MAINTAINER_EMAIL="andrey@signalwire.com"
|
||||||
# Credentials
|
# Credentials
|
||||||
ARG REPO_DOMAIN=freeswitch.signalwire.com
|
ARG REPO_DOMAIN=freeswitch.signalwire.com
|
||||||
ARG REPO_USERNAME=user
|
ARG REPO_USERNAME=user
|
||||||
ARG REPO_PASSWORD=password
|
|
||||||
|
|
||||||
ARG BUILD_NUMBER=42
|
ARG BUILD_NUMBER=42
|
||||||
ARG GIT_SHA=0000000000
|
ARG GIT_SHA=0000000000
|
||||||
|
@ -51,19 +50,10 @@ deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${COD
|
||||||
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
|
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
RUN --mount=type=secret,id=REPO_PASSWORD \
|
|
||||||
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \
|
|
||||||
printf "login ${REPO_USERNAME} " >> ~/.netrc && \
|
|
||||||
printf "password " >> ~/.netrc && \
|
|
||||||
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \
|
|
||||||
cp -f ~/.netrc /etc/apt/auth.conf
|
|
||||||
|
|
||||||
RUN git config --global --add safe.directory '*' \
|
RUN git config --global --add safe.directory '*' \
|
||||||
&& git config --global user.name "${MAINTAINER_NAME}" \
|
&& git config --global user.name "${MAINTAINER_NAME}" \
|
||||||
&& git config --global user.email "${MAINTAINER_EMAIL}"
|
&& git config --global user.email "${MAINTAINER_EMAIL}"
|
||||||
|
|
||||||
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg
|
|
||||||
|
|
||||||
# Bootstrap and Build
|
# Bootstrap and Build
|
||||||
COPY . ${DATA_DIR}
|
COPY . ${DATA_DIR}
|
||||||
WORKDIR ${DATA_DIR}
|
WORKDIR ${DATA_DIR}
|
||||||
|
@ -72,9 +62,25 @@ RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a arm64 ${CODENAME}
|
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a arm64 ${CODENAME}
|
||||||
|
|
||||||
RUN apt-get -q update && \
|
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
|
||||||
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
|
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
||||||
apt-get -y -f install
|
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
||||||
|
printf "password " >> /etc/apt/auth.conf && \
|
||||||
|
cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \
|
||||||
|
sha512sum /run/secrets/REPO_PASSWORD && \
|
||||||
|
curl \
|
||||||
|
--fail \
|
||||||
|
--netrc-file /etc/apt/auth.conf \
|
||||||
|
--output ${GPG_KEY} \
|
||||||
|
https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg && \
|
||||||
|
file ${GPG_KEY} && \
|
||||||
|
apt-get --quiet update && \
|
||||||
|
mk-build-deps \
|
||||||
|
--install \
|
||||||
|
--remove debian/control \
|
||||||
|
--tool "apt-get --yes --no-install-recommends" && \
|
||||||
|
apt-get --yes --fix-broken install && \
|
||||||
|
rm -f /etc/apt/auth.conf
|
||||||
|
|
||||||
ENV DEB_BUILD_OPTIONS="parallel=1"
|
ENV DEB_BUILD_OPTIONS="parallel=1"
|
||||||
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
|
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
|
||||||
|
|
|
@ -8,7 +8,6 @@ ARG MAINTAINER_EMAIL="andrey@signalwire.com"
|
||||||
# Credentials
|
# Credentials
|
||||||
ARG REPO_DOMAIN=freeswitch.signalwire.com
|
ARG REPO_DOMAIN=freeswitch.signalwire.com
|
||||||
ARG REPO_USERNAME=user
|
ARG REPO_USERNAME=user
|
||||||
ARG REPO_PASSWORD=password
|
|
||||||
|
|
||||||
ARG BUILD_NUMBER=42
|
ARG BUILD_NUMBER=42
|
||||||
ARG GIT_SHA=0000000000
|
ARG GIT_SHA=0000000000
|
||||||
|
@ -51,19 +50,10 @@ deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${COD
|
||||||
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
|
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
RUN --mount=type=secret,id=REPO_PASSWORD \
|
|
||||||
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \
|
|
||||||
printf "login ${REPO_USERNAME} " >> ~/.netrc && \
|
|
||||||
printf "password " >> ~/.netrc && \
|
|
||||||
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \
|
|
||||||
cp -f ~/.netrc /etc/apt/auth.conf
|
|
||||||
|
|
||||||
RUN git config --global --add safe.directory '*' \
|
RUN git config --global --add safe.directory '*' \
|
||||||
&& git config --global user.name "${MAINTAINER_NAME}" \
|
&& git config --global user.name "${MAINTAINER_NAME}" \
|
||||||
&& git config --global user.email "${MAINTAINER_EMAIL}"
|
&& git config --global user.email "${MAINTAINER_EMAIL}"
|
||||||
|
|
||||||
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg
|
|
||||||
|
|
||||||
# Bootstrap and Build
|
# Bootstrap and Build
|
||||||
COPY . ${DATA_DIR}
|
COPY . ${DATA_DIR}
|
||||||
WORKDIR ${DATA_DIR}
|
WORKDIR ${DATA_DIR}
|
||||||
|
@ -72,9 +62,25 @@ RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
|
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
|
||||||
|
|
||||||
RUN apt-get -q update && \
|
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
|
||||||
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
|
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
||||||
apt-get -y -f install
|
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
||||||
|
printf "password " >> /etc/apt/auth.conf && \
|
||||||
|
cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \
|
||||||
|
sha512sum /run/secrets/REPO_PASSWORD && \
|
||||||
|
curl \
|
||||||
|
--fail \
|
||||||
|
--netrc-file /etc/apt/auth.conf \
|
||||||
|
--output ${GPG_KEY} \
|
||||||
|
https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg && \
|
||||||
|
file ${GPG_KEY} && \
|
||||||
|
apt-get --quiet update && \
|
||||||
|
mk-build-deps \
|
||||||
|
--install \
|
||||||
|
--remove debian/control \
|
||||||
|
--tool "apt-get --yes --no-install-recommends" && \
|
||||||
|
apt-get --yes --fix-broken install && \
|
||||||
|
rm -f /etc/apt/auth.conf
|
||||||
|
|
||||||
ENV DEB_BUILD_OPTIONS="parallel=1"
|
ENV DEB_BUILD_OPTIONS="parallel=1"
|
||||||
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
|
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
|
||||||
|
|
|
@ -8,7 +8,6 @@ ARG MAINTAINER_EMAIL="andrey@signalwire.com"
|
||||||
# Credentials
|
# Credentials
|
||||||
ARG REPO_DOMAIN=freeswitch.signalwire.com
|
ARG REPO_DOMAIN=freeswitch.signalwire.com
|
||||||
ARG REPO_USERNAME=user
|
ARG REPO_USERNAME=user
|
||||||
ARG REPO_PASSWORD=password
|
|
||||||
|
|
||||||
ARG BUILD_NUMBER=42
|
ARG BUILD_NUMBER=42
|
||||||
ARG GIT_SHA=0000000000
|
ARG GIT_SHA=0000000000
|
||||||
|
@ -51,19 +50,10 @@ deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev ${CODE
|
||||||
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev ${CODENAME} main
|
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev ${CODENAME} main
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
RUN --mount=type=secret,id=REPO_PASSWORD \
|
|
||||||
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \
|
|
||||||
printf "login ${REPO_USERNAME} " >> ~/.netrc && \
|
|
||||||
printf "password " >> ~/.netrc && \
|
|
||||||
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \
|
|
||||||
cp -f ~/.netrc /etc/apt/auth.conf
|
|
||||||
|
|
||||||
RUN git config --global --add safe.directory '*' \
|
RUN git config --global --add safe.directory '*' \
|
||||||
&& git config --global user.name "${MAINTAINER_NAME}" \
|
&& git config --global user.name "${MAINTAINER_NAME}" \
|
||||||
&& git config --global user.email "${MAINTAINER_EMAIL}"
|
&& git config --global user.email "${MAINTAINER_EMAIL}"
|
||||||
|
|
||||||
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev/signalwire-freeswitch-repo.gpg
|
|
||||||
|
|
||||||
# Bootstrap and Build
|
# Bootstrap and Build
|
||||||
COPY . ${DATA_DIR}
|
COPY . ${DATA_DIR}
|
||||||
WORKDIR ${DATA_DIR}
|
WORKDIR ${DATA_DIR}
|
||||||
|
@ -72,9 +62,25 @@ RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
|
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
|
||||||
|
|
||||||
RUN apt-get -q update && \
|
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
|
||||||
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
|
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
||||||
apt-get -y -f install
|
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
||||||
|
printf "password " >> /etc/apt/auth.conf && \
|
||||||
|
cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \
|
||||||
|
sha512sum /run/secrets/REPO_PASSWORD && \
|
||||||
|
curl \
|
||||||
|
--fail \
|
||||||
|
--netrc-file /etc/apt/auth.conf \
|
||||||
|
--output ${GPG_KEY} \
|
||||||
|
https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev/signalwire-freeswitch-repo.gpg && \
|
||||||
|
file ${GPG_KEY} && \
|
||||||
|
apt-get --quiet update && \
|
||||||
|
mk-build-deps \
|
||||||
|
--install \
|
||||||
|
--remove debian/control \
|
||||||
|
--tool "apt-get --yes --no-install-recommends" && \
|
||||||
|
apt-get --yes --fix-broken install && \
|
||||||
|
rm -f /etc/apt/auth.conf
|
||||||
|
|
||||||
ENV DEB_BUILD_OPTIONS="parallel=1"
|
ENV DEB_BUILD_OPTIONS="parallel=1"
|
||||||
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
|
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
|
||||||
|
|
|
@ -8,7 +8,6 @@ ARG MAINTAINER_EMAIL="andrey@signalwire.com"
|
||||||
# Credentials
|
# Credentials
|
||||||
ARG REPO_DOMAIN=freeswitch.signalwire.com
|
ARG REPO_DOMAIN=freeswitch.signalwire.com
|
||||||
ARG REPO_USERNAME=user
|
ARG REPO_USERNAME=user
|
||||||
ARG REPO_PASSWORD=password
|
|
||||||
|
|
||||||
ARG BUILD_NUMBER=42
|
ARG BUILD_NUMBER=42
|
||||||
ARG GIT_SHA=0000000000
|
ARG GIT_SHA=0000000000
|
||||||
|
@ -51,19 +50,10 @@ deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${COD
|
||||||
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
|
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
RUN --mount=type=secret,id=REPO_PASSWORD \
|
|
||||||
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \
|
|
||||||
printf "login ${REPO_USERNAME} " >> ~/.netrc && \
|
|
||||||
printf "password " >> ~/.netrc && \
|
|
||||||
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \
|
|
||||||
cp -f ~/.netrc /etc/apt/auth.conf
|
|
||||||
|
|
||||||
RUN git config --global --add safe.directory '*' \
|
RUN git config --global --add safe.directory '*' \
|
||||||
&& git config --global user.name "${MAINTAINER_NAME}" \
|
&& git config --global user.name "${MAINTAINER_NAME}" \
|
||||||
&& git config --global user.email "${MAINTAINER_EMAIL}"
|
&& git config --global user.email "${MAINTAINER_EMAIL}"
|
||||||
|
|
||||||
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg
|
|
||||||
|
|
||||||
# Bootstrap and Build
|
# Bootstrap and Build
|
||||||
COPY . ${DATA_DIR}
|
COPY . ${DATA_DIR}
|
||||||
WORKDIR ${DATA_DIR}
|
WORKDIR ${DATA_DIR}
|
||||||
|
@ -72,9 +62,25 @@ RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a arm64 ${CODENAME}
|
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a arm64 ${CODENAME}
|
||||||
|
|
||||||
RUN apt-get -q update && \
|
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
|
||||||
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
|
printf "machine ${REPO_DOMAIN} " > /etc/apt/auth.conf && \
|
||||||
apt-get -y -f install
|
printf "login ${REPO_USERNAME} " >> /etc/apt/auth.conf && \
|
||||||
|
printf "password " >> /etc/apt/auth.conf && \
|
||||||
|
cat /run/secrets/REPO_PASSWORD >> /etc/apt/auth.conf && \
|
||||||
|
sha512sum /run/secrets/REPO_PASSWORD && \
|
||||||
|
curl \
|
||||||
|
--fail \
|
||||||
|
--netrc-file /etc/apt/auth.conf \
|
||||||
|
--output ${GPG_KEY} \
|
||||||
|
https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg && \
|
||||||
|
file ${GPG_KEY} && \
|
||||||
|
apt-get --quiet update && \
|
||||||
|
mk-build-deps \
|
||||||
|
--install \
|
||||||
|
--remove debian/control \
|
||||||
|
--tool "apt-get --yes --no-install-recommends" && \
|
||||||
|
apt-get --yes --fix-broken install && \
|
||||||
|
rm -f /etc/apt/auth.conf
|
||||||
|
|
||||||
ENV DEB_BUILD_OPTIONS="parallel=1"
|
ENV DEB_BUILD_OPTIONS="parallel=1"
|
||||||
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
|
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
|
||||||
|
|
|
@ -1,97 +0,0 @@
|
||||||
ARG BUILDER_IMAGE=debian:buster-20240513
|
|
||||||
|
|
||||||
FROM ${BUILDER_IMAGE} AS builder
|
|
||||||
|
|
||||||
ARG MAINTAINER_NAME="Andrey Volk"
|
|
||||||
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
|
|
||||||
|
|
||||||
# Credentials
|
|
||||||
ARG REPO_DOMAIN=freeswitch.signalwire.com
|
|
||||||
ARG REPO_USERNAME=user
|
|
||||||
ARG REPO_PASSWORD=password
|
|
||||||
|
|
||||||
ARG BUILD_NUMBER=42
|
|
||||||
ARG GIT_SHA=0000000000
|
|
||||||
|
|
||||||
ARG DATA_DIR=/data
|
|
||||||
ARG CODENAME=buster
|
|
||||||
ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg"
|
|
||||||
|
|
||||||
MAINTAINER "${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-c"]
|
|
||||||
|
|
||||||
RUN apt-get -q update && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
|
|
||||||
apt-transport-https \
|
|
||||||
build-essential \
|
|
||||||
ca-certificates \
|
|
||||||
cmake \
|
|
||||||
curl \
|
|
||||||
debhelper \
|
|
||||||
devscripts \
|
|
||||||
dh-autoreconf \
|
|
||||||
dos2unix \
|
|
||||||
doxygen \
|
|
||||||
git \
|
|
||||||
graphviz \
|
|
||||||
libglib2.0-dev \
|
|
||||||
libssl-dev \
|
|
||||||
lsb-release \
|
|
||||||
pkg-config \
|
|
||||||
wget
|
|
||||||
|
|
||||||
RUN update-ca-certificates --fresh
|
|
||||||
|
|
||||||
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env && \
|
|
||||||
chmod +x ~/.env
|
|
||||||
|
|
||||||
RUN . ~/.env && cat <<EOF > /etc/apt/sources.list.d/freeswitch.list
|
|
||||||
deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
|
|
||||||
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
|
|
||||||
EOF
|
|
||||||
|
|
||||||
RUN --mount=type=secret,id=REPO_PASSWORD \
|
|
||||||
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \
|
|
||||||
printf "login ${REPO_USERNAME} " >> ~/.netrc && \
|
|
||||||
printf "password " >> ~/.netrc && \
|
|
||||||
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \
|
|
||||||
cp -f ~/.netrc /etc/apt/auth.conf
|
|
||||||
|
|
||||||
RUN git config --global --add safe.directory '*' \
|
|
||||||
&& git config --global user.name "${MAINTAINER_NAME}" \
|
|
||||||
&& git config --global user.email "${MAINTAINER_EMAIL}"
|
|
||||||
|
|
||||||
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg
|
|
||||||
|
|
||||||
# Bootstrap and Build
|
|
||||||
COPY . ${DATA_DIR}
|
|
||||||
WORKDIR ${DATA_DIR}
|
|
||||||
|
|
||||||
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
|
|
||||||
|
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
|
|
||||||
|
|
||||||
RUN apt-get -q update && \
|
|
||||||
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
|
|
||||||
apt-get -y -f install
|
|
||||||
|
|
||||||
ENV DEB_BUILD_OPTIONS="parallel=1"
|
|
||||||
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
|
|
||||||
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
|
|
||||||
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
|
||||||
|
|
||||||
RUN dpkg-source \
|
|
||||||
--diff-ignore=.* \
|
|
||||||
--compression=xz \
|
|
||||||
--compression-level=9 \
|
|
||||||
--build \
|
|
||||||
. \
|
|
||||||
&& debuild -b -us -uc \
|
|
||||||
&& mkdir OUT \
|
|
||||||
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
|
|
||||||
|
|
||||||
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
|
|
||||||
FROM scratch
|
|
||||||
COPY --from=builder /data/OUT/ /
|
|
|
@ -1,96 +0,0 @@
|
||||||
ARG BUILDER_IMAGE=arm32v7/debian:buster-20240513
|
|
||||||
|
|
||||||
FROM --platform=linux/arm32 ${BUILDER_IMAGE} AS builder
|
|
||||||
|
|
||||||
ARG MAINTAINER_NAME="Andrey Volk"
|
|
||||||
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
|
|
||||||
|
|
||||||
# Credentials
|
|
||||||
ARG REPO_DOMAIN=freeswitch.signalwire.com
|
|
||||||
ARG REPO_USERNAME=user
|
|
||||||
ARG REPO_PASSWORD=password
|
|
||||||
|
|
||||||
ARG BUILD_NUMBER=42
|
|
||||||
ARG GIT_SHA=0000000000
|
|
||||||
|
|
||||||
ARG DATA_DIR=/data
|
|
||||||
ARG CODENAME=buster
|
|
||||||
ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg"
|
|
||||||
|
|
||||||
MAINTAINER "${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-c"]
|
|
||||||
|
|
||||||
RUN apt-get -q update && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
|
|
||||||
apt-transport-https \
|
|
||||||
build-essential \
|
|
||||||
ca-certificates \
|
|
||||||
cmake \
|
|
||||||
curl \
|
|
||||||
debhelper \
|
|
||||||
devscripts \
|
|
||||||
dh-autoreconf \
|
|
||||||
dos2unix \
|
|
||||||
doxygen \
|
|
||||||
git \
|
|
||||||
graphviz \
|
|
||||||
libglib2.0-dev \
|
|
||||||
libssl-dev \
|
|
||||||
lsb-release \
|
|
||||||
pkg-config \
|
|
||||||
wget
|
|
||||||
|
|
||||||
RUN update-ca-certificates --fresh
|
|
||||||
|
|
||||||
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env && \
|
|
||||||
chmod +x ~/.env
|
|
||||||
|
|
||||||
RUN . ~/.env && cat <<EOF > /etc/apt/sources.list.d/freeswitch.list
|
|
||||||
deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev ${CODENAME} main
|
|
||||||
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev ${CODENAME} main
|
|
||||||
EOF
|
|
||||||
|
|
||||||
RUN --mount=type=secret,id=REPO_PASSWORD \
|
|
||||||
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \
|
|
||||||
printf "login ${REPO_USERNAME} " >> ~/.netrc && \
|
|
||||||
printf "password " >> ~/.netrc && \
|
|
||||||
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \
|
|
||||||
cp -f ~/.netrc /etc/apt/auth.conf
|
|
||||||
|
|
||||||
RUN git config --global --add safe.directory '*' \
|
|
||||||
&& git config --global user.name "${MAINTAINER_NAME}" \
|
|
||||||
&& git config --global user.email "${MAINTAINER_EMAIL}"
|
|
||||||
|
|
||||||
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev/signalwire-freeswitch-repo.gpg
|
|
||||||
|
|
||||||
# Bootstrap and Build
|
|
||||||
COPY . ${DATA_DIR}
|
|
||||||
WORKDIR ${DATA_DIR}
|
|
||||||
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
|
|
||||||
|
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
|
|
||||||
|
|
||||||
RUN apt-get -q update && \
|
|
||||||
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
|
|
||||||
apt-get -y -f install
|
|
||||||
|
|
||||||
ENV DEB_BUILD_OPTIONS="parallel=1"
|
|
||||||
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
|
|
||||||
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
|
|
||||||
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
|
||||||
|
|
||||||
RUN dpkg-source \
|
|
||||||
--diff-ignore=.* \
|
|
||||||
--compression=xz \
|
|
||||||
--compression-level=9 \
|
|
||||||
--build \
|
|
||||||
. \
|
|
||||||
&& debuild -b -us -uc \
|
|
||||||
&& mkdir OUT \
|
|
||||||
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
|
|
||||||
|
|
||||||
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
|
|
||||||
FROM scratch
|
|
||||||
COPY --from=builder /data/OUT/ /
|
|
|
@ -1,96 +0,0 @@
|
||||||
ARG BUILDER_IMAGE=arm64v8/debian:buster-20240513
|
|
||||||
|
|
||||||
FROM --platform=linux/arm64 ${BUILDER_IMAGE} AS builder
|
|
||||||
|
|
||||||
ARG MAINTAINER_NAME="Andrey Volk"
|
|
||||||
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
|
|
||||||
|
|
||||||
# Credentials
|
|
||||||
ARG REPO_DOMAIN=freeswitch.signalwire.com
|
|
||||||
ARG REPO_USERNAME=user
|
|
||||||
ARG REPO_PASSWORD=password
|
|
||||||
|
|
||||||
ARG BUILD_NUMBER=42
|
|
||||||
ARG GIT_SHA=0000000000
|
|
||||||
|
|
||||||
ARG DATA_DIR=/data
|
|
||||||
ARG CODENAME=buster
|
|
||||||
ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg"
|
|
||||||
|
|
||||||
MAINTAINER "${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-c"]
|
|
||||||
|
|
||||||
RUN apt-get -q update && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
|
|
||||||
apt-transport-https \
|
|
||||||
build-essential \
|
|
||||||
ca-certificates \
|
|
||||||
cmake \
|
|
||||||
curl \
|
|
||||||
debhelper \
|
|
||||||
devscripts \
|
|
||||||
dh-autoreconf \
|
|
||||||
dos2unix \
|
|
||||||
doxygen \
|
|
||||||
git \
|
|
||||||
graphviz \
|
|
||||||
libglib2.0-dev \
|
|
||||||
libssl-dev \
|
|
||||||
lsb-release \
|
|
||||||
pkg-config \
|
|
||||||
wget
|
|
||||||
|
|
||||||
RUN update-ca-certificates --fresh
|
|
||||||
|
|
||||||
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env && \
|
|
||||||
chmod +x ~/.env
|
|
||||||
|
|
||||||
RUN . ~/.env && cat <<EOF > /etc/apt/sources.list.d/freeswitch.list
|
|
||||||
deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
|
|
||||||
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
|
|
||||||
EOF
|
|
||||||
|
|
||||||
RUN --mount=type=secret,id=REPO_PASSWORD \
|
|
||||||
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \
|
|
||||||
printf "login ${REPO_USERNAME} " >> ~/.netrc && \
|
|
||||||
printf "password " >> ~/.netrc && \
|
|
||||||
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \
|
|
||||||
cp -f ~/.netrc /etc/apt/auth.conf
|
|
||||||
|
|
||||||
RUN git config --global --add safe.directory '*' \
|
|
||||||
&& git config --global user.name "${MAINTAINER_NAME}" \
|
|
||||||
&& git config --global user.email "${MAINTAINER_EMAIL}"
|
|
||||||
|
|
||||||
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg
|
|
||||||
|
|
||||||
# Bootstrap and Build
|
|
||||||
COPY . ${DATA_DIR}
|
|
||||||
WORKDIR ${DATA_DIR}
|
|
||||||
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
|
|
||||||
|
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
|
||||||
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a arm64 ${CODENAME}
|
|
||||||
|
|
||||||
RUN apt-get -q update && \
|
|
||||||
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
|
|
||||||
apt-get -y -f install
|
|
||||||
|
|
||||||
ENV DEB_BUILD_OPTIONS="parallel=1"
|
|
||||||
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
|
|
||||||
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
|
|
||||||
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
|
|
||||||
|
|
||||||
RUN dpkg-source \
|
|
||||||
--diff-ignore=.* \
|
|
||||||
--compression=xz \
|
|
||||||
--compression-level=9 \
|
|
||||||
--build \
|
|
||||||
. \
|
|
||||||
&& debuild -b -us -uc \
|
|
||||||
&& mkdir OUT \
|
|
||||||
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
|
|
||||||
|
|
||||||
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
|
|
||||||
FROM scratch
|
|
||||||
COPY --from=builder /data/OUT/ /
|
|
|
@ -5,6 +5,7 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
- v1.10
|
||||||
paths:
|
paths:
|
||||||
- "**"
|
- "**"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
@ -14,6 +15,8 @@ concurrency:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
excludes:
|
excludes:
|
||||||
|
name: 'Excludes'
|
||||||
|
# if: github.event.pull_request.head.repo.full_name == github.repository
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
deb: ${{ steps.deb.outputs.excludes }}
|
deb: ${{ steps.deb.outputs.excludes }}
|
||||||
|
@ -25,12 +28,6 @@ jobs:
|
||||||
|
|
||||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||||
JSON=$(jq -n '[
|
JSON=$(jq -n '[
|
||||||
{
|
|
||||||
"version": "bookworm",
|
|
||||||
"platform": {
|
|
||||||
"name": "amd64"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"version": "bookworm",
|
"version": "bookworm",
|
||||||
"platform": {
|
"platform": {
|
||||||
|
@ -38,7 +35,16 @@ jobs:
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"version": "bullseye"
|
"version": "bullseye",
|
||||||
|
"platform": {
|
||||||
|
"name": "amd64"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "bullseye",
|
||||||
|
"platform": {
|
||||||
|
"name": "arm32v7"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]')
|
]')
|
||||||
fi
|
fi
|
||||||
|
@ -47,6 +53,7 @@ jobs:
|
||||||
|
|
||||||
deb:
|
deb:
|
||||||
name: 'DEB'
|
name: 'DEB'
|
||||||
|
# if: github.event.pull_request.head.repo.full_name == github.repository
|
||||||
permissions:
|
permissions:
|
||||||
id-token: write
|
id-token: write
|
||||||
contents: read
|
contents: read
|
||||||
|
@ -62,7 +69,6 @@ jobs:
|
||||||
version:
|
version:
|
||||||
- bookworm
|
- bookworm
|
||||||
- bullseye
|
- bullseye
|
||||||
- buster
|
|
||||||
platform:
|
platform:
|
||||||
- name: amd64
|
- name: amd64
|
||||||
runner: ubuntu-latest
|
runner: ubuntu-latest
|
||||||
|
@ -87,7 +93,7 @@ jobs:
|
||||||
PROXY_URL: ${{ secrets.PROXY_URL }}
|
PROXY_URL: ${{ secrets.PROXY_URL }}
|
||||||
USERNAME: ${{ secrets.USERNAME }}
|
USERNAME: ${{ secrets.USERNAME }}
|
||||||
TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }}
|
TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }}
|
||||||
REPO_USERNAME: 'signalwire'
|
REPO_USERNAME: 'SWUSERNAME'
|
||||||
REPO_PASSWORD: ${{ secrets.REPOTOKEN }}
|
REPO_PASSWORD: ${{ secrets.REPOTOKEN }}
|
||||||
|
|
||||||
meta:
|
meta:
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1.10.12-dev
|
1.10.13-dev
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
|
|
||||||
# Must change all of the below together
|
# Must change all of the below together
|
||||||
# For a release, set revision for that tagged release as well and uncomment
|
# For a release, set revision for that tagged release as well and uncomment
|
||||||
AC_INIT([freeswitch], [1.10.12-dev], bugs@freeswitch.org)
|
AC_INIT([freeswitch], [1.10.13-dev], bugs@freeswitch.org)
|
||||||
AC_SUBST(SWITCH_VERSION_MAJOR, [1])
|
AC_SUBST(SWITCH_VERSION_MAJOR, [1])
|
||||||
AC_SUBST(SWITCH_VERSION_MINOR, [10])
|
AC_SUBST(SWITCH_VERSION_MINOR, [10])
|
||||||
AC_SUBST(SWITCH_VERSION_MICRO, [12-dev])
|
AC_SUBST(SWITCH_VERSION_MICRO, [13-dev])
|
||||||
AC_SUBST(SWITCH_VERSION_REVISION, [])
|
AC_SUBST(SWITCH_VERSION_REVISION, [])
|
||||||
AC_SUBST(SWITCH_VERSION_REVISION_HUMAN, [])
|
AC_SUBST(SWITCH_VERSION_REVISION_HUMAN, [])
|
||||||
|
|
||||||
|
|
|
@ -203,11 +203,16 @@ create_orig () {
|
||||||
done
|
done
|
||||||
shift $(($OPTIND-1))
|
shift $(($OPTIND-1))
|
||||||
|
|
||||||
local orig
|
local commit_epoch=$(git log -1 --format=%ct)
|
||||||
|
local source_date=$(date -u -d @$commit_epoch +'%Y-%m-%d %H:%M:%S')
|
||||||
|
|
||||||
|
local orig git_archive_prefix
|
||||||
if $auto_orig; then
|
if $auto_orig; then
|
||||||
orig="../freeswitch_$(debian/version-omit_revision.pl).orig.tar.xz"
|
orig="../freeswitch_$(debian/version-omit_revision.pl).orig.tar.xz"
|
||||||
|
git_archive_prefix="freeswitch/"
|
||||||
else
|
else
|
||||||
orig="../freeswitch_$(mk_dver "$uver")~$(lsb_release -sc).orig.tar.xz"
|
orig="../freeswitch_$(mk_dver "$uver")~$(lsb_release -sc).orig.tar.xz"
|
||||||
|
git_archive_prefix="freeswitch-$uver/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mv .gitattributes .gitattributes.orig
|
mv .gitattributes .gitattributes.orig
|
||||||
|
@ -226,12 +231,32 @@ create_orig () {
|
||||||
git add -f configure.ac .version
|
git add -f configure.ac .version
|
||||||
git commit --allow-empty -m "nightly v$uver"
|
git commit --allow-empty -m "nightly v$uver"
|
||||||
|
|
||||||
|
local tmpsrcdir="$(mktemp -d)"
|
||||||
git archive -v \
|
git archive -v \
|
||||||
--worktree-attributes \
|
--worktree-attributes \
|
||||||
--format=tar \
|
--format=tar \
|
||||||
--prefix=freeswitch-$uver/ \
|
--prefix=$git_archive_prefix \
|
||||||
HEAD \
|
HEAD | tar --extract --directory="$tmpsrcdir"
|
||||||
| xz -c -${zl}v > $orig
|
|
||||||
|
# https://www.gnu.org/software/tar/manual/html_section/Reproducibility.html
|
||||||
|
tar \
|
||||||
|
--sort=name \
|
||||||
|
--format=posix \
|
||||||
|
--pax-option='exthdr.name=%d/PaxHeaders/%f' \
|
||||||
|
--pax-option='delete=atime,delete=ctime' \
|
||||||
|
--clamp-mtime \
|
||||||
|
--mtime="$source_date" \
|
||||||
|
--numeric-owner \
|
||||||
|
--owner=0 \
|
||||||
|
--group=0 \
|
||||||
|
--mode='go+u,go-w' \
|
||||||
|
--create \
|
||||||
|
--directory="$tmpsrcdir" \
|
||||||
|
. | xz -v -c -${zl} > "$orig" && \
|
||||||
|
rm -rf "$tmpsrcdir"
|
||||||
|
|
||||||
|
echo "Source archive checksum:"
|
||||||
|
sha256sum $orig
|
||||||
|
|
||||||
mv .gitattributes.orig .gitattributes
|
mv .gitattributes.orig .gitattributes
|
||||||
|
|
||||||
|
|
|
@ -141,6 +141,13 @@ typedef struct {
|
||||||
uint32_t address;
|
uint32_t address;
|
||||||
} switch_stun_ip_t;
|
} switch_stun_ip_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint8_t wasted;
|
||||||
|
uint8_t family;
|
||||||
|
uint16_t port;
|
||||||
|
uint8_t address[16];
|
||||||
|
} switch_stun_ipv6_t;
|
||||||
|
|
||||||
#if SWITCH_BYTE_ORDER == __BIG_ENDIAN
|
#if SWITCH_BYTE_ORDER == __BIG_ENDIAN
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -599,6 +599,13 @@ SWITCH_DECLARE_DATA extern switch_filenames SWITCH_GLOBAL_filenames;
|
||||||
|
|
||||||
#define SWITCH_ACCEPTABLE_INTERVAL(_i) (_i && _i <= SWITCH_MAX_INTERVAL && (_i % 10) == 0)
|
#define SWITCH_ACCEPTABLE_INTERVAL(_i) (_i && _i <= SWITCH_MAX_INTERVAL && (_i % 10) == 0)
|
||||||
|
|
||||||
|
/* Check if RAND_MAX is a power of 2 minus 1 or in other words all bits set */
|
||||||
|
#if ((RAND_MAX) & ((RAND_MAX) + 1)) == 0 && (RAND_MAX) != 0
|
||||||
|
#define SWITCH_RAND_MAX RAND_MAX
|
||||||
|
#else
|
||||||
|
#define SWITCH_RAND_MAX 0x7fff
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
SWITCH_RW_READ,
|
SWITCH_RW_READ,
|
||||||
SWITCH_RW_WRITE
|
SWITCH_RW_WRITE
|
||||||
|
|
|
@ -81,13 +81,13 @@ public:
|
||||||
std::string value = pair[1];
|
std::string value = pair[1];
|
||||||
|
|
||||||
if ("server" == key || "host" == key) {
|
if ("server" == key || "host" == key) {
|
||||||
_host = value;
|
_host = std::move(value);
|
||||||
} else if ("uid" == key || "user" == key || "username" == key) {
|
} else if ("uid" == key || "user" == key || "username" == key) {
|
||||||
_user = value;
|
_user = std::move(value);
|
||||||
} else if ("pwd" == key || "passwd" == key || "password" == key) {
|
} else if ("pwd" == key || "passwd" == key || "password" == key) {
|
||||||
_passwd = value;
|
_passwd = std::move(value);
|
||||||
} else if ("database" == key || "db" == key) {
|
} else if ("database" == key || "db" == key) {
|
||||||
_db = value;
|
_db = std::move(value);
|
||||||
} else if ("port" == key) {
|
} else if ("port" == key) {
|
||||||
_port = std::stoi(value);
|
_port = std::stoi(value);
|
||||||
} else if ("option" == key || "options" == key) {
|
} else if ("option" == key || "options" == key) {
|
||||||
|
|
|
@ -641,7 +641,7 @@ switch_status_t mariadb_send_query(mariadb_handle_t *handle, const char* sql)
|
||||||
switch_safe_free(err_str);
|
switch_safe_free(err_str);
|
||||||
/* We are waiting for 500 ms and random time is not more than 500 ms.
|
/* We are waiting for 500 ms and random time is not more than 500 ms.
|
||||||
This is necessary so that the delay on the primary and secondary servers does not coincide and deadlock does not occur again. */
|
This is necessary so that the delay on the primary and secondary servers does not coincide and deadlock does not occur again. */
|
||||||
switch_yield(500 + (rand() & 511));
|
switch_yield(500 + (switch_rand() & 511));
|
||||||
goto again;
|
goto again;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3401,6 +3401,16 @@ SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_SWITCH_MAX_MANAGEMENT_BUFFER
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_SWITCH_RAND_MAX_get___() {
|
||||||
|
int jresult ;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
result = (int)(0x7fff);
|
||||||
|
jresult = result;
|
||||||
|
return jresult;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
SWIGEXPORT void SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_error_period_t_start_set___(void * jarg1, long long jarg2) {
|
SWIGEXPORT void SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_error_period_t_start_set___(void * jarg1, long long jarg2) {
|
||||||
error_period *arg1 = (error_period *) 0 ;
|
error_period *arg1 = (error_period *) 0 ;
|
||||||
int64_t arg2 ;
|
int64_t arg2 ;
|
||||||
|
|
|
@ -15184,6 +15184,7 @@ else
|
||||||
public static readonly int SWITCH_MAX_STATE_HANDLERS = freeswitchPINVOKE.SWITCH_MAX_STATE_HANDLERS_get();
|
public static readonly int SWITCH_MAX_STATE_HANDLERS = freeswitchPINVOKE.SWITCH_MAX_STATE_HANDLERS_get();
|
||||||
public static readonly int SWITCH_CORE_QUEUE_LEN = freeswitchPINVOKE.SWITCH_CORE_QUEUE_LEN_get();
|
public static readonly int SWITCH_CORE_QUEUE_LEN = freeswitchPINVOKE.SWITCH_CORE_QUEUE_LEN_get();
|
||||||
public static readonly int SWITCH_MAX_MANAGEMENT_BUFFER_LEN = freeswitchPINVOKE.SWITCH_MAX_MANAGEMENT_BUFFER_LEN_get();
|
public static readonly int SWITCH_MAX_MANAGEMENT_BUFFER_LEN = freeswitchPINVOKE.SWITCH_MAX_MANAGEMENT_BUFFER_LEN_get();
|
||||||
|
public static readonly int SWITCH_RAND_MAX = freeswitchPINVOKE.SWITCH_RAND_MAX_get();
|
||||||
public static readonly int SWITCH_RTP_CNG_PAYLOAD = freeswitchPINVOKE.SWITCH_RTP_CNG_PAYLOAD_get();
|
public static readonly int SWITCH_RTP_CNG_PAYLOAD = freeswitchPINVOKE.SWITCH_RTP_CNG_PAYLOAD_get();
|
||||||
public static readonly int SWITCH_MEDIA_TYPE_TOTAL = freeswitchPINVOKE.SWITCH_MEDIA_TYPE_TOTAL_get();
|
public static readonly int SWITCH_MEDIA_TYPE_TOTAL = freeswitchPINVOKE.SWITCH_MEDIA_TYPE_TOTAL_get();
|
||||||
public static readonly int SWITCH_SOCK_INVALID = freeswitchPINVOKE.SWITCH_SOCK_INVALID_get();
|
public static readonly int SWITCH_SOCK_INVALID = freeswitchPINVOKE.SWITCH_SOCK_INVALID_get();
|
||||||
|
@ -16292,6 +16293,9 @@ class freeswitchPINVOKE {
|
||||||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_SWITCH_MAX_MANAGEMENT_BUFFER_LEN_get___")]
|
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_SWITCH_MAX_MANAGEMENT_BUFFER_LEN_get___")]
|
||||||
public static extern int SWITCH_MAX_MANAGEMENT_BUFFER_LEN_get();
|
public static extern int SWITCH_MAX_MANAGEMENT_BUFFER_LEN_get();
|
||||||
|
|
||||||
|
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_SWITCH_RAND_MAX_get___")]
|
||||||
|
public static extern int SWITCH_RAND_MAX_get();
|
||||||
|
|
||||||
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_error_period_t_start_set___")]
|
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_error_period_t_start_set___")]
|
||||||
public static extern void switch_error_period_t_start_set(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2);
|
public static extern void switch_error_period_t_start_set(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2);
|
||||||
|
|
||||||
|
|
|
@ -671,7 +671,7 @@ JS_SESSION_FUNCTION_IMPL(SayPhrase)
|
||||||
String::Utf8Value str(info[2]);
|
String::Utf8Value str(info[2]);
|
||||||
tmp = js_safe_str(*str);
|
tmp = js_safe_str(*str);
|
||||||
if (!zstr(tmp.c_str())) {
|
if (!zstr(tmp.c_str())) {
|
||||||
phrase_lang = tmp;
|
phrase_lang = std::move(tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -155,7 +155,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_request_port(switch_c
|
||||||
uint32_t tries = 0;
|
uint32_t tries = 0;
|
||||||
|
|
||||||
/* randomly pick a port */
|
/* randomly pick a port */
|
||||||
index = rand() % alloc->track_len;
|
index = switch_rand() % alloc->track_len;
|
||||||
|
|
||||||
/* if it is used walk up the list to find a free one */
|
/* if it is used walk up the list to find a free one */
|
||||||
while (alloc->track[index] && tries < alloc->track_len) {
|
while (alloc->track[index] && tries < alloc->track_len) {
|
||||||
|
|
|
@ -185,6 +185,10 @@ typedef struct {
|
||||||
char body[SWITCH_RTCP_MAX_BUF_LEN];
|
char body[SWITCH_RTCP_MAX_BUF_LEN];
|
||||||
} rtcp_msg_t;
|
} rtcp_msg_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
switch_rtcp_hdr_t header;
|
||||||
|
uint32_t ssrc;
|
||||||
|
} sdes_ssrc_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
VAD_FIRE_TALK = (1 << 0),
|
VAD_FIRE_TALK = (1 << 0),
|
||||||
|
@ -2228,9 +2232,9 @@ static int check_rtcp_and_ice(switch_rtp_t *rtp_session)
|
||||||
struct switch_rtcp_report_block *rtcp_report_block = NULL;
|
struct switch_rtcp_report_block *rtcp_report_block = NULL;
|
||||||
switch_size_t rtcp_bytes = sizeof(struct switch_rtcp_hdr_s)+sizeof(uint32_t); /* add size of the packet header and the ssrc */
|
switch_size_t rtcp_bytes = sizeof(struct switch_rtcp_hdr_s)+sizeof(uint32_t); /* add size of the packet header and the ssrc */
|
||||||
switch_rtcp_hdr_t *sdes;
|
switch_rtcp_hdr_t *sdes;
|
||||||
|
sdes_ssrc_t *sdes_ssrc;
|
||||||
uint8_t *p;
|
uint8_t *p;
|
||||||
switch_size_t sdes_bytes = sizeof(struct switch_rtcp_hdr_s);
|
switch_size_t sdes_bytes = sizeof(struct switch_rtcp_hdr_s);
|
||||||
uint32_t *ssrc;
|
|
||||||
switch_rtcp_sdes_unit_t *unit;
|
switch_rtcp_sdes_unit_t *unit;
|
||||||
switch_bool_t is_only_receiver = FALSE;
|
switch_bool_t is_only_receiver = FALSE;
|
||||||
|
|
||||||
|
@ -2426,14 +2430,13 @@ static int check_rtcp_and_ice(switch_rtp_t *rtp_session)
|
||||||
|
|
||||||
//SDES + CNAME
|
//SDES + CNAME
|
||||||
p = (uint8_t *) (&rtp_session->rtcp_send_msg) + rtcp_bytes;
|
p = (uint8_t *) (&rtp_session->rtcp_send_msg) + rtcp_bytes;
|
||||||
sdes = (switch_rtcp_hdr_t *) p;
|
sdes_ssrc = (sdes_ssrc_t *) p;
|
||||||
|
sdes = &sdes_ssrc->header;
|
||||||
sdes->version = 2;
|
sdes->version = 2;
|
||||||
sdes->type = _RTCP_PT_SDES;
|
sdes->type = _RTCP_PT_SDES;
|
||||||
sdes->count = 1;
|
sdes->count = 1;
|
||||||
sdes->p = 0;
|
sdes->p = 0;
|
||||||
p = (uint8_t *) (sdes) + sdes_bytes;
|
sdes_ssrc->ssrc = htonl(rtp_session->ssrc);
|
||||||
ssrc = (uint32_t *) p;
|
|
||||||
*ssrc = htonl(rtp_session->ssrc);
|
|
||||||
sdes_bytes += sizeof(uint32_t);
|
sdes_bytes += sizeof(uint32_t);
|
||||||
|
|
||||||
|
|
||||||
|
@ -4514,7 +4517,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session
|
||||||
switch_sockaddr_create(&rtp_session->rtcp_from_addr, pool);
|
switch_sockaddr_create(&rtp_session->rtcp_from_addr, pool);
|
||||||
}
|
}
|
||||||
|
|
||||||
rtp_session->seq = (uint16_t) rand();
|
rtp_session->seq = (uint16_t) switch_rand();
|
||||||
rtp_session->ssrc = (uint32_t) ((intptr_t) rtp_session + (switch_time_t) switch_epoch_time_now(NULL));
|
rtp_session->ssrc = (uint32_t) ((intptr_t) rtp_session + (switch_time_t) switch_epoch_time_now(NULL));
|
||||||
#ifdef DEBUG_TS_ROLLOVER
|
#ifdef DEBUG_TS_ROLLOVER
|
||||||
rtp_session->last_write_ts = TS_ROLLOVER_START;
|
rtp_session->last_write_ts = TS_ROLLOVER_START;
|
||||||
|
@ -8264,11 +8267,11 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
|
||||||
if (switch_rtp_test_flag(rtp_session, SWITCH_RTP_FLAG_VIDEO)) {
|
if (switch_rtp_test_flag(rtp_session, SWITCH_RTP_FLAG_VIDEO)) {
|
||||||
int external = (flags && *flags & SFF_EXTERNAL);
|
int external = (flags && *flags & SFF_EXTERNAL);
|
||||||
/* Normalize the timestamps to our own base by generating a made up starting point then adding the measured deltas to that base
|
/* Normalize the timestamps to our own base by generating a made up starting point then adding the measured deltas to that base
|
||||||
so if the timestamps and ssrc of the source change, it will not break the other end's jitter bufffer / decoder etc *cough* CHROME *cough*
|
so if the timestamps and ssrc of the source change, it will not break the other end's jitter buffer / decoder etc *cough* CHROME *cough*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!rtp_session->ts_norm.ts) {
|
if (!rtp_session->ts_norm.ts) {
|
||||||
rtp_session->ts_norm.ts = (uint32_t) rand() % 1000000 + 1;
|
rtp_session->ts_norm.ts = (uint32_t) switch_rand() % 1000000 + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!rtp_session->ts_norm.last_ssrc || send_msg->header.ssrc != rtp_session->ts_norm.last_ssrc || rtp_session->ts_norm.last_external != external) {
|
if (!rtp_session->ts_norm.last_ssrc || send_msg->header.ssrc != rtp_session->ts_norm.last_ssrc || rtp_session->ts_norm.last_external != external) {
|
||||||
|
@ -8517,9 +8520,9 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!rtp_session->flags[SWITCH_RTP_FLAG_SECURE_SEND_MKI]) {
|
if (!rtp_session->flags[SWITCH_RTP_FLAG_SECURE_SEND_MKI]) {
|
||||||
stat = srtp_protect(rtp_session->send_ctx[rtp_session->srtp_idx_rtp], &send_msg->header, &sbytes);
|
stat = srtp_protect(rtp_session->send_ctx[rtp_session->srtp_idx_rtp], send_msg, &sbytes);
|
||||||
} else {
|
} else {
|
||||||
stat = srtp_protect_mki(rtp_session->send_ctx[rtp_session->srtp_idx_rtp], &send_msg->header, &sbytes, 1, SWITCH_CRYPTO_MKI_INDEX);
|
stat = srtp_protect_mki(rtp_session->send_ctx[rtp_session->srtp_idx_rtp], send_msg, &sbytes, 1, SWITCH_CRYPTO_MKI_INDEX);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stat) {
|
if (stat) {
|
||||||
|
@ -9041,9 +9044,9 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_write_raw(switch_rtp_t *rtp_session,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!rtp_session->flags[SWITCH_RTP_FLAG_SECURE_SEND_MKI]) {
|
if (!rtp_session->flags[SWITCH_RTP_FLAG_SECURE_SEND_MKI]) {
|
||||||
stat = srtp_protect(rtp_session->send_ctx[rtp_session->srtp_idx_rtp], &rtp_session->write_msg.header, &sbytes);
|
stat = srtp_protect(rtp_session->send_ctx[rtp_session->srtp_idx_rtp], &rtp_session->write_msg, &sbytes);
|
||||||
} else {
|
} else {
|
||||||
stat = srtp_protect_mki(rtp_session->send_ctx[rtp_session->srtp_idx_rtp], &rtp_session->write_msg.header, &sbytes, 1, SWITCH_CRYPTO_MKI_INDEX);
|
stat = srtp_protect_mki(rtp_session->send_ctx[rtp_session->srtp_idx_rtp], &rtp_session->write_msg, &sbytes, 1, SWITCH_CRYPTO_MKI_INDEX);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stat) {
|
if (stat) {
|
||||||
|
|
|
@ -135,7 +135,7 @@ SWITCH_DECLARE(void) switch_stun_random_string(char *buf, uint16_t len, char *se
|
||||||
max = (int) strlen(set);
|
max = (int) strlen(set);
|
||||||
|
|
||||||
for (x = 0; x < len; x++) {
|
for (x = 0; x < len; x++) {
|
||||||
int j = (int) (max * 1.0 * rand() / (RAND_MAX + 1.0));
|
int j = (int) (max * 1.0 * switch_rand() / (SWITCH_RAND_MAX + 1.0));
|
||||||
buf[x] = set[j];
|
buf[x] = set[j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -401,13 +401,17 @@ SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_get_mapped_address(switch_s
|
||||||
SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_get_xor_mapped_address(switch_stun_packet_attribute_t *attribute, switch_stun_packet_header_t *header, char *ipstr, switch_size_t iplen, uint16_t *port)
|
SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_get_xor_mapped_address(switch_stun_packet_attribute_t *attribute, switch_stun_packet_header_t *header, char *ipstr, switch_size_t iplen, uint16_t *port)
|
||||||
{
|
{
|
||||||
switch_stun_ip_t *ip;
|
switch_stun_ip_t *ip;
|
||||||
|
switch_stun_ipv6_t *ipv6;
|
||||||
uint8_t x, *i;
|
uint8_t x, *i;
|
||||||
char *p = ipstr;
|
char *p = ipstr;
|
||||||
|
|
||||||
ip = (switch_stun_ip_t *) attribute->value;
|
ip = (switch_stun_ip_t *) attribute->value;
|
||||||
|
|
||||||
if (ip->family == 2) {
|
if (ip->family == 2) {
|
||||||
uint8_t *v6addr = (uint8_t *) &ip->address;
|
uint8_t *v6addr;
|
||||||
|
|
||||||
|
ipv6 = (switch_stun_ipv6_t *)attribute->value;
|
||||||
|
v6addr = (uint8_t *) &ipv6->address;
|
||||||
v6_xor(v6addr, (uint8_t *)header->id);
|
v6_xor(v6addr, (uint8_t *)header->id);
|
||||||
inet_ntop(AF_INET6, v6addr, ipstr, iplen);
|
inet_ntop(AF_INET6, v6addr, ipstr, iplen);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1160,7 +1160,7 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to,
|
||||||
switch_safe_free(dupfile);
|
switch_safe_free(dupfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_snprintf(filename, 80, "%s%smail.%d%04x", SWITCH_GLOBAL_dirs.temp_dir, SWITCH_PATH_SEPARATOR, (int)(switch_time_t) switch_epoch_time_now(NULL), rand() & 0xffff);
|
switch_snprintf(filename, 80, "%s%smail.%d%04x", SWITCH_GLOBAL_dirs.temp_dir, SWITCH_PATH_SEPARATOR, (int)(switch_time_t) switch_epoch_time_now(NULL), switch_rand() & 0xffff);
|
||||||
|
|
||||||
if ((fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644)) > -1) {
|
if ((fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644)) > -1) {
|
||||||
if (file) {
|
if (file) {
|
||||||
|
@ -2015,7 +2015,7 @@ SWITCH_DECLARE(switch_status_t) switch_find_local_ip(char *buf, int len, int *ma
|
||||||
}
|
}
|
||||||
|
|
||||||
doh:
|
doh:
|
||||||
if (tmp_socket > 0) {
|
if (tmp_socket >= 0) {
|
||||||
close(tmp_socket);
|
close(tmp_socket);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -4835,8 +4835,8 @@ SWITCH_DECLARE(int) switch_rand(void)
|
||||||
|
|
||||||
BCryptCloseAlgorithmProvider(hAlgorithm, 0);
|
BCryptCloseAlgorithmProvider(hAlgorithm, 0);
|
||||||
|
|
||||||
/* Make sure we return from 0 to RAND_MAX */
|
/* Make sure we return from 0 to SWITCH_RAND_MAX */
|
||||||
return (random_number & 0x7FFF);
|
return (random_number & (SWITCH_RAND_MAX));
|
||||||
#elif defined(__unix__) || defined(__APPLE__)
|
#elif defined(__unix__) || defined(__APPLE__)
|
||||||
int random_fd = open("/dev/urandom", O_RDONLY);
|
int random_fd = open("/dev/urandom", O_RDONLY);
|
||||||
ssize_t result;
|
ssize_t result;
|
||||||
|
@ -4865,8 +4865,8 @@ SWITCH_DECLARE(int) switch_rand(void)
|
||||||
|
|
||||||
close(random_fd);
|
close(random_fd);
|
||||||
|
|
||||||
/* Make sure we return from 0 to RAND_MAX */
|
/* Make sure we return from 0 to SWITCH_RAND_MAX */
|
||||||
return (random_number & 0x7FFF);
|
return (random_number & (SWITCH_RAND_MAX));
|
||||||
#else
|
#else
|
||||||
return rand();
|
return rand();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue