diff options
author | Marek Benc <merkur32@gmail.com> | 2015-01-22 23:08:16 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-01-23 09:44:42 +0100 |
commit | 2baf46348f0d57f5c17fdf2fa74077bb25c0e787 (patch) | |
tree | 9cc1e8f87ab5acbf91570662f863d4f6198539af /gnu/packages/patches/nvi-db4.patch | |
parent | e1626e3b3ae6d8eb3e118af4ffe9d905b1642ede (diff) | |
download | gnu-guix-2baf46348f0d57f5c17fdf2fa74077bb25c0e787.tar gnu-guix-2baf46348f0d57f5c17fdf2fa74077bb25c0e787.tar.gz |
gnu: nvi: Fix Berkely DB compatability issues.
* gnu/packages/patches/nvi-db4.patch: New file.
* gnu/packages/patches/nvi-dbpagesize-binpower.patch: New file.
* gnu/packages/nvi.scm (nvi): Make use of them.
* gnu-system.am (dist_patch_DATA): Add them.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/patches/nvi-db4.patch')
-rw-r--r-- | gnu/packages/patches/nvi-db4.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gnu/packages/patches/nvi-db4.patch b/gnu/packages/patches/nvi-db4.patch new file mode 100644 index 0000000000..03b736cd08 --- /dev/null +++ b/gnu/packages/patches/nvi-db4.patch @@ -0,0 +1,35 @@ +This patch originates from the Debian project, see https://www.debian.org/ + +03db4.dpatch by <hesso@pool.math.tu-berlin.de> + + +libdb4 compatibility adjustments. + +In particular, this patch adds extra file permission checking and passes the +DB_CREATE flag to the first invocation of db_open on the file's database +structure, which rids us of the following message: + + BDB0635 DB_CREATE must be specified to create databases. + +--- nvi-1.81.6.orig/common/msg.c 2009-02-26 14:26:58.350336128 +0100 ++++ nvi-1.81.6/common/msg.c 2009-02-26 14:29:05.235335829 +0100 +@@ -724,9 +724,18 @@ + p = buf; + } else + p = file; ++ if (access(p, F_OK) != 0) { ++ if (first) { ++ first = 0; ++ return (1); ++ } ++ sp->db_error = ENOENT; ++ msgq_str(sp, M_DBERR, p, "%s"); ++ return (1); ++ } + if ((sp->db_error = db_create(&db, 0, 0)) != 0 || + (sp->db_error = db->set_re_source(db, p)) != 0 || +- (sp->db_error = db_open(db, NULL, DB_RECNO, 0, 0)) != 0) { ++ (sp->db_error = db_open(db, NULL, DB_RECNO, DB_CREATE, 0)) != 0) { + if (first) { + first = 0; + return (1); |