update recipes
This commit is contained in:
parent
65aa8b0f17
commit
2ad7bd4097
|
@ -6,7 +6,7 @@ LICENSE = "GPLv2+ & LGPLv2.1+"
|
|||
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
|
||||
file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
|
||||
file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e"
|
||||
DEPENDS = "udev dbus-glib glib-2.0 libcheck readline"
|
||||
DEPENDS = "udev libusb dbus-glib glib-2.0 libcheck readline"
|
||||
PROVIDES += "bluez-hcidump"
|
||||
RPROVIDES_${PN} += "bluez-hcidump"
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ HOMEPAGE = "http://pcsclite.alioth.debian.org/ccid.html"
|
|||
LICENSE = "LGPLv2.1+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
|
||||
|
||||
DEPENDS = "virtual/libusb0 pcsc-lite"
|
||||
DEPENDS = "pcsc-lite"
|
||||
RDEPENDS_${PN} = "pcsc-lite"
|
||||
|
||||
SRC_URI = "https://alioth.debian.org/frs/download.php/file/4171/ccid-${PV}.tar.bz2 \
|
||||
|
|
|
@ -7,7 +7,7 @@ so applications can use it with minimal overhead. \
|
|||
OpenCT also has a primitive mechanism to export smart card \
|
||||
readers to remote machines via TCP/IP."
|
||||
|
||||
DEPENDS += "libtool pcsc-lite libusb-compat"
|
||||
DEPENDS += "libtool pcsc-lite"
|
||||
|
||||
SRC_URI = " \
|
||||
${DEBIAN_MIRROR}/main/o/${BPN}/${BPN}_${PV}.orig.tar.gz \
|
||||
|
|
152
meta/poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
Normal file → Executable file
152
meta/poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
Normal file → Executable file
|
@ -1,124 +1,52 @@
|
|||
From 8cf3454d567f77233023be49a39a33e9f0836f89 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Garman <scott.a.garman@intel.com>
|
||||
Date: Thu, 14 Apr 2016 12:28:57 +0200
|
||||
Subject: [PATCH] Disable use of syslog for sysroot
|
||||
From 8b845fff891798a03bdf21354b52e4487c2c0200 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Purdie <richard.purdie@linuxfoundation.org>
|
||||
Date: Thu, 14 Apr 2022 23:11:53 +0000
|
||||
Subject: [PATCH] Disable use of syslog for shadow-native tools
|
||||
|
||||
Disable use of syslog to prevent sysroot user and group additions from
|
||||
writing entries to the host's syslog. This patch should only be used
|
||||
with the shadow-native recipe.
|
||||
|
||||
Upstream-Status: Inappropriate [disable feature]
|
||||
|
||||
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
|
||||
Upstream-Status: Inappropriate [OE specific configuration]
|
||||
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
||||
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
|
||||
|
||||
---
|
||||
src/groupadd.c | 3 +++
|
||||
src/groupdel.c | 3 +++
|
||||
src/groupmems.c | 3 +++
|
||||
src/groupmod.c | 3 +++
|
||||
src/useradd.c | 3 +++
|
||||
src/userdel.c | 3 +++
|
||||
src/usermod.c | 3 +++
|
||||
7 files changed, 21 insertions(+)
|
||||
configure.ac | 2 +-
|
||||
src/login_nopam.c | 3 ++-
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/groupadd.c b/src/groupadd.c
|
||||
index 39b4ec0..f716f57 100644
|
||||
--- a/src/groupadd.c
|
||||
+++ b/src/groupadd.c
|
||||
@@ -34,6 +34,9 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 5dcae19..b2c58f5 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -204,7 +204,7 @@ AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$shadow_cv_passwd_dir/passwd",
|
||||
[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, 1, [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).])
|
||||
diff --git a/src/login_nopam.c b/src/login_nopam.c
|
||||
index df6ba88..fc24e13 100644
|
||||
--- a/src/login_nopam.c
|
||||
+++ b/src/login_nopam.c
|
||||
@@ -29,7 +29,6 @@
|
||||
#ifndef USE_PAM
|
||||
#ident "$Id$"
|
||||
|
||||
+/* Disable use of syslog since we're running this command against a sysroot */
|
||||
+#undef USE_SYSLOG
|
||||
-#include "prototypes.h"
|
||||
/*
|
||||
* This module implements a simple but effective form of login access
|
||||
* control based on login names and on host (or domain) names, internet
|
||||
@@ -57,6 +56,8 @@
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h> /* for inet_ntoa() */
|
||||
|
||||
+#include "prototypes.h"
|
||||
+
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
#include <getopt.h>
|
||||
diff --git a/src/groupdel.c b/src/groupdel.c
|
||||
index da99347..46a679c 100644
|
||||
--- a/src/groupdel.c
|
||||
+++ b/src/groupdel.c
|
||||
@@ -34,6 +34,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 e4f107f..95cb073 100644
|
||||
--- a/src/groupmems.c
|
||||
+++ b/src/groupmems.c
|
||||
@@ -32,6 +32,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 d9d3807..6229737 100644
|
||||
--- a/src/groupmod.c
|
||||
+++ b/src/groupmod.c
|
||||
@@ -34,6 +34,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 e1ebf50..25679d8 100644
|
||||
--- a/src/useradd.c
|
||||
+++ b/src/useradd.c
|
||||
@@ -34,6 +34,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 19b12bc..a083929 100644
|
||||
--- a/src/userdel.c
|
||||
+++ b/src/userdel.c
|
||||
@@ -34,6 +34,9 @@
|
||||
|
||||
#ident "$Id$"
|
||||
|
||||
+/* Disable use of syslog since we're running this command against a sysroot */
|
||||
+#undef USE_SYSLOG
|
||||
+
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <getopt.h>
|
||||
diff --git a/src/usermod.c b/src/usermod.c
|
||||
index 685b50a..28e5cfc 100644
|
||||
--- a/src/usermod.c
|
||||
+++ b/src/usermod.c
|
||||
@@ -34,6 +34,9 @@
|
||||
|
||||
#ident "$Id$"
|
||||
|
||||
+/* Disable use of syslog since we're running this command against a sysroot */
|
||||
+#undef USE_SYSLOG
|
||||
+
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
--
|
||||
2.1.0
|
||||
|
||||
#if !defined(MAXHOSTNAMELEN) || (MAXHOSTNAMELEN < 64)
|
||||
#undef MAXHOSTNAMELEN
|
||||
#define MAXHOSTNAMELEN 256
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
From 170c25c8e0b5c3dc2615d1db94c8d24a13ff99bf Mon Sep 17 00:00:00 2001
|
||||
From: Peter Kjellerstedt <pkj@axis.com>
|
||||
Date: Thu, 11 Sep 2014 15:11:23 +0200
|
||||
Subject: [PATCH] Do not read login.defs before doing chroot()
|
||||
|
||||
If "useradd --root <root> ..." was used, the login.defs file would still
|
||||
be read from /etc/login.defs instead of <root>/etc/login.defs. This was
|
||||
due to getdef_ulong() being called before process_root_flag().
|
||||
|
||||
Upstream-Status: Submitted [http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2014-September/010446.html]
|
||||
|
||||
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
|
||||
---
|
||||
src/useradd.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/useradd.c b/src/useradd.c
|
||||
index a8a1f76..e1ebf50 100644
|
||||
--- a/src/useradd.c
|
||||
+++ b/src/useradd.c
|
||||
@@ -1993,9 +1993,11 @@ int main (int argc, char **argv)
|
||||
#endif /* USE_PAM */
|
||||
#endif /* ACCT_TOOLS_SETUID */
|
||||
|
||||
+#ifdef ENABLE_SUBIDS
|
||||
/* Needed for userns check */
|
||||
- uid_t uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL);
|
||||
- uid_t uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL);
|
||||
+ uid_t uid_min;
|
||||
+ uid_t uid_max;
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Get my name so that I can use it to report errors.
|
||||
@@ -2026,6 +2028,8 @@ int main (int argc, char **argv)
|
||||
is_shadow_grp = sgr_file_present ();
|
||||
#endif
|
||||
#ifdef ENABLE_SUBIDS
|
||||
+ uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL);
|
||||
+ uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL);
|
||||
is_sub_uid = sub_uid_file_present () && !rflg &&
|
||||
(!user_id || (user_id <= uid_max && user_id >= uid_min));
|
||||
is_sub_gid = sub_gid_file_present () && !rflg &&
|
||||
--
|
||||
1.9.0
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
Upstream-Status: Inappropriate [OE specific]
|
||||
|
||||
Subject: useradd.c: create parent directories when necessary
|
||||
|
||||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
||||
---
|
||||
src/useradd.c | 72 +++++++++++++++++++++++++++++++++++++++------------------
|
||||
1 file changed, 49 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/src/useradd.c b/src/useradd.c
|
||||
index 4bd969d..cb5dd6c 100644
|
||||
--- a/src/useradd.c
|
||||
+++ b/src/useradd.c
|
||||
@@ -1893,6 +1893,35 @@ static void usr_update (void)
|
||||
}
|
||||
|
||||
/*
|
||||
+ * mkdir_p - create directories, including parent directories when needed
|
||||
+ *
|
||||
+ * similar to `mkdir -p'
|
||||
+ */
|
||||
+void mkdir_p(const char *path) {
|
||||
+ int len = strlen(path);
|
||||
+ char newdir[len + 1];
|
||||
+ mode_t mode = 0755;
|
||||
+ int i = 0;
|
||||
+
|
||||
+ if (path[i] == '\0') {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /* skip the leading '/' */
|
||||
+ i++;
|
||||
+
|
||||
+ while(path[i] != '\0') {
|
||||
+ if (path[i] == '/') {
|
||||
+ strncpy(newdir, path, i);
|
||||
+ newdir[i] = '\0';
|
||||
+ mkdir(newdir, mode);
|
||||
+ }
|
||||
+ i++;
|
||||
+ }
|
||||
+ mkdir(path, mode);
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
* create_home - create the user's home directory
|
||||
*
|
||||
* create_home() creates the user's home directory if it does not
|
||||
@@ -1907,36 +1936,33 @@ static void create_home (void)
|
||||
fail_exit (E_HOMEDIR);
|
||||
}
|
||||
#endif
|
||||
- /* XXX - create missing parent directories. --marekm */
|
||||
- if (mkdir (user_home, 0) != 0) {
|
||||
- fprintf (stderr,
|
||||
- _("%s: cannot create directory %s\n"),
|
||||
- Prog, user_home);
|
||||
-#ifdef WITH_AUDIT
|
||||
- audit_logger (AUDIT_ADD_USER, Prog,
|
||||
- "adding home directory",
|
||||
- user_name, (unsigned int) user_id,
|
||||
- SHADOW_AUDIT_FAILURE);
|
||||
-#endif
|
||||
- fail_exit (E_HOMEDIR);
|
||||
- }
|
||||
- chown (user_home, user_id, user_gid);
|
||||
- chmod (user_home,
|
||||
- 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
|
||||
- home_added = true;
|
||||
+ mkdir_p(user_home);
|
||||
+ }
|
||||
+ if (access (user_home, F_OK) != 0) {
|
||||
#ifdef WITH_AUDIT
|
||||
audit_logger (AUDIT_ADD_USER, Prog,
|
||||
"adding home directory",
|
||||
user_name, (unsigned int) user_id,
|
||||
- SHADOW_AUDIT_SUCCESS);
|
||||
+ SHADOW_AUDIT_FAILURE);
|
||||
#endif
|
||||
-#ifdef WITH_SELINUX
|
||||
- /* Reset SELinux to create files with default contexts */
|
||||
- if (reset_selinux_file_context () != 0) {
|
||||
- fail_exit (E_HOMEDIR);
|
||||
- }
|
||||
+ fail_exit (E_HOMEDIR);
|
||||
+ }
|
||||
+ chown (user_home, user_id, user_gid);
|
||||
+ chmod (user_home,
|
||||
+ 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
|
||||
+ home_added = true;
|
||||
+#ifdef WITH_AUDIT
|
||||
+ audit_logger (AUDIT_ADD_USER, Prog,
|
||||
+ "adding home directory",
|
||||
+ user_name, (unsigned int) user_id,
|
||||
+ SHADOW_AUDIT_SUCCESS);
|
||||
#endif
|
||||
+#ifdef WITH_SELINUX
|
||||
+ /* Reset SELinux to create files with default contexts */
|
||||
+ if (reset_selinux_file_context () != 0) {
|
||||
+ fail_exit (E_HOMEDIR);
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*
|
||||
--
|
||||
1.7.9.5
|
||||
|
|
@ -1,201 +0,0 @@
|
|||
Upstream-Status: Inappropriate [OE specific]
|
||||
|
||||
Allow for setting password in clear text.
|
||||
|
||||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
||||
---
|
||||
src/Makefile.am | 8 ++++----
|
||||
src/groupadd.c | 8 +++++++-
|
||||
src/groupmod.c | 8 +++++++-
|
||||
src/useradd.c | 9 +++++++--
|
||||
src/usermod.c | 8 +++++++-
|
||||
5 files changed, 32 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 25e288d..856b087 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -88,10 +88,10 @@ chgpasswd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBSELINUX) $(LIBCRYPT)
|
||||
chsh_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD)
|
||||
chpasswd_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT)
|
||||
gpasswd_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
|
||||
-groupadd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
|
||||
+groupadd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
|
||||
groupdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
|
||||
groupmems_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX)
|
||||
-groupmod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
|
||||
+groupmod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
|
||||
grpck_LDADD = $(LDADD) $(LIBSELINUX)
|
||||
grpconv_LDADD = $(LDADD) $(LIBSELINUX)
|
||||
grpunconv_LDADD = $(LDADD) $(LIBSELINUX)
|
||||
@@ -111,9 +111,9 @@ su_SOURCES = \
|
||||
suauth.c
|
||||
su_LDADD = $(LDADD) $(LIBPAM) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD)
|
||||
sulogin_LDADD = $(LDADD) $(LIBCRYPT)
|
||||
-useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR)
|
||||
+useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBCRYPT)
|
||||
userdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE)
|
||||
-usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR)
|
||||
+usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBCRYPT)
|
||||
vipw_LDADD = $(LDADD) $(LIBSELINUX)
|
||||
|
||||
install-am: all-am
|
||||
diff --git a/src/groupadd.c b/src/groupadd.c
|
||||
index f716f57..4e28c26 100644
|
||||
--- a/src/groupadd.c
|
||||
+++ b/src/groupadd.c
|
||||
@@ -124,6 +124,7 @@ static /*@noreturn@*/void usage (int status)
|
||||
(void) fputs (_(" -o, --non-unique allow to create groups with duplicate\n"
|
||||
" (non-unique) GID\n"), usageout);
|
||||
(void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), usageout);
|
||||
+ (void) fputs (_(" -P, --clear-password PASSWORD use this clear password for the new group\n"), usageout);
|
||||
(void) fputs (_(" -r, --system create a system account\n"), usageout);
|
||||
(void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
|
||||
(void) fputs ("\n", usageout);
|
||||
@@ -387,12 +388,13 @@ static void process_flags (int argc, char **argv)
|
||||
{"key", required_argument, NULL, 'K'},
|
||||
{"non-unique", no_argument, NULL, 'o'},
|
||||
{"password", required_argument, NULL, 'p'},
|
||||
+ {"clear-password", required_argument, NULL, 'P'},
|
||||
{"system", no_argument, NULL, 'r'},
|
||||
{"root", required_argument, NULL, 'R'},
|
||||
{NULL, 0, NULL, '\0'}
|
||||
};
|
||||
|
||||
- while ((c = getopt_long (argc, argv, "fg:hK:op:rR:",
|
||||
+ while ((c = getopt_long (argc, argv, "fg:hK:op:P:rR:",
|
||||
long_options, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'f':
|
||||
@@ -444,6 +446,10 @@ static void process_flags (int argc, char **argv)
|
||||
pflg = true;
|
||||
group_passwd = optarg;
|
||||
break;
|
||||
+ case 'P':
|
||||
+ pflg = true;
|
||||
+ group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
|
||||
+ break;
|
||||
case 'r':
|
||||
rflg = true;
|
||||
break;
|
||||
diff --git a/src/groupmod.c b/src/groupmod.c
|
||||
index d9d3807..68f49d1 100644
|
||||
--- a/src/groupmod.c
|
||||
+++ b/src/groupmod.c
|
||||
@@ -127,6 +127,7 @@ static void usage (int status)
|
||||
(void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), usageout);
|
||||
(void) fputs (_(" -p, --password PASSWORD change the password to this (encrypted)\n"
|
||||
" PASSWORD\n"), usageout);
|
||||
+ (void) fputs (_(" -P, --clear-password PASSWORD change the password to this clear PASSWORD\n"), usageout);
|
||||
(void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
|
||||
(void) fputs ("\n", usageout);
|
||||
exit (status);
|
||||
@@ -375,10 +376,11 @@ static void process_flags (int argc, char **argv)
|
||||
{"new-name", required_argument, NULL, 'n'},
|
||||
{"non-unique", no_argument, NULL, 'o'},
|
||||
{"password", required_argument, NULL, 'p'},
|
||||
+ {"clear-password", required_argument, NULL, 'P'},
|
||||
{"root", required_argument, NULL, 'R'},
|
||||
{NULL, 0, NULL, '\0'}
|
||||
};
|
||||
- while ((c = getopt_long (argc, argv, "g:hn:op:R:",
|
||||
+ while ((c = getopt_long (argc, argv, "g:hn:op:P:R:",
|
||||
long_options, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'g':
|
||||
@@ -405,6 +407,10 @@ static void process_flags (int argc, char **argv)
|
||||
group_passwd = optarg;
|
||||
pflg = true;
|
||||
break;
|
||||
+ case 'P':
|
||||
+ group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
|
||||
+ pflg = true;
|
||||
+ break;
|
||||
case 'R': /* no-op, handled in process_root_flag () */
|
||||
break;
|
||||
default:
|
||||
diff --git a/src/useradd.c b/src/useradd.c
|
||||
index b3bd451..4416f90 100644
|
||||
--- a/src/useradd.c
|
||||
+++ b/src/useradd.c
|
||||
@@ -773,6 +773,7 @@ static void usage (int status)
|
||||
(void) fputs (_(" -o, --non-unique allow to create users with duplicate\n"
|
||||
" (non-unique) UID\n"), usageout);
|
||||
(void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), usageout);
|
||||
+ (void) fputs (_(" -P, --clear-password PASSWORD clear password of the new account\n"), usageout);
|
||||
(void) fputs (_(" -r, --system create a system account\n"), usageout);
|
||||
(void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
|
||||
(void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), usageout);
|
||||
@@ -1047,6 +1048,7 @@ static void process_flags (int argc, char **argv)
|
||||
{"no-user-group", no_argument, NULL, 'N'},
|
||||
{"non-unique", no_argument, NULL, 'o'},
|
||||
{"password", required_argument, NULL, 'p'},
|
||||
+ {"clear-password", required_argument, NULL, 'P'},
|
||||
{"system", no_argument, NULL, 'r'},
|
||||
{"root", required_argument, NULL, 'R'},
|
||||
{"shell", required_argument, NULL, 's'},
|
||||
@@ -1059,9 +1061,9 @@ static void process_flags (int argc, char **argv)
|
||||
};
|
||||
while ((c = getopt_long (argc, argv,
|
||||
#ifdef WITH_SELINUX
|
||||
- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:UZ:",
|
||||
+ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:UZ:",
|
||||
#else /* !WITH_SELINUX */
|
||||
- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:U",
|
||||
+ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:U",
|
||||
#endif /* !WITH_SELINUX */
|
||||
long_options, NULL)) != -1) {
|
||||
switch (c) {
|
||||
@@ -1227,6 +1229,9 @@ static void process_flags (int argc, char **argv)
|
||||
}
|
||||
user_pass = optarg;
|
||||
break;
|
||||
+ case 'P': /* set clear text password */
|
||||
+ user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
|
||||
+ break;
|
||||
case 'r':
|
||||
rflg = true;
|
||||
break;
|
||||
diff --git a/src/usermod.c b/src/usermod.c
|
||||
index e7d4351..b79f7a3 100644
|
||||
--- a/src/usermod.c
|
||||
+++ b/src/usermod.c
|
||||
@@ -419,6 +419,7 @@ static /*@noreturn@*/void usage (int status)
|
||||
" new location (use only with -d)\n"), usageout);
|
||||
(void) fputs (_(" -o, --non-unique allow using duplicate (non-unique) UID\n"), usageout);
|
||||
(void) fputs (_(" -p, --password PASSWORD use encrypted password for the new password\n"), usageout);
|
||||
+ (void) fputs (_(" -P, --clear-password PASSWORD use clear password for the new password\n"), usageout);
|
||||
(void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
|
||||
(void) fputs (_(" -s, --shell SHELL new login shell for the user account\n"), usageout);
|
||||
(void) fputs (_(" -u, --uid UID new UID for the user account\n"), usageout);
|
||||
@@ -996,6 +997,7 @@ static void process_flags (int argc, char **argv)
|
||||
{"move-home", no_argument, NULL, 'm'},
|
||||
{"non-unique", no_argument, NULL, 'o'},
|
||||
{"password", required_argument, NULL, 'p'},
|
||||
+ {"clear-password", required_argument, NULL, 'P'},
|
||||
{"root", required_argument, NULL, 'R'},
|
||||
{"shell", required_argument, NULL, 's'},
|
||||
{"uid", required_argument, NULL, 'u'},
|
||||
@@ -1012,7 +1014,7 @@ static void process_flags (int argc, char **argv)
|
||||
{NULL, 0, NULL, '\0'}
|
||||
};
|
||||
while ((c = getopt_long (argc, argv,
|
||||
- "ac:d:e:f:g:G:hl:Lmop:R:s:u:U"
|
||||
+ "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:U"
|
||||
#ifdef ENABLE_SUBIDS
|
||||
"v:w:V:W:"
|
||||
#endif /* ENABLE_SUBIDS */
|
||||
@@ -1112,6 +1114,10 @@ static void process_flags (int argc, char **argv)
|
||||
user_pass = optarg;
|
||||
pflg = true;
|
||||
break;
|
||||
+ case 'P':
|
||||
+ user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
|
||||
+ pflg = true;
|
||||
+ break;
|
||||
case 'R': /* no-op, handled in process_root_flag () */
|
||||
break;
|
||||
case 's':
|
||||
--
|
||||
1.7.9.5
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
From 2cb54158b80cdbd97ca3b36df83f9255e923ae3f Mon Sep 17 00:00:00 2001
|
||||
From: James Le Cuirot <chewi@aura-online.co.uk>
|
||||
Date: Sat, 23 Aug 2014 09:46:39 +0100
|
||||
Subject: [PATCH] Check size of uid_t and gid_t using AC_CHECK_SIZEOF
|
||||
|
||||
This built-in check is simpler than the previous method and, most
|
||||
importantly, works when cross-compiling.
|
||||
|
||||
Upstream-Status: Accepted
|
||||
[https://github.com/shadow-maint/shadow/commit/2cb54158b80cdbd97ca3b36df83f9255e923ae3f]
|
||||
|
||||
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
|
||||
---
|
||||
configure.in | 14 ++++----------
|
||||
1 file changed, 4 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 1a3f841..4a4d6d0 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -335,16 +335,10 @@ if test "$enable_subids" != "no"; then
|
||||
dnl
|
||||
dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc
|
||||
dnl
|
||||
- AC_RUN_IFELSE([AC_LANG_SOURCE([
|
||||
-#include <sys/types.h>
|
||||
-int main(void) {
|
||||
- uid_t u;
|
||||
- gid_t g;
|
||||
- return (sizeof u < 4) || (sizeof g < 4);
|
||||
-}
|
||||
- ])], [id32bit="yes"], [id32bit="no"])
|
||||
-
|
||||
- if test "x$id32bit" = "xyes"; then
|
||||
+ AC_CHECK_SIZEOF([uid_t],, [#include "sys/types.h"])
|
||||
+ AC_CHECK_SIZEOF([gid_t],, [#include "sys/types.h"])
|
||||
+
|
||||
+ if test "$ac_cv_sizeof_uid_t" -ge 4 && test "$ac_cv_sizeof_gid_t" -ge 4; then
|
||||
AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.])
|
||||
enable_subids="yes"
|
||||
else
|
15
meta/poky/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
Normal file → Executable file
15
meta/poky/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
Normal file → Executable file
|
@ -1,3 +1,8 @@
|
|||
From d767f776e631f1493fd7b266f2026d630ecf70fe 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
|
||||
|
||||
Upstream-Status: Inappropriate [OE specific]
|
||||
|
||||
commonio.c: fix unexpected open failure in chroot environment
|
||||
|
@ -10,15 +15,16 @@ Note that this patch doesn't change the logic in the code, it just expands
|
|||
the codes.
|
||||
|
||||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
||||
|
||||
---
|
||||
lib/commonio.c | 16 ++++++++++++----
|
||||
lib/commonio.c | 16 ++++++++++++----
|
||||
1 file changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/lib/commonio.c b/lib/commonio.c
|
||||
index cc536bf..51cafd9 100644
|
||||
index 9e0fde6..7c3a1da 100644
|
||||
--- a/lib/commonio.c
|
||||
+++ b/lib/commonio.c
|
||||
@@ -613,10 +613,18 @@ int commonio_open (struct commonio_db *db, int mode)
|
||||
@@ -624,10 +624,18 @@ int commonio_open (struct commonio_db *db, int mode)
|
||||
db->cursor = NULL;
|
||||
db->changed = false;
|
||||
|
||||
|
@ -41,6 +47,3 @@ index cc536bf..51cafd9 100644
|
|||
db->fp = NULL;
|
||||
if (fd >= 0) {
|
||||
#ifdef WITH_TCB
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
Upstream-Status: Pending
|
||||
|
||||
Subject: fix installation failure with subids disabled
|
||||
|
||||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
||||
---
|
||||
src/Makefile.am | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 25e288d..076f8ef 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -52,7 +52,10 @@ usbin_PROGRAMS = \
|
||||
noinst_PROGRAMS = id sulogin
|
||||
|
||||
suidbins = su
|
||||
-suidubins = chage chfn chsh expiry gpasswd newgrp passwd newuidmap newgidmap
|
||||
+suidubins = chage chfn chsh expiry gpasswd newgrp passwd
|
||||
+if ENABLE_SUBIDS
|
||||
+suidubins += newgidmap newuidmap
|
||||
+endif
|
||||
if ACCT_TOOLS_SETUID
|
||||
suidubins += chage chgpasswd chpasswd groupadd groupdel groupmod newusers useradd userdel usermod
|
||||
endif
|
||||
--
|
||||
1.7.9.5
|
||||
|
0
meta/poky/meta/recipes-extended/shadow/files/login.defs_shadow-sysroot
Normal file → Executable file
0
meta/poky/meta/recipes-extended/shadow/files/login.defs_shadow-sysroot
Normal file → Executable file
|
@ -1,4 +1,6 @@
|
|||
# The PAM configuration file for the Shadow 'chpasswd' service
|
||||
#
|
||||
|
||||
auth sufficient pam_rootok.so
|
||||
account required pam_permit.so
|
||||
password include common-password
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
# The PAM configuration file for the Shadow 'newusers' service
|
||||
#
|
||||
|
||||
auth sufficient pam_rootok.so
|
||||
account required pam_permit.so
|
||||
password include common-password
|
||||
|
|
0
meta/poky/meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch
Normal file → Executable file
0
meta/poky/meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch
Normal file → Executable file
51
meta/poky/meta/recipes-extended/shadow/files/shadow-relaxed-usernames.patch
Normal file → Executable file
51
meta/poky/meta/recipes-extended/shadow/files/shadow-relaxed-usernames.patch
Normal file → Executable file
|
@ -1,26 +1,37 @@
|
|||
From ca472d6866e545aaa70a70020e3226f236a8aafc Mon Sep 17 00:00:00 2001
|
||||
From: Shan Hai <shan.hai@windriver.com>
|
||||
Date: Tue, 13 Sep 2016 13:45:46 +0800
|
||||
Subject: [PATCH] shadow: use relaxed usernames
|
||||
|
||||
The groupadd from shadow does not allow upper case group names, the
|
||||
same is true for the upstream shadow. But distributions like
|
||||
Debian/Ubuntu/CentOS has their own way to cope with this problem,
|
||||
this patch is picked up from CentOS release 7.0 to relax the usernames
|
||||
restrictions to allow the upper case group names, and the relaxation is
|
||||
POSIX compliant because POSIX indicate that usernames are composed of
|
||||
POSIX compliant because POSIX indicate that usernames are composed of
|
||||
characters from the portable filename character set [A-Za-z0-9._-].
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Shan Hai <shan.hai@windriver.com>
|
||||
Signed-off-by: Shan Hai <shan.hai@windriver.com>
|
||||
|
||||
diff -urpN a/libmisc/chkname.c b/libmisc/chkname.c
|
||||
index 5089112..f40a0da 100644
|
||||
---
|
||||
libmisc/chkname.c | 30 ++++++++++++++++++------------
|
||||
man/groupadd.8.xml | 6 ------
|
||||
man/useradd.8.xml | 8 +-------
|
||||
3 files changed, 19 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/libmisc/chkname.c b/libmisc/chkname.c
|
||||
index 90f185c..65762b4 100644
|
||||
--- a/libmisc/chkname.c
|
||||
+++ b/libmisc/chkname.c
|
||||
@@ -49,21 +49,28 @@
|
||||
static bool is_valid_name (const char *name)
|
||||
{
|
||||
@@ -55,22 +55,28 @@ static bool is_valid_name (const char *name)
|
||||
}
|
||||
|
||||
/*
|
||||
- * User/group names must match [a-z_][a-z0-9_-]*[$]
|
||||
- */
|
||||
-
|
||||
- if (('\0' == *name) ||
|
||||
- !((('a' <= *name) && ('z' >= *name)) || ('_' == *name))) {
|
||||
+ * User/group names must match gnu e-regex:
|
||||
|
@ -55,28 +66,28 @@ index 5089112..f40a0da 100644
|
|||
return false;
|
||||
}
|
||||
}
|
||||
diff -urpN a/man/groupadd.8.xml b/man/groupadd.8.xml
|
||||
index 230fd0c..94f7807 100644
|
||||
diff --git a/man/groupadd.8.xml b/man/groupadd.8.xml
|
||||
index 1e58f09..d804b61 100644
|
||||
--- a/man/groupadd.8.xml
|
||||
+++ b/man/groupadd.8.xml
|
||||
@@ -222,12 +222,6 @@
|
||||
@@ -272,12 +272,6 @@
|
||||
|
||||
<refsect1 id='caveats'>
|
||||
<title>CAVEATS</title>
|
||||
<para>
|
||||
- <para>
|
||||
- Groupnames must start with a lower case letter or an underscore,
|
||||
- followed by lower case letters, digits, underscores, or dashes.
|
||||
- They can end with a dollar sign.
|
||||
- In regular expression terms: [a-z_][a-z0-9_-]*[$]?
|
||||
- </para>
|
||||
- <para>
|
||||
<para>
|
||||
Groupnames may only be up to &GROUP_NAME_MAX_LENGTH; characters long.
|
||||
</para>
|
||||
<para>
|
||||
diff -urpN a/man/useradd.8.xml b/man/useradd.8.xml
|
||||
index 5dec989..fe623b9 100644
|
||||
diff --git a/man/useradd.8.xml b/man/useradd.8.xml
|
||||
index a16d730..c0bd777 100644
|
||||
--- a/man/useradd.8.xml
|
||||
+++ b/man/useradd.8.xml
|
||||
@@ -336,7 +336,7 @@
|
||||
@@ -366,7 +366,7 @@
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
@ -85,16 +96,16 @@ index 5dec989..fe623b9 100644
|
|||
wide setting from <filename>/etc/login.defs</filename>
|
||||
(<option>CREATE_HOME</option>) is set to
|
||||
<replaceable>yes</replaceable>.
|
||||
@@ -607,12 +607,6 @@
|
||||
@@ -660,12 +660,6 @@
|
||||
the user account creation request.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
- <para>
|
||||
- Usernames must start with a lower case letter or an underscore,
|
||||
- followed by lower case letters, digits, underscores, or dashes.
|
||||
- They can end with a dollar sign.
|
||||
- In regular expression terms: [a-z_][a-z0-9_-]*[$]?
|
||||
- </para>
|
||||
- <para>
|
||||
<para>
|
||||
Usernames may only be up to 32 characters long.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
|
0
meta/poky/meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch
Normal file → Executable file
0
meta/poky/meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch
Normal file → Executable file
|
@ -0,0 +1,8 @@
|
|||
# useradd defaults file
|
||||
GROUP=100
|
||||
HOME=/home
|
||||
INACTIVE=-1
|
||||
EXPIRE=
|
||||
SHELL=/bin/sh
|
||||
SKEL=/etc/skel
|
||||
CREATE_MAIL_SPOOL=no
|
|
@ -1,33 +0,0 @@
|
|||
Upstream-Status: Pending
|
||||
|
||||
usermod: fix compilation failure with subids disabled
|
||||
|
||||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
||||
---
|
||||
src/usermod.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/usermod.c b/src/usermod.c
|
||||
index e7d4351..685b50a 100644
|
||||
--- a/src/usermod.c
|
||||
+++ b/src/usermod.c
|
||||
@@ -1360,7 +1360,7 @@ static void process_flags (int argc, char **argv)
|
||||
Prog, (unsigned long) user_newid);
|
||||
exit (E_UID_IN_USE);
|
||||
}
|
||||
-
|
||||
+#ifdef ENABLE_SUBIDS
|
||||
if ( (vflg || Vflg)
|
||||
&& !is_sub_uid) {
|
||||
fprintf (stderr,
|
||||
@@ -1376,6 +1376,7 @@ static void process_flags (int argc, char **argv)
|
||||
Prog, sub_gid_dbname (), "-w", "-W");
|
||||
exit (E_USAGE);
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*
|
||||
--
|
||||
1.7.9.5
|
||||
|
13
meta/poky/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb → meta/poky/meta/recipes-extended/shadow/shadow-sysroot_4.6.bb
Normal file → Executable file
13
meta/poky/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb → meta/poky/meta/recipes-extended/shadow/shadow-sysroot_4.6.bb
Normal file → Executable file
|
@ -1,8 +1,8 @@
|
|||
SUMMARY = "Shadow utils requirements for useradd.bbclass"
|
||||
HOMEPAGE = "http://pkg-shadow.alioth.debian.org"
|
||||
BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580"
|
||||
HOMEPAGE = "http://github.com/shadow-maint/shadow"
|
||||
BUGTRACKER = "http://github.com/shadow-maint/shadow/issues"
|
||||
SECTION = "base utils"
|
||||
LICENSE = "BSD | Artistic-1.0"
|
||||
LICENSE = "BSD-3-Clause | Artistic-1.0"
|
||||
LIC_FILES_CHKSUM = "file://login.defs_shadow-sysroot;md5=25e2f2de4dfc8f966ac5cdfce45cd7d5"
|
||||
|
||||
DEPENDS = "base-passwd"
|
||||
|
@ -14,9 +14,6 @@ PR = "r3"
|
|||
# can add custom users/groups for recipes that use inherit useradd.
|
||||
SRC_URI = "file://login.defs_shadow-sysroot"
|
||||
|
||||
SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
|
||||
SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
do_install() {
|
||||
|
@ -27,6 +24,8 @@ do_install() {
|
|||
SYSROOT_DIRS += "${sysconfdir}"
|
||||
|
||||
# don't create any packages
|
||||
# otherwise: dbus-dev depends on shadow-sysroot-dev which depends on shadow-sysroot
|
||||
# otherwise: dbus-dev depends on shadow-sysroot-dev which depends on shadow-sysroot
|
||||
# and this has another copy of /etc/login.defs already provided by shadow
|
||||
PACKAGES = ""
|
||||
|
||||
inherit nopackages
|
|
@ -1,42 +1,36 @@
|
|||
SUMMARY = "Tools to change and administer password and group data"
|
||||
HOMEPAGE = "http://pkg-shadow.alioth.debian.org"
|
||||
BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580"
|
||||
HOMEPAGE = "http://github.com/shadow-maint/shadow"
|
||||
DESCRIPTION = "${SUMMARY}"
|
||||
BUGTRACKER = "http://github.com/shadow-maint/shadow/issues"
|
||||
SECTION = "base/utils"
|
||||
LICENSE = "BSD | Artistic-1.0"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=ed80ff1c2b40843cf5768e5229cf16e5 \
|
||||
file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661"
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=c9a450b7be84eac23e6353efecb60b5b \
|
||||
file://src/passwd.c;beginline=2;endline=30;md5=758c26751513b6795395275969dd3be1 \
|
||||
"
|
||||
|
||||
DEPENDS = "shadow-native"
|
||||
DEPENDS_class-native = ""
|
||||
DEPENDS_class-nativesdk = ""
|
||||
|
||||
SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.xz \
|
||||
UPSTREAM_CHECK_URI = "https://github.com/shadow-maint/shadow/releases"
|
||||
SRC_URI = "https://github.com/shadow-maint/shadow/releases/download/v${PV}/${BP}.tar.gz \
|
||||
file://shadow-4.1.3-dots-in-usernames.patch \
|
||||
file://usermod-fix-compilation-failure-with-subids-disabled.patch \
|
||||
file://fix-installation-failure-with-subids-disabled.patch \
|
||||
file://0001-Do-not-read-login.defs-before-doing-chroot.patch \
|
||||
file://check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \
|
||||
file://shadow-relaxed-usernames.patch \
|
||||
file://useradd \
|
||||
"
|
||||
|
||||
SRC_URI_append_class-target = " \
|
||||
file://login_defs_pam.sed \
|
||||
file://shadow-update-pam-conf.patch \
|
||||
file://shadow-relaxed-usernames.patch \
|
||||
"
|
||||
|
||||
SRC_URI_append_class-native = " \
|
||||
file://0001-Disable-use-of-syslog-for-sysroot.patch \
|
||||
file://allow-for-setting-password-in-clear-text.patch \
|
||||
file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \
|
||||
file://0001-useradd.c-create-parent-directories-when-necessary.patch \
|
||||
"
|
||||
SRC_URI_append_class-nativesdk = " \
|
||||
file://0001-Disable-use-of-syslog-for-sysroot.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "2bfafe7d4962682d31b5eba65dba4fc8"
|
||||
SRC_URI[sha256sum] = "3b0893d1476766868cd88920f4f1231c4795652aa407569faff802bcda0f3d41"
|
||||
SRC_URI[sha256sum] = "f262089be6a1011d50ec7849e14571b7b2e788334368f3dccb718513f17935ed"
|
||||
|
||||
# Additional Policy files for PAM
|
||||
PAM_SRC_URI = "file://pam.d/chfn \
|
||||
|
@ -49,19 +43,19 @@ PAM_SRC_URI = "file://pam.d/chfn \
|
|||
|
||||
inherit autotools gettext
|
||||
|
||||
EXTRA_OECONF += "--without-audit \
|
||||
--without-libcrack \
|
||||
--without-selinux \
|
||||
export CONFIG_SHELL="/bin/sh"
|
||||
|
||||
EXTRA_OECONF += "--without-libcrack \
|
||||
--with-group-name-max-length=24 \
|
||||
--enable-subordinate-ids=yes \
|
||||
--without-sssd \
|
||||
${NSCDOPT}"
|
||||
|
||||
NSCDOPT = ""
|
||||
NSCDOPT_class-native = "--without-nscd"
|
||||
NSCDOPT_class-nativesdk = "--without-nscd"
|
||||
NSCDOPT_libc-uclibc = " --without-nscd"
|
||||
NSCDOPT_libc-glibc = "${@bb.utils.contains('DISTRO_FEATURES', 'libc-spawn', '--with-nscd', '--without-nscd', d)}"
|
||||
|
||||
NSCDOPT_libc-glibc = "--with-nscd"
|
||||
|
||||
PAM_PLUGINS = "libpam-runtime \
|
||||
pam-plugin-faildelay \
|
||||
pam-plugin-securetty \
|
||||
|
@ -75,12 +69,17 @@ PAM_PLUGINS = "libpam-runtime \
|
|||
pam-plugin-shells \
|
||||
pam-plugin-rootok"
|
||||
|
||||
PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
|
||||
PACKAGECONFIG_class-native = ""
|
||||
PAM_PLUGINS_remove_libc-musl = "pam-plugin-lastlog"
|
||||
|
||||
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
|
||||
PACKAGECONFIG_class-native ??= "${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
|
||||
PACKAGECONFIG_class-nativesdk = ""
|
||||
PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam,${PAM_PLUGINS}"
|
||||
PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
|
||||
PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
|
||||
PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit"
|
||||
PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux libsemanage"
|
||||
|
||||
RDEPENDS_${PN} = "shadow-securetty \
|
||||
base-passwd \
|
||||
|
@ -115,19 +114,16 @@ do_install() {
|
|||
# Use proper encryption for passwords
|
||||
sed -i 's/^#ENCRYPT_METHOD.*$/ENCRYPT_METHOD SHA512/' ${D}${sysconfdir}/login.defs
|
||||
|
||||
# Now we don't have a mail system. Disable mail creation for now.
|
||||
sed -i 's:/bin/bash:/bin/sh:g' ${D}${sysconfdir}/default/useradd
|
||||
sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd
|
||||
|
||||
# Use users group by default
|
||||
sed -i 's,^GROUP=1000,GROUP=100,g' ${D}${sysconfdir}/default/useradd
|
||||
install -d ${D}${sysconfdir}/default
|
||||
install -m 0644 ${WORKDIR}/useradd ${D}${sysconfdir}/default
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
# Ensure that the image has as a /var/spool/mail dir so shadow can
|
||||
# put mailboxes there if the user reconfigures shadow to its
|
||||
# defaults (see sed below).
|
||||
install -d ${D}${localstatedir}/spool/mail
|
||||
install -m 0775 -d ${D}${localstatedir}/spool/mail
|
||||
chown root:mail ${D}${localstatedir}/spool/mail
|
||||
|
||||
if [ -e ${WORKDIR}/pam.d ]; then
|
||||
install -d ${D}${sysconfdir}/pam.d/
|
||||
|
@ -136,7 +132,7 @@ do_install_append() {
|
|||
sed -i -f ${WORKDIR}/login_defs_pam.sed ${D}${sysconfdir}/login.defs
|
||||
fi
|
||||
|
||||
install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir}
|
||||
install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir}
|
||||
|
||||
# Move binaries to the locations we want
|
||||
rm ${D}${sbindir}/vigr
|
||||
|
@ -171,23 +167,20 @@ inherit update-alternatives
|
|||
|
||||
ALTERNATIVE_PRIORITY = "200"
|
||||
|
||||
ALTERNATIVE_${PN} = "passwd chfn chsh chpasswd vipw vigr"
|
||||
ALTERNATIVE_${PN} = "passwd chfn chsh chpasswd vipw vigr nologin"
|
||||
ALTERNATIVE_LINK_NAME[chfn] = "${bindir}/chfn"
|
||||
ALTERNATIVE_LINK_NAME[chsh] = "${bindir}/chsh"
|
||||
ALTERNATIVE_LINK_NAME[chpasswd] = "${sbindir}/chpasswd"
|
||||
ALTERNATIVE_LINK_NAME[vipw] = "${base_sbindir}/vipw"
|
||||
ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr"
|
||||
ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin"
|
||||
|
||||
ALTERNATIVE_${PN}-base = "newgrp groups login su"
|
||||
ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login"
|
||||
ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su"
|
||||
|
||||
ALTERNATIVE_${PN}-doc = "passwd.5 getspnam.3 groups.1 su.1 nologin.8"
|
||||
ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
|
||||
ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
|
||||
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"
|
||||
|
||||
pkg_postinst_${PN} () {
|
||||
PACKAGE_WRITE_DEPS += "shadow-native"
|
||||
pkg_postinst_${PN}_class-target () {
|
||||
if [ "x$D" != "x" ]; then
|
||||
rootarg="--root $D"
|
||||
else
|
||||
|
|
5
meta/poky/meta/recipes-extended/shadow/shadow_4.2.1.bb → meta/poky/meta/recipes-extended/shadow/shadow_4.11.1.bb
Normal file → Executable file
5
meta/poky/meta/recipes-extended/shadow/shadow_4.2.1.bb → meta/poky/meta/recipes-extended/shadow/shadow_4.11.1.bb
Normal file → Executable file
|
@ -6,5 +6,6 @@ BUILD_LDFLAGS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'p
|
|||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
|
||||
|
||||
# Severity is low and marked as closed and won't fix.
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=884658
|
||||
CVE_CHECK_IGNORE += "CVE-2013-4235"
|
|
@ -0,0 +1,42 @@
|
|||
SUMMARY = "Utilities for managing POSIX Access Control Lists"
|
||||
HOMEPAGE = "http://savannah.nongnu.org/projects/acl/"
|
||||
SECTION = "libs"
|
||||
|
||||
LICENSE = "LGPLv2.1+ & GPLv2+"
|
||||
LICENSE_${PN} = "GPLv2+"
|
||||
LICENSE_lib${BPN} = "LGPLv2.1+"
|
||||
LIC_FILES_CHKSUM = "file://doc/COPYING;md5=c781d70ed2b4d48995b790403217a249 \
|
||||
file://doc/COPYING.LGPL;md5=9e9a206917f8af112da634ce3ab41764"
|
||||
|
||||
DEPENDS = "attr"
|
||||
SRC_URI = "${SAVANNAH_GNU_MIRROR}/acl/${BP}.src.tar.gz \
|
||||
file://run-ptest \
|
||||
file://acl-fix-the-order-of-expected-output-of-getfacl.patch \
|
||||
file://test-fix-insufficient-quoting-of.patch \
|
||||
file://test-fixups-on-SELinux-machines-for-root-testcases.patch \
|
||||
file://test-fix-directory-permissions.patch \
|
||||
"
|
||||
|
||||
require ea-acl.inc
|
||||
|
||||
# avoid RPATH hardcode to staging dir
|
||||
do_configure_append() {
|
||||
sed -i ${S}/config.status -e s,^\\\(hardcode_into_libs=\\\).*$,\\1\'no\',
|
||||
${S}/config.status
|
||||
}
|
||||
|
||||
# libdir should point to .la
|
||||
do_install_append() {
|
||||
sed -i ${D}${libdir}/libacl.la -e \
|
||||
s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
|
||||
}
|
||||
|
||||
inherit ptest
|
||||
|
||||
do_install_ptest() {
|
||||
tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
|
||||
mkdir ${D}${PTEST_PATH}/include
|
||||
cp ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
|
||||
}
|
||||
|
||||
RDEPENDS_${PN}-ptest = "acl bash coreutils perl perl-module-filehandle perl-module-getopt-std perl-module-posix shadow"
|
|
@ -1,63 +0,0 @@
|
|||
From 9e08219e0e99ee2589cf35fa8d52cef3515accce Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
Date: Thu, 12 Dec 2019 15:47:49 +0100
|
||||
Subject: [PATCH] test: patch out failing bits
|
||||
|
||||
I have confirmed on the host distro (Ubuntu 18.04) that they
|
||||
fail as well; upstream probably haven't noticed because the
|
||||
test is only executed under sudo.
|
||||
|
||||
Upstream-Status: Inappropriate [disabling tests instead of fixing them properly]
|
||||
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
---
|
||||
test/root/permissions.test | 13 -------------
|
||||
1 file changed, 13 deletions(-)
|
||||
|
||||
diff --git a/test/root/permissions.test b/test/root/permissions.test
|
||||
index 8f8f825..21e8a95 100644
|
||||
--- a/test/root/permissions.test
|
||||
+++ b/test/root/permissions.test
|
||||
@@ -50,10 +50,6 @@ User daemon is a member in the owning group, which has only read access.
|
||||
Verify this.
|
||||
|
||||
$ su daemon
|
||||
- $ cat f
|
||||
- > root
|
||||
- > bin
|
||||
-
|
||||
$ echo daemon >> f
|
||||
>~ .*f: Permission denied$
|
||||
|
||||
@@ -146,8 +142,6 @@ the owning group, he should still have no write access.
|
||||
$ setfacl -x g:daemon f
|
||||
|
||||
$ su daemon
|
||||
- $ echo daemon4 >> f
|
||||
- >~ .*f: Permission denied$
|
||||
|
||||
|
||||
Change the owning group. The other permissions should now grant user
|
||||
@@ -158,12 +152,6 @@ daemon write access.
|
||||
|
||||
$ su daemon
|
||||
$ echo daemon5 >> f
|
||||
- $ cat f
|
||||
- > root
|
||||
- > bin
|
||||
- > daemon
|
||||
- > daemon2
|
||||
- > daemon5
|
||||
|
||||
|
||||
Verify that permissions in separate matching ACL entries do not
|
||||
@@ -173,7 +161,6 @@ accumulate.
|
||||
$ setfacl -m g:bin:r,g:daemon:w f
|
||||
|
||||
$ su daemon
|
||||
- $ : < f
|
||||
$ : > f
|
||||
$ : <> f
|
||||
>~ .*f: Permission denied$
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
From 39d332a8801de5d9ef09dacb3dba85c208b7b2ad Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
Date: Thu, 12 Dec 2019 13:45:52 +0100
|
||||
Subject: [PATCH] tests: do not hardcode the build path into a helper library
|
||||
|
||||
Upstream-Status: Inappropriate [oe-core specific]
|
||||
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
---
|
||||
test/Makemodule.am | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/Makemodule.am b/test/Makemodule.am
|
||||
index 17d4927..015de7f 100644
|
||||
--- a/test/Makemodule.am
|
||||
+++ b/test/Makemodule.am
|
||||
@@ -30,7 +30,7 @@ EXTRA_DIST += \
|
||||
check_LTLIBRARIES = libtestlookup.la
|
||||
|
||||
libtestlookup_la_SOURCES = test/test_passwd.c test/test_group.c
|
||||
-libtestlookup_la_CFLAGS = -DBASEDIR=\"$(abs_srcdir)\"
|
||||
+libtestlookup_la_CFLAGS = -DBASEDIR=\"/tmp/acl-ptest\"
|
||||
libtestlookup_la_LDFLAGS = -rpath $(abs_builddir)
|
||||
|
||||
AM_TESTS_ENVIRONMENT = PATH="$(abs_top_builddir):$$PATH";
|
|
@ -0,0 +1,198 @@
|
|||
acl: fix the order of expected output of getfacl
|
||||
|
||||
The result of getfacl is sorted by user id.
|
||||
In Centos or RHEL, bin user id is 1 and daemon user id is 2.
|
||||
But in our image, bin user id is 2 and daemon user id is 1.
|
||||
The patch fixes this issue to make ptest pass.
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
|
||||
---
|
||||
test/misc.test | 38 +++++++++++++++++++-------------------
|
||||
1 file changed, 19 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/test/misc.test b/test/misc.test
|
||||
index 6e98053..53ae5b0 100644
|
||||
--- a/test/misc.test
|
||||
+++ b/test/misc.test
|
||||
@@ -79,8 +79,8 @@ Multiple users
|
||||
|
||||
$ getfacl --omit-header f
|
||||
> user::rw-
|
||||
- > user:bin:rw-
|
||||
> user:daemon:r--
|
||||
+ > user:bin:rw-
|
||||
> group::r--
|
||||
> mask::rw-
|
||||
> other::r--
|
||||
@@ -94,8 +94,8 @@ Multiple groups
|
||||
|
||||
$ getfacl --omit-header f
|
||||
> user::rw-
|
||||
- > user:bin:rw-
|
||||
> user:daemon:r--
|
||||
+ > user:bin:rw-
|
||||
> group::r--
|
||||
> group:daemon:r--
|
||||
> group:users:rw-
|
||||
@@ -111,8 +111,8 @@ Remove one group
|
||||
|
||||
$ getfacl --omit-header f
|
||||
> user::rw-
|
||||
- > user:bin:rw-
|
||||
> user:daemon:r--
|
||||
+ > user:bin:rw-
|
||||
> group::r--
|
||||
> group:daemon:r--
|
||||
> mask::rw-
|
||||
@@ -146,8 +146,8 @@ Default ACL
|
||||
|
||||
$ getfacl --omit-header d
|
||||
> user::rwx
|
||||
- > user:bin:rwx
|
||||
> user:daemon:rw-
|
||||
+ > user:bin:rwx
|
||||
> group::r-x
|
||||
> mask::rwx
|
||||
> other::---
|
||||
@@ -236,16 +236,16 @@ Add some users and groups
|
||||
|
||||
$ getfacl --omit-header d/d
|
||||
> user::rwx
|
||||
- > user:bin:rwx #effective:r-x
|
||||
> user:daemon:r-x
|
||||
+ > user:bin:rwx #effective:r-x
|
||||
> group::r-x
|
||||
> group:daemon:rwx #effective:r-x
|
||||
> group:users:r-x
|
||||
> mask::r-x
|
||||
> other::---
|
||||
> default:user::rwx
|
||||
- > default:user:bin:rwx #effective:r-x
|
||||
> default:user:daemon:r-x
|
||||
+ > default:user:bin:rwx #effective:r-x
|
||||
> default:group::r-x
|
||||
> default:mask::r-x
|
||||
> default:other::---
|
||||
@@ -262,16 +262,16 @@ Symlink in directory with default ACL?
|
||||
|
||||
$ getfacl --omit-header d/l
|
||||
> user::rwx
|
||||
- > user:bin:rwx #effective:r-x
|
||||
> user:daemon:r-x
|
||||
+ > user:bin:rwx #effective:r-x
|
||||
> group::r-x
|
||||
> group:daemon:rwx #effective:r-x
|
||||
> group:users:r-x
|
||||
> mask::r-x
|
||||
> other::---
|
||||
> default:user::rwx
|
||||
- > default:user:bin:rwx #effective:r-x
|
||||
> default:user:daemon:r-x
|
||||
+ > default:user:bin:rwx #effective:r-x
|
||||
> default:group::r-x
|
||||
> default:mask::r-x
|
||||
> default:other::---
|
||||
@@ -287,16 +287,16 @@ Does mask manipulation work?
|
||||
|
||||
$ getfacl --omit-header d/d
|
||||
> user::rwx
|
||||
- > user:bin:r-x
|
||||
> user:daemon:r-x
|
||||
+ > user:bin:r-x
|
||||
> group::r-x
|
||||
> group:daemon:r-x
|
||||
> group:users:r-x
|
||||
> mask::r-x
|
||||
> other::---
|
||||
> default:user::rwx
|
||||
- > default:user:bin:rwx #effective:r-x
|
||||
> default:user:daemon:r-x
|
||||
+ > default:user:bin:rwx #effective:r-x
|
||||
> default:group::r-x
|
||||
> default:mask::r-x
|
||||
> default:other::---
|
||||
@@ -308,16 +308,16 @@ Does mask manipulation work?
|
||||
|
||||
$ getfacl --omit-header d/d
|
||||
> user::rwx
|
||||
- > user:bin:r-x
|
||||
> user:daemon:r-x
|
||||
+ > user:bin:r-x
|
||||
> group::r-x
|
||||
> group:daemon:r-x
|
||||
> group:users:r-x
|
||||
> mask::r-x
|
||||
> other::---
|
||||
> default:user::rwx
|
||||
- > default:user:bin:rwx
|
||||
> default:user:daemon:r-x
|
||||
+ > default:user:bin:rwx
|
||||
> default:group::r-x
|
||||
> default:mask::rwx
|
||||
> default:other::---
|
||||
@@ -333,8 +333,8 @@ Remove the default ACL
|
||||
|
||||
$ getfacl --omit-header d
|
||||
> user::rwx
|
||||
- > user:bin:rwx
|
||||
> user:daemon:rw-
|
||||
+ > user:bin:rwx
|
||||
> group::r-x
|
||||
> mask::rwx
|
||||
> other::---
|
||||
@@ -373,14 +373,14 @@ Now, chmod should change the group_obj entry
|
||||
|
||||
$ getfacl --omit-header d
|
||||
> user::rwx
|
||||
- > user:bin:r-x
|
||||
> user:daemon:rwx
|
||||
+ > user:bin:r-x
|
||||
> group::rwx
|
||||
> mask::rwx
|
||||
> other::r-x
|
||||
> default:user::rwx
|
||||
- > default:user:bin:r-x
|
||||
> default:user:daemon:rwx
|
||||
+ > default:user:bin:r-x
|
||||
> default:group::rwx
|
||||
> default:mask::rwx
|
||||
> default:other::r-x
|
||||
@@ -392,14 +392,14 @@ Now, chmod should change the group_obj entry
|
||||
|
||||
$ getfacl --omit-header d
|
||||
> user::rwx
|
||||
- > user:bin:r-x
|
||||
> user:daemon:rwx #effective:r-x
|
||||
+ > user:bin:r-x
|
||||
> group::rwx #effective:r-x
|
||||
> mask::r-x
|
||||
> other::---
|
||||
> default:user::rwx
|
||||
- > default:user:bin:r-x
|
||||
> default:user:daemon:rwx
|
||||
+ > default:user:bin:r-x
|
||||
> default:group::rwx
|
||||
> default:mask::rwx
|
||||
> default:other::r-x
|
||||
@@ -411,14 +411,14 @@ Now, chmod should change the group_obj entry
|
||||
|
||||
$ getfacl --omit-header d
|
||||
> user::rwx
|
||||
- > user:bin:r-x
|
||||
> user:daemon:rwx #effective:r-x
|
||||
+ > user:bin:r-x
|
||||
> group::rwx #effective:r-x
|
||||
> mask::r-x
|
||||
> other::---
|
||||
> default:user::rwx
|
||||
- > default:user:bin:r-x
|
||||
> default:user:daemon:rwx
|
||||
+ > default:user:bin:r-x
|
||||
> default:group::rwx
|
||||
> default:mask::rwx
|
||||
> default:other::r-x
|
||||
--
|
||||
1.7.9.5
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
Upstream-Status: Backport [configure.ac is missing from tarball]
|
||||
|
||||
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
||||
|
||||
Index: acl-2.2.52/configure.ac
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ acl-2.2.52/configure.ac
|
||||
@@ -0,0 +1,50 @@
|
||||
+
|
||||
+# Copyright (C) 2009 Andreas Gruenbacher <agruen@suse.de>
|
||||
+#
|
||||
+# This program is free software: you can redistribute it and/or modify it
|
||||
+# under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation, either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+#
|
||||
+AC_INIT(include/acl.h)
|
||||
+AC_CONFIG_AUX_DIR([.])
|
||||
+AC_CONFIG_MACRO_DIR([m4])
|
||||
+AC_CONFIG_HEADER(include/config.h)
|
||||
+AC_PREFIX_DEFAULT(/usr)
|
||||
+
|
||||
+AC_PROG_LIBTOOL
|
||||
+
|
||||
+AC_ARG_ENABLE(shared,
|
||||
+[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
|
||||
+ enable_shared=yes)
|
||||
+AC_SUBST(enable_shared)
|
||||
+
|
||||
+AC_ARG_ENABLE(gettext,
|
||||
+[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
|
||||
+ enable_gettext=yes)
|
||||
+AC_SUBST(enable_gettext)
|
||||
+
|
||||
+AC_ARG_ENABLE(lib64,
|
||||
+[ --enable-lib64=[yes/no] Enable lib64 support [default=no]],,
|
||||
+ enable_lib64=no)
|
||||
+AC_SUBST(enable_lib64)
|
||||
+
|
||||
+AC_PACKAGE_GLOBALS(acl)
|
||||
+AC_PACKAGE_UTILITIES(acl)
|
||||
+AC_PACKAGE_NEED_ATTR_XATTR_H
|
||||
+AC_PACKAGE_NEED_ATTR_ERROR_H
|
||||
+AC_MULTILIB($enable_lib64)
|
||||
+AC_PACKAGE_NEED_GETXATTR_LIBATTR
|
||||
+AC_MANUAL_FORMAT
|
||||
+
|
||||
+AC_FUNC_GCC_VISIBILITY
|
||||
+
|
||||
+AC_OUTPUT(include/builddefs)
|
|
@ -4,7 +4,61 @@
|
|||
|
||||
#umask 077
|
||||
|
||||
mkdir -p /tmp/acl-ptest/test
|
||||
cp test/test.* /tmp/acl-ptest/test
|
||||
EXT3_IMAGE=ext3.img
|
||||
EXT3_MOUNT_POINT=/mnt/ext3
|
||||
|
||||
make test-suite.log
|
||||
trap 'rm -f ${EXT3_IMAGE}' EXIT
|
||||
|
||||
dd if=/dev/zero of=${EXT3_IMAGE} bs=1M count=1
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "PASS: dump ext3.img"
|
||||
else
|
||||
echo "FAIL: dump ext3.img"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkfs.ext3 -F ${EXT3_IMAGE}
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "PASS: mkfs.ext3 -F ext3.img"
|
||||
else
|
||||
echo "FAIL: mkfs.ext3 -F ext3.img"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -d $EXT3_MOUNT_POINT ]; then
|
||||
echo "mount point exist"
|
||||
else
|
||||
mkdir -p $EXT3_MOUNT_POINT
|
||||
fi
|
||||
|
||||
|
||||
mount -o loop,rw,acl ${EXT3_IMAGE} $EXT3_MOUNT_POINT
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "PASS: mount ext3.img"
|
||||
else
|
||||
echo "FAIL: mount ext3.img"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp -rf ./test/ $EXT3_MOUNT_POINT
|
||||
|
||||
cd $EXT3_MOUNT_POINT/test/
|
||||
|
||||
if sed -e 's!^bin:x:2:$!bin:x:2:daemon!' < /etc/group > gtmp
|
||||
then if cp /etc/group group.orig;
|
||||
then cp gtmp /etc/group
|
||||
make -k tests root-tests | sed \
|
||||
-e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \
|
||||
-e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|'
|
||||
cp group.orig /etc/group
|
||||
else echo "FAIL: couldn't save original group file."
|
||||
exit 1
|
||||
fi
|
||||
else echo "FAIL: couldn't create modified group file."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd -
|
||||
umount $EXT3_MOUNT_POINT
|
||||
rm -rf $EXT3_MOUNT_POINT
|
||||
rm $EXT3_IMAGE
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
commit c45bae84817a70fef6c2b661a07a492a0d23ae85
|
||||
Author: Peter Seebach <peter.seebach@windriver.com>
|
||||
Date: Wed May 11 15:16:06 2016 -0500
|
||||
|
||||
Fix permissions on temporary directory
|
||||
|
||||
The temporary directory's permissions have to allow other users to
|
||||
view the directory. A default umask of 022 is common, but not mandatory,
|
||||
and secure systems may have more restrictive defaults.
|
||||
|
||||
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
|
||||
|
||||
diff --git a/test/root/permissions.test b/test/root/permissions.test
|
||||
index 42615f5..098b52a 100644
|
||||
--- a/test/root/permissions.test
|
||||
+++ b/test/root/permissions.test
|
||||
@@ -16,6 +16,7 @@ Cry immediately if we are not running as root.
|
||||
First, set up a temporary directory and create a regular file with
|
||||
defined permissions.
|
||||
|
||||
+ $ umask 022
|
||||
$ mkdir d
|
||||
$ cd d
|
||||
$ umask 027
|
|
@ -0,0 +1,108 @@
|
|||
From e98ce8acf84d12ea67a3ac76bf63c6d87d9af86d Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Mon, 20 May 2013 16:38:06 +0200
|
||||
Subject: [PATCH] test: fix insufficient quoting of '\'
|
||||
|
||||
This is a follow-up to 7f2c91b8369242a8dbc2b304a5b71b2a85f5b855, which
|
||||
caused sbits-restore.test to fail in the following way in case SELinux
|
||||
was disabled:
|
||||
|
||||
*** sbits-restore.test ***
|
||||
[3] $ umask 022 -- ok
|
||||
[4] $ mkdir d -- ok
|
||||
[5] $ touch d/g -- ok
|
||||
[6] $ touch d/u -- ok
|
||||
[7] $ chmod u+s d/u -- ok
|
||||
[8] $ chmod g+s d/g -- ok
|
||||
[9] $ chmod +t d -- ok
|
||||
[10] $ getfacl -R d > d.acl -- ok
|
||||
[11] $ rm -R d -- ok
|
||||
[12] $ mkdir d -- ok
|
||||
[13] $ touch d/g -- ok
|
||||
[14] $ touch d/u -- ok
|
||||
[15] $ setfacl --restore d.acl -- ok
|
||||
[16] $ ls -dl d | awk '{print $1}' | sed 's/.$//g' -- failed
|
||||
drwxr-xr- != drwxr-xr-t
|
||||
[18] $ ls -dl d/u | awk '{print $1}' | sed 's/.$//g' -- failed
|
||||
-rwSr--r- != -rwSr--r--
|
||||
[20] $ ls -dl d/g | awk '{print $1}' | sed 's/.$//g' -- failed
|
||||
-rw-r-Sr- != -rw-r-Sr--
|
||||
[22] $ rm -Rf d -- ok
|
||||
17 commands (14 passed, 3 failed)
|
||||
|
||||
Upstream-Status: Backport
|
||||
http://git.savannah.gnu.org/cgit/acl.git/commit/?id=e98ce8acf84d12ea67a3ac76bf63c6d87d9af86d
|
||||
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
Signed-off-by: He Zhe <zhe.he@windriver.com>
|
||||
---
|
||||
test/cp.test | 2 +-
|
||||
test/misc.test | 6 +++---
|
||||
test/sbits-restore.test | 6 +++---
|
||||
3 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/test/cp.test b/test/cp.test
|
||||
index 0867f63..a927195 100644
|
||||
--- a/test/cp.test
|
||||
+++ b/test/cp.test
|
||||
@@ -9,7 +9,7 @@ The cp utility should only copy ACLs if `-p' is given.
|
||||
> -rw-rw-r--+
|
||||
|
||||
$ cp f g
|
||||
- $ ls -l g | awk -- '{ print $1 }' | sed 's/\.$//g'
|
||||
+ $ ls -l g | awk -- '{ print $1 }' | sed 's/\\.$//g'
|
||||
> -rw-r--r--
|
||||
|
||||
$ rm g
|
||||
diff --git a/test/misc.test b/test/misc.test
|
||||
index 6e98053..29372b7 100644
|
||||
--- a/test/misc.test
|
||||
+++ b/test/misc.test
|
||||
@@ -254,7 +254,7 @@ Add some users and groups
|
||||
Symlink in directory with default ACL?
|
||||
|
||||
$ ln -s d d/l
|
||||
- $ ls -dl d/l | awk '{print $1}' | sed 's/\.$//g'
|
||||
+ $ ls -dl d/l | awk '{print $1}' | sed 's/\\.$//g'
|
||||
> lrwxrwxrwx
|
||||
|
||||
$ ls -dl -L d/l | awk '{print $1}'
|
||||
@@ -343,7 +343,7 @@ Remove the default ACL
|
||||
Reset to base entries
|
||||
|
||||
$ setfacl -b d
|
||||
- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
|
||||
+ $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
|
||||
> drwxr-x---
|
||||
|
||||
$ getfacl --omit-header d
|
||||
@@ -355,7 +355,7 @@ Reset to base entries
|
||||
Now, chmod should change the group_obj entry
|
||||
|
||||
$ chmod 775 d
|
||||
- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
|
||||
+ $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
|
||||
> drwxrwxr-x
|
||||
|
||||
$ getfacl --omit-header d
|
||||
diff --git a/test/sbits-restore.test b/test/sbits-restore.test
|
||||
index de21340..5899b0a 100644
|
||||
--- a/test/sbits-restore.test
|
||||
+++ b/test/sbits-restore.test
|
||||
@@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via --restore works
|
||||
$ touch d/g
|
||||
$ touch d/u
|
||||
$ setfacl --restore d.acl
|
||||
- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
|
||||
+ $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
|
||||
> drwxr-xr-t
|
||||
- $ ls -dl d/u | awk '{print $1}' | sed 's/\.$//g'
|
||||
+ $ ls -dl d/u | awk '{print $1}' | sed 's/\\.$//g'
|
||||
> -rwSr--r--
|
||||
- $ ls -dl d/g | awk '{print $1}' | sed 's/\.$//g'
|
||||
+ $ ls -dl d/g | awk '{print $1}' | sed 's/\\.$//g'
|
||||
> -rw-r-Sr--
|
||||
$ rm -Rf d
|
||||
--
|
||||
1.9.1
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
From d2f49ee6fe4850b8dda5b08676b36201d3c43710 Mon Sep 17 00:00:00 2001
|
||||
From: He Zhe <zhe.he@windriver.com>
|
||||
Date: Wed, 2 Mar 2016 15:46:57 +0800
|
||||
Subject: [PATCH] test: fixups on SELinux machines for root testcases
|
||||
|
||||
ls adds a '.' at the end of the permission field list on SELinux
|
||||
machines, filter this out so root tests work on SELinux machines.
|
||||
|
||||
Upstream-Status: Accepted
|
||||
http://git.savannah.gnu.org/cgit/acl.git/commit/?id=26a87d36f80d5e98bccb5878834d9e69dadfe3e9
|
||||
|
||||
Signed-off-by: He Zhe <zhe.he@windriver.com>
|
||||
---
|
||||
test/root/permissions.test | 8 ++++----
|
||||
test/root/restore.test | 2 +-
|
||||
test/root/setfacl.test | 2 +-
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/test/root/permissions.test b/test/root/permissions.test
|
||||
index 9b9e3de..665339a 100644
|
||||
--- a/test/root/permissions.test
|
||||
+++ b/test/root/permissions.test
|
||||
@@ -19,7 +19,7 @@ defined permissions.
|
||||
$ cd d
|
||||
$ umask 027
|
||||
$ touch f
|
||||
- $ ls -l f | awk -- '{ print $1, $3, $4 }'
|
||||
+ $ ls -l f | awk -- '{ print $1, $3, $4 }' | sed 's/\\.//g'
|
||||
> -rw-r----- root root
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ Now, change the ownership of the file to bin:bin and verify that this
|
||||
gives user bin write access.
|
||||
|
||||
$ chown bin:bin f
|
||||
- $ ls -l f | awk -- '{ print $1, $3, $4 }'
|
||||
+ $ ls -l f | awk -- '{ print $1, $3, $4 }' | sed 's/\\.//g'
|
||||
> -rw-r----- bin bin
|
||||
$ su bin
|
||||
$ echo bin >> f
|
||||
@@ -256,12 +256,12 @@ directories if the file has an ACL and only CAP_FOWNER would grant them.
|
||||
$ mkdir -m 600 x
|
||||
$ chown daemon:daemon x
|
||||
$ echo j > x/j
|
||||
- $ ls -l x/j | awk -- '{ print $1, $3, $4 }'
|
||||
+ $ ls -l x/j | awk -- '{ print $1, $3, $4 }' | sed 's/\\.//g'
|
||||
> -rw-r----- root root
|
||||
|
||||
$ setfacl -m u:daemon:r x
|
||||
|
||||
- $ ls -l x/j | awk -- '{ print $1, $3, $4 }'
|
||||
+ $ ls -l x/j | awk -- '{ print $1, $3, $4 }' | sed 's/\\.//g'
|
||||
> -rw-r----- root root
|
||||
(With the bug this gives: `ls: x/j: Permission denied'.)
|
||||
|
||||
diff --git a/test/root/restore.test b/test/root/restore.test
|
||||
index 63a9d01..c85097c 100644
|
||||
--- a/test/root/restore.test
|
||||
+++ b/test/root/restore.test
|
||||
@@ -21,7 +21,7 @@ Cry immediately if we are not running as root.
|
||||
$ chown bin passwd
|
||||
$ chmod u+s passwd
|
||||
$ setfacl --restore passwd.acl
|
||||
- $ ls -dl passwd | awk '{print $1 " " $3 " " $4}'
|
||||
+ $ ls -dl passwd | awk '{print $1 " " $3 " " $4}' | sed 's/\\.//g'
|
||||
> -rwsr-xr-x root root
|
||||
|
||||
$ rm passwd passwd.acl
|
||||
diff --git a/test/root/setfacl.test b/test/root/setfacl.test
|
||||
index a46a9f4..7efbad7 100644
|
||||
--- a/test/root/setfacl.test
|
||||
+++ b/test/root/setfacl.test
|
||||
@@ -12,7 +12,7 @@ Cry immediately if we are not running as root.
|
||||
$ sg bin
|
||||
$ umask 027
|
||||
$ touch g
|
||||
- $ ls -dl g | awk '{print $1}'
|
||||
+ $ ls -dl g | awk '{print $1}' | sed 's/\\.//g'
|
||||
> -rw-r-----
|
||||
|
||||
$ setfacl -m m:- g
|
||||
--
|
||||
1.9.1
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
require acl.inc
|
||||
|
||||
SRC_URI += "file://add-missing-configure.ac.patch"
|
||||
|
||||
SRC_URI[md5sum] = "a61415312426e9c2212bd7dc7929abda"
|
||||
SRC_URI[sha256sum] = "179074bb0580c06c4b4137be4c5a92a701583277967acdb5546043c7874e0d23"
|
||||
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
|
@ -1,78 +0,0 @@
|
|||
SUMMARY = "Utilities for managing POSIX Access Control Lists"
|
||||
DESCRIPTION = "ACL allows you to provide different levels of access to files \
|
||||
and folders for different users."
|
||||
|
||||
HOMEPAGE = "http://savannah.nongnu.org/projects/acl/"
|
||||
BUGTRACKER = "http://savannah.nongnu.org/bugs/?group=acl"
|
||||
|
||||
SECTION = "libs"
|
||||
|
||||
LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
|
||||
LICENSE_${PN} = "GPL-2.0-or-later"
|
||||
LICENSE_lib${BPN} = "LGPL-2.1-or-later"
|
||||
LIC_FILES_CHKSUM = "file://doc/COPYING;md5=c781d70ed2b4d48995b790403217a249 \
|
||||
file://doc/COPYING.LGPL;md5=9e9a206917f8af112da634ce3ab41764"
|
||||
|
||||
DEPENDS = "attr"
|
||||
|
||||
SRC_URI = "${SAVANNAH_GNU_MIRROR}/acl/${BP}.tar.gz \
|
||||
file://run-ptest \
|
||||
file://0001-tests-do-not-hardcode-the-build-path-into-a-helper-l.patch \
|
||||
file://0001-test-patch-out-failing-bits.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "760c61c68901b37fdd5eefeeaf4c0c7a26bdfdd8ac747a1edff1ce0e243c11af"
|
||||
|
||||
inherit autotools gettext ptest
|
||||
|
||||
PACKAGES =+ "lib${BPN}"
|
||||
|
||||
FILES_lib${BPN} = "${libdir}/lib*${SOLIBS}"
|
||||
|
||||
PTEST_BUILD_HOST_FILES = "builddefs"
|
||||
PTEST_BUILD_HOST_PATTERN = "^RPM"
|
||||
|
||||
do_compile_ptest() {
|
||||
oe_runmake libtestlookup.la
|
||||
}
|
||||
|
||||
do_install_ptest() {
|
||||
cp -rf ${S}/test/ ${D}${PTEST_PATH}
|
||||
cp -rf ${S}/build-aux/ ${D}${PTEST_PATH}
|
||||
mkdir -p ${D}${PTEST_PATH}/.libs
|
||||
cp -rf ${B}/.libs/libtestlookup* ${D}${PTEST_PATH}/.libs
|
||||
cp ${B}/Makefile ${D}${PTEST_PATH}
|
||||
|
||||
sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
|
||||
-e 's|${DEBUG_PREFIX_MAP}||g' \
|
||||
-e 's:${HOSTTOOLS_DIR}/::g' \
|
||||
-e 's:${RECIPE_SYSROOT_NATIVE}::g' \
|
||||
-e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
|
||||
-i ${D}${PTEST_PATH}/Makefile
|
||||
|
||||
sed -i "s|^srcdir =.*|srcdir = \.|g" ${D}${PTEST_PATH}/Makefile
|
||||
sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" ${D}${PTEST_PATH}/Makefile
|
||||
sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = \.\.|g" ${D}${PTEST_PATH}/Makefile
|
||||
sed -i "s|^Makefile:.*|Makefile:|g" ${D}${PTEST_PATH}/Makefile
|
||||
|
||||
rm ${D}${PTEST_PATH}/.libs/libtestlookup.lai
|
||||
}
|
||||
|
||||
RDEPENDS_${PN}-ptest = "acl \
|
||||
bash \
|
||||
coreutils \
|
||||
perl \
|
||||
perl-module-filehandle \
|
||||
perl-module-getopt-std \
|
||||
perl-module-posix \
|
||||
shadow \
|
||||
make \
|
||||
gawk \
|
||||
e2fsprogs-mke2fs \
|
||||
perl-module-cwd \
|
||||
perl-module-file-basename \
|
||||
perl-module-file-path \
|
||||
perl-module-file-spec \
|
||||
"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
|
@ -1,65 +1,39 @@
|
|||
SUMMARY = "Utilities for manipulating filesystem extended attributes"
|
||||
DESCRIPTION = "Implement the ability for a user to attach name:value pairs to objects within the XFS filesystem."
|
||||
|
||||
HOMEPAGE = "http://savannah.nongnu.org/projects/attr/"
|
||||
SECTION = "libs"
|
||||
|
||||
DEPENDS = "virtual/libintl"
|
||||
|
||||
LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
|
||||
LICENSE_${PN} = "GPL-2.0-or-later"
|
||||
LICENSE_lib${BPN} = "LGPL-2.1-or-later"
|
||||
LICENSE = "LGPLv2.1+ & GPLv2+"
|
||||
LICENSE_${PN} = "GPLv2+"
|
||||
LICENSE_lib${BPN} = "LGPLv2.1+"
|
||||
LIC_FILES_CHKSUM = "file://doc/COPYING;md5=2d0aa14b3fce4694e4f615e30186335f \
|
||||
file://doc/COPYING.LGPL;md5=b8d31f339300bc239d73461d68e77b9c \
|
||||
file://tools/attr.c;endline=17;md5=be0403261f0847e5f43ed5b08d19593c \
|
||||
file://attr/attr.c;endline=17;md5=be0403261f0847e5f43ed5b08d19593c \
|
||||
file://libattr/libattr.c;endline=17;md5=7970f77049f8fa1199fff62a7ab724fb"
|
||||
|
||||
SRC_URI = "${SAVANNAH_GNU_MIRROR}/attr/${BP}.tar.gz \
|
||||
SRC_URI = "${SAVANNAH_GNU_MIRROR}/attr/${BP}.src.tar.gz \
|
||||
file://run-ptest \
|
||||
"
|
||||
|
||||
inherit ptest update-alternatives autotools gettext
|
||||
require ea-acl.inc
|
||||
|
||||
PACKAGES =+ "lib${BPN}"
|
||||
|
||||
FILES_lib${BPN} = "${libdir}/lib*${SOLIBS}"
|
||||
|
||||
ALTERNATIVE_PRIORITY = "100"
|
||||
ALTERNATIVE_${PN} = "setfattr"
|
||||
ALTERNATIVE_TARGET[setfattr] = "${bindir}/setfattr"
|
||||
|
||||
PTEST_BUILD_HOST_FILES = "builddefs"
|
||||
PTEST_BUILD_HOST_PATTERN = "^RPM"
|
||||
|
||||
do_install_ptest() {
|
||||
cp ${B}/Makefile ${D}${PTEST_PATH}
|
||||
sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
|
||||
-e 's|${DEBUG_PREFIX_MAP}||g' \
|
||||
-e 's:${HOSTTOOLS_DIR}/::g' \
|
||||
-e 's:${RECIPE_SYSROOT_NATIVE}::g' \
|
||||
-e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
|
||||
-i ${D}${PTEST_PATH}/Makefile
|
||||
|
||||
sed -i "s|^srcdir =.*|srcdir = \.|g" ${D}${PTEST_PATH}/Makefile
|
||||
sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" ${D}${PTEST_PATH}/Makefile
|
||||
sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = \.\.|g" ${D}${PTEST_PATH}/Makefile
|
||||
sed -i "s|^Makefile:.*|Makefile:|g" ${D}${PTEST_PATH}/Makefile
|
||||
cp -rf ${S}/build-aux/ ${D}${PTEST_PATH}
|
||||
cp -rf ${S}/test/ ${D}${PTEST_PATH}
|
||||
# libdir should point to .la
|
||||
do_install_append() {
|
||||
sed -i ${D}${libdir}/libattr.la -e \
|
||||
s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
|
||||
}
|
||||
|
||||
RDEPENDS_${PN}-ptest = "attr \
|
||||
coreutils \
|
||||
perl-module-filehandle \
|
||||
perl-module-getopt-std \
|
||||
perl-module-posix \
|
||||
make \
|
||||
perl \
|
||||
gawk \
|
||||
perl-module-cwd \
|
||||
perl-module-file-basename \
|
||||
perl-module-file-path \
|
||||
perl-module-file-spec \
|
||||
"
|
||||
inherit ptest
|
||||
|
||||
do_install_ptest() {
|
||||
tar -c --exclude=ext test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
|
||||
mkdir ${D}${PTEST_PATH}/include
|
||||
for i in builddefs buildmacros buildrules; \
|
||||
do cp ${S}/include/$i ${D}${PTEST_PATH}/include/; \
|
||||
done
|
||||
sed -e 's|; @echo|; echo|' -i ${D}${PTEST_PATH}/test/Makefile
|
||||
}
|
||||
|
||||
RDEPENDS_${PN}-ptest = "attr coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
make test-suite.log
|
|
@ -0,0 +1,12 @@
|
|||
require attr.inc
|
||||
|
||||
# configure.ac was missing from the release tarball. This should be fixed in
|
||||
# future releases of attr, remove this when updating the recipe.
|
||||
SRC_URI += "file://attr-Missing-configure.ac.patch \
|
||||
file://dont-use-decl-macros.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "84f58dec00b60f2dc8fd1c9709291cc7"
|
||||
SRC_URI[sha256sum] = "25772f653ac5b2e3ceeb89df50e4688891e21f723c460636548971652af0a859"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
|
@ -1,5 +0,0 @@
|
|||
require attr.inc
|
||||
|
||||
SRC_URI[sha256sum] = "bae1c6949b258a0d68001367ce0c741cebdacdd3b62965d17e5eb23cd78adaf8"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
|
@ -0,0 +1,50 @@
|
|||
# this build system is mostly shared by attr and acl
|
||||
|
||||
SRC_URI += "file://relative-libdir.patch;striplevel=0 \
|
||||
"
|
||||
|
||||
inherit autotools-brokensep gettext
|
||||
|
||||
# the package comes with a custom config.h.in, it cannot be
|
||||
# overwritten by autoheader
|
||||
EXTRA_AUTORECONF += "--exclude=autoheader"
|
||||
EXTRA_OECONF = "INSTALL_USER=root INSTALL_GROUP=root"
|
||||
EXTRA_OECONF_append_class-native = " --enable-gettext=no"
|
||||
EXTRA_OECONF_append_class-target = "${@['', ' --disable-gettext '][(d.getVar('USE_NLS', True) == 'no')]}"
|
||||
|
||||
EXTRA_OEMAKE = "PKG_LIB_DIR=${base_libdir} PKG_DEVLIB_DIR=${libdir}"
|
||||
|
||||
do_install () {
|
||||
oe_runmake install install-lib install-dev DIST_ROOT="${D}"
|
||||
}
|
||||
|
||||
do_install_append_class-native () {
|
||||
if test "${libdir}" = "${base_libdir}" ; then
|
||||
return
|
||||
fi
|
||||
librelpath=${@os.path.relpath(d.getVar('libdir',True), d.getVar('base_libdir', True))}
|
||||
baselibrelpath=${@os.path.relpath(d.getVar('base_libdir',True), d.getVar('libdir', True))}
|
||||
|
||||
# Remove bad symlinks & create the correct symlinks
|
||||
if test -L ${D}${libdir}/lib${BPN}.so ; then
|
||||
rm -rf ${D}${libdir}/lib${BPN}.so
|
||||
ln -sf $baselibrelpath/lib${BPN}.so ${D}${libdir}/lib${BPN}.so
|
||||
fi
|
||||
if test -L ${D}${base_libdir}/lib${BPN}.a ; then
|
||||
rm -rf ${D}${base_libdir}/lib${BPN}.a
|
||||
ln -sf $librelpath/lib${BPN}.a ${D}${base_libdir}/lib${BPN}.a
|
||||
fi
|
||||
if test -L ${D}${base_libdir}/lib${BPN}.la ; then
|
||||
rm -rf ${D}${base_libdir}/lib${BPN}.la
|
||||
ln -sf $librelpath/lib${BPN}.la ${D}${base_libdir}/lib${BPN}.la
|
||||
fi
|
||||
}
|
||||
|
||||
PACKAGES =+ "lib${BPN}"
|
||||
|
||||
FILES_lib${BPN} = "${base_libdir}/lib*${SOLIBS}"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
# Only append ldflags for target recipe and if USE_NLS is enabled
|
||||
LDFLAGS_append_libc-uclibc_class-target = "${@['', ' -lintl '][(d.getVar('USE_NLS', True) == 'yes')]}"
|
||||
EXTRA_OECONF_append_libc-uclibc_class-target = "${@['', ' --disable-gettext '][(d.getVar('USE_NLS', True) == 'no')]}"
|
|
@ -0,0 +1,63 @@
|
|||
Subject: [PATCH] attr: Missing configure.ac
|
||||
|
||||
Upstream-Status: Backport [Upstream released tarball missing this file]
|
||||
Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
|
||||
---
|
||||
configure.ac | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 48 insertions(+)
|
||||
create mode 100644 configure.ac
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
new file mode 100644
|
||||
index 0000000..b966d0e
|
||||
--- /dev/null
|
||||
+++ b/configure.ac
|
||||
@@ -0,0 +1,48 @@
|
||||
+# Copyright (C) 2009 Andreas Gruenbacher <agruen@suse.de>
|
||||
+#
|
||||
+# This program is free software: you can redistribute it and/or modify it
|
||||
+# under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation, either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+#
|
||||
+AC_INIT(include/attributes.h)
|
||||
+AC_CONFIG_AUX_DIR([.])
|
||||
+AC_CONFIG_MACRO_DIR([m4])
|
||||
+AC_CONFIG_HEADER(include/config.h)
|
||||
+AC_PREFIX_DEFAULT(/usr)
|
||||
+
|
||||
+AC_PROG_LIBTOOL
|
||||
+
|
||||
+AC_ARG_ENABLE(shared,
|
||||
+[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
|
||||
+ enable_shared=yes)
|
||||
+AC_SUBST(enable_shared)
|
||||
+
|
||||
+AC_ARG_ENABLE(gettext,
|
||||
+[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
|
||||
+ enable_gettext=yes)
|
||||
+AC_SUBST(enable_gettext)
|
||||
+
|
||||
+AC_ARG_ENABLE(lib64,
|
||||
+[ --enable-lib64=[yes/no] Enable lib64 support [default=no]],,
|
||||
+ enable_lib64=no)
|
||||
+AC_SUBST(enable_lib64)
|
||||
+
|
||||
+AC_PACKAGE_GLOBALS(attr)
|
||||
+AC_PACKAGE_UTILITIES(attr)
|
||||
+AC_MANUAL_FORMAT
|
||||
+AC_MULTILIB($enable_lib64)
|
||||
+
|
||||
+AC_C_CONST
|
||||
+AC_TYPE_MODE_T
|
||||
+AC_FUNC_ALLOCA
|
||||
+
|
||||
+AC_OUTPUT(include/builddefs)
|
|
@ -0,0 +1,56 @@
|
|||
Use extern "C" instead of __BEGIN_DECL/__END_DECL macros
|
||||
these macros are defined in sys/cdefs.h for glibc and this header is not available on all libc
|
||||
|
||||
anyway they defined like below
|
||||
|
||||
#ifdef __cplusplus
|
||||
# define __BEGIN_DECLS extern "C" {
|
||||
# define __END_DECLS }
|
||||
#else
|
||||
# define __BEGIN_DECLS /* empty */
|
||||
# define __END_DECLS /* empty */
|
||||
#endif
|
||||
|
||||
__THROW macro is also not available on musl, defined thusly
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
Index: attr-2.4.47/include/xattr.h
|
||||
===================================================================
|
||||
--- attr-2.4.47.orig/include/xattr.h 2014-04-02 00:01:30.252091280 -0700
|
||||
+++ attr-2.4.47/include/xattr.h 2014-04-02 00:12:57.985428099 -0700
|
||||
@@ -30,8 +30,20 @@
|
||||
#define XATTR_CREATE 0x1 /* set value, fail if attr already exists */
|
||||
#define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */
|
||||
|
||||
-
|
||||
-__BEGIN_DECLS
|
||||
+#ifndef __THROW
|
||||
+# ifndef __GNUC_PREREQ
|
||||
+# define __GNUC_PREREQ(maj, min) (0)
|
||||
+# endif
|
||||
+# if defined __cplusplus && __GNUC_PREREQ (2,8)
|
||||
+# define __THROW throw ()
|
||||
+# else
|
||||
+# define __THROW
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
|
||||
extern int setxattr (const char *__path, const char *__name,
|
||||
const void *__value, size_t __size, int __flags) __THROW;
|
||||
@@ -58,6 +70,8 @@
|
||||
extern int lremovexattr (const char *__path, const char *__name) __THROW;
|
||||
extern int fremovexattr (int __filedes, const char *__name) __THROW;
|
||||
|
||||
-__END_DECLS
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
|
||||
#endif /* __XATTR_H__ */
|
|
@ -0,0 +1,25 @@
|
|||
Upstream-Status: Pending
|
||||
|
||||
use relative path in symbolic links, or it fails in staging
|
||||
sed expression from udev
|
||||
|
||||
7/29/2010 - created by Qing He <qing.he@intel.com>
|
||||
|
||||
diff -u include.orig/buildmacros include/buildmacros
|
||||
--- include.orig/buildmacros 2010-07-29 17:39:48.000000000 +0800
|
||||
+++ include/buildmacros 2010-07-29 18:20:34.000000000 +0800
|
||||
@@ -88,9 +88,11 @@
|
||||
../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
|
||||
../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_LIB_DIR); \
|
||||
if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \
|
||||
- ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \
|
||||
- ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \
|
||||
- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so; \
|
||||
+ rel_lib_prefix=$$(echo $(PKG_LIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
|
||||
+ ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \
|
||||
+ ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \
|
||||
+ rel_devlib_prefix=$$(echo $(PKG_DEVLIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
|
||||
+ ../$(INSTALL) -S $$rel_devlib_prefix$(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so; \
|
||||
fi
|
||||
else
|
||||
INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC)
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
make -C test -k tests root-tests |sed \
|
||||
-e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \
|
||||
-e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|'
|
|
@ -1,31 +0,0 @@
|
|||
SUMMARY = "A portable foreign function interface library"
|
||||
DESCRIPTION = "The `libffi' library provides a portable, high level programming interface to various calling \
|
||||
conventions. This allows a programmer to call any function specified by a call interface description at run \
|
||||
time. FFI stands for Foreign Function Interface. A foreign function interface is the popular name for the \
|
||||
interface that allows code written in one language to call code written in another language. The `libffi' \
|
||||
library really only provides the lowest, machine dependent layer of a fully featured foreign function interface. \
|
||||
A layer must exist above `libffi' that handles type conversions for values passed between the two languages."
|
||||
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=3610bb17683a0089ed64055416b2ae1b"
|
||||
|
||||
SRC_URI = "ftp://sourceware.org/pub/libffi/${BP}.tar.gz \
|
||||
file://not-win32.patch \
|
||||
file://0001-mips-Use-compiler-internal-define-for-linux.patch \
|
||||
file://0001-mips-fix-MIPS-softfloat-build-issue.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "83b89587607e3eb65c70d361f13bab43"
|
||||
SRC_URI[sha256sum] = "d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37"
|
||||
|
||||
EXTRA_OECONF += "--disable-builddir"
|
||||
|
||||
inherit autotools texinfo
|
||||
|
||||
FILES_${PN}-dev += "${libdir}/libffi-${PV}"
|
||||
|
||||
# Doesn't compile in MIPS16e mode due to use of hand-written
|
||||
# assembly
|
||||
MIPS_INSTRUCTION_SET = "mips"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
Loading…
Reference in New Issue