[Deepsea-users] DeepSea version number management and packaging

Ricardo Dias rdias at suse.com
Mon Nov 27 02:39:02 MST 2017


Hi list,

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.

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.

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.


Thoughts from anyone?

Thanks,
-- 
Ricardo Dias
Senior Software Engineer - Storage Team
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton,
HRB 21284
(AG Nürnberg)


More information about the Deepsea-users mailing list