From e31752676862cfaaa0e27a3b9a3d44c59ca39d23 Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Fri, 25 Mar 2022 20:42:42 +1100 Subject: [PATCH] debian packaging --- Makefile | 45 +++++++++++++++++++++++++++++++++++++++ debian/changelog | 5 +++++ debian/control | 19 +++++++++++++++++ debian/overlay-boot.links | 3 +++ debian/rules | 11 ++++++++++ debian/source/format | 1 + 6 files changed, 84 insertions(+) create mode 100644 Makefile create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/overlay-boot.links create mode 100755 debian/rules create mode 100644 debian/source/format diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..87960be --- /dev/null +++ b/Makefile @@ -0,0 +1,45 @@ +SBINDIR = $(DESTDIR)/usr/sbin +ETCDIR = $(DESTDIR)/etc/rrqnet +MAN1DIR = $(DESTDIR)/usr/share/man/man1 +MAN8DIR = $(DESTDIR)/usr/share/man/man8 +VARLIBDIR = $(DESTDIR)/var/lib/overlay-boot + +SBINCFILES = +#SBINFILES = overlay-boot overlay-go overlay-stop +ETCFILES = +MAN1FILES = +MAN8FILES = +HTMLDOC = $(MAN8FILES:%=%.html) +VARLIBFILES = overlay-boot overlay-go overlay-stop functions reaper + +all: reaper/reaper + +reaper/reaper: + $(MAKE) -C reaper + +$(VARLIBDIR)/: + mkdir -p $@ + +$(addprefix $(VARLIBDIR)/,$(VARLIBFILES)): $(VARLIBDIR)/%: % | $(VARLIBDIR)/ + cp -p $< $@ + +#$(SBINDIR)/: +# mkdir -p $@ +# +#$(addprefix $(SBINDIR)/,$(SBINFILES)): $(SBINDIR)/%: $(VARLIBDIR)/% | $(SBINDIR)/ +# ln -sTf $< $@ + +$(VARLIBDIR)/reaper: reaper/reaper + cp $< $@ + +INSTALLTARGETS = $(addprefix $(SBINDIR)/,$(SBINFILES)) +INSTALLTARGETS += $(addprefix $(ETCDIR)/,$(ETCFILES)) +INSTALLTARGETS += $(addprefix $(MAN1DIR)/,$(MAN1FILES)) +INSTALLTARGETS += $(addprefix $(MAN8DIR)/,$(MAN8FILES)) +INSTALLTARGETS += $(addprefix $(VARLIBDIR)/,$(VARLIBFILES)) + +install: $(INSTALLTARGETS) + +BUILDPACKAGE = -us -uc --build=full -Iolle +deb: + PREFIX= INCLUDE_PREFIX=/usr dpkg-buildpackage $(BUILDPACKAGE) diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..473d589 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +overlay-boot (0.1) unstable; urgency=medium + + * inital packaging + + -- Ralph Ronnquist Fri, 25 Mar 2022 18:05:01 +1100 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..312ab3b --- /dev/null +++ b/debian/control @@ -0,0 +1,19 @@ +Source: overlay-boot +Section: misc +Priority: optional +Maintainer: Ralph Ronnquist +Build-Depends: debhelper-compat (= 13), + asciidoc, docbook-xml, libxslt1-dev, xsltproc, docbook-xsl, + fasm +Standards-Version: 4.6.0 +Homepage: https://borta.rrq.id.au/git?p=ralph/overlay-boot.git +Vcs-Git: https://borta.rrq.id.au/git?p=ralph/overlay-boot.git + +Package: overlay-boot +Architecture: any +Depends: coreutils, util-linux, mount, + iproute2, ifupdown, dash +Description: Admin scripts for running overlay subhosts + Overlay subhosting uses unshare and chroot for running services within + independent overlay filesystems, with a common kernel but independent + namespaces. Aka "containerization without the bells and whistles". diff --git a/debian/overlay-boot.links b/debian/overlay-boot.links new file mode 100644 index 0000000..5a179b6 --- /dev/null +++ b/debian/overlay-boot.links @@ -0,0 +1,3 @@ +/var/lib/overlay-boot/overlay-boot /usr/sbin/overlay-boot +/var/lib/overlay-boot/overlay-stop /usr/sbin/overlay-stop +/var/lib/overlay-boot/overlay-go /usr/sbin/overlay-go diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..56a9020 --- /dev/null +++ b/debian/rules @@ -0,0 +1,11 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_strip: + # no stripping needed + +clean: + dh_auto_clean + $(MAKE) -C reaper clean diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) -- 2.39.2