Compare commits
56 commits
master
...
openwrt-18
Author | SHA1 | Date | |
---|---|---|---|
|
e6a20f46da | ||
|
29c7836bf2 | ||
|
8ecbdabc7c | ||
|
7d8fc4b6e6 | ||
|
c524d5a712 | ||
|
27b589f0b2 | ||
|
a2aef3164c | ||
|
8d24147c8c | ||
|
ed56514f75 | ||
|
7b2b386421 | ||
|
74e09c7c83 | ||
|
06a5323734 | ||
|
83c48bd192 | ||
|
67181ed5da | ||
|
1fd2890531 | ||
|
cc0658c853 | ||
|
507eabe1b6 | ||
|
13699a5010 | ||
|
16bad9e04d | ||
|
e88f00f4ad | ||
|
cb939d9677 | ||
|
1d11664d11 | ||
|
958eb54353 | ||
|
457bfbfd28 | ||
|
3a562e2903 | ||
|
a9c3b92d06 | ||
|
bdda0755a5 | ||
|
3659cae1df | ||
|
4b15502e16 | ||
|
5624908abe | ||
|
b1981cc547 | ||
|
9382478803 | ||
|
db9be09007 | ||
|
77fc63da79 | ||
|
83e60db057 | ||
|
c017ebc780 | ||
|
eb990a8775 | ||
|
f034df2dd8 | ||
|
3dd44baa41 | ||
|
b9d7b321d1 | ||
|
4a0a578f43 | ||
|
7fbb94503f | ||
|
53b5b75af1 | ||
|
88b12368f1 | ||
|
add8ec104f | ||
|
f6f229b1f2 | ||
|
367854557b | ||
|
278ca69386 | ||
|
4cae5e6c75 | ||
|
e4645ea637 | ||
|
1195dafe98 | ||
|
6098d247ec | ||
|
e2fee9b6f2 | ||
|
22144d44d5 | ||
|
90620412d5 | ||
|
3326aec44d |
315 changed files with 11774 additions and 13907 deletions
18
.github/issue_template
vendored
18
.github/issue_template
vendored
|
@ -1,16 +1,20 @@
|
|||
Please make sure that the issue subject starts with `<package-name>: `
|
||||
Please make sure that the issue subject starts with `<package-name>: ` so that it's easily identifiable.
|
||||
|
||||
Also make sure that the package is maintained in this repository and not in base which should be submitted at https://bugs.openwrt.org or in the LuCI repository which should be submitted at https://github.com/openwrt/luci/issues.
|
||||
This repo here is ONLY for packages maintained in this repo. For base packages residing in the same repo as the build system and maintained by core devs, please consider opening tickets there for more timely responses
|
||||
|
||||
Issues related to releases below 18.06 and forks are not supported or maintained and will be closed.
|
||||
- OpenWrt: https://dev.openwrt.org/newticket
|
||||
- LEDE: https://bugs.lede-project.org/
|
||||
- Most LuCI packages: https://github.com/openwrt/luci/issues
|
||||
|
||||
# Issue template (remove lines from top till here)
|
||||
Thanks for your contribution
|
||||
Please remove this text (before ---) and fill the following template
|
||||
-------------------------------
|
||||
|
||||
Maintainer: @\<github-user> (find it by checking history of the package Makefile)
|
||||
Environment: (put here arch, model, OpenWrt version)
|
||||
Maintainer: @<github-user> (find it by checking history of the package Makefile)
|
||||
Environment: (put here arch, model, OpenWRT/LEDE version)
|
||||
|
||||
Description:
|
||||
|
||||
```
|
||||
Format code blocks by wrapping them with pairs of ```
|
||||
Formating code blocks by wrapping them with pairs of ```
|
||||
```
|
||||
|
|
17
.github/pull_request_template
vendored
17
.github/pull_request_template
vendored
|
@ -1,5 +1,16 @@
|
|||
Maintainer: me / @\<github-user> (find it by checking history of the package Makefile)
|
||||
Compile tested: (put here arch, model, OpenWrt version)
|
||||
Run tested: (put here arch, model, OpenWrt version, tests done)
|
||||
Please double check that your commits:
|
||||
- all start with "<package name>: "
|
||||
- all contain signed-off-by
|
||||
- are linked to your github account (you see your logo in front of them)
|
||||
|
||||
Please also read https://github.com/openwrt/packages/blob/master/CONTRIBUTING.md
|
||||
|
||||
Thanks for your contribution
|
||||
Please remove this text (before ---) and fill the following template
|
||||
-------------------------------
|
||||
|
||||
Maintainer: me / @<github-user>
|
||||
Compile tested: (put here arch, model, OpenWRT/LEDE version)
|
||||
Run tested: (put here arch, model, OpenWRT/LEDE version, tests done)
|
||||
|
||||
Description:
|
||||
|
|
6
.github/workflows/Dockerfile
vendored
6
.github/workflows/Dockerfile
vendored
|
@ -1,6 +0,0 @@
|
|||
ARG ARCH=x86-64
|
||||
FROM openwrt/rootfs:$ARCH
|
||||
|
||||
ADD entrypoint.sh /entrypoint.sh
|
||||
|
||||
CMD ["/entrypoint.sh"]
|
|
@ -1,91 +0,0 @@
|
|||
name: Check autorelease deprecation
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, converted_to_draft, ready_for_review, edited]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Check autorelease deprecation
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Determine branch name
|
||||
run: |
|
||||
BRANCH="${GITHUB_BASE_REF#refs/heads/}"
|
||||
echo "Building for $BRANCH"
|
||||
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
|
||||
|
||||
- name: Determine changed packages
|
||||
run: |
|
||||
RET=0
|
||||
|
||||
# only detect packages with changes
|
||||
PKG_ROOTS=$(find . -name Makefile | \
|
||||
grep -v ".*/src/Makefile" | \
|
||||
sed -e 's@./\(.*\)/Makefile@\1/@')
|
||||
CHANGES=$(git diff --diff-filter=d --name-only origin/$BRANCH...)
|
||||
|
||||
for ROOT in $PKG_ROOTS; do
|
||||
for CHANGE in $CHANGES; do
|
||||
if [[ "$CHANGE" == "$ROOT"* ]]; then
|
||||
if grep -q '$(AUTORELEASE)' "$ROOT/Makefile"; then
|
||||
CONTAINS_AUTORELEASE+="$ROOT"
|
||||
fi
|
||||
break
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
if [ -n "$CONTAINS_AUTORELEASE" ]; then
|
||||
RET=1
|
||||
cat > "$GITHUB_WORKSPACE/pr_comment.md" << EOF
|
||||
Please do no longer set *PKG_RELEASE* to *AUTORELEASE* as the
|
||||
feature is deprecated. Please use an integer instead. Below is a
|
||||
list of affected packages including correct *PKG_RELEASE*:
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
for ROOT in $CONTAINS_AUTORELEASE; do
|
||||
echo -n " - ${ROOT}Makefile: PKG_RELEASE:=" >> "$GITHUB_WORKSPACE/pr_comment.md"
|
||||
last_bump="$(git log --pretty=format:'%h %s' "$ROOT" |
|
||||
grep --max-count=1 -e ': [uU]pdate to ' -e ': [bB]ump to ' |
|
||||
cut -f 1 -d ' ')"
|
||||
|
||||
if [ -n "$last_bump" ]; then
|
||||
echo -n $(($(git rev-list --count "$last_bump..HEAD" "$ROOT") + 2)) >> "$GITHUB_WORKSPACE/pr_comment.md"
|
||||
else
|
||||
echo -n $(($(git rev-list --count HEAD "$ROOT") + 2)) >> "$GITHUB_WORKSPACE/pr_comment.md"
|
||||
fi
|
||||
echo >> "$GITHUB_WORKSPACE/pr_comment.md"
|
||||
done
|
||||
|
||||
exit $RET
|
||||
|
||||
- name: Find Comment
|
||||
uses: peter-evans/find-comment@v2
|
||||
if: ${{ failure() }}
|
||||
id: fc
|
||||
with:
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
comment-author: 'github-actions[bot]'
|
||||
|
||||
- name: Create or update comment
|
||||
uses: peter-evans/create-or-update-comment@v2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
body-file: 'pr_comment.md'
|
||||
edit-mode: replace
|
26
.github/workflows/ci_helpers.sh
vendored
26
.github/workflows/ci_helpers.sh
vendored
|
@ -1,26 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
color_out() {
|
||||
printf "\e[0;$1m$PKG_NAME: %s\e[0;0m\n" "$2"
|
||||
}
|
||||
|
||||
success() {
|
||||
color_out 32 "$1"
|
||||
}
|
||||
|
||||
info() {
|
||||
color_out 36 "$1"
|
||||
}
|
||||
|
||||
err() {
|
||||
color_out 31 "$1"
|
||||
}
|
||||
|
||||
warn() {
|
||||
color_out 33 "$1"
|
||||
}
|
||||
|
||||
err_die() {
|
||||
err "$1"
|
||||
exit 1
|
||||
}
|
43
.github/workflows/entrypoint.sh
vendored
43
.github/workflows/entrypoint.sh
vendored
|
@ -1,43 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# not enabling `errtrace` and `pipefail` since those are bash specific
|
||||
set -o errexit # failing commands causes script to fail
|
||||
set -o nounset # undefined variables causes script to fail
|
||||
|
||||
mkdir -p /var/lock/
|
||||
|
||||
opkg update
|
||||
|
||||
[ -n "${CI_HELPER:=''}" ] || CI_HELPER="/ci/.github/workflows/ci_helpers.sh"
|
||||
|
||||
for PKG in /ci/*.ipk; do
|
||||
tar -xzOf "$PKG" ./control.tar.gz | tar xzf - ./control
|
||||
# package name including variant
|
||||
PKG_NAME=$(sed -ne 's#^Package: \(.*\)$#\1#p' ./control)
|
||||
# package version without release
|
||||
PKG_VERSION=$(sed -ne 's#^Version: \(.*\)-[0-9]*$#\1#p' ./control)
|
||||
# package source contianing test.sh script
|
||||
PKG_SOURCE=$(sed -ne 's#^Source: .*/\(.*\)$#\1#p' ./control)
|
||||
|
||||
echo "Testing package $PKG_NAME in version $PKG_VERSION from $PKG_SOURCE"
|
||||
|
||||
opkg install "$PKG"
|
||||
|
||||
export PKG_NAME PKG_VERSION CI_HELPER
|
||||
|
||||
TEST_SCRIPT=$(find /ci/ -name "$PKG_SOURCE" -type d)/test.sh
|
||||
|
||||
if [ -f "$TEST_SCRIPT" ]; then
|
||||
echo "Use package specific test.sh"
|
||||
if sh "$TEST_SCRIPT" "$PKG_NAME" "$PKG_VERSION"; then
|
||||
echo "Test successful"
|
||||
else
|
||||
echo "Test failed"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "No test.sh script available"
|
||||
fi
|
||||
|
||||
opkg remove "$PKG_NAME" --force-removal-of-dependent-packages --force-remove
|
||||
done
|
63
.github/workflows/formal.yml
vendored
63
.github/workflows/formal.yml
vendored
|
@ -1,63 +0,0 @@
|
|||
name: Test Formalities
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Test Formalities
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Determine branch name
|
||||
run: |
|
||||
BRANCH="${GITHUB_BASE_REF#refs/heads/}"
|
||||
echo "Building for $BRANCH"
|
||||
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
|
||||
|
||||
- name: Test formalities
|
||||
run: |
|
||||
source .github/workflows/ci_helpers.sh
|
||||
|
||||
RET=0
|
||||
for commit in $(git rev-list HEAD ^origin/$BRANCH); do
|
||||
info "=== Checking commit '$commit'"
|
||||
if git show --format='%P' -s $commit | grep -qF ' '; then
|
||||
err "Pull request should not include merge commits"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
author="$(git show -s --format=%aN $commit)"
|
||||
if echo $author | grep -q '\S\+\s\+\S\+'; then
|
||||
success "Author name ($author) seems ok"
|
||||
else
|
||||
err "Author name ($author) need to be your real name 'firstname lastname'"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
subject="$(git show -s --format=%s $commit)"
|
||||
if echo "$subject" | grep -q -e '^[0-9A-Za-z,+/_-]\+: ' -e '^Revert '; then
|
||||
success "Commit subject line seems ok ($subject)"
|
||||
else
|
||||
err "Commit subject line MUST start with '<package name>: ' ($subject)"
|
||||
RET=1
|
||||
fi
|
||||
|
||||
body="$(git show -s --format=%b $commit)"
|
||||
sob="$(git show -s --format='Signed-off-by: %aN <%aE>' $commit)"
|
||||
if echo "$body" | grep -qF "$sob"; then
|
||||
success "Signed-off-by match author"
|
||||
else
|
||||
err "Signed-off-by is missing or doesn't match author (should be '$sob')"
|
||||
RET=1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $RET
|
164
.github/workflows/multi-arch-test-build.yml
vendored
164
.github/workflows/multi-arch-test-build.yml
vendored
|
@ -1,164 +0,0 @@
|
|||
name: Test Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Test ${{ matrix.arch }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- arch: arm_cortex-a9_vfpv3-d16
|
||||
target: mvebu-cortexa9
|
||||
runtime_test: false
|
||||
|
||||
- arch: mips_24kc
|
||||
target: ath79-generic
|
||||
runtime_test: false
|
||||
|
||||
- arch: mipsel_24kc
|
||||
target: mt7621
|
||||
runtime_test: false
|
||||
|
||||
- arch: powerpc_464fp
|
||||
target: apm821xx-nand
|
||||
runtime_test: false
|
||||
|
||||
- arch: powerpc_8548
|
||||
target: mpc85xx-p1010
|
||||
runtime_test: false
|
||||
|
||||
- arch: aarch64_cortex-a53
|
||||
target: mvebu-cortexa53
|
||||
runtime_test: true
|
||||
|
||||
- arch: arm_cortex-a15_neon-vfpv4
|
||||
target: armvirt-32
|
||||
runtime_test: true
|
||||
|
||||
- arch: i386_pentium-mmx
|
||||
target: x86-geode
|
||||
runtime_test: true
|
||||
|
||||
- arch: x86_64
|
||||
target: x86-64
|
||||
runtime_test: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Determine branch name
|
||||
run: |
|
||||
BRANCH="${GITHUB_BASE_REF#refs/heads/}"
|
||||
echo "Building for $BRANCH"
|
||||
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
|
||||
|
||||
- name: Determine changed packages
|
||||
run: |
|
||||
# only detect packages with changes
|
||||
PKG_ROOTS=$(find . -name Makefile | \
|
||||
grep -v ".*/src/Makefile" | \
|
||||
sed -e 's@./\(.*\)/Makefile@\1/@')
|
||||
CHANGES=$(git diff --diff-filter=d --name-only origin/$BRANCH...)
|
||||
|
||||
for ROOT in $PKG_ROOTS; do
|
||||
for CHANGE in $CHANGES; do
|
||||
if [[ "$CHANGE" == "$ROOT"* ]]; then
|
||||
PACKAGES+=$(echo "$ROOT" | sed -e 's@.*/\(.*\)/@\1 @')
|
||||
break
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# fallback to test packages if nothing explicitly changes this is
|
||||
# should run if other mechanics in packages.git changed
|
||||
PACKAGES="${PACKAGES:-vim attendedsysupgrade-common bmon}"
|
||||
|
||||
echo "Building $PACKAGES"
|
||||
echo "PACKAGES=$PACKAGES" >> $GITHUB_ENV
|
||||
|
||||
- name: Build
|
||||
uses: openwrt/gh-action-sdk@v5
|
||||
env:
|
||||
ARCH: ${{ matrix.arch }}-${{ env.BRANCH }}
|
||||
FEEDNAME: packages_ci
|
||||
|
||||
- name: Move created packages to project dir
|
||||
run: cp bin/packages/${{ matrix.arch }}/packages_ci/*.ipk . || true
|
||||
|
||||
- name: Collect metadata
|
||||
run: |
|
||||
MERGE_ID=$(git rev-parse --short HEAD)
|
||||
echo "MERGE_ID=$MERGE_ID" >> $GITHUB_ENV
|
||||
echo "BASE_ID=$(git rev-parse --short HEAD^1)" >> $GITHUB_ENV
|
||||
echo "HEAD_ID=$(git rev-parse --short HEAD^2)" >> $GITHUB_ENV
|
||||
PRNUMBER=${GITHUB_REF_NAME%/merge}
|
||||
echo "PRNUMBER=$PRNUMBER" >> $GITHUB_ENV
|
||||
echo "ARCHIVE_NAME=${{matrix.arch}}-PR$PRNUMBER-$MERGE_ID" >> $GITHUB_ENV
|
||||
|
||||
- name: Generate metadata
|
||||
run: |
|
||||
cat << _EOF_ > PKG-INFO
|
||||
Metadata-Version: 2.1
|
||||
Name: ${{env.ARCHIVE_NAME}}
|
||||
Version: $BRANCH
|
||||
Author: $GITHUB_ACTOR
|
||||
Home-page: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pull/$PRNUMBER
|
||||
Download-URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
|
||||
Summary: $PACKAGES
|
||||
Platform: ${{ matrix.arch }}
|
||||
|
||||
Packages for OpenWrt $BRANCH running on ${{matrix.arch}}, built from PR $PRNUMBER
|
||||
at commit $HEAD_ID, against $BRANCH at commit $BASE_ID, with merge SHA $MERGE_ID.
|
||||
|
||||
Modified packages:
|
||||
_EOF_
|
||||
for p in $PACKAGES
|
||||
do
|
||||
echo " "$p >> PKG-INFO
|
||||
done
|
||||
echo >> PKG-INFO
|
||||
echo Full file listing: >> PKG-INFO
|
||||
ls -al *.ipk >> PKG-INFO || true
|
||||
cat PKG-INFO
|
||||
|
||||
- name: Store packages
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{env.ARCHIVE_NAME}}-packages
|
||||
path: |
|
||||
*.ipk
|
||||
PKG-INFO
|
||||
|
||||
- name: Store logs
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{env.ARCHIVE_NAME}}-logs
|
||||
path: |
|
||||
logs/
|
||||
PKG-INFO
|
||||
|
||||
- name: Remove logs
|
||||
run: sudo rm -rf logs/ || true
|
||||
|
||||
- name: Register QEMU
|
||||
if: ${{ matrix.runtime_test }}
|
||||
run: |
|
||||
sudo docker run --rm --privileged aptman/qus -s -- -p
|
||||
|
||||
- name: Build Docker container
|
||||
if: ${{ matrix.runtime_test }}
|
||||
run: |
|
||||
docker build -t test-container --build-arg ARCH .github/workflows/
|
||||
env:
|
||||
ARCH: ${{ matrix.arch }}-${{ env.BRANCH }}
|
||||
|
||||
- name: Test via Docker container
|
||||
if: ${{ matrix.runtime_test }}
|
||||
run: |
|
||||
docker run --rm -v $GITHUB_WORKSPACE:/ci test-container
|
|
@ -8,19 +8,18 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bcg729
|
||||
PKG_VERSION:=1.1.1
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.0.4
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE_URL_FILE:=$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_URL_FILE)
|
||||
PKG_SOURCE_URL:=https://github.com/BelledonneCommunications/$(PKG_NAME)/archive
|
||||
PKG_HASH:=68599a850535d1b182932b3f86558ac8a76d4b899a548183b062956c5fdc916d
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://www.linphone.org/releases/sources/bcg729
|
||||
PKG_HASH:=1a0fbf1ff91470037e83fa67976f940ebb601e4cc525859c754f4e7ffc24c307
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=LICENSE.txt
|
||||
PKG_LICENSE:=GPL-2.0+
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_MAINTAINER:=Alex Samorukov <samm@os2.kiev.ua>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
@ -52,14 +51,11 @@ CMAKE_OPTIONS += \
|
|||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/bcg729
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/bcg729/*.h \
|
||||
$(1)/usr/include/bcg729
|
||||
$(INSTALL_DIR) $(1)/usr/lib/{cmake/Bcg729,pkgconfig}
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libbcg729.so* $(1)/usr/lib
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib$(PKG_NAME).pc \
|
||||
$(1)/usr/lib/pkgconfig
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/Bcg729/cmake/*.cmake \
|
||||
$(1)/usr/lib/cmake/Bcg729
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/bcg729/*.h $(1)/usr/include/bcg729
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libbcg729.so* $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/cmake/Bcg729
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/Bcg729/cmake/*.cmake $(1)/usr/lib/cmake/Bcg729
|
||||
endef
|
||||
|
||||
define Package/bcg729/install
|
||||
|
|
|
@ -9,21 +9,25 @@ include $(TOPDIR)/rules.mk
|
|||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=dahdi-linux
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=2.11.1-20180111
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
#PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
#PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/dahdi-linux/releases
|
||||
#PKG_HASH:=f59f382365118205e77d2874f1c0e1546e936247bcc45f07a43bc21778bee9df
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://github.com/asterisk/dahdi-linux.git
|
||||
PKG_SOURCE_DATE=2023-09-21
|
||||
PKG_SOURCE_VERSION:=1bb9088f2baff8c4e3fec536044cc48072cf9905
|
||||
PKG_MIRROR_HASH:=b32eb405d64c981f64922840f616cf362636ccc93506986c0b92bd4dcca5ab30
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=26597a5cac2930c191ae540c03c7406745c03e36
|
||||
PKG_MIRROR_HASH:=0eaad3c3ed63efa61e6b807bd70e9b5287271f5dd63af9f41c026a5f979b81d3
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Vittorio Gambaletta <openwrt@vittgam.net>
|
||||
|
||||
# With below variable set, $(PKG_SYMVERS_DIR)/dahdi-linux.symvers gets
|
||||
# generated from drivers/dahdi/Module.symvers.
|
||||
PKG_EXTMOD_SUBDIRS:=drivers/dahdi
|
||||
DAHDI_MODULES_EXTRA:=
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
@ -91,9 +95,12 @@ define Build/Prepare
|
|||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
KSRC="$(LINUX_DIR)"
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
KSRC="$(LINUX_DIR)" \
|
||||
MODULES_EXTRA="$(DAHDI_MODULES_EXTRA)"
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/dahdi/Kbuild
|
||||
+++ b/drivers/dahdi/Kbuild
|
||||
@@ -64,9 +64,8 @@ obj-m += $(DAHDI_MODULES_EXTRA)
|
||||
@@ -61,9 +61,8 @@ obj-m += $(DAHDI_MODULES_EXTRA)
|
||||
# If you want to build OSLEC, include the code in the standard location:
|
||||
# drivers/staging/echo . The DAHDI OSLEC echo canceller will be built as
|
||||
# well:
|
||||
|
@ -10,4 +10,4 @@
|
|||
-obj-m += ../staging/echo/echo.o
|
||||
endif
|
||||
|
||||
CFLAGS_MODULE += -I$(DAHDI_INCLUDE) -I$(src) -Wno-format-truncation
|
||||
CFLAGS_MODULE += -I$(DAHDI_INCLUDE) -I$(src)
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
--- a/drivers/dahdi/Kbuild
|
||||
+++ b/drivers/dahdi/Kbuild
|
||||
@@ -12,6 +12,7 @@ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCT
|
||||
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTC4XXP) += wctc4xxp/
|
||||
@@ -13,6 +13,7 @@ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCT
|
||||
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTDM24XXP) += wctdm24xxp/
|
||||
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE12XP) += wcte12xp/
|
||||
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE13XP) += wcte13xp.o
|
||||
+obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_HFCS) += hfcs/
|
||||
|
||||
ifndef HOTPLUG_FIRMWARE
|
||||
ifneq (,$(filter y m,$(CONFIG_FW_LOADER)))
|
||||
wcte13xp-objs := wcte13xp-base.o wcxb_spi.o wcxb.o wcxb_flash.o
|
||||
CFLAGS_wcte13xp-base.o += -I$(src)/oct612x -I$(src)/oct612x/include -I$(src)/oct612x/octdeviceapi -I$(src)/oct612x/octdeviceapi/oct6100api
|
||||
--- a/drivers/dahdi/Kconfig
|
||||
+++ b/drivers/dahdi/Kconfig
|
||||
@@ -235,4 +235,14 @@ config DAHDI_DYNAMIC_LOC
|
||||
If unsure, say Y.
|
||||
@@ -291,4 +291,14 @@ config DAHDI_WCTE11XP
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
+config DAHDI_HFCS
|
||||
+ tristate "Support for various HFC-S PCI BRI adapters"
|
||||
|
@ -1716,7 +1716,7 @@
|
|||
+ hfc_proc_dahdi_hfcs_dir = proc_mkdir(hfc_DRIVER_NAME, proc_root_driver);
|
||||
+#endif
|
||||
+
|
||||
+ ret = pci_register_driver(&hfc_driver);
|
||||
+ ret = dahdi_pci_module(&hfc_driver);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
|
|
|
@ -1,138 +0,0 @@
|
|||
--- a/drivers/dahdi/xpp/xbus-core.c
|
||||
+++ b/drivers/dahdi/xpp/xbus-core.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <linux/errno.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/mutex.h>
|
||||
+#include <linux/math64.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/slab.h>
|
||||
@@ -1768,11 +1769,13 @@ out:
|
||||
|
||||
static void xbus_fill_proc_queue(struct seq_file *sfile, struct xframe_queue *q)
|
||||
{
|
||||
+ s32 rem;
|
||||
+ s64 lag_sec = div_s64_rem(q->worst_lag_usec, 1000, &rem);
|
||||
seq_printf(sfile,
|
||||
- "%-15s: counts %3d, %3d, %3d worst %3d, overflows %3d worst_lag %02lld.%lld ms\n",
|
||||
+ "%-15s: counts %3d, %3d, %3d worst %3d, overflows %3d worst_lag %02lld.%ld ms\n",
|
||||
q->name, q->steady_state_count, q->count, q->max_count,
|
||||
- q->worst_count, q->overflows, q->worst_lag_usec / 1000,
|
||||
- q->worst_lag_usec % 1000);
|
||||
+ q->worst_count, q->overflows, lag_sec,
|
||||
+ rem);
|
||||
xframe_queue_clearstats(q);
|
||||
}
|
||||
|
||||
--- a/drivers/dahdi/xpp/xbus-pcm.c
|
||||
+++ b/drivers/dahdi/xpp/xbus-pcm.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/version.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
+#include <linux/math64.h>
|
||||
#include "xbus-pcm.h"
|
||||
#include "xbus-core.h"
|
||||
#include "xpp_dahdi.h"
|
||||
@@ -129,7 +130,7 @@ static int xpp_ticker_step(struct xpp_ti
|
||||
usec = ktime_us_delta(ticker->last_sample,
|
||||
ticker->first_sample);
|
||||
ticker->first_sample = ticker->last_sample;
|
||||
- ticker->tick_period = usec / ticker->cycle;
|
||||
+ ticker->tick_period = div_s64(usec, ticker->cycle);
|
||||
cycled = 1;
|
||||
}
|
||||
ticker->count++;
|
||||
@@ -497,7 +498,7 @@ static void send_drift(xbus_t *xbus, int
|
||||
XBUS_DBG(SYNC, xbus,
|
||||
"%sDRIFT adjust %s (%d) (last update %lld seconds ago)\n",
|
||||
(disable_pll_sync) ? "Fake " : "", msg, drift,
|
||||
- msec_delta / MSEC_PER_SEC);
|
||||
+ div_s64(msec_delta, MSEC_PER_SEC));
|
||||
if (!disable_pll_sync)
|
||||
CALL_PROTO(GLOBAL, SYNC_SOURCE, xbus, NULL, SYNC_MODE_PLL,
|
||||
drift);
|
||||
--- a/drivers/dahdi/xpp/xbus-sysfs.c
|
||||
+++ b/drivers/dahdi/xpp/xbus-sysfs.c
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/errno.h>
|
||||
+#include <linux/math64.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#ifdef PROTOCOL_DEBUG
|
||||
#include <linux/ctype.h>
|
||||
@@ -249,11 +250,9 @@ static DEVICE_ATTR_READER(driftinfo_show
|
||||
/*
|
||||
* Calculate lost ticks time
|
||||
*/
|
||||
- seconds = ktime_ms_delta(now, di->last_lost_tick) / 1000;
|
||||
- minutes = seconds / 60;
|
||||
- seconds = seconds % 60;
|
||||
- hours = minutes / 60;
|
||||
- minutes = minutes % 60;
|
||||
+ seconds = div_s64(ktime_ms_delta(now, di->last_lost_tick), 1000);
|
||||
+ minutes = div_s64_rem(seconds, 60, &seconds);
|
||||
+ hours = div_s64_rem(minutes, 60, &minutes);
|
||||
len += snprintf(buf + len, PAGE_SIZE - len,
|
||||
"%-15s: %8d (was %d:%02d:%02d ago)\n", "lost_ticks",
|
||||
di->lost_ticks, hours, minutes, seconds);
|
||||
--- a/drivers/dahdi/xpp/xframe_queue.c
|
||||
+++ b/drivers/dahdi/xpp/xframe_queue.c
|
||||
@@ -1,3 +1,4 @@
|
||||
+#include <linux/math64.h>
|
||||
#include "xframe_queue.h"
|
||||
#include "xbus-core.h"
|
||||
#include "dahdi_debug.h"
|
||||
@@ -40,10 +41,11 @@ static void __xframe_dump_queue(struct x
|
||||
THIS_MODULE->name, q->name);
|
||||
list_for_each_entry_reverse(xframe, &q->head, frame_list) {
|
||||
xpacket_t *pack = (xpacket_t *)&xframe->packets[0];
|
||||
- s64 usec = ktime_us_delta(now, xframe->kt_queued);
|
||||
+ s32 rem;
|
||||
+ s64 sec = div_s64_rem(ktime_us_delta(now, xframe->kt_queued), 1000, &rem);
|
||||
|
||||
- snprintf(prefix, ARRAY_SIZE(prefix), " %3d> %5lld.%03lld msec",
|
||||
- i++, usec / 1000, usec % 1000);
|
||||
+ snprintf(prefix, ARRAY_SIZE(prefix), " %3d> %5lld.%03ld msec",
|
||||
+ i++, sec, rem);
|
||||
dump_packet(prefix, pack, 1);
|
||||
}
|
||||
}
|
||||
@@ -60,11 +62,13 @@ static bool __xframe_enqueue(struct xfra
|
||||
if (q->count >= q->max_count) {
|
||||
q->overflows++;
|
||||
if ((overflow_cnt++ % 1000) < 5) {
|
||||
- NOTICE("Overflow of %-15s: counts %3d, %3d, %3d worst %3d, overflows %3d worst_lag %02lld.%lld ms\n",
|
||||
+ s32 rem;
|
||||
+ s64 lag_sec = div_s64_rem(q->worst_lag_usec, 1000, &rem);
|
||||
+ NOTICE("Overflow of %-15s: counts %3d, %3d, %3d worst %3d, overflows %3d worst_lag %02lld.%ld ms\n",
|
||||
q->name, q->steady_state_count, q->count,
|
||||
q->max_count, q->worst_count, q->overflows,
|
||||
- q->worst_lag_usec / 1000,
|
||||
- q->worst_lag_usec % 1000);
|
||||
+ lag_sec,
|
||||
+ rem);
|
||||
__xframe_dump_queue(q);
|
||||
}
|
||||
ret = 0;
|
||||
--- a/drivers/dahdi/xpp/xpp_usb.c
|
||||
+++ b/drivers/dahdi/xpp/xpp_usb.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/delay.h> /* for udelay */
|
||||
#include <linux/seq_file.h>
|
||||
+#include <linux/math64.h>
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
|
||||
#include <asm/uaccess.h>
|
||||
#else
|
||||
@@ -891,7 +892,7 @@ static void xpp_send_callback(struct urb
|
||||
usec = 0; /* System clock jumped */
|
||||
if (usec > xusb->max_tx_delay)
|
||||
xusb->max_tx_delay = usec;
|
||||
- i = usec / USEC_BUCKET;
|
||||
+ i = div_s64(usec, USEC_BUCKET);
|
||||
if (i >= NUM_BUCKETS)
|
||||
i = NUM_BUCKETS - 1;
|
||||
xusb->usb_tx_delay[i]++;
|
|
@ -1,131 +0,0 @@
|
|||
From f9bc391e1cd830c830b3b4fb5fd46a59b41de373 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 12 May 2023 20:18:13 +0200
|
||||
Subject: [PATCH 1/6] dahdi: use fallthrough where needed
|
||||
|
||||
Use fallthrough instead of comment to fix compilation warning.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
drivers/dahdi/dahdi-base.c | 14 +++++++-------
|
||||
drivers/dahdi/wcaxx-base.c | 2 ++
|
||||
drivers/dahdi/wctdm24xxp/base.c | 2 ++
|
||||
drivers/dahdi/xpp/card_global.c | 2 +-
|
||||
4 files changed, 12 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/drivers/dahdi/dahdi-base.c
|
||||
+++ b/drivers/dahdi/dahdi-base.c
|
||||
@@ -7930,7 +7930,7 @@ static inline void __dahdi_process_getau
|
||||
memset(getlin, 0, DAHDI_CHUNKSIZE * sizeof(short));
|
||||
txb[0] = DAHDI_LIN2X(0, ms);
|
||||
memset(txb + 1, txb[0], DAHDI_CHUNKSIZE - 1);
|
||||
- /* fallthrough */
|
||||
+ fallthrough;
|
||||
case DAHDI_CONF_CONF: /* Normal conference mode */
|
||||
if (is_pseudo_chan(ms)) /* if pseudo-channel */
|
||||
{
|
||||
@@ -7954,7 +7954,7 @@ static inline void __dahdi_process_getau
|
||||
memset(txb + 1, txb[0], DAHDI_CHUNKSIZE - 1);
|
||||
break;
|
||||
}
|
||||
- /* fall through */
|
||||
+ fallthrough;
|
||||
case DAHDI_CONF_CONFMON: /* Conference monitor mode */
|
||||
if (ms->confmode & DAHDI_CONF_LISTENER) {
|
||||
/* Subtract out last sample written to conf */
|
||||
@@ -8493,7 +8493,7 @@ static void __dahdi_hooksig_pvt(struct d
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
- /* fallthrough */
|
||||
+ fallthrough;
|
||||
case DAHDI_SIG_FXSGS: /* FXS Groundstart */
|
||||
if (rxsig == DAHDI_RXSIG_ONHOOK) {
|
||||
chan->ringdebtimer = RING_DEBOUNCE_TIME;
|
||||
@@ -8512,7 +8512,7 @@ static void __dahdi_hooksig_pvt(struct d
|
||||
chan->gotgs = 1;
|
||||
}
|
||||
}
|
||||
- /* fallthrough */
|
||||
+ fallthrough;
|
||||
case DAHDI_SIG_FXOLS: /* FXO Loopstart */
|
||||
case DAHDI_SIG_FXOKS: /* FXO Kewlstart */
|
||||
switch(rxsig) {
|
||||
@@ -8612,7 +8612,7 @@ void dahdi_rbsbits(struct dahdi_chan *ch
|
||||
__dahdi_hooksig_pvt(chan, DAHDI_RXSIG_START);
|
||||
break;
|
||||
}
|
||||
- /* Fall through */
|
||||
+ fallthrough;
|
||||
case DAHDI_SIG_EM_E1:
|
||||
case DAHDI_SIG_FXOLS: /* FXO Loopstart */
|
||||
case DAHDI_SIG_FXOKS: /* FXO Kewlstart */
|
||||
@@ -8630,7 +8630,7 @@ void dahdi_rbsbits(struct dahdi_chan *ch
|
||||
break;
|
||||
case DAHDI_SIG_FXSKS: /* FXS Kewlstart */
|
||||
case DAHDI_SIG_FXSGS: /* FXS Groundstart */
|
||||
- /* Fall through */
|
||||
+ fallthrough;
|
||||
case DAHDI_SIG_FXSLS:
|
||||
if (!(cursig & DAHDI_BBIT)) {
|
||||
/* Check for ringing first */
|
||||
@@ -9059,7 +9059,7 @@ static inline void __dahdi_process_putau
|
||||
memcpy(ss->putlin, putlin, DAHDI_CHUNKSIZE * sizeof(short));
|
||||
break;
|
||||
}
|
||||
- /* fall through */
|
||||
+ fallthrough;
|
||||
case DAHDI_CONF_CONFANN: /* Conference with announce */
|
||||
if (ms->confmode & DAHDI_CONF_TALKER) {
|
||||
/* Store temp value */
|
||||
--- a/drivers/dahdi/wcaxx-base.c
|
||||
+++ b/drivers/dahdi/wcaxx-base.c
|
||||
@@ -1456,7 +1456,7 @@ wcaxx_check_battery_lost(struct wcaxx *w
|
||||
break;
|
||||
case BATTERY_UNKNOWN:
|
||||
mod_hooksig(wc, mod, DAHDI_RXSIG_ONHOOK);
|
||||
- /* fallthrough */
|
||||
+ fallthrough;
|
||||
case BATTERY_PRESENT:
|
||||
fxo->battery_state = BATTERY_DEBOUNCING_LOST;
|
||||
fxo->battdebounce_timer = wc->framecount + battdebounce;
|
||||
@@ -1567,7 +1567,7 @@ wcaxx_check_battery_present(struct wcaxx
|
||||
break;
|
||||
case BATTERY_UNKNOWN:
|
||||
mod_hooksig(wc, mod, DAHDI_RXSIG_OFFHOOK);
|
||||
- /* fallthrough */
|
||||
+ fallthrough;
|
||||
case BATTERY_LOST:
|
||||
fxo->battery_state = BATTERY_DEBOUNCING_PRESENT;
|
||||
fxo->battdebounce_timer = wc->framecount + battdebounce;
|
||||
--- a/drivers/dahdi/wctdm24xxp/base.c
|
||||
+++ b/drivers/dahdi/wctdm24xxp/base.c
|
||||
@@ -1964,7 +1964,7 @@ wctdm_check_battery_lost(struct wctdm *w
|
||||
break;
|
||||
case BATTERY_UNKNOWN:
|
||||
mod_hooksig(wc, mod, DAHDI_RXSIG_ONHOOK);
|
||||
- /* fallthrough */
|
||||
+ fallthrough;
|
||||
case BATTERY_PRESENT:
|
||||
fxo->battery_state = BATTERY_DEBOUNCING_LOST;
|
||||
fxo->battdebounce_timer = wc->framecount + battdebounce;
|
||||
@@ -2074,7 +2074,7 @@ wctdm_check_battery_present(struct wctdm
|
||||
break;
|
||||
case BATTERY_UNKNOWN:
|
||||
mod_hooksig(wc, mod, DAHDI_RXSIG_OFFHOOK);
|
||||
- /* fallthrough */
|
||||
+ fallthrough;
|
||||
case BATTERY_LOST:
|
||||
fxo->battery_state = BATTERY_DEBOUNCING_PRESENT;
|
||||
fxo->battdebounce_timer = wc->framecount + battdebounce;
|
||||
--- a/drivers/dahdi/xpp/card_global.c
|
||||
+++ b/drivers/dahdi/xpp/card_global.c
|
||||
@@ -148,7 +148,7 @@ static int execute_chip_command(xpd_t *x
|
||||
XPD_NOTICE(xpd,
|
||||
"'I' is deprecated in register commands. "
|
||||
"Use 'S' instead.\n");
|
||||
- /* fall through */
|
||||
+ fallthrough;
|
||||
case 'S':
|
||||
do_subreg = 1;
|
||||
num_args += 2; /* register + subreg */
|
|
@ -1,60 +0,0 @@
|
|||
From eea6daaa4cae1ddcd8e32c8b9e4273ba3244838c Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 12 May 2023 20:19:04 +0200
|
||||
Subject: [PATCH 2/6] dahdi: fix always true compilation warning
|
||||
|
||||
Fix always true compilation warning on statically allocated array. Check
|
||||
content of the array instead.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
drivers/dahdi/dahdi-base.c | 6 +++---
|
||||
drivers/dahdi/dahdi_dynamic_ethmf.c | 2 +-
|
||||
drivers/dahdi/xpp/xbus-core.c | 2 +-
|
||||
3 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/drivers/dahdi/dahdi-base.c
|
||||
+++ b/drivers/dahdi/dahdi-base.c
|
||||
@@ -928,9 +928,9 @@ static int dahdi_seq_show(struct seq_fil
|
||||
if (!s)
|
||||
return -ENODEV;
|
||||
|
||||
- if (s->name)
|
||||
+ if (*(s->name))
|
||||
seq_printf(sfile, "Span %d: %s ", s->spanno, s->name);
|
||||
- if (s->desc)
|
||||
+ if (*(s->desc))
|
||||
seq_printf(sfile, "\"%s\"", s->desc);
|
||||
else
|
||||
seq_printf(sfile, "\"\"");
|
||||
@@ -969,7 +969,7 @@ static int dahdi_seq_show(struct seq_fil
|
||||
for (x = 0; x < s->channels; x++) {
|
||||
struct dahdi_chan *chan = s->chans[x];
|
||||
|
||||
- if (chan->name)
|
||||
+ if (*(chan->name))
|
||||
seq_printf(sfile, "\t%4d %s ", chan->channo,
|
||||
chan->name);
|
||||
|
||||
--- a/drivers/dahdi/dahdi_dynamic_ethmf.c
|
||||
+++ b/drivers/dahdi/dahdi_dynamic_ethmf.c
|
||||
@@ -535,7 +535,7 @@ static void ztdethmf_destroy(struct dahd
|
||||
kfree(z->msgbuf);
|
||||
kfree(z);
|
||||
} else {
|
||||
- if (z && z->span && z->span->name) {
|
||||
+ if (z && z->span && *(z->span->name)) {
|
||||
printk(KERN_ERR "Cannot find interface for %s\n",
|
||||
z->span->name);
|
||||
}
|
||||
--- a/drivers/dahdi/xpp/xbus-core.c
|
||||
+++ b/drivers/dahdi/xpp/xbus-core.c
|
||||
@@ -120,7 +120,7 @@ int xbus_check_unique(xbus_t *xbus)
|
||||
{
|
||||
if (!xbus)
|
||||
return -ENOENT;
|
||||
- if (xbus->label && *(xbus->label)) {
|
||||
+ if (*(xbus->label)) {
|
||||
xbus_t *xbus_old;
|
||||
|
||||
XBUS_DBG(DEVICES, xbus, "Checking LABEL='%s'\n", xbus->label);
|
|
@ -1,28 +0,0 @@
|
|||
From d0699f781e96df6c1fd10551c92fa27695b297da Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 12 May 2023 20:19:45 +0200
|
||||
Subject: [PATCH 3/6] dahdi-sysfs-chan: fix bug if clause does not guard
|
||||
|
||||
Fix bug if clause does not guard by a typo by missing the if clause and
|
||||
not correctly removing the device.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
drivers/dahdi/dahdi-sysfs-chan.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/dahdi/dahdi-sysfs-chan.c
|
||||
+++ b/drivers/dahdi/dahdi-sysfs-chan.c
|
||||
@@ -381,10 +381,11 @@ static void fixed_devfiles_remove(void)
|
||||
return;
|
||||
for (i = 0; i < ARRAY_SIZE(fixed_minors); i++) {
|
||||
void *d = fixed_minors[i].dev;
|
||||
- if (d && !IS_ERR(d))
|
||||
+ if (d && !IS_ERR(d)) {
|
||||
dahdi_dbg(DEVICES, "Removing fixed device file %s\n",
|
||||
fixed_minors[i].name);
|
||||
DEL_DAHDI_DEV(fixed_minors[i].minor);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
From 88cfe20bcd0be443fc7613fd287147d1c54b5f7f Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 12 May 2023 20:21:39 +0200
|
||||
Subject: [PATCH 5/6] dahdi: skip checking on releasing
|
||||
|
||||
Skip checking on releasing since xb is statically allocated and always
|
||||
present.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
drivers/dahdi/wcte13xp-base.c | 3 +--
|
||||
drivers/dahdi/wcte43x-base.c | 3 +--
|
||||
2 files changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/dahdi/wcte13xp-base.c
|
||||
+++ b/drivers/dahdi/wcte13xp-base.c
|
||||
@@ -2707,8 +2707,7 @@ static int __devinit te13xp_init_one(str
|
||||
return 0;
|
||||
|
||||
fail_exit:
|
||||
- if (&wc->xb)
|
||||
- wcxb_release(&wc->xb);
|
||||
+ wcxb_release(&wc->xb);
|
||||
|
||||
free_wc(wc);
|
||||
return res;
|
||||
--- a/drivers/dahdi/wcte43x-base.c
|
||||
+++ b/drivers/dahdi/wcte43x-base.c
|
||||
@@ -3521,8 +3521,7 @@ static int __devinit t43x_init_one(struc
|
||||
return 0;
|
||||
|
||||
fail_exit:
|
||||
- if (&wc->xb)
|
||||
- wcxb_release(&wc->xb);
|
||||
+ wcxb_release(&wc->xb);
|
||||
|
||||
if (debug)
|
||||
dev_info(&wc->xb.pdev->dev, "***At fail_exit in init_one***\n");
|
|
@ -1,44 +0,0 @@
|
|||
From 14a9e676d635b1c2be1bab4114cc76c1793892d0 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 12 May 2023 20:22:31 +0200
|
||||
Subject: [PATCH 6/6] dahdi: xpp: fix wrong printf to %d
|
||||
|
||||
Fix wrong printf that should be %d with int variables.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
drivers/dahdi/xpp/xbus-core.c | 2 +-
|
||||
drivers/dahdi/xpp/xframe_queue.c | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/dahdi/xpp/xbus-core.c
|
||||
+++ b/drivers/dahdi/xpp/xbus-core.c
|
||||
@@ -1772,7 +1772,7 @@ static void xbus_fill_proc_queue(struct
|
||||
s32 rem;
|
||||
s64 lag_sec = div_s64_rem(q->worst_lag_usec, 1000, &rem);
|
||||
seq_printf(sfile,
|
||||
- "%-15s: counts %3d, %3d, %3d worst %3d, overflows %3d worst_lag %02lld.%ld ms\n",
|
||||
+ "%-15s: counts %3d, %3d, %3d worst %3d, overflows %3d worst_lag %02lld.%d ms\n",
|
||||
q->name, q->steady_state_count, q->count, q->max_count,
|
||||
q->worst_count, q->overflows, lag_sec,
|
||||
rem);
|
||||
--- a/drivers/dahdi/xpp/xframe_queue.c
|
||||
+++ b/drivers/dahdi/xpp/xframe_queue.c
|
||||
@@ -44,7 +44,7 @@ static void __xframe_dump_queue(struct x
|
||||
s32 rem;
|
||||
s64 sec = div_s64_rem(ktime_us_delta(now, xframe->kt_queued), 1000, &rem);
|
||||
|
||||
- snprintf(prefix, ARRAY_SIZE(prefix), " %3d> %5lld.%03ld msec",
|
||||
+ snprintf(prefix, ARRAY_SIZE(prefix), " %3d> %5lld.%03d msec",
|
||||
i++, sec, rem);
|
||||
dump_packet(prefix, pack, 1);
|
||||
}
|
||||
@@ -64,7 +64,7 @@ static bool __xframe_enqueue(struct xfra
|
||||
if ((overflow_cnt++ % 1000) < 5) {
|
||||
s32 rem;
|
||||
s64 lag_sec = div_s64_rem(q->worst_lag_usec, 1000, &rem);
|
||||
- NOTICE("Overflow of %-15s: counts %3d, %3d, %3d worst %3d, overflows %3d worst_lag %02lld.%ld ms\n",
|
||||
+ NOTICE("Overflow of %-15s: counts %3d, %3d, %3d worst %3d, overflows %3d worst_lag %02lld.%d ms\n",
|
||||
q->name, q->steady_state_count, q->count,
|
||||
q->max_count, q->worst_count, q->overflows,
|
||||
lag_sec,
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (C) 2014 OpenWrt.org
|
||||
# Copyright (C) 2014 - 2018 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
|
@ -8,23 +8,17 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dahdi-tools
|
||||
PKG_VERSION:=3.1.0
|
||||
PKG_VERSION:=2.11.1
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/dahdi-tools/releases
|
||||
PKG_HASH:=ea852ebd274ee1cc90ff5e4ac84261b0b787b1a74e8b76ad659bc9ec4f77e67e
|
||||
PKG_HASH:=53ffeb333f3e44b0c88e5b17475cdbf87d3f652eb81a6422de76250c061e2909
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Vittorio Gambaletta <openwrt@vittgam.net>
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/dahdi-cfg/Default
|
||||
|
@ -52,44 +46,41 @@ define Package/dahdi-tools-libtonezone
|
|||
TITLE:=DAHDI tonezone library
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-silent-rules \
|
||||
--with-perllib="" \
|
||||
--without-libusb \
|
||||
--without-libusbx \
|
||||
--without-newt \
|
||||
--without-pcap \
|
||||
--without-ppp \
|
||||
--without-selinux \
|
||||
--without-usb
|
||||
|
||||
# https://issues.asterisk.org/jira/browse/DAHTOOL-85
|
||||
TARGET_CFLAGS+=-fcommon
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
HOSTCC="$(HOSTCC)" \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
CFLAGS="$(TARGET_CFLAGS)" \
|
||||
CPPFLAGS="$(TARGET_CPPFLAGS)" \
|
||||
dahdi_cfg dahdi_monitor dahdi_scan dahdi_speed dahdi_test fxotune
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.{a,so*} \
|
||||
$(1)/usr/lib/
|
||||
$(CP) $(PKG_BUILD_DIR)/.libs/*.so* $(1)/usr/lib/
|
||||
$(CP) $(PKG_BUILD_DIR)/.libs/*.a $(1)/usr/lib/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/include/dahdi
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/dahdi/tonezone.h \
|
||||
$(1)/usr/include/dahdi/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/tonezone.h $(1)/usr/include/dahdi/
|
||||
endef
|
||||
|
||||
define Package/dahdi-cfg/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{dahdi_cfg,dahdi_scan,fxotune} \
|
||||
$(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/dahdi_cfg $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dahdi_scan $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fxotune $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
define Package/dahdi-monitor/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{dahdi_monitor,dahdi_speed,dahdi_test} \
|
||||
$(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dahdi_monitor $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dahdi_speed $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dahdi_test $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
define Package/dahdi-tools-libtonezone/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so* $(1)/usr/lib/
|
||||
$(CP) $(PKG_BUILD_DIR)/.libs/libtonezone.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,dahdi-cfg))
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- a/xpp/echo_loader.c
|
||||
+++ b/xpp/echo_loader.c
|
||||
@@ -564,7 +564,7 @@ UINT32 Oct6100UserDriverReadBurstApi(tPO
|
||||
return cOCT6100_ERR_OK;
|
||||
}
|
||||
|
||||
-inline int get_ver(struct astribank *astribank)
|
||||
+static inline int get_ver(struct astribank *astribank)
|
||||
{
|
||||
return spi_send(astribank, 0, 0, 1, 1);
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
--- a/xpp/hexfile.h
|
||||
+++ b/xpp/hexfile.h
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
+#include <sys/cdefs.h>
|
||||
#include <sys/param.h>
|
||||
#include <syslog.h>
|
||||
#define PACKED __attribute__((packed))
|
|
@ -1,12 +0,0 @@
|
|||
menu "Configuration"
|
||||
depends on PACKAGE_freetdm
|
||||
|
||||
config FREETDM_WITH_DEBUG
|
||||
bool "Compile with debug information"
|
||||
default n
|
||||
help
|
||||
Enable extra debug codepaths, like asserts and extra output. If you
|
||||
want to get meaningful backtraces see
|
||||
https://wiki.openwrt.org/doc/devel/debugging for starting points.
|
||||
|
||||
endmenu
|
|
@ -1,154 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2021 Sebastian Kemper <sebastian_ml@gmx.net>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=freetdm
|
||||
PKG_RELEASE:=2
|
||||
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/freeswitch/freetdm.git
|
||||
PKG_SOURCE_DATE:=2021-08-30
|
||||
PKG_SOURCE_VERSION:=8918ee1c3637cad0f9d41a402d26d3aa076fc202
|
||||
PKG_MIRROR_HASH:=c910ff0fb62c8a174f6e0bbd749783da1ecd71634d4dcde48b118909f4981943
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:= \
|
||||
BSD-2-Clause \
|
||||
BSD-3-Clause \
|
||||
BSD-4-Clause \
|
||||
GPL-2.0+ \
|
||||
MIT/X11 (BSD like) \
|
||||
MPL-1.1
|
||||
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_BUILD_DEPENDS:=freeswitch
|
||||
|
||||
FS_EXAMPLES_DIR:=/usr/share/freeswitch/examples
|
||||
FS_LIB_DIR:=/usr/lib
|
||||
FS_MOD_DIR:=$(FS_LIB_DIR)/freeswitch/mod
|
||||
FS_PKGCONFIG_DIR:=$(FS_LIB_DIR)/pkgconfig
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_FREETDM_WITH_DEBUG \
|
||||
CONFIG_LIBC \
|
||||
CONFIG_PACKAGE_libfreetdm-ftmod-libpri \
|
||||
CONFIG_PACKAGE_libfreetdm-ftmod-pritap \
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libfreetdm/install/ftmod
|
||||
$(INSTALL_DIR) $(1)$(FS_MOD_DIR)
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)$(FS_MOD_DIR)/ftmod_$(2).so \
|
||||
$(1)$(FS_MOD_DIR)
|
||||
endef
|
||||
|
||||
define Package/freetdm/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/libfreetdm/Default
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
SUBMENU:=Telephony
|
||||
URL:=https://www.freeswitch.org
|
||||
endef
|
||||
|
||||
define Package/libfreetdm
|
||||
$(call Package/libfreetdm/Default)
|
||||
DEPENDS:=
|
||||
TITLE:=TDM signaling and media API
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
define Package/libfreetdm/description
|
||||
Provides a unified interface to hardware TDM cards and SS7 stacks.
|
||||
endef
|
||||
|
||||
define Package/libfreetdm/install
|
||||
$(INSTALL_DIR) $(1)$(FS_LIB_DIR)
|
||||
$(CP) $(PKG_INSTALL_DIR)$(FS_LIB_DIR)/libfreetdm.so.* \
|
||||
$(1)$(FS_LIB_DIR)
|
||||
endef
|
||||
|
||||
define Package/freeswitch-mod-freetdm
|
||||
$(call Package/libfreetdm/Default)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Telephony
|
||||
DEPENDS:=freeswitch +libfreetdm
|
||||
TITLE:=FreeTDM endpoint module
|
||||
endef
|
||||
|
||||
define Package/freeswitch-mod-freetdm/description
|
||||
This module is the glue between FreeSWITCH and FreeTDM.
|
||||
endef
|
||||
|
||||
define Package/freeswitch-mod-freetdm/install
|
||||
$(INSTALL_DIR) $(1)$(FS_MOD_DIR)
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)$(FS_MOD_DIR)/mod_freetdm.so \
|
||||
$(1)$(FS_MOD_DIR)
|
||||
ifeq ($(CONFIG_FS_WITH_MODCONF),y)
|
||||
$(INSTALL_DIR) \
|
||||
$(1)$(FS_EXAMPLES_DIR)/mod_freetdm/freeswitch/autoload_configs
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/*.conf \
|
||||
$(1)$(FS_EXAMPLES_DIR)/mod_freetdm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_INSTALL_DIR)/etc/freeswitch/autoload_configs/freetdm.conf.xml \
|
||||
$(1)$(FS_EXAMPLES_DIR)/mod_freetdm/freeswitch/autoload_configs
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/libfreetdm/FTModule
|
||||
define Package/libfreetdm-ftmod-$(subst _,-,$(1))
|
||||
$(call Package/libfreetdm/Default)
|
||||
DEPENDS:=libfreetdm \
|
||||
$(patsubst +%,+PACKAGE_libfreetdm-ftmod-$(subst _,-,$(1)):%,$(4))
|
||||
TITLE:=$(2) FreeTDM module
|
||||
endef
|
||||
define Package/libfreetdm-ftmod-$(subst _,-,$(1))/description
|
||||
$(subst \n,$(newline),$(3))
|
||||
endef
|
||||
define Package/libfreetdm-ftmod-$(subst _,-,$(1))/install
|
||||
$(call Package/libfreetdm/install/ftmod,$$(1),$(1))
|
||||
endef
|
||||
$$(eval $$(call BuildPackage,libfreetdm-ftmod-$(subst _,-,$(1))))
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS+= \
|
||||
--srcdir=$(PKG_BUILD_DIR) \
|
||||
--disable-dependency-tracking \
|
||||
--disable-static \
|
||||
--with-modinstdir=$(FS_MOD_DIR) \
|
||||
$(call autoconf_bool,CONFIG_FREETDM_WITH_DEBUG,debug) \
|
||||
$(if $(CONFIG_PACKAGE_libfreetdm-ftmod-libpri),--with-libpri="$(STAGING_DIR)/usr",--without-libpri) \
|
||||
$(if $(CONFIG_PACKAGE_libfreetdm-ftmod-pritap),--with-pritap,--without-pritap)
|
||||
|
||||
$(eval $(call BuildPackage,libfreetdm))
|
||||
$(eval $(call BuildPackage,freeswitch-mod-freetdm))
|
||||
|
||||
################################
|
||||
# FreeTDM modules
|
||||
# Params:
|
||||
# 1 - Package subname
|
||||
# 2 - Package title
|
||||
# 3 - Module description
|
||||
# 4 - Module dependencies
|
||||
################################
|
||||
|
||||
$(eval $(call Package/libfreetdm/FTModule,analog,Analog,Offers generic FXO/FXS support for any type of card supported by FreeTDM.,))
|
||||
$(eval $(call Package/libfreetdm/FTModule,analog_em,Analog EM,Offers generic E&M signaling for any type of card supported by FreeTDM.,))
|
||||
$(eval $(call Package/libfreetdm/FTModule,libpri,LibPRI,Offers support for PRI lines using the open source libpri stack for any\ntype of card supported by FreeTDM. Supports both PRI and BRI signalling.,+libpri @!aarch64))
|
||||
$(eval $(call Package/libfreetdm/FTModule,pritap,PRI tapping,This module is used to tap PRI lines.,+libfreetdm-ftmod-libpri))
|
||||
$(eval $(call Package/libfreetdm/FTModule,skel,Skeleton,ftmod_skel is an example module.,))
|
||||
$(eval $(call Package/libfreetdm/FTModule,zt,DAHDI I/O,This module supports the DAHDI interface. The DAHDI interface is used by\nseveral hardware vendors.,))
|
|
@ -1,10 +0,0 @@
|
|||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -284,6 +284,7 @@ dox doxygen:
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(prefix)
|
||||
$(mkinstalldirs) $(DESTDIR)@confdir@
|
||||
+ $(mkinstalldirs) $(DESTDIR)@fsconfdir@/autoload_configs
|
||||
@[ -f "$(DESTDIR)@confdir@/freetdm.conf" ] || ( cp conf/*.conf $(DESTDIR)@confdir@)
|
||||
@[ -f "$(DESTDIR)@fsconfdir@/autoload_configs/freetdm.conf.xml" ] || ( cp -f conf/freetdm.conf.xml $(DESTDIR)@fsconfdir@/autoload_configs)
|
||||
@echo FreeTDM Installed
|
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=gsmlib
|
||||
PKG_VERSION:=1.10-20140304
|
||||
PKG_RELEASE:=5
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://github.com/vbouchaud/gsmlib.git
|
||||
|
@ -31,6 +31,7 @@ PKG_LICENSE:=LGPL-2.1+
|
|||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
|
||||
|
||||
include $(INCLUDE_DIR)/uclibc++.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)/Default
|
||||
|
@ -43,7 +44,7 @@ $(call Package/$(PKG_NAME)/Default)
|
|||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=GSM mobile phone access lib
|
||||
DEPENDS:=+libstdcpp
|
||||
DEPENDS:=$(CXX_DEPENDS)
|
||||
endef
|
||||
|
||||
define Package/gsm-utils
|
||||
|
@ -62,10 +63,6 @@ define Package/gsm-utils/description
|
|||
Some simple command line programs to access GSM mobile phones via GSM modems.
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += --disable-nls
|
||||
|
||||
TARGET_CXXFLAGS += -std=c++11
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/$(PKG_NAME)
|
||||
$(INSTALL_DATA) \
|
||||
|
|
|
@ -19,15 +19,6 @@ Description: Update autotools-related stuff.
|
|||
dnl comment out this line to get extensive debugging output and asserts
|
||||
dnl CXXFLAGS="-DNDEBUG $CXXFLAGS"
|
||||
|
||||
@@ -108,7 +111,7 @@ AC_SUBST(GSM_VERSION)
|
||||
dnl national language support (NLS)
|
||||
LINGUAS="de"
|
||||
ALL_LINGUAS=$LINGUAS
|
||||
-AM_GNU_GETTEXT
|
||||
+AM_GNU_GETTEXT([external])
|
||||
dnl AM_GLIB_GNU_GETTEXT
|
||||
|
||||
dnl set locale dir (FIXME there must be a better way)
|
||||
--- /dev/null
|
||||
+++ b/po/Makevars
|
||||
@@ -0,0 +1,5 @@
|
||||
|
@ -38,7 +29,7 @@ Description: Update autotools-related stuff.
|
|||
+
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -11,14 +11,12 @@
|
||||
@@ -11,6 +11,8 @@
|
||||
# * Created: 21.5.1999
|
||||
# *************************************************************************
|
||||
|
||||
|
@ -47,11 +38,3 @@ Description: Update autotools-related stuff.
|
|||
SUBDIRS_ = po gsmlib apps tests doc scripts win32 ext
|
||||
|
||||
EXTRA_DIST = gsmlib.spec
|
||||
|
||||
-if COMPILE_INTL
|
||||
-SUBDIRS = intl $(SUBDIRS_) # po - make automake happy
|
||||
-else
|
||||
SUBDIRS = $(SUBDIRS_) # po intl - make automake happy
|
||||
-endif
|
||||
|
||||
all:
|
||||
|
|
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=libctb
|
||||
PKG_VERSION:=0.16
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://iftools.com/download/ctb/$(PKG_VERSION)
|
||||
|
@ -23,6 +23,7 @@ PKG_LICENSE:=LGPL
|
|||
PKG_LICENSE_FILES:=build/COPYING
|
||||
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
|
||||
|
||||
include $(INCLUDE_DIR)/uclibc++.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
|
@ -31,7 +32,7 @@ define Package/$(PKG_NAME)
|
|||
CATEGORY:=Libraries
|
||||
TITLE:=Communications toolbox - ctb
|
||||
URL:=https://iftools.com/opensource/ctb.en.php
|
||||
DEPENDS:=+libstdcpp
|
||||
DEPENDS:=$(CXX_DEPENDS)
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2019 Sebastian Kemper <sebastian_ml@gmx.net>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libks
|
||||
|
||||
PKG_VERSION:=2.0.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=libks-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/signalwire/libks/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=af94f9fcdb2022b8f09187309ac2d372a5a4cc639af77cd4375f2d5c88b4fd63
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:= \
|
||||
BSD-1-Clause \
|
||||
BSD-3-Clause \
|
||||
ISC \
|
||||
MIT \
|
||||
PUBLICDOMAIN \
|
||||
twofish
|
||||
PKG_LICENSE_FILES:=copyright
|
||||
|
||||
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/libks
|
||||
SUBMENU:=Telephony
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Foundational support for SignalWire C products
|
||||
URL:=https://github.com/signalwire/libks
|
||||
ABI_VERSION:=2
|
||||
DEPENDS:=+libatomic +libopenssl +libuuid
|
||||
endef
|
||||
|
||||
# Otherwise OpenWrt's CPPFLAGS are ignored
|
||||
TARGET_CFLAGS += $(TARGET_CPPFLAGS)
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/libks2/libks/cmake
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libks2/libks/*.h \
|
||||
$(1)/usr/include/libks2/libks
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libks2/libks/cmake/* \
|
||||
$(1)/usr/include/libks2/libks/cmake
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libks2.so* $(1)/usr/lib
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libks2.pc \
|
||||
$(1)/usr/lib/pkgconfig
|
||||
endef
|
||||
|
||||
define Package/libks/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libks2.so.$(ABI_VERSION)* $(1)/usr/lib
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libks))
|
|
@ -1,15 +0,0 @@
|
|||
--- a/cmake/FindLibM.cmake
|
||||
+++ b/cmake/FindLibM.cmake
|
||||
@@ -8,11 +8,7 @@
|
||||
# A user may set ``LIBM_ROOT`` to a math library installation root to tell this
|
||||
# module where to look.
|
||||
|
||||
-find_path(LIBM_INCLUDE_DIRS
|
||||
- NAMES math.h
|
||||
- PATHS /usr/include /usr/local/include /usr/local/bic/include
|
||||
- NO_DEFAULT_PATH
|
||||
-)
|
||||
+find_path(LIBM_INCLUDE_DIRS math.h)
|
||||
find_library(LIBM_LIBRARIES m)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LibM DEFAULT_MSG LIBM_LIBRARIES LIBM_INCLUDE_DIRS)
|
|
@ -1,11 +0,0 @@
|
|||
--- a/src/include/libks/ks_platform.h
|
||||
+++ b/src/include/libks/ks_platform.h
|
||||
@@ -93,7 +93,7 @@ KS_BEGIN_EXTERN_C
|
||||
#include <sys/time.h>
|
||||
#include <sys/select.h>
|
||||
#include <netinet/tcp.h>
|
||||
-#include <sys/signal.h>
|
||||
+#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <strings.h>
|
||||
#include <stdint.h>
|
|
@ -1,24 +0,0 @@
|
|||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -11,6 +11,10 @@ option(WITH_LIBBACKTRACE "Enables linkin
|
||||
# Must include cotire before anything else for auto pch setup
|
||||
#include(cmake/cotire.cmake)
|
||||
|
||||
+# Declare our project, libks2
|
||||
+project(LibKS2 VERSION 2.0.2 LANGUAGES C CXX)
|
||||
+message("LibKS2 Version ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
||||
+
|
||||
# Load our common utility api and setup the platfomrm and build
|
||||
include(cmake/ksutil.cmake)
|
||||
ksutil_setup_platform()
|
||||
@@ -39,10 +43,6 @@ if (KS_PLAT_WIN OR WITH_KS_TEST)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-# Declare our project, libks2
|
||||
-project(LibKS2 VERSION 2.0.2 LANGUAGES C CXX)
|
||||
-message("LibKS2 Version ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
||||
-
|
||||
# Set package version
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
|
|
@ -1,10 +0,0 @@
|
|||
--- a/cmake/ksutil.cmake
|
||||
+++ b/cmake/ksutil.cmake
|
||||
@@ -135,7 +135,6 @@ macro(ksutil_setup_platform)
|
||||
set(KS_PLAT_LIN 1 CACHE INTERNAL "Platform definition" FORCE)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE YES)
|
||||
|
||||
- add_compile_options("$<$<CONFIG:Release>:-O2>")
|
||||
add_compile_options("$<$<CONFIG:Release>:-g>")
|
||||
|
||||
add_compile_options("$<$<CONFIG:Debug>:-O0>")
|
|
@ -8,12 +8,12 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libosip2
|
||||
PKG_VERSION:=5.3.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=5.0.0
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@GNU/osip
|
||||
PKG_HASH:=f4725916c22cf514969efb15c3c207233d64739383f7d42956038b78f6cae8c8
|
||||
PKG_HASH:=18a13c954f7297978e7bf1a0cdadde7c531e519d61a045dae304e054f3b2df03
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_INSTALL:=1
|
||||
|
@ -30,7 +30,6 @@ define Package/libosip2
|
|||
CATEGORY:=Libraries
|
||||
TITLE:=GNU oSIP library
|
||||
URL:=http://www.gnu.org/software/osip/
|
||||
ABI_VERSION:=15
|
||||
DEPENDS:=+librt
|
||||
endef
|
||||
|
||||
|
@ -44,16 +43,17 @@ TARGET_CFLAGS += $(if $(CONFIG_arc),-U__arc__)
|
|||
CONFIGURE_ARGS += \
|
||||
--enable-shared \
|
||||
--enable-static \
|
||||
--disable-silent-rules \
|
||||
--disable-debug \
|
||||
--disable-trace \
|
||||
--disable-mpatrol \
|
||||
--disable-gprof \
|
||||
--disable-mt \
|
||||
--enable-pthread \
|
||||
--enable-semaphore \
|
||||
--disable-sysv \
|
||||
--disable-gperf \
|
||||
--disable-test \
|
||||
--disable-minisize
|
||||
--disable-minisize
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
|
@ -68,7 +68,7 @@ endef
|
|||
|
||||
define Package/libosip2/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libosip{,parser}2.so.$(ABI_VERSION)* $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libosip{,parser}2.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libosip2))
|
||||
|
|
31
libs/libosip2/patches/01-CVE-2017-7853.patch
Normal file
31
libs/libosip2/patches/01-CVE-2017-7853.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
From 1ae06daf3b2375c34af23083394a6f010be24a45 Mon Sep 17 00:00:00 2001
|
||||
From: Aymeric Moizard <amoizard@gmail.com>
|
||||
Date: Tue, 21 Feb 2017 17:16:26 +0100
|
||||
Subject: * fix bug report: sr #109265: SIP message body length underflow in
|
||||
libosip2-4.1.0 https://savannah.gnu.org/support/?109265 also applicable
|
||||
to current latest version
|
||||
|
||||
---
|
||||
src/osipparser2/osip_message_parse.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/osipparser2/osip_message_parse.c b/src/osipparser2/osip_message_parse.c
|
||||
index 1628c60..aa35446 100644
|
||||
--- a/src/osipparser2/osip_message_parse.c
|
||||
+++ b/src/osipparser2/osip_message_parse.c
|
||||
@@ -784,6 +784,12 @@ msg_osip_body_parse (osip_message_t * sip, const char *start_of_buf, const char
|
||||
if ('\n' == start_of_body[0] || '\r' == start_of_body[0])
|
||||
start_of_body++;
|
||||
|
||||
+ /* if message body is empty or contains a single CR/LF */
|
||||
+ if (end_of_body <= start_of_body) {
|
||||
+ osip_free (sep_boundary);
|
||||
+ return OSIP_SYNTAXERROR;
|
||||
+ }
|
||||
+
|
||||
body_len = end_of_body - start_of_body;
|
||||
|
||||
/* Skip CR before end boundary. */
|
||||
--
|
||||
cgit v1.0-41-gc330
|
||||
|
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=libpri
|
||||
PKG_VERSION:=1.6.0
|
||||
PKG_RELEASE:=4
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/libpri/releases
|
||||
|
@ -35,10 +35,6 @@ define Package/libpri/description
|
|||
Lucent 5E Custom protocols on switches from Nortel and Lucent.
|
||||
endef
|
||||
|
||||
MAKE_FLAGS += \
|
||||
OSARCH=Linux \
|
||||
LDCONFIG=ldconfig
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
--- a/pritest.c
|
||||
+++ b/pritest.c
|
||||
Index: libpri-1.4.15/pritest.c
|
||||
===================================================================
|
||||
--- libpri-1.4.15.orig/pritest.c
|
||||
+++ libpri-1.4.15/pritest.c
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -9,8 +11,10 @@
|
|||
#include <sys/select.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/resource.h>
|
||||
--- a/testprilib.c
|
||||
+++ b/testprilib.c
|
||||
Index: libpri-1.4.15/testprilib.c
|
||||
===================================================================
|
||||
--- libpri-1.4.15.orig/testprilib.c
|
||||
+++ libpri-1.4.15/testprilib.c
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -68,7 +68,7 @@ DYNAMIC_OBJS= \
|
||||
$(STATIC_OBJS)
|
||||
CFLAGS ?= -g
|
||||
CFLAGS += $(CPPFLAGS)
|
||||
-CFLAGS += -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes
|
||||
+CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes
|
||||
CFLAGS += -fPIC $(ALERTING) $(LIBPRI_OPT) $(COVERAGE_CFLAGS)
|
||||
INSTALL_PREFIX=$(DESTDIR)
|
||||
INSTALL_BASE=/usr
|
|
@ -1,39 +0,0 @@
|
|||
Upstream issue: https://issues.asterisk.org/jira/browse/PRI-188
|
||||
|
||||
From ec1d6589c6e4eb6550cb92d5e0f214f7b31e8d5f Mon Sep 17 00:00:00 2001
|
||||
From: "Sergey V. Lobanov" <sergey@lobanov.in>
|
||||
Date: Sun, 30 Jan 2022 13:25:17 +0300
|
||||
Subject: [PATCH] Add an ability to build libpri on MacOS for Linux target
|
||||
|
||||
This patch allows to rededine ar and ranlib tool using AR and
|
||||
RANLIB make flags.
|
||||
|
||||
Fixes: PRI-188
|
||||
|
||||
Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
|
||||
---
|
||||
Makefile | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -27,6 +27,8 @@
|
||||
CC=gcc
|
||||
GREP=grep
|
||||
AWK=awk
|
||||
+AR=ar
|
||||
+RANLIB=ranlib
|
||||
|
||||
OSARCH=$(shell uname -s)
|
||||
PROC?=$(shell uname -m)
|
||||
@@ -193,8 +195,8 @@ MAKE_DEPS= -MD -MT $@ -MF .$(subst /,_,$
|
||||
$(CC) $(CFLAGS) $(MAKE_DEPS) -c -o $@ $<
|
||||
|
||||
$(STATIC_LIBRARY): $(STATIC_OBJS)
|
||||
- ar rcs $(STATIC_LIBRARY) $(STATIC_OBJS)
|
||||
- ranlib $(STATIC_LIBRARY)
|
||||
+ $(AR) rcs $(STATIC_LIBRARY) $(STATIC_OBJS)
|
||||
+ $(RANLIB) $(STATIC_LIBRARY)
|
||||
|
||||
$(DYNAMIC_LIBRARY): $(DYNAMIC_OBJS)
|
||||
$(CC) $(SOFLAGS) -o $@ $(DYNAMIC_OBJS)
|
|
@ -1,6 +1,7 @@
|
|||
#
|
||||
# Copyright (C) 2017 OpenWrt.org
|
||||
# Copyright (C) 2017 Jiri Slachta <jiri@slachta.eu>
|
||||
# Copyright (C) 2006-2018 OpenWrt.org
|
||||
# Copyright (C) 2011 Victor Seva <linuxmaniac@torreviejawireless.org>
|
||||
# Copyright (C) 2017 - 2018 Jiri Slachta <jiri@slachta.eu>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
|
@ -8,12 +9,17 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libsrtp
|
||||
PKG_VERSION:=2.4.2
|
||||
PKG_VERSION:=1.6.0
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=libsrtp-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/cisco/libsrtp/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=3b1bcb14ebda572b04b9bdf07574a449c84cb924905414e4d94e62837d22b628
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/cisco/libsrtp.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=2b091a4fb21c9b06fc5d4b5763bdaec97542fcd7
|
||||
PKG_MIRROR_HASH:=7ac6c3113fd7a966c9a9108c185d9425e75a8fdc600e4ccef158e68ee1988c89
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
@ -21,42 +27,45 @@ PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
|
|||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
CONFIGURE_ARGS+=--enable-openssl
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-stdout \
|
||||
--enable-syslog
|
||||
|
||||
define Package/libsrtp2
|
||||
define Package/libsrtp
|
||||
SUBMENU:=Telephony
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Secure RTP (SRTP) library, v$(PKG_VERSION)
|
||||
URL:=https://github.com/cisco/libsrtp
|
||||
DEPENDS:=+libopenssl
|
||||
ABI_VERSION:=1
|
||||
TITLE:=Secure Real-time Transport Protocol (SRTP) library
|
||||
DEPENDS:=+libpcap
|
||||
URL:=http://sourceforge.net/projects/srtp
|
||||
endef
|
||||
|
||||
define Package/libsrtp2/description
|
||||
Open-source implementation of the Secure Real-time Transport
|
||||
Protocol (SRTP) originally authored by Cisco Systems, Inc.
|
||||
It is available under a BSD-style license.
|
||||
define Package/libsrtp/description
|
||||
Open-source implementation of the Secure Real-time Transport
|
||||
Protocol (SRTP) originally authored by Cisco Systems, Inc.
|
||||
It is available under a BSD-style license.
|
||||
endef
|
||||
|
||||
define Build/Install
|
||||
$(call Build/Install/Default,all shared_library install)
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR=$(PKG_INSTALL_DIR) uninstall
|
||||
$(call Build/Install/Default)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/srtp2 $(1)/usr/include/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/srtp $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsrtp2.{a,so*} $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsrtp.{a,so*} $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsrtp2.pc $(1)/usr/lib/pkgconfig/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsrtp.pc $(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/libsrtp2/install
|
||||
|
||||
define Package/libsrtp/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/libsrtp2.so.$(ABI_VERSION)* \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/libsrtp.so* \
|
||||
$(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libsrtp2))
|
||||
$(eval $(call BuildPackage,libsrtp))
|
||||
|
|
54
libs/libsrtp/patches/1003_fix_mips_namespace_collision.patch
Normal file
54
libs/libsrtp/patches/1003_fix_mips_namespace_collision.patch
Normal file
|
@ -0,0 +1,54 @@
|
|||
--- a/test/srtp_driver.c
|
||||
+++ b/test/srtp_driver.c
|
||||
@@ -341,7 +341,7 @@ main (int argc, char *argv[]) {
|
||||
if (do_codec_timing) {
|
||||
srtp_policy_t policy;
|
||||
int ignore;
|
||||
- double mips = mips_estimate(1000000000, &ignore);
|
||||
+ double mips_est = mips_estimate(1000000000, &ignore);
|
||||
|
||||
crypto_policy_set_rtp_default(&policy.rtp);
|
||||
crypto_policy_set_rtcp_default(&policy.rtcp);
|
||||
@@ -353,33 +353,33 @@ main (int argc, char *argv[]) {
|
||||
policy.allow_repeat_tx = 0;
|
||||
policy.next = NULL;
|
||||
|
||||
- printf("mips estimate: %e\n", mips);
|
||||
+ printf("mips estimate: %e\n", mips_est);
|
||||
|
||||
printf("testing srtp processing time for voice codecs:\n");
|
||||
printf("codec\t\tlength (octets)\t\tsrtp instructions/second\n");
|
||||
printf("G.711\t\t%d\t\t\t%e\n", 80,
|
||||
- (double) mips * (80 * 8) /
|
||||
+ (double) mips_est * (80 * 8) /
|
||||
srtp_bits_per_second(80, &policy) / .01 );
|
||||
printf("G.711\t\t%d\t\t\t%e\n", 160,
|
||||
- (double) mips * (160 * 8) /
|
||||
+ (double) mips_est * (160 * 8) /
|
||||
srtp_bits_per_second(160, &policy) / .02);
|
||||
printf("G.726-32\t%d\t\t\t%e\n", 40,
|
||||
- (double) mips * (40 * 8) /
|
||||
+ (double) mips_est * (40 * 8) /
|
||||
srtp_bits_per_second(40, &policy) / .01 );
|
||||
printf("G.726-32\t%d\t\t\t%e\n", 80,
|
||||
- (double) mips * (80 * 8) /
|
||||
+ (double) mips_est * (80 * 8) /
|
||||
srtp_bits_per_second(80, &policy) / .02);
|
||||
printf("G.729\t\t%d\t\t\t%e\n", 10,
|
||||
- (double) mips * (10 * 8) /
|
||||
+ (double) mips_est * (10 * 8) /
|
||||
srtp_bits_per_second(10, &policy) / .01 );
|
||||
printf("G.729\t\t%d\t\t\t%e\n", 20,
|
||||
- (double) mips * (20 * 8) /
|
||||
+ (double) mips_est * (20 * 8) /
|
||||
srtp_bits_per_second(20, &policy) / .02 );
|
||||
printf("Wideband\t%d\t\t\t%e\n", 320,
|
||||
- (double) mips * (320 * 8) /
|
||||
+ (double) mips_est * (320 * 8) /
|
||||
srtp_bits_per_second(320, &policy) / .01 );
|
||||
printf("Wideband\t%d\t\t\t%e\n", 640,
|
||||
- (double) mips * (640 * 8) /
|
||||
+ (double) mips_est * (640 * 8) /
|
||||
srtp_bits_per_second(640, &policy) / .02 );
|
||||
}
|
||||
|
27
libs/libsrtp/patches/1005_fix_data_alignment.patch
Normal file
27
libs/libsrtp/patches/1005_fix_data_alignment.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
--- a/test/srtp_driver.c
|
||||
+++ b/test/srtp_driver.c
|
||||
@@ -1198,7 +1198,6 @@ mips_estimate(int num_trials, int *ignor
|
||||
* These packets were made with the default SRTP policy.
|
||||
*/
|
||||
|
||||
-
|
||||
err_status_t
|
||||
srtp_validate() {
|
||||
uint8_t srtp_plaintext_ref[28] = {
|
||||
@@ -1207,14 +1206,14 @@ srtp_validate() {
|
||||
0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab,
|
||||
0xab, 0xab, 0xab, 0xab
|
||||
};
|
||||
- uint8_t srtp_plaintext[38] = {
|
||||
+ uint8_t srtp_plaintext[38] __attribute__((aligned(4))) = {
|
||||
0x80, 0x0f, 0x12, 0x34, 0xde, 0xca, 0xfb, 0xad,
|
||||
0xca, 0xfe, 0xba, 0xbe, 0xab, 0xab, 0xab, 0xab,
|
||||
0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab,
|
||||
0xab, 0xab, 0xab, 0xab, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
- uint8_t srtp_ciphertext[38] = {
|
||||
+ uint8_t srtp_ciphertext[38] __attribute__((aligned(4))) = {
|
||||
0x80, 0x0f, 0x12, 0x34, 0xde, 0xca, 0xfb, 0xad,
|
||||
0xca, 0xfe, 0xba, 0xbe, 0x4e, 0x55, 0xdc, 0x4c,
|
||||
0xe7, 0x99, 0x78, 0xd8, 0x8c, 0xa4, 0xd2, 0x15,
|
94
libs/libsrtp/patches/1007_update_Doxyfile.patch
Normal file
94
libs/libsrtp/patches/1007_update_Doxyfile.patch
Normal file
|
@ -0,0 +1,94 @@
|
|||
Description: Update Doxyfile and header template
|
||||
Author: Jonas Smedegaard <dr@jones.dk>
|
||||
Last-Update: 2010-02-28
|
||||
--- a/doc/Makefile.in
|
||||
+++ b/doc/Makefile.in
|
||||
@@ -25,6 +25,7 @@ libsrtpdoc:
|
||||
echo "*** Sorry, can't build doc outside source dir"; exit 1; \
|
||||
fi
|
||||
sed 's/LIBSRTPVERSION/$(version)/' header.template > header.tex
|
||||
+ doxygen -u
|
||||
doxygen
|
||||
sed 's/\subsection/\section/' latex/index.tex > latex/index.tmp
|
||||
mv latex/index.tmp latex/index.tex
|
||||
@@ -38,7 +39,7 @@ cryptodoc: clean
|
||||
cp latex/refman.pdf crypto.pdf
|
||||
|
||||
clean:
|
||||
- rm -rf latex/ header.tex
|
||||
+ rm -rf latex/ header.tex Doxyfile.bak
|
||||
for a in * ; do \
|
||||
if [ -f "$$a~" ] ; then rm -f $$a~; fi; \
|
||||
done;
|
||||
--- a/doc/header.template
|
||||
+++ b/doc/header.template
|
||||
@@ -6,28 +6,40 @@
|
||||
%
|
||||
\documentclass[letterpaper]{book}
|
||||
\usepackage{makeidx}
|
||||
-\usepackage{fancyhdr}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{multicol}
|
||||
\usepackage{float}
|
||||
+\usepackage{listings}
|
||||
+\usepackage{color}
|
||||
+\usepackage{ifthen}
|
||||
+\usepackage[table]{xcolor}
|
||||
\usepackage{textcomp}
|
||||
\usepackage{alltt}
|
||||
-\usepackage{times}
|
||||
-\usepackage{graphicx}
|
||||
-\ifx\pdfoutput\undefined
|
||||
-\usepackage[ps2pdf,
|
||||
+\usepackage{ifpdf}
|
||||
+\ifpdf
|
||||
+\usepackage[pdftex,
|
||||
pagebackref=true,
|
||||
colorlinks=true,
|
||||
- linkcolor=blue
|
||||
+ linkcolor=blue,
|
||||
+ unicode
|
||||
]{hyperref}
|
||||
\else
|
||||
-\usepackage[pdftex,
|
||||
+\usepackage[ps2pdf,
|
||||
pagebackref=true,
|
||||
colorlinks=true,
|
||||
- linkcolor=blue
|
||||
+ linkcolor=blue,
|
||||
+ unicode
|
||||
]{hyperref}
|
||||
+\usepackage{pspicture}
|
||||
\fi
|
||||
+\usepackage[utf8]{inputenc}
|
||||
+\usepackage{mathptmx}
|
||||
+\usepackage[scaled=.90]{helvet}
|
||||
+\usepackage{courier}
|
||||
+\usepackage{sectsty}
|
||||
+\usepackage[titles]{tocloft}
|
||||
\usepackage{doxygen}
|
||||
+\lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=3,numbers=left }
|
||||
\makeindex
|
||||
\setcounter{tocdepth}{1}
|
||||
\renewcommand{\footrulewidth}{0.4pt}
|
||||
@@ -59,7 +71,9 @@
|
||||
\selectfont
|
||||
|
||||
|
||||
+\renewcommand{\familydefault}{\sfdefault}
|
||||
\begin{document}
|
||||
+\hypersetup{pageanchor=false}
|
||||
\begin{titlepage}
|
||||
\vspace*{4cm}
|
||||
%\begin{center}
|
||||
@@ -107,9 +121,6 @@ This reference material in this documena
|
||||
\clearemptydoublepage
|
||||
\pagenumbering{roman}
|
||||
\tableofcontents
|
||||
-%\clearemptydoublepage
|
||||
-
|
||||
\clearemptydoublepage
|
||||
\pagenumbering{arabic}
|
||||
-
|
||||
-
|
||||
+\hypersetup{pageanchor=true}
|
11
libs/libsrtp/patches/1008_shared-lib.patch
Normal file
11
libs/libsrtp/patches/1008_shared-lib.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -20,7 +20,7 @@ HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@
|
||||
|
||||
.PHONY: all shared_library test build_table_apps
|
||||
|
||||
-all: test
|
||||
+all: shared_library test
|
||||
|
||||
runtest: build_table_apps test
|
||||
@echo "running libsrtp test applications..."
|
64
libs/libsrtp2/Makefile
Normal file
64
libs/libsrtp2/Makefile
Normal file
|
@ -0,0 +1,64 @@
|
|||
#
|
||||
# Copyright (C) 2017 OpenWrt.org
|
||||
# Copyright (C) 2017 Jiri Slachta <jiri@slachta.eu>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libsrtp2
|
||||
PKG_VERSION:=2.1.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/cisco/libsrtp.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=93aba3e767502343c255fad8962dbf0ff29c4ca6
|
||||
PKG_MIRROR_HASH:=e060592d99e0dff53ee6fbc5e8a9cb0f7fb8b1b874d4687292fb8c8e5f612a6b
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libsrtp2
|
||||
SUBMENU:=Telephony
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Secure RTP (SRTP) library, v$(PKG_VERSION)
|
||||
URL:=http://sourceforge.net/projects/srtp
|
||||
DEPENDS:=+libpcap
|
||||
endef
|
||||
|
||||
define Package/libsrtp2/description
|
||||
Open-source implementation of the Secure Real-time Transport
|
||||
Protocol (SRTP) originally authored by Cisco Systems, Inc.
|
||||
It is available under a BSD-style license.
|
||||
endef
|
||||
|
||||
define Build/Install
|
||||
$(call Build/Install/Default,all shared_library install)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/srtp2 $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsrtp2.{a,so*} $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsrtp2.pc $(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/libsrtp2/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/libsrtp2.so* \
|
||||
$(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libsrtp2))
|
|
@ -10,16 +10,14 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=pjproject
|
||||
PKG_VERSION:=2.13.1
|
||||
PKG_VERSION:=2.7.2
|
||||
PKG_RELEASE:=2
|
||||
PKG_CPE_ID:=cpe:/a:pjsip:pjsip
|
||||
|
||||
# download "vX.Y.tar.gz" as "pjproject-vX.Y.tar.gz"
|
||||
PKG_SOURCE_URL_FILE:=$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_URL_FILE)
|
||||
PKG_SOURCE_URL:=https://github.com/pjsip/$(PKG_NAME)/archive/refs/tags
|
||||
PKG_HASH:=32a5ab5bfbb9752cb6a46627e4c410e61939c8dbbd833ac858473cfbd9fb9d7d
|
||||
PKG_SOURCE:=pjproject-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=http://www.pjsip.org/release/$(PKG_VERSION)
|
||||
PKG_HASH:=9c2c828abab7626edf18e04b041ef274bfaa86f99adf2c25ff56f1509e813772
|
||||
PKG_INSTALL:=1
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
@ -29,14 +27,15 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
|||
|
||||
PKG_CONFIG_DEPENDS:=CONFIG_SOFT_FLOAT
|
||||
|
||||
include $(INCLUDE_DIR)/uclibc++.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/pjproject/Default
|
||||
SECTION:=lib
|
||||
CATEGORY:=Libraries
|
||||
SUBMENU:=Telephony
|
||||
URL:=https://www.pjsip.org
|
||||
DEPENDS:=+libstdcpp +libopenssl +libuuid +libpthread
|
||||
URL:=http://www.pjsip.org
|
||||
DEPENDS:=$(CXX_DEPENDS) +libopenssl +libuuid +libpthread
|
||||
endef
|
||||
|
||||
define Package/pjproject/install/lib
|
||||
|
@ -60,9 +59,7 @@ endef
|
|||
|
||||
CONFIGURE_ARGS+= \
|
||||
$(if $(CONFIG_SOFT_FLOAT),--disable-floating-point) \
|
||||
--disable-android-mediacodec \
|
||||
--disable-bcg729 \
|
||||
--disable-darwin-ssl \
|
||||
--disable-ext-sound \
|
||||
--disable-ffmpeg \
|
||||
--disable-g711-codec \
|
||||
|
@ -72,22 +69,22 @@ CONFIGURE_ARGS+= \
|
|||
--disable-ilbc-codec \
|
||||
--disable-ipp \
|
||||
--disable-l16-codec \
|
||||
--disable-libsrtp \
|
||||
--disable-libwebrtc \
|
||||
--disable-libyuv \
|
||||
--disable-opencore-amr \
|
||||
--disable-openh264 \
|
||||
--disable-opus \
|
||||
--disable-oss \
|
||||
--disable-resample \
|
||||
--disable-sdl \
|
||||
--disable-silk \
|
||||
--disable-sound \
|
||||
--disable-speex-aec \
|
||||
--disable-speex-codec \
|
||||
--disable-upnp \
|
||||
--disable-v4l2 \
|
||||
--disable-video \
|
||||
--enable-shared \
|
||||
--with-external-srtp="$(STAGING_DIR)/usr" \
|
||||
--with-ssl="$(STAGING_DIR)/usr" \
|
||||
--without-external-gsm \
|
||||
--without-external-pa \
|
||||
|
@ -96,8 +93,7 @@ CONFIGURE_ARGS+= \
|
|||
TARGET_CFLAGS+=$(TARGET_CPPFLAGS)
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) EXCLUDE_APP=1 dep
|
||||
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) EXCLUDE_APP=1
|
||||
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)
|
||||
endef
|
||||
|
||||
PJPROJECT_LIBS:= \
|
||||
|
@ -112,16 +108,16 @@ define Build/InstallDev
|
|||
$(foreach m,$(PJPROJECT_LIBS),$(CP) $(PKG_INSTALL_DIR)/usr/lib/$(m)* $(1)/usr/lib;)
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpjproject.pc \
|
||||
$(1)/usr/lib/pkgconfig
|
||||
$(SED) 's|$(TARGET_CFLAGS)||g' $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpjproject.pc
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpjproject.pc $(1)/usr/lib/pkgconfig
|
||||
endef
|
||||
|
||||
$(eval $(call PJSIPpackage,libpj,libpj,+librt))
|
||||
$(eval $(call PJSIPpackage,libpjlib-util,libpjlib-util,+libpj +librt))
|
||||
$(eval $(call PJSIPpackage,libpjmedia,libpjmedia*,+libpj +libpjlib-util +libpjnath +librt))
|
||||
$(eval $(call PJSIPpackage,libpjmedia,libpjmedia*,+libpj +libpjlib-util +libpjnath +librt +libsrtp2))
|
||||
$(eval $(call PJSIPpackage,libpjnath,libpjnath,+libpj +libpjlib-util +librt))
|
||||
$(eval $(call PJSIPpackage,libpjsip-simple,libpjsip-simple,+libpj +libpjlib-util +libpjsip +librt))
|
||||
$(eval $(call PJSIPpackage,libpjsip-ua,libpjsip-ua,+libpj +libpjlib-util +libpjmedia +libpjsip-simple +libpjsip +librt))
|
||||
$(eval $(call PJSIPpackage,libpjsip,libpjsip,+libpj +libpjlib-util +librt))
|
||||
$(eval $(call PJSIPpackage,libpjsip,libpjsip,+libpj +libpjlib-util +librt +libsrtp2))
|
||||
$(eval $(call PJSIPpackage,libpjsua,libpjsua,+libpj +libpjlib-util +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsip +librt))
|
||||
$(eval $(call PJSIPpackage,libpjsua2,libpjsua2,+libpj +libpjlib-util +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsip +librt +libpjsua))
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
--- a/libpjproject.pc.in
|
||||
+++ b/libpjproject.pc.in
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
prefix=@PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
-libdir=@LIBDIR@
|
||||
-includedir=@INCLUDEDIR@
|
||||
+libdir=${exec_prefix}/lib
|
||||
+includedir=${prefix}/include
|
||||
|
||||
Name: libpjproject
|
||||
Description: Multimedia communication library
|
||||
--- a/build.mak.in
|
||||
+++ b/build.mak.in
|
||||
@@ -352,6 +352,6 @@ export PJ_LIBXX_FILES := $(APP_LIBXX_FIL
|
||||
export PJ_INSTALL_DIR := @prefix@
|
||||
export PJ_INSTALL_INC_DIR := @includedir@
|
||||
export PJ_INSTALL_LIB_DIR := @libdir@
|
||||
-export PJ_INSTALL_CFLAGS := -I$(PJ_INSTALL_INC_DIR) -DPJ_AUTOCONF=1 @ac_cflags@
|
||||
+export PJ_INSTALL_CFLAGS := -DPJ_AUTOCONF=1 @ac_cflags@
|
||||
export PJ_INSTALL_LDFLAGS_PRIVATE := $(APP_THIRD_PARTY_LIBS) $(APP_THIRD_PARTY_EXT) @LIBS@
|
||||
-export PJ_INSTALL_LDFLAGS := -L$(PJ_INSTALL_LIB_DIR) $(filter-out $(PJ_INSTALL_LDFLAGS_PRIVATE),$(APP_LDXXLIBS))
|
||||
+export PJ_INSTALL_LDFLAGS := $(filter-out $(PJ_INSTALL_LDFLAGS_PRIVATE),$(APP_LDXXLIBS))
|
|
@ -1,27 +0,0 @@
|
|||
From ac685b30c17be461b2bf5b46a772ed9742b8e985 Mon Sep 17 00:00:00 2001
|
||||
From: Riza Sulistyo <trengginas@users.noreply.github.com>
|
||||
Date: Thu, 9 Feb 2023 13:19:23 +0700
|
||||
Subject: [PATCH] Make sure that NOTIFY tdata is set before sending it.
|
||||
|
||||
---
|
||||
pjsip/src/pjsip-simple/evsub.c | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/pjsip/src/pjsip-simple/evsub.c
|
||||
+++ b/pjsip/src/pjsip-simple/evsub.c
|
||||
@@ -2224,9 +2224,12 @@ static void on_tsx_state_uas( pjsip_evsu
|
||||
/* Send the pending NOTIFY sent by app from inside
|
||||
* on_rx_refresh() callback.
|
||||
*/
|
||||
- pj_assert(sub->pending_notify);
|
||||
- status = pjsip_evsub_send_request(sub, sub->pending_notify);
|
||||
- sub->pending_notify = NULL;
|
||||
+ //pj_assert(sub->pending_notify);
|
||||
+ /* Make sure that pending_notify is set. */
|
||||
+ if (sub->pending_notify) {
|
||||
+ status = pjsip_evsub_send_request(sub, sub->pending_notify);
|
||||
+ sub->pending_notify = NULL;
|
||||
+ }
|
||||
|
||||
} else if (pjsip_method_cmp(&tsx->method, &pjsip_notify_method)==0) {
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
--- a/pjsip/src/pjsip/sip_transport.c
|
||||
+++ b/pjsip/src/pjsip/sip_transport.c
|
||||
@@ -2088,15 +2088,17 @@ PJ_DEF(pj_ssize_t) pjsip_tpmgr_receive_p
|
||||
* which were sent to keep NAT bindings.
|
||||
*/
|
||||
if (tmp.slen) {
|
||||
- PJ_LOG(1, (THIS_FILE,
|
||||
- "Error processing %d bytes packet from %s %s:%d %.*s:\n"
|
||||
- "%.*s\n"
|
||||
- "-- end of packet.",
|
||||
+ PJ_LOG(2, (THIS_FILE,
|
||||
+ "Dropping %d bytes packet from %s %s:%d %.*s\n",
|
||||
msg_fragment_size,
|
||||
rdata->tp_info.transport->type_name,
|
||||
- rdata->pkt_info.src_name,
|
||||
+ rdata->pkt_info.src_name,
|
||||
rdata->pkt_info.src_port,
|
||||
- (int)tmp.slen, tmp.ptr,
|
||||
+ (int)tmp.slen, tmp.ptr));
|
||||
+ PJ_LOG(4, (THIS_FILE,
|
||||
+ "Dropped packet:"
|
||||
+ "%.*s\n"
|
||||
+ "-- end of packet.",
|
||||
(int)msg_fragment_size,
|
||||
rdata->msg_info.msg_buf));
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
--- a/build/rules.mak
|
||||
+++ b/build/rules.mak
|
||||
@@ -13,7 +13,7 @@ SHLIB = $($(APP)_SHLIB)
|
||||
SONAME = $($(APP)_SONAME)
|
||||
|
||||
ifeq ($(SHLIB_SUFFIX),so)
|
||||
-SHLIB_OPT := -shared -Wl,-soname,$(SHLIB)
|
||||
+SHLIB_OPT := -shared
|
||||
else ifeq ($(SHLIB_SUFFIX),dylib)
|
||||
SHLIB_OPT := -dynamiclib -undefined dynamic_lookup -flat_namespace
|
||||
else ifeq ($(SHLIB_SUFFIX),dll)
|
20
libs/pjproject/patches/120-non-gnu-pthreads.patch
Normal file
20
libs/pjproject/patches/120-non-gnu-pthreads.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- pjproject-2.6/pjlib/src/pj/os_core_unix.c 2016-04-13 08:24:48.000000000 +0200
|
||||
+++ pjproject-new/pjlib/src/pj/os_core_unix.c 2017-05-08 09:51:49.980905420 +0200
|
||||
@@ -1123,7 +1123,7 @@ static pj_status_t init_mutex(pj_mutex_t
|
||||
return PJ_RETURN_OS_ERROR(rc);
|
||||
|
||||
if (type == PJ_MUTEX_SIMPLE) {
|
||||
-#if (defined(PJ_LINUX) && PJ_LINUX!=0) || \
|
||||
+#if (defined(PJ_LINUX) && PJ_LINUX!=0 && defined(__GLIBC__)) || \
|
||||
defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE)
|
||||
rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
|
||||
#elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \
|
||||
@@ -1133,7 +1133,7 @@ static pj_status_t init_mutex(pj_mutex_t
|
||||
rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
|
||||
#endif
|
||||
} else {
|
||||
-#if (defined(PJ_LINUX) && PJ_LINUX!=0) || \
|
||||
+#if (defined(PJ_LINUX) && PJ_LINUX!=0 && defined(__GLIBC__)) || \
|
||||
defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE)
|
||||
rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||
#elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \
|
|
@ -1,6 +1,6 @@
|
|||
--- /dev/null
|
||||
+++ b/pjlib/include/pj/config_site.h
|
||||
@@ -0,0 +1,91 @@
|
||||
@@ -0,0 +1,92 @@
|
||||
+/*
|
||||
+ * Asterisk config_site.h
|
||||
+ */
|
||||
|
@ -8,16 +8,37 @@
|
|||
+#include <sys/select.h>
|
||||
+
|
||||
+/*
|
||||
+ * Since both pjproject and asterisk source files will include config_site.h,
|
||||
+ * we need to make sure that only pjproject source files include asterisk_malloc_debug.h.
|
||||
+ */
|
||||
+
|
||||
+/* #if defined(MALLOC_DEBUG) && !defined(_ASTERISK_ASTMM_H)
|
||||
+ * #include "asterisk_malloc_debug.h"
|
||||
+ * #endif
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * Defining PJMEDIA_HAS_SRTP to 0 does NOT disable Asterisk's ability to use srtp.
|
||||
+ * It only disables the pjmedia srtp transport which Asterisk doesn't use.
|
||||
+ * The reason for the disable is that while Asterisk works fine with older libsrtp
|
||||
+ * versions, newer versions of pjproject won't compile with them.
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * This doesn't disable SRTP completely, so we have to keep using the external
|
||||
+ * libsrtp, otherwise pjsip would just build the internal one.
|
||||
+ */
|
||||
+
|
||||
+#define PJMEDIA_HAS_SRTP 0
|
||||
+
|
||||
+/*
|
||||
+ * Defining PJMEDIA_HAS_WEBRTC_AEC to 0 does NOT disable Asterisk's ability to use
|
||||
+ * webrtc. It only disables the pjmedia webrtc transport which Asterisk doesn't use.
|
||||
+ */
|
||||
+#define PJMEDIA_HAS_WEBRTC_AEC 0
|
||||
+
|
||||
+#define PJ_HAS_IPV6 1
|
||||
+#define NDEBUG 1
|
||||
+
|
||||
+#define PJ_MAX_HOSTNAME (256)
|
||||
+#define PJSIP_MAX_URL_SIZE (512)
|
||||
+#ifdef PJ_HAS_LINUX_EPOLL
|
||||
|
@ -58,37 +79,17 @@
|
|||
+ Enabling it will result in SEGFAULTS when URIs containing escape sequences are encountered.
|
||||
+*/
|
||||
+#undef PJSIP_UNESCAPE_IN_PLACE
|
||||
+#define PJSIP_MAX_PKT_LEN 65535
|
||||
+#define PJSIP_MAX_PKT_LEN 6000
|
||||
+
|
||||
+#undef PJ_TODO
|
||||
+#define PJ_TODO(x)
|
||||
+
|
||||
+/* Defaults too low for WebRTC */
|
||||
+#define PJ_ICE_MAX_CAND 64
|
||||
+#define PJ_ICE_MAX_CAND 32
|
||||
+#define PJ_ICE_MAX_CHECKS (PJ_ICE_MAX_CAND * PJ_ICE_MAX_CAND)
|
||||
+
|
||||
+/* Increase limits to allow more formats */
|
||||
+#define PJMEDIA_MAX_SDP_FMT 64
|
||||
+#define PJMEDIA_MAX_SDP_BANDW 4
|
||||
+#define PJMEDIA_MAX_SDP_ATTR (PJMEDIA_MAX_SDP_FMT*3 + 4)
|
||||
+#define PJMEDIA_MAX_SDP_ATTR (PJMEDIA_MAX_SDP_FMT*2 + 4)
|
||||
+#define PJMEDIA_MAX_SDP_MEDIA 16
|
||||
+
|
||||
+/*
|
||||
+ * Turn off the periodic sending of CRLNCRLN. Default is on (90 seconds),
|
||||
+ * which conflicts with the global section's keep_alive_interval option in
|
||||
+ * pjsip.conf.
|
||||
+ */
|
||||
+#define PJSIP_TCP_KEEP_ALIVE_INTERVAL 0
|
||||
+#define PJSIP_TLS_KEEP_ALIVE_INTERVAL 0
|
||||
+
|
||||
+#define PJSIP_TSX_UAS_CONTINUE_ON_TP_ERROR 0
|
||||
+#define PJ_SSL_SOCK_OSSL_USE_THREAD_CB 0
|
||||
+#define PJSIP_AUTH_ALLOW_MULTIPLE_AUTH_HEADER 1
|
||||
+
|
||||
+/*
|
||||
+ * The default is 32 with 8 being used by pjproject itself.
|
||||
+ * Since this value is used in invites, dialogs, transports
|
||||
+ * and subscriptions as well as the global pjproject endpoint,
|
||||
+ * we don't want to increase it too much.
|
||||
+ */
|
||||
+#define PJSIP_MAX_MODULE 38
|
22
libs/pjproject/patches/160-remove-hardcoded-lstdc++.patch
Normal file
22
libs/pjproject/patches/160-remove-hardcoded-lstdc++.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- a/build.mak.in
|
||||
+++ b/build.mak.in
|
||||
@@ -293,7 +293,6 @@ export APP_LDLIBS := $(PJSUA_LIB_LDLIB)
|
||||
$(PJLIB_LDLIB) \
|
||||
@LIBS@
|
||||
export APP_LDXXLIBS := $(PJSUA2_LIB_LDLIB) \
|
||||
- -lstdc++ \
|
||||
$(APP_LDLIBS)
|
||||
|
||||
# Here are the variabels to use if application is using the library
|
||||
--- a/pjsip/build/Makefile
|
||||
+++ b/pjsip/build/Makefile
|
||||
@@ -152,8 +152,7 @@ export PJSUA2_LIB_LDFLAGS += $(PJSUA_LIB
|
||||
$(PJNATH_LDLIB) \
|
||||
$(PJLIB_UTIL_LDLIB) \
|
||||
$(PJLIB_LDLIB) \
|
||||
- $(_LDFLAGS) \
|
||||
- -lstdc++
|
||||
+ $(_LDFLAGS)
|
||||
|
||||
|
||||
###############################################################################
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (C) 2010-2017 OpenWrt.org
|
||||
# Copyright (C) 2010-2018 OpenWrt.org
|
||||
# Copyright (C) 2010 Alfred E. Heggestad
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
|
@ -9,18 +9,17 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=re
|
||||
PKG_VERSION:=2.0.1
|
||||
PKG_VERSION:=0.5.8
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/baresip/re/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=43aa439b96aff75fe5768b9f9d49dea97042e42e7647df47b345465763e2f7ed
|
||||
PKG_SOURCE_URL:=http://www.creytiv.com/pub
|
||||
PKG_HASH:=190fd652da167d8d6351b7a26fa0aef2ddab75fe5e8d5de77edf023988440e70
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=docs/COPYING
|
||||
PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
@ -31,8 +30,7 @@ define Package/libre
|
|||
CATEGORY:=Libraries
|
||||
DEPENDS:=+libopenssl +zlib
|
||||
TITLE:=Generic library for real-time communications with async IO support
|
||||
URL:=https://github.com/baresip/re
|
||||
ABI_VERSION:=1
|
||||
URL:=http://www.creytiv.com
|
||||
endef
|
||||
|
||||
# re.mk is used for this and all related packages (rem, restund and baresip).
|
||||
|
@ -69,12 +67,12 @@ define Build/InstallDev
|
|||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/re $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.{a,so*} $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.{a,so} $(1)/usr/lib
|
||||
endef
|
||||
|
||||
define Package/libre/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.so.$(ABI_VERSION)* $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.so $(1)/usr/lib
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libre))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/src/dns/res.c
|
||||
+++ b/src/dns/res.c
|
||||
@@ -26,7 +26,7 @@ int get_resolv_dns(char *domain, size_t
|
||||
@@ -25,7 +25,7 @@ int get_resolv_dns(char *domain, size_t
|
||||
uint32_t i;
|
||||
int ret, err;
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
|||
ret = res_init();
|
||||
state = _res;
|
||||
#else
|
||||
@@ -76,7 +76,7 @@ int get_resolv_dns(char *domain, size_t
|
||||
@@ -56,7 +56,7 @@ int get_resolv_dns(char *domain, size_t
|
||||
*n = i;
|
||||
|
||||
out:
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
--- a/mk/re.mk
|
||||
+++ b/mk/re.mk
|
||||
@@ -47,7 +47,6 @@
|
||||
@@ -43,7 +43,6 @@
|
||||
|
||||
ifneq ($(RELEASE),)
|
||||
CFLAGS += -DRELEASE
|
||||
-OPT_SPEED=1
|
||||
endif
|
||||
|
||||
ifneq ($(TRACE_ERR),)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/mk/re.mk
|
||||
+++ b/mk/re.mk
|
||||
@@ -412,11 +412,6 @@ endif
|
||||
@@ -438,11 +438,6 @@ endif
|
||||
|
||||
CFLAGS += -DARCH=\"$(ARCH)\"
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (C) 2010-2017 OpenWrt.org
|
||||
# Copyright (C) 2010-2018 OpenWrt.org
|
||||
# Copyright (C) 2010 Alfred E. Heggestad
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
|
@ -9,18 +9,17 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=rem
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_VERSION:=0.5.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/baresip/rem/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=bcc91bb521fae183357fb422b00a3981477a22e99d3afe165c4ec50a6bbed9da
|
||||
PKG_SOURCE_URL:=http://www.creytiv.com/pub
|
||||
PKG_HASH:=9f98a79947d4709282a5791ac30f0eda03d5d34086f36df74bff4f8aac0e8050
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=docs/COPYING
|
||||
PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
@ -31,7 +30,7 @@ define Package/librem
|
|||
CATEGORY:=Libraries
|
||||
DEPENDS:=+libre
|
||||
TITLE:=Audio and video processing media library
|
||||
URL:=https://github.com/baresip/rem
|
||||
URL:=http://www.creytiv.com
|
||||
endef
|
||||
|
||||
MAKE_FLAGS+= \
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2019 Sebastian Kemper <sebastian_ml@gmx.net>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=signalwire-client-c
|
||||
|
||||
PKG_VERSION:=2.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=signalwire-c-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/signalwire/signalwire-c/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=7916ad76b2c2c75ff616d19bf044894771b3f8602b80a6f74d8ba26206faef79
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/signalwire-c-$(PKG_VERSION)
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=copyright
|
||||
|
||||
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/signalwire-client-c
|
||||
SUBMENU:=Telephony
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=SignalWire C client library
|
||||
URL:=https://github.com/signalwire/signalwire-c
|
||||
ABI_VERSION:=2
|
||||
DEPENDS:=+libatomic +libks +libopenssl
|
||||
endef
|
||||
|
||||
# Otherwise OpenWrt's CPPFLAGS are ignored
|
||||
TARGET_CFLAGS += $(TARGET_CPPFLAGS)
|
||||
|
||||
define Package/signalwire-client-c/install/headers
|
||||
$(INSTALL_DIR) $(1)/usr/include/signalwire-client-c2/signalwire-client-c/$(2)
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_INSTALL_DIR)/usr/include/signalwire-client-c2/signalwire-client-c/$(2)/*.h \
|
||||
$(1)/usr/include/signalwire-client-c2/signalwire-client-c/$(2)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(foreach s,./ JSON blade signalwire transport,$(call Package/signalwire-client-c/install/headers,$(1),$(s));)
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig \
|
||||
$(1)/usr/include/signalwire-client-c2/signalwire-client-c/cmake
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/signalwire-client-c2/signalwire-client-c/cmake/* \
|
||||
$(1)/usr/include/signalwire-client-c2/signalwire-client-c/cmake
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsignalwire_client2.so* $(1)/usr/lib
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/signalwire_client2.pc \
|
||||
$(1)/usr/lib/pkgconfig
|
||||
endef
|
||||
|
||||
define Package/signalwire-client-c/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsignalwire_client2.so.$(ABI_VERSION)* \
|
||||
$(1)/usr/lib
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,signalwire-client-c))
|
|
@ -1,90 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2020 Sebastian Kemper <sebastian_ml@gmx.net>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sofia-sip
|
||||
|
||||
PKG_VERSION:=1.13.17
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/freeswitch/$(PKG_NAME)/tar.gz/v${PKG_VERSION}?
|
||||
PKG_HASH:=daca3d961b6aa2974ad5d3be69ed011726c3e4d511b2a0d4cb6d878821a2de7a
|
||||
|
||||
# sofia-sip adds a version to include path
|
||||
# need to update this when the version changes
|
||||
VERSION_EQUIVALENT:=1.13
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
PKG_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=LGPL-2.1+
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
|
||||
define Package/sofia-sip/Default
|
||||
SUBMENU:=Telephony
|
||||
URL:=http://sofia-sip.sourceforge.net/index.html
|
||||
endef
|
||||
|
||||
define Package/sofia-sip
|
||||
$(call Package/sofia-sip/Default)
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Sofia-SIP open-source SIP User-Agent library
|
||||
ABI_VERSION:=0
|
||||
DEPENDS:= \
|
||||
+libopenssl \
|
||||
+zlib
|
||||
endef
|
||||
|
||||
define Package/sofia-sip/description
|
||||
Sofia-SIP is an open-source SIP User-Agent library, compliant with the
|
||||
IETF RFC3261 specification (see the feature table). It can be used as a
|
||||
building block for SIP client software for uses such as VoIP, IM, and
|
||||
many other real-time and person-to-person communication services. The
|
||||
primary target platform for Sofia-SIP is GNU/Linux. Sofia-SIP is based
|
||||
on a SIP stack developed at the Nokia Research Center. Sofia-SIP is
|
||||
licensed under the LGPL.
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS+= \
|
||||
--disable-stun \
|
||||
--without-doxygen \
|
||||
--without-glib
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/sofia-sip-$(VERSION_EQUIVALENT)/sofia-{sip,resolv} \
|
||||
$(1)/usr/share/sofia-sip
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_INSTALL_DIR)/usr/include/sofia-sip-$(VERSION_EQUIVALENT)/sofia-sip/*.h{,.in} \
|
||||
$(1)/usr/include/sofia-sip-$(VERSION_EQUIVALENT)/sofia-sip
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_INSTALL_DIR)/usr/include/sofia-sip-$(VERSION_EQUIVALENT)/sofia-resolv/*.h \
|
||||
$(1)/usr/include/sofia-sip-$(VERSION_EQUIVALENT)/sofia-resolv
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsofia-sip-ua.{a,so*} $(1)/usr/lib
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sofia-sip-ua.pc \
|
||||
$(1)/usr/lib/pkgconfig
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/sofia-sip/{msg_parser,tag_dll}.awk \
|
||||
$(1)/usr/share/sofia-sip
|
||||
endef
|
||||
|
||||
define Package/sofia-sip/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsofia-sip-ua.so.$(ABI_VERSION)* \
|
||||
$(1)/usr/lib
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,sofia-sip))
|
|
@ -1,11 +0,0 @@
|
|||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -247,7 +247,7 @@ SAC_OPENSSL
|
||||
SAC_TPORT
|
||||
|
||||
dnl Check is used for testing
|
||||
-PKG_CHECK_MODULES(CHECK, check >= 0.9.4, have_check="yes", have_check="no")
|
||||
+PKG_CHECK_MODULES(CHECK, we_do_not_want_check >= 0.9.4, have_check="yes", have_check="no")
|
||||
AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
|
||||
if test x"$have_check" = "xyes"; then
|
||||
AC_DEFINE([HAVE_CHECK], 1, [Define to 1 if check library is available])
|
|
@ -1,74 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2020 Sebastian Kemper <sebastian_ml@gmx.net>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=spandsp3
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/freeswitch/spandsp.git
|
||||
PKG_SOURCE_DATE=2023-06-16
|
||||
PKG_SOURCE_VERSION:=0d2e6ac65e0e8f53d652665a743015a88bf048d4
|
||||
PKG_RELEASE:=1
|
||||
PKG_MIRROR_HASH:=2d25c0f73f15aab37af7f09cf84f379b3fafb7c4d4e867ed1643dd3b3f594920
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_MAINTAINER:= \
|
||||
Jiri Slachta <jiri@slachta.eu> \
|
||||
Sebastian Kemper <sebastian_ml@gmx.net>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libspandsp3
|
||||
SUBMENU:=Telephony
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=spandsp3 library
|
||||
DEPENDS:=+libjpeg-turbo +libtiff
|
||||
URL:=https://github.com/freeswitch/spandsp
|
||||
ABI_VERSION:=3
|
||||
endef
|
||||
|
||||
# Use fixed point math when soft float support is enabled for target devices.
|
||||
ifeq ($(CONFIG_SOFT_FLOAT),y)
|
||||
CONFIGURE_ARGS+= \
|
||||
--enable-fixed-point
|
||||
endif
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) \
|
||||
$(1)/usr/lib/spandsp3/{include/spandsp/private,lib}
|
||||
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libspandsp* \
|
||||
$(1)/usr/lib/spandsp3/lib
|
||||
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/spandsp.h \
|
||||
$(1)/usr/lib/spandsp3/include
|
||||
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/spandsp/*.h \
|
||||
$(1)/usr/lib/spandsp3/include/spandsp
|
||||
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/spandsp/private/*.h \
|
||||
$(1)/usr/lib/spandsp3/include/spandsp/private
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/spandsp.pc \
|
||||
$(1)/usr/lib/pkgconfig/spandsp3.pc
|
||||
endef
|
||||
|
||||
define Package/libspandsp3/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libspandsp.so.$(ABI_VERSION)* \
|
||||
$(1)/usr/lib
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libspandsp3))
|
|
@ -1,18 +0,0 @@
|
|||
--- a/spandsp.pc.in
|
||||
+++ b/spandsp.pc.in
|
||||
@@ -1,12 +1,12 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
-libdir=@libdir@
|
||||
-includedir=@includedir@
|
||||
+libdir=${exec_prefix}/lib/spandsp3/lib
|
||||
+includedir=${prefix}/lib/spandsp3/include
|
||||
|
||||
Name: spandsp
|
||||
Description: A DSP library for telephony.
|
||||
Requires:
|
||||
Version: @VERSION@
|
||||
-Libs: -L${libdir} -lspandsp
|
||||
+Libs: -L${libdir} -l:libspandsp.so.3
|
||||
Libs.private: -ltiff -lm
|
||||
Cflags: -I${includedir}
|
|
@ -1,20 +0,0 @@
|
|||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -231,6 +231,9 @@ then
|
||||
AC_CHECK_HEADERS([X11/X.h])
|
||||
fi
|
||||
|
||||
+# Note: the libxml2 checks below introduce host include paths into the
|
||||
+# build, so we turn them off.
|
||||
+if test -n "$enable_tests" ; then # OpenWrt doesn't build the tests
|
||||
# Determine XML2 include path
|
||||
AC_MSG_CHECKING(for libxml/xmlmemory.h)
|
||||
|
||||
@@ -259,6 +262,7 @@ fi
|
||||
AC_CHECK_HEADERS([libxml/xmlmemory.h])
|
||||
AC_CHECK_HEADERS([libxml/parser.h])
|
||||
AC_CHECK_HEADERS([libxml/xinclude.h])
|
||||
+fi # OpenWrt doesn't build the tests
|
||||
|
||||
AC_LANG([C++])
|
||||
AC_CHECK_HEADERS([FL/Fl.H])
|
|
@ -7,13 +7,15 @@
|
|||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=asterisk-chan-lantiq
|
||||
PKG_RELEASE:=1
|
||||
PKG_NAME:=asterisk13-chan-lantiq
|
||||
PKG_VERSION:=20180215
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://github.com/kochstefan/asterisk_channel_lantiq.git
|
||||
PKG_SOURCE_VERSION:=2f029ec8778420538c8151c6aceba0f7b44b07c9
|
||||
PKG_SOURCE_DATE:=2021-09-11
|
||||
PKG_MIRROR_HASH:=0c57aeb33dc7efb0078e77907e0bc616f1714251e64d647a59faffe5af8bac73
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=f0d7ca7df8e5df802c5bcb79643e3bdc3956c190
|
||||
PKG_MIRROR_HASH:=aaf5ce87a2e23b801318add79eaaa1b7c4a8aa497ca8e2a71ef5d452a7595a73
|
||||
PKG_SOURCE_PROTO:=git
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
@ -30,23 +32,29 @@ define Package/$(PKG_NAME)
|
|||
CATEGORY:=Network
|
||||
TITLE:=Lantiq channel driver
|
||||
URL:=https://github.com/kochstefan/asterisk_channel_lantiq
|
||||
DEPENDS:=+asterisk +kmod-ltq-vmmc
|
||||
USERID:=asterisk=385::vmmc=386
|
||||
DEPENDS:=+asterisk13 +kmod-ltq-vmmc
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
An implementation of a Lantiq TAPI channel driver for Asterisk.
|
||||
An implementation of a Lantiq TAPI channel driver for Asterisk 13.
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/conffiles
|
||||
/etc/asterisk/lantiq.conf
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
$(INSTALL_DATA) ./files/default.exports \
|
||||
$(PKG_BUILD_DIR)/src/channels/chan_lantiq.exports
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
cd $(PKG_BUILD_DIR)/src/channels && \
|
||||
$(TARGET_CC) -o chan_lantiq.o -c chan_lantiq.c -MD -MT chan_lantiq.o \
|
||||
-MF .chan_lantiq.o.d -MP -pthread \
|
||||
$(TARGET_CFLAGS) -DAST_MODULE_SELF_SYM=__internal_chan_lantiq_self \
|
||||
-I$(STAGING_DIR)/usr/include/asterisk-13/include \
|
||||
$(TARGET_CPPFLAGS) \
|
||||
-Wall -Wstrict-prototypes -Wmissing-prototypes \
|
||||
-Wmissing-declarations $(FPIC) -DAST_MODULE=\"chan_lantiq\" && \
|
||||
|
@ -57,7 +65,7 @@ endef
|
|||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/etc/asterisk
|
||||
$(INSTALL_DATA) \
|
||||
$(INSTALL_CONF) \
|
||||
$(PKG_BUILD_DIR)/src/configs/samples/lantiq.conf.sample \
|
||||
$(1)/etc/asterisk/lantiq.conf
|
||||
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
|
8
net/asterisk-13.x-chan-lantiq/files/default.exports
Normal file
8
net/asterisk-13.x-chan-lantiq/files/default.exports
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
global:
|
||||
/* See main/asterisk.exports.in for an explanation why this is
|
||||
* needed. */
|
||||
_IO_stdin_used;
|
||||
local:
|
||||
*;
|
||||
};
|
11
net/asterisk-13.x/Config.in
Normal file
11
net/asterisk-13.x/Config.in
Normal file
|
@ -0,0 +1,11 @@
|
|||
menu "Advanced configuration"
|
||||
depends on PACKAGE_asterisk13
|
||||
|
||||
config ASTERISK13_LOW_MEMORY
|
||||
bool "Optimize Asterisk 13 for low memory usage"
|
||||
default n
|
||||
help
|
||||
Warning: this feature is known to cause problems with some modules.
|
||||
Disable it if you experience problems like segmentation faults.
|
||||
|
||||
endmenu
|
1000
net/asterisk-13.x/Makefile
Normal file
1000
net/asterisk-13.x/Makefile
Normal file
File diff suppressed because it is too large
Load diff
4
net/asterisk-13.x/files/asterisk.default
Normal file
4
net/asterisk-13.x/files/asterisk.default
Normal file
|
@ -0,0 +1,4 @@
|
|||
## startup options for /etc/init.d/asterisk
|
||||
|
||||
ENABLE_ASTERISK="yes"
|
||||
OPTIONS=""
|
33
net/asterisk-13.x/files/asterisk.init
Normal file
33
net/asterisk-13.x/files/asterisk.init
Normal file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2014 OpenWrt.org
|
||||
|
||||
START=99
|
||||
APP=asterisk
|
||||
OPTIONS=
|
||||
DEST=
|
||||
DEFAULT=$DEST/etc/default/$APP
|
||||
BIN_FILE=$DEST/usr/sbin/$APP
|
||||
PID_FILE=$DEST/var/run/$APP/$APP.pid
|
||||
|
||||
start() {
|
||||
[ -f $DEFAULT ] && . $DEFAULT
|
||||
[ -d $DEST/var/run/asterisk ] || mkdir -p $DEST/var/run/asterisk
|
||||
[ -d $DEST/var/log/asterisk ] || mkdir -p $DEST/var/log/asterisk
|
||||
[ -d $DEST/var/spool/asterisk ] || mkdir -p $DEST/var/spool/asterisk
|
||||
[ -d $DEST/var/lib/asterisk ] || mkdir -p $DEST/var/lib/asterisk
|
||||
[ -d $DEST/var/lib/asterisk/keys ] || mkdir -p $DEST/var/lib/asterisk/keys
|
||||
[ -d $DEST/var/log/asterisk/cdr-csv ] || mkdir -p $DEST/var/log/asterisk/cdr-csv
|
||||
|
||||
SERVICE_PID_FILE="/var/run/asterisk/asterisk.pid" \
|
||||
service_start $BIN_FILE $OPTIONS
|
||||
}
|
||||
|
||||
stop() {
|
||||
SERVICE_PID_FILE="/var/run/asterisk/asterisk.pid" \
|
||||
service_stop $BIN_FILE
|
||||
}
|
||||
|
||||
reload() {
|
||||
SERVICE_PID_FILE="/var/run/asterisk/asterisk.pid" \
|
||||
service_reload $BIN_FILE
|
||||
}
|
22
net/asterisk-13.x/patches/001-disable-semaphores-check.patch
Normal file
22
net/asterisk-13.x/patches/001-disable-semaphores-check.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -953,19 +953,6 @@ AC_LINK_IFELSE(
|
||||
]
|
||||
)
|
||||
|
||||
-# Some platforms define sem_init(), but only support sem_open(). joyous.
|
||||
-AC_MSG_CHECKING(for working unnamed semaphores)
|
||||
-AC_RUN_IFELSE(
|
||||
- [AC_LANG_PROGRAM([#include <semaphore.h>],
|
||||
- [sem_t sem; return sem_init(&sem, 0, 0);])],
|
||||
- AC_MSG_RESULT(yes)
|
||||
- AC_DEFINE([HAS_WORKING_SEMAPHORE], 1, [Define to 1 if anonymous semaphores work.]),
|
||||
- AC_MSG_RESULT(no),
|
||||
- AC_MSG_RESULT(cross-compile)
|
||||
- AC_MSG_NOTICE([WARNING: result yes guessed because of cross compilation])
|
||||
- AC_DEFINE([HAS_WORKING_SEMAPHORE], 1, [Define to 1 if anonymous semaphores work.])
|
||||
-)
|
||||
-
|
||||
LIBS="$save_LIBS"
|
||||
CFLAGS="$save_CFLAGS"
|
||||
if test "${ac_cv_pthread_rwlock_timedwrlock}" = "yes"; then
|
10
net/asterisk-13.x/patches/002-undef-res-ninit.patch
Normal file
10
net/asterisk-13.x/patches/002-undef-res-ninit.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1287,7 +1287,6 @@ AC_LINK_IFELSE(
|
||||
#include <resolv.h>],
|
||||
[int foo = res_ninit(NULL);])],
|
||||
AC_MSG_RESULT(yes)
|
||||
- AC_DEFINE([HAVE_RES_NINIT], 1, [Define to 1 if your system has the re-entrant resolver functions.])
|
||||
AC_SEARCH_LIBS(res_9_ndestroy, resolv)
|
||||
AC_MSG_CHECKING(for res_ndestroy)
|
||||
AC_LINK_IFELSE(
|
101
net/asterisk-13.x/patches/004-ifdef-missing-execinfo.patch
Normal file
101
net/asterisk-13.x/patches/004-ifdef-missing-execinfo.patch
Normal file
|
@ -0,0 +1,101 @@
|
|||
--- a/include/asterisk/lock.h
|
||||
+++ b/include/asterisk/lock.h
|
||||
@@ -51,9 +51,11 @@
|
||||
#include <pthread.h>
|
||||
#include <time.h>
|
||||
#include <sys/param.h>
|
||||
+#ifndef __UCLIBC__
|
||||
#ifdef HAVE_BKTR
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#ifndef HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK
|
||||
#include "asterisk/time.h"
|
||||
@@ -86,11 +88,15 @@
|
||||
#define __AST_RWLOCK_INIT_VALUE {0}
|
||||
#endif /* HAVE_PTHREAD_RWLOCK_INITIALIZER */
|
||||
|
||||
+#ifndef __UCLIBC__
|
||||
#ifdef HAVE_BKTR
|
||||
#define AST_LOCK_TRACK_INIT_VALUE { { NULL }, { 0 }, 0, { NULL }, { 0 }, {{{ 0 }}}, PTHREAD_MUTEX_INIT_VALUE }
|
||||
#else
|
||||
#define AST_LOCK_TRACK_INIT_VALUE { { NULL }, { 0 }, 0, { NULL }, { 0 }, PTHREAD_MUTEX_INIT_VALUE }
|
||||
#endif
|
||||
+#else
|
||||
+#define AST_LOCK_TRACK_INIT_VALUE { { NULL }, { 0 }, 0, { NULL }, { 0 }, PTHREAD_MUTEX_INIT_VALUE }
|
||||
+#endif
|
||||
|
||||
#define AST_MUTEX_INIT_VALUE { PTHREAD_MUTEX_INIT_VALUE, NULL, 1 }
|
||||
#define AST_MUTEX_INIT_VALUE_NOTRACKING { PTHREAD_MUTEX_INIT_VALUE, NULL, 0 }
|
||||
@@ -114,9 +120,11 @@ struct ast_lock_track {
|
||||
int reentrancy;
|
||||
const char *func[AST_MAX_REENTRANCY];
|
||||
pthread_t thread_id[AST_MAX_REENTRANCY];
|
||||
+#ifndef __UCLIBC__
|
||||
#ifdef HAVE_BKTR
|
||||
struct ast_bt backtrace[AST_MAX_REENTRANCY];
|
||||
#endif
|
||||
+#endif
|
||||
pthread_mutex_t reentr_mutex;
|
||||
};
|
||||
|
||||
@@ -241,6 +249,7 @@ enum ast_lock_type {
|
||||
* on the lock. ast_mark_lock_acquired() will mark it as held by this thread.
|
||||
*/
|
||||
#if !defined(LOW_MEMORY)
|
||||
+#ifndef HAVE_BKTR
|
||||
#ifdef HAVE_BKTR
|
||||
void ast_store_lock_info(enum ast_lock_type type, const char *filename,
|
||||
int line_num, const char *func, const char *lock_name, void *lock_addr, struct ast_bt *bt);
|
||||
@@ -248,14 +257,22 @@ void ast_store_lock_info(enum ast_lock_t
|
||||
void ast_store_lock_info(enum ast_lock_type type, const char *filename,
|
||||
int line_num, const char *func, const char *lock_name, void *lock_addr);
|
||||
#endif /* HAVE_BKTR */
|
||||
+#else
|
||||
+void ast_store_lock_info(enum ast_lock_type type, const char *filename,
|
||||
+ int line_num, const char *func, const char *lock_name, void *lock_addr);
|
||||
+#endif
|
||||
|
||||
#else
|
||||
|
||||
+#ifndef __UCLIBC__
|
||||
#ifdef HAVE_BKTR
|
||||
#define ast_store_lock_info(I,DONT,CARE,ABOUT,THE,PARAMETERS,BUD)
|
||||
#else
|
||||
#define ast_store_lock_info(I,DONT,CARE,ABOUT,THE,PARAMETERS)
|
||||
#endif /* HAVE_BKTR */
|
||||
+#else
|
||||
+#define ast_store_lock_info(I,DONT,CARE,ABOUT,THE,PARAMETERS)
|
||||
+#endif
|
||||
#endif /* !defined(LOW_MEMORY) */
|
||||
|
||||
/*!
|
||||
@@ -283,19 +300,27 @@ void ast_mark_lock_failed(void *lock_add
|
||||
* be removed from the current thread's lock info struct.
|
||||
*/
|
||||
#if !defined(LOW_MEMORY)
|
||||
+#ifndef __UCLIBC__
|
||||
#ifdef HAVE_BKTR
|
||||
void ast_remove_lock_info(void *lock_addr, struct ast_bt *bt);
|
||||
#else
|
||||
void ast_remove_lock_info(void *lock_addr);
|
||||
#endif /* HAVE_BKTR */
|
||||
+#else
|
||||
+void ast_remove_lock_info(void *lock_addr);
|
||||
+#endif
|
||||
void ast_suspend_lock_info(void *lock_addr);
|
||||
void ast_restore_lock_info(void *lock_addr);
|
||||
#else
|
||||
+#ifndef __UCLIBC
|
||||
#ifdef HAVE_BKTR
|
||||
#define ast_remove_lock_info(ignore,me)
|
||||
#else
|
||||
#define ast_remove_lock_info(ignore)
|
||||
#endif /* HAVE_BKTR */
|
||||
+#else
|
||||
+#define ast_remove_lock_info(ignore)
|
||||
+#endif
|
||||
#define ast_suspend_lock_info(ignore);
|
||||
#define ast_restore_lock_info(ignore);
|
||||
#endif /* !defined(LOW_MEMORY) */
|
|
@ -1,6 +1,6 @@
|
|||
--- a/res/ael/ael.flex
|
||||
+++ b/res/ael/ael.flex
|
||||
@@ -598,7 +598,7 @@ includes { STORE_POS; return KW_INCLUDES
|
||||
@@ -595,7 +595,7 @@ includes { STORE_POS; return KW_INCLUDES
|
||||
snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf);
|
||||
ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf));
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
|||
glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf);
|
||||
--- a/res/ael/ael_lex.c
|
||||
+++ b/res/ael/ael_lex.c
|
||||
@@ -1966,7 +1966,7 @@ YY_RULE_SETUP
|
||||
@@ -1976,7 +1976,7 @@ YY_RULE_SETUP
|
||||
snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf);
|
||||
ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf));
|
||||
}
|
31
net/asterisk-13.x/patches/050-musl-glob-compat.patch
Normal file
31
net/asterisk-13.x/patches/050-musl-glob-compat.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
--- a/res/ael/ael.flex
|
||||
+++ b/res/ael/ael.flex
|
||||
@@ -79,6 +79,12 @@
|
||||
#if !defined(GLOB_ABORTED)
|
||||
#define GLOB_ABORTED GLOB_ABEND
|
||||
#endif
|
||||
+#if !defined(GLOB_BRACE)
|
||||
+#define GLOB_BRACE 0
|
||||
+#endif
|
||||
+#if !defined(GLOB_NOMAGIC)
|
||||
+#define GLOB_NOMAGIC 0
|
||||
+#endif
|
||||
|
||||
#include "asterisk/logger.h"
|
||||
#include "asterisk/utils.h"
|
||||
Only in asterisk-11.7.0: res/ael/ael.tab.o
|
||||
--- a/res/ael/ael_lex.c
|
||||
+++ b/res/ael/ael_lex.c
|
||||
@@ -838,6 +838,12 @@
|
||||
#if !defined(GLOB_ABORTED)
|
||||
#define GLOB_ABORTED GLOB_ABEND
|
||||
#endif
|
||||
+#if !defined(GLOB_BRACE)
|
||||
+#define GLOB_BRACE 0
|
||||
+#endif
|
||||
+#if !defined(GLOB_NOMAGIC)
|
||||
+#define GLOB_NOMAGIC 0
|
||||
+#endif
|
||||
|
||||
#include "asterisk/logger.h"
|
||||
#include "asterisk/utils.h"
|
37
net/asterisk-13.x/patches/052-musl-libcap.patch
Normal file
37
net/asterisk-13.x/patches/052-musl-libcap.patch
Normal file
|
@ -0,0 +1,37 @@
|
|||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -170,6 +170,9 @@ case "${host_os}" in
|
||||
linux-gnu*)
|
||||
OSARCH=linux-gnu
|
||||
;;
|
||||
+ linux-musl*)
|
||||
+ OSARCH=linux-musl
|
||||
+ ;;
|
||||
kfreebsd*-gnu)
|
||||
OSARCH=kfreebsd-gnu
|
||||
;;
|
||||
@@ -1411,9 +1414,11 @@ if test "${PBX_BFD}" = "0"; then
|
||||
AST_EXT_LIB_CHECK([BFD], [bfd], [bfd_check_format], [bfd.h], [-ldl -liberty -lz])
|
||||
fi
|
||||
|
||||
-if test "x${OSARCH}" = "xlinux-gnu" ; then
|
||||
+case "${OSARCH}" in
|
||||
+linux*)
|
||||
AST_EXT_LIB_CHECK([CAP], [cap], [cap_from_text], [sys/capability.h])
|
||||
-fi
|
||||
+ ;;
|
||||
+esac
|
||||
|
||||
AST_C_DEFINE_CHECK([DAHDI], [DAHDI_RESET_COUNTERS], [dahdi/user.h], [230])
|
||||
AST_C_DEFINE_CHECK([DAHDI], [DAHDI_DEFAULT_MTU_MRU], [dahdi/user.h], [220])
|
||||
--- a/main/Makefile
|
||||
+++ b/main/Makefile
|
||||
@@ -47,7 +47,7 @@ AST_LIBS+=$(AST_CLANG_BLOCKS_LIBS)
|
||||
AST_LIBS+=$(RT_LIB)
|
||||
AST_LIBS+=$(SYSTEMD_LIB)
|
||||
|
||||
-ifneq ($(findstring $(OSARCH), linux-gnu uclinux linux-uclibc kfreebsd-gnu),)
|
||||
+ifneq ($(findstring $(OSARCH), linux-gnu uclinux linux-uclibc linux-musl kfreebsd-gnu),)
|
||||
AST_LIBS+=-ldl
|
||||
ifneq (x$(CAP_LIB),x)
|
||||
AST_LIBS+=$(CAP_LIB)
|
11
net/asterisk-13.x/patches/053-musl-mutex-init.patch
Normal file
11
net/asterisk-13.x/patches/053-musl-mutex-init.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/include/asterisk/lock.h
|
||||
+++ b/include/asterisk/lock.h
|
||||
@@ -68,7 +68,7 @@
|
||||
#define AST_PTHREADT_NULL (pthread_t) -1
|
||||
#define AST_PTHREADT_STOP (pthread_t) -2
|
||||
|
||||
-#if (defined(SOLARIS) || defined(BSD))
|
||||
+#if (defined(SOLARIS) || defined(BSD) || !defined(HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP))
|
||||
#define AST_MUTEX_INIT_W_CONSTRUCTORS
|
||||
#endif /* SOLARIS || BSD */
|
||||
|
10
net/asterisk-13.x/patches/056-fix-check_expr2-build.patch
Normal file
10
net/asterisk-13.x/patches/056-fix-check_expr2-build.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- a/utils/Makefile
|
||||
+++ b/utils/Makefile
|
||||
@@ -179,7 +179,6 @@ check_expr2: $(ASTTOPDIR)/main/ast_expr2
|
||||
$(CC) -g -o check_expr2 ast_expr2fz.o ast_expr2z.o -lm
|
||||
$(ECHO_PREFIX) echo " [RM] ast_expr2fz.o ast_expr2z.o"
|
||||
rm ast_expr2z.o ast_expr2fz.o
|
||||
- ./check_expr2 expr2.testinput
|
||||
|
||||
smsq: smsq.o strcompat.o
|
||||
smsq: LIBS+=$(POPT_LIB)
|
28
net/asterisk-13.x/patches/100-build-reproducibly.patch
Normal file
28
net/asterisk-13.x/patches/100-build-reproducibly.patch
Normal file
|
@ -0,0 +1,28 @@
|
|||
--- a/build_tools/make_build_h
|
||||
+++ b/build_tools/make_build_h
|
||||
@@ -5,6 +5,14 @@ MACHINE=`uname -m | sed 's/\\\\/\\\\\\\
|
||||
OS=`uname -s`
|
||||
USER=`id | awk -F")" '{print $1}'| awk -F"(" '{print $2}' | sed 's/\\\\/\\\\\\\\/g'`
|
||||
DATE=`date -u "+%Y-%m-%d %H:%M:%S"`
|
||||
+if [ -n "${SOURCE_DATE_EPOCH}" ]; then
|
||||
+ # building reproducibly, faking some data
|
||||
+ HOSTNAME='buildd.debian.org'
|
||||
+ KERNEL='unknown'
|
||||
+ MACHINE='unknown'
|
||||
+ USER='nobody'
|
||||
+ DATE=`date -u "+%Y-%m-%d %H:%M:%S" -d @${SOURCE_DATE_EPOCH}`
|
||||
+fi
|
||||
cat << END
|
||||
/*
|
||||
* build.h
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -480,7 +480,7 @@ doc/core-en_US.xml: makeopts .lastclean
|
||||
@echo "<docs xmlns:xi=\"http://www.w3.org/2001/XInclude\">" >> $@
|
||||
@for x in $(MOD_SUBDIRS); do \
|
||||
printf "$$x " ; \
|
||||
- for i in `find $$x -name '*.c'`; do \
|
||||
+ for i in `find $$x -name '*.c' | LC_ALL=C sort`; do \
|
||||
$(AWK) -f build_tools/get_documentation $$i >> $@ ; \
|
||||
done ; \
|
||||
done
|
101
net/asterisk-13.x/patches/110-AST-2018-008-13.diff
Normal file
101
net/asterisk-13.x/patches/110-AST-2018-008-13.diff
Normal file
|
@ -0,0 +1,101 @@
|
|||
From 4eeb16d1a316aa3d6f5710a2f6beffb0fecb6121 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Mudgett <rmudgett@digium.com>
|
||||
Date: Mon, 30 Apr 2018 17:38:58 -0500
|
||||
Subject: [PATCH] AST-2018-008: Fix enumeration of endpoints from ACL rejected addresses.
|
||||
|
||||
When endpoint specific ACL rules block a SIP request they respond with a
|
||||
403 forbidden. However, if an endpoint is not identified then a 401
|
||||
unauthorized response is sent. This vulnerability just discloses which
|
||||
requests hit a defined endpoint. The ACL rules cannot be bypassed to gain
|
||||
access to the disclosed endpoints.
|
||||
|
||||
* Made endpoint specific ACL rules now respond with a 401 unauthorized
|
||||
which is the same as if an endpoint were not identified. The fix is
|
||||
accomplished by replacing the found endpoint with the artificial endpoint
|
||||
which always fails authentication.
|
||||
|
||||
ASTERISK-27818
|
||||
|
||||
Change-Id: Icb275a54ff8e2df6c671a6d9bda37b5d732b3b32
|
||||
---
|
||||
|
||||
diff --git a/res/res_pjsip/pjsip_distributor.c b/res/res_pjsip/pjsip_distributor.c
|
||||
index e056b60..19266df 100644
|
||||
--- a/res/res_pjsip/pjsip_distributor.c
|
||||
+++ b/res/res_pjsip/pjsip_distributor.c
|
||||
@@ -666,6 +666,26 @@
|
||||
ao2_unlock(unid);
|
||||
}
|
||||
|
||||
+static int apply_endpoint_acl(pjsip_rx_data *rdata, struct ast_sip_endpoint *endpoint);
|
||||
+static int apply_endpoint_contact_acl(pjsip_rx_data *rdata, struct ast_sip_endpoint *endpoint);
|
||||
+
|
||||
+static void apply_acls(pjsip_rx_data *rdata)
|
||||
+{
|
||||
+ struct ast_sip_endpoint *endpoint;
|
||||
+
|
||||
+ /* Is the endpoint allowed with the source or contact address? */
|
||||
+ endpoint = rdata->endpt_info.mod_data[endpoint_mod.id];
|
||||
+ if (endpoint != artificial_endpoint
|
||||
+ && (apply_endpoint_acl(rdata, endpoint)
|
||||
+ || apply_endpoint_contact_acl(rdata, endpoint))) {
|
||||
+ ast_debug(1, "Endpoint '%s' not allowed by ACL\n",
|
||||
+ ast_sorcery_object_get_id(endpoint));
|
||||
+
|
||||
+ /* Replace the rdata endpoint with the artificial endpoint. */
|
||||
+ ao2_replace(rdata->endpt_info.mod_data[endpoint_mod.id], artificial_endpoint);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static pj_bool_t endpoint_lookup(pjsip_rx_data *rdata)
|
||||
{
|
||||
struct ast_sip_endpoint *endpoint;
|
||||
@@ -684,6 +704,7 @@
|
||||
ao2_unlink(unidentified_requests, unid);
|
||||
ao2_ref(unid, -1);
|
||||
}
|
||||
+ apply_acls(rdata);
|
||||
return PJ_FALSE;
|
||||
}
|
||||
|
||||
@@ -743,6 +764,8 @@
|
||||
ast_sip_report_invalid_endpoint(name, rdata);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ apply_acls(rdata);
|
||||
return PJ_FALSE;
|
||||
}
|
||||
|
||||
@@ -826,16 +849,11 @@
|
||||
|
||||
ast_assert(endpoint != NULL);
|
||||
|
||||
- if (endpoint!=artificial_endpoint) {
|
||||
- if (apply_endpoint_acl(rdata, endpoint) || apply_endpoint_contact_acl(rdata, endpoint)) {
|
||||
- if (!is_ack) {
|
||||
- pjsip_endpt_respond_stateless(ast_sip_get_pjsip_endpoint(), rdata, 403, NULL, NULL, NULL);
|
||||
- }
|
||||
- return PJ_TRUE;
|
||||
- }
|
||||
+ if (is_ack) {
|
||||
+ return PJ_FALSE;
|
||||
}
|
||||
|
||||
- if (!is_ack && ast_sip_requires_authentication(endpoint, rdata)) {
|
||||
+ if (ast_sip_requires_authentication(endpoint, rdata)) {
|
||||
pjsip_tx_data *tdata;
|
||||
struct unidentified_request *unid;
|
||||
|
||||
@@ -871,6 +889,10 @@
|
||||
return PJ_TRUE;
|
||||
}
|
||||
pjsip_tx_data_dec_ref(tdata);
|
||||
+ } else if (endpoint == artificial_endpoint) {
|
||||
+ /* Uh. Oh. The artificial endpoint couldn't challenge so block the request. */
|
||||
+ pjsip_endpt_respond_stateless(ast_sip_get_pjsip_endpoint(), rdata, 500, NULL, NULL, NULL);
|
||||
+ return PJ_TRUE;
|
||||
}
|
||||
|
||||
return PJ_FALSE;
|
||||
|
89
net/asterisk-13.x/patches/120-AST-2018-009-13.diff
Normal file
89
net/asterisk-13.x/patches/120-AST-2018-009-13.diff
Normal file
|
@ -0,0 +1,89 @@
|
|||
From e6b0c4d27e0392a7b4b4b6717a6d1e0ea049b550 Mon Sep 17 00:00:00 2001
|
||||
From: Sean Bright <sean.bright@gmail.com>
|
||||
Date: Thu, 16 Aug 2018 11:45:53 -0400
|
||||
Subject: [PATCH] AST-2018-009: Fix crash processing websocket HTTP Upgrade
|
||||
requests
|
||||
|
||||
The HTTP request processing in res_http_websocket allocates additional
|
||||
space on the stack for various headers received during an Upgrade request.
|
||||
An attacker could send a specially crafted request that causes this code
|
||||
to overflow the stack, resulting in a crash.
|
||||
|
||||
* No longer allocate memory from the stack in a loop to parse the header
|
||||
values. NOTE: There is a slight API change when using the passed in
|
||||
strings as is. We now require the passed in strings to no longer have
|
||||
leading or trailing whitespace. This isn't a problem as the only callers
|
||||
have already done this before passing the strings to the affected
|
||||
function.
|
||||
|
||||
ASTERISK-28013 #close
|
||||
|
||||
Change-Id: Ia564825a8a95e085fd17e658cb777fe1afa8091a
|
||||
---
|
||||
res/res_http_websocket.c | 25 ++++++++++++++-----------
|
||||
1 file changed, 14 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/res/res_http_websocket.c b/res/res_http_websocket.c
|
||||
index 440bf41..0ff876b 100644
|
||||
--- a/res/res_http_websocket.c
|
||||
+++ b/res/res_http_websocket.c
|
||||
@@ -736,7 +736,8 @@ static void websocket_bad_request(struct ast_tcptls_session_instance *ser)
|
||||
int AST_OPTIONAL_API_NAME(ast_websocket_uri_cb)(struct ast_tcptls_session_instance *ser, const struct ast_http_uri *urih, const char *uri, enum ast_http_method method, struct ast_variable *get_vars, struct ast_variable *headers)
|
||||
{
|
||||
struct ast_variable *v;
|
||||
- char *upgrade = NULL, *key = NULL, *key1 = NULL, *key2 = NULL, *protos = NULL, *requested_protocols = NULL, *protocol = NULL;
|
||||
+ const char *upgrade = NULL, *key = NULL, *key1 = NULL, *key2 = NULL, *protos = NULL;
|
||||
+ char *requested_protocols = NULL, *protocol = NULL;
|
||||
int version = 0, flags = 1;
|
||||
struct ast_websocket_protocol *protocol_handler = NULL;
|
||||
struct ast_websocket *session;
|
||||
@@ -755,16 +756,15 @@ int AST_OPTIONAL_API_NAME(ast_websocket_uri_cb)(struct ast_tcptls_session_instan
|
||||
/* Get the minimum headers required to satisfy our needs */
|
||||
for (v = headers; v; v = v->next) {
|
||||
if (!strcasecmp(v->name, "Upgrade")) {
|
||||
- upgrade = ast_strip(ast_strdupa(v->value));
|
||||
+ upgrade = v->value;
|
||||
} else if (!strcasecmp(v->name, "Sec-WebSocket-Key")) {
|
||||
- key = ast_strip(ast_strdupa(v->value));
|
||||
+ key = v->value;
|
||||
} else if (!strcasecmp(v->name, "Sec-WebSocket-Key1")) {
|
||||
- key1 = ast_strip(ast_strdupa(v->value));
|
||||
+ key1 = v->value;
|
||||
} else if (!strcasecmp(v->name, "Sec-WebSocket-Key2")) {
|
||||
- key2 = ast_strip(ast_strdupa(v->value));
|
||||
+ key2 = v->value;
|
||||
} else if (!strcasecmp(v->name, "Sec-WebSocket-Protocol")) {
|
||||
- requested_protocols = ast_strip(ast_strdupa(v->value));
|
||||
- protos = ast_strdupa(requested_protocols);
|
||||
+ protos = v->value;
|
||||
} else if (!strcasecmp(v->name, "Sec-WebSocket-Version")) {
|
||||
if (sscanf(v->value, "%30d", &version) != 1) {
|
||||
version = 0;
|
||||
@@ -778,7 +778,7 @@ int AST_OPTIONAL_API_NAME(ast_websocket_uri_cb)(struct ast_tcptls_session_instan
|
||||
ast_sockaddr_stringify(&ser->remote_address));
|
||||
ast_http_error(ser, 426, "Upgrade Required", NULL);
|
||||
return 0;
|
||||
- } else if (ast_strlen_zero(requested_protocols)) {
|
||||
+ } else if (ast_strlen_zero(protos)) {
|
||||
/* If there's only a single protocol registered, and the
|
||||
* client doesn't specify what protocol it's using, go ahead
|
||||
* and accept the connection */
|
||||
@@ -799,9 +799,12 @@ int AST_OPTIONAL_API_NAME(ast_websocket_uri_cb)(struct ast_tcptls_session_instan
|
||||
return 0;
|
||||
}
|
||||
|
||||
- /* Iterate through the requested protocols trying to find one that we have a handler for */
|
||||
- while (!protocol_handler && (protocol = strsep(&requested_protocols, ","))) {
|
||||
- protocol_handler = ao2_find(server->protocols, ast_strip(protocol), OBJ_KEY);
|
||||
+ if (!protocol_handler && protos) {
|
||||
+ requested_protocols = ast_strdupa(protos);
|
||||
+ /* Iterate through the requested protocols trying to find one that we have a handler for */
|
||||
+ while (!protocol_handler && (protocol = strsep(&requested_protocols, ","))) {
|
||||
+ protocol_handler = ao2_find(server->protocols, ast_strip(protocol), OBJ_KEY);
|
||||
+ }
|
||||
}
|
||||
|
||||
/* If no protocol handler exists bump this back to the requester */
|
||||
--
|
||||
2.7.4
|
||||
|
39
net/asterisk-13.x/patches/130-AST-2019-003-13.diff
Normal file
39
net/asterisk-13.x/patches/130-AST-2019-003-13.diff
Normal file
|
@ -0,0 +1,39 @@
|
|||
From 3ab9291a563656dfebcb7de67c86351541f3de1c Mon Sep 17 00:00:00 2001
|
||||
From: Francesco Castellano <francesco.castellano@messagenet.it>
|
||||
Date: Fri, 28 Jun 2019 18:15:31 +0200
|
||||
Subject: [PATCH] chan_sip: Handle invalid SDP answer to T.38 re-invite
|
||||
|
||||
The chan_sip module performs a T.38 re-invite using a single media
|
||||
stream of udptl, and expects the SDP answer to be the same.
|
||||
|
||||
If an SDP answer is received instead that contains an additional
|
||||
media stream with no joint codec a crash will occur as the code
|
||||
assumes that at least one joint codec will exist in this
|
||||
scenario.
|
||||
|
||||
This change removes this assumption.
|
||||
|
||||
ASTERISK-28465
|
||||
|
||||
Change-Id: I8b02845b53344c6babe867a3f0a5231045c7ac87
|
||||
---
|
||||
|
||||
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
|
||||
index 7c8928d..223ff3c 100644
|
||||
--- a/channels/chan_sip.c
|
||||
+++ b/channels/chan_sip.c
|
||||
@@ -10911,7 +10911,13 @@
|
||||
ast_rtp_lookup_mime_multiple2(s3, NULL, newnoncodeccapability, 0, 0));
|
||||
}
|
||||
|
||||
- if (portno != -1 || vportno != -1 || tportno != -1) {
|
||||
+ /* When UDPTL is negotiated it is expected that there are no compatible codecs as audio or
|
||||
+ * video is not being transported, thus we continue in this function further up if that is
|
||||
+ * the case. If we receive an SDP answer containing both a UDPTL stream and another media
|
||||
+ * stream however we need to check again to ensure that there is at least one joint codec
|
||||
+ * instead of assuming there is one.
|
||||
+ */
|
||||
+ if ((portno != -1 || vportno != -1 || tportno != -1) && ast_format_cap_count(newjointcapability)) {
|
||||
/* We are now ready to change the sip session and RTP structures with the offered codecs, since
|
||||
they are acceptable */
|
||||
unsigned int framing;
|
73
net/asterisk-13.x/patches/140-AST-2019-006-13.diff
Normal file
73
net/asterisk-13.x/patches/140-AST-2019-006-13.diff
Normal file
|
@ -0,0 +1,73 @@
|
|||
From c2279540bade208dad35f7760ebd4a7cc94731fe Mon Sep 17 00:00:00 2001
|
||||
From: Ben Ford <bford@digium.com>
|
||||
Date: Mon, 21 Oct 2019 14:55:06 -0500
|
||||
Subject: [PATCH] chan_sip.c: Prevent address change on unauthenticated SIP request.
|
||||
|
||||
If the name of a peer is known and a SIP request is sent using that
|
||||
peer's name, the address of the peer will change even if the request
|
||||
fails the authentication challenge. This means that an endpoint can
|
||||
be altered and even rendered unusuable, even if it was in a working
|
||||
state previously. This can only occur when the nat option is set to the
|
||||
default, or auto_force_rport.
|
||||
|
||||
This change checks the result of authentication first to ensure it is
|
||||
successful before setting the address and the nat option.
|
||||
|
||||
ASTERISK-28589 #close
|
||||
|
||||
Change-Id: I581c5ed1da60ca89f590bd70872de2b660de02df
|
||||
---
|
||||
|
||||
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
|
||||
index ea78d23..4a8d344 100644
|
||||
--- a/channels/chan_sip.c
|
||||
+++ b/channels/chan_sip.c
|
||||
@@ -19103,18 +19103,6 @@
|
||||
bogus_peer = NULL;
|
||||
}
|
||||
|
||||
- /* build_peer, called through sip_find_peer, is not able to check the
|
||||
- * sip_pvt->natdetected flag in order to determine if the peer is behind
|
||||
- * NAT or not when SIP_PAGE3_NAT_AUTO_RPORT or SIP_PAGE3_NAT_AUTO_COMEDIA
|
||||
- * are set on the peer. So we check for that here and set the peer's
|
||||
- * address accordingly.
|
||||
- */
|
||||
- set_peer_nat(p, peer);
|
||||
-
|
||||
- if (p->natdetected && ast_test_flag(&peer->flags[2], SIP_PAGE3_NAT_AUTO_RPORT)) {
|
||||
- ast_sockaddr_copy(&peer->addr, &p->recv);
|
||||
- }
|
||||
-
|
||||
if (!ast_apply_acl(peer->acl, addr, "SIP Peer ACL: ")) {
|
||||
ast_debug(2, "Found peer '%s' for '%s', but fails host access\n", peer->name, of);
|
||||
sip_unref_peer(peer, "sip_unref_peer: check_peer_ok: from sip_find_peer call, early return of AUTH_ACL_FAILED");
|
||||
@@ -19183,6 +19171,21 @@
|
||||
ast_string_field_set(p, peermd5secret, NULL);
|
||||
}
|
||||
if (!(res = check_auth(p, req, peer->name, p->peersecret, p->peermd5secret, sipmethod, uri2, reliable))) {
|
||||
+
|
||||
+ /* build_peer, called through sip_find_peer, is not able to check the
|
||||
+ * sip_pvt->natdetected flag in order to determine if the peer is behind
|
||||
+ * NAT or not when SIP_PAGE3_NAT_AUTO_RPORT or SIP_PAGE3_NAT_AUTO_COMEDIA
|
||||
+ * are set on the peer. So we check for that here and set the peer's
|
||||
+ * address accordingly. The address should ONLY be set once we are sure
|
||||
+ * authentication was a success. If, for example, an INVITE was sent that
|
||||
+ * matched the peer name but failed the authentication check, the address
|
||||
+ * would be updated, which is bad.
|
||||
+ */
|
||||
+ set_peer_nat(p, peer);
|
||||
+ if (p->natdetected && ast_test_flag(&peer->flags[2], SIP_PAGE3_NAT_AUTO_RPORT)) {
|
||||
+ ast_sockaddr_copy(&peer->addr, &p->recv);
|
||||
+ }
|
||||
+
|
||||
/* If we have a call limit, set flag */
|
||||
if (peer->call_limit)
|
||||
ast_set_flag(&p->flags[0], SIP_CALL_LIMIT);
|
||||
@@ -19282,6 +19285,7 @@
|
||||
}
|
||||
}
|
||||
sip_unref_peer(peer, "check_peer_ok: sip_unref_peer: tossing temp ptr to peer from sip_find_peer");
|
||||
+
|
||||
return res;
|
||||
}
|
||||
|
46
net/asterisk-13.x/patches/150-AST-2019-007-13.diff
Normal file
46
net/asterisk-13.x/patches/150-AST-2019-007-13.diff
Normal file
|
@ -0,0 +1,46 @@
|
|||
From 1b9281a5ded62e5d30af2959e5aa33bc5a0fc285 Mon Sep 17 00:00:00 2001
|
||||
From: George Joseph <gjoseph@digium.com>
|
||||
Date: Thu, 24 Oct 2019 11:41:23 -0600
|
||||
Subject: [PATCH] manager.c: Prevent the Originate action from running the Originate app
|
||||
|
||||
If an AMI user without the "system" authorization calls the
|
||||
Originate AMI command with the Originate application,
|
||||
the second Originate could run the "System" command.
|
||||
|
||||
Action: Originate
|
||||
Channel: Local/1111
|
||||
Application: Originate
|
||||
Data: Local/2222,app,System,touch /tmp/owned
|
||||
|
||||
If the "system" authorization isn't set, we now block the
|
||||
Originate app as well as the System, Exec, etc. apps.
|
||||
|
||||
ASTERISK-28580
|
||||
Reported by: Eliel Sardañons
|
||||
|
||||
Change-Id: Ic4c9dedc34c426f03c8c14fce334a71386d8a5fa
|
||||
---
|
||||
|
||||
diff --git a/doc/UPGRADE-staging/AMI-Originate.txt b/doc/UPGRADE-staging/AMI-Originate.txt
|
||||
new file mode 100644
|
||||
index 0000000..f2d3133
|
||||
--- /dev/null
|
||||
+++ b/doc/UPGRADE-staging/AMI-Originate.txt
|
||||
@@ -0,0 +1,5 @@
|
||||
+Subject: AMI
|
||||
+
|
||||
+The AMI Originate action, which optionally takes a dialplan application as
|
||||
+an argument, no longer accepts "Originate" as the application due to
|
||||
+security concerns.
|
||||
diff --git a/main/manager.c b/main/manager.c
|
||||
index fc602bc..44e25b8 100644
|
||||
--- a/main/manager.c
|
||||
+++ b/main/manager.c
|
||||
@@ -5708,6 +5708,7 @@
|
||||
EAGI(/bin/rm,-rf /) */
|
||||
strcasestr(app, "mixmonitor") || /* MixMonitor(blah,,rm -rf) */
|
||||
strcasestr(app, "externalivr") || /* ExternalIVR(rm -rf) */
|
||||
+ strcasestr(app, "originate") || /* Originate(Local/1234,app,System,rm -rf) */
|
||||
(strstr(appdata, "SHELL") && (bad_appdata = 1)) || /* NoOp(${SHELL(rm -rf /)}) */
|
||||
(strstr(appdata, "EVAL") && (bad_appdata = 1)) /* NoOp(${EVAL(${some_var_containing_SHELL})}) */
|
||||
)) {
|
35
net/asterisk-13.x/patches/160-AST-2019-008-13.diff
Normal file
35
net/asterisk-13.x/patches/160-AST-2019-008-13.diff
Normal file
|
@ -0,0 +1,35 @@
|
|||
From c257794330db49f4079a7108d51da60696269b36 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Ford <bford@digium.com>
|
||||
Date: Fri, 08 Nov 2019 13:21:15 -0600
|
||||
Subject: [PATCH] res_pjsip_session.c: Check for port of zero on incoming SDP.
|
||||
|
||||
If a re-invite comes in initiating T.38, but there is no c line in the
|
||||
SDP and the port is also 0, a crash can occur. A check is now done on
|
||||
the port to see if the steam is already declined, preventing the crash.
|
||||
The logic was moved to res_pjsip_session.c because it is handled in a
|
||||
similar manner in later versions of Asterisk.
|
||||
|
||||
ASTERISK-28612
|
||||
Reported by: Salah Ahmed
|
||||
|
||||
Change-Id: Ifc4a0d05b32c7f2156e77fc8435a6ecaa6abada0
|
||||
---
|
||||
|
||||
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
|
||||
index 81f36a7..12cf41d 100644
|
||||
--- a/res/res_pjsip_session.c
|
||||
+++ b/res/res_pjsip_session.c
|
||||
@@ -235,6 +235,13 @@
|
||||
continue;
|
||||
}
|
||||
|
||||
+ /* If we have a port of 0, ignore this stream */
|
||||
+ if (!sdp->media[i]->desc.port) {
|
||||
+ ast_debug(1, "Declining incoming SDP media stream '%s' at position '%d'\n",
|
||||
+ session_media->stream_type, i);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
if (session_media->handler) {
|
||||
handler = session_media->handler;
|
||||
ast_debug(1, "Negotiating incoming SDP media stream '%s' using %s SDP handler\n",
|
401
net/asterisk-13.x/patches/170-AST-2020-001-13.diff
Normal file
401
net/asterisk-13.x/patches/170-AST-2020-001-13.diff
Normal file
|
@ -0,0 +1,401 @@
|
|||
From b4c49adbb9ed22f3ccc4fc45f98421012d6b62a5 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Harwell <kharwell@digium.com>
|
||||
Date: Mon, 19 Oct 2020 17:21:57 -0500
|
||||
Subject: [PATCH] AST-2020-001 - res_pjsip: Return dialog locked and referenced
|
||||
|
||||
pjproject returns the dialog locked and with a reference. However,
|
||||
in Asterisk the method that handles this decrements the reference
|
||||
and removes the lock prior to returning. This makes it possible,
|
||||
under some circumstances, for another thread to free said dialog
|
||||
before the thread that created it attempts to use it again. Of
|
||||
course when the thread that created it tries to use a freed dialog
|
||||
a crash can occur.
|
||||
|
||||
This patch makes it so Asterisk now returns the newly created
|
||||
dialog both locked, and with an added reference. This allows the
|
||||
caller to de-reference, and unlock the dialog when it is safe to
|
||||
do so.
|
||||
|
||||
In the case of a new SIP Invite the lock, and reference are now
|
||||
held for the entirety of the new invite handling process.
|
||||
Otherwise it's possible for the dialog, or its dependent objects,
|
||||
like the transaction, to disappear. For example if there is a TCP
|
||||
transport error.
|
||||
|
||||
Change-Id: I5ef645a47829596f402cf383dc02c629c618969e
|
||||
---
|
||||
|
||||
--- a/include/asterisk/res_pjsip.h
|
||||
+++ b/include/asterisk/res_pjsip.h
|
||||
@@ -1840,6 +1840,11 @@ pjsip_dialog *ast_sip_create_dialog_uac(
|
||||
/*!
|
||||
* \brief General purpose method for creating a UAS dialog with an endpoint
|
||||
*
|
||||
+ * \deprecated This function is unsafe (due to the returned object not being locked nor
|
||||
+ * having its reference incremented) and should no longer be used. Instead
|
||||
+ * use ast_sip_create_dialog_uas_locked so a properly locked and referenced
|
||||
+ * object is returned.
|
||||
+ *
|
||||
* \param endpoint A pointer to the endpoint
|
||||
* \param rdata The request that is starting the dialog
|
||||
* \param[out] status On failure, the reason for failure in creating the dialog
|
||||
@@ -1847,6 +1852,44 @@ pjsip_dialog *ast_sip_create_dialog_uac(
|
||||
pjsip_dialog *ast_sip_create_dialog_uas(const struct ast_sip_endpoint *endpoint, pjsip_rx_data *rdata, pj_status_t *status);
|
||||
|
||||
/*!
|
||||
+ * \brief General purpose method for creating a UAS dialog with an endpoint
|
||||
+ *
|
||||
+ * This function creates and returns a locked, and referenced counted pjsip
|
||||
+ * dialog object. The caller is thus responsible for freeing the allocated
|
||||
+ * memory, decrementing the reference, and releasing the lock when done with
|
||||
+ * the returned object.
|
||||
+ *
|
||||
+ * \note The safest way to unlock the object, and decrement its reference is by
|
||||
+ * calling pjsip_dlg_dec_lock. Alternatively, pjsip_dlg_dec_session can be
|
||||
+ * used to decrement the reference only.
|
||||
+ *
|
||||
+ * The dialog is returned locked and with a reference in order to ensure that the
|
||||
+ * dialog object, and any of its associated objects (e.g. transaction) are not
|
||||
+ * untimely destroyed. For instance, that could happen when a transport error
|
||||
+ * occurs.
|
||||
+ *
|
||||
+ * As long as the caller maintains a reference to the dialog there should be no
|
||||
+ * worry that it might unknowningly be destroyed. However, once the caller unlocks
|
||||
+ * the dialog there is a danger that some of the dialog's internal objects could
|
||||
+ * be lost and/or compromised. For example, when the aforementioned transport error
|
||||
+ * occurs the dialog's associated transaction gets destroyed (see pjsip_dlg_on_tsx_state
|
||||
+ * in sip_dialog.c, and mod_inv_on_tsx_state in sip_inv.c).
|
||||
+ *
|
||||
+ * In this case and before using the dialog again the caller should re-lock the
|
||||
+ * dialog, check to make sure the dialog is still established, and the transaction
|
||||
+ * still exists and has not been destroyed.
|
||||
+ *
|
||||
+ * \param endpoint A pointer to the endpoint
|
||||
+ * \param rdata The request that is starting the dialog
|
||||
+ * \param[out] status On failure, the reason for failure in creating the dialog
|
||||
+ *
|
||||
+ * \retval A locked, and reference counted pjsip_dialog object.
|
||||
+ * \retval NULL on failure
|
||||
+ */
|
||||
+pjsip_dialog *ast_sip_create_dialog_uas_locked(const struct ast_sip_endpoint *endpoint,
|
||||
+ pjsip_rx_data *rdata, pj_status_t *status);
|
||||
+
|
||||
+/*!
|
||||
* \brief General purpose method for creating an rdata structure using specific information
|
||||
* \since 13.15.0
|
||||
*
|
||||
--- a/res/res_pjsip.c
|
||||
+++ b/res/res_pjsip.c
|
||||
@@ -3293,7 +3293,11 @@ static int uas_use_sips_contact(pjsip_rx
|
||||
return 0;
|
||||
}
|
||||
|
||||
-pjsip_dialog *ast_sip_create_dialog_uas(const struct ast_sip_endpoint *endpoint, pjsip_rx_data *rdata, pj_status_t *status)
|
||||
+typedef pj_status_t (*create_dlg_uac)(pjsip_user_agent *ua, pjsip_rx_data *rdata,
|
||||
+ const pj_str_t *contact, pjsip_dialog **p_dlg);
|
||||
+
|
||||
+static pjsip_dialog *create_dialog_uas(const struct ast_sip_endpoint *endpoint,
|
||||
+ pjsip_rx_data *rdata, pj_status_t *status, create_dlg_uac create_fun)
|
||||
{
|
||||
pjsip_dialog *dlg;
|
||||
pj_str_t contact;
|
||||
@@ -3328,11 +3332,7 @@ pjsip_dialog *ast_sip_create_dialog_uas(
|
||||
(type != PJSIP_TRANSPORT_UDP && type != PJSIP_TRANSPORT_UDP6) ? ";transport=" : "",
|
||||
(type != PJSIP_TRANSPORT_UDP && type != PJSIP_TRANSPORT_UDP6) ? pjsip_transport_get_type_name(type) : "");
|
||||
|
||||
-#ifdef HAVE_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK
|
||||
- *status = pjsip_dlg_create_uas_and_inc_lock(pjsip_ua_instance(), rdata, &contact, &dlg);
|
||||
-#else
|
||||
- *status = pjsip_dlg_create_uas(pjsip_ua_instance(), rdata, &contact, &dlg);
|
||||
-#endif
|
||||
+ *status = create_fun(pjsip_ua_instance(), rdata, &contact, &dlg);
|
||||
if (*status != PJ_SUCCESS) {
|
||||
char err[PJ_ERR_MSG_SIZE];
|
||||
|
||||
@@ -3345,11 +3345,46 @@ pjsip_dialog *ast_sip_create_dialog_uas(
|
||||
dlg->sess_count++;
|
||||
pjsip_dlg_set_transport(dlg, &selector);
|
||||
dlg->sess_count--;
|
||||
+
|
||||
+ return dlg;
|
||||
+}
|
||||
+
|
||||
+pjsip_dialog *ast_sip_create_dialog_uas(const struct ast_sip_endpoint *endpoint, pjsip_rx_data *rdata, pj_status_t *status)
|
||||
+{
|
||||
#ifdef HAVE_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK
|
||||
- pjsip_dlg_dec_lock(dlg);
|
||||
+ pjsip_dialog *dlg;
|
||||
+
|
||||
+ dlg = create_dialog_uas(endpoint, rdata, status, pjsip_dlg_create_uas_and_inc_lock);
|
||||
+ if (dlg) {
|
||||
+ pjsip_dlg_dec_lock(dlg);
|
||||
+ }
|
||||
+
|
||||
+ return dlg;
|
||||
+#else
|
||||
+ return create_dialog_uas(endpoint, rdata, status, pjsip_dlg_create_uas);
|
||||
#endif
|
||||
+}
|
||||
+
|
||||
+pjsip_dialog *ast_sip_create_dialog_uas_locked(const struct ast_sip_endpoint *endpoint,
|
||||
+ pjsip_rx_data *rdata, pj_status_t *status)
|
||||
+{
|
||||
+#ifdef HAVE_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK
|
||||
+ return create_dialog_uas(endpoint, rdata, status, pjsip_dlg_create_uas_and_inc_lock);
|
||||
+#else
|
||||
+ /*
|
||||
+ * This is put here in order to be compatible with older versions of pjproject.
|
||||
+ * Best we can do in this case is immediately lock after getting the dialog.
|
||||
+ * However, that does leave a "gap" between creating and locking.
|
||||
+ */
|
||||
+ pjsip_dialog *dlg;
|
||||
+
|
||||
+ dlg = create_dialog_uas(endpoint, rdata, status, pjsip_dlg_create_uas);
|
||||
+ if (dlg) {
|
||||
+ pjsip_dlg_inc_lock(dlg);
|
||||
+ }
|
||||
|
||||
return dlg;
|
||||
+#endif
|
||||
}
|
||||
|
||||
int ast_sip_create_rdata_with_contact(pjsip_rx_data *rdata, char *packet, const char *src_name, int src_port,
|
||||
--- a/res/res_pjsip_pubsub.c
|
||||
+++ b/res/res_pjsip_pubsub.c
|
||||
@@ -1441,7 +1441,7 @@ static struct sip_subscription_tree *cre
|
||||
}
|
||||
sub_tree->role = AST_SIP_NOTIFIER;
|
||||
|
||||
- dlg = ast_sip_create_dialog_uas(endpoint, rdata, dlg_status);
|
||||
+ dlg = ast_sip_create_dialog_uas_locked(endpoint, rdata, dlg_status);
|
||||
if (!dlg) {
|
||||
if (*dlg_status != PJ_EEXISTS) {
|
||||
ast_log(LOG_WARNING, "Unable to create dialog for SIP subscription\n");
|
||||
@@ -1462,8 +1462,16 @@ static struct sip_subscription_tree *cre
|
||||
}
|
||||
|
||||
pjsip_evsub_create_uas(dlg, &pubsub_cb, rdata, 0, &sub_tree->evsub);
|
||||
+
|
||||
subscription_setup_dialog(sub_tree, dlg);
|
||||
|
||||
+ /*
|
||||
+ * The evsub and subscription setup both add dialog refs, so the dialog ref that
|
||||
+ * was added when the dialog was created (see ast_sip_create_dialog_uas_lock) can
|
||||
+ * now be removed. The lock should no longer be needed so can be removed too.
|
||||
+ */
|
||||
+ pjsip_dlg_dec_lock(dlg);
|
||||
+
|
||||
#ifdef HAVE_PJSIP_EVSUB_GRP_LOCK
|
||||
pjsip_evsub_add_ref(sub_tree->evsub);
|
||||
#endif
|
||||
--- a/res/res_pjsip_session.c
|
||||
+++ b/res/res_pjsip_session.c
|
||||
@@ -2050,6 +2050,75 @@ static enum sip_get_destination_result g
|
||||
return SIP_GET_DEST_EXTEN_NOT_FOUND;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * /internal
|
||||
+ * /brief Process initial answer for an incoming invite
|
||||
+ *
|
||||
+ * This function should only be called during the setup, and handling of a
|
||||
+ * new incoming invite. Most, if not all of the time, this will be called
|
||||
+ * when an error occurs and we need to respond as such.
|
||||
+ *
|
||||
+ * When a SIP session termination code is given for the answer it's assumed
|
||||
+ * this call then will be the final bit of processing before ending session
|
||||
+ * setup. As such, we've been holding a lock, and a reference on the invite
|
||||
+ * session's dialog. So before returning this function removes that reference,
|
||||
+ * and unlocks the dialog.
|
||||
+ *
|
||||
+ * \param inv_session The session on which to answer
|
||||
+ * \param rdata The original request
|
||||
+ * \param answer_code The answer's numeric code
|
||||
+ * \param terminate_code The termination code if the answer fails
|
||||
+ * \param notify Whether or not to call on_state_changed
|
||||
+ *
|
||||
+ * \retval 0 if invite successfully answered, -1 if an error occurred
|
||||
+ */
|
||||
+static int new_invite_initial_answer(pjsip_inv_session *inv_session, pjsip_rx_data *rdata,
|
||||
+ int answer_code, int terminate_code, pj_bool_t notify)
|
||||
+{
|
||||
+ pjsip_tx_data *tdata = NULL;
|
||||
+ int res = 0;
|
||||
+
|
||||
+ if (inv_session->state != PJSIP_INV_STATE_DISCONNECTED) {
|
||||
+ if (pjsip_inv_initial_answer(
|
||||
+ inv_session, rdata, answer_code, NULL, NULL, &tdata) != PJ_SUCCESS) {
|
||||
+
|
||||
+ pjsip_inv_terminate(inv_session, terminate_code ? terminate_code : answer_code, notify);
|
||||
+ res = -1;
|
||||
+ } else {
|
||||
+ pjsip_inv_send_msg(inv_session, tdata);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (answer_code >= 300) {
|
||||
+ /*
|
||||
+ * A session is ending. The dialog has a reference that needs to be
|
||||
+ * removed and holds a lock that needs to be unlocked before returning.
|
||||
+ */
|
||||
+ pjsip_dlg_dec_lock(inv_session->dlg);
|
||||
+ }
|
||||
+
|
||||
+ return res;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * /internal
|
||||
+ * /brief Create and initialize a pjsip invite session
|
||||
+
|
||||
+ * pjsip_inv_session adds, and maintains a reference to the dialog upon a successful
|
||||
+ * invite session creation until the session is destroyed. However, we'll wait to
|
||||
+ * remove the reference that was added for the dialog when it gets created since we're
|
||||
+ * not ready to unlock the dialog in this function.
|
||||
+ *
|
||||
+ * So, if this function successfully returns that means it returns with its newly
|
||||
+ * created, and associated dialog locked and with two references (i.e. dialog's
|
||||
+ * reference count should be 2).
|
||||
+ *
|
||||
+ * \param endpoint A pointer to the endpoint
|
||||
+ * \param rdata The request that is starting the dialog
|
||||
+ *
|
||||
+ * \retval A pjsip invite session object
|
||||
+ * \retval NULL on error
|
||||
+ */
|
||||
static pjsip_inv_session *pre_session_setup(pjsip_rx_data *rdata, const struct ast_sip_endpoint *endpoint)
|
||||
{
|
||||
pjsip_tx_data *tdata;
|
||||
@@ -2068,15 +2137,28 @@ static pjsip_inv_session *pre_session_se
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
- dlg = ast_sip_create_dialog_uas(endpoint, rdata, &dlg_status);
|
||||
+
|
||||
+ dlg = ast_sip_create_dialog_uas_locked(endpoint, rdata, &dlg_status);
|
||||
if (!dlg) {
|
||||
if (dlg_status != PJ_EEXISTS) {
|
||||
pjsip_endpt_respond_stateless(ast_sip_get_pjsip_endpoint(), rdata, 500, NULL, NULL, NULL);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
+
|
||||
+ /*
|
||||
+ * The returned dialog holds a lock and has a reference added. Any paths where the
|
||||
+ * dialog invite session is not returned must unlock the dialog and remove its reference.
|
||||
+ */
|
||||
+
|
||||
if (pjsip_inv_create_uas(dlg, rdata, NULL, options, &inv_session) != PJ_SUCCESS) {
|
||||
pjsip_endpt_respond_stateless(ast_sip_get_pjsip_endpoint(), rdata, 500, NULL, NULL, NULL);
|
||||
+ /*
|
||||
+ * The acquired dialog holds a lock, and a reference. Since the dialog is not
|
||||
+ * going to be returned here it must first be unlocked and de-referenced. This
|
||||
+ * must be done prior to calling dialog termination.
|
||||
+ */
|
||||
+ pjsip_dlg_dec_lock(dlg);
|
||||
pjsip_dlg_terminate(dlg);
|
||||
return NULL;
|
||||
}
|
||||
@@ -2085,12 +2167,13 @@ static pjsip_inv_session *pre_session_se
|
||||
inv_session->sdp_neg_flags = PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE;
|
||||
#endif
|
||||
if (pjsip_dlg_add_usage(dlg, &session_module, NULL) != PJ_SUCCESS) {
|
||||
- if (pjsip_inv_initial_answer(inv_session, rdata, 500, NULL, NULL, &tdata) != PJ_SUCCESS) {
|
||||
- pjsip_inv_terminate(inv_session, 500, PJ_FALSE);
|
||||
- }
|
||||
- pjsip_inv_send_msg(inv_session, tdata);
|
||||
+ /* Dialog's lock and a reference are removed in new_invite_initial_answer */
|
||||
+ new_invite_initial_answer(inv_session, rdata, 500, 500, PJ_FALSE);
|
||||
+ /* Remove 2nd reference added at inv_session creation */
|
||||
+ pjsip_dlg_dec_session(inv_session->dlg, &session_module);
|
||||
return NULL;
|
||||
}
|
||||
+
|
||||
return inv_session;
|
||||
}
|
||||
|
||||
@@ -2220,7 +2303,6 @@ static void handle_new_invite_request(pj
|
||||
{
|
||||
RAII_VAR(struct ast_sip_endpoint *, endpoint,
|
||||
ast_pjsip_rdata_get_endpoint(rdata), ao2_cleanup);
|
||||
- pjsip_tx_data *tdata = NULL;
|
||||
pjsip_inv_session *inv_session = NULL;
|
||||
struct ast_sip_session *session;
|
||||
struct new_invite invite;
|
||||
@@ -2233,27 +2315,48 @@ static void handle_new_invite_request(pj
|
||||
return;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * Upon a successful pre_session_setup the associated dialog is returned locked
|
||||
+ * and with an added reference. Well actually two references. One added when the
|
||||
+ * dialog itself was created, and another added when the pjsip invite session was
|
||||
+ * created and the dialog was added to it.
|
||||
+ *
|
||||
+ * In order to ensure the dialog's, and any of its internal attributes, lifetimes
|
||||
+ * we'll hold the lock and maintain the reference throughout the entire new invite
|
||||
+ * handling process. See ast_sip_create_dialog_uas_locked for more details but,
|
||||
+ * basically we do this to make sure a transport failure does not destroy the dialog
|
||||
+ * and/or transaction out from underneath us between pjsip calls. Alternatively, we
|
||||
+ * could probably release the lock if we needed to, but then we'd have to re-lock and
|
||||
+ * check the dialog and transaction prior to every pjsip call.
|
||||
+ *
|
||||
+ * That means any off nominal/failure paths in this function must remove the associated
|
||||
+ * dialog reference added at dialog creation, and remove the lock. As well the
|
||||
+ * referenced pjsip invite session must be "cleaned up", which should also then
|
||||
+ * remove its reference to the dialog at that time.
|
||||
+ *
|
||||
+ * Nominally we'll unlock the dialog, and release the reference when all new invite
|
||||
+ * process handling has successfully completed.
|
||||
+ */
|
||||
+
|
||||
#ifdef HAVE_PJSIP_INV_SESSION_REF
|
||||
if (pjsip_inv_add_ref(inv_session) != PJ_SUCCESS) {
|
||||
ast_log(LOG_ERROR, "Can't increase the session reference counter\n");
|
||||
- if (inv_session->state != PJSIP_INV_STATE_DISCONNECTED) {
|
||||
- if (pjsip_inv_initial_answer(inv_session, rdata, 500, NULL, NULL, &tdata) == PJ_SUCCESS) {
|
||||
- pjsip_inv_terminate(inv_session, 500, PJ_FALSE);
|
||||
- } else {
|
||||
- pjsip_inv_send_msg(inv_session, tdata);
|
||||
- }
|
||||
+ /* Dialog's lock and a reference are removed in new_invite_initial_answer */
|
||||
+ if (!new_invite_initial_answer(inv_session, rdata, 500, 500, PJ_FALSE)) {
|
||||
+ /* Terminate the session if it wasn't done in the answer */
|
||||
+ pjsip_inv_terminate(inv_session, 500, PJ_FALSE);
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
-
|
||||
session = ast_sip_session_alloc(endpoint, NULL, inv_session, rdata);
|
||||
if (!session) {
|
||||
- if (pjsip_inv_initial_answer(inv_session, rdata, 500, NULL, NULL, &tdata) == PJ_SUCCESS) {
|
||||
+ /* Dialog's lock and reference are removed in new_invite_initial_answer */
|
||||
+ if (!new_invite_initial_answer(inv_session, rdata, 500, 500, PJ_FALSE)) {
|
||||
+ /* Terminate the session if it wasn't done in the answer */
|
||||
pjsip_inv_terminate(inv_session, 500, PJ_FALSE);
|
||||
- } else {
|
||||
- pjsip_inv_send_msg(inv_session, tdata);
|
||||
}
|
||||
+
|
||||
#ifdef HAVE_PJSIP_INV_SESSION_REF
|
||||
pjsip_inv_dec_ref(inv_session);
|
||||
#endif
|
||||
@@ -2271,6 +2374,17 @@ static void handle_new_invite_request(pj
|
||||
invite.rdata = rdata;
|
||||
new_invite(&invite);
|
||||
|
||||
+ /*
|
||||
+ * The dialog lock and reference added at dialog creation time must be
|
||||
+ * maintained throughout the new invite process. Since we're pretty much
|
||||
+ * done at this point with things it's safe to go ahead and remove the lock
|
||||
+ * and the reference here. See ast_sip_create_dialog_uas_locked for more info.
|
||||
+ *
|
||||
+ * Note, any future functionality added that does work using the dialog must
|
||||
+ * be done before this.
|
||||
+ */
|
||||
+ pjsip_dlg_dec_lock(inv_session->dlg);
|
||||
+
|
||||
ao2_ref(session, -1);
|
||||
}
|
||||
|
107
net/asterisk-13.x/patches/180-AST-2020-002-13.diff
Normal file
107
net/asterisk-13.x/patches/180-AST-2020-002-13.diff
Normal file
|
@ -0,0 +1,107 @@
|
|||
From 01b7ac0d590b0ad2e3e856d1a81fc87154ae68a0 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Ford <bford@digium.com>
|
||||
Date: Mon, 02 Nov 2020 10:29:31 -0600
|
||||
Subject: [PATCH] AST-2020-002 - res_pjsip: Stop sending INVITEs after challenge limit.
|
||||
|
||||
If Asterisk sends out an INVITE and receives a challenge with a
|
||||
different nonce value each time, it will continuously send out INVITEs,
|
||||
even if the call is hung up. The endpoint must be configured for
|
||||
outbound authentication for this to occur. A limit has been set on
|
||||
outbound INVITEs so that, once reached, Asterisk will stop sending
|
||||
INVITEs and the transaction will terminate.
|
||||
|
||||
ASTERISK-29013
|
||||
|
||||
Change-Id: I2d001ca745b00ca8aa12030f2240cd72363b46f7
|
||||
---
|
||||
|
||||
--- a/include/asterisk/res_pjsip.h
|
||||
+++ b/include/asterisk/res_pjsip.h
|
||||
@@ -64,6 +64,9 @@ struct pjsip_tpselector;
|
||||
/*! \brief Maximum number of ciphers supported for a TLS transport */
|
||||
#define SIP_TLS_MAX_CIPHERS 64
|
||||
|
||||
+/*! Maximum number of challenges before assuming that we are in a loop */
|
||||
+#define MAX_RX_CHALLENGES 10
|
||||
+
|
||||
/*!
|
||||
* \brief Structure for SIP transport information
|
||||
*/
|
||||
--- a/include/asterisk/res_pjsip_session.h
|
||||
+++ b/include/asterisk/res_pjsip_session.h
|
||||
@@ -161,6 +161,8 @@ struct ast_sip_session {
|
||||
enum ast_sip_dtmf_mode dtmf;
|
||||
/*! Initial incoming INVITE Request-URI. NULL otherwise. */
|
||||
pjsip_uri *request_uri;
|
||||
+ /*! Number of challenges received during outgoing requests to determine if we are in a loop */
|
||||
+ unsigned int authentication_challenge_count:4;
|
||||
};
|
||||
|
||||
typedef int (*ast_sip_session_request_creation_cb)(struct ast_sip_session *session, pjsip_tx_data *tdata);
|
||||
--- a/res/res_pjsip.c
|
||||
+++ b/res/res_pjsip.c
|
||||
@@ -3693,8 +3693,6 @@ static pj_bool_t does_method_match(const
|
||||
return pj_stristr(&method, message_method) ? PJ_TRUE : PJ_FALSE;
|
||||
}
|
||||
|
||||
-/*! Maximum number of challenges before assuming that we are in a loop */
|
||||
-#define MAX_RX_CHALLENGES 10
|
||||
#define TIMER_INACTIVE 0
|
||||
#define TIMEOUT_TIMER2 5
|
||||
|
||||
--- a/res/res_pjsip_session.c
|
||||
+++ b/res/res_pjsip_session.c
|
||||
@@ -1184,7 +1184,6 @@ static pjsip_module session_reinvite_mod
|
||||
.on_rx_request = session_reinvite_on_rx_request,
|
||||
};
|
||||
|
||||
-
|
||||
void ast_sip_session_send_request_with_cb(struct ast_sip_session *session, pjsip_tx_data *tdata,
|
||||
ast_sip_session_response_cb on_response)
|
||||
{
|
||||
@@ -1470,12 +1469,17 @@ struct ast_sip_session *ast_sip_session_
|
||||
ao2_ref(session, -1);
|
||||
return NULL;
|
||||
}
|
||||
+
|
||||
+ /* Track the number of challenges received on outbound requests */
|
||||
+ session->authentication_challenge_count = 0;
|
||||
+
|
||||
AST_LIST_TRAVERSE(&session->supplements, iter, next) {
|
||||
if (iter->session_begin) {
|
||||
iter->session_begin(session);
|
||||
}
|
||||
}
|
||||
|
||||
+
|
||||
/* Avoid unnecessary ref manipulation to return a session */
|
||||
ret_session = session;
|
||||
session = NULL;
|
||||
@@ -1642,6 +1646,11 @@ static pj_bool_t outbound_invite_auth(pj
|
||||
|
||||
session = inv->mod_data[session_module.id];
|
||||
|
||||
+ if (++session->authentication_challenge_count > MAX_RX_CHALLENGES) {
|
||||
+ ast_debug(3, "Initial INVITE reached maximum number of auth attempts.\n");
|
||||
+ return PJ_FALSE;
|
||||
+ }
|
||||
+
|
||||
if (ast_sip_create_request_with_auth(&session->endpoint->outbound_auths, rdata, tsx,
|
||||
&tdata)) {
|
||||
return PJ_FALSE;
|
||||
@@ -2888,6 +2897,7 @@ static void session_inv_on_tsx_state_cha
|
||||
ast_debug(1, "reINVITE received final response code %d\n",
|
||||
tsx->status_code);
|
||||
if ((tsx->status_code == 401 || tsx->status_code == 407)
|
||||
+ && ++session->authentication_challenge_count < MAX_RX_CHALLENGES
|
||||
&& !ast_sip_create_request_with_auth(
|
||||
&session->endpoint->outbound_auths,
|
||||
e->body.tsx_state.src.rdata, tsx, &tdata)) {
|
||||
@@ -2962,6 +2972,7 @@ static void session_inv_on_tsx_state_cha
|
||||
(int) pj_strlen(&tsx->method.name), pj_strbuf(&tsx->method.name),
|
||||
tsx->status_code);
|
||||
if ((tsx->status_code == 401 || tsx->status_code == 407)
|
||||
+ && ++session->authentication_challenge_count < MAX_RX_CHALLENGES
|
||||
&& !ast_sip_create_request_with_auth(
|
||||
&session->endpoint->outbound_auths,
|
||||
e->body.tsx_state.src.rdata, tsx, &tdata)) {
|
77
net/asterisk-15.x-chan-lantiq/Makefile
Normal file
77
net/asterisk-15.x-chan-lantiq/Makefile
Normal file
|
@ -0,0 +1,77 @@
|
|||
#
|
||||
# Copyright (C) 2018 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=asterisk15-chan-lantiq
|
||||
PKG_VERSION:=20180215
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://github.com/kochstefan/asterisk_channel_lantiq.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=c9d68dd06fcd46ac7985df45f8c2b8833e658f8e
|
||||
PKG_MIRROR_HASH:=8666c18b24adf9da3ddf12306fcf0a8b4f56860c256b172bd0ba5c2a7a3ab25e
|
||||
PKG_SOURCE_PROTO:=git
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
|
||||
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SUBMENU:=Telephony Lantiq
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Lantiq channel driver
|
||||
URL:=https://github.com/kochstefan/asterisk_channel_lantiq
|
||||
DEPENDS:=+asterisk15 +kmod-ltq-vmmc
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
An implementation of a Lantiq TAPI channel driver for Asterisk 15.
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/conffiles
|
||||
/etc/asterisk/lantiq.conf
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
$(INSTALL_DATA) ./files/default.exports \
|
||||
$(PKG_BUILD_DIR)/src/channels/chan_lantiq.exports
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
cd $(PKG_BUILD_DIR)/src/channels && \
|
||||
$(TARGET_CC) -o chan_lantiq.o -c chan_lantiq.c -MD -MT chan_lantiq.o \
|
||||
-MF .chan_lantiq.o.d -MP -pthread \
|
||||
$(TARGET_CFLAGS) -DAST_MODULE_SELF_SYM=__internal_chan_lantiq_self \
|
||||
-I$(STAGING_DIR)/usr/include/asterisk-15/include \
|
||||
$(TARGET_CPPFLAGS) \
|
||||
-Wall -Wstrict-prototypes -Wmissing-prototypes \
|
||||
-Wmissing-declarations $(FPIC) -DAST_MODULE=\"chan_lantiq\" && \
|
||||
$(TARGET_CC) -o chan_lantiq.so -pthread $(TARGET_LDFLAGS) -shared \
|
||||
-Wl,--version-script,chan_lantiq.exports,--warn-common \
|
||||
chan_lantiq.o
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/etc/asterisk
|
||||
$(INSTALL_CONF) \
|
||||
$(PKG_BUILD_DIR)/src/configs/samples/lantiq.conf.sample \
|
||||
$(1)/etc/asterisk/lantiq.conf
|
||||
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
|
||||
$(INSTALL_BIN) \
|
||||
$(PKG_BUILD_DIR)/src/channels/chan_lantiq.so \
|
||||
$(1)/usr/lib/asterisk/modules
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
8
net/asterisk-15.x-chan-lantiq/files/default.exports
Normal file
8
net/asterisk-15.x-chan-lantiq/files/default.exports
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
global:
|
||||
/* See main/asterisk.exports.in for an explanation why this is
|
||||
* needed. */
|
||||
_IO_stdin_used;
|
||||
local:
|
||||
*;
|
||||
};
|
11
net/asterisk-15.x/Config.in
Normal file
11
net/asterisk-15.x/Config.in
Normal file
|
@ -0,0 +1,11 @@
|
|||
menu "Advanced configuration"
|
||||
depends on PACKAGE_asterisk15
|
||||
|
||||
config ASTERISK15_LOW_MEMORY
|
||||
bool "Optimize Asterisk 15 for low memory usage"
|
||||
default n
|
||||
help
|
||||
Warning: this feature is known to cause problems with some modules.
|
||||
Disable it if you experience problems like segmentation faults.
|
||||
|
||||
endmenu
|
1021
net/asterisk-15.x/Makefile
Normal file
1021
net/asterisk-15.x/Makefile
Normal file
File diff suppressed because it is too large
Load diff
4
net/asterisk-15.x/files/asterisk.default
Normal file
4
net/asterisk-15.x/files/asterisk.default
Normal file
|
@ -0,0 +1,4 @@
|
|||
## startup options for /etc/init.d/asterisk
|
||||
|
||||
ENABLE_ASTERISK="yes"
|
||||
OPTIONS=""
|
33
net/asterisk-15.x/files/asterisk.init
Normal file
33
net/asterisk-15.x/files/asterisk.init
Normal file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2014 OpenWrt.org
|
||||
|
||||
START=99
|
||||
APP=asterisk
|
||||
OPTIONS=
|
||||
DEST=
|
||||
DEFAULT=$DEST/etc/default/$APP
|
||||
BIN_FILE=$DEST/usr/sbin/$APP
|
||||
PID_FILE=$DEST/var/run/$APP/$APP.pid
|
||||
|
||||
start() {
|
||||
[ -f $DEFAULT ] && . $DEFAULT
|
||||
[ -d $DEST/var/run/asterisk ] || mkdir -p $DEST/var/run/asterisk
|
||||
[ -d $DEST/var/log/asterisk ] || mkdir -p $DEST/var/log/asterisk
|
||||
[ -d $DEST/var/spool/asterisk ] || mkdir -p $DEST/var/spool/asterisk
|
||||
[ -d $DEST/var/lib/asterisk ] || mkdir -p $DEST/var/lib/asterisk
|
||||
[ -d $DEST/var/lib/asterisk/keys ] || mkdir -p $DEST/var/lib/asterisk/keys
|
||||
[ -d $DEST/var/log/asterisk/cdr-csv ] || mkdir -p $DEST/var/log/asterisk/cdr-csv
|
||||
|
||||
SERVICE_PID_FILE="/var/run/asterisk/asterisk.pid" \
|
||||
service_start $BIN_FILE $OPTIONS
|
||||
}
|
||||
|
||||
stop() {
|
||||
SERVICE_PID_FILE="/var/run/asterisk/asterisk.pid" \
|
||||
service_stop $BIN_FILE
|
||||
}
|
||||
|
||||
reload() {
|
||||
SERVICE_PID_FILE="/var/run/asterisk/asterisk.pid" \
|
||||
service_reload $BIN_FILE
|
||||
}
|
22
net/asterisk-15.x/patches/001-disable-semaphores-check.patch
Normal file
22
net/asterisk-15.x/patches/001-disable-semaphores-check.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -985,19 +985,6 @@ AC_LINK_IFELSE(
|
||||
]
|
||||
)
|
||||
|
||||
-# Some platforms define sem_init(), but only support sem_open(). joyous.
|
||||
-AC_MSG_CHECKING(for working unnamed semaphores)
|
||||
-AC_RUN_IFELSE(
|
||||
- [AC_LANG_PROGRAM([#include <semaphore.h>],
|
||||
- [sem_t sem; return sem_init(&sem, 0, 0);])],
|
||||
- AC_MSG_RESULT(yes)
|
||||
- AC_DEFINE([HAS_WORKING_SEMAPHORE], 1, [Define to 1 if anonymous semaphores work.]),
|
||||
- AC_MSG_RESULT(no),
|
||||
- AC_MSG_RESULT(cross-compile)
|
||||
- AC_MSG_NOTICE([WARNING: result yes guessed because of cross compilation])
|
||||
- AC_DEFINE([HAS_WORKING_SEMAPHORE], 1, [Define to 1 if anonymous semaphores work.])
|
||||
-)
|
||||
-
|
||||
LIBS="$save_LIBS"
|
||||
CFLAGS="$save_CFLAGS"
|
||||
if test "${ac_cv_pthread_rwlock_timedwrlock}" = "yes"; then
|
10
net/asterisk-15.x/patches/002-undef-res-ninit.patch
Normal file
10
net/asterisk-15.x/patches/002-undef-res-ninit.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1319,7 +1319,6 @@ AC_LINK_IFELSE(
|
||||
#include <resolv.h>],
|
||||
[int foo = res_ninit(NULL);])],
|
||||
AC_MSG_RESULT(yes)
|
||||
- AC_DEFINE([HAVE_RES_NINIT], 1, [Define to 1 if your system has the re-entrant resolver functions.])
|
||||
AC_SEARCH_LIBS(res_9_ndestroy, resolv)
|
||||
AC_MSG_CHECKING(for res_ndestroy)
|
||||
AC_LINK_IFELSE(
|
11
net/asterisk-15.x/patches/004-disable-check-for-hrirs.patch
Normal file
11
net/asterisk-15.x/patches/004-disable-check-for-hrirs.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2709,7 +2709,7 @@ else
|
||||
fi
|
||||
|
||||
# conf_bridge (binaural rendering): check if HRIRs are available
|
||||
-AC_CHECK_FILES([bridges/bridge_softmix/include/hrirs.h])
|
||||
+# AC_CHECK_FILES([bridges/bridge_softmix/include/hrirs.h])
|
||||
|
||||
AC_CONFIG_FILES([build_tools/menuselect-deps makeopts])
|
||||
AST_CHECK_MANDATORY
|
|
@ -0,0 +1,22 @@
|
|||
--- a/res/ael/ael.flex
|
||||
+++ b/res/ael/ael.flex
|
||||
@@ -601,7 +601,7 @@ includes { STORE_POS; return KW_INCLUDES
|
||||
snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf);
|
||||
ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf));
|
||||
}
|
||||
-#ifdef SOLARIS
|
||||
+#if !defined(HAVE_GLOB_NOMAGIC) || !defined(HAVE_GLOB_BRACE) || defined(DEBUG_NONGNU)
|
||||
glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf);
|
||||
#else
|
||||
glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf);
|
||||
--- a/res/ael/ael_lex.c
|
||||
+++ b/res/ael/ael_lex.c
|
||||
@@ -1982,7 +1982,7 @@ YY_RULE_SETUP
|
||||
snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf);
|
||||
ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf));
|
||||
}
|
||||
-#ifdef SOLARIS
|
||||
+#if !defined(HAVE_GLOB_NOMAGIC) || !defined(HAVE_GLOB_BRACE) || defined(DEBUG_NONGNU)
|
||||
glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf);
|
||||
#else
|
||||
glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf);
|
10
net/asterisk-15.x/patches/056-fix-check_expr2-build.patch
Normal file
10
net/asterisk-15.x/patches/056-fix-check_expr2-build.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- a/utils/Makefile
|
||||
+++ b/utils/Makefile
|
||||
@@ -182,7 +182,6 @@ check_expr2: $(ASTTOPDIR)/main/ast_expr2
|
||||
$(CC) -g -o check_expr2 ast_expr2fz.o ast_expr2z.o -lm
|
||||
$(ECHO_PREFIX) echo " [RM] ast_expr2fz.o ast_expr2z.o"
|
||||
rm ast_expr2z.o ast_expr2fz.o
|
||||
- ./check_expr2 expr2.testinput
|
||||
|
||||
smsq: smsq.o strcompat.o
|
||||
smsq: LIBS+=$(POPT_LIB)
|
28
net/asterisk-15.x/patches/100-build-reproducibly.patch
Normal file
28
net/asterisk-15.x/patches/100-build-reproducibly.patch
Normal file
|
@ -0,0 +1,28 @@
|
|||
--- a/build_tools/make_build_h
|
||||
+++ b/build_tools/make_build_h
|
||||
@@ -5,6 +5,14 @@ MACHINE=`uname -m | sed 's/\\\\/\\\\\\\
|
||||
OS=`uname -s`
|
||||
USER=`id | awk -F")" '{print $1}'| awk -F"(" '{print $2}' | sed 's/\\\\/\\\\\\\\/g'`
|
||||
DATE=`date -u "+%Y-%m-%d %H:%M:%S"`
|
||||
+if [ -n "${SOURCE_DATE_EPOCH}" ]; then
|
||||
+ # building reproducibly, faking some data
|
||||
+ HOSTNAME='buildd.debian.org'
|
||||
+ KERNEL='unknown'
|
||||
+ MACHINE='unknown'
|
||||
+ USER='nobody'
|
||||
+ DATE=`date -u "+%Y-%m-%d %H:%M:%S" -d @${SOURCE_DATE_EPOCH}`
|
||||
+fi
|
||||
cat << END
|
||||
/*
|
||||
* build.h
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -479,7 +479,7 @@ doc/core-en_US.xml: makeopts .lastclean
|
||||
@echo "<docs xmlns:xi=\"http://www.w3.org/2001/XInclude\">" >> $@
|
||||
@for x in $(MOD_SUBDIRS); do \
|
||||
printf "$$x " ; \
|
||||
- for i in `find $$x -name '*.c'`; do \
|
||||
+ for i in `find $$x -name '*.c' | LC_ALL=C sort`; do \
|
||||
$(AWK) -f build_tools/get_documentation $$i >> $@ ; \
|
||||
done ; \
|
||||
done
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue