From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
To: 42151@debbugs.gnu.org
Subject: bug#42151: [PATCH v2 1/4] gnu: Add sqlite/hurd with locking fix.
Date: Fri, 10 Jul 2020 17:42:02 +0200 [thread overview]
Message-ID: <20200710154205.31342-1-janneke@gnu.org> (raw)
In-Reply-To: <20200701142929.26919-1-janneke@gnu.org>
* gnu/packages/patches/sqlite3-hurd.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/sqlite.scm (sqlite/hurd): Use it in new variable.
---
gnu/local.mk | 1 +
gnu/packages/patches/sqlite3-hurd.patch | 51 +++++++++++++++++++++++++
gnu/packages/sqlite.scm | 9 +++++
3 files changed, 61 insertions(+)
create mode 100644 gnu/packages/patches/sqlite3-hurd.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 5c3b391960..e452004945 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1370,6 +1370,7 @@ dist_patch_DATA = \
%D%/packages/patches/sdl-pango-header-guard.patch \
%D%/packages/patches/sdl-pango-matrix_declarations.patch \
%D%/packages/patches/sdl-pango-sans-serif.patch \
+ %D%/packages/patches/sqlite3-hurd.patch \
%D%/packages/patches/patchutils-test-perms.patch \
%D%/packages/patches/patch-hurd-path-max.patch \
%D%/packages/patches/perl-autosplit-default-time.patch \
diff --git a/gnu/packages/patches/sqlite3-hurd.patch b/gnu/packages/patches/sqlite3-hurd.patch
new file mode 100644
index 0000000000..de87a30cb1
--- /dev/null
+++ b/gnu/packages/patches/sqlite3-hurd.patch
@@ -0,0 +1,51 @@
+Adapted from Debian: https://sources.debian.org/patches/sqlite3/3.31.1-5/20-hurd-locking-style.patch
+Upstream status: Not offered upstream.
+
+diff -purN sqlite-autoconf-3310100/sqlite3.c sqlite-autoconf-3310100-/sqlite3.c
+--- sqlite-autoconf-3310100/sqlite3.c 2020-01-27 21:25:19.000000000 +0100
++++ sqlite-autoconf-3310100-/sqlite3.c 2020-07-01 11:50:13.768333806 +0200
+@@ -33189,7 +33189,7 @@ SQLITE_PRIVATE const char *sqlite3Opcode
+ # include <sys/mman.h>
+ #endif
+
+-#if SQLITE_ENABLE_LOCKING_STYLE
++#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__)
+ /* # include <sys/ioctl.h> */
+ # include <sys/file.h>
+ # include <sys/param.h>
+@@ -35676,7 +35676,7 @@ static int dotlockClose(sqlite3_file *id
+ **
+ ** Omit this section if SQLITE_ENABLE_LOCKING_STYLE is turned off
+ */
+-#if SQLITE_ENABLE_LOCKING_STYLE
++#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__)
+
+ /*
+ ** Retry flock() calls that fail with EINTR
+@@ -38586,7 +38586,7 @@ IOMETHODS(
+ 0 /* xShmMap method */
+ )
+
+-#if SQLITE_ENABLE_LOCKING_STYLE
++#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__)
+ IOMETHODS(
+ flockIoFinder, /* Finder function name */
+ flockIoMethods, /* sqlite3_io_methods object name */
+@@ -41142,6 +41142,8 @@ SQLITE_API int sqlite3_os_init(void){
+ UNIXVFS("unix", autolockIoFinder ),
+ #elif OS_VXWORKS
+ UNIXVFS("unix", vxworksIoFinder ),
++#elif defined(__GNU__)
++ UNIXVFS("unix", flockIoFinder ),
+ #else
+ UNIXVFS("unix", posixIoFinder ),
+ #endif
+@@ -41151,7 +41153,7 @@ SQLITE_API int sqlite3_os_init(void){
+ #if OS_VXWORKS
+ UNIXVFS("unix-namedsem", semIoFinder ),
+ #endif
+-#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS
++#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS || defined(__GNU__)
+ UNIXVFS("unix-posix", posixIoFinder ),
+ #endif
+ #if SQLITE_ENABLE_LOCKING_STYLE
diff --git a/gnu/packages/sqlite.scm b/gnu/packages/sqlite.scm
index 8468131ddf..d5c44b0d0f 100644
--- a/gnu/packages/sqlite.scm
+++ b/gnu/packages/sqlite.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -107,3 +108,11 @@ is in the public domain.")
;; commit fad5b1a6d8d9c36bea5785ae4fbc1beb37e644d7.
(define-public sqlite-with-column-metadata
(deprecated-package "sqlite-with-column-metadata" sqlite))
+
+(define-public sqlite/hurd
+ ;; TODO move into sqlite on the next rebuild cycle.
+ (package
+ (inherit sqlite)
+ (name "sqlite-for-hurd")
+ (source (origin (inherit (package-source sqlite))
+ (patches (search-patches "sqlite3-hurd.patch"))))))
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
next prev parent reply other threads:[~2020-07-10 15:43 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-01 14:29 bug#42151: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol Jan (janneke) Nieuwenhuizen
2020-07-01 14:31 ` bug#42151: [PATCH 1/3] gnu: Add sqlite/hurd with locking fix Jan (janneke) Nieuwenhuizen
2020-07-01 14:31 ` bug#42151: [PATCH 2/3] gnu: guile-sqlite3: Use sqlite/hurd for locking on the Hurd Jan (janneke) Nieuwenhuizen
2020-07-10 12:06 ` Ludovic Courtès
2020-07-10 18:34 ` Jan Nieuwenhuizen
2020-07-01 14:31 ` bug#42151: [PATCH 3/3] gnu: guix: " Jan (janneke) Nieuwenhuizen
2020-07-10 12:07 ` Ludovic Courtès
2020-07-10 16:25 ` Jan Nieuwenhuizen
2020-07-10 12:05 ` bug#42151: [PATCH 1/3] gnu: Add sqlite/hurd with locking fix Ludovic Courtès
2020-07-10 18:34 ` Jan Nieuwenhuizen
2020-07-01 17:01 ` bug#42151: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol Jan Nieuwenhuizen
2020-07-02 12:49 ` Ludovic Courtès
2020-07-03 10:03 ` Jan Nieuwenhuizen
2020-07-03 13:51 ` Ludovic Courtès
2020-07-03 15:27 ` Jan Nieuwenhuizen
2020-07-04 8:12 ` bug#42151: [PATCH 4/3] database: Do not use journal_model=WAL for the Hurd Jan Nieuwenhuizen
2020-07-07 5:04 ` Jan Nieuwenhuizen
2020-07-10 12:03 ` Ludovic Courtès
2020-07-10 15:40 ` Jan Nieuwenhuizen
2020-07-10 12:34 ` bug#42151: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol Ludovic Courtès
2020-07-10 15:42 ` Jan (janneke) Nieuwenhuizen [this message]
2020-07-10 15:42 ` bug#42151: [PATCH v2 2/4] gnu: guile-sqlite3: Use sqlite/hurd for locking on the Hurd Jan (janneke) Nieuwenhuizen
2020-07-10 15:42 ` bug#42151: [PATCH v2 3/4] gnu: guix: " Jan (janneke) Nieuwenhuizen
2020-07-10 15:42 ` bug#42151: [PATCH v2 4/4] image: Do not set journal_model=WAL for " Jan (janneke) Nieuwenhuizen
2020-07-10 18:35 ` bug#42151: [PATCH v3 1/2] gnu: sqlite: Add locking-mode fix " Jan (janneke) Nieuwenhuizen
2020-07-10 18:35 ` bug#42151: [PATCH v3 2/2] image: Do not set journal_model=WAL " Jan (janneke) Nieuwenhuizen
2020-07-11 14:22 ` Ludovic Courtès
2020-07-11 14:36 ` Jan Nieuwenhuizen
2020-07-11 14:18 ` bug#42151: [PATCH v3 1/2] gnu: sqlite: Add locking-mode fix " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200710154205.31342-1-janneke@gnu.org \
--to=janneke@gnu.org \
--cc=42151@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).