* [PATCH V1 1/2] base-files: move shells generating process to pkg_postinst
@ 2013-10-17 2:04 Ming Liu
2013-10-17 2:04 ` [PATCH V1 2/2] screen: add pkg_postinst to register entry to /etc/shells Ming Liu
2013-10-17 9:40 ` [PATCH V1 1/2] base-files: move shells generating process to pkg_postinst Martin Jansa
0 siblings, 2 replies; 4+ messages in thread
From: Ming Liu @ 2013-10-17 2:04 UTC (permalink / raw)
To: openembedded-core
The "shells" file lists several valid login shells, of which some might be
not present in a particular rootfs, this is unreasonable.
Fix it by moving "shells" file generating process to pkg_postinst, for other
shells must do the same thing to register themselves to this file.
Signed-off-by: Ming Liu <ming.liu@windriver.com>
---
meta/recipes-core/base-files/base-files/shells | 8 --------
meta/recipes-core/base-files/base-files_3.0.14.bb | 8 ++++++--
2 files changed, 6 insertions(+), 10 deletions(-)
delete mode 100644 meta/recipes-core/base-files/base-files/shells
diff --git a/meta/recipes-core/base-files/base-files/shells b/meta/recipes-core/base-files/base-files/shells
deleted file mode 100644
index ce39b3d..0000000
--- a/meta/recipes-core/base-files/base-files/shells
+++ /dev/null
@@ -1,8 +0,0 @@
-# /etc/shells: valid login shells
-/bin/sh
-/bin/ash
-/bin/bash
-/bin/dash
-/bin/ksh
-/usr/bin/ksh
-/usr/bin/screen
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index 054fefa..47c7ebe 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -16,7 +16,6 @@ SRC_URI = "file://rotation \
file://inputrc \
file://host.conf \
file://profile \
- file://shells \
file://fstab \
file://filesystems \
file://issue.net \
@@ -92,7 +91,6 @@ do_install () {
install -m 0644 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd
sed -i "s#ROOTHOME#${ROOT_HOME}#" ${WORKDIR}/profile
install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile
- install -m 0644 ${WORKDIR}/shells ${D}${sysconfdir}/shells
install -m 0755 ${WORKDIR}/share/dot.profile ${D}${sysconfdir}/skel/.profile
install -m 0755 ${WORKDIR}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc
install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc
@@ -137,6 +135,12 @@ do_install_append_linuxstdbase() {
done
}
+pkg_postinst_${PN} () {
+ touch $D${sysconfdir}/shells
+ grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
+}
+
+
PACKAGES = "${PN}-doc ${PN} ${PN}-dev ${PN}-dbg"
FILES_${PN} = "/"
FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses"
--
1.8.3.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH V1 2/2] screen: add pkg_postinst to register entry to /etc/shells
2013-10-17 2:04 [PATCH V1 1/2] base-files: move shells generating process to pkg_postinst Ming Liu
@ 2013-10-17 2:04 ` Ming Liu
2013-10-17 9:40 ` [PATCH V1 1/2] base-files: move shells generating process to pkg_postinst Martin Jansa
1 sibling, 0 replies; 4+ messages in thread
From: Ming Liu @ 2013-10-17 2:04 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Ming Liu <ming.liu@windriver.com>
---
meta/recipes-extended/screen/screen_4.0.3.bb | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta/recipes-extended/screen/screen_4.0.3.bb b/meta/recipes-extended/screen/screen_4.0.3.bb
index 1a7eb20..81e418b 100644
--- a/meta/recipes-extended/screen/screen_4.0.3.bb
+++ b/meta/recipes-extended/screen/screen_4.0.3.bb
@@ -41,3 +41,8 @@ do_install_append () {
fi
done
}
+
+pkg_postinst_${PN} () {
+ touch $D${sysconfdir}/shells
+ grep -q "${bindir}/screen" $D${sysconfdir}/shells || echo ${bindir}/screen >> $D${sysconfdir}/shells
+}
--
1.8.3.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH V1 1/2] base-files: move shells generating process to pkg_postinst
2013-10-17 2:04 [PATCH V1 1/2] base-files: move shells generating process to pkg_postinst Ming Liu
2013-10-17 2:04 ` [PATCH V1 2/2] screen: add pkg_postinst to register entry to /etc/shells Ming Liu
@ 2013-10-17 9:40 ` Martin Jansa
2013-10-17 9:51 ` Ming Liu
1 sibling, 1 reply; 4+ messages in thread
From: Martin Jansa @ 2013-10-17 9:40 UTC (permalink / raw)
To: Ming Liu; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2928 bytes --]
On Thu, Oct 17, 2013 at 10:04:05AM +0800, Ming Liu wrote:
> The "shells" file lists several valid login shells, of which some might be
> not present in a particular rootfs, this is unreasonable.
>
> Fix it by moving "shells" file generating process to pkg_postinst, for other
> shells must do the same thing to register themselves to this file.
>
> Signed-off-by: Ming Liu <ming.liu@windriver.com>
> ---
> meta/recipes-core/base-files/base-files/shells | 8 --------
> meta/recipes-core/base-files/base-files_3.0.14.bb | 8 ++++++--
> 2 files changed, 6 insertions(+), 10 deletions(-)
> delete mode 100644 meta/recipes-core/base-files/base-files/shells
>
> diff --git a/meta/recipes-core/base-files/base-files/shells b/meta/recipes-core/base-files/base-files/shells
> deleted file mode 100644
> index ce39b3d..0000000
> --- a/meta/recipes-core/base-files/base-files/shells
> +++ /dev/null
> @@ -1,8 +0,0 @@
> -# /etc/shells: valid login shells
> -/bin/sh
> -/bin/ash
> -/bin/bash
> -/bin/dash
> -/bin/ksh
> -/usr/bin/ksh
> -/usr/bin/screen
> diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
> index 054fefa..47c7ebe 100644
> --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> @@ -16,7 +16,6 @@ SRC_URI = "file://rotation \
> file://inputrc \
> file://host.conf \
> file://profile \
> - file://shells \
> file://fstab \
> file://filesystems \
> file://issue.net \
> @@ -92,7 +91,6 @@ do_install () {
> install -m 0644 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd
> sed -i "s#ROOTHOME#${ROOT_HOME}#" ${WORKDIR}/profile
> install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile
> - install -m 0644 ${WORKDIR}/shells ${D}${sysconfdir}/shells
> install -m 0755 ${WORKDIR}/share/dot.profile ${D}${sysconfdir}/skel/.profile
> install -m 0755 ${WORKDIR}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc
> install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc
> @@ -137,6 +135,12 @@ do_install_append_linuxstdbase() {
> done
> }
>
> +pkg_postinst_${PN} () {
> + touch $D${sysconfdir}/shells
> + grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
What it someone installs component providing /usr/bin/shell? Use at
least ^/bin/sh$ in grep.
> +}
> +
> +
> PACKAGES = "${PN}-doc ${PN} ${PN}-dev ${PN}-dbg"
> FILES_${PN} = "/"
> FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses"
> --
> 1.8.3.3
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V1 1/2] base-files: move shells generating process to pkg_postinst
2013-10-17 9:40 ` [PATCH V1 1/2] base-files: move shells generating process to pkg_postinst Martin Jansa
@ 2013-10-17 9:51 ` Ming Liu
0 siblings, 0 replies; 4+ messages in thread
From: Ming Liu @ 2013-10-17 9:51 UTC (permalink / raw)
To: Martin Jansa; +Cc: openembedded-core
On 10/17/2013 05:40 PM, Martin Jansa wrote:
> On Thu, Oct 17, 2013 at 10:04:05AM +0800, Ming Liu wrote:
>> The "shells" file lists several valid login shells, of which some might be
>> not present in a particular rootfs, this is unreasonable.
>>
>> Fix it by moving "shells" file generating process to pkg_postinst, for other
>> shells must do the same thing to register themselves to this file.
>>
>> Signed-off-by: Ming Liu <ming.liu@windriver.com>
>> ---
>> meta/recipes-core/base-files/base-files/shells | 8 --------
>> meta/recipes-core/base-files/base-files_3.0.14.bb | 8 ++++++--
>> 2 files changed, 6 insertions(+), 10 deletions(-)
>> delete mode 100644 meta/recipes-core/base-files/base-files/shells
>>
>> diff --git a/meta/recipes-core/base-files/base-files/shells b/meta/recipes-core/base-files/base-files/shells
>> deleted file mode 100644
>> index ce39b3d..0000000
>> --- a/meta/recipes-core/base-files/base-files/shells
>> +++ /dev/null
>> @@ -1,8 +0,0 @@
>> -# /etc/shells: valid login shells
>> -/bin/sh
>> -/bin/ash
>> -/bin/bash
>> -/bin/dash
>> -/bin/ksh
>> -/usr/bin/ksh
>> -/usr/bin/screen
>> diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
>> index 054fefa..47c7ebe 100644
>> --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
>> +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
>> @@ -16,7 +16,6 @@ SRC_URI = "file://rotation \
>> file://inputrc \
>> file://host.conf \
>> file://profile \
>> - file://shells \
>> file://fstab \
>> file://filesystems \
>> file://issue.net \
>> @@ -92,7 +91,6 @@ do_install () {
>> install -m 0644 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd
>> sed -i "s#ROOTHOME#${ROOT_HOME}#" ${WORKDIR}/profile
>> install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile
>> - install -m 0644 ${WORKDIR}/shells ${D}${sysconfdir}/shells
>> install -m 0755 ${WORKDIR}/share/dot.profile ${D}${sysconfdir}/skel/.profile
>> install -m 0755 ${WORKDIR}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc
>> install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc
>> @@ -137,6 +135,12 @@ do_install_append_linuxstdbase() {
>> done
>> }
>>
>> +pkg_postinst_${PN} () {
>> + touch $D${sysconfdir}/shells
>> + grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
> What it someone installs component providing /usr/bin/shell? Use at
> least ^/bin/sh$ in grep.
OK, better to be precise. I will send V2.
the best,
thank you
>
>> +}
>> +
>> +
>> PACKAGES = "${PN}-doc ${PN} ${PN}-dev ${PN}-dbg"
>> FILES_${PN} = "/"
>> FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses"
>> --
>> 1.8.3.3
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-17 9:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-17 2:04 [PATCH V1 1/2] base-files: move shells generating process to pkg_postinst Ming Liu
2013-10-17 2:04 ` [PATCH V1 2/2] screen: add pkg_postinst to register entry to /etc/shells Ming Liu
2013-10-17 9:40 ` [PATCH V1 1/2] base-files: move shells generating process to pkg_postinst Martin Jansa
2013-10-17 9:51 ` Ming Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox