Merge branch 'apkg' into 'master'

distro: add apkg support

See merge request knot/knot-dns!1298
This commit is contained in:
Daniel Salzman 2021-05-26 14:46:17 +00:00
commit fd92cb8f72
49 changed files with 49 additions and 14 deletions

3
.gitignore vendored
View file

@ -81,6 +81,9 @@ src/libknot/libknot.h
# Generated tarballs
/knot-*.tar.xz
# Packaging output
/pkg
# Code coverage
*.gcda
*.gcno

View file

@ -1,6 +1,4 @@
EXTRA_DIST = \
arch \
common \
deb \
rpm \
pkg \
tests

12
distro/config/apkg.toml Normal file
View file

@ -0,0 +1,12 @@
[project]
name = "knot-dns"
# needed for make-archive
make_archive_script = "scripts/make-dev-archive.sh"
[upstream]
# needed for get-archive
archive_url = "https://secure.nic.cz/files/knot-dns/knot-{{ version }}.tar.xz"
signature_url = "https://secure.nic.cz/files/knot-dns/knot-{{ version }}.tar.xz.asc"
[apkg]
compat = 1

View file

@ -1 +0,0 @@
../common/knot.service

View file

@ -1 +0,0 @@
../common/knot.tmpfiles

View file

@ -6,7 +6,7 @@
# Contributor: Otto Sabart <seberm[at]gmail[dot]com>
pkgname=knot
pkgver=__VERSION__
pkgver={{ version }}
pkgrel=1
pkgdesc="High-performance authoritative-only DNS server"
arch=('x86_64')
@ -23,7 +23,7 @@ depends=('fstrm'
'protobuf-c'
'systemd')
backup=('etc/knot/knot.conf')
source=("${pkgname}_${pkgver}.orig.tar.xz")
source=("${pkgname}-${pkgver}.tar.xz")
sha256sums=('SKIP')
validpgpkeys=('742FA4E95829B6C5EAC6B85710BB7AF6FEBBD6AB') # Daniel Salzman <daniel.salzman@nic.cz>

View file

@ -1,4 +1,4 @@
knot (__VERSION__-cznic.1) unstable; urgency=medium
knot ({{ version }}-cznic.{{ release }}) unstable; urgency=medium
* move changelog to OBS
* see NEWS or https://knot-dns.cz

View file

@ -9,6 +9,8 @@ Build-Depends-Indep:
python3-setuptools,
python3-sphinx,
Build-Depends:
autoconf,
automake,
debhelper (>= 9),
dh-python,
libcap-ng-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386],
@ -25,6 +27,7 @@ Build-Depends:
libsofthsm2 <!nocheck>,
libsystemd-dev [linux-any] | libsystemd-daemon-dev [linux-any],
libsystemd-dev [linux-any] | libsystemd-journal-dev [linux-any],
libtool,
liburcu-dev (>= 0.4),
pkg-config,
protobuf-c-compiler,

1
distro/pkg/deb/knot.service Symbolic link
View file

@ -0,0 +1 @@
../../common/knot.service

1
distro/pkg/deb/knot.tmpfile Symbolic link
View file

@ -0,0 +1 @@
../../common/knot.tmpfiles

View file

@ -7,8 +7,6 @@ libknot.so.11 libknot11 #MINVER#
KNOT_DB_LMDB_RDONLY@Base 3.0.0
KNOT_DB_LMDB_WRITEMAP@Base 3.0.0
KNOT_DUMP_STYLE_DEFAULT@Base 3.0.0
KNOT_XDP_PAYLOAD_OFFSET4@Base 3.0.0
KNOT_XDP_PAYLOAD_OFFSET6@Base 3.0.0
knot_ctl_accept@Base 3.0.0
knot_ctl_alloc@Base 3.0.0
knot_ctl_bind@Base 3.0.0
@ -78,6 +76,7 @@ libknot.so.11 libknot11 #MINVER#
knot_edns_set_ext_rcode@Base 3.0.0
knot_edns_set_version@Base 3.0.0
knot_error_from_libdnssec@Base 3.0.0
knot_eth_mtu@Base 3.1.0
knot_eth_name_from_addr@Base 3.0.0
knot_eth_queues@Base 3.0.0
knot_eth_xdp_mode@Base 3.0.2
@ -181,11 +180,15 @@ libknot.so.11 libknot11 #MINVER#
knot_xdp_init@Base 3.0.0
knot_xdp_recv@Base 3.0.0
knot_xdp_recv_finish@Base 3.0.0
knot_xdp_reply_alloc@Base 3.1.0
knot_xdp_send@Base 3.0.0
knot_xdp_send_alloc@Base 3.0.0
knot_xdp_send_finish@Base 3.0.0
knot_xdp_send_free@Base 3.1.0
knot_xdp_send_prepare@Base 3.0.0
knot_xdp_socket_fd@Base 3.0.0
knot_xdp_tcp_relay@Base 3.1.0
knot_xdp_tcp_send@Base 3.1.0
yp_addr@Base 3.0.0
yp_addr_noport@Base 3.0.0
yp_addr_noport_to_bin@Base 3.0.0

View file

@ -2,17 +2,16 @@
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}}
%define GPG_CHECK 0
%define VERSION __VERSION__
%define BASE_VERSION %(echo "%{version}" | sed 's/^\\([^.]\\+\\.[^.]\\+\\).*/\\1/')
%define repodir %{_builddir}/%{name}-%{version}
Summary: High-performance authoritative DNS server
Name: knot
Version: %{VERSION}
Release: cznic.1%{?dist}
Version: {{ version }}
Release: cznic.{{ release }}%{?dist}
License: GPL-3.0-or-later
URL: https://www.knot-dns.cz
Source0: %{name}_%{version}.orig.tar.xz
Source0: %{name}-%{version}.tar.xz
%if 0%{?GPG_CHECK}
Source1: https://secure.nic.cz/files/knot-dns/%{name}-%{version}.tar.xz.asc
@ -27,6 +26,9 @@ BuildRequires: gnupg2
Patch1: 01-test_net-disable-udp-send-on-unconnected.patch
# Required dependencies
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: make
BuildRequires: gcc
BuildRequires: pkgconfig(liburcu)

14
scripts/make-dev-archive.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-3.0-or-later
# Create a develpoment tarball
set -o errexit -o nounset -o xtrace
cd "$(dirname ${0})/.."
# configure Knot DNS in order to create archive
autoreconf -if
./configure
# create archive and parse output for archive name
TARDIR=$(make dist 2>&1 | sed -n 's/tardir=\([^ ]\+\).*/\1/p')
# print created archive name
ls -1 $TARDIR.tar.*