Skip to contentSkip to conversation

oe-swupd-helpers: convert scripts to posix shell

PATCH In review André Draszik 2 participants 4 messages Nov 21, 2016 – Dec 1, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 oe-swupd-helpers: convert scripts to posix shell

From: André Draszik <[email protected]>

These scripts don't do much and there's no reason for them to require bash as interpreter.

---
 recipes-core/swupd-client/oe-swupd-helpers/clr_pre_update.sh      | 2 +-
 recipes-core/swupd-client/oe-swupd-helpers/kernel_updater.sh      | 2 +-
 recipes-core/swupd-client/oe-swupd-helpers/systemdboot_updater.sh | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
recipes-core/swupd-client/oe-swupd-helpers/clr_pre_update.sh +1 -1
index 6302090..835948d 100755
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 set -u
 
 #######################################
recipes-core/swupd-client/oe-swupd-helpers/kernel_updater.sh +1 -1
index b0d5335..98e12c2 100755
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 #######################################
 # This script will be called after an updated kernel has been installed
recipes-core/swupd-client/oe-swupd-helpers/systemdboot_updater.sh +1 -1
index 470cd6e..19f025d 100755
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 #######################################
 # systemd bootloader installer
Signature · 1 line
2.10.2
#1 lore raw

PATCH 2/2 swupd-client: don't unconditionally depend on bash

From: André Draszik <[email protected]>

The swupd client itself does not depend on bash anymore since version 3.3.0. Any posix shell is fine. So let's move the runtime dependency to the appropriate place.

If some layer's oe-swupd-helpers.bbappend does introduce a bash dependency, it should just state that dependency itself.

As the shell now be provided by bash or busybox, also add an appropriate entry to SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS.

---
 conf/layer.conf                                | 1 +
 recipes-core/swupd-client/oe-swupd-helpers.bb  | 3 +--
 recipes-core/swupd-client/swupd-client_2.87.bb | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
conf/layer.conf +1 -0
index 2998949..50e7558 100644
@@ -13,4 +13,5 @@ LAYERVERSION_meta-swupd = "1"
 
 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "\
   oe-swupd-helpers->bash \
+  oe-swupd-helpers->busybox \
 "
recipes-core/swupd-client/oe-swupd-helpers.bb +1 -2
index 4690f21..9a5a8dd 100644
@@ -35,5 +35,4 @@ do_install () {
     done
 }
 
-RDEPENDS_${PN} += "bash"
-FILES_${PN} += "${systemd_system_unitdir}"
\ No newline at end of file
+FILES_${PN} += "${systemd_system_unitdir}"
recipes-core/swupd-client/swupd-client_2.87.bb +1 -1
index 96e7a10..09d09a4 100644
@@ -24,7 +24,7 @@ SRC_URI[md5sum] = "5d272c62edb8a9c576005ac5e1182ea3"
 SRC_URI[sha256sum] = "45df259a7dc2fed985ee9961e112120fc46670dd75476c3262fc6804b1c66fb8"
 
 DEPENDS = "glib-2.0 curl openssl libarchive"
-RDEPENDS_${PN}_append_class-target = " oe-swupd-helpers bsdtar"
+RDEPENDS_${PN}_append_class-target = " oe-swupd-helpers bash bsdtar"
 # We check /etc/os-release for the current OS version number
 RRECOMMENDS_${PN}_class-target = "os-release"
 
Signature · 1 line
2.10.2
#2 lore raw

Re: [meta-swupd][PATCH 2/2] swupd-client: don't unconditionally depend on bash

Quoted 10 lines · André Draszik

The swupd client itself does not depend on bash anymore since version 3.3.0. Any posix shell is fine. So let's move the runtime dependency to the appropriate place.

If some layer's oe-swupd-helpers.bbappend does introduce a bash dependency, it should just state that dependency itself.

As the shell now be provided by bash or busybox, also add an appropriate entry to SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS.

Makes sense, I'll submit soon.

Signature · 6 lines
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
#3 lore raw
In reply to André Draszik
Quoted 2 lines · André Draszik

These scripts don't do much and there's no reason for them to require bash as interpreter.

Makes sense, I'll submit soon.

Signature · 6 lines
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.