All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-core] debian: Only run udevadm if the binary is available
@ 2017-12-27 10:41 Benjamin Drung
       [not found] ` <20171227104135.24391-1-benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Drung @ 2017-12-27 10:41 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Benjamin Drung

When udevadm is not available (e.g. in a minimal chroot environment),
the rdma-core package installation will print these warnings:

/var/lib/dpkg/info/rdma-core.postinst: 33:
/var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
/var/lib/dpkg/info/rdma-core.postinst: 34:
/var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
/var/lib/dpkg/info/rdma-core.postinst: 35:
/var/lib/dpkg/info/rdma-core.postinst: udevadm: not found

To silence these warnings, only run udevadm if this binary is available.

Signed-off-by: Benjamin Drung <benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
---
 debian/rdma-core.postinst | 8 +++++---
 debian/srptools.postinst  | 4 +++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/debian/rdma-core.postinst b/debian/rdma-core.postinst
index 6486f62e..26aec6d1 100644
--- a/debian/rdma-core.postinst
+++ b/debian/rdma-core.postinst
@@ -6,7 +6,9 @@ set -e
 if [ "$1" = "configure" ]; then
     # we ship udev rules, so trigger an update. This has to be done after
     # DEBHELPER restarts systemd to get our new service files loaded.
-    udevadm trigger --subsystem-match=infiniband --action=change || true
-    udevadm trigger --subsystem-match=net --action=change || true
-    udevadm trigger --subsystem-match=infiniband_mad --action=change || true
+    if which udevadm >/dev/null 2>&1; then
+        udevadm trigger --subsystem-match=infiniband --action=change
+        udevadm trigger --subsystem-match=net --action=change
+        udevadm trigger --subsystem-match=infiniband_mad --action=change
+    fi
 fi
diff --git a/debian/srptools.postinst b/debian/srptools.postinst
index 398534db..9cdce914 100644
--- a/debian/srptools.postinst
+++ b/debian/srptools.postinst
@@ -6,5 +6,7 @@ set -e
 if [ "$1" = "configure" ]; then
     # we ship udev rules, so trigger an update. This has to be done after
     # DEBHELPER restarts systemd to get our new service files loaded.
-    udevadm trigger --subsystem-match=infiniband_mad --action=change || true
+    if which udevadm >/dev/null 2>&1; then
+        udevadm trigger --subsystem-match=infiniband_mad --action=change
+    fi
 fi
-- 
2.14.1

--
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] 7+ messages in thread

* Re: [PATCH rdma-core] debian: Only run udevadm if the binary is available
       [not found] ` <20171227104135.24391-1-benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
@ 2017-12-27 20:26   ` Jason Gunthorpe
       [not found]     ` <20171227202627.GH25436-uk2M96/98Pc@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Jason Gunthorpe @ 2017-12-27 20:26 UTC (permalink / raw)
  To: Benjamin Drung; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Wed, Dec 27, 2017 at 11:41:35AM +0100, Benjamin Drung wrote:
> When udevadm is not available (e.g. in a minimal chroot environment),
> the rdma-core package installation will print these warnings:
> 
> /var/lib/dpkg/info/rdma-core.postinst: 33:
> /var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
> /var/lib/dpkg/info/rdma-core.postinst: 34:
> /var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
> /var/lib/dpkg/info/rdma-core.postinst: 35:
> /var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
> 
> To silence these warnings, only run udevadm if this binary is available.
> 
> Signed-off-by: Benjamin Drung <benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
>  debian/rdma-core.postinst | 8 +++++---
>  debian/srptools.postinst  | 4 +++-
>  2 files changed, 8 insertions(+), 4 deletions(-)

Hurm. Some packages have this which test, others do not..

I'm confused how we get to a state where rdma-core can be installed
without udev? Virtually the entire purpose of that package revolves
around udev and systemd ... So are we missing a dependency?

Jason
--
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] 7+ messages in thread

* Re: [PATCH rdma-core] debian: Only run udevadm if the binary is available
       [not found]     ` <20171227202627.GH25436-uk2M96/98Pc@public.gmane.org>
@ 2017-12-28  9:18       ` Benjamin Drung
       [not found]         ` <1514452726.4412.20.camel-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Drung @ 2017-12-28  9:18 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Am Mittwoch, den 27.12.2017, 13:26 -0700 schrieb Jason Gunthorpe:
> On Wed, Dec 27, 2017 at 11:41:35AM +0100, Benjamin Drung wrote:
> > When udevadm is not available (e.g. in a minimal chroot
> > environment),
> > the rdma-core package installation will print these warnings:
> > 
> > /var/lib/dpkg/info/rdma-core.postinst: 33:
> > /var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
> > /var/lib/dpkg/info/rdma-core.postinst: 34:
> > /var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
> > /var/lib/dpkg/info/rdma-core.postinst: 35:
> > /var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
> > 
> > To silence these warnings, only run udevadm if this binary is
> > available.
> > 
> > Signed-off-by: Benjamin Drung <benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
> >  debian/rdma-core.postinst | 8 +++++---
> >  debian/srptools.postinst  | 4 +++-
> >  2 files changed, 8 insertions(+), 4 deletions(-)
> 
> Hurm. Some packages have this which test, others do not..
> 
> I'm confused how we get to a state where rdma-core can be installed
> without udev? Virtually the entire purpose of that package revolves
> around udev and systemd ... So are we missing a dependency?

Adding a dependency on udev is a solution too and is probably the
better solution.

-- 
Benjamin Drung
System Developer
Debian & Ubuntu Developer

ProfitBricks GmbH
Greifswalder Str. 207
D - 10405 Berlin

Email: benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org
URL: https://www.profitbricks.de

Sitz der Gesellschaft: Berlin
Registergericht: Amtsgericht Charlottenburg, HRB 125506 B
Geschäftsführer: Achim Weiss, Matthias Steinberg
--
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] 7+ messages in thread

* Re: [PATCH rdma-core] debian: Only run udevadm if the binary is available
       [not found]         ` <1514452726.4412.20.camel-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
@ 2017-12-28 21:01           ` Jason Gunthorpe
       [not found]             ` <20171228210124.GI25436-uk2M96/98Pc@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Jason Gunthorpe @ 2017-12-28 21:01 UTC (permalink / raw)
  To: Benjamin Drung; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Thu, Dec 28, 2017 at 10:18:46AM +0100, Benjamin Drung wrote:
> Am Mittwoch, den 27.12.2017, 13:26 -0700 schrieb Jason Gunthorpe:
> > On Wed, Dec 27, 2017 at 11:41:35AM +0100, Benjamin Drung wrote:
> > > When udevadm is not available (e.g. in a minimal chroot
> > > environment),
> > > the rdma-core package installation will print these warnings:
> > > 
> > > /var/lib/dpkg/info/rdma-core.postinst: 33:
> > > /var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
> > > /var/lib/dpkg/info/rdma-core.postinst: 34:
> > > /var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
> > > /var/lib/dpkg/info/rdma-core.postinst: 35:
> > > /var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
> > > 
> > > To silence these warnings, only run udevadm if this binary is
> > > available.
> > > 
> > > Signed-off-by: Benjamin Drung <benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
> > >  debian/rdma-core.postinst | 8 +++++---
> > >  debian/srptools.postinst  | 4 +++-
> > >  2 files changed, 8 insertions(+), 4 deletions(-)
> > 
> > Hurm. Some packages have this which test, others do not..
> > 
> > I'm confused how we get to a state where rdma-core can be installed
> > without udev? Virtually the entire purpose of that package revolves
> > around udev and systemd ... So are we missing a dependency?
> 
> Adding a dependency on udev is a solution too and is probably the
> better solution.

Okay, can you send that?

Thanks,
Jason

--
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] 7+ messages in thread

* [PATCH rdma-core v2] debian: Add udev dependency to rdma-core and srptools
       [not found]             ` <20171228210124.GI25436-uk2M96/98Pc@public.gmane.org>
@ 2018-01-03 10:22               ` Benjamin Drung
       [not found]                 ` <20180103102211.28307-1-benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Drung @ 2018-01-03 10:22 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Benjamin Drung

When udevadm is not available (e.g. in a minimal chroot environment),
the rdma-core package installation will print these warnings:

/var/lib/dpkg/info/rdma-core.postinst: 33:
/var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
/var/lib/dpkg/info/rdma-core.postinst: 34:
/var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
/var/lib/dpkg/info/rdma-core.postinst: 35:
/var/lib/dpkg/info/rdma-core.postinst: udevadm: not found

Add udev dependency to rdma-core and srptools (which provides udevadm),
because these packages rely on udev to load the kernel modules.

Signed-off-by: Benjamin Drung <benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
---
 debian/control            | 2 ++
 debian/rdma-core.postinst | 6 +++---
 debian/srptools.postinst  | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/debian/control b/debian/control
index 451b379f..27d23791 100644
--- a/debian/control
+++ b/debian/control
@@ -24,6 +24,7 @@ Homepage: https://github.com/linux-rdma/rdma-core
 Package: rdma-core
 Architecture: linux-any
 Depends: lsb-base (>= 3.2-14~),
+         udev,
          ${misc:Depends},
          ${perl:Depends},
          ${shlibs:Depends}
@@ -342,6 +343,7 @@ Package: srptools
 Architecture: linux-any
 Depends: lsb-base (>= 3.2-14~),
          rdma-core (>= 15),
+         udev,
          ${misc:Depends},
          ${shlibs:Depends}
 Description: Tools for Infiniband attached storage (SRP)
diff --git a/debian/rdma-core.postinst b/debian/rdma-core.postinst
index 6486f62e..a76368a4 100644
--- a/debian/rdma-core.postinst
+++ b/debian/rdma-core.postinst
@@ -6,7 +6,7 @@ set -e
 if [ "$1" = "configure" ]; then
     # we ship udev rules, so trigger an update. This has to be done after
     # DEBHELPER restarts systemd to get our new service files loaded.
-    udevadm trigger --subsystem-match=infiniband --action=change || true
-    udevadm trigger --subsystem-match=net --action=change || true
-    udevadm trigger --subsystem-match=infiniband_mad --action=change || true
+    udevadm trigger --subsystem-match=infiniband --action=change
+    udevadm trigger --subsystem-match=net --action=change
+    udevadm trigger --subsystem-match=infiniband_mad --action=change
 fi
diff --git a/debian/srptools.postinst b/debian/srptools.postinst
index 398534db..c69a3ad1 100644
--- a/debian/srptools.postinst
+++ b/debian/srptools.postinst
@@ -6,5 +6,5 @@ set -e
 if [ "$1" = "configure" ]; then
     # we ship udev rules, so trigger an update. This has to be done after
     # DEBHELPER restarts systemd to get our new service files loaded.
-    udevadm trigger --subsystem-match=infiniband_mad --action=change || true
+    udevadm trigger --subsystem-match=infiniband_mad --action=change
 fi
-- 
2.14.1

--
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] 7+ messages in thread

* Re: [PATCH rdma-core v2] debian: Add udev dependency to rdma-core and srptools
       [not found]                 ` <20180103102211.28307-1-benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
@ 2018-01-03 21:24                   ` Jason Gunthorpe
  2018-01-09 11:20                   ` Leon Romanovsky
  1 sibling, 0 replies; 7+ messages in thread
From: Jason Gunthorpe @ 2018-01-03 21:24 UTC (permalink / raw)
  To: Benjamin Drung; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Wed, Jan 03, 2018 at 11:22:11AM +0100, Benjamin Drung wrote:
> When udevadm is not available (e.g. in a minimal chroot environment),
> the rdma-core package installation will print these warnings:
> 
> /var/lib/dpkg/info/rdma-core.postinst: 33:
> /var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
> /var/lib/dpkg/info/rdma-core.postinst: 34:
> /var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
> /var/lib/dpkg/info/rdma-core.postinst: 35:
> /var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
> 
> Add udev dependency to rdma-core and srptools (which provides udevadm),
> because these packages rely on udev to load the kernel modules.
> 
> Signed-off-by: Benjamin Drung <benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
>  debian/control            | 2 ++
>  debian/rdma-core.postinst | 6 +++---
>  debian/srptools.postinst  | 2 +-
>  3 files changed, 6 insertions(+), 4 deletions(-)

Makes sense to me

Reviewed-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Jason
--
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] 7+ messages in thread

* Re: [PATCH rdma-core v2] debian: Add udev dependency to rdma-core and srptools
       [not found]                 ` <20180103102211.28307-1-benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
  2018-01-03 21:24                   ` Jason Gunthorpe
@ 2018-01-09 11:20                   ` Leon Romanovsky
  1 sibling, 0 replies; 7+ messages in thread
From: Leon Romanovsky @ 2018-01-09 11:20 UTC (permalink / raw)
  To: Benjamin Drung; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

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

On Wed, Jan 03, 2018 at 11:22:11AM +0100, Benjamin Drung wrote:
> When udevadm is not available (e.g. in a minimal chroot environment),
> the rdma-core package installation will print these warnings:
>
> /var/lib/dpkg/info/rdma-core.postinst: 33:
> /var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
> /var/lib/dpkg/info/rdma-core.postinst: 34:
> /var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
> /var/lib/dpkg/info/rdma-core.postinst: 35:
> /var/lib/dpkg/info/rdma-core.postinst: udevadm: not found
>
> Add udev dependency to rdma-core and srptools (which provides udevadm),
> because these packages rely on udev to load the kernel modules.
>
> Signed-off-by: Benjamin Drung <benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
> ---
>  debian/control            | 2 ++
>  debian/rdma-core.postinst | 6 +++---
>  debian/srptools.postinst  | 2 +-
>  3 files changed, 6 insertions(+), 4 deletions(-)
>

Thanks, applied.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-01-09 11:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-27 10:41 [PATCH rdma-core] debian: Only run udevadm if the binary is available Benjamin Drung
     [not found] ` <20171227104135.24391-1-benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
2017-12-27 20:26   ` Jason Gunthorpe
     [not found]     ` <20171227202627.GH25436-uk2M96/98Pc@public.gmane.org>
2017-12-28  9:18       ` Benjamin Drung
     [not found]         ` <1514452726.4412.20.camel-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
2017-12-28 21:01           ` Jason Gunthorpe
     [not found]             ` <20171228210124.GI25436-uk2M96/98Pc@public.gmane.org>
2018-01-03 10:22               ` [PATCH rdma-core v2] debian: Add udev dependency to rdma-core and srptools Benjamin Drung
     [not found]                 ` <20180103102211.28307-1-benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
2018-01-03 21:24                   ` Jason Gunthorpe
2018-01-09 11:20                   ` 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.