summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2021-04-01 23:50:48 +0000
committer Eric Hameleers <alien@slackware.com>2021-04-02 08:59:52 +0200
commit90a99655a4d0feb3687b37d5a60082e1ade01c27 (patch)
treecfb3c9d50a29e9ab593b62247b453846703a4525 /source
parent44010944eea1c5c0d026636dc815962954d77bb0 (diff)
downloadcurrent-90a99655a4d0feb3687b37d5a60082e1ade01c27.tar.gz
current-90a99655a4d0feb3687b37d5a60082e1ade01c27.tar.xz
Thu Apr 1 23:50:48 UTC 202120210401235048
a/aaa_glibc-solibs-2.33-x86_64-2.txz: Rebuilt. ap/inxi-20210329_a539c8fd-noarch-1.txz: Upgraded. l/glibc-2.33-x86_64-2.txz: Rebuilt. Applied upstream patch to fix a performance regression: [PATCH] linux: Normalize and return timeout on select (BZ #27651) Thanks to Fulalas and Adhemerval Zanella. l/glibc-i18n-2.33-x86_64-2.txz: Rebuilt. l/glibc-profile-2.33-x86_64-2.txz: Rebuilt. l/imagemagick-7.0.11_5-x86_64-1.txz: Upgraded. n/network-scripts-15.0-noarch-15.txz: Rebuilt. netconfig: remove (broken) checks on hostname/domainname validity. x/libXres-1.2.1-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source')
-rwxr-xr-xsource/ap/inxi/inxi.SlackBuild2
-rwxr-xr-xsource/l/glibc/glibc.SlackBuild2
-rw-r--r--source/l/glibc/patches/cdc31409bd4f878577059e70dbd52a28643ec609.patch237
-rwxr-xr-xsource/n/network-scripts/network-scripts.SlackBuild2
-rw-r--r--source/n/network-scripts/scripts/netconfig30
-rw-r--r--source/x/x11/build/libXres2
6 files changed, 245 insertions, 30 deletions
diff --git a/source/ap/inxi/inxi.SlackBuild b/source/ap/inxi/inxi.SlackBuild
index 1f10e39bf..2e5e02b07 100755
--- a/source/ap/inxi/inxi.SlackBuild
+++ b/source/ap/inxi/inxi.SlackBuild
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=inxi
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
diff --git a/source/l/glibc/glibc.SlackBuild b/source/l/glibc/glibc.SlackBuild
index 5a0e4e929..80e2f7e73 100755
--- a/source/l/glibc/glibc.SlackBuild
+++ b/source/l/glibc/glibc.SlackBuild
@@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=glibc
VERSION=${VERSION:-$(echo glibc-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
CHECKOUT=${CHECKOUT:-""}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# I was considering disabling NSCD, but MoZes talked me out of it. :)
#DISABLE_NSCD=" --disable-nscd "
diff --git a/source/l/glibc/patches/cdc31409bd4f878577059e70dbd52a28643ec609.patch b/source/l/glibc/patches/cdc31409bd4f878577059e70dbd52a28643ec609.patch
new file mode 100644
index 000000000..96f56ce73
--- /dev/null
+++ b/source/l/glibc/patches/cdc31409bd4f878577059e70dbd52a28643ec609.patch
@@ -0,0 +1,237 @@
+From cdc31409bd4f878577059e70dbd52a28643ec609 Mon Sep 17 00:00:00 2001
+From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
+Date: Wed, 31 Mar 2021 13:53:34 -0300
+Subject: [PATCH] linux: Normalize and return timeout on select (BZ #27651)
+
+The commit 2433d39b697, which added time64 support to select, changed
+the function to use __NR_pselect6 (or __NR_pelect6_time64) on all
+architectures. However, on architectures where the symbol was
+implemented with __NR_select the kernel normalizes the passed timeout
+instead of return EINVAL. For instance, the input timeval
+{ 0, 5000000 } is interpreted as { 5, 0 }.
+
+And as indicated by BZ #27651, this semantic seems to be expected
+and changing it results in some performance issues (most likely
+the program does not check the return code and keeps issuing
+select with unormalized tv_usec argument).
+
+To avoid a different semantic depending whether which syscall the
+architecture used to issue, select now always normalize the timeout
+input. This is a slight change for some ABIs (for instance aarch64).
+
+Checked on x86_64-linux-gnu and i686-linux-gnu.
+---
+ include/time.h | 5 +++
+ sunrpc/svcauth_des.c | 1 -
+ support/Makefile | 2 ++
+ support/support.h | 8 +++++
+ support/support_select_modify_timeout.c | 29 ++++++++++++++++
+ support/support_select_normalize_timeout.c | 29 ++++++++++++++++
+ sysdeps/unix/sysv/linux/select.c | 40 ++++++++++++++++++----
+ 8 files changed, 123 insertions(+), 8 deletions(-)
+ create mode 100644 support/support_select_modify_timeout.c
+ create mode 100644 support/support_select_normalize_timeout.c
+
+diff --git a/include/time.h b/include/time.h
+index caf2af5e74..e0636132a6 100644
+--- a/include/time.h
++++ b/include/time.h
+@@ -502,6 +502,11 @@ time_now (void)
+ __clock_gettime (TIME_CLOCK_GETTIME_CLOCKID, &ts);
+ return ts.tv_sec;
+ }
++
++#define NSEC_PER_SEC 1000000000L /* Nanoseconds per second. */
++#define USEC_PER_SEC 1000000L /* Microseconds per second. */
++#define NSEC_PER_USEC 1000L /* Nanoseconds per microsecond. */
++
+ #endif
+
+ #endif
+diff --git a/sunrpc/svcauth_des.c b/sunrpc/svcauth_des.c
+index 7607abc818..25a85c9097 100644
+--- a/sunrpc/svcauth_des.c
++++ b/sunrpc/svcauth_des.c
+@@ -58,7 +58,6 @@
+
+ #define debug(msg) /*printf("svcauth_des: %s\n", msg) */
+
+-#define USEC_PER_SEC ((uint32_t) 1000000L)
+ #define BEFORE(t1, t2) timercmp(t1, t2, <)
+
+ /*
+diff --git a/support/Makefile b/support/Makefile
+index 900e17f94f..1e2fc97ee6 100644
+--- a/support/Makefile
++++ b/support/Makefile
+@@ -68,6 +68,8 @@ libsupport-routines = \
+ support_quote_string \
+ support_record_failure \
+ support_run_diff \
++ support_select_modify_timeout \
++ support_select_normalize_timeout \
+ support_set_small_thread_stack_size \
+ support_shared_allocate \
+ support_small_stack_thread_attribute \
+diff --git a/support/support.h b/support/support.h
+index e023d00857..f983783d64 100644
+--- a/support/support.h
++++ b/support/support.h
+@@ -144,6 +144,14 @@ static __inline bool support_path_support_time64 (const char *path)
+ /* Return true if stat supports nanoseconds resolution. */
+ extern bool support_stat_nanoseconds (const char *path);
+
++/* Return true if select modify the timeout to reflect the amount of time
++ no slept. */
++extern bool support_select_modify_timeout (void);
++
++/* Return true if select normalize the timeout input by taking in account
++ tv_usec larger than 1000000. */
++extern bool support_select_normalize_timeout (void);
++
+ __END_DECLS
+
+ #endif /* SUPPORT_H */
+diff --git a/support/support_select_modify_timeout.c b/support/support_select_modify_timeout.c
+new file mode 100644
+index 0000000000..d70a5a5068
+--- /dev/null
++++ b/support/support_select_modify_timeout.c
+@@ -0,0 +1,29 @@
++/* Return whether select modify the timeout.
++ Copyright (C) 2021 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, see
++ <https://www.gnu.org/licenses/>. */
++
++#include <stdbool.h>
++
++bool
++support_select_modify_timeout (void)
++{
++#ifdef __linux__
++ return true;
++#else
++ return false;
++#endif
++}
+diff --git a/support/support_select_normalize_timeout.c b/support/support_select_normalize_timeout.c
+new file mode 100644
+index 0000000000..447e3ec3e3
+--- /dev/null
++++ b/support/support_select_normalize_timeout.c
+@@ -0,0 +1,29 @@
++/* Return whether select normalize the timeout.
++ Copyright (C) 2021 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, see
++ <https://www.gnu.org/licenses/>. */
++
++#include <stdbool.h>
++
++bool
++support_select_normalize_timeout (void)
++{
++#ifdef __linux__
++ return true;
++#else
++ return false;
++#endif
++}
+diff --git a/sysdeps/unix/sysv/linux/select.c b/sysdeps/unix/sysv/linux/select.c
+index 415aa87d3c..d075270ff4 100644
+--- a/sysdeps/unix/sysv/linux/select.c
++++ b/sysdeps/unix/sysv/linux/select.c
+@@ -33,12 +33,34 @@ int
+ __select64 (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
+ struct __timeval64 *timeout)
+ {
+- struct __timespec64 ts64, *pts64 = NULL;
+- if (timeout != NULL)
++ __time64_t s = timeout != NULL ? timeout->tv_sec : 0;
++ int32_t us = timeout != NULL ? timeout->tv_usec : 0;
++ int32_t ns;
++
++ if (s < 0 || us < 0)
++ return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
++
++ /* Normalize the timeout, as legacy Linux __NR_select and __NR__newselect.
++ Different than syscall, it also handle possible overflow. */
++ if (us / USEC_PER_SEC > INT64_MAX - s)
+ {
+- ts64 = timeval64_to_timespec64 (*timeout);
+- pts64 = &ts64;
++ s = INT64_MAX;
++ ns = NSEC_PER_SEC - 1;
+ }
++ else
++ {
++ s += us / USEC_PER_SEC;
++ us = us % USEC_PER_SEC;
++ ns = us * NSEC_PER_USEC;
++ }
++
++ struct __timespec64 ts64, *pts64 = NULL;
++ if (timeout != NULL)
++ {
++ ts64.tv_sec = s;
++ ts64.tv_nsec = ns;
++ pts64 = &ts64;
++ }
+
+ #ifndef __NR_pselect6_time64
+ # define __NR_pselect6_time64 __NR_pselect6
+@@ -52,10 +74,13 @@ __select64 (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
+ (though the pselect() glibc call suppresses this behavior).
+ Since select() on Linux has the same behavior as the pselect6
+ syscall, we update the timeout here. */
+- if (r == 0 || errno != ENOSYS)
++ if (r >= 0 || errno != ENOSYS)
+ {
+ if (timeout != NULL)
+- TIMEVAL_TO_TIMESPEC (timeout, &ts64);
++ {
++ timeout->tv_sec = ts64.tv_sec;
++ timeout->tv_usec = ts64.tv_nsec / NSEC_PER_USEC;
++ }
+ return r;
+ }
+
+@@ -71,7 +96,8 @@ __select64 (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
+ __set_errno (EINVAL);
+ return -1;
+ }
+- ts32 = valid_timespec64_to_timespec (ts64);
++ ts32.tv_sec = s;
++ ts32.tv_nsec = ns;
+ pts32 = &ts32;
+ }
+ # ifndef __ASSUME_PSELECT
+--
+2.27.0
+
+
diff --git a/source/n/network-scripts/network-scripts.SlackBuild b/source/n/network-scripts/network-scripts.SlackBuild
index 0093d246a..f3eaba9aa 100755
--- a/source/n/network-scripts/network-scripts.SlackBuild
+++ b/source/n/network-scripts/network-scripts.SlackBuild
@@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=network-scripts
VERSION=${VERSION:-15.0}
ARCH=noarch
-BUILD=${BUILD:-14}
+BUILD=${BUILD:-15}
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
diff --git a/source/n/network-scripts/scripts/netconfig b/source/n/network-scripts/scripts/netconfig
index bb5a5acc2..f3e7445d6 100644
--- a/source/n/network-scripts/scripts/netconfig
+++ b/source/n/network-scripts/scripts/netconfig
@@ -461,17 +461,8 @@ EOF
fi
HOSTNM="`cat $TMP/SeThost`"
rm -f $TMP/SeThost $TMP/tempmsg
- if [ "$HOSTNM" = "" ] || [[ ! "$HOSTNM" =~ ^[[:alnum:]-]+$ ]] || \
- [ "${HOSTNM:0:1}" == "-" ] || [ "${HOSTNM: -1:1}" == "-" ]; then
- dialog --title "HOSTNAME" --ok-button "Back" --msgbox \
- "That doesn't appear to be a valid hostname.\n
-Hostnames can only contain letters, numbers and hyphens,
-and may not begin or end with a hyphen." 7 60
- if [ $? = 1 -o $? = 255 ]; then
- exit
- fi
- else
- break
+ if [ ! "$HOSTNM" = "" ]; then
+ break;
fi
done
@@ -491,21 +482,8 @@ EOF
fi
DOMAIN="`cat $TMP/SeTdom`"
rm -f $TMP/SeTdom $TMP/tempmsg
- # These regexes doon't catch everything, just basic syntax mistakes.
- DN="${DOMAIN%.*}"
- TLD="${DOMAIN##*.}"
- if [ -z "$DOMAIN" ] || [ -z "$TLD" ] || [ -z "$DN" ] || [[ ! "$DOMAIN" =~ ^[^.-][[:alnum:].-]+[^.-]$ ]] || \
- [[ ! "$DN" =~ ^[^.-][[:alnum:].-]+[^.-]$ ]] || [[ "$DN" =~ \.\. ]] || [[ "$DN" =~ -- ]] || \
- [[ ! "$TLD" =~ ^[^-][[:alnum:]-]+[^-]$ ]]; then
- dialog --title "DOMAINNAME" --ok-button "Back" --msgbox \
- "That doesn't appear to be a valid domain name.\n
-Domain names can only contain letters and numbers, hyphens
-and dots, and may not begin or end with a hyphen or dot." 7 68
- if [ $? = 1 -o $? = 255 ]; then
- exit
- fi
- else
- break
+ if [ ! "$DOMAIN" = "" ]; then
+ break;
fi
done
diff --git a/source/x/x11/build/libXres b/source/x/x11/build/libXres
index b8626c4cf..d00491fd7 100644
--- a/source/x/x11/build/libXres
+++ b/source/x/x11/build/libXres
@@ -1 +1 @@
-4
+1