Skip to contentSkip to conversation

udisks: Install bash_completion script in OE familiar dir

PATCH New Khem Raj 1 participant 2 messages May 24, 2019

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 udisks: Install bash_completion script in OE familiar dir

bash-completion packages up /etc/bash_completion.d automatically so install the bash completion script in the above said dir

inherit bash-completion to do the needed for bash-completion package

---
 ...sh_completion-script-in-etc-bash_com.patch | 33 +++++++++++++++++++
 .../recipes-support/udisks/udisks_1.0.5.bb    |  3 +-
 2 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/udisks/udisks/0001-tools-Install-bash_completion-script-in-etc-bash_com.patch
meta-oe/recipes-support/udisks/udisks/0001-tools-Install-bash_completion-script-in-etc-bash_com.patch new file +33 -0
new file mode 100644
index 0000000000..16dc440674
@@ -0,0 +1,33 @@
+From 7863a72c723035529d6fd8d626d7fbf9a765f162 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 23 May 2019 21:49:57 -0700
+Subject: [PATCH] tools: Install bash_completion script in
+ /etc/bash_completion.d
+
+In OE this is one of common locations to install bash_completion files
+and its covered for packaging automatically when bash_completion class
+is inherited
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ tools/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/Makefile.am b/tools/Makefile.am
+index 0aaec11..839c961 100644
+--- a/tools/Makefile.am
++++ b/tools/Makefile.am
+@@ -72,7 +72,7 @@ udisks_tcp_bridge_LDADD = $(DBUS_GLIB_LIBS)
+ 
+ CLEANFILES = $(BUILT_SOURCES)
+ 
+-profiledir = $(sysconfdir)/profile.d
++profiledir = $(sysconfdir)/bash_completion.d
+ profile_SCRIPTS = udisks-bash-completion.sh
+ 
+ EXTRA_DIST = $(profile_SCRIPTS)
+-- 
+2.21.0
+
meta-oe/recipes-support/udisks/udisks_1.0.5.bb +2 -1
index 3ae8ecc15c..0373749f0f 100644
@@ -17,12 +17,13 @@ SRC_URI = "http://hal.freedesktop.org/releases/${BPN}-${PV}.tar.gz;name=${BPN} \
            file://udisks-1.0.5-fix-service-file.patch \
            file://0001-Make-udev-rules-directory-configurable.patch \
            file://0001-include-sys-sysmacros.h.patch \
+           file://0001-tools-Install-bash_completion-script-in-etc-bash_com.patch \
            "
 
 SRC_URI[udisks.md5sum] = "70d48dcfe523a74cd7c7fbbc2847fcdd"
 SRC_URI[udisks.sha256sum] = "f2ec82eb0ea7e01dc299b5b29b3c18cdf861236ec43dcff66b3552b4b31c6f71"
 
-inherit autotools-brokensep systemd gtk-doc distro_features_check
+inherit autotools-brokensep systemd gtk-doc distro_features_check bash-completion
 
 REQUIRED_DISTRO_FEATURES = "polkit"
 
Signature · 1 line
2.21.0
author
#1 lore raw

PATCH 2/2 udisks: Remove bash dependency

There are couple of scripts which explicitly calls out for bash interpreter but there is nothing bash specific about them, so let it use sh interpreter.

Fixes
ERROR: QA Issue: /usr/libexec/udisks-helper-mdadm-expand contained in package udisks requires /bin/bash, but no providers found in RDEPENDS_udisks? [file-rdeps]

---
 ...r-Use-sh-interpreter-instead-of-bash.patch | 38 +++++++++++++++++++
 .../recipes-support/udisks/udisks_1.0.5.bb    |  1 +
 2 files changed, 39 insertions(+)
 create mode 100644 meta-oe/recipes-support/udisks/udisks/0001-udisks-helper-Use-sh-interpreter-instead-of-bash.patch
meta-oe/recipes-support/udisks/udisks/0001-udisks-helper-Use-sh-interpreter-instead-of-bash.patch new file +38 -0
new file mode 100644
index 0000000000..ef7f6f9c32
@@ -0,0 +1,38 @@
+From 44953e5501e92c87611be45221338004e8032a74 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 23 May 2019 22:00:14 -0700
+Subject: [PATCH] udisks-helper: Use sh interpreter instead of bash
+
+These scripts do not require bash, since they do not use any bash
+specific extentions
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/helpers/udisks-helper-change-luks-password | 2 +-
+ src/helpers/udisks-helper-mdadm-expand         | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/helpers/udisks-helper-change-luks-password b/src/helpers/udisks-helper-change-luks-password
+index edcf6c9..c71fc72 100755
+--- a/src/helpers/udisks-helper-change-luks-password
++++ b/src/helpers/udisks-helper-change-luks-password
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/bin/env sh
+ set -e
+ 
+ DEVICE=$1
+diff --git a/src/helpers/udisks-helper-mdadm-expand b/src/helpers/udisks-helper-mdadm-expand
+index 8b4e23d..921f96a 100755
+--- a/src/helpers/udisks-helper-mdadm-expand
++++ b/src/helpers/udisks-helper-mdadm-expand
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/bin/env sh
+ 
+ set -e
+ 
+-- 
+2.21.0
+
meta-oe/recipes-support/udisks/udisks_1.0.5.bb +1 -0
index 0373749f0f..0918fedda5 100644
@@ -18,6 +18,7 @@ SRC_URI = "http://hal.freedesktop.org/releases/${BPN}-${PV}.tar.gz;name=${BPN} \
            file://0001-Make-udev-rules-directory-configurable.patch \
            file://0001-include-sys-sysmacros.h.patch \
            file://0001-tools-Install-bash_completion-script-in-etc-bash_com.patch \
+           file://0001-udisks-helper-Use-sh-interpreter-instead-of-bash.patch \
            "
 
 SRC_URI[udisks.md5sum] = "70d48dcfe523a74cd7c7fbbc2847fcdd"
Signature · 1 line
2.21.0