Hi.
The OsmoBTS build depends (unfortunately) on OpenBSC because it uses gsm_data_shared.h header. ATM this file is available in osmo-bsc and osmo-msc (maybe other split repos as well). Which is the "canonical" one from OsmoBTS point of view?
Also, when would be the right time to move OsmoBTS' jenkins job to use one of the split repos instead of old OpenBSC?
On Thu, Sep 07, 2017 at 07:02:21PM +0200, Max wrote:
Hi.
The OsmoBTS build depends (unfortunately) on OpenBSC because it uses gsm_data_shared.h header.
I think we should give up on the shared header and just have two copies, each with what's needed on either side. It looked like a good idea at the time when we started out creating OsmoBTS under a lot of time pressure after writing OpenBSC/OsmoNITB.
I think we should clean it up as follows: * generic definitionns about coding schemes, value_strings for pchan_types etc can go straight into libosmogsm * the core data model (struct gsm_{bts,trx,ts}, gsm_lchan, ...) should go into a new libosmo-bss which is part of libosmocore.git * those data structures in libosmo-bss are reduced to only contain the common parts that are not bts/bsc specific, and a *priv or *role, which is then allocated and filled-in with program (bts/bsc) specific data/struct
But then, I guess we have more important work than to refactor something that has worked for more than 5 years :/
btw: I don't think osmo-msc needs to use gsn_data_shared at all, at least conceptually it shouldn't have any need to?
Also, when would be the right time to move OsmoBTS' jenkins job to use one of the split repos instead of old OpenBSC?
I think it could be done at any time, osmo-bsc.git is ready.
Regards, Harald
On 07.09.2017 21:04, Harald Welte wrote:
But then, I guess we have more important work than to refactor something that has worked for more than 5 years :/
Just to make sure we won't forget the details in 5 years I've created https://osmocom.org/issues/2508.
I think it could be done at any time, osmo-bsc.git is ready.
Unfortunately not. The OsmoBSC headers were renamed to ".../bsc/gsm_data_shared.h" while OsmoBTS explicitly requires "openbsc/gsm_data_shared.h". So it's impossible to build OsmoBTS against OsmoBSC ATM.
One option would be to include just "gsm_data_shared.h" (without directories) in OsmoBTS and use "--with-openbsc=" configure option but I have not looked in detail how much breaks in other places it might cause. Simpler option would be to switch to new "bsc/gsm_data_shared.h" but it would make it incompatible with legacy OpenBSC which is still in use in some deployments. We can also add symlink with old name to OsmoBSC as a temporary workaround until the refactoring for #2508 will take place.
I'm somewhat reluctant to just copy "gsm_data_shared.h" to OsmoBTS as it might introduce all sorts of problems when OpenBSC and OsmoBSC diverge but it might be an option too.
What do you think?
On Fri, Sep 08, 2017 at 01:11:18PM +0200, Max wrote:
On 07.09.2017 21:04, Harald Welte wrote:
But then, I guess we have more important work than to refactor something that has worked for more than 5 years :/
Just to make sure we won't forget the details in 5 years I've created https://osmocom.org/issues/2508.
I think it could be done at any time, osmo-bsc.git is ready.
Unfortunately not. The OsmoBSC headers were renamed to ".../bsc/gsm_data_shared.h" while OsmoBTS explicitly requires "openbsc/gsm_data_shared.h". So it's impossible to build OsmoBTS against OsmoBSC ATM.
The idea is to not depend on any header file outside of the osmo-bts.git tree. On my mental todo list: copy gsm_data_shared.* to osmo-bts.git and discard all dep on external .h/.c files. In a second pass take a look at data structures and functions, and drop anything not used by osmo-bts. But would welcome help there indeed.
I'm somewhat reluctant to just copy "gsm_data_shared.h" to OsmoBTS as it might introduce all sorts of problems when OpenBSC and OsmoBSC diverge but it might be an option too.
openbsc.git and osmo-bsc.git by definition will diverge. openbsc.git is becoming legacy as we speak and should not be a reason to hold back anything happening on osmo-bsc.git.
osmo-bts.git and osmo-bsc.git are independent entities that have to comply to Abis to talk to each other. No way really for mere mismatching data structures to cause havoc when the Abis messages are handled properly, is there?
The move plans of gsm_data_shared to libosmocore.git look nice, but I agree to just copy for now.
(The same kind of copy has happened for various bits between osmo-msc and osmo-bsc, and the second pass to drop unnecessary stuff and move dup up the dependency tree is still pending / ongoing.)
Max, do you have time to take on osmo-bts.git and make it independent from openbsc.git and osmo-bsc.git? Let me know, otherwise I have to take this on as well. Thanks!
~N