]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
distro: add apkg-powered packaging for debian
authorJakub Ružička <jakub.ruzicka@nic.cz>
Tue, 20 Apr 2021 11:11:22 +0000 (13:11 +0200)
committerAleš Mrázek <ales.mrazek@nic.cz>
Fri, 8 Apr 2022 14:17:52 +0000 (16:17 +0200)
see distro/README.md

manager/.gitignore
manager/distro/README.md [new file with mode: 0644]
manager/distro/config/apkg.toml [new file with mode: 0644]
manager/distro/pkg/deb/changelog [new file with mode: 0644]
manager/distro/pkg/deb/compat [new file with mode: 0644]
manager/distro/pkg/deb/control [new file with mode: 0644]
manager/distro/pkg/deb/copyright [new file with mode: 0644]
manager/distro/pkg/deb/rules [new file with mode: 0755]
manager/distro/pkg/deb/source/format [new file with mode: 0644]
manager/scripts/make-dev-archive.sh [new file with mode: 0755]

index 8cce37b0f072124a8090f7e23f80fb707ca274de..294387c6bf51bb5f18754876e0dce7aeb8c0faf8 100644 (file)
@@ -8,4 +8,5 @@ package-lock.json
 .pytype
 dist/
 .tox/
-.vscode/
\ No newline at end of file
+.vscode/
+/pkg
diff --git a/manager/distro/README.md b/manager/distro/README.md
new file mode 100644 (file)
index 0000000..91e03bd
--- /dev/null
@@ -0,0 +1,26 @@
+# knot-resolver-manager upstream packaging sources
+
+Top level distro/ dir contains upstream packaging sources for native packages.
+
+Files in this directory follow [apkg] conventions and apkg can be used to
+create BIRD packages for various distros directly from upstream sources as
+well as from upstream archives once available.
+
+[apkg]: https://apkg.rtfd.io
+
+
+## Create package from current repo commit
+
+Create native packages using isolated builder (pbuilder, mock, ...):
+
+    apkg build
+
+If you're using VM, container or other disposable system, it's recommended to
+build packages directly using -h/--host-build and -i/--install-dep:
+
+    apkg build -Hi
+
+To create source package:
+
+    apkg srcpkg
+
diff --git a/manager/distro/config/apkg.toml b/manager/distro/config/apkg.toml
new file mode 100644 (file)
index 0000000..ea8cd09
--- /dev/null
@@ -0,0 +1,4 @@
+[project]
+name = "knot-resolver-manager"
+# needed for make-archive
+make_archive_script = "scripts/make-dev-archive.sh"
diff --git a/manager/distro/pkg/deb/changelog b/manager/distro/pkg/deb/changelog
new file mode 100644 (file)
index 0000000..80c5d4f
--- /dev/null
@@ -0,0 +1,5 @@
+knot-resolver-manager ({{ version }}-cznic.{{ release }}) unstable; urgency=medium
+
+  * new upstream version {{ version }}
+
+ -- Jakub Ružička <jakub.ruzicka@nic.cz>  Tue, 20 Apr 2020 16:20:00 +0100
diff --git a/manager/distro/pkg/deb/compat b/manager/distro/pkg/deb/compat
new file mode 100644 (file)
index 0000000..ec63514
--- /dev/null
@@ -0,0 +1 @@
+9
diff --git a/manager/distro/pkg/deb/control b/manager/distro/pkg/deb/control
new file mode 100644 (file)
index 0000000..c79d199
--- /dev/null
@@ -0,0 +1,24 @@
+Source: knot-resolver-manager
+Section: python
+Priority: optional
+Maintainer: Jakub Ružička <jakub.ruzicka@nic.cz>
+Build-Depends:
+ debhelper,
+ dh-python,
+ python3,
+Homepage: https://gitlab.nic.cz/knot/knot-resolver-manager
+
+Package: python3-knot-resolver-manager
+Architecture: all
+Depends:
+ python3-aiohttp,
+ python3-click,
+ python3-gi,
+ python3-pydbus,
+ python3-yaml,
+ ${misc:Depends},
+ ${python3:Depends},
+Recommends:
+ knot-resolver
+Provides: knot-resolver-manager
+Description: Knot Resolver Manager
diff --git a/manager/distro/pkg/deb/copyright b/manager/distro/pkg/deb/copyright
new file mode 100644 (file)
index 0000000..bae0f28
--- /dev/null
@@ -0,0 +1,24 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: knot-resolver-manager
+Source: https://gitlab.nic.cz/knot/knot-resolver-manager
+
+Files: *
+Copyright: (c) 2021, CZ.NIC
+License: GPL-3+
+
+License: GPL-3+
+ 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 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 program.  If not, see <https://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the full text of the GNU General Public License
+ version 3 can be found in the file `/usr/share/common-licenses/GPL-3'.
diff --git a/manager/distro/pkg/deb/rules b/manager/distro/pkg/deb/rules
new file mode 100755 (executable)
index 0000000..570efe9
--- /dev/null
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+%:
+       dh $@ --buildsystem=pybuild
+
+override_dh_auto_build:
+       echo "no build required"
diff --git a/manager/distro/pkg/deb/source/format b/manager/distro/pkg/deb/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/manager/scripts/make-dev-archive.sh b/manager/scripts/make-dev-archive.sh
new file mode 100755 (executable)
index 0000000..c72296e
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+# create dev archive from current repo HEAD
+set -o errexit -o nounset
+
+cd "$(dirname ${0})/.."
+
+if ! command -v poetry &> /dev/null
+then
+    echo "poetry is required to create archive: pip install poetry"
+    exit 1
+fi
+
+set -o xtrace
+
+# create archive using poetry and get its name
+ARNAME=$(poetry build -f sdist | sed -n 's/\s\+- Built \(knot-resolver-manager-.*\.tar\.gz\)/\1/p')
+ARPATH="dist/$ARNAME"
+
+# print path to generated archive for apkg
+echo "$ARPATH"