Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] Check if /etc/fstab exists
@ 2017-04-27 16:56 Panagiotis Tamtamis
  2017-04-27 17:31 ` ✗ patchtest: failure for " Patchwork
  2017-04-27 18:55 ` [PATCH] " Andre McCurdy
  0 siblings, 2 replies; 4+ messages in thread
From: Panagiotis Tamtamis @ 2017-04-27 16:56 UTC (permalink / raw)
  To: openembedded-core

Using "read-only-rootfs" feature in minimal or special
purpose images (eg mounted images) makes build to fail
because ${IMAGE_ROOTFS}/etc/fstab file does not exist.

Signed-off-by: Panagiotis Tamtamis <panagiotis.tamtamis@unify.com>
---
 meta/classes/rootfs-postcommands.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index 0c7ceea..4709369 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -64,7 +64,8 @@ systemd_create_users () {
 #
 read_only_rootfs_hook () {
 	# Tweak the mount option and fs_passno for rootfs in fstab
-	sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab
+	if [ -f ${IMAGE_ROOTFS}/etc/fstab ]; then
+		sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab
 
 	# If we're using openssh and the /etc/ssh directory has no pre-generated keys,
 	# we should configure openssh to use the configuration file /etc/ssh/sshd_config_readonly
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* ✗ patchtest: failure for Check if /etc/fstab exists
  2017-04-27 16:56 [PATCH] Check if /etc/fstab exists Panagiotis Tamtamis
@ 2017-04-27 17:31 ` Patchwork
  2017-04-27 18:55 ` [PATCH] " Andre McCurdy
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-04-27 17:31 UTC (permalink / raw)
  To: Panagiotis Tamtamis; +Cc: openembedded-core

== Series Details ==

Series: Check if /etc/fstab exists
Revision: 1
URL   : https://patchwork.openembedded.org/series/6541/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Patch            Check if /etc/fstab exists
 Issue             Shortlog does not follow expected format [test_shortlog_format] 
  Suggested fix    Commit shortlog (first line of commit message) should follow the format "<target>: <summary>"



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Check if /etc/fstab exists
  2017-04-27 16:56 [PATCH] Check if /etc/fstab exists Panagiotis Tamtamis
  2017-04-27 17:31 ` ✗ patchtest: failure for " Patchwork
@ 2017-04-27 18:55 ` Andre McCurdy
  2017-04-28  9:32   ` Tamtamis, Panagiotis
  1 sibling, 1 reply; 4+ messages in thread
From: Andre McCurdy @ 2017-04-27 18:55 UTC (permalink / raw)
  To: Panagiotis Tamtamis; +Cc: OE Core mailing list

On Thu, Apr 27, 2017 at 9:56 AM, Panagiotis Tamtamis
<panagiotis.tamtamis@unify.com> wrote:
> Using "read-only-rootfs" feature in minimal or special
> purpose images (eg mounted images) makes build to fail
> because ${IMAGE_ROOTFS}/etc/fstab file does not exist.
>
> Signed-off-by: Panagiotis Tamtamis <panagiotis.tamtamis@unify.com>
> ---
>  meta/classes/rootfs-postcommands.bbclass | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
> index 0c7ceea..4709369 100644
> --- a/meta/classes/rootfs-postcommands.bbclass
> +++ b/meta/classes/rootfs-postcommands.bbclass
> @@ -64,7 +64,8 @@ systemd_create_users () {
>  #
>  read_only_rootfs_hook () {
>         # Tweak the mount option and fs_passno for rootfs in fstab
> -       sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab
> +       if [ -f ${IMAGE_ROOTFS}/etc/fstab ]; then
> +               sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab

Missing "fi" ?

>
>         # If we're using openssh and the /etc/ssh directory has no pre-generated keys,
>         # we should configure openssh to use the configuration file /etc/ssh/sshd_config_readonly
> --
> 1.9.1
>
> --
> _______________________________________________
> 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

* Re: [PATCH] Check if /etc/fstab exists
  2017-04-27 18:55 ` [PATCH] " Andre McCurdy
@ 2017-04-28  9:32   ` Tamtamis, Panagiotis
  0 siblings, 0 replies; 4+ messages in thread
From: Tamtamis, Panagiotis @ 2017-04-28  9:32 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: OE Core mailing list

> -----Original Message-----
> From: Andre McCurdy [mailto:armccurdy@gmail.com]
> Sent: Thursday, April 27, 2017 9:56 PM
> To: Tamtamis, Panagiotis
> Cc: OE Core mailing list
> Subject: Re: [OE-core] [PATCH] Check if /etc/fstab exists
> 
> On Thu, Apr 27, 2017 at 9:56 AM, Panagiotis Tamtamis
> <panagiotis.tamtamis@unify.com> wrote:
> > Using "read-only-rootfs" feature in minimal or special purpose images
> > (eg mounted images) makes build to fail because
> > ${IMAGE_ROOTFS}/etc/fstab file does not exist.
> >
> > Signed-off-by: Panagiotis Tamtamis <panagiotis.tamtamis@unify.com>
> > ---
> >  meta/classes/rootfs-postcommands.bbclass | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/rootfs-postcommands.bbclass
> > b/meta/classes/rootfs-postcommands.bbclass
> > index 0c7ceea..4709369 100644
> > --- a/meta/classes/rootfs-postcommands.bbclass
> > +++ b/meta/classes/rootfs-postcommands.bbclass
> > @@ -64,7 +64,8 @@ systemd_create_users () {  #  read_only_rootfs_hook
> > () {
> >         # Tweak the mount option and fs_passno for rootfs in fstab
> > -       sed -i -e
> '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:sp
> ace:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab
> > +       if [ -f ${IMAGE_ROOTFS}/etc/fstab ]; then
> > +               sed -i -e
> > + '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit
> > + :]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab
> 
> Missing "fi" ?

Thanks, fix with:
http://lists.openembedded.org/pipermail/openembedded-core/2017-April/136171.html
First patch had also wrong shortlog.

> 
> >
> >         # If we're using openssh and the /etc/ssh directory has no pre-
> generated keys,
> >         # we should configure openssh to use the configuration file
> > /etc/ssh/sshd_config_readonly
> > --
> > 1.9.1
> >
> > --
> > _______________________________________________
> > 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:[~2017-04-28  9:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-27 16:56 [PATCH] Check if /etc/fstab exists Panagiotis Tamtamis
2017-04-27 17:31 ` ✗ patchtest: failure for " Patchwork
2017-04-27 18:55 ` [PATCH] " Andre McCurdy
2017-04-28  9:32   ` Tamtamis, Panagiotis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox