本文主要描述如何使用自定义git分支制作稳定deb安装包.
一、准备bugfix后的git分支:
1. 从FreeSWITCH主站fork到自己的git站点 https://github.com/signalwire/freeswitch.git
2. 自己的特性分支修复bug,然后合并到 v1.10分支
3. 打出自己的release稳定tag v1.10.1-we
二、编译deb包(参考:https://freeswitch.org/confluence/display/FREESWITCH/Debian+9+Stretch)
wget -O - https://files.freeswitch.org/repo/deb/debian-unstable/freeswitch_archive_g0.pub | apt-key add -
echo "deb http://files.freeswitch.org/repo/deb/debian-unstable/ stretch main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb-src http://files.freeswitch.org/repo/deb/debian-unstable/ stretch main" >> /etc/apt/sources.list.d/freeswitch.list
apt-get update && apt-get install -y xz-utils devscripts cowbuilder git screen
# nonstandard packages from freeswitch repo are not trusted by pbuilder !!
echo "ALLOWUNTRUSTED=yes" >> /etc/pbuilderrc
# get the latest master. Use the -b flag to get a specific branch
mkdir /usr/src/freeswitch-debs
git clone https://github.com/yine-studio/freeswitch.git -bv1.10.1-we /usr/src/freeswitch-debs/freeswitch-v1.10.1-we
cd /usr/src/freeswitch-debs
# here it's good to run screen with logging, so that you can detach from the shell prompt
screen -L
cd freeswitch
./debian/util.sh build-all -aamd64 -cstretch
# here you can detach by Ctrl-a Ctrl-d and see the log files in /usr/src/freeswitch-debs/log/ folder.
# The build may last about an hour, depending on your CPU speed.
# If the build is successful, you will have a bunch of .deb files in /usr/src/freeswitch-debs
1. 如果报错执行:git clean -fdx && git reset --hard origin/v1.10 (你的具体分支)
三、安装测试
1. sudo dpkg -i package_file.deb
2. sudo dpkg -r package_name