summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/TODO5
-rw-r--r--debian/control14
-rw-r--r--debian/patches/debian/0001-systemd.patch6
-rw-r--r--debian/patches/debian/0002-meson-nose2.patch15
-rw-r--r--debian/patches/series1
-rwxr-xr-xdebian/rules37
6 files changed, 48 insertions, 30 deletions
diff --git a/debian/TODO b/debian/TODO
new file mode 100644
index 0000000..cfe2ad8
--- /dev/null
+++ b/debian/TODO
@@ -0,0 +1,5 @@
+TODO
+
+ * readd udeb
+ * update copyright
+ * run test that don't require nvme devices
diff --git a/debian/control b/debian/control
index 82190c8..2e35664 100644
--- a/debian/control
+++ b/debian/control
@@ -3,10 +3,24 @@ Section: admin
Priority: optional
Maintainer: Daniel Baumann <daniel.baumann@progress-linux.org>
Build-Depends:
+ asciidoc,
+ cmake,
debhelper-compat (= 13),
+ flake8 <!nocheck>,
+ isort <!nocheck>,
+ libhugetlbfs-dev,
+ libjson-c-dev,
+ libnvme-dev,
+ libssl-dev,
+ meson,
+ mypy <!nocheck>,
pkg-config,
+ python3-autopep8 <!nocheck>,
+ python3-nose2 <!nocheck>,
uuid-dev,
uuid-runtime,
+ xmlto,
+ zlib1g-dev,
Rules-Requires-Root: no
Standards-Version: 4.6.1
Homepage: https://github.com/linux-nvme/nvme-cli
diff --git a/debian/patches/debian/0001-systemd.patch b/debian/patches/debian/0001-systemd.patch
index c369508..bf0b372 100644
--- a/debian/patches/debian/0001-systemd.patch
+++ b/debian/patches/debian/0001-systemd.patch
@@ -1,9 +1,9 @@
Author: Daniel Baumann <daniel.baumann@progress-linux.org>
Description: Removing obsolete settings for newer systemd versions.
-diff -Naurp nvme-cli.orig/nvmf-autoconnect/systemd/nvmf-connect@.service nvme-cli/nvmf-autoconnect/systemd/nvmf-connect@.service
---- nvme-cli.orig/nvmf-autoconnect/systemd/nvmf-connect@.service
-+++ nvme-cli/nvmf-autoconnect/systemd/nvmf-connect@.service
+diff -Naurp nvme-cli.orig/nvmf-autoconnect/systemd/nvmf-connect@.service.in nvme-cli/nvmf-autoconnect/systemd/nvmf-connect@.service.in
+--- nvme-cli.orig/nvmf-autoconnect/systemd/nvmf-connect@.service.in
++++ nvme-cli/nvmf-autoconnect/systemd/nvmf-connect@.service.in
@@ -4,7 +4,6 @@
[Unit]
diff --git a/debian/patches/debian/0002-meson-nose2.patch b/debian/patches/debian/0002-meson-nose2.patch
new file mode 100644
index 0000000..19bcc0e
--- /dev/null
+++ b/debian/patches/debian/0002-meson-nose2.patch
@@ -0,0 +1,15 @@
+Author: Daniel Baumann <daniel.baumann@progress-linux.org>
+Description: Updating meson to find /usr/bin/nose2-3 (python3).
+
+diff -Naurp nvme-cli.orig/tests/meson.build nvme-cli/tests/meson.build
+--- nvme-cli.orig/tests/meson.build
++++ nvme-cli/tests/meson.build
+@@ -24,7 +24,7 @@ tests = [
+ 'nvme_get_lba_status_test',
+ ]
+
+-runtests = find_program('nose2', required : false)
++runtests = find_program('nose2-3', required : false)
+
+ if runtests.found()
+ foreach t : tests
diff --git a/debian/patches/series b/debian/patches/series
index 20f0183..4878cbb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
debian/0001-systemd.patch
+debian/0002-meson-nose2.patch
diff --git a/debian/rules b/debian/rules
index c84c9b6..a28eafe 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,38 +1,21 @@
#!/usr/bin/make -f
-export DEB_BUILD_MAINT_OPTIONS=hardening=+all
-
%:
- dh ${@}
-
-execute_after_dh_auto_clean:
- rm -rf build-udeb
+ dh ${@} --buildsystem=meson
-execute_after_dh_auto_configure:
- mkdir -p build-udeb
- find . -maxdepth 1 -mindepth 1 -and -not -name debian -and -not -name ".git*" -and -not -name ".pc*" -exec cp -a {} build-udeb \;
- dh_auto_configure --builddirectory build-udeb
-
-execute_after_dh_auto_build:
- DEB_CFLAGS_MAINT_APPEND=-Os dh_auto_build \
- --reload-all-buildenv-variables \
- --builddirectory build-udeb \
- -- \
- nvme HAVE_SYSTEMD=no LIBHUGETLBFS=no
+override_dh_auto_configure:
+ dh_auto_configure -- -Ddocs=man -Ddocs-build=true -Dsystemddir=/lib/systemd -Dudevrulesdir=/lib/udev
execute_after_dh_auto_install:
- $(MAKE) -C build-udeb install-bin DESTDIR=$(CURDIR)/debian/nvme-cli-udeb PREFIX=/usr
-
-override_dh_auto_install:
- dh_auto_install -- DESTDIR=$(CURDIR)/debian/nvme-cli PREFIX=/usr UDEVDIR=/lib/udev SYSTEMDDIR=/lib/systemd
+ # temporarily building without udeb
+ rm -rf debian/nvme-cli
+ mv debian/tmp debian/nvme-cli
- # removing unique files
- rm -f debian/nvme-cli/etc/nvme/hostid
- rm -f debian/nvme-cli/etc/nvme/hostnqn
- rm -f debian/nvme-cli/usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
+ # removing unused files
+ rm -rf debian/nvme-cli/usr/lib/dracut
- # removing useless files
- -rmdir -p debian/nvme-cli/usr/lib/dracut/dracut.conf.d
+ # fix wrong-manual-section
+ sed -i -e 's|\\" "1"|" "1"|' debian/nvme-cli/usr/share/man/*/*.1
override_dh_auto_test:
# disabled, requires a NVMe device