debian: Only run udevadm if the binary is available
PATCH 1/1 debian: Only run udevadm if the binary is available
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.
--- debian/rdma-core.postinst | 8 +++++--- debian/srptools.postinst | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-)
debian/rdma-core.postinst +5 -3
@@ -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
debian/srptools.postinst +3 -1
@@ -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
Signature · 6 lines
2.14.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20171227104135.24391-1-benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org
Quoted 10 lines · 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
Quoted 6 lines
To silence these warnings, only run udevadm if this binary is available.
Signed-off-by Benjamin Drung <[email protected]>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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20171227202627.GH25436-uk2M96/[email protected]
Am Mittwoch, den 27.12.2017, 13:26 -0700 schrieb Jason Gunthorpe:
Quoted 20 lines · Benjamin Drung
Quoted 11 lines
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 foundQuoted 7 lines
To silence these warnings, only run udevadm if this binary is available.
Signed-off-by Benjamin Drung <[email protected]>debian/rdma-core.postinst | 8 +++++--- debian/srptools.postinst | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-)
Quoted 5 lines
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.
Signature · 18 lines
Benjamin Drung System Developer Debian & Ubuntu Developer ProfitBricks GmbH Greifswalder Str. 207 D - 10405 Berlin Email: [email protected] 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 21 lines · Benjamin Drung
Am Mittwoch, den 27.12.2017, 13:26 -0700 schrieb Jason Gunthorpe:
Quoted 20 lines · Benjamin Drung
Quoted 18 lines
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 foundTo silence these warnings, only run udevadm if this binary is available.
Signed-off-by Benjamin Drung <[email protected]>debian/rdma-core.postinst | 8 +++++--- debian/srptools.postinst | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-)
Quoted 8 lines
Quoted 5 lines
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20171228210124.GI25436-uk2M96/[email protected]
PATCH v2 1/1 debian: Add udev dependency to rdma-core and srptools
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.
--- debian/control | 2 ++ debian/rdma-core.postinst | 6 +++--- debian/srptools.postinst | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-)
debian/control +2 -0
@@ -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)
debian/rdma-core.postinst +3 -3
@@ -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
debian/srptools.postinst +1 -1
@@ -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
Signature · 6 lines
2.14.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20180103102211.28307-1-benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org
Jason Gunthorpe
Reviewed-byRe: [PATCH rdma-core v2] debian: Add udev dependency to rdma-core and srptools
Quoted 10 lines · 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
Quoted 8 lines
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 <[email protected]>debian/control | 2 ++ debian/rdma-core.postinst | 6 +++--- debian/srptools.postinst | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-)
Makes sense to me
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Leon Romanovsky
AppliedRe: [PATCH rdma-core v2] debian: Add udev dependency to rdma-core and srptools
In reply to a message not in the archiveQuoted 13 lines · 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 foundAdd udev dependency to rdma-core and srptools (which provides udevadm), because these packages rely on udev to load the kernel modules.
Quoted 7 lines
Signed-off-by Benjamin Drung <[email protected]>--- debian/control | 2 ++ debian/rdma-core.postinst | 6 +++--- debian/srptools.postinst | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-)
Thanks, applied.