From e509876789b7d4541845010421f54183acc941c78c757717c16f87cec8193afc Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Wed, 14 Sep 2022 13:51:34 +0000 Subject: [PATCH] Accepting request 1002507 from home:gmbr3:Active - Add u_glibc-2.36.patch: use glibc's arc4random instead of libbsd's (bsc#1202222) OBS-URL: https://build.opensuse.org/request/show/1002507 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xdm?expand=0&rev=252 --- u_glibc-2.36.patch | 39 +++++++++++++++++++++++++++++++++++++++ xdm.changes | 6 ++++++ xdm.spec | 3 ++- 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 u_glibc-2.36.patch diff --git a/u_glibc-2.36.patch b/u_glibc-2.36.patch new file mode 100644 index 0000000..6d676cb --- /dev/null +++ b/u_glibc-2.36.patch @@ -0,0 +1,39 @@ +From 468b76023a2dfb750c4d5e9b184f230c5b6ec670 Mon Sep 17 00:00:00 2001 +From: Callum Farmer +Date: Sun, 11 Sep 2022 12:57:05 +0100 +Subject: [PATCH] genauth: fix build with arc4random in glibc 2.36 +Patch-mainline: to be upstreamed +References: https://gitlab.freedesktop.org/xorg/app/xdm/-/merge_requests/11 + bsc#1202222 + +HAVE_ARC4RANDOM is defined under glibc 2.36 but this will attempt to include + from libbsd instead of from glibc + +Signed-off-by: Callum Farmer +--- + xdm/genauth.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/xdm/genauth.c b/xdm/genauth.c +index 38a0215..de7abfc 100644 +--- a/xdm/genauth.c ++++ b/xdm/genauth.c +@@ -42,7 +42,15 @@ from The Open Group. + + #ifdef HAVE_ARC4RANDOM + # ifdef __linux__ +-# include ++# if defined(__GLIBC__) && defined(__GLIBC_PREREQ) ++# if __GLIBC_PREREQ(2, 36) ++# include ++# else ++# include ++# endif ++# else ++# include ++# endif + # else + # include + # endif +-- +GitLab diff --git a/xdm.changes b/xdm.changes index c49da48..0fb2dfd 100644 --- a/xdm.changes +++ b/xdm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Sep 9 09:53:34 UTC 2022 - Callum Farmer + +- Add u_glibc-2.36.patch: use glibc's arc4random instead of + libbsd's (bsc#1202222) + ------------------------------------------------------------------- Fri Aug 19 09:42:56 UTC 2022 - Dirk Müller diff --git a/xdm.spec b/xdm.spec index 64f4f6d..1ef19c5 100644 --- a/xdm.spec +++ b/xdm.spec @@ -40,12 +40,12 @@ Patch1: xdm-tolerant-hostname-changes.diff Patch2: xdm-tarball.patch Patch3: n_Allow-the-greeter-to-set-the-input-fields-bg-color.patch Patch4: xinit-UsrEtcMove.patch +Patch5: u_glibc-2.36.patch BuildRequires: firewall-macros BuildRequires: libtool BuildRequires: pam-devel BuildRequires: pkgconfig BuildRequires: systemd-rpm-macros -BuildRequires: pkgconfig(libbsd) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xau) BuildRequires: pkgconfig(xaw7) @@ -102,6 +102,7 @@ cp %{SOURCE2} . pushd xdm %patch1 -p1 popd +%patch5 -p1 # reverse apply (boo#1130321) %patch3 -p1 -R