Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: [PR PATCH] nvme-cli: fix build and handling of generated files
Date: Wed, 16 Oct 2019 17:36:45 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-15535@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 334 bytes --]

There is a new pull request by q66 against master on the void-packages repository

https://github.com/void-ppc/void-packages nvme-cli
https://github.com/void-linux/void-packages/pull/15535

nvme-cli: fix build and handling of generated files


A patch file from https://github.com/void-linux/void-packages/pull/15535.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvme-cli-15535.patch --]
[-- Type: text/x-diff, Size: 2328 bytes --]

From 6bfc8a47f8a1ef85e1c3207f98436fe868cdafbb Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Wed, 16 Oct 2019 17:34:43 +0200
Subject: [PATCH] nvme-cli: fix build and handling of generated files

---
 srcpkgs/nvme-cli/INSTALL  | 12 ++++++++++++
 srcpkgs/nvme-cli/REMOVE   |  8 ++++++++
 srcpkgs/nvme-cli/template | 15 +++++++++++++--
 3 files changed, 33 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/nvme-cli/INSTALL
 create mode 100644 srcpkgs/nvme-cli/REMOVE

diff --git a/srcpkgs/nvme-cli/INSTALL b/srcpkgs/nvme-cli/INSTALL
new file mode 100644
index 00000000000..64541c01d2c
--- /dev/null
+++ b/srcpkgs/nvme-cli/INSTALL
@@ -0,0 +1,12 @@
+if [ "$UPDATE" != "yes" ]; then
+	case "${ACTION}" in
+	post)
+		if [ ! -s etc/nvme/hostnqn ]; then
+			echo $(nvme gen-hostnqn) > etc/nvme/hostnqn
+		fi
+		if [ ! -s etc/nvme/hostid ]; then
+			uuidgen > etc/nvme/hostid
+		fi
+		;;
+	esac
+fi
diff --git a/srcpkgs/nvme-cli/REMOVE b/srcpkgs/nvme-cli/REMOVE
new file mode 100644
index 00000000000..2d37bea1a51
--- /dev/null
+++ b/srcpkgs/nvme-cli/REMOVE
@@ -0,0 +1,8 @@
+if [ "$UPDATE" != "yes" ]; then
+	case "${ACTION}" in
+	pre)
+		rm -f etc/nvme/hostnqn
+		rm -f etc/nvme/hostid
+		;;
+	esac
+fi
diff --git a/srcpkgs/nvme-cli/template b/srcpkgs/nvme-cli/template
index acc0a86ffcf..7bcb4e97357 100644
--- a/srcpkgs/nvme-cli/template
+++ b/srcpkgs/nvme-cli/template
@@ -1,10 +1,14 @@
 # Template file for 'nvme-cli'
 pkgname=nvme-cli
 version=1.9
-revision=1
+revision=2
 build_style=gnu-makefile
+# yeah, it must be 0 to enable
+make_build_args="LIBUUID=0"
 make_install_args="SBINDIR=/usr/bin"
-hostmakedepends="util-linux"
+make_install_target="install-spec"
+makedepends="libuuid-devel"
+depends="util-linux"
 short_desc="NVMe management command line interface"
 maintainer="Peter Froehlich <peter.hans.froehlich@gmail.com>"
 license="GPL-2.0-only"
@@ -13,3 +17,10 @@ distfiles="https://github.com/linux-nvme/nvme-cli/archive/v${version}.tar.gz"
 checksum=d7c3d56f36f81c0933f7b7c3f90c4196be0fec758affc8062c525b6bc5ea65f5
 
 CFLAGS="-Wno-error -I."
+
+# these files are touch'd by install, remove so they don't get registered
+# by the package (which would subsequently cause trouble during removal)
+post_install() {
+	rm -f "${PKGDESTDIR}/etc/nvme/hostnqn"
+	rm -f "${PKGDESTDIR}/etc/nvme/hostid"
+}

             reply	other threads:[~2019-10-16 15:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 15:36 voidlinux-github [this message]
2019-10-16 18:45 ` [PR PATCH] [Merged]: " voidlinux-github

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-15535@inbox.vuxu.org \
    --to=voidlinux-github@inbox.vuxu.org \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).