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

The following changes since commit 4a888b2ab61662c7f749b5d1e64af92ed613d8eb:

  gtk+: drop part of patch adding useless file (2014-11-20 14:08:57 +0000)

are available in the git repository at:

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

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] 4+ messages in thread

* [PATCH V2 1/2] util-linux: use ALTERNATIVE mechanism to manage 'nologin'
  2014-11-21  7:27 [PATCH V2 0/2] Use ALTERNATIVES to manage 'nologin' Chen Qi
@ 2014-11-21  7:27 ` Chen Qi
  2014-11-21  7:27 ` [PATCH V2 2/2] shadow: use ALTERNATIVE " Chen Qi
  2015-11-09 16:36 ` [PATCH V2 0/2] Use ALTERNATIVES " Mike Crowe
  2 siblings, 0 replies; 4+ messages in thread
From: Chen Qi @ 2014-11-21  7:27 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 a37efe9..1c45485 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -170,7 +170,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 sulogin"
+ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject sulogin nologin"
 
 ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
 ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
@@ -181,6 +181,7 @@ ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root"
 ALTERNATIVE_LINK_NAME[mkfs.minix] = "${base_sbindir}/mkfs.minix"
 ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
 ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
+ALTERNATIVE_LINK_NAME[nologin] = "${sbindir}/nologin"
 
 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] 4+ messages in thread

* [PATCH V2 2/2] shadow: use ALTERNATIVE to manage 'nologin'
  2014-11-21  7:27 [PATCH V2 0/2] Use ALTERNATIVES to manage 'nologin' Chen Qi
  2014-11-21  7:27 ` [PATCH V2 1/2] util-linux: use ALTERNATIVE mechanism " Chen Qi
@ 2014-11-21  7:27 ` Chen Qi
  2015-11-09 16:36 ` [PATCH V2 0/2] Use ALTERNATIVES " Mike Crowe
  2 siblings, 0 replies; 4+ messages in thread
From: Chen Qi @ 2014-11-21  7:27 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] 4+ messages in thread

* Re: [PATCH V2 0/2] Use ALTERNATIVES to manage 'nologin'
  2014-11-21  7:27 [PATCH V2 0/2] Use ALTERNATIVES to manage 'nologin' Chen Qi
  2014-11-21  7:27 ` [PATCH V2 1/2] util-linux: use ALTERNATIVE mechanism " Chen Qi
  2014-11-21  7:27 ` [PATCH V2 2/2] shadow: use ALTERNATIVE " Chen Qi
@ 2015-11-09 16:36 ` Mike Crowe
  2 siblings, 0 replies; 4+ messages in thread
From: Mike Crowe @ 2015-11-09 16:36 UTC (permalink / raw)
  To: openembedded-core

On Friday 21 November 2014 at 15:27:45 +0800, Chen Qi wrote:
> The following changes since commit 4a888b2ab61662c7f749b5d1e64af92ed613d8eb:
> 
>   gtk+: drop part of patch adding useless file (2014-11-20 14:08:57 +0000)
> 
> are available in the git repository at:
> 
>   git://git.openembedded.org/openembedded-core-contrib ChenQi/nologin-alternatives
>   http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/nologin-alternatives
> 
> 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(-)

These patches never seem to make it into master as far as I can see. I
couldn't find any posted objections.

They now require some minor tweaks to apply but appear to work correctly
for me and solve my -dbg package conflicts.

Is there any chance of them being applied?

Thanks.

Mike.



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

end of thread, other threads:[~2015-11-09 16:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-21  7:27 [PATCH V2 0/2] Use ALTERNATIVES to manage 'nologin' Chen Qi
2014-11-21  7:27 ` [PATCH V2 1/2] util-linux: use ALTERNATIVE mechanism " Chen Qi
2014-11-21  7:27 ` [PATCH V2 2/2] shadow: use ALTERNATIVE " Chen Qi
2015-11-09 16:36 ` [PATCH V2 0/2] Use ALTERNATIVES " Mike Crowe

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