AllStarLink / asl3-asterisk

Building enviornment for the .deb packages of Asterisk LTS + ASL3/app_rpt.
GNU General Public License v2.0
2 stars 0 forks source link

Add new "build-asl3" script #28

Closed Allan-N closed 2 weeks ago

Allan-N commented 1 month ago

Usage : build-asl3 -a ASTV -v RPTV [-r RELV] [-d DESTDIR] [-l] ACTIONS

Required options : -a Asterisk version (e.g. 20.9.2) -v ASL/app_rpt version (e.g. 3.0.4)

Optional options : -r Release version (default: 1) -d local install directory (default: "/") -l Create merged source directory with symlinks

Actions (specify one or more) : source - create the merged source directory clean - "clean" the merged source directory build - "build" the source code install - "install" the build results, locally package - create Debian packages

Note: specifying "build", "install", or "package" will, if needed, create the merged source directory.

Note: you can use the "AST_VER", "RPT_VER", and "REL_VER" environment variables to specify the Asterisk, ASL/app_rpt, and Release versions.

Allan-N commented 1 month ago

Still needs a man page. Need to test on x86 Need to review whether (and when) to remove no-longer-used bits

davidgsd commented 1 month ago

I can successfully build everything on amd64 by running "asl3-asterisk/build-tree -a 20.9.2 -v 3.0.4 -r 2", and "asl3-asterisk/build-asl3 -a 20.9.2 -v 3.0.4 -r 2 build" seemed to take almost as long initially. "asl3-asterisk/build-asl3 -a ... install" completed quickly. "build-asl3 ... build install" then ran faster the next time, taking only about 5 minutes.

However, the changes I made in ./app_rpt/ did not get brought in. So it then appeared that maybe build-asl3 was pulling from asl3-asterisk-20.9.2+asl3-3.0.4/ instead of app_rpt/ (as build-tree does), as I see that files were indeed compiled there. So I copied my changed files to asl3-asterisk-20.9.2+asl3-3.0.4/ then ran the build again, but still no change. I then saw that although I had copied a .c file into this dir, that the .o and .so were not updated during the build. So I then deleted the .o and .so associated with my changed .c file, thinking the make process would notice that and actually make the file, but it did not.

So I then tried "build-asl3...clean" but it gives the below error message: dh_clean: error: mv debian/.debhelper/bucket/files/81564062cef83cd011f09237c9073926da3781d8342bb63dd67bd1fd923ed71f.tmp third-party/pjproject/source/config.guess: No such file or directory

after running "build-asl3...source" the ...clean option then worked, but it only cleaned certain dirs but not most other ie. channels/. I then cd'd into asl-asterisk and ran make clean, which then did clean all remaining dirs, so now I'm building the whole thing again.

Do you have any suggestions on how to get the script to use the files in app-rpt/ instead of asl3-asterisk-xxx+asl3-xxx/? And of course if the script could be optimized to actually detect what .c file(s) changed and only rebuild those that would be great. As it is now it seems to build the stock Ast+app-rpt only while not giving an opportunity to change files and not seeing when any .c files did change. Maybe that's what this script is supposed to do, but in that case the question is how can I change one .c file and quickly build and install app-rpt without going through the 30+ minute build-tree process every time. Thanks

Allan-N commented 1 month ago

I added a "man" page to this branch that should help explain things a bit. That page includes some information on how everything fits together and what actions you need to take for iterative development.

davidgsd commented 4 weeks ago

New script is working well. After changing 1 c file and rebuilding it took only 4 mins. (on a 3040 thin-client w/quad-core Atom 1.4GHz processor). Will do some further testing today.

davidgsd commented 3 weeks ago

Things are working nicely now. I can go into the combined source folder (asl3-asterisk-x.x.x+asl3-x.x.x), change 1 .c file, do a 'make' and then 'make install' there, and it then recompiles just the one file and updates the asterisk+asl install, all within a couple minutes.