dynamic version string (generate version by running a command)

Bug #2056490 reported by Richard Hansen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-build-recipe
Incomplete
Undecided
Unassigned

Bug Description

The version number substitution variables are quite limited; it is not possible to automatically derive the version string from the upstream version. This makes it difficult to maintain daily snapshot recipes. I would like to be able to run a command to dynamically compute the version. For example:

    # git-build-recipe format 0.5 deb-version {versioncmd}+git{revtime}.{git-commit}-0
    lp:upstream-example
    merge packaging lp:~username/upstream-example/+git/upstream-example-packaging
    versioncmd ./configure -V | sed -n -e '1s/.* //p'

Revision history for this message
Jürgen Gmach (jugmac00) wrote :

Thanks for your feature request.

The main contributor to this package has moved on from Canonical.

We will certainly continue to maintain this package, but we have very limited capacity.

I have not used this package before, and it seems to lack documentation, so I had a quick look in the source for the mentioned substitution variables, but did not see anything helpful.

Again, I have not used this package before, but it seems like there should be a solution available.

I think the very reason for this package is to be able to test new commits easily.

Richard, maybe you can give me some more background infos. Have you used this package for a long time? Is your requirement new?

I think I could reach out to some colleagues here at Canonical who might be active users of it for some feedback.

Changed in git-build-recipe:
status: New → Incomplete
Revision history for this message
Richard Hansen (rhansen) wrote :

> maybe you can give me some more background infos

I'm currently building some daily snapshots of upstream packages, for example:
https://code.launchpad.net/~rhansen/+recipe/emacs-29-daily
https://code.launchpad.net/~ddclient/+recipe/ddclient-daily

The upstream version can change from day to day without requiring any changes to debian/*, except the version in debian/changelog. Currently I have to manually update debian/changelog whenever upstream releases a new version, or use a bogus version that always compares greater than the current release such as 3.999.0. If this feature request was implemented, I could automatically extract the current upstream version number and manipulate it appropriately to produce a snapshot version number.

> Have you used this package for a long time?

A few years.

> Is your requirement new?

No -- I've always worked around this by either manually editing the version or using a less-informative dummy version number. Both have their downsides, and I'd like to avoid them.

> I think I could reach out to some colleagues here at Canonical who might be active users of it for some feedback.

That would be great. If Launchpad devs are amenable to this feature, I'm willing to implement it and submit a merge request to ~launchpad (I'm familiar with the code and have previously submitted a couple of merge requests for other issues).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.