debian/ import
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
3be1f04cb6
commit
641af2dd6a
72
Makefile
Normal file
72
Makefile
Normal file
@ -0,0 +1,72 @@
|
||||
include /usr/share/dpkg/architecture.mk
|
||||
include /usr/share/dpkg/pkg-info.mk
|
||||
|
||||
include defines.mk
|
||||
|
||||
GITVERSION:=$(shell git rev-parse HEAD)
|
||||
|
||||
SUBDIRS := etc
|
||||
|
||||
ifeq ($(BUILD_MODE), release)
|
||||
CARGO_BUILD_ARGS += --release
|
||||
COMPILEDIR := target/release
|
||||
else
|
||||
COMPILEDIR := target/debug
|
||||
endif
|
||||
|
||||
SERVICE_BIN := pve-lxc-syscalld
|
||||
|
||||
COMPILED_BINS := \
|
||||
$(addprefix $(COMPILEDIR)/,$(SERVICE_BIN))
|
||||
|
||||
DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_$(DEB_HOST_ARCH).deb
|
||||
DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
|
||||
BUILDSRC := $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
|
||||
|
||||
all: cargo-build $(SUBDIRS)
|
||||
|
||||
.PHONY: $(SUBDIRS)
|
||||
$(SUBDIRS):
|
||||
$(MAKE) -C $@
|
||||
|
||||
.PHONY: cargo-build
|
||||
cargo-build:
|
||||
cargo build $(CARGO_BUILD_ARGS)
|
||||
|
||||
$(COMPILED_BINS): cargo-build
|
||||
|
||||
install: $(COMPILED_BINS)
|
||||
install -dm755 $(DESTDIR)$(LIBEXECDIR)/proxmox-backup
|
||||
$(foreach i,$(SERVICE_BIN), \
|
||||
install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(LIBEXECDIR)/proxmox-backup/ ;)
|
||||
|
||||
# always re-create this dir
|
||||
# but also copy the local target/ dir as a build-cache
|
||||
.PHONY: $(BUILDSRC)
|
||||
$(BUILDSRC):
|
||||
rm -rf $(BUILDSRC)
|
||||
cargo build --release
|
||||
rsync -a debian Makefile defines.mk Cargo.toml Cargo.lock \
|
||||
src $(SUBDIRS) \
|
||||
target \
|
||||
$(BUILDSRC)/
|
||||
$(foreach i,$(SUBDIRS), \
|
||||
$(MAKE) -C $(BUILDSRC)/$(i) clean ;)
|
||||
|
||||
.PHONY: deb
|
||||
deb: $(DEB)
|
||||
$(DEB): $(BUILDSRC)
|
||||
cd $(BUILDSRC); dpkg-buildpackage -b -us -uc --no-pre-clean
|
||||
lintian $(DEB)
|
||||
|
||||
.PHONY: dsc
|
||||
dsc: $(DSC)
|
||||
$(DSC): $(BUILDSRC)
|
||||
cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d -nc
|
||||
lintian $(DSC)
|
||||
|
||||
clean:
|
||||
$(foreach i,$(SUBDIRS), \
|
||||
$(MAKE) -C $(i) clean ;)
|
||||
cargo clean
|
||||
rm -rf *.deb *.dsc *.tar.gz *.buildinfo *.changes $(BUILDSRC)
|
5
debian/changelog
vendored
Normal file
5
debian/changelog
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
pve-lxc-syscalld (0.1-1) pve; urgency=medium
|
||||
|
||||
* initial release
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 10 Jul 2019 14:40:16 +0200
|
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@ -0,0 +1 @@
|
||||
10
|
14
debian/control
vendored
Normal file
14
debian/control
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
Source: pve-lxc-syscalld
|
||||
Section: admin
|
||||
Priority: optional
|
||||
Maintainer: Proxmox Support Team <support@proxmox.com>
|
||||
Build-Depends: debhelper (>= 10),
|
||||
Standards-Version: 3.9.5
|
||||
Homepage: https://www.proxmox.com
|
||||
|
||||
Package: pve-lxc-syscalld
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends},
|
||||
Description: PVE LXC syscall daemon
|
||||
A daemon which handles a selected subset of syscalls for unprivileged
|
||||
containers.
|
16
debian/copyright
vendored
Normal file
16
debian/copyright
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
Copyright (C) 2019 Proxmox Server Solutions GmbH
|
||||
|
||||
This software is written by Proxmox Server Solutions GmbH <support@proxmox.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 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 Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
debian/install
vendored
Normal file
1
debian/install
vendored
Normal file
@ -0,0 +1 @@
|
||||
etc/pve-lxc-syscalld.service /lib/systemd/system/
|
9
debian/rules
vendored
Normal file
9
debian/rules
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/make -f
|
||||
# See debhelper(7) (uncomment to enable)
|
||||
# output every command that modifies files on the build system.
|
||||
#DH_VERBOSE = 1
|
||||
|
||||
export BUILD_MODE=release
|
||||
|
||||
%:
|
||||
dh $@ --with=systemd
|
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
10
defines.mk
Normal file
10
defines.mk
Normal file
@ -0,0 +1,10 @@
|
||||
PACKAGE := pve-lxc-syscalld
|
||||
|
||||
PREFIX := /usr
|
||||
BINDIR := $(PREFIX)/bin
|
||||
SBINDIR := $(PREFIX)/sbin
|
||||
LIBDIR := $(PREFIX)/lib
|
||||
LIBEXECDIR := $(LIBDIR)
|
||||
DATAROOTDIR := $(PREFIX)/share
|
||||
MAN1DIR := $(PREFIX)/share/man/man1
|
||||
SYSCONFDIR := /etc
|
15
etc/Makefile
Normal file
15
etc/Makefile
Normal file
@ -0,0 +1,15 @@
|
||||
include ../defines.mk
|
||||
|
||||
UNITS := pve-lxc-syscalld.service
|
||||
|
||||
all: $(UNITS)
|
||||
|
||||
clean:
|
||||
rm -f $(UNITS)
|
||||
|
||||
.SUFFIXES: .service.in .service
|
||||
.service.in.service:
|
||||
sed \
|
||||
-e 's!%LIBEXECDIR%!$(LIBEXECDIR)!g' \
|
||||
$< >$@.tmp
|
||||
mv $@.tmp $@
|
12
etc/pve-lxc-syscalld.service.in
Normal file
12
etc/pve-lxc-syscalld.service.in
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Proxmox VE LXC Syscall Daemon
|
||||
Before=pve-guests.service
|
||||
|
||||
[Service]
|
||||
#FIXME!!!
|
||||
Type=simple
|
||||
ExecStart=%LIBEXECDIR%/pve/pve-lxc-syscalld
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user