From 0680c1343a36a032ed1449dab9c74d7e18814be9 Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 15 Oct 2019 13:51:39 -0300 Subject: testing/libuser: rebuild with musl's secure_getenv --- testing/libuser/0001-Check-for-issetugid.patch | 62 ---------------------- .../libuser/0001-remove-unused-execinfo.h.patch | 27 ++++++++++ .../libuser/0002-remove-unused-execinfo.h.patch | 27 ---------- testing/libuser/APKBUILD | 8 ++- 4 files changed, 30 insertions(+), 94 deletions(-) delete mode 100644 testing/libuser/0001-Check-for-issetugid.patch create mode 100644 testing/libuser/0001-remove-unused-execinfo.h.patch delete mode 100644 testing/libuser/0002-remove-unused-execinfo.h.patch (limited to 'testing/libuser') diff --git a/testing/libuser/0001-Check-for-issetugid.patch b/testing/libuser/0001-Check-for-issetugid.patch deleted file mode 100644 index 79756b9a07..0000000000 --- a/testing/libuser/0001-Check-for-issetugid.patch +++ /dev/null @@ -1,62 +0,0 @@ -From d0537cb7f2dc5877700ad78dfd191515379d4edc Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 7 Jan 2016 02:22:51 +0000 -Subject: [PATCH 1/2] Check for issetugid() - -If secure version of getenv is not there then we can use -issetugid() as aid to call getenv() - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - configure.ac | 1 + - lib/config.c | 12 +++++++++++- - 2 files changed, 12 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 1ded1a2..ee19e1f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -125,6 +125,7 @@ AC_TYPE_OFF_T - AC_TYPE_SIZE_T - - AC_CHECK_FUNCS([__secure_getenv secure_getenv]) -+AC_CHECK_FUNCS([issetugid]) - - # Modify CFLAGS after all tests are run (some of them could fail because - # of the -Werror). -diff --git a/lib/config.c b/lib/config.c -index 29e7120..30f9daf 100644 ---- a/lib/config.c -+++ b/lib/config.c -@@ -44,8 +44,10 @@ - # define safe_getenv(string) secure_getenv(string) - #elif defined(HAVE___SECURE_GETENV) - # define safe_getenv(string) __secure_getenv(string) -+#elif defined(HAVE_ISSETUGID) -+# define safe_getenv(string) safe_getenv_issetugid(string) - #else --# error Neither secure_getenv not __secure_getenv are available -+# error None of secure_getenv, __secure_getenv, or issetugid is available - #endif - - struct config_config { -@@ -59,6 +61,14 @@ struct config_key { - GList *values; - }; - -+static const char* -+safe_getenv_issetugid(const char* name) -+{ -+ if (issetugid ()) -+ return 0; -+ return getenv (name); -+} -+ - /* Compare two section names */ - static int - compare_section_names(gconstpointer a, gconstpointer b) --- -2.7.0 - diff --git a/testing/libuser/0001-remove-unused-execinfo.h.patch b/testing/libuser/0001-remove-unused-execinfo.h.patch new file mode 100644 index 0000000000..4bc0219f19 --- /dev/null +++ b/testing/libuser/0001-remove-unused-execinfo.h.patch @@ -0,0 +1,27 @@ +From 4b2f81f307ffeac12956e5c16e894e5ebb937ea5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 7 Jan 2016 02:26:00 +0000 +Subject: [PATCH 2/2] remove unused execinfo.h + +Signed-off-by: Khem Raj +--- +Upstream-Status: Pending + + lib/error.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/lib/error.c b/lib/error.c +index a5ec30a..443e601 100644 +--- a/lib/error.c ++++ b/lib/error.c +@@ -18,7 +18,6 @@ + #include + #include + #include +-#include + #include + #include + #include +-- +2.7.0 + diff --git a/testing/libuser/0002-remove-unused-execinfo.h.patch b/testing/libuser/0002-remove-unused-execinfo.h.patch deleted file mode 100644 index 4bc0219f19..0000000000 --- a/testing/libuser/0002-remove-unused-execinfo.h.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 4b2f81f307ffeac12956e5c16e894e5ebb937ea5 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 7 Jan 2016 02:26:00 +0000 -Subject: [PATCH 2/2] remove unused execinfo.h - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - lib/error.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/lib/error.c b/lib/error.c -index a5ec30a..443e601 100644 ---- a/lib/error.c -+++ b/lib/error.c -@@ -18,7 +18,6 @@ - #include - #include - #include --#include - #include - #include - #include --- -2.7.0 - diff --git a/testing/libuser/APKBUILD b/testing/libuser/APKBUILD index 166fd90bdb..55ed08b60a 100644 --- a/testing/libuser/APKBUILD +++ b/testing/libuser/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Francesco Colista pkgname=libuser pkgver=0.62 -pkgrel=2 +pkgrel=3 pkgdesc="A standardized interface for manipulating and administering user and group accounts" url="https://pagure.io/libuser" arch="all" @@ -12,8 +12,7 @@ makedepends="python3-dev glib-dev popt-dev libexecinfo-dev linux-pam-dev autoconf automake libtool" subpackages="$pkgname-dev $pkgname-doc $pkgname-lang py3-$pkgname:_py" source="https://releases.pagure.org/libuser/libuser-$pkgver.tar.xz - 0001-Check-for-issetugid.patch - 0002-remove-unused-execinfo.h.patch + 0001-remove-unused-execinfo.h.patch " prepare() { @@ -47,5 +46,4 @@ _py() { } sha512sums="bc2f68456eae5912ac236192e97a3d66d5fa782520eff48d44d391c1ade590e001d821d7a93499e2391d0310cf03f60e4411f045f6ee3301af4e174d9ddc8450 libuser-0.62.tar.xz -544f5124bf9a78daa99cf6d3f5b89c8519d7385aa7d1da9384fe29fea7285e61d7c91a865303258669232c3ed0590c8143e8acad66a6e1bc87069444e4af40b1 0001-Check-for-issetugid.patch -b7da24da834b7e00e3449ab49c2187b0d8993079888b0900b62ec418db8fc025a22ee4b779715cc6ca327b614d97dd1fbf0a33f4f22fedade06782a3ba11f599 0002-remove-unused-execinfo.h.patch" +b7da24da834b7e00e3449ab49c2187b0d8993079888b0900b62ec418db8fc025a22ee4b779715cc6ca327b614d97dd1fbf0a33f4f22fedade06782a3ba11f599 0001-remove-unused-execinfo.h.patch" -- cgit v1.2.3