diff options
| author | Zheng Junjie <z572@z572.online> | 2026-07-24 21:59:31 +0800 |
|---|---|---|
| committer | Andreas Enge <andreas@enge.fr> | 2026-08-23 16:37:52 +0200 |
| commit | d36e4682e2cd9a179179a2f6e916183db8fbba5d (patch) | |
| tree | a0ef705a7a369391dcc429b0ef26a472eb4e7353 | |
| parent | b1015faf2e0bdc3ee8668640a00de403dd1db7c0 (diff) | |
gnu: gdbm: Update to 1.26.
* gnu/packages/dbm.scm (gdbm): Update to 1.26.
[source]: Remove patches.
[arguments]: Remove phases.
[native-inputs]: Remove config.
* gnu/packages/patches/gdbm-lockwait-test.patch: Remove it
* gnu/local.mk (dist_patch_DATA): Unregister it.
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/dbm.scm | 23 | ||||
| -rw-r--r-- | gnu/packages/patches/gdbm-lockwait-test.patch | 198 |
3 files changed, 3 insertions, 219 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 608f4e662ca..48f83543099 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -1437,7 +1437,6 @@ dist_patch_DATA = \ | |||
| 1437 | %D%/packages/patches/gd-brect-bounds.patch \ | 1437 | %D%/packages/patches/gd-brect-bounds.patch \ |
| 1438 | %D%/packages/patches/gdb-hurd64.patch \ | 1438 | %D%/packages/patches/gdb-hurd64.patch \ |
| 1439 | %D%/packages/patches/gdb-16-hurd64.patch \ | 1439 | %D%/packages/patches/gdb-16-hurd64.patch \ |
| 1440 | %D%/packages/patches/gdbm-lockwait-test.patch \ | ||
| 1441 | %D%/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch \ | 1440 | %D%/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch \ |
| 1442 | %D%/packages/patches/gdm-default-session.patch \ | 1441 | %D%/packages/patches/gdm-default-session.patch \ |
| 1443 | %D%/packages/patches/gdm-remove-hardcoded-xwayland-path.patch \ | 1442 | %D%/packages/patches/gdm-remove-hardcoded-xwayland-path.patch \ |
diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm index 0cd510343c7..9cdb8c72e74 100644 --- a/gnu/packages/dbm.scm +++ b/gnu/packages/dbm.scm | |||
| @@ -229,33 +229,16 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.") | |||
| 229 | (define-public gdbm | 229 | (define-public gdbm |
| 230 | (package | 230 | (package |
| 231 | (name "gdbm") | 231 | (name "gdbm") |
| 232 | (version "1.25") | 232 | (version "1.26") |
| 233 | (source (origin | 233 | (source (origin |
| 234 | (method url-fetch) | 234 | (method url-fetch) |
| 235 | (uri (string-append "mirror://gnu/gdbm/gdbm-" | 235 | (uri (string-append "mirror://gnu/gdbm/gdbm-" |
| 236 | version ".tar.gz")) | 236 | version ".tar.gz")) |
| 237 | (sha256 | 237 | (sha256 |
| 238 | (base32 | 238 | (base32 |
| 239 | "1v4kycs1n9x0pczm9ny6m16gfgpmj8gwv0bvh7w7gn3fjb2v6bfh")) | 239 | "0pjadya4f72cwmjn1wngiklgpxkdjyz3dffw0d0p8jny2i55093a")))) |
| 240 | (patches | ||
| 241 | (search-patches "gdbm-lockwait-test.patch")))) | ||
| 242 | (arguments `(#:configure-flags '("--enable-libgdbm-compat" | 240 | (arguments `(#:configure-flags '("--enable-libgdbm-compat" |
| 243 | "--disable-static") | 241 | "--disable-static"))) |
| 244 | ,@(if (target-loongarch64?) | ||
| 245 | `(#:phases | ||
| 246 | (modify-phases %standard-phases | ||
| 247 | (add-after 'unpack 'update-config | ||
| 248 | (lambda* (#:key native-inputs inputs #:allow-other-keys) | ||
| 249 | (for-each (lambda (file) | ||
| 250 | (install-file | ||
| 251 | (search-input-file | ||
| 252 | (or native-inputs inputs) | ||
| 253 | (string-append "/bin/" file)) "build-aux")) | ||
| 254 | '("config.guess" "config.sub")))))) | ||
| 255 | '()))) | ||
| 256 | (native-inputs (if (target-loongarch64?) | ||
| 257 | (list config) | ||
| 258 | '())) | ||
| 259 | (build-system gnu-build-system) | 242 | (build-system gnu-build-system) |
| 260 | (home-page "https://www.gnu.org.ua/software/gdbm") | 243 | (home-page "https://www.gnu.org.ua/software/gdbm") |
| 261 | (synopsis | 244 | (synopsis |
diff --git a/gnu/packages/patches/gdbm-lockwait-test.patch b/gnu/packages/patches/gdbm-lockwait-test.patch deleted file mode 100644 index 95c0ffb225f..00000000000 --- a/gnu/packages/patches/gdbm-lockwait-test.patch +++ /dev/null | |||
| @@ -1,198 +0,0 @@ | |||
| 1 | Taken from | ||
| 2 | https://git.savannah.gnu.org/cgit/gdbm.git/commit/?id=5be83b4c5da7c6a68817908b19f8925af09e9b2c | ||
| 3 | https://git.savannah.gnu.org/cgit/gdbm.git/commit/?id=6f165a8e1745dbd9b88f6fb6882dff7997cfdf74 | ||
| 4 | https://git.savannah.gnu.org/cgit/gdbm.git/commit/?id=aa9baca52ad155ae501ba586ff7b08f4b08e5434 | ||
| 5 | Can be removed with 1.26. | ||
| 6 | |||
| 7 | From 5be83b4c5da7c6a68817908b19f8925af09e9b2c Mon Sep 17 00:00:00 2001 | ||
| 8 | From: Sergey Poznyakoff <gray@gnu.org> | ||
| 9 | Date: Thu, 10 Apr 2025 17:31:56 +0300 | ||
| 10 | Subject: Fix timeout calculation in lockwait signal test. | ||
| 11 | |||
| 12 | * tests/t_lockwait.c (runtest_signal): mark start time right | ||
| 13 | after setting alarm, not before it. | ||
| 14 | --- | ||
| 15 | tests/t_lockwait.c | 5 ++--- | ||
| 16 | 1 file changed, 2 insertions(+), 3 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/tests/t_lockwait.c b/tests/t_lockwait.c | ||
| 19 | index a5e74c8..3547af7 100644 | ||
| 20 | --- a/tests/t_lockwait.c | ||
| 21 | +++ b/tests/t_lockwait.c | ||
| 22 | @@ -323,9 +323,6 @@ runtest_signal (struct timespec *ts) | ||
| 23 | struct sigaction act; | ||
| 24 | struct timeval now; | ||
| 25 | |||
| 26 | - gettimeofday (&now, NULL); | ||
| 27 | - start = tv_to_ms (&now); | ||
| 28 | - | ||
| 29 | if (pipe (sig_fd)) | ||
| 30 | { | ||
| 31 | perror ("pipe"); | ||
| 32 | @@ -341,6 +338,8 @@ runtest_signal (struct timespec *ts) | ||
| 33 | return -1; | ||
| 34 | } | ||
| 35 | alarm (ts_to_ms (&ts[1]) / MILLI); | ||
| 36 | + gettimeofday (&now, NULL); | ||
| 37 | + start = tv_to_ms (&now); | ||
| 38 | } | ||
| 39 | |||
| 40 | op.lock_wait = GDBM_LOCKWAIT_SIGNAL; | ||
| 41 | -- | ||
| 42 | cgit v1.1 | ||
| 43 | |||
| 44 | From 6f165a8e1745dbd9b88f6fb6882dff7997cfdf74 Mon Sep 17 00:00:00 2001 | ||
| 45 | From: Sergey Poznyakoff <gray@gnu.org> | ||
| 46 | Date: Thu, 10 Apr 2025 21:07:41 +0300 | ||
| 47 | Subject: More fixes to lockwait test | ||
| 48 | |||
| 49 | * tests/t_lockwait.c (sighan): Close fd. | ||
| 50 | (runtest_signal): compensate for alarm(2) second precision | ||
| 51 | --- | ||
| 52 | tests/t_lockwait.c | 4 +++- | ||
| 53 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
| 54 | |||
| 55 | diff --git a/tests/t_lockwait.c b/tests/t_lockwait.c | ||
| 56 | index 3547af7..b378819 100644 | ||
| 57 | --- a/tests/t_lockwait.c | ||
| 58 | +++ b/tests/t_lockwait.c | ||
| 59 | @@ -170,6 +170,7 @@ static void | ||
| 60 | sighan (int sig) | ||
| 61 | { | ||
| 62 | write (sig_fd[1], &sig, sizeof (sig)); | ||
| 63 | + close (sig_fd[1]); | ||
| 64 | } | ||
| 65 | |||
| 66 | static int runtest_retry (struct timespec *ts); | ||
| 67 | @@ -364,7 +365,8 @@ runtest_signal (struct timespec *ts) | ||
| 68 | |||
| 69 | pfd.fd = sig_fd[0]; | ||
| 70 | pfd.events = POLLIN; | ||
| 71 | - switch (poll (&pfd, 1, ts_to_ms (&ts[1]) - tv_to_ms (&now) + start)) { | ||
| 72 | + switch (poll (&pfd, 1, | ||
| 73 | + ts_to_ms (&ts[1]) - tv_to_ms (&now) + start + MILLI)) { | ||
| 74 | case 1: | ||
| 75 | break; | ||
| 76 | |||
| 77 | -- | ||
| 78 | cgit v1.1 | ||
| 79 | |||
| 80 | From aa9baca52ad155ae501ba586ff7b08f4b08e5434 Mon Sep 17 00:00:00 2001 | ||
| 81 | From: Sergey Poznyakoff <gray@gnu.org> | ||
| 82 | Date: Fri, 11 Apr 2025 07:53:58 +0300 | ||
| 83 | Subject: Adjust timeouts for setitimer interface in lockwait test. | ||
| 84 | |||
| 85 | * tests/t_lockwait.c: Setitimer (at least on some systems) restarts | ||
| 86 | the timer set by alarm(2). To calculate the ETA of SIGALRM, call | ||
| 87 | alarm after gdbm_open_ext returns. | ||
| 88 | --- | ||
| 89 | tests/t_lockwait.c | 66 ++++++++++++++++++++++++++++++++---------------------- | ||
| 90 | 1 file changed, 39 insertions(+), 27 deletions(-) | ||
| 91 | |||
| 92 | diff --git a/tests/t_lockwait.c b/tests/t_lockwait.c | ||
| 93 | index b378819..dfae838 100644 | ||
| 94 | --- a/tests/t_lockwait.c | ||
| 95 | +++ b/tests/t_lockwait.c | ||
| 96 | @@ -322,7 +322,6 @@ runtest_signal (struct timespec *ts) | ||
| 97 | if (!(ts[1].tv_sec == 0 && ts[1].tv_nsec == 0)) | ||
| 98 | { | ||
| 99 | struct sigaction act; | ||
| 100 | - struct timeval now; | ||
| 101 | |||
| 102 | if (pipe (sig_fd)) | ||
| 103 | { | ||
| 104 | @@ -338,9 +337,6 @@ runtest_signal (struct timespec *ts) | ||
| 105 | fprintf (stderr, "%s: sigaction: %s", progname, strerror (errno)); | ||
| 106 | return -1; | ||
| 107 | } | ||
| 108 | - alarm (ts_to_ms (&ts[1]) / MILLI); | ||
| 109 | - gettimeofday (&now, NULL); | ||
| 110 | - start = tv_to_ms (&now); | ||
| 111 | } | ||
| 112 | |||
| 113 | op.lock_wait = GDBM_LOCKWAIT_SIGNAL; | ||
| 114 | @@ -354,42 +350,58 @@ runtest_signal (struct timespec *ts) | ||
| 115 | } | ||
| 116 | gdbm_close (dbf); | ||
| 117 | |||
| 118 | - if (start > 0) | ||
| 119 | + if (!(ts[1].tv_sec == 0 && ts[1].tv_nsec == 0)) | ||
| 120 | { | ||
| 121 | struct pollfd pfd; | ||
| 122 | struct timeval now; | ||
| 123 | - int sig; | ||
| 124 | + int n, t, sig; | ||
| 125 | |||
| 126 | - restart: | ||
| 127 | + alarm (ts_to_ms (&ts[1]) / MILLI); | ||
| 128 | gettimeofday (&now, NULL); | ||
| 129 | + start = tv_to_ms (&now); | ||
| 130 | |||
| 131 | pfd.fd = sig_fd[0]; | ||
| 132 | pfd.events = POLLIN; | ||
| 133 | - switch (poll (&pfd, 1, | ||
| 134 | - ts_to_ms (&ts[1]) - tv_to_ms (&now) + start + MILLI)) { | ||
| 135 | - case 1: | ||
| 136 | - break; | ||
| 137 | |||
| 138 | - case 0: | ||
| 139 | - fprintf (stderr, "%s: failed waiting for alarm\n", progname); | ||
| 140 | - return 1; | ||
| 141 | - | ||
| 142 | - default: | ||
| 143 | - if (errno == EINTR) goto restart; | ||
| 144 | - fprintf (stderr, "%s: poll: %s\n", progname, strerror (errno)); | ||
| 145 | - return 1; | ||
| 146 | - } | ||
| 147 | - | ||
| 148 | - if (read (sig_fd[0], &sig, sizeof (sig)) != sizeof (sig)) | ||
| 149 | + do | ||
| 150 | { | ||
| 151 | - fprintf (stderr, "%s: read: %s\n", progname, strerror (errno)); | ||
| 152 | - return 1; | ||
| 153 | + gettimeofday (&now, NULL); | ||
| 154 | + t = ts_to_ms (&ts[1]) - tv_to_ms (&now) + start + MILLI; | ||
| 155 | + if (t < 0) | ||
| 156 | + { | ||
| 157 | + n = 0; | ||
| 158 | + break; | ||
| 159 | + } | ||
| 160 | } | ||
| 161 | - close (sig_fd[0]); | ||
| 162 | - if (sig != SIGALRM) | ||
| 163 | + while ((n = poll (&pfd, 1, t)) == -1 && errno == EINTR); | ||
| 164 | + | ||
| 165 | + switch (n) | ||
| 166 | { | ||
| 167 | - fprintf (stderr, "%s: unexpected data read\n", progname); | ||
| 168 | + case 1: | ||
| 169 | + if (read (sig_fd[0], &sig, sizeof (sig)) != sizeof (sig)) | ||
| 170 | + { | ||
| 171 | + fprintf (stderr, "%s: read: %s\n", progname, strerror (errno)); | ||
| 172 | + return 1; | ||
| 173 | + } | ||
| 174 | + close (sig_fd[0]); | ||
| 175 | + if (sig != SIGALRM) | ||
| 176 | + { | ||
| 177 | + fprintf (stderr, "%s: unexpected data read\n", progname); | ||
| 178 | + return 1; | ||
| 179 | + } | ||
| 180 | + break; | ||
| 181 | + | ||
| 182 | + case 0: | ||
| 183 | + fprintf (stderr, "%s: failed waiting for alarm\n", progname); | ||
| 184 | return 1; | ||
| 185 | + | ||
| 186 | + default: | ||
| 187 | + if (errno != EINTR) | ||
| 188 | + { | ||
| 189 | + fprintf (stderr, "%s: poll: %s\n", | ||
| 190 | + progname, strerror (errno)); | ||
| 191 | + return 1; | ||
| 192 | + } | ||
| 193 | } | ||
| 194 | } | ||
| 195 | |||
| 196 | -- | ||
| 197 | cgit v1.1 | ||
| 198 | |||
