Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
239 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
DEB_NAME = vmango | ||
DEB_VERSION = $(VERSION) | ||
DEB_TOPDIR = /tmp/debian-build-root | ||
DEB_OUTDIR = . | ||
DEB_ARCH = $(shell dpkg --print-architecture) | ||
DEB_RELEASE = $(shell git describe --tags 2>/dev/null | awk -F- '{print $$2"."$$3}') | ||
DEB_DISTRIBUTION = unstable | ||
|
||
ifeq ($(DEB_RELEASE),.) | ||
DEB_RELEASE = 1 | ||
endif | ||
ifeq ($(DEB_RELEASE),) | ||
DEB_RELEASE = 1 | ||
endif | ||
|
||
# Signing: | ||
# gpg --list-keys --keyid-format=short | ||
# debsign -k $ID vmango_$version_source.changes | ||
# | ||
sdeb: $(DEB_OUTDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE)_source.changes $(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE)_source.buildinfo $(DEB_OUTDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE).dsc $(DEB_OUTDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE).debian.tar.xz $(DEB_OUTDIR)/vmango_$(VERSION).orig.tar.gz | ||
$(DEB_OUTDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE)_source.changes $(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE)_source.buildinfo $(DEB_OUTDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE).dsc $(DEB_OUTDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE).debian.tar.xz $(DEB_OUTDIR)/vmango_$(VERSION).orig.tar.gz: vmango-$(VERSION).tar.gz debian/* Makefile.DEB.mk | ||
mk-build-deps -t 'apt-get -y' --remove --install debian/control | ||
mkdir -p $(DEB_TOPDIR) | ||
cp vmango-$(VERSION).tar.gz $(DEB_TOPDIR)/vmango_$(DEB_VERSION).orig.tar.gz | ||
|
||
rm -rf $(DEB_TOPDIR)/vmango-$(VERSION)/ | ||
tar -C $(DEB_TOPDIR)/ -xf $(DEB_TOPDIR)/vmango_$(DEB_VERSION).orig.tar.gz | ||
cp -r debian $(DEB_TOPDIR)/vmango-$(VERSION)/ | ||
|
||
cd $(DEB_TOPDIR)/vmango-$(VERSION)/ \ | ||
&& dch -D '$(DEB_DISTRIBUTION)' -m -v $(DEB_VERSION)-$(DEB_RELEASE) 'Local docker source build' \ | ||
&& debuild -S -sa -us -uc | ||
|
||
mkdir -p $(DEB_OUTDIR) | ||
cp $(DEB_TOPDIR)/$(DEB_NAME)_$(DEB_VERSION).orig.tar.gz $(DEB_OUTDIR)/ | ||
cp $(DEB_TOPDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE)_source.changes $(DEB_OUTDIR)/ | ||
cp $(DEB_TOPDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE)_source.buildinfo $(DEB_OUTDIR)/ | ||
cp $(DEB_TOPDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE).dsc $(DEB_OUTDIR)/ | ||
cp $(DEB_TOPDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE).debian.tar.xz $(DEB_OUTDIR)/ | ||
rm -rf $(DEB_TOPDIR)/vmango-$(VERSION) | ||
|
||
deb: $(DEB_OUTDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE)_$(DEB_ARCH).deb | ||
$(DEB_OUTDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE)_$(DEB_ARCH).deb: $(DEB_OUTDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE)_source.changes $(DEB_OUTDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE).dsc $(DEB_OUTDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE).debian.tar.xz $(DEB_OUTDIR)/vmango_$(VERSION).orig.tar.gz Makefile.DEB.mk | ||
mkdir -p $(DEB_TOPDIR)/ | ||
cp $(DEB_OUTDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE)_source.changes $(DEB_TOPDIR)/ | ||
cp $(DEB_OUTDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE).dsc $(DEB_TOPDIR)/ | ||
cp $(DEB_OUTDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE).debian.tar.xz $(DEB_TOPDIR)/ | ||
cp $(DEB_OUTDIR)/vmango_$(VERSION).orig.tar.gz $(DEB_TOPDIR)/ | ||
|
||
rm -rf $(DEB_TOPDIR)/vmango-$(VERSION) | ||
cd $(DEB_TOPDIR)/ && dpkg-source -x $(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE).dsc | ||
cd $(DEB_TOPDIR)/vmango-$(DEB_VERSION)/ && mk-build-deps -t 'apt-get -y' --remove --install debian/control | ||
cd $(DEB_TOPDIR)/vmango-$(DEB_VERSION)/ && DEB_BUILD_OPTIONS=noddebs debuild -us -uc | ||
|
||
cp $(DEB_TOPDIR)/$(DEB_OUTDIR)/$(DEB_NAME)_$(DEB_VERSION)-$(DEB_RELEASE)_$(DEB_ARCH).deb $(DEB_OUTDIR)/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
vmango (0.9.0-1) unstable; urgency=medium | ||
|
||
* Initial release | ||
|
||
-- Matvey Kruglov <kubuzzzz@gmail.com> Sat, 06 Sep 2019 20:09:31 +0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Source: vmango | ||
Maintainer: Matvey Kruglov <kubuzzzz@gmail.com> | ||
Section: admin | ||
Priority: optional | ||
Build-Depends: libvirt-dev (>=1.2.0), debhelper (>=10), golang, pkg-config | ||
Standards-Version: 4.1.2 | ||
Homepage: https://github.com/subuk/vmango | ||
|
||
Package: vmango | ||
Architecture: any | ||
Depends: genisoimage, ${shlibs:Depends}, ${misc:Depends} | ||
Description: Your own personal IaaS cloud |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | ||
Upstream-Name: vmango | ||
Source: <url://example.com> | ||
|
||
Files: * | ||
Copyright: <years> <put author's name and email here> | ||
<years> <likewise for another author> | ||
License: GPL-3.0+ | ||
|
||
Files: debian/* | ||
Copyright: 2019 unknown <kubuzzzz@gmail.com> | ||
License: GPL-3.0+ | ||
|
||
License: GPL-3.0+ | ||
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 3 of the License, or | ||
(at your option) any later version. | ||
. | ||
This package 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 program. If not, see <https://www.gnu.org/licenses/>. | ||
. | ||
On Debian systems, the complete text of the GNU General | ||
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". | ||
|
||
# Please also look if there are files or directories which have a | ||
# different copyright/license attached and list them here. | ||
# Please avoid picking licenses with terms that are more restrictive than the | ||
# packaged work, as it may make Debian's contributions unacceptable upstream. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# git-build-recipe format 0.4 deb-version {debupstream}-{time}~{git-commit} | ||
lp:~subuk/+git/vmango feature/debian_packaging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/make -f | ||
|
||
# output every command that modifies files on the build system. | ||
export DH_VERBOSE = 1 | ||
|
||
|
||
# see FEATURE AREAS in dpkg-buildflags(1) | ||
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all | ||
|
||
# see ENVIRONMENT in dpkg-buildflags(1) | ||
# package maintainers to append CFLAGS | ||
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic | ||
# package maintainers to append LDFLAGS | ||
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed | ||
|
||
|
||
%: | ||
dh $@ | ||
|
||
# This is example for Cmake (See https://bugs.debian.org/641051 ) | ||
#override_dh_auto_configure: | ||
# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.0 (quilt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
vmango source: source-is-missing static/coreui/js/Chart.min.js | ||
vmango source: source-is-missing static/coreui/js/Chart.min.js | ||
vmango source: source-is-missing static/coreui/js/bootstrap.min.js | ||
vmango source: source-is-missing static/coreui/js/jquery.min.js | ||
vmango source: source-is-missing static/coreui/js/pace.min.js | ||
vmango source: source-is-missing static/coreui/js/tether.min.js | ||
vmango source: source-is-missing static/xterm/xterm.js line length is 865 characters (>512) | ||
vmango source: source-is-missing static/xterm/addons/fit/fit.js line length is 860 characters (>512) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
README | ||
README.Debian | ||
README.source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
case "$1" in | ||
configure) | ||
adduser --system --group --home /var/lib/vmango vmango | ||
;; | ||
esac | ||
|
||
#DEBHELPER# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Unit] | ||
Description=Vmango web service | ||
After=network-online.target | ||
|
||
[Service] | ||
Type=simple | ||
User=vmango | ||
Group=vmango | ||
EnvironmentFile=-/etc/default/vmango | ||
ExecStart=/usr/bin/vmango --config /etc/vmango.conf | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,55 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
USAGE="Usage: $0 [centos-7] <make args...>" | ||
CACHE_DIR=/tmp/rpmbuild-cache | ||
USAGE="Usage: $0 [centos-7|ubuntu-1804] <make args...>" | ||
CACHE_DIR=/tmp/vmango-package-build-cache | ||
mkdir -p $CACHE_DIR | ||
|
||
case "$1" in | ||
"centos-7") | ||
DOCKER_IMAGE=vmango:build_centos7 | ||
YUM_CONFIG=`pwd`/dockerbuild/centos7.yum.conf | ||
if [[ "Y$(docker images -q $DOCKER_IMAGE)" == "Y" ]]; then | ||
if [[ "Y$(docker images -q $DOCKER_IMAGE)" == "Y" || "Y${FORCE_REBUILD}" != "Y" ]]; then | ||
docker build -t $DOCKER_IMAGE -f dockerbuild/centos7.dockerfile . | ||
fi | ||
shift | ||
exec docker run --rm -it \ | ||
-v `pwd`:/source \ | ||
-v $CACHE_DIR:/cache \ | ||
-v $YUM_CONFIG:/etc/yum.conf \ | ||
-w /source \ | ||
$DOCKER_IMAGE $@ | ||
;; | ||
"ubuntu-1804") | ||
DOCKER_IMAGE=vmango:build_ubuntu1804 | ||
YUM_CONFIG=`pwd`/dockerbuild/centos7.yum.conf | ||
if [[ "Y$(docker images -q $DOCKER_IMAGE)" == "Y" || "Y${FORCE_REBUILD}" != "Y" ]]; then | ||
docker build -t $DOCKER_IMAGE -f dockerbuild/ubuntu1804.dockerfile . | ||
fi | ||
mkdir -p $CACHE_DIR/apt | ||
shift | ||
exec docker run --rm -it \ | ||
-v `pwd`:/source \ | ||
-v $HOME/.gnupg/:/root/.gnupg \ | ||
-v $CACHE_DIR/apt_ubuntu1804:/var/cache/apt \ | ||
-w /source \ | ||
$DOCKER_IMAGE $@ | ||
;; | ||
"debian-10") | ||
DOCKER_IMAGE=vmango:build_debian10 | ||
YUM_CONFIG=`pwd`/dockerbuild/centos7.yum.conf | ||
if [[ "Y$(docker images -q $DOCKER_IMAGE)" == "Y" || "Y${FORCE_REBUILD}" != "Y" ]]; then | ||
docker build -t $DOCKER_IMAGE -f dockerbuild/debian10.dockerfile . | ||
fi | ||
mkdir -p $CACHE_DIR/apt | ||
shift | ||
exec docker run --rm -it \ | ||
-v `pwd`:/source \ | ||
-v $CACHE_DIR/apt_debian_10:/var/cache/apt \ | ||
-w /source \ | ||
$DOCKER_IMAGE $@ | ||
;; | ||
*) | ||
echo $USAGE | ||
exit 1 | ||
esac | ||
shift | ||
|
||
mkdir -p $CACHE_DIR | ||
|
||
exec docker run --rm -it \ | ||
-v `pwd`:/source \ | ||
-v $CACHE_DIR:/cache \ | ||
-v $YUM_CONFIG:/etc/yum.conf \ | ||
-w /source \ | ||
$DOCKER_IMAGE $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM debian:10 | ||
ENV TZ=UTC | ||
ENV DEBIAN_FRONTEND noninteractive | ||
RUN rm -f /etc/apt/apt.conf.d/docker-clean | ||
RUN apt-get update && apt-get install -y wget dpkg-dev devscripts equivs fakeroot debhelper software-properties-common vim git-build-recipe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM ubuntu:18.04 | ||
ENV TZ=UTC | ||
ENV DEBIAN_FRONTEND noninteractive | ||
RUN rm -f /etc/apt/apt.conf.d/docker-clean | ||
RUN apt-get update && apt-get install -y wget dpkg-dev devscripts equivs fakeroot debhelper software-properties-common vim git-build-recipe | ||
RUN add-apt-repository ppa:longsleep/golang-backports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# git-build-recipe format 0.4 deb-version {debupstream}-{time}~{git-commit} | ||
lp:~subuk/+git/vmango feature/debian_packaging |