All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] scripts/runqemu: Fix memory limits for qemux86-64
@ 2022-03-14 17:57 Richard Purdie
  2022-03-14 17:57 ` [PATCH 2/2] shadow-native: Simplify and fix syslog disable patch Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2022-03-14 17:57 UTC (permalink / raw)
  To: openembedded-core

When setting memory to 4GB, qemu is only running with 2GB for x86_64.
Avoid this by removing the mem= option to the kernel and letting the
qemu configuration handle it for x86 in a similar way to mips.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 scripts/runqemu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 9ddd47267c9..2f77a7bd0f2 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -814,7 +814,7 @@ class BaseConfig(object):
         self.set('QB_MEM', qb_mem)
 
         mach = self.get('MACHINE')
-        if not mach.startswith('qemumips'):
+        if not mach.startswith(('qemumips', 'qemux86')):
             self.kernel_cmdline_script += ' mem=%s' % self.get('QB_MEM').replace('-m','').strip() + 'M'
 
         self.qemu_opt_script += ' %s' % self.get('QB_MEM')
-- 
2.32.0



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

* [PATCH 2/2] shadow-native: Simplify and fix syslog disable patch
  2022-03-14 17:57 [PATCH 1/2] scripts/runqemu: Fix memory limits for qemux86-64 Richard Purdie
@ 2022-03-14 17:57 ` Richard Purdie
  2022-03-14 19:10   ` [OE-core] " Peter Kjellerstedt
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2022-03-14 17:57 UTC (permalink / raw)
  To: openembedded-core

Shadow is happily spamming the host syslog with messages and shouldn't be
which suggests the patch isn't working. Redo it to work at the configure
level which is simpler and hopefully more effective.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 ...01-Disable-use-of-syslog-for-sysroot.patch | 122 ++----------------
 1 file changed, 13 insertions(+), 109 deletions(-)

diff --git a/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch b/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
index 4d6f6d68ec2..23640824f14 100644
--- a/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
+++ b/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
@@ -13,112 +13,16 @@ Signed-off-by: Scott Garman <scott.a.garman@intel.com>
 Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
 Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
 
----
- src/groupadd.c  | 3 +++
- src/groupdel.c  | 3 +++
- src/groupmems.c | 3 +++
- src/groupmod.c  | 3 +++
- src/useradd.c   | 3 +++
- src/userdel.c   | 4 ++++
- src/usermod.c   | 3 +++
- 7 files changed, 22 insertions(+)
-
-diff --git a/src/groupadd.c b/src/groupadd.c
-index 66ccb53..776ea51 100644
---- a/src/groupadd.c
-+++ b/src/groupadd.c
-@@ -11,6 +11,9 @@
- 
- #ident "$Id$"
- 
-+/* Disable use of syslog since we're running this command against a sysroot */
-+#undef USE_SYSLOG
-+
- #include <ctype.h>
- #include <fcntl.h>
- #include <getopt.h>
-diff --git a/src/groupdel.c b/src/groupdel.c
-index c84faa7..1076f4b 100644
---- a/src/groupdel.c
-+++ b/src/groupdel.c
-@@ -11,6 +11,9 @@
- 
- #ident "$Id$"
- 
-+/* Disable use of syslog since we're running this command against a sysroot */
-+#undef USE_SYSLOG
-+
- #include <ctype.h>
- #include <fcntl.h>
- #include <grp.h>
-diff --git a/src/groupmems.c b/src/groupmems.c
-index a0e3266..6540cb1 100644
---- a/src/groupmems.c
-+++ b/src/groupmems.c
-@@ -9,6 +9,9 @@
- 
- #include <config.h>
- 
-+/* Disable use of syslog since we're running this command against a sysroot */
-+#undef USE_SYSLOG
-+
- #include <fcntl.h>
- #include <getopt.h>
- #include <grp.h>
-diff --git a/src/groupmod.c b/src/groupmod.c
-index 006eca1..78b1ad6 100644
---- a/src/groupmod.c
-+++ b/src/groupmod.c
-@@ -11,6 +11,9 @@
- 
- #ident "$Id$"
- 
-+/* Disable use of syslog since we're running this command against a sysroot */
-+#undef USE_SYSLOG
-+
- #include <ctype.h>
- #include <fcntl.h>
- #include <getopt.h>
-diff --git a/src/useradd.c b/src/useradd.c
-index 456b9de..2b0d703 100644
---- a/src/useradd.c
-+++ b/src/useradd.c
-@@ -11,6 +11,9 @@
- 
- #ident "$Id$"
- 
-+/* Disable use of syslog since we're running this command against a sysroot */
-+#undef USE_SYSLOG
-+
- #include <assert.h>
- #include <ctype.h>
- #include <errno.h>
-diff --git a/src/userdel.c b/src/userdel.c
-index 7012b0e..08bb5d1 100644
---- a/src/userdel.c
-+++ b/src/userdel.c
-@@ -8,6 +8,10 @@
-  */
- 
- #include <config.h>
-+
-+/* Disable use of syslog since we're running this command against a sysroot */
-+#undef USE_SYSLOG
-+
- #include <assert.h>
- #include <dirent.h>
- #include <errno.h>
-diff --git a/src/usermod.c b/src/usermod.c
-index 9473a7d..7d4f7b5 100644
---- a/src/usermod.c
-+++ b/src/usermod.c
-@@ -11,6 +11,9 @@
- 
- #ident "$Id$"
- 
-+/* Disable use of syslog since we're running this command against a sysroot */
-+#undef USE_SYSLOG
-+
- #include <assert.h>
- #include <ctype.h>
- #include <errno.h>
+Index: shadow-4.11.1/configure.ac
+===================================================================
+--- shadow-4.11.1.orig/configure.ac
++++ shadow-4.11.1/configure.ac
+@@ -204,7 +204,7 @@ AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$sha
+ 	[Path to passwd program.])
+ 
+ dnl XXX - quick hack, should disappear before anyone notices :).
+-AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().])
++AC_DEFINE(USE_SYSLOG, 0, [Define to use syslog().])
+ if test "$ac_cv_func_ruserok" = "yes"; then
+ 	AC_DEFINE(RLOGIN, 1, [Define if login should support the -r flag for rlogind.])
+ 	AC_DEFINE(RUSEROK, 0, [Define to the ruserok() "success" return value (0 or 1).])
-- 
2.32.0



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

* RE: [OE-core] [PATCH 2/2] shadow-native: Simplify and fix syslog disable patch
  2022-03-14 17:57 ` [PATCH 2/2] shadow-native: Simplify and fix syslog disable patch Richard Purdie
@ 2022-03-14 19:10   ` Peter Kjellerstedt
  2022-03-14 23:00     ` Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Kjellerstedt @ 2022-03-14 19:10 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Richard Purdie
> Sent: den 14 mars 2022 18:58
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 2/2] shadow-native: Simplify and fix syslog disable patch
> 
> Shadow is happily spamming the host syslog with messages and shouldn't be
> which suggests the patch isn't working. Redo it to work at the configure
> level which is simpler and hopefully more effective.
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  ...01-Disable-use-of-syslog-for-sysroot.patch | 122 ++----------------
>  1 file changed, 13 insertions(+), 109 deletions(-)
> 
> diff --git a/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch b/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
> index 4d6f6d68ec2..23640824f14 100644
> --- a/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
> +++ b/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
> @@ -13,112 +13,16 @@ Signed-off-by: Scott Garman <scott.a.garman@intel.com>
>  Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
>  Signed-off-by: Chen Qi <Qi.Chen@windriver.com>

Since this is a completely new patch you should replace the 
Signed-off-by's above as they obviously no longer apply.

> 
> ----
> - src/groupadd.c  | 3 +++
> - src/groupdel.c  | 3 +++
> - src/groupmems.c | 3 +++
> - src/groupmod.c  | 3 +++
> - src/useradd.c   | 3 +++
> - src/userdel.c   | 4 ++++
> - src/usermod.c   | 3 +++
> - 7 files changed, 22 insertions(+)
> -
> -diff --git a/src/groupadd.c b/src/groupadd.c
> -index 66ccb53..776ea51 100644
> ---- a/src/groupadd.c
> -+++ b/src/groupadd.c
> -@@ -11,6 +11,9 @@
> -
> - #ident "$Id$"
> -
> -+/* Disable use of syslog since we're running this command against a sysroot */
> -+#undef USE_SYSLOG
> -+
> - #include <ctype.h>
> - #include <fcntl.h>
> - #include <getopt.h>
> -diff --git a/src/groupdel.c b/src/groupdel.c
> -index c84faa7..1076f4b 100644
> ---- a/src/groupdel.c
> -+++ b/src/groupdel.c
> -@@ -11,6 +11,9 @@
> -
> - #ident "$Id$"
> -
> -+/* Disable use of syslog since we're running this command against a sysroot */
> -+#undef USE_SYSLOG
> -+
> - #include <ctype.h>
> - #include <fcntl.h>
> - #include <grp.h>
> -diff --git a/src/groupmems.c b/src/groupmems.c
> -index a0e3266..6540cb1 100644
> ---- a/src/groupmems.c
> -+++ b/src/groupmems.c
> -@@ -9,6 +9,9 @@
> -
> - #include <config.h>
> -
> -+/* Disable use of syslog since we're running this command against a sysroot */
> -+#undef USE_SYSLOG
> -+
> - #include <fcntl.h>
> - #include <getopt.h>
> - #include <grp.h>
> -diff --git a/src/groupmod.c b/src/groupmod.c
> -index 006eca1..78b1ad6 100644
> ---- a/src/groupmod.c
> -+++ b/src/groupmod.c
> -@@ -11,6 +11,9 @@
> -
> - #ident "$Id$"
> -
> -+/* Disable use of syslog since we're running this command against a sysroot */
> -+#undef USE_SYSLOG
> -+
> - #include <ctype.h>
> - #include <fcntl.h>
> - #include <getopt.h>
> -diff --git a/src/useradd.c b/src/useradd.c
> -index 456b9de..2b0d703 100644
> ---- a/src/useradd.c
> -+++ b/src/useradd.c
> -@@ -11,6 +11,9 @@
> -
> - #ident "$Id$"
> -
> -+/* Disable use of syslog since we're running this command against a sysroot */
> -+#undef USE_SYSLOG
> -+
> - #include <assert.h>
> - #include <ctype.h>
> - #include <errno.h>
> -diff --git a/src/userdel.c b/src/userdel.c
> -index 7012b0e..08bb5d1 100644
> ---- a/src/userdel.c
> -+++ b/src/userdel.c
> -@@ -8,6 +8,10 @@
> -  */
> -
> - #include <config.h>
> -+
> -+/* Disable use of syslog since we're running this command against a sysroot */
> -+#undef USE_SYSLOG
> -+
> - #include <assert.h>
> - #include <dirent.h>
> - #include <errno.h>
> -diff --git a/src/usermod.c b/src/usermod.c
> -index 9473a7d..7d4f7b5 100644
> ---- a/src/usermod.c
> -+++ b/src/usermod.c
> -@@ -11,6 +11,9 @@
> -
> - #ident "$Id$"
> -
> -+/* Disable use of syslog since we're running this command against a sysroot */
> -+#undef USE_SYSLOG
> -+
> - #include <assert.h>
> - #include <ctype.h>
> - #include <errno.h>
> +Index: shadow-4.11.1/configure.ac
> +===================================================================
> +--- shadow-4.11.1.orig/configure.ac
> ++++ shadow-4.11.1/configure.ac
> +@@ -204,7 +204,7 @@ AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$sha
> + 	[Path to passwd program.])
> +
> + dnl XXX - quick hack, should disappear before anyone notices :).
> +-AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().])
> ++AC_DEFINE(USE_SYSLOG, 0, [Define to use syslog().])
> + if test "$ac_cv_func_ruserok" = "yes"; then
> + 	AC_DEFINE(RLOGIN, 1, [Define if login should support the -r flag for rlogind.])
> + 	AC_DEFINE(RUSEROK, 0, [Define to the ruserok() "success" return value (0 or 1).])
> --
> 2.32.0

//Peter



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

* Re: [OE-core] [PATCH 2/2] shadow-native: Simplify and fix syslog disable patch
  2022-03-14 19:10   ` [OE-core] " Peter Kjellerstedt
@ 2022-03-14 23:00     ` Richard Purdie
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2022-03-14 23:00 UTC (permalink / raw)
  To: Peter Kjellerstedt, openembedded-core

On Mon, 2022-03-14 at 19:10 +0000, Peter Kjellerstedt wrote:
> > -----Original Message-----
> > From: openembedded-core@lists.openembedded.org
> > <openembedded-core@lists.openembedded.org> On Behalf Of Richard Purdie
> > Sent: den 14 mars 2022 18:58
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [PATCH 2/2] shadow-native: Simplify and fix syslog
> > disable patch
> > 
> > Shadow is happily spamming the host syslog with messages and shouldn't be
> > which suggests the patch isn't working. Redo it to work at the configure
> > level which is simpler and hopefully more effective.
> > 
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > ---
> >  ...01-Disable-use-of-syslog-for-sysroot.patch | 122 ++----------------
> >  1 file changed, 13 insertions(+), 109 deletions(-)
> > 
> > diff --git a/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-
> > for-sysroot.patch b/meta/recipes-extended/shadow/files/0001-Disable-use-of-
> > syslog-for-sysroot.patch
> > index 4d6f6d68ec2..23640824f14 100644
> > --- a/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-
> > sysroot.patch
> > +++ b/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-
> > sysroot.patch
> > @@ -13,112 +13,16 @@ Signed-off-by: Scott Garman <scott.a.garman@intel.com>
> >  Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> >  Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> 
> Since this is a completely new patch you should replace the 
> Signed-off-by's above as they obviously no longer apply.

I've removed them on the branch.

Cheers,

Richard


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

end of thread, other threads:[~2022-03-14 23:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-14 17:57 [PATCH 1/2] scripts/runqemu: Fix memory limits for qemux86-64 Richard Purdie
2022-03-14 17:57 ` [PATCH 2/2] shadow-native: Simplify and fix syslog disable patch Richard Purdie
2022-03-14 19:10   ` [OE-core] " Peter Kjellerstedt
2022-03-14 23:00     ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.