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

January 2025

  • 1 participants
  • 1491 discussions
[S] Change in osmo-ttcn3-hacks[master]: SGSN: Remove unsupport test cases
by dexter 27 Jan '25

27 Jan '25
Attention is currently required from: lynxis lazus. dexter has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39261?usp=email ) Change subject: SGSN: Remove unsupport test cases ...................................................................... Patch Set 3: Code-Review+2 (2 comments) Patchset: PS3: Maybe the testcase functions should also be removed? We will probably not re-introduce the feature. Commit Message: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39261/comment/ee1328f6_0df9… : PS3, Line 10: the IMSI, but don't request information from the HLR) will be removed from the is there a line break where it shouldn't be. Or does gerrit display the commit message weirdly? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39261?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I1506324300fe3864069706d5b05860e7b44cd895 Gerrit-Change-Number: 39261 Gerrit-PatchSet: 3 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Mon, 27 Jan 2025 11:51:26 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmo-netif[master]: stream: Undeprecate osmo_stream_srv_set_segmentation_cb()
by pespin 27 Jan '25

27 Jan '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/39412?usp=email ) Change subject: stream: Undeprecate osmo_stream_srv_set_segmentation_cb() ...................................................................... stream: Undeprecate osmo_stream_srv_set_segmentation_cb() It has been decided that it's convenient to use the older segmentation_cb() callback when user wants to segment traffic which doesn't require any external pointer (like IPA), since then less glue code is needed to call the relevant segmentation functions. Change-Id: Icec7ed9e16eb92a2384c16ff5b3e7011205e767c --- M include/osmocom/netif/stream.h M src/stream_cli.c M src/stream_srv.c 3 files changed, 2 insertions(+), 5 deletions(-) Approvals: osmith: Looks good to me, approved Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h index 83f17d7..91a9b5e 100644 --- a/include/osmocom/netif/stream.h +++ b/include/osmocom/netif/stream.h @@ -140,7 +140,7 @@ void osmo_stream_srv_set_flush_and_destroy(struct osmo_stream_srv *conn); void osmo_stream_srv_set_data(struct osmo_stream_srv *conn, void *data); -void osmo_stream_srv_set_segmentation_cb(struct osmo_stream_srv *conn, osmo_stream_srv_segmentation_cb_t segmentation_cb) OSMO_DEPRECATED("Use osmo_stream_srv_set_segmentation_cb2() instead"); +void osmo_stream_srv_set_segmentation_cb(struct osmo_stream_srv *conn, osmo_stream_srv_segmentation_cb_t segmentation_cb); void osmo_stream_srv_set_segmentation_cb2(struct osmo_stream_srv *conn, osmo_stream_srv_segmentation_cb2_t segmentation_cb2); void osmo_stream_srv_send(struct osmo_stream_srv *conn, struct msgb *msg); @@ -228,7 +228,7 @@ void osmo_stream_cli_set_disconnect_cb(struct osmo_stream_cli *cli, osmo_stream_cli_disconnect_cb_t disconnect_cb); void osmo_stream_cli_set_read_cb(struct osmo_stream_cli *cli, osmo_stream_cli_read_cb_t read_cb); void osmo_stream_cli_set_read_cb2(struct osmo_stream_cli *cli, osmo_stream_cli_read_cb2_t read_cb); -void osmo_stream_cli_set_segmentation_cb(struct osmo_stream_cli *cli, osmo_stream_cli_segmentation_cb_t segmentation_cb) OSMO_DEPRECATED("Use osmo_stream_cli_set_segmentation_cb2() instead"); +void osmo_stream_cli_set_segmentation_cb(struct osmo_stream_cli *cli, osmo_stream_cli_segmentation_cb_t segmentation_cb); void osmo_stream_cli_set_segmentation_cb2(struct osmo_stream_cli *cli, osmo_stream_cli_segmentation_cb2_t segmentation_cb2); void osmo_stream_cli_reconnect(struct osmo_stream_cli *cli); bool osmo_stream_cli_is_connected(struct osmo_stream_cli *cli); diff --git a/src/stream_cli.c b/src/stream_cli.c index 586b1b0..6628ad7 100644 --- a/src/stream_cli.c +++ b/src/stream_cli.c @@ -821,7 +821,6 @@ * \param[in,out] cli Stream Client to modify * \param[in] segmentation_cb Target segmentation callback * - * DEPRECATED: Use osmo_cli_set_segmentation_cb2() instead. */ void osmo_stream_cli_set_segmentation_cb(struct osmo_stream_cli *cli, osmo_stream_cli_segmentation_cb_t segmentation_cb) diff --git a/src/stream_srv.c b/src/stream_srv.c index 261539b..05f780c 100644 --- a/src/stream_srv.c +++ b/src/stream_srv.c @@ -1104,8 +1104,6 @@ * \param[in,out] conn Target Stream Server to modify * \param[in] segmentation_cb Segmentation callback to be set * - * DEPRECATED: Use osmo_stream_srv_set_segmentation_cb2() instead. - * * A segmentation call-back can optionally be used when a packet based protocol (like TCP) is used within a * STREAM style socket that does not preserve message boundaries within the stream. If a segmentation * call-back is given, the osmo_stream_srv library code will makes sure that the read_cb called only for -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/39412?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Icec7ed9e16eb92a2384c16ff5b3e7011205e767c Gerrit-Change-Number: 39412 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmo-netif[master]: stream: osmo_stream_{cli,srv}_set_segmentation_cb(2): documentation i...
by pespin 27 Jan '25

27 Jan '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/39413?usp=email ) Change subject: stream: osmo_stream_{cli,srv}_set_segmentation_cb(2): documentation improvements ...................................................................... stream: osmo_stream_{cli,srv}_set_segmentation_cb(2): documentation improvements * Wrap lines to a shorter width * Improve osmo_stream_cli_set_segmentation_cb() adding text available in osmo_stream_srv_set_segmentation_cb() * Refer to segmentation_cb in segmentation_cb2 documentation and only outline the differences. Change-Id: I55eb9a7781c22db68446265d2a174ae4f5e9f6ef --- M src/stream_cli.c M src/stream_srv.c 2 files changed, 21 insertions(+), 14 deletions(-) Approvals: osmith: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/stream_cli.c b/src/stream_cli.c index 6628ad7..fa3ac76 100644 --- a/src/stream_cli.c +++ b/src/stream_cli.c @@ -821,6 +821,11 @@ * \param[in,out] cli Stream Client to modify * \param[in] segmentation_cb Target segmentation callback * + * A segmentation call-back can optionally be used when a packet based protocol + * (like TCP) is used within a STREAM style socket that does not preserve + * message boundaries within the stream. If a segmentation call-back is given, + * the osmo_stream_srv library code will makes sure that the read_cb called + * only for complete single messages, and not arbitrary segments of the stream. */ void osmo_stream_cli_set_segmentation_cb(struct osmo_stream_cli *cli, osmo_stream_cli_segmentation_cb_t segmentation_cb) @@ -834,6 +839,10 @@ /*! Set the segmentation callback for the client. * \param[in,out] cli Stream Client to modify * \param[in] segmentation_cb2 Target segmentation callback + * + * Same as osmo_stream_cli_set_segmentation_cb(), but a + * osmo_stream_cli_segmentation_cb2_t is called instead which allows access to + * the related cli object. */ void osmo_stream_cli_set_segmentation_cb2(struct osmo_stream_cli *cli, osmo_stream_cli_segmentation_cb2_t segmentation_cb2) diff --git a/src/stream_srv.c b/src/stream_srv.c index 05f780c..366fe64 100644 --- a/src/stream_srv.c +++ b/src/stream_srv.c @@ -1104,13 +1104,15 @@ * \param[in,out] conn Target Stream Server to modify * \param[in] segmentation_cb Segmentation callback to be set * - * A segmentation call-back can optionally be used when a packet based protocol (like TCP) is used within a - * STREAM style socket that does not preserve message boundaries within the stream. If a segmentation - * call-back is given, the osmo_stream_srv library code will makes sure that the read_cb called only for - * complete single messages, and not arbitrary segments of the stream. + * A segmentation call-back can optionally be used when a packet based protocol + * (like TCP) is used within a STREAM style socket that does not preserve + * message boundaries within the stream. If a segmentation call-back is given, + * the osmo_stream_srv library code will makes sure that the read_cb called + * only for complete single messages, and not arbitrary segments of the stream. * - * This function only works with osmo_stream_srv in osmo_io mode, created by osmo_stream_srv_create2()! - * The connection has to have been established prior to calling this function. + * This function only works with osmo_stream_srv in osmo_io mode, created by + * osmo_stream_srv_create2()! The connection has to have been established prior + * to calling this function. * */ void osmo_stream_srv_set_segmentation_cb(struct osmo_stream_srv *conn, @@ -1128,16 +1130,12 @@ * \param[in,out] conn Target Stream Server to modify * \param[in] segmentation_cb2 Segmentation callback to be set * - * A segmentation call-back can optionally be used when a packet based protocol (like TCP) is used within a - * STREAM style socket that does not preserve message boundaries within the stream. If a segmentation - * call-back is given, the osmo_stream_srv library code will makes sure that the read_cb called only for - * complete single messages, and not arbitrary segments of the stream. - * - * This function only works with osmo_stream_srv in osmo_io mode, created by osmo_stream_srv_create2()! - * The connection has to have been established prior to calling this function. + * Same as osmo_stream_srv_set_segmentation_cb(), but a + * osmo_stream_srv_segmentation_cb2_t is called instead which allows access to + * the related conn object. */ void osmo_stream_srv_set_segmentation_cb2(struct osmo_stream_srv *conn, - osmo_stream_srv_segmentation_cb2_t segmentation_cb2) + osmo_stream_srv_segmentation_cb2_t segmentation_cb2) { /* Note that the following implies that iofd != NULL, since * osmo_stream_srv_create2() creates the iofd member, too */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/39413?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I55eb9a7781c22db68446265d2a174ae4f5e9f6ef Gerrit-Change-Number: 39413 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: testenv: run: add --autoreconf-in-src-copy arg
by osmith 27 Jan '25

27 Jan '25
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39405?usp=email ) Change subject: testenv: run: add --autoreconf-in-src-copy arg ...................................................................... testenv: run: add --autoreconf-in-src-copy arg Add a new argument that avoids the problem that ./configure refuses to run if it has already been executed in the source dir. (It aborts and asks the user to run "make distclean" first, which is especially annoying if it has to be done in multiple source dirs before being able to build successfully.) Put the new logic behind an "experimental argument" for now. I think it improves usability greatly and plan to make it the default later when it has been well tested. I have also considered making the source dir read-only when mounted into podman and this argument is set. This was the original goal of Lynxis' related patch, on which idea this one is based. But osmo-dev still needs to write into the source dir in case it clones a new repository, so making the sources dir read-only with this trade-off should be a separate flag and could be added in another patch later. Related: osmo-ttcn3-hacks I0f1ac8852218f158ece14c176f05574f60d9d1f7 Depends: osmo-dev I18ac50e3441df81e1fe7d8d5321df7e80ab9c650 Change-Id: I5c38ce69dc39823d12be574c74a654d2fa6ed8fb --- M _testenv/testenv/__init__.py M _testenv/testenv/osmo_dev.py 2 files changed, 17 insertions(+), 0 deletions(-) Approvals: fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/_testenv/testenv/__init__.py b/_testenv/testenv/__init__.py index c1991ca..4a925bb 100644 --- a/_testenv/testenv/__init__.py +++ b/_testenv/testenv/__init__.py @@ -170,6 +170,14 @@ default=ccache_dir_default, ) + group = sub_run.add_argument_group("experimental options") + group.add_argument( + "-A", + "--autoreconf-in-src-copy", + action="store_true", + help="run autoreconf in a copy of the source dir, avoids 'run make distclean' errors", + ) + sub.add_parser("clean", help="clean previous build artifacts") args = parser.parse_args() diff --git a/_testenv/testenv/osmo_dev.py b/_testenv/testenv/osmo_dev.py index 51d07a7..8748b93 100644 --- a/_testenv/testenv/osmo_dev.py +++ b/_testenv/testenv/osmo_dev.py @@ -73,6 +73,15 @@ os.path.join(testenv.args.cache, "host/usr"), ] + if testenv.args.autoreconf_in_src_copy: + # Use a different make dir, so we don't have unexpected behavior when + # the user already ran autoreconf or ./configure through osmo-dev with + # the previous make dir, without --autoreconf-in-src-copy. + make_dir += "2" + extra_opts += [ + "--autoreconf-in-src-copy", + ] + cmd = [ "./gen_makefile.py", "--build-debug", -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39405?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I5c38ce69dc39823d12be574c74a654d2fa6ed8fb Gerrit-Change-Number: 39405 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-dev[master]: gen_makefile: add --autoreconf-in-src-copy arg
by osmith 27 Jan '25

27 Jan '25
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-dev/+/39404?usp=email ) Change subject: gen_makefile: add --autoreconf-in-src-copy arg ...................................................................... gen_makefile: add --autoreconf-in-src-copy arg When this new argument is set, do not run "autoreconf -fi" directly in the source directory. Instead, make a copy of all relevant sources in the git repository (everything except .git and files that are matched by gitignore) right before working with the source dir. Then use that copy instead. This avoids the problem that ./configure refuses to run if it has already been executed in the source dir. (It aborts and asks the user to run "make distclean" first, which is especially annoying if it has to be done in multiple source dirs before being able to build successfully.) Copying the sources is very fast due to generating a list of files that need to be copied first, and due to using rsync which skips the copy if the file size and timestamp already match. On my machine the copying is not noticable except for the additional prints: updating src_copy: /home/user/.cache/osmo-ttcn3-testenv/host/make2/src_copy/osmo-mgw/ updating version: 1.13.1.38-78ee9 Change-Id: I18ac50e3441df81e1fe7d8d5321df7e80ab9c650 --- M .gitignore M gen_makefile.py A src/_update_src_copy.sh 3 files changed, 164 insertions(+), 14 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve osmith: Verified neels: Looks good to me, approved diff --git a/.gitignore b/.gitignore index 770ca29..0241046 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ !src/gits !src/grd !src/osmo-add-gerrit-hooks.sh +!src/_update_src_copy.sh !src/README net/* !net/templates* diff --git a/gen_makefile.py b/gen_makefile.py index e1baa5b..3130940 100755 --- a/gen_makefile.py +++ b/gen_makefile.py @@ -122,6 +122,9 @@ parser.add_argument('-i', '--install-prefix', default='/usr/local', help='''install there instead of /usr/local''') +parser.add_argument('-A', '--autoreconf-in-src-copy', action='store_true', + help="run autoreconf in a copy of the source dir, avoids 'run make distclean' errors") + args = parser.parse_args() class listdict(dict): @@ -175,12 +178,13 @@ return {} return dict(read_projects_deps(path)) -def gen_makefile_clone(proj, src, src_proj, url, push_url): +def gen_makefile_clone(proj, src, src_proj, url, push_url, update_src_copy_cmd): if proj == "osmocom-bb_layer23": return f''' .make.{proj}.clone: .make.osmocom-bb.clone @echo "\\n\\n\\n===== $@\\n" test -L {src_proj} || ln -s osmocom-bb/src/host/layer23 {src_proj} + {update_src_copy_cmd} touch $@ ''' @@ -189,6 +193,7 @@ .make.{proj}.clone: .make.osmocom-bb.clone @echo "\\n\\n\\n===== $@\\n" test -L {src_proj} || ln -s osmocom-bb/src/host/virt_phy {src_proj} + {update_src_copy_cmd} touch $@ ''' @@ -197,6 +202,7 @@ .make.{proj}.clone: .make.osmocom-bb.clone @echo "\\n\\n\\n===== $@\\n" test -L {src_proj} || ln -s osmocom-bb/src/host/trxcon {src_proj} + {update_src_copy_cmd} touch $@ ''' @@ -205,6 +211,7 @@ .make.{proj}.clone: .make.simtrace2.clone @echo "\\n\\n\\n===== $@\\n" test -L {src_proj} || ln -s simtrace2/host {src_proj} + {update_src_copy_cmd} touch $@ ''' @@ -240,19 +247,22 @@ ( {cmd_clone} && {cmd_set_push_url} ); \\ fi + {update_src_copy_cmd} sync touch $@ ''' -def gen_makefile_autoconf(proj, src_proj, distclean_cond): +def gen_makefile_autoconf(proj, src_proj, src_proj_copy, distclean_cond, update_src_copy_cmd): buildsystem = projects_buildsystems.get(proj, "autotools") + if buildsystem == "autotools": return f''' .make.{proj}.autoconf: .make.{proj}.clone {src_proj}/configure.ac if {distclean_cond}; then $(MAKE) {proj}-distclean; fi @echo "\\n\\n\\n===== $@\\n" - -rm -f {src_proj}/.version - cd {src_proj}; autoreconf -fi + {update_src_copy_cmd} + -rm -f {src_proj_copy}/.version + cd {src_proj_copy}; autoreconf -fi sync touch $@ ''' @@ -263,13 +273,15 @@ def gen_makefile_configure(proj, deps_installed, distclean_cond, build_proj, - cflags, docker_cmd, build_to_src, configure_opts): + cflags, docker_cmd, build_to_src, configure_opts, + update_src_copy_cmd): buildsystem = projects_buildsystems.get(proj, "autotools") 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 "\\n\\n\\n===== $@\\n" + {update_src_copy_cmd} -chmod -R ug+w {build_proj} -rm -rf {build_proj} mkdir -p {build_proj} @@ -297,7 +309,7 @@ assert False, f"unknown buildsystem: {buildsystem}" def gen_makefile_build(proj, distclean_cond, build_proj, docker_cmd, jobs, - check, src_proj): + check, src_proj, update_src_copy_cmd): buildsystem = projects_buildsystems.get(proj, "autotools") if buildsystem == "autotools": @@ -305,6 +317,7 @@ .make.{proj}.build: .make.{proj}.configure $({proj}_files) if {distclean_cond}; then $(MAKE) {proj}-distclean .make.{proj}.configure; fi @echo "\\n\\n\\n===== $@\\n" + {update_src_copy_cmd} {docker_cmd}$(MAKE) -C {build_proj} -j {jobs} {check} sync touch $@ @@ -396,17 +409,46 @@ $(MAKE) -C {src_proj} distclean ''' +def is_src_copy_needed(proj): + if not args.autoreconf_in_src_copy: + return False + + # The rsync workaround to not write to the source dir during "autoreconf -fi" + # is only needed for autotools based projects + buildsystem = projects_buildsystems.get(proj, "autotools") + if buildsystem != "autotools": + return False + + return True + +def gen_update_src_copy_cmd(proj, src_dir, make_dir): + if not is_src_copy_needed(proj): + return "" + ret = "@sh -e " + ret += os.path.join(os.path.relpath(args.src_dir, make_dir), "_update_src_copy.sh") + ret += f" {shlex.quote(src_dir)}" + ret += f" {shlex.quote(proj)}" + ret += " $(TIME_START)" + return ret + +def gen_src_proj_copy(src_proj, make_dir, proj): + if not is_src_copy_needed(proj): + return src_proj + return os.path.join(make_dir, "src_copy", proj) + 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): src_proj = os.path.join(src_dir, proj) if proj == 'openbsc': src_proj = os.path.join(src_proj, 'openbsc') - build_proj = os.path.join(build_dir, proj) - build_to_src = os.path.relpath(src_proj, build_proj) - build_proj = os.path.relpath(build_proj, make_dir) - src = os.path.relpath(src_dir, make_dir) src_proj = os.path.relpath(src_proj, make_dir) + src_proj_copy = gen_src_proj_copy(src_proj, make_dir, proj) + + build_proj = os.path.join(build_dir, proj) + build_to_src = os.path.relpath(src_proj_copy, build_proj) + build_proj = os.path.relpath(build_proj, make_dir) + push_url = push_url or url if configure_opts: @@ -423,6 +465,7 @@ no_ldconfig = '#' if no_ldconfig else '' sudo_ldconfig = '' if ldconfig_without_sudo else 'sudo ' sudo_make_install = 'sudo ' if sudo_make_install else '' + update_src_copy_cmd = gen_update_src_copy_cmd(proj, src_dir, make_dir) return f''' ### {proj} ### @@ -443,9 +486,18 @@ \\) \\ -and -not -name "config.h" 2>/dev/null) -{gen_makefile_clone(proj, src, src_proj, url, push_url)} +{gen_makefile_clone(proj, + src, + src_proj, + url, + push_url, + update_src_copy_cmd)} -{gen_makefile_autoconf(proj, src_proj, distclean_cond)} +{gen_makefile_autoconf(proj, + src_proj, + src_proj_copy, + distclean_cond, + update_src_copy_cmd)} {gen_makefile_configure(proj, deps_installed, @@ -454,7 +506,8 @@ cflags, docker_cmd, build_to_src, - configure_opts_str)} + configure_opts_str, + update_src_copy_cmd)} {gen_makefile_build(proj, distclean_cond, @@ -462,7 +515,8 @@ docker_cmd, jobs, check, - src_proj)} + src_proj_copy, + update_src_copy_cmd)} {gen_makefile_install(proj, docker_cmd, @@ -606,8 +660,19 @@ content += " --build-debug \\\n" if args.auto_distclean: content += " --auto-distclean \\\n" +if args.autoreconf_in_src_copy: + content += " --autoreconf-in-src-copy \\\n" content += " $(NULL)\n" +if args.autoreconf_in_src_copy: + content += """ + +# --autoreconf-in-src-copy: get current time to avoid running rsync more than +# once within this Makefile per project +TIME_START := $(shell date +%s%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' diff --git a/src/_update_src_copy.sh b/src/_update_src_copy.sh new file mode 100644 index 0000000..d80b5fa --- /dev/null +++ b/src/_update_src_copy.sh @@ -0,0 +1,84 @@ +#!/bin/sh -e +# Update the src_copy dir with all relevant files from the original git +# repository (+ submodules). Used by gen_makefile.py --autoreconf-in-src-copy. + +MAKE_DIR="$PWD" +SRC_DIR="$1" +PROJ="$2" +TIME_START="$3" +MARKER="$MAKE_DIR/.make.$PROJ.src_copy" + +# Don't run more than once per "make" call +if [ "$(cat "$MARKER" 2>/dev/null)" = "$TIME_START" ]; then + exit 0 +fi + +DEST_DIR_PROJ="$MAKE_DIR/src_copy/$PROJ" +COPY_LIST="$(mktemp --suffix=-osmo-dev-rsync-copylist)" + +update_git_dir() { + local src="$1" + local dest="$DEST_DIR_PROJ/$(echo "$src" | cut -c 3-)" # cut: remove './' + + echo "updating src_copy: $dest" + + # Get list of files (everything that is not in gitignore) + git \ + -C "$src" \ + ls-files \ + --others \ + --cached \ + --exclude-standard \ + > "$COPY_LIST" + + mkdir -p "$dest" + + # Copy files that changed + rsync \ + --archive \ + --files-from="$COPY_LIST" \ + "$src" \ + "$dest" +} + +# The "git-version-gen" script only works correctly when running inside a git +# repository. Run it in the original git repo and copy its output to +# ".tarball-version", so when configure.ac runs it again the version gets read +# from there. +run_git_version_gen() { + if ! [ -e "$src/git-version-gen" ]; then + return + fi + + local version_file="$DEST_DIR_PROJ/$src/.tarball-version" + rm -f "$version_file" + + # git-version-gen does not run without the tarball-version argument + version_new="$(cd "$src" && ./git-version-gen "$version_file")" + + echo "updating version: $version_new" + echo "$version_new" >"$version_file" +} + +update_git_dirs_all() { + local git_dirs="$(find . -name '.git')" + + if [ -z "$git_dirs" ]; then + echo "_update_read_only_src_copy: find failed" + exit 1 + fi + + for git_dir in $git_dirs; do + local src="$(dirname "$git_dir")" + update_git_dir "$src" + run_git_version_gen "$src" + done +} + +cd "$SRC_DIR/$PROJ" +update_git_dirs_all +rm "$COPY_LIST" +echo "$TIME_START" >"$MARKER" + +# Output an empty line when done to make the Makefile output more readable +echo -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/39404?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: I18ac50e3441df81e1fe7d8d5321df7e80ab9c650 Gerrit-Change-Number: 39404 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-dev[master]: gen_makefile: add --autoreconf-in-src-copy arg
by osmith 27 Jan '25

27 Jan '25
Attention is currently required from: fixeria, lynxis lazus. osmith has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-dev/+/39404?usp=email ) Change subject: gen_makefile: add --autoreconf-in-src-copy arg ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/39404?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: I18ac50e3441df81e1fe7d8d5321df7e80ab9c650 Gerrit-Change-Number: 39404 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Mon, 27 Jan 2025 10:56:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-dev[master]: gen_makefile: add --autoreconf-in-src-copy arg
by neels 27 Jan '25

27 Jan '25
Attention is currently required from: fixeria, lynxis lazus, osmith. neels has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-dev/+/39404?usp=email ) Change subject: gen_makefile: add --autoreconf-in-src-copy arg ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/39404?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: I18ac50e3441df81e1fe7d8d5321df7e80ab9c650 Gerrit-Change-Number: 39404 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Mon, 27 Jan 2025 10:54:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmo-netif[master]: stream: osmo_stream_{cli,srv}_set_segmentation_cb(2): documentation i...
by osmith 27 Jan '25

27 Jan '25
Attention is currently required from: pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-netif/+/39413?usp=email ) Change subject: stream: osmo_stream_{cli,srv}_set_segmentation_cb(2): documentation improvements ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/39413?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I55eb9a7781c22db68446265d2a174ae4f5e9f6ef Gerrit-Change-Number: 39413 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 27 Jan 2025 10:32:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmo-netif[master]: stream: Undeprecate osmo_stream_srv_set_segmentation_cb()
by osmith 27 Jan '25

27 Jan '25
Attention is currently required from: laforge, pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-netif/+/39412?usp=email ) Change subject: stream: Undeprecate osmo_stream_srv_set_segmentation_cb() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/39412?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Icec7ed9e16eb92a2384c16ff5b3e7011205e767c Gerrit-Change-Number: 39412 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 27 Jan 2025 10:31:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmo-netif[master]: stream: osmo_stream_{cli,srv}_set_segmentation_cb(2): documentation i...
by fixeria 27 Jan '25

27 Jan '25
Attention is currently required from: pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-netif/+/39413?usp=email ) Change subject: stream: osmo_stream_{cli,srv}_set_segmentation_cb(2): documentation improvements ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/39413?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I55eb9a7781c22db68446265d2a174ae4f5e9f6ef Gerrit-Change-Number: 39413 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 27 Jan 2025 10:20:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • ...
  • 150
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.