Skip to content

☎️ Asterisk Debian packaging and patches for Wazo

License

Notifications You must be signed in to change notification settings

ja0x/asterisk

 
 

Repository files navigation

asterisk

This repository contains the packaging information and patches for Asterisk.

To update the version of Asterisk:

  • Update the version number in debian/changelog by adding a new section
  • Update all the patches
    • Download the upstream tarball, extract it and cd into the directory
VERSION=$(dpkg-parsechangelog | awk -F': ' '{ if($1 == "Version") { print $NF } }' | sed -ne 's/^\(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
grep '^ASTERISK_URL_DOWNLOAD' debian/rules | awk -F' = ' '{ print $NF }' | sed -n "s/\${VER}/$VERSION/p" | xargs wget
tar -xf asterisk-$VERSION.tar.gz && cd asterisk-$VERSION
  • Create a symbolic link to debian/patches
ln -s ../debian/patches patches
  • Push the topmost patch with quilt push, then resolve the conflicts if necessary, then refresh the patch with quilt refresh
  • Repeat the last step until all patches have been refreshed
  • Commit and push

To test that it compiles and builds fine (example for 13.10.0 on a remote wazo):

rsync -v -rtlp "asterisk-${VERSION}.tar.gz" debian wazo:ast-rebuild
ssh wazo

On the remote Wazo

cd ast-rebuild
tar xf asterisk-*.tar.gz
rename 's/asterisk-(.*).tar.gz/asterisk_$1.orig.tar.gz/' asterisk-*.tar.gz
cd asterisk-*
mv ../debian .
apt install devscripts
mk-build-deps -i
rm asterisk-build-deps_*.deb 
dpkg-buildpackage -us -uc
dpkg -i ../asterisk_*.deb 

asterisk-vanilla and asterisk-debug

By pushing commit on master, a series of actions will be triggered and other repositories will be updated automatically. There are 2 repositories that are built automatically:

The asterisk Jenkins job will trigger asterisk-to-asterisk-vanilla and asterisk-to-asterisk-debug. These jobs will apply vanilla.patch and debug.patch on the master branch of Asterisk. Then, it makes a diff and push it on asterisk-vanilla and asterisk-debug repositories.

Troubleshooting

When the patch or the patch context change, it cannot be applied automatically and it needs to be updated manually.

How to do it:

  • cp ../asterisk-vanilla/vanilla.patch .
  • git apply vanilla.patch
  • If the apply fail
    • update vanilla.patch to fix it
    • Or if there are too much context changes, manually do all the changes and regenerate patch
  • cp vanilla.patch ../asterisk-vanilla/
  • cd ../asterisk-vanilla
  • commit and push the updated vanilla.patch
  • Do the same thing for asterisk-debug with debug.patch
  • restart failed jobs or bump Asterisk version to force rebuild

About

☎️ Asterisk Debian packaging and patches for Wazo

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 32.6%
  • Shell 30.3%
  • Smarty 26.1%
  • Dockerfile 9.9%
  • Makefile 1.1%