]> code.ossystems Code Review - openembedded-core.git/commitdiff
meta: Use double colon for chown OWNER:GROUP
authorKosta Zertsekel <zertsekel@gmail.com>
Sun, 4 Nov 2018 19:24:46 +0000 (21:24 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 24 Nov 2018 21:45:48 +0000 (21:45 +0000)
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>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/recipes-core/images/build-appliance-image_15.0.0.bb
meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb

index 1e78f4f9c1c88a2e77309eb2af9b8eeb8af55703..6cb679a6e9428cae593aad6cb8fefc94233bd370 100644 (file)
@@ -77,7 +77,7 @@ fakeroot do_populate_poky_src () {
        echo "# export ALL_PROXY=https://proxy.example.com:8080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
        echo "# export ALL_PROXY=socks://socks.example.com:1080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
 
-       chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/poky
+       chown -R builder:builder ${IMAGE_ROOTFS}/home/builder/poky
        chmod -R ug+rw ${IMAGE_ROOTFS}/home/builder/poky
 
        # Assume we will need CDROM to install guest additions
@@ -105,8 +105,8 @@ fakeroot do_populate_poky_src () {
           pip3_install_params="${pip3_install_params} --proxy ${http_proxy}"
        fi
        pip3 install ${pip3_install_params}
-       chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/.local
-       chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/.cache
+       chown -R builder:builder ${IMAGE_ROOTFS}/home/builder/.local
+       chown -R builder:builder ${IMAGE_ROOTFS}/home/builder/.cache
 }
 
 IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; "
index 35316ec2baaa70a8809a48d21542d5b1b91207cb..3cf3243cf03616d0dbc07c5acdd19b65f9f64d92 100755 (executable)
@@ -37,7 +37,7 @@ create_file() {
        }
        EXEC="
        ${EXEC}
-       chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
+       chown ${TUSER}:${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
        chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "
 
        test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
@@ -60,7 +60,7 @@ create_file() {
 mk_dir() {
        EXEC="
        mkdir -p \"$1\";
-       chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
+       chown ${TUSER}:${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
        chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "
 
        test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
index ad65819b2de03fb0e6ca5076455ebda93301e4bc..89b1b69d370d4108288c4b9edfb327ccc596d255 100644 (file)
@@ -104,6 +104,6 @@ do_install () {
        install -d ${D}${sysconfdir}/default/volatiles
        install -m 0644 ${WORKDIR}/01_bootlogd ${D}${sysconfdir}/default/volatiles
 
-       chown root.shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
+       chown root:shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
        chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
 }