Actions
Feature #5045
openwrite libversion "major" on build files automatically based on LIBVERSION
Start date:
02/24/2021
Due date:
% Done:
0%
Spec Reference:
Description
As a reminder:
https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
LIBVERSION = current:revision:age
LIBVERSION_MAJOR = current - age
- debian/control
- debian/rules
- contrib/*.spec.in
The idea here would be to generate LIBVERSION_MAJOR automatically as a autconf/automake variable which can be fed into those files automatically, so we don't have to update them every time LIBCERSION_MAJOR changes (and hence potentially avoid breakage during release time).
So, I'd follow these steps for each project:- Normalize the LIBVERSION variable to follow a standardized naming, so that we can track it later better on osmo-release.sh, for instance ${LIBNAME}_LIBVERSION (replacing "-" with "_"). Example: LIBOSMO_NETIF_LIBVERSION. Or even better, LIBVERSION_LIBOSMO_NETIF.
- Have LIBVERSION variable be generated out of 3 new variables (also following normalized name with LIBNAME), example:
LIBVERSION_CURRENT_LIBOSMO_NETIF = 3 LIBVERSION_REVISION_LIBOSMO_NETIF = 2 LIBVERSION_AGE_LIBOSMO_NETIF = 1 LIBVERSION_MAJOR_LIBOSMO_NETIF = LIBVERSION_CURRENT_LIBOSMO_NETIF - LIBVERSION_AGE_LIBOSMO_NETIF
- Use $LIBVERSION_MAJOR_LIBOSMO_NETIF in the files mentioned above
- Update osmo-release.sh to follow new naming
- We may need to move debian/control to debian/control.in so we can template it? That means also configure must be run before generating the package, I guess that's expected?
Updated by osmith about 3 years ago
Note that currently the OBS scripts are using the .spec.in file and replace the version there. From a quick look, it should be possible to use the .spec file generated by ./configure instead (as osmo_obs_add_rpm_spec
gets called after gbp buildpackage
). But I have not tested it.
Actions