Attention is currently required from: lynxis lazus.
osmith has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39234?usp=email )
Change subject: RFC: add support to create a shallow copy ......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS1: Thanks for making this!
As I understand, the purpose is avoiding configure's error that one must run `make distclean` before being able to do an out-of-tree build with osmo-dev/testenv, if one ran `autoreconf -fi && ./configure` inside the source tree before (prepared an in-tree build)?
If that is the case, then this is something I'd like to avoid as well and it seems in any case that patch would allow this. If not, then please explain what your motivation for this is :)
I think ttcn-hacks are still required to mount writeable, but we could also use such shallow copy for it as well.
The source files from osmo-ttcn3-hacks [get copied to a cache directory with rsync](https://gitea.osmocom.org/ttcn3/osmo-ttcn3-hacks/src/commit/d05a3a0eab9cb7c8...) (without deleting existing target files, so it keeps already built binary objects, and with excluding the .git dir). This happens outside of podman, and then only the cache directory gets mounted when running podman. This is mostly a workaround because we can't do an out-of-tree build with the current osmo-ttcn3-hacks buildsystem (and if we did another in-tree build then we would have potentially incompatible binary objects from compiling in podman vs. outside of podman). But this also has the effect that the source directory is not touched at all, like a read-only option.
Should I follow and add an argument for the main program? It would be also possible to use this without podman, however i'm using it with podman.
I would prefer if we make this the default instead of opt-in (to avoid the "make distclean" error by default). But this also requires that it doesn't behave unexpected for users in other ways, some problems I currently see:
* This does not handle dirty trees (modified/added/removed files that are not committed). Maybe it would make sense to add similar rsync logic instead, so this is handled as well? * I suggest we make it so that it runs on only exactly on the repositories we currently need for a build instead of all repositories. Also it shouldn't break when osmo-dev has just cloned a new repository because the user is building a project for which the git repos were not cloned yet. Therefore I think this logic needs to be moved to osmo-dev, as optional extra step before running `autoreconf -fi` / `configure` / compiling sources for each repository. testenv would then call osmo-dev with an argument to enable this feature. * (I found the term shallow copy for this a bit confusing, as I understand it usually means using [git clone --depth=](https://git-scm.com/docs/git-clone#Documentation/git-clone.txt-code--depthlt...))
@lynxis@fe80.eu: so did I understand the motivation for this patch right and do you agree with my suggestion for moving this to osmo-dev etc.? If you prefer, I could also take this over.