From e0e89d5ce2bc7a1cfcfba5592b1186080d77b0d5 Mon Sep 17 00:00:00 2001 From: Walter Doekes Date: Tue, 16 Feb 2021 11:17:31 +0100 Subject: [PATCH 1/6] Add Asterisk 18 build; bump version --- .dockerignore | 1 + Dockerfile | 24 +++++++++++++++--------- Dockerfile.build | 8 ++++---- changelog | 6 ++++++ control | 16 ++++++++-------- 5 files changed, 34 insertions(+), 21 deletions(-) diff --git a/.dockerignore b/.dockerignore index c45d535..7deb038 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,3 +6,4 @@ /.dockerignore /.git /.gitignore +/.*swp diff --git a/Dockerfile b/Dockerfile index 7042449..44e950d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,7 +40,7 @@ RUN apt-get install -y \ # Set up upstream source, move debian dir and jump into dir. # -# Trick to allow caching of asterisk*.tar.bz2/gz files. Download them +# Trick to allow caching of ${upname}*.tar.bz2/gz files. Download them # once using the curl command below into .cache/* if you want. The COPY # is made conditional by the "[2]" "wildcard". (We need one existing # file (README.rst) so the COPY doesn't fail.) @@ -79,13 +79,13 @@ RUN echo "deb http://ppa.osso.nl/${osdistro} ${oscodename} osso" >/etc/apt/sourc # RUN printf "%s\n" "Package: asterisk asterisk-*" "Pin: version 1:11.*" "Pin-Priority: 600" \ # >/etc/apt/preferences.d/asterisk.pref RUN set -x && \ - cd .. && for version in 11 13 16 18; do \ + cd .. && for version in 18 16 13 11; do \ curl --fail -O https://junk.devs.nu/a/asterisk/asterisk-$version-include.tar.bz2 && \ tar jxf asterisk-$version-include.tar.bz2; done && \ - test $(md5sum asterisk-11-include.tar.bz2 | awk '{print $1}') = 2d0e18839d469f0929bc45738faa1b77 && \ - test $(md5sum asterisk-13-include.tar.bz2 | awk '{print $1}') = cad97c28885add2c0b3fe7b7c713f2aa && \ + test $(md5sum asterisk-18-include.tar.bz2 | awk '{print $1}') = bddb6ba2a27e80470cccacc67a725ffb && \ test $(md5sum asterisk-16-include.tar.bz2 | awk '{print $1}') = f2135dd7204514f6899374618aa7873f && \ - test $(md5sum asterisk-18-include.tar.bz2 | awk '{print $1}') = f2135dd7204514f6899374618aa7873f && \ + test $(md5sum asterisk-13-include.tar.bz2 | awk '{print $1}') = cad97c28885add2c0b3fe7b7c713f2aa && \ + test $(md5sum asterisk-11-include.tar.bz2 | awk '{print $1}') = 2d0e18839d469f0929bc45738faa1b77 && \ set +x # Apt-get prerequisites according to control file. @@ -108,12 +108,18 @@ RUN rm -rf debian/.cache # Build! RUN DEB_BUILD_OPTIONS=parallel=1 dpkg-buildpackage -us -uc -sa -# TODO: for bonus points, we could run quick tests here; -# for starters dpkg -i tests? - -# Write output files (store build args in ENV first). +# Get build args so we can make a version string. ENV oscodename=$oscodename osdistshort=$osdistshort \ upname=$upname upversion=$upversion debversion=$debversion + +# Do a quick test that all subpackages got their own codec_g729.so file. +RUN . /etc/os-release && fullversion=${upversion}-${debversion}+${osdistshort}${VERSION_ID} && \ + packages=$(sed -e '/^Package:/!d;s/^[^:]*: //' debian/control) && \ + for pkg in $packages; do deb=../${pkg}_${fullversion}_amd64.deb; \ + echo "Checking .so in $deb" >&2; dpkg-deb -c "$deb" | \ + grep -F './usr/lib/asterisk/modules/codec_g729.so'; done + +# Write output files. RUN . /etc/os-release && fullversion=${upversion}-${debversion}+${osdistshort}${VERSION_ID} && \ mkdir -p /dist/${upname}_${fullversion} && \ mv /build/*${fullversion}* /dist/${upname}_${fullversion}/ && \ diff --git a/Dockerfile.build b/Dockerfile.build index 9045b91..9b8623b 100755 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -39,7 +39,7 @@ dockversion=$(echo build-${upname}-${upversion}-${debversion}-${oscodename} | sed -e 's/[^0-9A-Za-z_.-]/_/g') # Will build files. -if ! docker build \ +docker build \ --pull \ --ulimit nofile=512 \ --build-arg osdistro=$osdistro \ @@ -52,9 +52,9 @@ if ! docker build \ -t $dockversion \ -f Dockerfile \ . -then - ret=$? - echo "fail" >&2 +ret=$? +if test $ret -ne 0; then + echo "fail ($ret)" >&2 exit $ret fi diff --git a/changelog b/changelog index fe5caea..4dee0d5 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,9 @@ +asterisk-g72x (1.4.3-0osso2+deb10) buster; urgency=medium + + * New build, this time with asterisk-18 packages as well. + + -- Walter Doekes Tue, 16 Feb 2021 11:01:50 +0100 + asterisk-g72x (1.4.3-0osso1+deb10) buster; urgency=medium * Update to upstream 1.4.3 (which has a source package now). diff --git a/control b/control index 5706548..8a67ce4 100644 --- a/control +++ b/control @@ -22,9 +22,9 @@ Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: - asterisk-g72x-g729-ast11, + asterisk-g72x-g729-ast16, asterisk-g72x-g729-ast13, - asterisk-g72x-g729-ast16 + asterisk-g72x-g729-ast11 Recommends: asterisk (>= 1:18), asterisk (<< 1:17), asterisk-modules Description: G.729 codec support for the Asterisk PBX G.729 is a royalty-free narrow-band vocoder-based audio data @@ -44,9 +44,9 @@ Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: - asterisk-g72x-g729-ast11, + asterisk-g72x-g729-ast18, asterisk-g72x-g729-ast13, - asterisk-g72x-g729-ast18 + asterisk-g72x-g729-ast11 Recommends: asterisk (>= 1:16), asterisk (<< 1:17), asterisk-modules Description: G.729 codec support for the Asterisk PBX G.729 is a royalty-free narrow-band vocoder-based audio data @@ -66,9 +66,9 @@ Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: - asterisk-g72x-g729-ast11, + asterisk-g72x-g729-ast18, asterisk-g72x-g729-ast16, - asterisk-g72x-g729-ast18 + asterisk-g72x-g729-ast11 Recommends: asterisk (>= 1:13), asterisk (<< 1:14), asterisk-modules Description: G.729 codec support for the Asterisk PBX G.729 is a royalty-free narrow-band vocoder-based audio data @@ -88,9 +88,9 @@ Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: - asterisk-g72x-g729-ast13, + asterisk-g72x-g729-ast18, asterisk-g72x-g729-ast16, - asterisk-g72x-g729-ast18 + asterisk-g72x-g729-ast13 Recommends: asterisk (>= 1:11), asterisk (<< 1:12), asterisk-modules Description: G.729 codec support for the Asterisk PBX G.729 is a royalty-free narrow-band vocoder-based audio data From 754456cbeb225984505798515591ee32591c15af Mon Sep 17 00:00:00 2001 From: Walter Doekes Date: Fri, 24 Jun 2022 16:43:19 +0200 Subject: [PATCH 2/6] Fix build for bullseye; 1.4.3-0osso3 --- Dockerfile | 80 +++++++++++++++++------------------------------- Dockerfile.build | 35 ++++++++++----------- changelog | 8 ++++- 3 files changed, 51 insertions(+), 72 deletions(-) diff --git a/Dockerfile b/Dockerfile index 44e950d..a204b03 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,44 +3,40 @@ ARG oscodename=stretch FROM $osdistro:$oscodename LABEL maintainer="Walter Doekes " +LABEL dockerfile-vcs=https://github.com/ossobv/asterisk-g72x-deb ARG DEBIAN_FRONTEND=noninteractive +# This time no "keeping the build small". We only use this container for +# building/testing and not for running, so we can keep files like apt +# cache. We do this before copying anything and before getting lots of +# ARGs from the user. That keeps this bit cached. +RUN echo 'APT::Install-Recommends "0";' >/etc/apt/apt.conf.d/01norecommends +# We'll be ignoring "debconf: delaying package configuration, since apt-utils is not installed" +RUN apt-get update -q && \ + apt-get dist-upgrade -y && \ + apt-get install -y \ + ca-certificates curl \ + build-essential devscripts dh-autoreconf dpkg-dev equivs quilt + +# Apt-get prerequisites according to control file. +COPY control /build/debian/control +RUN mk-build-deps --install --remove --tool "apt-get -y" /build/debian/control + # debian, deb, stretch, asterisk-g72x, 1.3+20+3058c45eb60d, '', 0osso1 -ARG osdistro -ARG osdistshort -ARG oscodename -ARG upname -ARG upversion -ARG debepoch= -ARG debversion +ARG osdistro osdistshort oscodename upname upversion debepoch= debversion -# Copy debian dir, check version -RUN mkdir -p /build/debian -COPY ./changelog /build/debian/changelog -RUN . /etc/os-release && fullversion="${upversion}-${debversion}+${osdistshort}${VERSION_ID}" && \ +COPY changelog /build/debian/changelog +RUN . /etc/os-release && \ + sed -i -e "1s/+[^+)]*)/+${osdistshort}${VERSION_ID})/;1s/) stable;/) ${oscodename};/" \ + /build/debian/changelog && \ + fullversion="${upversion}-${debversion}+${osdistshort}${VERSION_ID}" && \ expected="${upname} (${debepoch}${fullversion}) ${oscodename}; urgency=medium" && \ head -n1 /build/debian/changelog && \ if test "$(head -n1 /build/debian/changelog)" != "${expected}"; \ then echo "${expected} <-- mismatch" >&2; false; fi -# This time no "keeping the build small". We only use this container for -# building/testing and not for running, so we can keep files like apt -# cache. -RUN echo 'APT::Install-Recommends "0";' >/etc/apt/apt.conf.d/01norecommends -#RUN sed -i -e 's:deb.debian.org:apt.osso.nl:;s:security.debian.org:apt.osso.nl/debian-security:' /etc/apt/sources.list -#RUN sed -i -e 's:security.ubuntu.com:apt.osso.nl:;s:archive.ubuntu.com:apt.osso.nl:' /etc/apt/sources.list -RUN apt-get update -q -RUN apt-get install -y apt-utils -RUN apt-get dist-upgrade -y -RUN apt-get install -y \ - bzip2 ca-certificates curl mercurial \ - dirmngr gnupg \ - build-essential dh-autoreconf devscripts dpkg-dev equivs quilt - -# Set up upstream source, move debian dir and jump into dir. -# -# Trick to allow caching of ${upname}*.tar.bz2/gz files. Download them +# Trick to allow caching of UPNAME*.tar.gz files. Download them # once using the curl command below into .cache/* if you want. The COPY # is made conditional by the "[2]" "wildcard". (We need one existing # file (README.rst) so the COPY doesn't fail.) @@ -67,15 +63,12 @@ RUN (test -f /build/${upname}_${upversion}.orig.tar.bz2 || \ test $(md5sum /build/${upname}_${upversion}.orig.tar.bz2 | awk '{print $1}') = e99e153e88fe45cde0a7b04e22f1a414 RUN cd /build && tar jxf "${upname}_${upversion}.orig.tar.bz2" && \ mv debian "${upname}-${upversion}/" +COPY asterisk-g72x-g729-ast11.install asterisk-g72x-g729-ast13.install \ + asterisk-g72x-g729-ast16.install asterisk-g72x-g729-ast18.install \ + compat rules source /build/${upname}-${upversion}/debian/ WORKDIR "/build/${upname}-${upversion}" -# We require (lib)bcg729 from elsewhere -RUN echo "deb http://ppa.osso.nl/${osdistro} ${oscodename} osso" >/etc/apt/sources.list.d/osso-ppa.list && \ - # apt-key adv --keyserver pgp.mit.edu --recv-keys 0xBEAD51B6B36530F5 && \ - curl https://ppa.osso.nl/support+ppa@osso.nl.gpg | apt-key add - && \ - apt-get update -# We could fetch asterisk-dev from elsewhere as well, but instead we'll -# use include-tars. +# We'll use include-tars so we can build for multiple asterisk versions. # RUN printf "%s\n" "Package: asterisk asterisk-*" "Pin: version 1:11.*" "Pin-Priority: 600" \ # >/etc/apt/preferences.d/asterisk.pref RUN set -x && \ @@ -88,23 +81,6 @@ RUN set -x && \ test $(md5sum asterisk-11-include.tar.bz2 | awk '{print $1}') = 2d0e18839d469f0929bc45738faa1b77 && \ set +x -# Apt-get prerequisites according to control file. -COPY ./control debian/control -RUN mk-build-deps --install --remove --tool "apt-get -y" debian/control - -# Set up build env -RUN printf "%s\n" \ - QUILT_PATCHES=debian/patches \ - QUILT_NO_DIFF_INDEX=1 \ - QUILT_NO_DIFF_TIMESTAMPS=1 \ - 'QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"' \ - 'QUILT_DIFF_OPTS="--show-c-function"' \ - >~/.quiltrc -COPY . debian/ -# Yuck -- we'd like to .dockerignore /.cache, but then loading files -# from the cache doesn't work. -RUN rm -rf debian/.cache - # Build! RUN DEB_BUILD_OPTIONS=parallel=1 dpkg-buildpackage -us -uc -sa diff --git a/Dockerfile.build b/Dockerfile.build index 9b8623b..0eb56f2 100755 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -1,9 +1,9 @@ -#!/bin/bash +#!/bin/sh cd "$(dirname "$0")" # jump to curdir +set -eu # Pass these on the command line. -oscodename=${1:-debian/stretch} # debian/stretch - +oscodename=${1:-debian/bullseye} # debian/stretch buildversion=$(sed -e '1!d;s/.*(//;s/).*//' changelog) upname=asterisk-g72x upversion=$(echo "$buildversion" | sed -e 's/-.*//;s/^[0-9]*://') @@ -17,23 +17,21 @@ echo ".. continuing" osdistro=${oscodename%/*} # debian (or ubuntu) oscodename=${oscodename#*/} # stretch (or bionic) -osdistshort=${osdistro:0:3} # deb (or ubu) case $osdistro/$oscodename in -debian/buster) oscodenum=10;; -debian/stretch) oscodenum=9;; -debian/jessie) oscodenum=8;; -debian/wheezy) oscodenum=7;; -ubuntu/bionic) oscodenum=18.04;; -ubuntu/xenial) oscodenum=16.04;; -ubuntu/trusty) oscodenum=14.04;; +debian/bullseye)osdistshort=deb; oscodenum=11;; +debian/buster) osdistshort=deb; oscodenum=10;; +debian/stretch) osdistshort=deb; oscodenum=9;; +debian/jessie) osdistshort=deb; oscodenum=8;; +debian/wheezy) osdistshort=deb; oscodenum=7;; +ubuntu/jammy) osdistshort=ubu; oscodenum=22.04;; +ubuntu/focal) osdistshort=ubu; oscodenum=20.04;; +ubuntu/bionic) osdistshort=ubu; oscodenum=18.04;; +ubuntu/xenial) osdistshort=ubu; oscodenum=16.04;; +ubuntu/trusty) osdistshort=ubu; oscodenum=14.04;; *) echo "ERROR: undefined OS: $osdistro/$oscodename" >&2 && exit 1 esac _shortver=$osdistshort$oscodenum -# Update changelog -sed -i -e "1s/+\\(deb\\|ubu\\)[0-9.]*) [a-z]\\+;/+$_shortver) $oscodename;/" \ - changelog - # Docker disallows certain tokens in versions. dockversion=$(echo build-${upname}-${upversion}-${debversion}-${oscodename} | sed -e 's/[^0-9A-Za-z_.-]/_/g') @@ -51,10 +49,9 @@ docker build \ --build-arg debversion=$debversion \ -t $dockversion \ -f Dockerfile \ - . -ret=$? -if test $ret -ne 0; then - echo "fail ($ret)" >&2 + . || ret=$? +if test ${ret:-0} -ne 0; then + echo "fail" >&2 exit $ret fi diff --git a/changelog b/changelog index 4dee0d5..15337d3 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,10 @@ -asterisk-g72x (1.4.3-0osso2+deb10) buster; urgency=medium +asterisk-g72x (1.4.3-0osso3+REL) stable; urgency=medium + + * Fix build for bullseye. + + -- Walter Doekes Fri, 24 Jun 2022 16:42:53 +0200 + +asterisk-g72x (1.4.3-0osso2+deb9) stretch; urgency=medium * New build, this time with asterisk-18 packages as well. From bc617395db4180d6eae8232c82ccc386997729dc Mon Sep 17 00:00:00 2001 From: Walter Doekes Date: Wed, 29 Jun 2022 15:53:12 +0200 Subject: [PATCH 3/6] Dockerfile sync with other projects --- Dockerfile | 16 +++++++++++----- Dockerfile.build | 2 -- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index a204b03..0f7232a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,12 +12,18 @@ ARG DEBIAN_FRONTEND=noninteractive # cache. We do this before copying anything and before getting lots of # ARGs from the user. That keeps this bit cached. RUN echo 'APT::Install-Recommends "0";' >/etc/apt/apt.conf.d/01norecommends -# We'll be ignoring "debconf: delaying package configuration, since apt-utils is not installed" +# We'll be ignoring "debconf: delaying package configuration, since apt-utils +# is not installed" RUN apt-get update -q && \ apt-get dist-upgrade -y && \ apt-get install -y \ ca-certificates curl \ - build-essential devscripts dh-autoreconf dpkg-dev equivs quilt + build-essential devscripts dh-autoreconf dpkg-dev equivs quilt && \ + printf "%s\n" \ + QUILT_PATCHES=debian/patches QUILT_NO_DIFF_INDEX=1 \ + QUILT_NO_DIFF_TIMESTAMPS=1 'QUILT_DIFF_OPTS="--show-c-function"' \ + 'QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"' \ + >~/.quiltrc # Apt-get prerequisites according to control file. COPY control /build/debian/control @@ -38,7 +44,7 @@ RUN . /etc/os-release && \ # Trick to allow caching of UPNAME*.tar.gz files. Download them # once using the curl command below into .cache/* if you want. The COPY -# is made conditional by the "[2]" "wildcard". (We need one existing +# is made conditional by the "[bg]" "wildcard". (We need one existing # file (README.rst) so the COPY doesn't fail.) COPY ./README.rst .cache/${upname}_${upversion}.orig.tar.[bg]* /build/ # RUN if ! test -s /build/${upname}_${upversion}.orig.tar.gz; then \ @@ -66,7 +72,7 @@ RUN cd /build && tar jxf "${upname}_${upversion}.orig.tar.bz2" && \ COPY asterisk-g72x-g729-ast11.install asterisk-g72x-g729-ast13.install \ asterisk-g72x-g729-ast16.install asterisk-g72x-g729-ast18.install \ compat rules source /build/${upname}-${upversion}/debian/ -WORKDIR "/build/${upname}-${upversion}" +WORKDIR /build/${upname}-${upversion} # We'll use include-tars so we can build for multiple asterisk versions. # RUN printf "%s\n" "Package: asterisk asterisk-*" "Pin: version 1:11.*" "Pin-Priority: 600" \ @@ -98,6 +104,6 @@ RUN . /etc/os-release && fullversion=${upversion}-${debversion}+${osdistshort}${ # Write output files. RUN . /etc/os-release && fullversion=${upversion}-${debversion}+${osdistshort}${VERSION_ID} && \ mkdir -p /dist/${upname}_${fullversion} && \ - mv /build/*${fullversion}* /dist/${upname}_${fullversion}/ && \ mv /build/${upname}_${upversion}.orig.tar.bz2 /dist/${upname}_${fullversion}/ && \ + mv /build/*${fullversion}* /dist/${upname}_${fullversion}/ && \ cd / && find dist/${upname}_${fullversion} -type f >&2 diff --git a/Dockerfile.build b/Dockerfile.build index 0eb56f2..f7e1887 100755 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -9,8 +9,6 @@ upname=asterisk-g72x upversion=$(echo "$buildversion" | sed -e 's/-.*//;s/^[0-9]*://') debepoch=$(echo "$buildversion" | sed -e '/^[0-9]*:/!d;s/:.*/:/') debversion=$(echo "$buildversion" | sed -e 's/[^-]*-//;s/+[^+]*$//') -dockversion=$(echo "build-$upname-$buildversion" | - sed -e 's/^[0-9]*://;s/[^A-Za-z0-9.-]/_/g') echo "Usage: $0 [$oscodename]" echo ".. continuing" From cbca7080c84e61338298db6788b89a8db8139a99 Mon Sep 17 00:00:00 2001 From: Dennis Kraus Date: Mon, 23 Dec 2024 11:01:39 +0100 Subject: [PATCH 4/6] Add Asterisk 22 build --- Dockerfile | 2 ++ asterisk-g72x-g729-ast22.install | 1 + changelog | 6 ++++++ control | 27 +++++++++++++++++++++++++++ rules | 8 ++++++++ 5 files changed, 44 insertions(+) create mode 100644 asterisk-g72x-g729-ast22.install diff --git a/Dockerfile b/Dockerfile index 0f7232a..c4783e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -71,12 +71,14 @@ RUN cd /build && tar jxf "${upname}_${upversion}.orig.tar.bz2" && \ mv debian "${upname}-${upversion}/" COPY asterisk-g72x-g729-ast11.install asterisk-g72x-g729-ast13.install \ asterisk-g72x-g729-ast16.install asterisk-g72x-g729-ast18.install \ + asterisk-g72x-g729-ast22.install \ compat rules source /build/${upname}-${upversion}/debian/ WORKDIR /build/${upname}-${upversion} # We'll use include-tars so we can build for multiple asterisk versions. # RUN printf "%s\n" "Package: asterisk asterisk-*" "Pin: version 1:11.*" "Pin-Priority: 600" \ # >/etc/apt/preferences.d/asterisk.pref +# TODO: 22 no available at the URL below RUN set -x && \ cd .. && for version in 18 16 13 11; do \ curl --fail -O https://junk.devs.nu/a/asterisk/asterisk-$version-include.tar.bz2 && \ diff --git a/asterisk-g72x-g729-ast22.install b/asterisk-g72x-g729-ast22.install new file mode 100644 index 0000000..30f452c --- /dev/null +++ b/asterisk-g72x-g729-ast22.install @@ -0,0 +1 @@ +tmp/modules-22/* usr/lib/asterisk/modules diff --git a/changelog b/changelog index 15337d3..8514e90 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,9 @@ +asterisk-g72x (1.4.3-0osso3+REL) stable; urgency=medium + + * Include asterisk 22 + + -- Dennis Kraus Fri, 23 Dec 2024 10:59:27 +0200 + asterisk-g72x (1.4.3-0osso3+REL) stable; urgency=medium * Fix build for bullseye. diff --git a/control b/control index 8a67ce4..d42ea80 100644 --- a/control +++ b/control @@ -14,6 +14,29 @@ Homepage: http://asterisk.hosting.lv/ Vcs-Browser: https://bitbucket.org/arkadi/asterisk-g72x/src Vcs-Hg: https://bitbucket.org/arkadi/asterisk-g72x +Package: asterisk-g72x-g729-ast22 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: + ${shlibs:Depends}, + ${misc:Depends} +Conflicts: + asterisk-g72x-g729-ast18, + asterisk-g72x-g729-ast16, + asterisk-g72x-g729-ast13, + asterisk-g72x-g729-ast11 +Recommends: asterisk (>= 1:22), asterisk (<< 1:17), asterisk-modules +Description: G.729 codec support for the Asterisk PBX + G.729 is a royalty-free narrow-band vocoder-based audio data + compression algorithm using a frame length of 10 milliseconds. + . + This package includes the G.729 codec driver (codec_g729.so) for + Asterisk PBX. + . + For more information about the Asterisk PBX, have a look at the Asterisk + package. + Package: asterisk-g72x-g729-ast18 Architecture: any Multi-Arch: same @@ -22,6 +45,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: + asterisk-g72x-g729-ast22, asterisk-g72x-g729-ast16, asterisk-g72x-g729-ast13, asterisk-g72x-g729-ast11 @@ -44,6 +68,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: + asterisk-g72x-g729-ast22, asterisk-g72x-g729-ast18, asterisk-g72x-g729-ast13, asterisk-g72x-g729-ast11 @@ -66,6 +91,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: + asterisk-g72x-g729-ast22, asterisk-g72x-g729-ast18, asterisk-g72x-g729-ast16, asterisk-g72x-g729-ast11 @@ -88,6 +114,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: + asterisk-g72x-g729-ast22, asterisk-g72x-g729-ast18, asterisk-g72x-g729-ast16, asterisk-g72x-g729-ast13 diff --git a/rules b/rules index 2d9eb1e..c12298c 100755 --- a/rules +++ b/rules @@ -27,6 +27,14 @@ override_dh_auto_configure: true override_dh_auto_build: + # Build for 22. + rm -f config.log + dh_auto_clean + dh_auto_configure -- --with-asterisk180 --with-bcg729 \ + --with-asterisk-includes=../asterisk-18/include \ + --libdir=$(AST_LIBDIR) + dh_auto_build "$@" + mkdir /tmp/modules-22 && mv .libs/codec_g729.so /tmp/modules-22/ # Build for 18. rm -f config.log dh_auto_clean From 9abaa6f6346455e482fd83fab36aee200c290e5e Mon Sep 17 00:00:00 2001 From: Jasper Hafkenscheid Date: Fri, 10 Jan 2025 14:03:56 +0100 Subject: [PATCH 5/6] Add Debian Bookworm, disable EOL versions --- Dockerfile.build | 1 + Dockerfile.buildmany | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile.build b/Dockerfile.build index f7e1887..d0fe434 100755 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -16,6 +16,7 @@ echo ".. continuing" osdistro=${oscodename%/*} # debian (or ubuntu) oscodename=${oscodename#*/} # stretch (or bionic) case $osdistro/$oscodename in +debian/bookworm)osdistshort=deb; oscodenum=12;; debian/bullseye)osdistshort=deb; oscodenum=11;; debian/buster) osdistshort=deb; oscodenum=10;; debian/stretch) osdistshort=deb; oscodenum=9;; diff --git a/Dockerfile.buildmany b/Dockerfile.buildmany index 4fb2e1a..6dafcc0 100755 --- a/Dockerfile.buildmany +++ b/Dockerfile.buildmany @@ -2,5 +2,7 @@ #./Dockerfile.build ubuntu/xenial # ubu16.04 #./Dockerfile.build ubuntu/bionic # ubu18.04 #./Dockerfile.build debian/jessie # deb8 -./Dockerfile.build debian/stretch # deb9 -./Dockerfile.build debian/buster # deb10 +#./Dockerfile.build debian/stretch # deb9 +#./Dockerfile.build debian/buster # deb10 +./Dockerfile.build debian/bullseye # deb11 +./Dockerfile.build debian/bookworm # deb12 From 3843577351aff446c5d2ee8cbea6ec0d04f62631 Mon Sep 17 00:00:00 2001 From: Jasper Hafkenscheid Date: Wed, 15 Jan 2025 10:17:31 +0100 Subject: [PATCH 6/6] Chore: Bump to upstream 1.4.4, fix includes for asterisk 22 --- Dockerfile | 12 +++++++++--- changelog | 7 +++++++ rules | 4 ++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index c4783e6..7be2d7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,7 +66,7 @@ COPY ./README.rst .cache/${upname}_${upversion}.orig.tar.[bg]* /build/ RUN (test -f /build/${upname}_${upversion}.orig.tar.bz2 || \ curl -o /build/${upname}_${upversion}.orig.tar.bz2 \ http://asterisk.hosting.lv/src/${upname}-${upversion}.tar.bz2) && \ - test $(md5sum /build/${upname}_${upversion}.orig.tar.bz2 | awk '{print $1}') = e99e153e88fe45cde0a7b04e22f1a414 + test $(md5sum /build/${upname}_${upversion}.orig.tar.bz2 | awk '{print $1}') = f8d8c0f212f58547e4115327cc0d2dca RUN cd /build && tar jxf "${upname}_${upversion}.orig.tar.bz2" && \ mv debian "${upname}-${upversion}/" COPY asterisk-g72x-g729-ast11.install asterisk-g72x-g729-ast13.install \ @@ -78,11 +78,17 @@ WORKDIR /build/${upname}-${upversion} # We'll use include-tars so we can build for multiple asterisk versions. # RUN printf "%s\n" "Package: asterisk asterisk-*" "Pin: version 1:11.*" "Pin-Priority: 600" \ # >/etc/apt/preferences.d/asterisk.pref -# TODO: 22 no available at the URL below +# Older files are provided by Walter Doekes from OSSO +# Newer versions are produced by asterdebvg. RUN set -x && \ - cd .. && for version in 18 16 13 11; do \ + cd .. && \ + for version in 18 16 13 11; do \ curl --fail -O https://junk.devs.nu/a/asterisk/asterisk-$version-include.tar.bz2 && \ tar jxf asterisk-$version-include.tar.bz2; done && \ + for version in 22; do \ + curl --fail -O https://hafcom.nl/asterisk-$version-include.tar.bz2 && \ + tar jxf asterisk-$version-include.tar.bz2; done && \ + test $(md5sum asterisk-22-include.tar.bz2 | awk '{print $1}') = b6b8c25565eb7c2bfd038a8837ed82bc && \ test $(md5sum asterisk-18-include.tar.bz2 | awk '{print $1}') = bddb6ba2a27e80470cccacc67a725ffb && \ test $(md5sum asterisk-16-include.tar.bz2 | awk '{print $1}') = f2135dd7204514f6899374618aa7873f && \ test $(md5sum asterisk-13-include.tar.bz2 | awk '{print $1}') = cad97c28885add2c0b3fe7b7c713f2aa && \ diff --git a/changelog b/changelog index 8514e90..7ce98aa 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,10 @@ +asterisk-g72x (1.4.4-0osso3+REL) stable; urgency=medium + + * Update to 1.4.4 upstream + * Patch in actual asteriks 22 includes + + -- Jasper Hafkenscheid Tue, 14 Jan 2025 15:25:49 +0100 + asterisk-g72x (1.4.3-0osso3+REL) stable; urgency=medium * Include asterisk 22 diff --git a/rules b/rules index c12298c..9a39f6d 100755 --- a/rules +++ b/rules @@ -30,8 +30,8 @@ override_dh_auto_build: # Build for 22. rm -f config.log dh_auto_clean - dh_auto_configure -- --with-asterisk180 --with-bcg729 \ - --with-asterisk-includes=../asterisk-18/include \ + dh_auto_configure -- --with-asterisk220 --with-bcg729 \ + --with-asterisk-includes=../asterisk-22/include \ --libdir=$(AST_LIBDIR) dh_auto_build "$@" mkdir /tmp/modules-22 && mv .libs/codec_g729.so /tmp/modules-22/