[OpenSIPS-Users] [SOLVED] 3.1 How to build DEB Debian Packages from source (Stretch)
Ovidiu Sas
osas at voipembedded.com
Mon Jan 18 16:09:27 EST 2021
Hello Giovanni,
All looks good!
IIRC you can alter the changelog to create custom names for packages (for
easier management).
Also, to simplify the install/update process, I create a custom mega
opensips package that has all the modules built in. That’s just my personal
preference :)
-ovidiu
On Mon, Jan 18, 2021 at 08:07 Giovanni Maruzzelli <gmaruzz at gmail.com> wrote:
> My friends, Ovidiu,
>
> so, see the following two scripts, one for first time building deb
> packages, second script for updating such packages.
>
> Can you all please give hints, corrections, etc?
>
> FIRST TIME BUILD DEB PACKAGES:
> #=================
> apt-get install bison debhelper default-libmysqlclient-dev dh-systemd
> dpkg-dev flex libconfuse-dev libcurl4-gnutls-dev libdb-dev libexpat1-dev
> libmaxminddb-dev libhiredis-dev libjson-c-dev libldap2-dev liblua5.1-0-dev
> libmemcached-dev libmicrohttpd-dev libbson-dev base-files libncurses5-dev
> libpcre3-dev libperl-dev libpq-dev librabbitmq-dev libradcli-dev
> libsctp-dev libsqlite3-dev libssl-dev lsb-release uuid-dev libxml2-dev
> pkg-config python python-dev unixodbc-dev xsltproc zlib1g-dev libsnmp-dev
> libmongoc-dev
>
> mkdir /usr/src/OPENSIPS_DEBS
> cd /usr/src/OPENSIPS_DEBS
>
> git clone https://github.com/OpenSIPS/opensips.git -b 3.1 opensips_3_1
>
> cd opensips_3_1
>
> make deb-orig-tar
> make deb DEBBUILD_EXTRA_OPTIONS="-uc -us"
>
> cd ..
> ls
>
> dpkg -i opensips_3.1.1-1_amd64.deb
> opensips-dialplan-module_3.1.1-1_amd64.deb
> opensips-http-modules_3.1.1-1_amd64.deb
> opensips-lua-module_3.1.1-1_amd64.deb
> opensips-memcached-module_3.1.1-1_amd64.deb
> opensips-postgres-module_3.1.1-1_amd64.deb
> opensips-presence-modules_3.1.1-1_amd64.deb
> opensips-redis-module_3.1.1-1_amd64.deb
> opensips-regex-module_3.1.1-1_amd64.deb
> opensips-restclient-module_3.1.1-1_amd64.deb
> opensips-sqlite-module_3.1.1-1_amd64.deb
> opensips-tlsmgm-module_3.1.1-1_amd64.deb
> opensips-tls-module_3.1.1-1_amd64.deb opensips-wss-module_3.1.1-1_amd64.deb
> opensips-xml-module_3.1.1-1_amd64.deb
> opensips-xmlrpc-module_3.1.1-1_amd64.deb
>
> #=================
>
> UPDATE DEB PACKAGES (keeping local source changes):
> #=================
> cd /usr/src/OPENSIPS_DEBS/opensips_3_1
>
> git stash ; git pull ; git stash apply
>
> make deb-orig-tar
> make deb DEBBUILD_EXTRA_OPTIONS="-uc -us"
>
> cd ..
> ls
>
> dpkg -i opensips_3.1.1-1_amd64.deb
> opensips-dialplan-module_3.1.1-1_amd64.deb
> opensips-http-modules_3.1.1-1_amd64.deb
> opensips-lua-module_3.1.1-1_amd64.deb
> opensips-memcached-module_3.1.1-1_amd64.deb
> opensips-postgres-module_3.1.1-1_amd64.deb
> opensips-presence-modules_3.1.1-1_amd64.deb
> opensips-redis-module_3.1.1-1_amd64.deb
> opensips-regex-module_3.1.1-1_amd64.deb
> opensips-restclient-module_3.1.1-1_amd64.deb
> opensips-sqlite-module_3.1.1-1_amd64.deb
> opensips-tlsmgm-module_3.1.1-1_amd64.deb
> opensips-tls-module_3.1.1-1_amd64.deb opensips-wss-module_3.1.1-1_amd64.deb
> opensips-xml-module_3.1.1-1_amd64.deb
> opensips-xmlrpc-module_3.1.1-1_amd64.deb
>
> #=================
>
>
> On Sat, Jan 16, 2021 at 8:41 PM Ovidiu Sas <osas at voipembedded.com> wrote:
>
>> Hello Giovanni,
>>
>> After you clone the repo, you need to build the tar from it:
>> make deb-orig-tar
>> You can skip the wget.
>>
>> If you modify the source, rebuild the tar and then rebuild the deb
>> package.
>>
>> Also, when building the package, use the following options (so you
>> won't have troubles with signed packages):
>> make deb DEBBUILD_EXTRA_OPTIONS="-uc -us"
>>
>> -ovidiu
>>
>> On Sat, Jan 16, 2021 at 2:15 PM Giovanni Maruzzelli <gmaruzz at gmail.com>
>> wrote:
>> >
>> > Hello my friends,
>> >
>> > I know I'm slow, it took me much time to find the way to build deb
>> packages from source.
>> >
>> > So, without further ado, my receipt (on Stretch, may works on Buster
>> too)
>> > -BOTH git clone AND wget are required, it is not a typo- :
>> >
>> > =========
>> >
>> > mkdir /usr/src/OPENSIPS
>> > cd /usr/src/OPENSIPS
>> >
>> > git clone https://github.com/OpenSIPS/opensips.git -b 3.1 opensips_3_1
>> > wget https://github.com/OpenSIPS/opensips/archive/3.1.tar.gz -O
>> opensips_3.1.1.orig.tar.gz
>> >
>> > apt-get install bison debhelper default-libmysqlclient-dev dh-systemd
>> dpkg-dev flex libconfuse-dev libcurl4-gnutls-dev libdb-dev libexpat1-dev
>> libmaxminddb-dev libhiredis-dev libjson-c-dev libldap2-dev liblua5.1-0-dev
>> libmemcached-dev libmicrohttpd-dev libbson-dev base-files libncurses5-dev
>> libpcre3-dev libperl-dev libpq-dev librabbitmq-dev libradcli-dev
>> libsctp-dev libsqlite3-dev libssl-dev lsb-release uuid-dev libxml2-dev
>> pkg-config python python-dev unixodbc-dev xsltproc zlib1g-dev libsnmp-dev
>> libmongoc-dev
>> >
>> > cd opensips_3_1
>> >
>> > make deb
>> > cd ..
>> >
>> > ls
>> >
>> > dpkg -i opensips_3.1.1-1_amd64.deb
>> opensips-dialplan-module_3.1.1-1_amd64.deb
>> opensips-http-modules_3.1.1-1_amd64.deb
>> opensips-lua-module_3.1.1-1_amd64.deb
>> opensips-memcached-module_3.1.1-1_amd64.deb
>> opensips-postgres-module_3.1.1-1_amd64.deb
>> opensips-presence-modules_3.1.1-1_amd64.deb
>> opensips-redis-module_3.1.1-1_amd64.deb
>> opensips-regex-module_3.1.1-1_amd64.deb
>> opensips-restclient-module_3.1.1-1_amd64.deb
>> opensips-sqlite-module_3.1.1-1_amd64.deb
>> opensips-tlsmgm-module_3.1.1-1_amd64.deb
>> opensips-tls-module_3.1.1-1_amd64.deb opensips-wss-module_3.1.1-1_amd64.deb
>> opensips-xml-module_3.1.1-1_amd64.deb
>> opensips-xmlrpc-module_3.1.1-1_amd64.deb
>> >
>> > =========
>> >
>> > Obviously, you can choose which deb packages to install :)
>> >
>> > HTH
>> >
>> > -giovanni
>> >
>> > --
>> > Sincerely,
>> >
>> > Giovanni Maruzzelli
>> > OpenTelecom.IT
>> > cell: +39 347 266 56 18
>> >
>> > _______________________________________________
>> > Users mailing list
>> > Users at lists.opensips.org
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>> --
>> VoIP Embedded, Inc.
>> http://www.voipembedded.com
>>
>
>
> --
> Sincerely,
>
> Giovanni Maruzzelli
> OpenTelecom.IT
> cell: +39 347 266 56 18
>
> --
VoIP Embedded, Inc.
http://www.voipembedded.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20210118/c7178a55/attachment-0001.html>
More information about the Users
mailing list