Skip to content
Permalink
Browse files

initial Debian packaging, rpm fixes

This adds initial Debian packaging and adds the usual make targets to
generate releases.

This fixes some minor issues with rpm packaging as well. As it was, it
was not possible to generate a release from a release tarball.
  • Loading branch information...
rck committed Oct 2, 2018
1 parent 651706e commit d118b062767604a912227417d718e5656d867f08
Showing with 111 additions and 1 deletion.
  1. +2 −0 MANIFEST.in
  2. +18 −0 Makefile
  3. +5 −0 debian/changelog
  4. +1 −0 debian/compat
  5. +23 −0 debian/control
  6. +52 −0 debian/copyright
  7. +4 −0 debian/rules
  8. +1 −0 debian/source/format
  9. +5 −1 setup.py
@@ -1,5 +1,7 @@
include .version
include tm/*
include datastore/*
include MANIFEST.in
include README.md
include LICENSE
include Makefile
@@ -0,0 +1,18 @@
PYTHON = python2

release:
$(PYTHON) setup.py sdist
@echo && echo "Did you run distclean?"

debrelease:
echo 'recursive-include debian *' >> MANIFEST.in
dh_clean
make release
git checkout MANIFEST.in

deb:
[ -d ./debian ] || (echo "Your checkout/tarball does not contain a debian directory" && false)
debuild -i -us -uc -b

rpm:
$(PYTHON) setup.py bdist_rpm
@@ -0,0 +1,5 @@
addon-linstor (0.2.0-1) experimental; urgency=medium

* New upstream release

-- Roland Kammerer <roland.kammerer@linbit.com> Tue, 02 Oct 2018 15:13:48 +0200
@@ -0,0 +1 @@
9
@@ -0,0 +1,23 @@
Source: addon-linstor
Maintainer: LINBIT HA Solutions GmbH <drbd-dev@lists.linbit.com>
Uploaders: Roland Kammerer <roland.kammerer@linbit.com>
Section: python
Priority: optional
# Currently, we do not include dh-python (as suggested by jessie),
# because it is not available on unbuntu 12.04
# Build-Depends: python-all (>= 2.6.6-3), debhelper (>= 9), dh-python, ...
Build-Depends: debhelper (>= 9),
python-all (>= 2.7),
Standards-Version: 3.9.6

Package: addon-linstor
Architecture: all
Depends: drbd-utils,
linstor-client,
${misc:Depends},
${python:Depends}
Description: Linstor addon for OpenNebula
A driver for OpenNebula to consume storage from LINSTOR. It supports
volume creation, deletion, resizing, snapshotting.
Live-migration of VMs using linstor volumes, with ssh system datastore
and shared system datastore.
@@ -0,0 +1,52 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: addon-drbdmanage
Source: https://github.com/LINBIT/addon-linstor

Files: *
Copyright: Copyright (C) 2018, LINBIT HA-Solutions GmbH
License: Apache-2.0

Files: debian/*
Copyright: Copyright (C) 2018, LINBIT HA-Solutions GmbH
License: GPL-2+

License: Apache-2.0
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian systems, the full text of the Apache Software License version 2 can
be found in the file `/usr/share/common-licenses/Apache-2.0'.

License: GPL-2+
This program is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later
version.
.
This program is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more
details.
.
You should have received a copy of the GNU General Public
License along with this package; if not, write to the Free
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Boston, MA 02110-1301 USA
.
On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file
`/usr/share/common-licenses/GPL-2'.
@@ -0,0 +1,4 @@
#!/usr/bin/make -f

%:
dh $@ --with python2 --buildsystem=python_distutils
@@ -0,0 +1 @@
3.0 (quilt)
@@ -36,6 +36,7 @@

def version():
"""Returns project version based on git tags"""
output = None
if os.path.isdir(".git"):
process = subprocess.Popen(
["git", "describe", "--tags"], stdout=subprocess.PIPE
@@ -47,9 +48,12 @@ def version():
elif os.path.isfile(VERSION_FILE):
with open(VERSION_FILE) as f:
output = f.readlines()[0]

if not output:
return "v0.0.0"
output = "v0.0.0"
output = output.strip()
if output.startswith('v'):
output = output[1:]
return output


0 comments on commit d118b06

Please sign in to comment.
You can’t perform that action at this time.