shadow: update 4.16.0 -> 4.17.1

Remove groups entries, as that has been removed in favor of the coreutils implementation.

Add a patch to support older host compilers.

(From OE-Core rev: 8d1041c02c600229b3487bc37f929c2b57f0b3ce)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin
2025-01-08 09:42:22 +01:00
committed by Richard Purdie
parent 6aee2f029a
commit 8dc89e2d3d
4 changed files with 37 additions and 9 deletions

View File

@@ -0,0 +1,29 @@
From f2d8d96e8586772becd68593a5bd9e14632841af Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Tue, 7 Jan 2025 17:03:32 +0100
Subject: [PATCH] lib/attr.h: use C23 attributes only with gcc >= 10
These are not available on earlier versions and builds break there.
Upstream-Status: Submitted [https://github.com/shadow-maint/shadow/pull/1172]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
lib/attr.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/attr.h b/lib/attr.h
index 02c7e252..290514d8 100644
--- a/lib/attr.h
+++ b/lib/attr.h
@@ -5,7 +5,7 @@
#include "config.h"
-#if defined(__GNUC__)
+#if defined(__GNUC__) && (__GNUC__ >= 10)
# define MAYBE_UNUSED [[gnu::unused]]
# define NORETURN [[gnu::__noreturn__]]
# define format_attr(type, fmt, va) [[gnu::format(type, fmt, va)]]
--
2.45.2

View File

@@ -1,4 +1,4 @@
From f512071dd3a4c29d4bf048c5a89c4ba9160e37b1 Mon Sep 17 00:00:00 2001
From f7b765c022e4cad9140ac44712885c66e149abdc Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Thu, 17 Jul 2014 15:53:34 +0800
Subject: [PATCH] commonio.c-fix-unexpected-open-failure-in-chroot-env
@@ -20,10 +20,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/lib/commonio.c b/lib/commonio.c
index 01a26c9..82b2868 100644
index 4d83e83..9ee0e13 100644
--- a/lib/commonio.c
+++ b/lib/commonio.c
@@ -601,10 +601,18 @@ int commonio_open (struct commonio_db *db, int mode)
@@ -604,10 +604,18 @@ int commonio_open (struct commonio_db *db, int mode)
db->cursor = NULL;
db->changed = false;

View File

@@ -1,4 +1,4 @@
From 38882ab288fd4d2cc2e45dff222ae3412c8fe357 Mon Sep 17 00:00:00 2001
From eb17cd91d8e4d76ee95de9c0c9f4938ba2e3e82a Mon Sep 17 00:00:00 2001
From: Kang Kai <kai.kang@windriver.com>
Date: Wed, 20 Jul 2011 19:18:14 +0800
Subject: [PATCH] shadow: update pam related configure files

View File

@@ -14,6 +14,7 @@ GITHUB_BASE_URI = "https://github.com/shadow-maint/shadow/releases"
SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BP}.tar.gz \
${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \
file://useradd \
file://0001-lib-attr.h-use-C23-attributes-only-with-gcc-10.patch \
"
SRC_URI:append:class-target = " \
@@ -24,7 +25,7 @@ SRC_URI:append:class-target = " \
SRC_URI:append:class-native = " \
file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \
"
SRC_URI[sha256sum] = "1744f339e07a2b41056347ddd612839762ff565d7e9494fb049428002fa2e7e0"
SRC_URI[sha256sum] = "51a946bbce141c5de14b6d47cab167206cd685d2307e917611dbc1be46c84a18"
UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)$"
# Additional Policy files for PAM
@@ -182,7 +183,6 @@ FILES:${PN}-base = "\
${base_bindir}/su.shadow \
${bindir}/sg \
${bindir}/newgrp.shadow \
${bindir}/groups.shadow \
${sysconfdir}/pam.d/login \
${sysconfdir}/pam.d/su \
${sysconfdir}/login.defs \
@@ -201,14 +201,13 @@ ALTERNATIVE_LINK_NAME[vipw] = "${base_sbindir}/vipw"
ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr"
ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin"
ALTERNATIVE:${PN}-doc = "chfn.1 chsh.1 groups.1 su.1 nologin.8"
ALTERNATIVE:${PN}-doc = "chfn.1 chsh.1 su.1 nologin.8"
ALTERNATIVE_LINK_NAME[chfn.1] = "${mandir}/man1/chfn.1"
ALTERNATIVE_LINK_NAME[chsh.1] = "${mandir}/man1/chsh.1"
ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1"
ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1"
ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8"
ALTERNATIVE:${PN}-base = "newgrp groups login su"
ALTERNATIVE:${PN}-base = "newgrp login su"
ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login"
ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su"