summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKosta Zertsekel <zertsekel@gmail.com>2018-11-04 21:24:46 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-07 23:08:55 +0000
commit92027161b5a4cb22e8f3f7fb5bd1bdd1babd2cfc (patch)
tree0b1b43383c27544743b8aaf2453d5cbf787cf759
parentff842fe7771e399498264e14fa04a1d7935322a3 (diff)
downloadpoky-92027161b5a4cb22e8f3f7fb5bd1bdd1babd2cfc.tar.gz
meta: Use double colon for chown OWNER:GROUP
Rationale - excerp from `info chown` ==================================== OWNER‘:’GROUP If the OWNER is followed by a colon and a GROUP (a group name or numeric group ID), with no spaces between them, the group ownership of the files is changed as well (to GROUP). Some older scripts may still use ‘.’ in place of the ‘:’ separator. POSIX 1003.1-2001 (*note Standards conformance::) does not require support for that, but for backward compatibility GNU ‘chown’ supports ‘.’ so long as no ambiguity results. New scripts should avoid the use of ‘.’ because it is not portable, and because it has undesirable results if the entire OWNER‘.’GROUP happens to identify a user whose name contains ‘.’. (From OE-Core rev: 185918234a07cb506d7d7464a49ac33972c7d963) Signed-off-by: Kosta Zertsekel <zertsekel@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/images/build-appliance-image_15.0.0.bb6
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh4
-rw-r--r--meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb2
3 files changed, 6 insertions, 6 deletions
diff --git a/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
index 6abab60d7f..f03ef969ad 100644
--- a/meta/recipes-core/images/build-appliance-image_15.0.0.bb
+++ b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
@@ -79,7 +79,7 @@ fakeroot do_populate_poky_src () {
79 echo "# export ALL_PROXY=https://proxy.example.com:8080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc 79 echo "# export ALL_PROXY=https://proxy.example.com:8080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
80 echo "# export ALL_PROXY=socks://socks.example.com:1080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc 80 echo "# export ALL_PROXY=socks://socks.example.com:1080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
81 81
82 chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/poky 82 chown -R builder:builder ${IMAGE_ROOTFS}/home/builder/poky
83 chmod -R ug+rw ${IMAGE_ROOTFS}/home/builder/poky 83 chmod -R ug+rw ${IMAGE_ROOTFS}/home/builder/poky
84 84
85 # Assume we will need CDROM to install guest additions 85 # Assume we will need CDROM to install guest additions
@@ -107,8 +107,8 @@ fakeroot do_populate_poky_src () {
107 pip3_install_params="${pip3_install_params} --proxy ${http_proxy}" 107 pip3_install_params="${pip3_install_params} --proxy ${http_proxy}"
108 fi 108 fi
109 pip3 install ${pip3_install_params} 109 pip3 install ${pip3_install_params}
110 chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/.local 110 chown -R builder:builder ${IMAGE_ROOTFS}/home/builder/.local
111 chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/.cache 111 chown -R builder:builder ${IMAGE_ROOTFS}/home/builder/.cache
112} 112}
113 113
114IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; " 114IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; "
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
index 824f8f3a6b..6f965a6870 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
@@ -37,7 +37,7 @@ create_file() {
37 } 37 }
38 EXEC=" 38 EXEC="
39 ${EXEC} 39 ${EXEC}
40 chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1; 40 chown ${TUSER}:${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
41 chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 " 41 chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "
42 42
43 test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build 43 test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
@@ -60,7 +60,7 @@ create_file() {
60mk_dir() { 60mk_dir() {
61 EXEC=" 61 EXEC="
62 mkdir -p \"$1\"; 62 mkdir -p \"$1\";
63 chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1; 63 chown ${TUSER}:${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
64 chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 " 64 chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "
65 65
66 test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build 66 test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
index a21e7e46f7..bfc1283f73 100644
--- a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
@@ -105,6 +105,6 @@ do_install () {
105 install -d ${D}${sysconfdir}/default/volatiles 105 install -d ${D}${sysconfdir}/default/volatiles
106 install -m 0644 ${WORKDIR}/01_bootlogd ${D}${sysconfdir}/default/volatiles 106 install -m 0644 ${WORKDIR}/01_bootlogd ${D}${sysconfdir}/default/volatiles
107 107
108 chown root.shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown 108 chown root:shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
109 chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown 109 chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
110} 110}