Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] sudo: update to 1.9.6.
@ 2024-11-12 14:39 dataCobra
  2024-11-12 14:40 ` [PR PATCH] [Updated] " dataCobra
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dataCobra @ 2024-11-12 14:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 620 bytes --]

There is a new pull request by dataCobra against master on the void-packages repository

https://github.com/dataCobra/void-packages sudo
https://github.com/void-linux/void-packages/pull/53029

sudo: update to 1.9.6.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl
  - i686
  - aarch64
  - aarch64-musl
  - armv7l


A patch file from https://github.com/void-linux/void-packages/pull/53029.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-sudo-53029.patch --]
[-- Type: text/x-diff, Size: 5609 bytes --]

From 902777d56a380a7fdcdf30ce828612e4d0fb54b3 Mon Sep 17 00:00:00 2001
From: dataCobra <datacobra@thinkbot.de>
Date: Tue, 12 Nov 2024 15:38:20 +0100
Subject: [PATCH] sudo: update to 1.9.6.

---
 srcpkgs/sudo/patches/fix-crosscompile.patch | 100 ++++++++++++++++++++
 srcpkgs/sudo/template                       |   6 +-
 2 files changed, 103 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/sudo/patches/fix-crosscompile.patch

diff --git a/srcpkgs/sudo/patches/fix-crosscompile.patch b/srcpkgs/sudo/patches/fix-crosscompile.patch
new file mode 100644
index 00000000000000..74002e19e295a0
--- /dev/null
+++ b/srcpkgs/sudo/patches/fix-crosscompile.patch
@@ -0,0 +1,100 @@
+From 3e12cacc0f91bc27f0c8d627843bd22c8b5bb6fa Mon Sep 17 00:00:00 2001
+From: "Todd C. Miller" <Todd.Miller@sudo.ws>
+Date: Mon, 2 Sep 2024 17:10:19 -0600
+Subject: [PATCH] Better test for cross-compiling when checking for C99
+ snprintf
+
+We want to avoid calling AX_FUNC_SNPRINTF entirely if cross-compiling
+since it is not possible to undo the setting of PREFER_PORTABLE_SNPRINTF.
+The previous attempt to do this failed to take into account that
+PREFER_PORTABLE_SNPRINTF would still be defined.  GitHub issue #969
+---
+ configure    | 41 +++++++++++++++++++++++++++--------------
+ configure.ac | 13 +++++++------
+ 2 files changed, 34 insertions(+), 20 deletions(-)
+
+diff --git a/configure b/configure
+index 18eb2bdf27..a80cad01db 100755
+--- a/configure
++++ b/configure
+@@ -24790,7 +24790,31 @@ esac
+     COMPAT_TEST_PROGS="${COMPAT_TEST_PROGS}${COMPAT_TEST_PROGS+ }mktemp_test"
+ 
+ fi
+-ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
++if test X"$ac_cv_build_prog_cc_c99" != X"no" -a X"$cross_compiling" = X"yes"
++then :
++
++    # If we have a C99 compiler and are cross-compiling, assume
++    # C99-compliant v?snprintf().
++    ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
++if test "x$ac_cv_func_snprintf" = xyes
++then :
++  printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
++
++fi
++ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
++if test "x$ac_cv_func_vsnprintf" = xyes
++then :
++  printf "%s\n" "#define HAVE_VSNPRINTF 1" >>confdefs.h
++
++fi
++
++    ac_cv_have_working_snprintf="$ac_cv_func_snprintf"
++    ac_cv_have_working_vsnprintf="$ac_cv_func_vsnprintf"
++
++else case e in #(
++  e)
++    # Check for C99-compliant v?snprintf().
++    ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+ if test "x$ac_cv_func_snprintf" = xyes
+ then :
+   printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
+@@ -24919,19 +24943,8 @@ printf "%s\n" "$as_me: WARNING: Replacing missing/broken (v)snprintf() with sudo
+ printf "%s\n" "#define PREFER_PORTABLE_SNPRINTF 1" >>confdefs.h
+ 
+ fi
+-if test X"$ac_cv_build_prog_cc_c99" != X"no"
+-then :
+-
+-    # If we have a C99 compiler and are cross-compiling, assume
+-    # C99-compliant v?snprintf().
+-    if test X"$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf" = X"crosscross"
+-then :
+-
+-	ac_cv_have_working_snprintf=yes
+-	ac_cv_have_working_vsnprintf=yes
+-
+-fi
+-
++ ;;
++esac
+ fi
+ if test X"$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf" = X"yesyes"
+ then :
+diff --git a/configure.ac b/configure.ac
+index 28b63ef0d8..e547f79417 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3060,14 +3060,15 @@ AS_IF([test X"$sudo_mktemp" = X"yes"], [
+     SUDO_APPEND_COMPAT_EXP(sudo_mkdtemp sudo_mkdtempat sudo_mkostempsat sudo_mkstemp sudo_mkstemps)
+     COMPAT_TEST_PROGS="${COMPAT_TEST_PROGS}${COMPAT_TEST_PROGS+ }mktemp_test"
+ ])
+-AX_FUNC_SNPRINTF
+-AS_IF([test X"$ac_cv_prog_cc_c99" != X"no"], [
++AS_IF([test X"$ac_cv_prog_cc_c99" != X"no" -a X"$cross_compiling" = X"yes"], [
+     # If we have a C99 compiler and are cross-compiling, assume
+     # C99-compliant v?snprintf().
+-    AS_IF([test X"$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf" = X"crosscross"], [
+-	ac_cv_have_working_snprintf=yes
+-	ac_cv_have_working_vsnprintf=yes
+-    ])
++    AC_CHECK_FUNCS(snprintf vsnprintf)
++    ac_cv_have_working_snprintf="$ac_cv_func_snprintf"
++    ac_cv_have_working_vsnprintf="$ac_cv_func_vsnprintf"
++], [
++    # Check for C99-compliant v?snprintf().
++    AX_FUNC_SNPRINTF
+ ])
+ AS_IF([test X"$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf" = X"yesyes"], [
+     # System has a C99-compliant v?snprintf(), check for v?asprintf()
diff --git a/srcpkgs/sudo/template b/srcpkgs/sudo/template
index 571fc60a83f044..758c8270238940 100644
--- a/srcpkgs/sudo/template
+++ b/srcpkgs/sudo/template
@@ -1,6 +1,6 @@
 # Template file for 'sudo'
 pkgname=sudo
-version=1.9.15p4
+version=1.9.16
 revision=1
 build_style=gnu-configure
 configure_args="--with-ignore-dot --with-insults=disabled --with-all-insults --with-env-editor
@@ -8,14 +8,14 @@ configure_args="--with-ignore-dot --with-insults=disabled --with-all-insults --w
  --with-logfac=auth --disable-root-mailer --enable-pie --with-mdoc
  --sbindir=/usr/bin --disable-log-server"
 hostmakedepends="groff"
-makedepends="zlib-devel pam-devel"
+makedepends="zlib-devel pam-devel openssl-devel"
 short_desc="Allow others to run commands as root"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="ISC"
 homepage="https://www.sudo.ws/"
 changelog="https://www.sudo.ws/repos/sudo/raw-file/tip/NEWS"
 distfiles="https://www.sudo.ws/dist/sudo-${version}.tar.gz"
-checksum=2e20ec9865eeeea1316c6f49ec6ac4678869b689d4d90b44243bf4887d6dd532
+checksum=c0d84d797f06b732fc573d0b798ae83128c2bc33052057f05b560ec6bcbfa03d
 conf_files="/etc/pam.d/sudo /etc/sudoers"
 lib32disabled=yes
 

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

end of thread, other threads:[~2024-11-19 12:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-12 14:39 [PR PATCH] sudo: update to 1.9.6 dataCobra
2024-11-12 14:40 ` [PR PATCH] [Updated] " dataCobra
2024-11-19  7:04 ` [PR PATCH] [Updated] sudo: update to 1.9.16 dataCobra
2024-11-19 12:46 ` [PR PATCH] [Merged]: " leahneukirchen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).