Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] Use ALTERNATIVES to manage 'nologin'
@ 2014-11-14  8:35 Chen Qi
  2014-11-14  8:35 ` [PATCH 1/2] util-linux: use ALTERNATIVE mechanism " Chen Qi
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chen Qi @ 2014-11-14  8:35 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit e7b731a1a358e0007dba1038ad504888bec5916e:

  docbook-xsl-stylesheets: fix do_configure typo (2014-11-12 15:36:14 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib ChenQi/alternatives-nologin
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/alternatives-nologin

Chen Qi (2):
  util-linux: use ALTERNATIVE mechanism to manage 'nologin'
  shadow: use ALTERNATIVE to manage 'nologin'

 meta/recipes-core/util-linux/util-linux.inc | 3 ++-
 meta/recipes-extended/shadow/shadow.inc     | 7 ++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

-- 
1.9.1



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

* [PATCH 1/2] util-linux: use ALTERNATIVE mechanism to manage 'nologin'
  2014-11-14  8:35 [PATCH 0/2] Use ALTERNATIVES to manage 'nologin' Chen Qi
@ 2014-11-14  8:35 ` Chen Qi
  2014-11-14  8:35 ` [PATCH 2/2] shadow: use ALTERNATIVE " Chen Qi
  2014-11-20 20:42 ` [PATCH 0/2] Use ALTERNATIVES " Burton, Ross
  2 siblings, 0 replies; 5+ messages in thread
From: Chen Qi @ 2014-11-14  8:35 UTC (permalink / raw)
  To: openembedded-core

Both shadow and util-linux provide 'nologin' command, so use the
ALTERNATIVE mechanism in OE to manage it.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/util-linux/util-linux.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index ffb84c4..900d73b 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -169,7 +169,7 @@ ALTERNATIVE_PRIORITY = "100"
 
 ALTERNATIVE_${PN}  = "dmesg kill more mkswap blockdev pivot_root"
 ALTERNATIVE_${PN} += "mkfs.minix hexdump last logger mesg renice wall"
-ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject getopt sulogin"
+ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject getopt sulogin nologin"
 
 ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
 ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
@@ -181,6 +181,7 @@ ALTERNATIVE_LINK_NAME[mkfs.minix] = "${base_sbindir}/mkfs.minix"
 ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
 ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt"
 ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
+ALTERNATIVE_LINK_NAME[nologin] = "${sbindir}/nologin"
 ALTERNATIVE_TARGET[getopt] = "${bindir}/getopt"
 
 ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 mesg.1 wall.1 sulogin.8 utmpdump.1 reset.1"
-- 
1.9.1



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

* [PATCH 2/2] shadow: use ALTERNATIVE to manage 'nologin'
  2014-11-14  8:35 [PATCH 0/2] Use ALTERNATIVES to manage 'nologin' Chen Qi
  2014-11-14  8:35 ` [PATCH 1/2] util-linux: use ALTERNATIVE mechanism " Chen Qi
@ 2014-11-14  8:35 ` Chen Qi
  2014-11-20 20:42 ` [PATCH 0/2] Use ALTERNATIVES " Burton, Ross
  2 siblings, 0 replies; 5+ messages in thread
From: Chen Qi @ 2014-11-14  8:35 UTC (permalink / raw)
  To: openembedded-core

Both util-linux and shadow provide 'nologin', so use the ALTERNATIVE
mechanism in OE to manage it.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-extended/shadow/shadow.inc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
index 14c7281..81924e2 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -146,18 +146,23 @@ do_install_append() {
 	# Handle link properly after rename, otherwise missing files would
 	# lead rpm failed dependencies.
 	ln -sf newgrp.${BPN} ${D}${bindir}/sg
+
+	# mv nologin to nologin.${BPN}
+	mv ${D}${base_sbindir}/nologin ${D}${base_sbindir}/nologin.${BPN}
 }
 
 inherit update-alternatives
 
 ALTERNATIVE_PRIORITY = "200"
 
-ALTERNATIVE_${PN} = "passwd chfn newgrp chsh groups chpasswd login vipw vigr su"
+ALTERNATIVE_${PN} = "passwd chfn newgrp chsh groups chpasswd login vipw vigr su nologin"
 ALTERNATIVE_LINK_NAME[chpasswd] = "${sbindir}/chpasswd"
 ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login"
 ALTERNATIVE_LINK_NAME[vipw] = "${base_sbindir}/vipw"
 ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr"
 ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su"
+ALTERNATIVE_LINK_NAME[nologin] = "${sbindir}/nologin"
+ALTERNATIVE_TARGET[nologin] = "${base_sbindir}/nologin.${BPN}"
 
 ALTERNATIVE_${PN}-doc = "passwd.5 getspnam.3"
 ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
-- 
1.9.1



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

* Re: [PATCH 0/2] Use ALTERNATIVES to manage 'nologin'
  2014-11-14  8:35 [PATCH 0/2] Use ALTERNATIVES to manage 'nologin' Chen Qi
  2014-11-14  8:35 ` [PATCH 1/2] util-linux: use ALTERNATIVE mechanism " Chen Qi
  2014-11-14  8:35 ` [PATCH 2/2] shadow: use ALTERNATIVE " Chen Qi
@ 2014-11-20 20:42 ` Burton, Ross
  2014-11-21  2:24   ` ChenQi
  2 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2014-11-20 20:42 UTC (permalink / raw)
  To: Chen Qi; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 292 bytes --]

On 14 November 2014 08:35, Chen Qi <Qi.Chen@windriver.com> wrote:

> Chen Qi (2):
>   util-linux: use ALTERNATIVE mechanism to manage 'nologin'
>   shadow: use ALTERNATIVE to manage 'nologin'
>

util-linux has been changed since this was sent, can you rebase please?

Cheers,
Ross

[-- Attachment #2: Type: text/html, Size: 747 bytes --]

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

* Re: [PATCH 0/2] Use ALTERNATIVES to manage 'nologin'
  2014-11-20 20:42 ` [PATCH 0/2] Use ALTERNATIVES " Burton, Ross
@ 2014-11-21  2:24   ` ChenQi
  0 siblings, 0 replies; 5+ messages in thread
From: ChenQi @ 2014-11-21  2:24 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 449 bytes --]

On 11/21/2014 04:42 AM, Burton, Ross wrote:
>
> On 14 November 2014 08:35, Chen Qi <Qi.Chen@windriver.com 
> <mailto:Qi.Chen@windriver.com>> wrote:
>
>     Chen Qi (2):
>       util-linux: use ALTERNATIVE mechanism to manage 'nologin'
>       shadow: use ALTERNATIVE to manage 'nologin'
>
>
> util-linux has been changed since this was sent, can you rebase please?
>
> Cheers,
> Ross

OK. I'll send out V2.

Best Regards,
Chen Qi

[-- Attachment #2: Type: text/html, Size: 1614 bytes --]

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

end of thread, other threads:[~2014-11-21  2:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-14  8:35 [PATCH 0/2] Use ALTERNATIVES to manage 'nologin' Chen Qi
2014-11-14  8:35 ` [PATCH 1/2] util-linux: use ALTERNATIVE mechanism " Chen Qi
2014-11-14  8:35 ` [PATCH 2/2] shadow: use ALTERNATIVE " Chen Qi
2014-11-20 20:42 ` [PATCH 0/2] Use ALTERNATIVES " Burton, Ross
2014-11-21  2:24   ` ChenQi

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