[Deepsea-users] DeepSea version number management and packaging

Lenz Grimmer lgrimmer at suse.com
Mon Nov 27 06:43:40 MST 2017

Hi Ricardo,

thanks for pursuing this.

On 11/27/2017 10:39 AM, Ricardo Dias wrote:

> I opened a PR (https://github.com/SUSE/DeepSea/pull/817) with a new
> proposal for managing the version number in deepsea.
> The reasons behind this proposal are:
>  - the support for retrieving the deepsea version number through salt,
> or the deepsea-cli, independently of the installation method
>  - the support for different distros (non-rpm based for instance)
> With the above PR the version number is moved from the "deepsea.spec"
> file to it's own file called "version.txt". This "version.txt" is the
> only location where the version is stored inside the git repo.
> The "deepsea.spec" file was renamed to "deepsea.spec.in" and works like
> a template for the generation of the concrete "deepsea.spec" file.
> The generation of the concrete "deepsea.spec" file is done along with
> the tarball generation implemented as a Makefile target.

Glad you adopted my approach here :)

> The tarball generation in the Makefile computes the final version
> number as the composition of:
>  - the string inside version.txt
>  - the OFFSET that corresponds to the number of commits since the last
>    commit that changed the "version.txt" file
>  - the HEAD commit hash
> The final version number takes the form: VERSION+git.OFFSET.HASH
> The final tarball includes the final version number in the version.txt
> and the concrete "deepsea.spec" file with the final version number as
> well.

I'm still not convinced that adding git hashes to the actual version
number is a good idea, but that's likely a bikeshed painting discussion :)

> The result tarball can be used to package deepsea in different linux
> distributions.
> To help in the packaging of DeepSea in OBS, I also changed the _service
> based process in favor of a bash script called "checkin.sh" that knows
> how to clone the DeepSea git repo, generate the tarball using "make
> tarball", and extract the "deepsea.spec" from the tarball.
> I branched the deepsea package in OBS where I made the above changes.
> The package URL is: 
> https://build.opensuse.org/package/show/home:rjdias:branches:filesystem
> s:ceph/deepsea
> There is a file README.txt with the instructions on how to use
> "checkin.sh".
> In summary with all of what was described above the procedure to
> release a new DeepSea version and package will be:
> 1) commit to git a change to the version number in version.txt (version
> bump)
> 2) checkout the OBS package "osc co project_name deepsea"
> 3) run "checkin.sh", you can pass optional argument to checkin the
> code from a different repo or branch
> 4) run "osc vc" to update the "deepsea.changes"
> 5) run "osc ci --noservice" to commit the OBS package files into OBS
> The important takeaway is that the tarball generation and version
> management is independent of the linux distro, and therefore will not
> limit our work when supporting a new distro in the future.

I like the approach of having one "pristine source archive" that is
built as part of the release process which then is used as the basis for
all other release package builds.

In the end, this is more about process than implementation, e.g. when to
bump up the version number or how it should be formatted. As long as
it's repeatable and there is a direct correlation between the tarball
release and the corresponding git revision that was used for the build,
I'm fine.


SUSE Linux GmbH - Maxfeldstr. 5 - 90409 Nuernberg (Germany)
GF:Felix Imendörffer,Jane Smithard,Graham Norton,HRB 21284 (AG Nürnberg)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.suse.com/pipermail/deepsea-users/attachments/20171127/3ea2c290/attachment.sig>

More information about the Deepsea-users mailing list