Patchwork [1/1] sudo: remove volatile configuration file

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date Aug. 21, 2014, 6:55 a.m.
Message ID <7f14cd53dd0190a96a4f4c3a7f1355f973405aa3.1408604060.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/78729/
State Accepted
Commit 2bdd29428326d0d35e8e839713761efc22aee0fb
Headers show

Comments

Qi.Chen@windriver.com - Aug. 21, 2014, 6:55 a.m.
The new version of sudo has fixed the problem and will create the
directory if it doesn't exist. So the configuration file is no longer
needed.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-extended/sudo/sudo_1.8.10p3.bb |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
Hongxu Jia - Aug. 21, 2014, 9:28 a.m.
We should remove volatiles.99_sudo file also.

//Hongxu

On 08/21/2014 02:55 PM, Chen Qi wrote:
> The new version of sudo has fixed the problem and will create the
> directory if it doesn't exist. So the configuration file is no longer
> needed.
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>   meta/recipes-extended/sudo/sudo_1.8.10p3.bb |    7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/meta/recipes-extended/sudo/sudo_1.8.10p3.bb b/meta/recipes-extended/sudo/sudo_1.8.10p3.bb
> index 46d4781..4c53032 100644
> --- a/meta/recipes-extended/sudo/sudo_1.8.10p3.bb
> +++ b/meta/recipes-extended/sudo/sudo_1.8.10p3.bb
> @@ -2,7 +2,7 @@ require sudo.inc
>   
>   SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \
>              ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
> -           file://volatiles.99_sudo"
> +          "
>   
>   PAM_SRC_URI = "file://sudo.pam"
>   
> @@ -22,9 +22,6 @@ do_install_append () {
>   	chmod 4111 ${D}${bindir}/sudo
>   	chmod 0440 ${D}${sysconfdir}/sudoers
>   
> -	# Explicitly remove the ${localstatedir}/run directory as we can
> -	# manage it by a configuration file under ${sysconfdir}/default/volatiles/
> +	# Explicitly remove the ${localstatedir}/run directory to avoid QA error
>   	rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo
> -	install -d ${D}/${sysconfdir}/default/volatiles
> -	install -m 644 ${WORKDIR}/volatiles.99_sudo ${D}/${sysconfdir}/default/volatiles/99_sudo
>   }

Patch

diff --git a/meta/recipes-extended/sudo/sudo_1.8.10p3.bb b/meta/recipes-extended/sudo/sudo_1.8.10p3.bb
index 46d4781..4c53032 100644
--- a/meta/recipes-extended/sudo/sudo_1.8.10p3.bb
+++ b/meta/recipes-extended/sudo/sudo_1.8.10p3.bb
@@ -2,7 +2,7 @@  require sudo.inc
 
 SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \
            ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
-           file://volatiles.99_sudo"
+          "
 
 PAM_SRC_URI = "file://sudo.pam"
 
@@ -22,9 +22,6 @@  do_install_append () {
 	chmod 4111 ${D}${bindir}/sudo
 	chmod 0440 ${D}${sysconfdir}/sudoers
 
-	# Explicitly remove the ${localstatedir}/run directory as we can
-	# manage it by a configuration file under ${sysconfdir}/default/volatiles/
+	# Explicitly remove the ${localstatedir}/run directory to avoid QA error
 	rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo
-	install -d ${D}/${sysconfdir}/default/volatiles
-	install -m 644 ${WORKDIR}/volatiles.99_sudo ${D}/${sysconfdir}/default/volatiles/99_sudo
 }