From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Alaa Hleihel <alaa-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org
Subject: Re: rdma-core example spec file is broken
Date: Mon, 7 Nov 2016 09:44:15 -0700 [thread overview]
Message-ID: <20161107164415.GA8780@obsidianresearch.com> (raw)
In-Reply-To: <0e831337-e404-8973-b7fe-e176b3d688e8-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
On Sun, Nov 06, 2016 at 02:01:20PM +0200, Alaa Hleihel wrote:
> Hi Jason,
>
> The example spec file is broken after commit ddd530be4622 ("Minor RPM spec file improvments").
>
> rpmbuild fails with the following error:
>
> Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.7l0yoN
> + umask 022
> + cd /tmp/xxx/BUILD
> + cd rdma-core-11
> /var/tmp/rpm-tmp.7l0yoN: line 31: syntax error near unexpected token `post'
> error: Bad exit status from /var/tmp/rpm-tmp.7l0yoN (%build)
>
> The issue is that the new "Requires" macros were added after the %prep and %build sections..
Ah, interesting, in my test scripts the common spec file is
superceeded by the version in redhat/ for systemd systems, which is
why I did not notice it.
Jason
>From f2388d9d110ab43295d50d7345d5dda289a87a41 Mon Sep 17 00:00:00 2001
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Date: Mon, 7 Nov 2016 09:37:38 -0700
Subject: [PATCH] Fix common rdma-core.spec for systemd systems
RPM needs the Requires lines for systemd to be earlier.
Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
rdma-core.spec | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/rdma-core.spec b/rdma-core.spec
index 35186c3271b8..bea2a2267d1d 100644
--- a/rdma-core.spec
+++ b/rdma-core.spec
@@ -46,6 +46,13 @@ BuildRequires: make
%endif
%endif
+# Detect if systemd is supported on this system
+%if 0%{?_unitdir:1}
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
+%endif
+
%description
Temporary packaging
@@ -59,9 +66,6 @@ This is a simple example without the split sub packages to get things started.
# Detect if systemd is supported on this system
%if 0%{?_unitdir:1}
%define my_unitdir %{_unitdir}
-Requires(post): systemd-units
-Requires(preun): systemd-units
-Requires(postun): systemd-units
%else
%define my_unitdir /tmp/
%endif
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-11-07 16:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-06 12:01 rdma-core example spec file is broken Alaa Hleihel
[not found] ` <0e831337-e404-8973-b7fe-e176b3d688e8-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-11-07 16:44 ` Jason Gunthorpe [this message]
[not found] ` <20161107164415.GA8780-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-11-08 14:47 ` Alaa Hleihel
[not found] ` <f807db01-c4c7-0f64-fe6b-476d02b686b3-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-11-09 5:59 ` Leon Romanovsky
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=20161107164415.GA8780@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=alaa-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
--cc=leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.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