* rdma-core example spec file is broken
@ 2016-11-06 12:01 Alaa Hleihel
[not found] ` <0e831337-e404-8973-b7fe-e176b3d688e8-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Alaa Hleihel @ 2016-11-06 12:01 UTC (permalink / raw)
To: jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/,
linux-rdma-u79uwXL29TY76Z2rM5mHXA
Cc: leonro-VPRAkNaXOzVWk0Htik3J/w, yishaih-VPRAkNaXOzVWk0Htik3J/w
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..
Regards,
Alaa
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: rdma-core example spec file is broken
[not found] ` <0e831337-e404-8973-b7fe-e176b3d688e8-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2016-11-07 16:44 ` Jason Gunthorpe
[not found] ` <20161107164415.GA8780-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Jason Gunthorpe @ 2016-11-07 16:44 UTC (permalink / raw)
To: Alaa Hleihel
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, leonro-VPRAkNaXOzVWk0Htik3J/w,
yishaih-VPRAkNaXOzVWk0Htik3J/w
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: rdma-core example spec file is broken
[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>
0 siblings, 1 reply; 4+ messages in thread
From: Alaa Hleihel @ 2016-11-08 14:47 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, leonro-VPRAkNaXOzVWk0Htik3J/w,
yishaih-VPRAkNaXOzVWk0Htik3J/w
Hi
On 11/7/2016 18:44, Jason Gunthorpe wrote:
> 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.
Yes, it happens with relatively new versions only..
> 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
I tested this patch.
It resolves the issue.
Thanks,
Alaa
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: rdma-core example spec file is broken
[not found] ` <f807db01-c4c7-0f64-fe6b-476d02b686b3-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2016-11-09 5:59 ` Leon Romanovsky
0 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2016-11-09 5:59 UTC (permalink / raw)
To: Alaa Hleihel
Cc: Jason Gunthorpe, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
yishaih-VPRAkNaXOzVWk0Htik3J/w
[-- Attachment #1: Type: text/plain, Size: 374 bytes --]
On Tue, Nov 08, 2016 at 04:47:21PM +0200, Alaa Hleihel wrote:
> I tested this patch.
> It resolves the issue.
Thanks, applied.
>
> Thanks,
> Alaa
> --
> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-09 5:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
[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
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.