Hello, I am herewith submitting the port net/kamailio as a new port. Kamailio is an open source SIP proxy server. Oliver Mahmoudi Fix: Patch attached with submission follows:
Back to pool
Thanks! Do you have any verification available? In order of preference, examples of what I'm looking for are: 1) "poudriere testport" or "poudriere bulk -t" logs 2) Redports or tinderbox logs 3) "make check-plist" followed by "make stage-qa" output (https://www.freebsd.org/doc/en/books/porters-handbook/porting-testing.html) Also, please run "portlint" and paste the output.
I apologize, but after 30 September I'm going to close all *unstaged* "new port" PRs, even if it is through no fault of the submitter. If you are still interested in getting the port into tree, please provide an updated share and some build verification (poudriere logs, redports logs, or Porter's Handbook[1]). If you do that, we'll fast-track the port into the tree. I'm sorry about this. "make check-plist" followed by "make stage-qa" output (https://www.freebsd.org/doc/en/books/porters-handbook/porting-testing.html)
Created attachment 147036 [details] Updated shell archive for port: net/kamailio
Just added an updated shell archive of the port. The main reason as to why it didn't compile was that MASTER_SITES got moved to another link. root@host1:/usr/ports/net/kamailio # pwd /usr/ports/net/kamailio root@host1:/usr/ports/net/kamailio # ll total 48 -rw-r--r-- 1 root wheel 215 Aug 30 16:49 GIDs.diff -rw-r--r-- 1 root wheel 4382 Sep 8 01:26 Makefile -rw-r--r-- 1 root wheel 493 Aug 30 16:49 UIDs.diff -rw-r--r-- 1 root wheel 146 Aug 30 16:49 distinfo drwxr-xr-x 2 root wheel 512 Aug 30 16:49 files/ -rw-r--r-- 1 root wheel 532 Aug 30 16:49 pkg-descr -rw-r--r-- 1 root wheel 17608 Sep 8 00:39 pkg-plist root@host1:/usr/ports/net/kamailio # ll files/ total 32 -rw-r--r-- 1 root wheel 507 Aug 30 16:49 kamailio.in -rw-r--r-- 1 root wheel 879 Aug 30 16:49 patch-Makefile -rw-r--r-- 1 root wheel 423 Aug 30 16:49 patch-modules-db__berkeley-Makefile -rw-r--r-- 1 root wheel 407 Aug 30 16:49 patch-modules-db__oracle-Makefile -rw-r--r-- 1 root wheel 407 Aug 30 16:49 patch-modules-db__postgres-Makefile -rw-r--r-- 1 root wheel 407 Aug 30 16:49 patch-modules-db__sqlite-Makefile -rw-r--r-- 1 root wheel 283 Aug 30 16:49 patch-modules-tls-Makefile -rw-r--r-- 1 root wheel 695 Aug 30 16:49 patch-utils-kamctl-Makefile root@host1:/usr/ports/net/kamailio # uname -a FreeBSD host1.example.com 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243826: Tue Dec 4 06:55:39 UTC 2012 root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 root@host1:/usr/ports/net/kamailio # whoami root root@host1:/usr/ports/net/kamailio # portlint -A WARN: Makefile: [92]: NOPORTDOCS found. Consider using PORT_OPTIONS:MDOCS. WARN: Makefile: [0]: possible direct use of command "dialog" found. use ${DIALOG} instead. WARN: Makefile: Consider defining LICENSE. 0 fatal errors and 3 warnings found. root@host1:/usr/ports/net/kamailio # portlint -C WARN: Makefile: [92]: NOPORTDOCS found. Consider using PORT_OPTIONS:MDOCS. WARN: Makefile: [0]: possible direct use of command "dialog" found. use ${DIALOG} instead. WARN: Makefile: Consider defining LICENSE. 0 fatal errors and 3 warnings found. root@host1:/usr/ports/net/kamailio # make describe kamailio-4.0.2|/usr/ports/net/kamailio|/usr/local|A very fast and configurable open source SIP proxy|/usr/ports/net/kamailio/pkg-descr|olivermahmoudi@gmail.com|net||||/usr/ports/databases/mysql56-server /usr/ports/databases/postgresql94-server /usr/ports/databases/unixODBC /usr/ports/devel/gmake /usr/ports/textproc/expat2 /usr/ports/textproc/libxml2|/usr/ports/databases/unixODBC /usr/ports/shells/bash /usr/ports/textproc/expat2 /usr/ports/textproc/libxml2|http://www.kamailio.org/ root@host1:/usr/ports/net/kamailio # make check-plist ====> Checking for pkg-plist issues (check-plist) ===> Parsing plist ===> Checking for items in STAGEDIR missing from pkg-plist ===> Checking for directories owned by MTREEs ===> Checking for directories handled by dependencies ===> Checking for items in pkg-plist which are not in STAGEDIR ===> No pkg-plist issues found (check-plist) root@host1:/usr/ports/net/kamailio # make stage root@host1:/usr/ports/net/kamailio # echo $? 0 root@host1:/usr/ports/net/kamailio # make stage-qa ====> Running Q/A tests (stage-qa) root@host1:/usr/ports/net/kamailio # echo $? 0 root@host1:/usr/ports/net/kamailio # make check-orphans ====> Checking for pkg-plist issues (check-plist) ===> Parsing plist ===> Checking for items in STAGEDIR missing from pkg-plist ===> Checking for directories owned by MTREEs ===> Checking for directories handled by dependencies ===> Checking for items in pkg-plist which are not in STAGEDIR ===> No pkg-plist issues found (check-plist) root@host1:/usr/ports/net/kamailio # echo $? 0 root@host1:/usr/ports/net/kamailio # echo EOF EOF
root@host1:/usr/ports/net/kamailio # make package root@host1:/usr/ports/net/kamailio # echo $? 0 root@host1:/usr/ports/net/kamailio # exit exit user@host1:/usr/ports/net/kamailio % make package user@host1:/usr/ports/net/kamailio % echo $? 0
1) this has to be fixed: WARN: Makefile: [92]: NOPORTDOCS found. Consider using PORT_OPTIONS:MDOCS. 2) CFLAGS+= -Wall -Werror NEVER, NEVER, NEVER intentionally add -Werror. We *REMOVE* that flag when we see it 3) COMMENT= A very fast and configurable open source SIP proxy Never start a COMMENT with "A", "The", "An", or the name of the port 4) XWRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} Why are you doing this? That's the default value of WRKSRC 5) XPLIST_SUB+= MYSQL="" X.else XPLIST_SUB+= MYSQL="@comment " This is ancient use of options, use the new OPTIONS_SUB please (review porters handbook on OPTIONS) Is that huge block for stripping really necessary? Why isn't the vendor file doing that?
Points 2, 3 and 4 have been taken care of already. 1 and 5 will take a little bit of time. I realized that the binaries and libs were not stripped when I ran "# make stage-qa" a litle earlier. Will get back to you in due course.
Created attachment 147147 [details] Makefile diff for proposed amendments
Just added Makefile.diff to take care of the changes you suggested: 1) this has to be fixed: WARN: Makefile: [92]: NOPORTDOCS found. Consider using PORT_OPTIONS:MDOCS. Fixed 2) CFLAGS+= -Wall -Werror NEVER, NEVER, NEVER intentionally add -Werror. We *REMOVE* that flag when we see it Fixed 3) COMMENT= A very fast and configurable open source SIP proxy Never start a COMMENT with "A", "The", "An", or the name of the port Fixed 4) XWRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} Why are you doing this? That's the default value of WRKSRC Kept this after all, since commenting it out, fails the built. 5) XPLIST_SUB+= MYSQL="" X.else XPLIST_SUB+= MYSQL="@comment " This is ancient use of options, use the new OPTIONS_SUB please (review porters handbook on OPTIONS) The program's configure stage is non standard and options are passed on a pre-build stage to prepare the built. Checked back on this issued with the ports mailing list. Their feedback was that it is still OK to keep it that way since the new way of setting up the options won't solve my special scenario here. Thanks!
(In reply to olivermahmoudi from comment #10) > 5) XPLIST_SUB+= MYSQL="" > X.else > XPLIST_SUB+= MYSQL="@comment " > > This is ancient use of options, use the new OPTIONS_SUB please (review > porters handbook on OPTIONS) > > The program's configure stage is non standard and options are passed on a > pre-build stage to prepare the built. Checked back on this issued with the > ports mailing list. Their feedback was that it is still OK to keep it that > way since the new way of setting up the options won't solve my special > scenario here. Well, except OPTIONS_SUB affects PLIST_SUB and not configure arguments. I was objecting to your (ancient) brute force definitions of "" and "@comment " which is unnecessary with OPTIONS_SUB
https://www.freebsd.org/doc/en/books/porters-handbook/makefile-options.html OPTIONS_DEFINE= OPT1 OPTIONS_SUB= yes is equivalent to: OPTIONS_DEFINE= OPT1 .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MOPT1} PLIST_SUB+= OPT1="" NO_OPT1="@comment " SUB_LIST+= OPT1="" NO_OPT1="@comment " .else PLIST_SUB+= OPT1="@comment " NO_OPT1="" SUB_LIST+= OPT1="@comment " NO_OPT1="" .endif What I have is: .if ${PORT_OPTIONS:MMYSQL} BUILD_DEPENDS+= ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql56-server RUN_DEPENDS+:= ${BUILD_DEPENDS} EXTRA_MODULES+= db_mysql PLIST_SUB+= MYSQL="" .else PLIST_SUB+= MYSQL="@comment " .endif It is the EXTRA_MODULES variable, which is passed to: pre-build: @cd ${WRKSRC} && ${GMAKE} ${MAKE_ARGS} cfg In exactly this fashion: .if !empty (EXTRA_MODULES) MAKE_ARGS= include_modules="${EXTRA_MODULES}" .endif I feel like I cannot just carve that out by letting OPTIONS_SUB=yes. Again, ports mailing list didn't object or how else would I go about that?
(In reply to John Marino from comment #11) > (In reply to olivermahmoudi from comment #10) > > > 5) XPLIST_SUB+= MYSQL="" > > X.else > > XPLIST_SUB+= MYSQL="@comment " > > > > This is ancient use of options, use the new OPTIONS_SUB please (review > > porters handbook on OPTIONS) > > > > The program's configure stage is non standard and options are passed on a > > pre-build stage to prepare the built. Checked back on this issued with the > > ports mailing list. Their feedback was that it is still OK to keep it that > > way since the new way of setting up the options won't solve my special > > scenario here. > > Well, except OPTIONS_SUB affects PLIST_SUB and not configure arguments. I > was objecting to your (ancient) brute force definitions of "" and "@comment > " which is unnecessary with OPTIONS_SUB If what you are talking about is this: ### Version 1 .if ${PORT_OPTIONS:MMYSQL} BUILD_DEPENDS+= ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql56-server RUN_DEPENDS+:= ${BUILD_DEPENDS} EXTRA_MODULES+= db_mysql PLIST_SUB+= MYSQL="" .else PLIST_SUB+= MYSQL="@comment " .endif ### Version 2 OPTIONS_SUB=yes .if ${PORT_OPTIONS:MMYSQL} BUILD_DEPENDS+= ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql56-server RUN_DEPENDS+:= ${BUILD_DEPENDS} EXTRA_MODULES+= db_mysql .endif whereas: Version 1 == Version 2 then I can see what you mean and could update things to Version 2 via OPTIONS_SUB. What I would essentially be carving out is this bit: PLIST_SUB+= MYSQL="" .else PLIST_SUB+= MYSQL="@comment " and it would still work. Is this the point you were trying to make?
(In reply to olivermahmoudi from comment #13) > ### Version 1 > .if ${PORT_OPTIONS:MMYSQL} > BUILD_DEPENDS+= > ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql56-server > RUN_DEPENDS+:= ${BUILD_DEPENDS} > EXTRA_MODULES+= db_mysql > PLIST_SUB+= MYSQL="" > .else > PLIST_SUB+= MYSQL="@comment " > .endif > > ### Version 2 > OPTIONS_SUB=yes > .if ${PORT_OPTIONS:MMYSQL} > BUILD_DEPENDS+= > ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql56-server > RUN_DEPENDS+:= ${BUILD_DEPENDS} > EXTRA_MODULES+= db_mysql > .endif > > whereas: > Version 1 == Version 2 > > then I can see what you mean and could update things to Version 2 via > OPTIONS_SUB. What I would essentially be carving out is this bit: > > PLIST_SUB+= MYSQL="" > .else > PLIST_SUB+= MYSQL="@comment " > > and it would still work. > > Is this the point you were trying to make? yes, but you can go even further. e.g. ### Version 3 OPTIONS_SUB=yes MYSQL_BUILD_DEPENDS= ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql56-server MYSQL_RUN_DEPENDS= ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql56-server .include <bsd.options.mk> .if ${PORT_OPTIONS:MMYSQL} EXTRA_MODULES+= db_mysql .endif See? (btw, the mailing list has no authority here)
actually the include line is ".include <bsd.port.options.mk>"
Created attachment 147172 [details] Makefile diff for proposed amendments
almost. You have to move all the <OPTION>_CONFIG* lines _above_ the ".include <bsd.ports.options.mk>" line (it won't work otherwise). Group them together too.
(In reply to John Marino from comment #14) > (In reply to olivermahmoudi from comment #13) > > ### Version 1 > > .if ${PORT_OPTIONS:MMYSQL} > > BUILD_DEPENDS+= > > ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql56-server > > RUN_DEPENDS+:= ${BUILD_DEPENDS} > > EXTRA_MODULES+= db_mysql > > PLIST_SUB+= MYSQL="" > > .else > > PLIST_SUB+= MYSQL="@comment " > > .endif > > > > ### Version 2 > > OPTIONS_SUB=yes > > .if ${PORT_OPTIONS:MMYSQL} > > BUILD_DEPENDS+= > > ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql56-server > > RUN_DEPENDS+:= ${BUILD_DEPENDS} > > EXTRA_MODULES+= db_mysql > > .endif > > > > whereas: > > Version 1 == Version 2 > > > > then I can see what you mean and could update things to Version 2 via > > OPTIONS_SUB. What I would essentially be carving out is this bit: > > > > PLIST_SUB+= MYSQL="" > > .else > > PLIST_SUB+= MYSQL="@comment " > > > > and it would still work. > > > > Is this the point you were trying to make? > > yes, but you can go even further. e.g. > > > ### Version 3 > OPTIONS_SUB=yes > MYSQL_BUILD_DEPENDS= > ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql56-server > MYSQL_RUN_DEPENDS= > ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql56-server > .include <bsd.options.mk> > .if ${PORT_OPTIONS:MMYSQL} > EXTRA_MODULES+= db_mysql > .endif > > > > See? > > (btw, the mailing list has no authority here) Yeah, the penny has dropped. Where I got a little confused here, was the part where I have several conditions to take care of inside the if statements at the same time. A prove of the concept as outlined in the Porter's Handbook would be to break one big if statement down into several smaller ones and then the OPTIONS_SUB approach is truly equivalent. Thanks
Created attachment 147173 [details] Makefile diff for proposed amendments
(In reply to John Marino from comment #17) > almost. You have to move all the <OPTION>_CONFIG* lines _above_ the > ".include <bsd.ports.options.mk>" line (it won't work otherwise). Group > them together too. Like so?
Yep. So what I'd like now is: Update a new shar file (making these two current attachments obsolete) And then repeat your verification (minimum of make check-plist ; make stage-qa but poudriere log still preferred)
(In reply to John Marino from comment #21) > Yep. > > So what I'd like now is: > Update a new shar file (making these two current attachments obsolete) > > And then repeat your verification (minimum of make check-plist ; make > stage-qa but poudriere log still preferred) No problem. poudriere is on my system, it's just that I haven't really used it before. If you let me know about the commands you want me to run with poudriere, then I will give you the verfications that you prefer along with the make check-plist/stage-qa outputs. Thanks
If you have never run it, then before you can execute commands you have to: 1) install a jail (e.g. FreeBSD 10 amd64) 2) install a ports tree (default is fine) Then you add your port to the tree and use "poudriere testport" command. see "man poudriere" for details about all. A "Howto" is coming but it's not here yet unfortunately.
Not to stir the pot more, but why are there direct BUILD/RUN_DEPENDS for specific versions of mysql and postgres? Please use the USE_MYSQL and USES=pgsql macros. See Mk/bsd.database.mk and Mk/Uses/pgsql.mk for correct usage. You should also avoid depending on the server unless truly needed for the build. The client is usually sufficient.
(In reply to Jason E. Hale from comment #24) > Not to stir the pot more, but why are there direct BUILD/RUN_DEPENDS for > specific versions of mysql and postgres? Please use the USE_MYSQL and > USES=pgsql macros. See Mk/bsd.database.mk and Mk/Uses/pgsql.mk for correct > usage. You should also avoid depending on the server unless truly needed > for the build. The client is usually sufficient. My thinking here goes along this line: It checks for a given version of the db-server on the system. If there is none, it pulls in the latest one. Strictly speaking, a database server is not necessary for the build, only a client. To use the port, user data is entered into database tables - just like in a phone book. In my original draft, there was no servers, included them just recently. It is more self-inclusive to my mind.
(In reply to olivermahmoudi from comment #25) > My thinking here goes along this line: It checks for a given version of the > db-server on the system. If there is none, it pulls in the latest one. No. We have set default versions of these servers to use, and if the end-user wants to use a different version, they can set that in their /etc/make.conf. None of that will work, however, if the port has a direct dependency. The macros take care of that. If there is really a need for certain version, though, there are macros to handle that as well. > Strictly speaking, a database server is not necessary for the build, only a > client. To use the port, user data is entered into database tables - just > like in a phone book. In my original draft, there was no servers, included > them just recently. It is more self-inclusive to my mind. In that case, just the client should be depended on. The server could be located on another host which is why it is preferable to only depend on the client.
Created attachment 147214 [details] Updated shell archive for port: net/kamailio
root@host1:/usr/ports/net/kamailio # make stage-qa ====> Running Q/A tests (stage-qa) root@host1:/usr/ports/net/kamailio # echo $? 0 root@host1:/usr/ports/net/kamailio # make check-plist ====> Checking for pkg-plist issues (check-plist) ===> Parsing plist ===> Checking for items in STAGEDIR missing from pkg-plist ===> Checking for directories owned by MTREEs ===> Checking for directories handled by dependencies ===> Checking for items in pkg-plist which are not in STAGEDIR ===> No pkg-plist issues found (check-plist) root@host1:/usr/ports/net/kamailio # echo $? 0
Created attachment 147215 [details] poudriere log file for port: net/kamailio
It doesn't really matter since you are using ".if" statements anyway, but: USE_MYSQL= YES could be: MYSQL_USE= MYSQL=YES and USES+= pgsql could be: PGSQL_USES= pgsql And they would be place with the other option lines.
Xpre-build: X @cd ${WRKSRC} && ${GMAKE} ${MAKE_ARGS} cfg Remove "@" please, it masks the output. Xdo-build: X @cd ${WRKSRC} && ${GMAKE} ${ALL_TARGET} Remove "@" please, it masks the output. Xdo-install: X @cd ${WRKSRC} && ${GMAKE} ${INSTALL_TARGET} Remove "@" please, it masks the output. Don't use "@" for any configure, build or install commands other than "${MKDIR}" or "@{ECHO}". You can use it in post-extract.
The regular build under /usr/ports/net/kamailio is fine. However, the poudriere testport build failed due to a filesystem violation.
(In reply to olivermahmoudi from comment #32) > The regular build under /usr/ports/net/kamailio is fine. However, the > poudriere testport build failed due to a filesystem violation. Which is a perfect illustration why I love poudriere reports with the PR. It's better that you find this before me. You have to fix that, of course.
as a hint, sometimes setting HOME=/dev/null in MAKE_ENV fixes issues like that.
Created attachment 147216 [details] Updated shell archive for port: net/kamailio
Created attachment 147318 [details] Updated shell archive for port: net/kamailio
Created attachment 147319 [details] poudriere log file for port: net/kamailio
(In reply to John Marino from comment #33) > (In reply to olivermahmoudi from comment #32) > > The regular build under /usr/ports/net/kamailio is fine. However, the > > poudriere testport build failed due to a filesystem violation. > > > Which is a perfect illustration why I love poudriere reports with the PR. > It's better that you find this before me. > > You have to fix that, of course. Fixed the stage_fs_violation issue. It now gives a stable build. Please check the attached poudriere log file.
okay, great. Can you regenerate the shar without the gid/uid diff? Then upload the gid/uid diff as a separate attachment. After that I will move it to "patch-ready" status.
Created attachment 147325 [details] Updated shell archive for port: net/kamailio
Created attachment 147326 [details] UIDs.diff for port: net/kamailio
Created attachment 147327 [details] GIDs.diff for port: net/kamailio
Okay, thanks. One diff for both UIDs and GIDS would have been preferable, but I'm moving this to patch-ready now as promised.
(In reply to John Marino from comment #43) > Okay, thanks. One diff for both UIDs and GIDS would have been preferable, > but I'm moving this to patch-ready now as promised. Awesome, thanks!
Created attachment 147332 [details] shar for update to 4.1.5 shar is updated for build of 4.1.5 (most recent stable version) poudriere logs for 4.1.5 can be seen at: http://people.freebsd.org/~pi/logs/net__kamailio-10a-1410726122.txt http://people.freebsd.org/~pi/logs/net__kamailio-91a-1410726122.txt Open issue: it hardcodes clang into Makefile.defs, need a way to handle this on 8.4-i386.
Kurt: What does your comment at the end mean? I was going to commit this, but now it appears you are saying more work is needed for FreeBSD 8.4?
(In reply to John Marino from comment #46) > Kurt: What does your comment at the end mean? > I was going to commit this, but now it appears you are saying more work is > needed for FreeBSD 8.4? Yes. The build of that software uses a Makefile.defs file, which gets patched to use clang. On 8.4 there's no clang, only clang33. Either we declare it as "IGNORE" for 8 (it's a new port, so will probably not be used on older installs) or we find a solution for this.
A commit references this bug: Author: pi Date: Fri Sep 19 18:02:49 UTC 2014 New revision: 368581 URL: http://svnweb.freebsd.org/changeset/ports/368581 Log: New port: net/kamailio 4.1.6 Kamailio is an open source SIP proxy server that is capable of handling thousands of up calls in a second. Among the features it provides, are support for TCP, UDP and SCTP, secure communication via TLS for VoIP (voice, video), accounting, the most popular open source databases and much more. Originally starting out as the SIP Express Router (SER) project by the Fraunhofer Society in 2001, the design team got together in 2008, merged old and new source code and rebranded SER to Kamailio. WWW: http://www.kamailio.org/ PR: 181301 Submitted by: Oliver Mahmoudi <olivermahmoudi@gmail.com> Reviewed by: marino Changes: head/GIDs head/UIDs head/net/Makefile head/net/kamailio/ head/net/kamailio/Makefile head/net/kamailio/distinfo head/net/kamailio/files/ head/net/kamailio/files/kamailio.in head/net/kamailio/files/patch-Makefile head/net/kamailio/files/patch-Makefile.defs head/net/kamailio/files/patch-modules__db_berkeley__Makefile head/net/kamailio/files/patch-modules__db_oracle__Makefile head/net/kamailio/files/patch-modules__db_sqlite__Makefile head/net/kamailio/files/patch-modules__tls__Makefile head/net/kamailio/files/patch-utils__kamctl__Makefile head/net/kamailio/pkg-descr head/net/kamailio/pkg-plist
Committed, thanks to Oliver for his patience!