lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

July 2024

  • 1 participants
  • 1379 discussions
[S] Change in osmo-dev[master]: gen_makefile: add --install-prefix argument
by osmith 04 Jul '24

04 Jul '24
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-dev/+/37342?usp=email ) Change subject: gen_makefile: add --install-prefix argument ...................................................................... gen_makefile: add --install-prefix argument Make it feasible to set installation prefixes for both autotools and meson projects (open5gs) when building them with osmo-dev. This will be used by the new testenv script for osmo-ttcn3-hacks. Related: OS#6494 Change-Id: I1788a9a1e6c83f108e03968f797c258da20863b0 --- M gen_makefile.py 1 file changed, 23 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/42/37342/1 diff --git a/gen_makefile.py b/gen_makefile.py index ff8ab78..ca9003a 100755 --- a/gen_makefile.py +++ b/gen_makefile.py @@ -50,6 +50,7 @@ import os import argparse import multiprocessing +import shlex topdir = os.path.dirname(os.path.realpath(__file__)) all_deps_file = os.path.join(topdir, "all.deps") @@ -118,6 +119,9 @@ parser.add_argument('-a', '--auto-distclean', action='store_true', help='''run "make distclean" automatically if source directory already configured''') +parser.add_argument('-i', '--install-prefix', default='/usr/local', + help='''install there instead of /usr/local''') + args = parser.parse_args() class listdict(dict): @@ -252,7 +256,9 @@ -chmod -R ug+w {build_proj} -rm -rf {build_proj} mkdir -p {build_proj} - cd {build_proj}; {cflags}{docker_cmd}{build_to_src}/configure {configure_opts} + cd {build_proj}; {cflags}{docker_cmd}{build_to_src}/configure \\ + --prefix {shlex.quote(args.install_prefix)} \\ + {configure_opts} sync touch $@ ''' @@ -263,7 +269,8 @@ -chmod -R ug+w {build_proj} -rm -rf {build_proj} mkdir -p {build_proj} - cd {build_proj}; {cflags}{docker_cmd}meson setup {build_to_src} . + cd {build_proj}; {cflags}{docker_cmd}meson setup {build_to_src} . \\ + --prefix {shlex.quote(args.install_prefix)} sync touch $@ ''' -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/37342?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: I1788a9a1e6c83f108e03968f797c258da20863b0 Gerrit-Change-Number: 37342 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-dev[master]: gen_makefile: write content into a buffer first
by osmith 04 Jul '24

04 Jul '24
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-dev/+/37343?usp=email ) Change subject: gen_makefile: write content into a buffer first ...................................................................... gen_makefile: write content into a buffer first Instead of directly writing the new Makefile, write the new content into a buffer variable first. This ensures that we don't abort half-way while writing the Makefile, and it allows replacing spaces -> tabs in the next patch. Change-Id: I9a0ee9aa5047b7d9af9673465441039cd55c221b --- M gen_makefile.py 1 file changed, 44 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/43/37343/1 diff --git a/gen_makefile.py b/gen_makefile.py index ca9003a..76c81f8 100755 --- a/gen_makefile.py +++ b/gen_makefile.py @@ -465,19 +465,15 @@ if not build_dir: build_dir = make_dir -output = os.path.join(make_dir, args.output) -print('Writing to %r' % output) +content = '# This Makefile was generated by %s\n' % os.path.basename(sys.argv[0]) -with open(output, 'w') as out: - out.write('# This Makefile was generated by %s\n' % os.path.basename(sys.argv[0])) +configure_opts_args = "" +for f in configure_opts_files: + if not f.endswith(".deps"): + configure_opts_args += f' \\\n\t\t{os.path.relpath(f, make_dir)}' - configure_opts_args = "" - for f in configure_opts_files: - if not f.endswith(".deps"): - configure_opts_args += f' \\\n\t\t{os.path.relpath(f, make_dir)}' - - # convenience: add a regen target that updates the generated makefile itself - out.write(r''' +# convenience: add a regen target that updates the generated makefile itself +content += r''' default: usrp # @@ -567,26 +563,33 @@ docker_cmd=f' \\\n\t\t--docker-cmd "{args.docker_cmd}"' if args.docker_cmd else '', build_debug=f' \\\n\t\t--build-debug' if args.build_debug else '', auto_distclean=' \\\n\t\t--auto-distclean' if args.auto_distclean else '', - )) +) - # convenience target: clone all repositories first - out.write('clone: \\\n\t' + ' \\\n\t'.join([ '.make.%s.clone' % p for p, d in projects_deps ]) + '\n\n') +# convenience target: clone all repositories first +content += 'clone: \\\n\t' + ' \\\n\t'.join([ '.make.%s.clone' % p for p, d in projects_deps ]) + '\n\n' - # convenience target: clean all - out.write('clean: \\\n\t' + ' \\\n\t'.join([ '%s-clean' % p for p, d in projects_deps ]) + '\n\n') +# convenience target: clean all +content += 'clean: \\\n\t' + ' \\\n\t'.join([ '%s-clean' % p for p, d in projects_deps ]) + '\n\n' - # now the actual useful build rules - out.write('all: clone all-install\n\n') +# now the actual useful build rules +content += 'all: clone all-install\n\n' - out.write('all-install: \\\n\t' + ' \\\n\t'.join([ '.make.%s.install' % p for p, d in projects_deps ]) + '\n\n') +content += 'all-install: \\\n\t' + ' \\\n\t'.join([ '.make.%s.install' % p for p, d in projects_deps ]) + '\n\n' - for proj, deps in projects_deps: - all_config_opts = [] - all_config_opts.extend(configure_opts.get('ALL') or []) - all_config_opts.extend(configure_opts.get(proj) or []) - out.write(gen_make(proj, deps, all_config_opts, args.jobs, - make_dir, args.src_dir, build_dir, args.url, args.push_url, - args.sudo_make_install, args.no_ldconfig, - args.ldconfig_without_sudo, args.make_check)) +for proj, deps in projects_deps: + all_config_opts = [] + all_config_opts.extend(configure_opts.get('ALL') or []) + all_config_opts.extend(configure_opts.get(proj) or []) + content += gen_make(proj, deps, all_config_opts, args.jobs, + make_dir, args.src_dir, build_dir, args.url, args.push_url, + args.sudo_make_install, args.no_ldconfig, + args.ldconfig_without_sudo, args.make_check) + + +output = os.path.join(make_dir, args.output) +print('Writing to %r' % output) + +with open(output, 'w') as out: + out.write(content) # vim: expandtab tabstop=2 shiftwidth=2 -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/37343?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: I9a0ee9aa5047b7d9af9673465441039cd55c221b Gerrit-Change-Number: 37343 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-dev[master]: gen_makefile: fix meson warning
by osmith 04 Jul '24

04 Jul '24
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-dev/+/37341?usp=email ) Change subject: gen_makefile: fix meson warning ...................................................................... gen_makefile: fix meson warning Fix for: WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated. Change-Id: I5de0285012344876dbe47f1ae663bf93c45aade0 --- M gen_makefile.py 1 file changed, 13 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/41/37341/1 diff --git a/gen_makefile.py b/gen_makefile.py index 9b896b2..ff8ab78 100755 --- a/gen_makefile.py +++ b/gen_makefile.py @@ -263,7 +263,7 @@ -chmod -R ug+w {build_proj} -rm -rf {build_proj} mkdir -p {build_proj} - cd {build_proj}; {cflags}{docker_cmd}meson {build_to_src} . + cd {build_proj}; {cflags}{docker_cmd}meson setup {build_to_src} . sync touch $@ ''' -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/37341?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: I5de0285012344876dbe47f1ae663bf93c45aade0 Gerrit-Change-Number: 37341 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-dev[master]: gen_makefile: fix stray -e in outputs
by osmith 04 Jul '24

04 Jul '24
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-dev/+/37345?usp=email ) Change subject: gen_makefile: fix stray -e in outputs ...................................................................... gen_makefile: fix stray -e in outputs Instead of echo from coreutils, which has the -e flag to enable interpretation of backslash escapes, the built-in echo from /bin/sh gets used which defaults to interpretation of backslash escapes and prints a literal "-e". From https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html: > The program used as the shell is taken from the variable SHELL. If this > variable is not set in your makefile, the program /bin/sh is used as the > shell. Change-Id: I06ed3a8c55fd5eb51269afb8cd12433077c2f7e6 --- M gen_makefile.py 1 file changed, 34 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/45/37345/1 diff --git a/gen_makefile.py b/gen_makefile.py index f730c59..2fd04a7 100755 --- a/gen_makefile.py +++ b/gen_makefile.py @@ -179,7 +179,7 @@ if proj == "osmocom-bb_layer23": return f''' .make.{proj}.clone: .make.osmocom-bb.clone - @echo -e "\\n\\n\\n===== $@\\n" + @echo "\\n\\n\\n===== $@\\n" test -L {src_proj} || ln -s osmocom-bb/src/host/layer23 {src_proj} touch $@ ''' @@ -187,7 +187,7 @@ if proj == "osmocom-bb_virtphy": return f''' .make.{proj}.clone: .make.osmocom-bb.clone - @echo -e "\\n\\n\\n===== $@\\n" + @echo "\\n\\n\\n===== $@\\n" test -L {src_proj} || ln -s osmocom-bb/src/host/virt_phy {src_proj} touch $@ ''' @@ -195,7 +195,7 @@ if proj == "osmocom-bb_trxcon": return f''' .make.{proj}.clone: .make.osmocom-bb.clone - @echo -e "\\n\\n\\n===== $@\\n" + @echo "\\n\\n\\n===== $@\\n" test -L {src_proj} || ln -s osmocom-bb/src/host/trxcon {src_proj} touch $@ ''' @@ -203,7 +203,7 @@ if proj == "simtrace2_host": return f''' .make.{proj}.clone: .make.simtrace2.clone - @echo -e "\\n\\n\\n===== $@\\n" + @echo "\\n\\n\\n===== $@\\n" test -L {src_proj} || ln -s simtrace2/host {src_proj} touch $@ ''' @@ -220,7 +220,7 @@ return f''' .make.{proj}.clone: - @echo -e "\\n\\n\\n===== $@\\n" + @echo "\\n\\n\\n===== $@\\n" test -d {src} || mkdir -p {src} test -d {src_proj} || ( {cmd_clone} && {cmd_set_push_url} ) sync @@ -233,7 +233,7 @@ return f''' .make.{proj}.autoconf: .make.{proj}.clone {src_proj}/configure.ac if {distclean_cond}; then $(MAKE) {proj}-distclean; fi - @echo -e "\\n\\n\\n===== $@\\n" + @echo "\\n\\n\\n===== $@\\n" -rm -f {src_proj}/.version cd {src_proj}; autoreconf -fi sync @@ -252,7 +252,7 @@ return f''' .make.{proj}.configure: .make.{proj}.autoconf {deps_installed} $({proj}_configure_files) if {distclean_cond}; then $(MAKE) {proj}-distclean .make.{proj}.autoconf; fi - @echo -e "\\n\\n\\n===== $@\\n" + @echo "\\n\\n\\n===== $@\\n" -chmod -R ug+w {build_proj} -rm -rf {build_proj} mkdir -p {build_proj} @@ -265,7 +265,7 @@ elif buildsystem == "meson": return f''' .make.{proj}.configure: .make.{proj}.clone {deps_installed} $({proj}_configure_files) - @echo -e "\\n\\n\\n===== $@\\n" + @echo "\\n\\n\\n===== $@\\n" -chmod -R ug+w {build_proj} -rm -rf {build_proj} mkdir -p {build_proj} @@ -285,7 +285,7 @@ return f''' .make.{proj}.build: .make.{proj}.configure $({proj}_files) if {distclean_cond}; then $(MAKE) {proj}-distclean .make.{proj}.configure; fi - @echo -e "\\n\\n\\n===== $@\\n" + @echo "\\n\\n\\n===== $@\\n" {docker_cmd}$(MAKE) -C {build_proj} -j {jobs} {check} sync touch $@ @@ -298,7 +298,7 @@ # test_line = f"{docker_cmd}meson test -C {build_proj} -v" return f''' .make.{proj}.build: .make.{proj}.configure $({proj}_files) - @echo -e "\\n\\n\\n===== $@\\n" + @echo "\\n\\n\\n===== $@\\n" {docker_cmd}meson compile -C {build_proj} -j {jobs} {test_line} sync @@ -313,7 +313,7 @@ if buildsystem == "autotools": return f''' .make.{proj}.install: .make.{proj}.build - @echo -e "\\n\\n\\n===== $@\\n" + @echo "\\n\\n\\n===== $@\\n" {docker_cmd}{sudo_make_install}$(MAKE) -C {build_proj} install {no_ldconfig}{sudo_ldconfig}ldconfig sync @@ -322,7 +322,7 @@ elif buildsystem == "meson": return f''' .make.{proj}.install: .make.{proj}.build - @echo -e "\\n\\n\\n===== $@\\n" + @echo "\\n\\n\\n===== $@\\n" {docker_cmd}{sudo_make_install}ninja -C {build_proj} install {no_ldconfig}{sudo_ldconfig}ldconfig sync @@ -343,7 +343,7 @@ return f''' .PHONY: {proj}-clean {proj}-clean: - @echo -e "\\n\\n\\n===== $@\\n" + @echo "\\n\\n\\n===== $@\\n" -chmod -R ug+w {build_proj} -rm -rf {build_proj} -rm -rf .make.{proj}.* @@ -353,7 +353,7 @@ return f''' .PHONY: {proj}-distclean {proj}-distclean: {proj}-clean - @echo -e "\\n\\n\\n===== $@\\n" + @echo "\\n\\n\\n===== $@\\n" $(MAKE) -C {src_proj} distclean ''' -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/37345?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: I06ed3a8c55fd5eb51269afb8cd12433077c2f7e6 Gerrit-Change-Number: 37345 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-dev[master]: gen_makefile: indent whole file with spaces
by osmith 04 Jul '24

04 Jul '24
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-dev/+/37344?usp=email ) Change subject: gen_makefile: indent whole file with spaces ...................................................................... gen_makefile: indent whole file with spaces Use spaces as indent for the Makefile snippets and replace them with tabs just before writing the Makefile. This way we can indent the whole file with spaces. Instead of mixing spaces and tabs, and frequently having spaces where tabs would need to be by accident, which then results in a broken Makefile. Use two spaces for the tabs, as in the vim modeline at the bottom. Change-Id: I42eb2dda0f1f48d4a8ea2e1e59f9cfd8df7af800 --- M gen_makefile.py 1 file changed, 115 insertions(+), 94 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/44/37344/1 diff --git a/gen_makefile.py b/gen_makefile.py index 76c81f8..f730c59 100755 --- a/gen_makefile.py +++ b/gen_makefile.py @@ -179,33 +179,33 @@ if proj == "osmocom-bb_layer23": return f''' .make.{proj}.clone: .make.osmocom-bb.clone - @echo -e "\\n\\n\\n===== $@\\n" - test -L {src_proj} || ln -s osmocom-bb/src/host/layer23 {src_proj} - touch $@ + @echo -e "\\n\\n\\n===== $@\\n" + test -L {src_proj} || ln -s osmocom-bb/src/host/layer23 {src_proj} + touch $@ ''' if proj == "osmocom-bb_virtphy": return f''' .make.{proj}.clone: .make.osmocom-bb.clone - @echo -e "\\n\\n\\n===== $@\\n" - test -L {src_proj} || ln -s osmocom-bb/src/host/virt_phy {src_proj} - touch $@ + @echo -e "\\n\\n\\n===== $@\\n" + test -L {src_proj} || ln -s osmocom-bb/src/host/virt_phy {src_proj} + touch $@ ''' if proj == "osmocom-bb_trxcon": return f''' .make.{proj}.clone: .make.osmocom-bb.clone - @echo -e "\\n\\n\\n===== $@\\n" - test -L {src_proj} || ln -s osmocom-bb/src/host/trxcon {src_proj} - touch $@ + @echo -e "\\n\\n\\n===== $@\\n" + test -L {src_proj} || ln -s osmocom-bb/src/host/trxcon {src_proj} + touch $@ ''' if proj == "simtrace2_host": return f''' .make.{proj}.clone: .make.simtrace2.clone - @echo -e "\\n\\n\\n===== $@\\n" - test -L {src_proj} || ln -s simtrace2/host {src_proj} - touch $@ + @echo -e "\\n\\n\\n===== $@\\n" + test -L {src_proj} || ln -s simtrace2/host {src_proj} + touch $@ ''' if proj in projects_urls: @@ -220,11 +220,11 @@ return f''' .make.{proj}.clone: - @echo -e "\\n\\n\\n===== $@\\n" - test -d {src} || mkdir -p {src} - test -d {src_proj} || ( {cmd_clone} && {cmd_set_push_url} ) - sync - touch $@ + @echo -e "\\n\\n\\n===== $@\\n" + test -d {src} || mkdir -p {src} + test -d {src_proj} || ( {cmd_clone} && {cmd_set_push_url} ) + sync + touch $@ ''' def gen_makefile_autoconf(proj, src_proj, distclean_cond): @@ -232,12 +232,12 @@ if buildsystem == "autotools": return f''' .make.{proj}.autoconf: .make.{proj}.clone {src_proj}/configure.ac - if {distclean_cond}; then $(MAKE) {proj}-distclean; fi - @echo -e "\\n\\n\\n===== $@\\n" - -rm -f {src_proj}/.version - cd {src_proj}; autoreconf -fi - sync - touch $@ + if {distclean_cond}; then $(MAKE) {proj}-distclean; fi + @echo -e "\\n\\n\\n===== $@\\n" + -rm -f {src_proj}/.version + cd {src_proj}; autoreconf -fi + sync + touch $@ ''' elif buildsystem == "meson": return "" @@ -251,28 +251,28 @@ if buildsystem == "autotools": return f''' .make.{proj}.configure: .make.{proj}.autoconf {deps_installed} $({proj}_configure_files) - if {distclean_cond}; then $(MAKE) {proj}-distclean .make.{proj}.autoconf; fi - @echo -e "\\n\\n\\n===== $@\\n" - -chmod -R ug+w {build_proj} - -rm -rf {build_proj} - mkdir -p {build_proj} - cd {build_proj}; {cflags}{docker_cmd}{build_to_src}/configure \\ - --prefix {shlex.quote(args.install_prefix)} \\ - {configure_opts} - sync - touch $@ + if {distclean_cond}; then $(MAKE) {proj}-distclean .make.{proj}.autoconf; fi + @echo -e "\\n\\n\\n===== $@\\n" + -chmod -R ug+w {build_proj} + -rm -rf {build_proj} + mkdir -p {build_proj} + cd {build_proj}; {cflags}{docker_cmd}{build_to_src}/configure \\ + --prefix {shlex.quote(args.install_prefix)} \\ + {configure_opts} + sync + touch $@ ''' elif buildsystem == "meson": return f''' .make.{proj}.configure: .make.{proj}.clone {deps_installed} $({proj}_configure_files) - @echo -e "\\n\\n\\n===== $@\\n" - -chmod -R ug+w {build_proj} - -rm -rf {build_proj} - mkdir -p {build_proj} - cd {build_proj}; {cflags}{docker_cmd}meson setup {build_to_src} . \\ - --prefix {shlex.quote(args.install_prefix)} - sync - touch $@ + @echo -e "\\n\\n\\n===== $@\\n" + -chmod -R ug+w {build_proj} + -rm -rf {build_proj} + mkdir -p {build_proj} + cd {build_proj}; {cflags}{docker_cmd}meson setup {build_to_src} . \\ + --prefix {shlex.quote(args.install_prefix)} + sync + touch $@ ''' else: assert False, f"unknown buildsystem: {buildsystem}" @@ -284,11 +284,11 @@ if buildsystem == "autotools": return f''' .make.{proj}.build: .make.{proj}.configure $({proj}_files) - if {distclean_cond}; then $(MAKE) {proj}-distclean .make.{proj}.configure; fi - @echo -e "\\n\\n\\n===== $@\\n" - {docker_cmd}$(MAKE) -C {build_proj} -j {jobs} {check} - sync - touch $@ + if {distclean_cond}; then $(MAKE) {proj}-distclean .make.{proj}.configure; fi + @echo -e "\\n\\n\\n===== $@\\n" + {docker_cmd}$(MAKE) -C {build_proj} -j {jobs} {check} + sync + touch $@ ''' elif buildsystem == "meson": target = "test" if check else "compile" @@ -298,11 +298,11 @@ # test_line = f"{docker_cmd}meson test -C {build_proj} -v" return f''' .make.{proj}.build: .make.{proj}.configure $({proj}_files) - @echo -e "\\n\\n\\n===== $@\\n" - {docker_cmd}meson compile -C {build_proj} -j {jobs} - {test_line} - sync - touch $@ + @echo -e "\\n\\n\\n===== $@\\n" + {docker_cmd}meson compile -C {build_proj} -j {jobs} + {test_line} + sync + touch $@ ''' else: assert False, f"unknown buildsystem: {buildsystem}" @@ -313,20 +313,20 @@ if buildsystem == "autotools": return f''' .make.{proj}.install: .make.{proj}.build - @echo -e "\\n\\n\\n===== $@\\n" - {docker_cmd}{sudo_make_install}$(MAKE) -C {build_proj} install - {no_ldconfig}{sudo_ldconfig}ldconfig - sync - touch $@ + @echo -e "\\n\\n\\n===== $@\\n" + {docker_cmd}{sudo_make_install}$(MAKE) -C {build_proj} install + {no_ldconfig}{sudo_ldconfig}ldconfig + sync + touch $@ ''' elif buildsystem == "meson": return f''' .make.{proj}.install: .make.{proj}.build - @echo -e "\\n\\n\\n===== $@\\n" - {docker_cmd}{sudo_make_install}ninja -C {build_proj} install - {no_ldconfig}{sudo_ldconfig}ldconfig - sync - touch $@ + @echo -e "\\n\\n\\n===== $@\\n" + {docker_cmd}{sudo_make_install}ninja -C {build_proj} install + {no_ldconfig}{sudo_ldconfig}ldconfig + sync + touch $@ ''' else: assert False, f"unknown buildsystem: {buildsystem}" @@ -336,25 +336,25 @@ return f''' .PHONY: {proj}-reinstall {proj}-reinstall: {deps_reinstall} - {sudo_make_install}$(MAKE) -C {build_proj} install + {sudo_make_install}$(MAKE) -C {build_proj} install ''' def gen_makefile_clean(proj, build_proj): return f''' .PHONY: {proj}-clean {proj}-clean: - @echo -e "\\n\\n\\n===== $@\\n" - -chmod -R ug+w {build_proj} - -rm -rf {build_proj} - -rm -rf .make.{proj}.* + @echo -e "\\n\\n\\n===== $@\\n" + -chmod -R ug+w {build_proj} + -rm -rf {build_proj} + -rm -rf .make.{proj}.* ''' def gen_makefile_distclean(proj, src_proj): return f''' .PHONY: {proj}-distclean {proj}-distclean: {proj}-clean - @echo -e "\\n\\n\\n===== $@\\n" - $(MAKE) -C {src_proj} distclean + @echo -e "\\n\\n\\n===== $@\\n" + $(MAKE) -C {src_proj} distclean ''' def gen_make(proj, deps, configure_opts, jobs, make_dir, src_dir, build_dir, url, push_url, sudo_make_install, no_ldconfig, ldconfig_without_sudo, make_check): @@ -481,21 +481,21 @@ # .PHONY: cn cn: \ - osmo-ggsn \ - osmo-hlr \ - osmo-iuh \ - osmo-mgw \ - osmo-msc \ - osmo-sgsn \ - osmo-sip-connector \ - osmo-smlc \ - $(NULL) + osmo-ggsn \ + osmo-hlr \ + osmo-iuh \ + osmo-mgw \ + osmo-msc \ + osmo-sgsn \ + osmo-sip-connector \ + osmo-smlc \ + $(NULL) .PHONY: cn-bsc cn-bsc: \ - cn \ - osmo-bsc \ - $(NULL) + cn \ + osmo-bsc \ + $(NULL) .PHONY: cn-bsc-nat cn-bsc-nat: \ @@ -509,10 +509,10 @@ .PHONY: usrp usrp: \ - cn-bsc \ - osmo-bts \ - osmo-trx \ - $(NULL) + cn-bsc \ + osmo-bts \ + osmo-trx \ + $(NULL) # # Convenience targets for components in subdirs of repositories @@ -531,20 +531,20 @@ # .PHONY: all_debug all_debug: - $(MAKE) --dry-run -d all | grep "is newer than target" - $(MAKE) all + $(MAKE) --dry-run -d all | grep "is newer than target" + $(MAKE) all # regenerate this Makefile, in case the deps or opts changed .PHONY: regen regen: - {script} \ - {configure_opts} \ - --output {makefile} \ - --src-dir {src_dir} \ - --make-dir {make_dir} \ - --build-dir {build_dir} \ - --jobs {jobs} \ - --url "{url}"{push_url}{sudo_make_install}{no_ldconfig}{ldconfig_without_sudo}{make_check}{docker_cmd}{build_debug}{auto_distclean} + {script} \ + {configure_opts} \ + --output {makefile} \ + --src-dir {src_dir} \ + --make-dir {make_dir} \ + --build-dir {build_dir} \ + --jobs {jobs} \ + --url "{url}"{push_url}{sudo_make_install}{no_ldconfig}{ldconfig_without_sudo}{make_check}{docker_cmd}{build_debug}{auto_distclean} '''.format( script=os.path.relpath(sys.argv[0], make_dir), @@ -585,6 +585,10 @@ args.sudo_make_install, args.no_ldconfig, args.ldconfig_without_sudo, args.make_check) +# Replace spaces with tabs to avoid the common pitfall of inserting spaces +# instead of tabs by accident into the Makefile (as the python code is indented +# with spaces), which results in a broken Makefile. +content = content.replace(" ", " ") output = os.path.join(make_dir, args.output) print('Writing to %r' % output) -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/37344?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: I42eb2dda0f1f48d4a8ea2e1e59f9cfd8df7af800 Gerrit-Change-Number: 37344 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-dev[master]: gen_makefile: support erlang projects
by osmith 04 Jul '24

04 Jul '24
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-dev/+/37346?usp=email ) Change subject: gen_makefile: support erlang projects ...................................................................... gen_makefile: support erlang projects Change-Id: Ib471a518c48dac8c0cd22bfb038b99b58014708f --- M all.buildsystems M all.deps M gen_makefile.py 3 files changed, 43 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/46/37346/1 diff --git a/all.buildsystems b/all.buildsystems index fc1784b..7b5a573 100644 --- a/all.buildsystems +++ b/all.buildsystems @@ -1,3 +1,6 @@ # Projects with buildsystems other than autotools # project buildsystem open5gs meson +osmo-s1gw erlang +osmo-epdg erlang +osmo_dia2gsup erlang diff --git a/all.deps b/all.deps index 398ebec..4ccb91e 100644 --- a/all.deps +++ b/all.deps @@ -37,6 +37,10 @@ osmo-remsim simtrace2_host libosmo-netif osmo-uecups libosmocore +osmo-s1gw +osmo-epdg +osmo_dia2gsup + open5gs # can only clone these diff --git a/gen_makefile.py b/gen_makefile.py index 2fd04a7..0476a3f 100755 --- a/gen_makefile.py +++ b/gen_makefile.py @@ -239,7 +239,7 @@ sync touch $@ ''' - elif buildsystem == "meson": + elif buildsystem in ["meson", "erlang"]: return "" else: assert False, f"unknown buildsystem: {buildsystem}" @@ -274,11 +274,13 @@ sync touch $@ ''' + elif buildsystem == "erlang": + return "" else: assert False, f"unknown buildsystem: {buildsystem}" def gen_makefile_build(proj, distclean_cond, build_proj, docker_cmd, jobs, - check): + check, src_proj): buildsystem = projects_buildsystems.get(proj, "autotools") if buildsystem == "autotools": @@ -304,6 +306,17 @@ sync touch $@ ''' + elif buildsystem == "erlang": + return f''' +.make.{proj}.build: $({proj}_files) + @echo "\\n\\n\\n===== $@\\n" + set -x && \\ + export REBAR_BASE_DIR="$$PWD/{build_proj}" && \\ + mkdir -p "$$REBAR_BASE_DIR" && \\ + $(MAKE) -C {src_proj} build {check} + sync + touch $@ + ''' else: assert False, f"unknown buildsystem: {buildsystem}" @@ -328,6 +341,16 @@ sync touch $@ ''' + elif buildsystem == "erlang": + return f''' +.make.{proj}.install: .make.{proj}.build + @echo "\\n\\n\\n===== $@\\n" + for i in {build_proj}/default/bin/*; do \\ + install -v -Dm755 "$$i" -t {shlex.quote(args.install_prefix)}/bin/; \\ + done + sync + touch $@ + ''' else: assert False, f"unknown buildsystem: {buildsystem}" @@ -400,6 +423,7 @@ -or -name "*.cpp" \ -or -name "*.tpl" \ -or -name "*.map" \ + -or -name "*.erl" \ \) \ -and -not -name "config.h" 2>/dev/null) @@ -431,7 +455,7 @@ build_proj, cflags, docker_cmd, build_to_src, configure_opts_str), build_rule=gen_makefile_build(proj, distclean_cond, build_proj, docker_cmd, - jobs, check), + jobs, check, src_proj), install_rule=gen_makefile_install(proj, docker_cmd, sudo_make_install, build_proj, no_ldconfig, sudo_ldconfig), reinstall_rule=gen_makefile_reinstall(proj, deps_reinstall, -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/37346?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: Ib471a518c48dac8c0cd22bfb038b99b58014708f Gerrit-Change-Number: 37346 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: asterisk: IMS: Fix seq_nr during MT calls
by pespin 04 Jul '24

04 Jul '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37335?usp=email ) Change subject: asterisk: IMS: Fix seq_nr during MT calls ...................................................................... asterisk: IMS: Fix seq_nr during MT calls Change-Id: Ieeb9fb803ab3b1d02b5bfd8198702780914ec318 --- M asterisk/IMS_ConnectionHandler.ttcn 1 file changed, 17 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/asterisk/IMS_ConnectionHandler.ttcn b/asterisk/IMS_ConnectionHandler.ttcn index 4b50c31..c7d87b2 100644 --- a/asterisk/IMS_ConnectionHandler.ttcn +++ b/asterisk/IMS_ConnectionHandler.ttcn @@ -1128,6 +1128,7 @@ var default d_trying, d_ringing; var charstring branch_value; var Contact calling_contact, called_contact; + var integer sip_seq_nr; /* RFC 3261 8.1.1.3 From */ g_pars.subscr.cp.from_addr := valueof(ts_From(g_pars.subscr.cp.calling.addr, g_pars.subscr.cp.calling.params)); @@ -1168,12 +1169,13 @@ supported := ts_Supported(supported_list); } + sip_seq_nr := g_pars.subscr.cp.sip_seq_nr; req := ts_SIP_INVITE(g_pars.subscr.cp.sip_call_id, g_pars.subscr.cp.from_addr, g_pars.subscr.cp.to_addr, via, calling_contact, - g_pars.subscr.cp.sip_seq_nr, + sip_seq_nr, accept := ts_Accept({ ts_AcceptBody("application/sdp"), ts_AcceptBody("application/3gpp-ims+xml") }), min_SE := min_SE, session_expires := session_expires, @@ -1187,7 +1189,7 @@ from_addr_exp, to_addr_exp, f_tr_Via_response(via), - g_pars.subscr.cp.sip_seq_nr, "INVITE"); + sip_seq_nr, "INVITE"); d_trying := activate(as_SIP_ignore_resp(exp)); if (g_pars.subscr.cp.mt.tx_coord_cmd_session_progress) { @@ -1203,7 +1205,7 @@ from_addr_exp, to_addr_exp, f_tr_Via_response(via), - g_pars.subscr.cp.sip_seq_nr, "INVITE", + sip_seq_nr, "INVITE", require := tr_Require(superset("100rel", "precondition")), rseq := tr_RSeq(?), body := ?); @@ -1310,13 +1312,14 @@ g_pars.subscr.cp.sip_seq_nr := g_rx_sip_resp.msgHeader.cSeq.seqNumber + 1; } + g_pars.subscr.cp.sip_seq_nr := g_pars.subscr.cp.sip_seq_nr + 1; /* Conditionally match and accept 180 Ringing */ exp := tr_SIP_Response_Ringing(g_pars.subscr.cp.sip_call_id, from_addr_exp, to_addr_exp, f_tr_Via_response(via), - g_pars.subscr.cp.sip_seq_nr, "INVITE"); + sip_seq_nr, "INVITE"); d_ringing := activate(as_SIP_ignore_resp(exp)); called_contact := g_rx_sip_resp.msgHeader.contact; @@ -1329,7 +1332,7 @@ f_tr_Via_response(via), called_contact, "INVITE", 200, - g_pars.subscr.cp.sip_seq_nr, "OK", + sip_seq_nr, "OK", body := *); as_SIP_expect_resp(exp, fail_others := false); @@ -1343,7 +1346,6 @@ g_pars.subscr.cp.to_addr := g_rx_sip_resp.msgHeader.toField; /* Transmit ACK */ - g_pars.subscr.cp.sip_seq_nr := g_pars.subscr.cp.sip_seq_nr + 1; req := ts_SIP_ACK(called_contact.contactBody.contactAddresses[0].addressField.nameAddr.addrSpec, g_pars.subscr.cp.sip_call_id, g_pars.subscr.cp.from_addr, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37335?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ieeb9fb803ab3b1d02b5bfd8198702780914ec318 Gerrit-Change-Number: 37335 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: asterisk: Fix missing COORD messages during IMS MT call test
by pespin 04 Jul '24

04 Jul '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37336?usp=email ) Change subject: asterisk: Fix missing COORD messages during IMS MT call test ...................................................................... asterisk: Fix missing COORD messages during IMS MT call test Change-Id: I1aab078d52d31382933511e5ca9ec427e0552ce1 --- M asterisk/Asterisk_Tests.ttcn 1 file changed, 11 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/asterisk/Asterisk_Tests.ttcn b/asterisk/Asterisk_Tests.ttcn index 3dbb81c..9502ee8 100644 --- a/asterisk/Asterisk_Tests.ttcn +++ b/asterisk/Asterisk_Tests.ttcn @@ -878,9 +878,11 @@ f_ami_action_DedicatedBearerStatus(AMI_CLIENT, g_asterisk_chan_name, "Down", fail_others := false); + COORD.receive(COORD_CMD_CALL_FINISHED) from vc_conn_sip; /* Trigger unregistration: */ f_sleep(1.0); + COORD.send(COORD_CMD_UNREGISTER) to vc_conn_sip; AMI_CLIENT.clear; f_AMI_IMS_unregister(ims_pars); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37336?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I1aab078d52d31382933511e5ca9ec427e0552ce1 Gerrit-Change-Number: 37336 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: asterisk: Avoid waiting for 183 to signal DedicatedBearerStatus Up
by pespin 04 Jul '24

04 Jul '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37332?usp=email ) Change subject: asterisk: Avoid waiting for 183 to signal DedicatedBearerStatus Up ...................................................................... asterisk: Avoid waiting for 183 to signal DedicatedBearerStatus Up Change-Id: Icca6268f484d2a723d4d70de8755b7ec605b9194 --- M asterisk/IMS_ConnectionHandler.ttcn 1 file changed, 14 insertions(+), 5 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/asterisk/IMS_ConnectionHandler.ttcn b/asterisk/IMS_ConnectionHandler.ttcn index 51f96ea..1609304 100644 --- a/asterisk/IMS_ConnectionHandler.ttcn +++ b/asterisk/IMS_ConnectionHandler.ttcn @@ -1190,6 +1190,11 @@ g_pars.subscr.cp.sip_seq_nr, "INVITE"); d_trying := activate(as_SIP_ignore_resp(exp)); + if (g_pars.subscr.cp.mt.tx_coord_cmd_session_progress) { + /* Signal used to inform that Dedicated bearer can be established: */ + COORD.send(IMS_COORD_CMD_CALL_SESSION_PROGRESS); + } + if (g_pars.subscr.cp.require_precondition_ext) { var template (present) SDP_attribute_list preconds; /* Rx 183 Session Progress */ @@ -1246,11 +1251,6 @@ body := omit); SIP.send(req); - if (g_pars.subscr.cp.mt.tx_coord_cmd_session_progress) { - /* Signal used to inform that Dedicated bearer can be established: */ - COORD.send(IMS_COORD_CMD_CALL_SESSION_PROGRESS); - } - /* Rx 200 OK (PRACK) */ exp := tr_SIP_Response(g_pars.subscr.cp.sip_call_id, from_addr_exp, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37332?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Icca6268f484d2a723d4d70de8755b7ec605b9194 Gerrit-Change-Number: 37332 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: asterisk: IMS: Fix To tag not updated when sending PRACK in MT call
by pespin 04 Jul '24

04 Jul '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37333?usp=email ) Change subject: asterisk: IMS: Fix To tag not updated when sending PRACK in MT call ...................................................................... asterisk: IMS: Fix To tag not updated when sending PRACK in MT call Change-Id: I55716b7a48b63bc97ea936904a712e53899f03f6 --- M asterisk/IMS_ConnectionHandler.ttcn 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/asterisk/IMS_ConnectionHandler.ttcn b/asterisk/IMS_ConnectionHandler.ttcn index 1609304..ec163f5 100644 --- a/asterisk/IMS_ConnectionHandler.ttcn +++ b/asterisk/IMS_ConnectionHandler.ttcn @@ -1238,6 +1238,9 @@ g_pars.subscr.cp.peer_sdp.media_list[0].attributes)); } + /* Update To with the tags received from peer: */ + g_pars.subscr.cp.to_addr := g_rx_sip_resp.msgHeader.toField; + /* Tx PRACK */ req := ts_SIP_PRACK(g_pars.subscr.cp.to_addr.addressField.nameAddr.addrSpec, g_pars.subscr.cp.sip_call_id, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37333?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I55716b7a48b63bc97ea936904a712e53899f03f6 Gerrit-Change-Number: 37333 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • ...
  • 138
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.