pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/databases/cdb



Module Name:    pkgsrc
Committed By:   schmonz
Date:           Thu Oct 23 17:07:36 UTC 2025

Modified Files:
        pkgsrc/databases/cdb: Makefile PLIST distinfo
Added Files:
        pkgsrc/databases/cdb/patches: patch-Makefile patch-rts.tests
Removed Files:
        pkgsrc/databases/cdb/patches: patch-cdbmake.c patch-tryulong32.c

Log Message:
cdb: update to 20251021. Changes:

Add support for cdb64 (at least on 64-bit platforms).

Switch almost all internal integers to num, defined as long long.
Replace various uint32, fmt, scan functions with num functions.

For tests, avoid depending on csh; depend on ulimit instead of
softlimit; increase limit to handle current process bloat.

Split buffer interface into inbuf and outbuf.

Clean up hier interface.

Remove various function definitions and declarations not used in cdb.

Eliminate some wrappers: str_len, alloc, uint32, exit, error, systype.

Tweak code to avoid deprecated C features (old-style function
definitions, empty prototypes, old-style main definitions).

Make more use of const and static. Eliminate register. Add -Wall to
compiler options. Tweak code to avoid -Wall complaints.

Add some don't-be-stupid compiler options: -fwrapv,
-fno-delete-null-pointer-checks, -fno-strict-aliasing, and
-fno-strict-overflow.

Many updates to documentation.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 pkgsrc/databases/cdb/Makefile
cvs rdiff -u -r1.1.1.1 -r1.2 pkgsrc/databases/cdb/PLIST
cvs rdiff -u -r1.8 -r1.9 pkgsrc/databases/cdb/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/databases/cdb/patches/patch-Makefile \
    pkgsrc/databases/cdb/patches/patch-rts.tests
cvs rdiff -u -r1.1 -r0 pkgsrc/databases/cdb/patches/patch-cdbmake.c \
    pkgsrc/databases/cdb/patches/patch-tryulong32.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/databases/cdb/Makefile
diff -u pkgsrc/databases/cdb/Makefile:1.29 pkgsrc/databases/cdb/Makefile:1.30
--- pkgsrc/databases/cdb/Makefile:1.29  Thu May 22 04:51:28 2025
+++ pkgsrc/databases/cdb/Makefile       Thu Oct 23 17:07:35 2025
@@ -1,30 +1,49 @@
-# $NetBSD: Makefile,v 1.29 2025/05/22 04:51:28 schmonz Exp $
+# $NetBSD: Makefile,v 1.30 2025/10/23 17:07:35 schmonz Exp $
 
-DISTNAME=              cdb-0.75
+DISTNAME=              cdb-20251021
 CATEGORIES=            databases
-MASTER_SITES=          https://cr.yp.to/cdb/
+MASTER_SITES=          ${HOMEPAGE}
 
 MAINTAINER=            schmonz%NetBSD.org@localhost
-HOMEPAGE=              https://cr.yp.to/cdb.html
+HOMEPAGE=              https://cdb.cr.yp.to/
 COMMENT=               Creates and reads constant databases
 LICENSE=               public-domain
 
 CONFLICTS+=            tinycdb-[0-9]*
 
 FORCE_C_STD=           c99
+CFLAGS.Linux+=         -D_XOPEN_SOURCE=500
+INSTALLATION_DIRS=     bin include lib ${PKGMANDIR}/man1 ${PKGMANDIR}/man3
+USE_TOOLS+=            diff
+
+SUBST_CLASSES+=                for-test
+SUBST_STAGE.for-test=  pre-test
+SUBST_FILES.for-test=  cdb*make-*-for-test
+SUBST_SED.for-test=    -e 's|${PREFIX}/bin/|${WRKSRC}/|'
+
+post-build:
+       cd ${WRKSRC};                                   \
+       for i in cdb*make-12 cdb*make-sv; do            \
+               ${CP} $$i $$i-for-test;                 \
+       done
 
-DJB_ERRNO_FIXUP=       error.h
-
-INSTALLATION_DIRS=     bin include lib
-
-do-install:
-       for prog in cdbdump cdbget cdbmake cdbstats cdbtest; do \
-       ${INSTALL_PROGRAM} ${WRKSRC}/$$prog ${DESTDIR}${PREFIX}/bin; \
+do-test:
+       ${RUN}${_ULIMIT_CMD} cd ${WRKSRC};              \
+       ./rts > rts.out;                                \
+       ${DIFF} rts.exp rts.out
+
+post-install:
+       cd ${WRKSRC};                                                   \
+       ${INSTALL_DATA} cdb.h ${DESTDIR}${PREFIX}/include/;             \
+       ${INSTALL_DATA} cdb.a ${DESTDIR}${PREFIX}/lib/libcdb.a;         \
+       ${INSTALL_DATA} cdb64.a ${DESTDIR}${PREFIX}/lib/libcdb64.a;     \
+       cd doc/man;                                                     \
+       for i in *.3; do                                                \
+               ${INSTALL_MAN} $$i ${DESTDIR}${PREFIX}/${PKGMANDIR}/man3/;      \
+       done;                                                           \
+       for i in *.1; do                                                \
+               ${INSTALL_MAN} $$i ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/;      \
        done
-       ${INSTALL_SCRIPT} ${WRKSRC}/cdbmake-12 ${DESTDIR}${PREFIX}/bin
-       ${INSTALL_SCRIPT} ${WRKSRC}/cdbmake-sv ${DESTDIR}${PREFIX}/bin
-       ${INSTALL_DATA} ${WRKSRC}/cdb.h ${DESTDIR}${PREFIX}/include
-       ${INSTALL_DATA} ${WRKSRC}/cdb.a ${DESTDIR}${PREFIX}/lib/libcdb.a
 
 .include "../../mk/djbware.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/databases/cdb/PLIST
diff -u pkgsrc/databases/cdb/PLIST:1.1.1.1 pkgsrc/databases/cdb/PLIST:1.2
--- pkgsrc/databases/cdb/PLIST:1.1.1.1  Mon Dec 10 18:11:46 2001
+++ pkgsrc/databases/cdb/PLIST  Thu Oct 23 17:07:35 2025
@@ -1,4 +1,11 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2001/12/10 18:11:46 martti Exp $
+@comment $NetBSD: PLIST,v 1.2 2025/10/23 17:07:35 schmonz Exp $
+bin/cdb64dump
+bin/cdb64get
+bin/cdb64make
+bin/cdb64make-12
+bin/cdb64make-sv
+bin/cdb64stats
+bin/cdb64test
 bin/cdbdump
 bin/cdbget
 bin/cdbmake
@@ -8,3 +15,19 @@ bin/cdbstats
 bin/cdbtest
 include/cdb.h
 lib/libcdb.a
+lib/libcdb64.a
+man/man1/cdb64dump.1
+man/man1/cdb64get.1
+man/man1/cdb64make-12.1
+man/man1/cdb64make-sv.1
+man/man1/cdb64make.1
+man/man1/cdb64stats.1
+man/man1/cdb64test.1
+man/man1/cdbdump.1
+man/man1/cdbget.1
+man/man1/cdbmake-12.1
+man/man1/cdbmake-sv.1
+man/man1/cdbmake.1
+man/man1/cdbstats.1
+man/man1/cdbtest.1
+man/man3/cdb.3

Index: pkgsrc/databases/cdb/distinfo
diff -u pkgsrc/databases/cdb/distinfo:1.8 pkgsrc/databases/cdb/distinfo:1.9
--- pkgsrc/databases/cdb/distinfo:1.8   Tue Oct 26 10:09:14 2021
+++ pkgsrc/databases/cdb/distinfo       Thu Oct 23 17:07:35 2025
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.8 2021/10/26 10:09:14 nia Exp $
+$NetBSD: distinfo,v 1.9 2025/10/23 17:07:35 schmonz Exp $
 
-BLAKE2s (cdb-0.75.tar.gz) = f48cc4e973f3ea7133f67156ed3e6254973d6b873bb91286929b7ca1e016e214
-SHA512 (cdb-0.75.tar.gz) = 6faeab91a77457348b58f685e81000b83fb609691317198a06284c5c62dee1e4d6138f90be1e727021f279d740169c175a21b23c96adb39a654e3f7fafdf36c0
-Size (cdb-0.75.tar.gz) = 54162 bytes
-SHA1 (patch-cdbmake.c) = 08dfa3ab166bb7467d022a0ea20cac9426f30368
-SHA1 (patch-tryulong32.c) = 743b562943d4564ca6a23a51dc1962050d083dc1
+BLAKE2s (cdb-20251021.tar.gz) = 48bce6ddbb5e20beb379a9f764fab21bba5499462afffd83b3b10c446ba18455
+SHA512 (cdb-20251021.tar.gz) = dc7b4606a368488e8767df2493c1b4a43e6f89c1c104b6773c5c6591e2565e5156dbbe449143c3bb8b96fb7ad61f9b602ab34ea3531de1b2c86f02910d2be723
+Size (cdb-20251021.tar.gz) = 111952 bytes
+SHA1 (patch-Makefile) = e03b53bf44c9aaa06bda7710819a22207bb8b0ca
+SHA1 (patch-rts.tests) = 8af74673b9bfe3ed2833936db2c96d475a22158d

Added files:

Index: pkgsrc/databases/cdb/patches/patch-Makefile
diff -u /dev/null pkgsrc/databases/cdb/patches/patch-Makefile:1.1
--- /dev/null   Thu Oct 23 17:07:36 2025
+++ pkgsrc/databases/cdb/patches/patch-Makefile Thu Oct 23 17:07:36 2025
@@ -0,0 +1,42 @@
+$NetBSD: patch-Makefile,v 1.1 2025/10/23 17:07:36 schmonz Exp $
+
+Support DESTDIR.
+
+--- Makefile.orig      2025-10-21 10:56:07.000000000 +0000
++++ Makefile
+@@ -14,6 +14,14 @@ auto-str.o: \
+ compile auto-str.c outbuf.h num.h
+       ./compile auto-str.c
+ 
++auto_destdir.c: \
++auto-str conf-destdir
++      ./auto-str auto_home `head -1 conf-destdir` > auto_destdir.c
++
++auto_destdir.o: \
++compile auto_destdir.c
++      ./compile auto_destdir.c
++
+ auto_home.c: \
+ auto-str conf-home
+       ./auto-str auto_home `head -1 conf-home` > auto_home.c
+@@ -259,16 +267,16 @@ compile hier.c auto_home.h hier.h num.h
+       ./compile hier.c
+ 
+ instcopy: \
+-load instcopy.o hier.o auto_home.o buffer.a unix.a byte.a
+-      ./load instcopy hier.o auto_home.o buffer.a unix.a byte.a
++load instcopy.o hier.o auto_destdir.o buffer.a unix.a byte.a
++      ./load instcopy hier.o auto_destdir.o buffer.a unix.a byte.a
+ 
+ instcopy.o: \
+ compile instcopy.c outbuf.h strerr.h open.h hier.h inbuf.h num.h
+       ./compile instcopy.c
+ 
+ instcheck: \
+-load instcheck.o hier.o auto_home.o buffer.a unix.a byte.a
+-      ./load instcheck hier.o auto_home.o buffer.a unix.a byte.a
++load instcheck.o hier.o auto_destdir.o buffer.a unix.a byte.a
++      ./load instcheck hier.o auto_destdir.o buffer.a unix.a byte.a
+ 
+ instcheck.o: \
+ compile instcheck.c strerr.h hier.h num.h
Index: pkgsrc/databases/cdb/patches/patch-rts.tests
diff -u /dev/null pkgsrc/databases/cdb/patches/patch-rts.tests:1.1
--- /dev/null   Thu Oct 23 17:07:36 2025
+++ pkgsrc/databases/cdb/patches/patch-rts.tests        Thu Oct 23 17:07:36 2025
@@ -0,0 +1,24 @@
+$NetBSD: patch-rts.tests,v 1.1 2025/10/23 17:07:36 schmonz Exp $
+
+Run tests on in-tree binaries, not installed ones.
+
+--- rts.tests.orig     2025-10-23 16:47:34.587199467 +0000
++++ rts.tests
+@@ -26,7 +26,7 @@ do
+     one  Hello
+ # comment line
+     two  Goodbye
+-' | ${CDB}make-12 12.${CDB} 12.tmp
++' | ${CDB}make-12-for-test 12.${CDB} 12.tmp
+   echo $?
+ 
+   echo "--- ${CDB}make-sv handles simple example"
+@@ -38,7 +38,7 @@ do
+   discard           9/udp    sink null
+   systat           11/tcp    users        #Active Users
+   systat           11/udp    users        #Active Users
+-  ' | ${CDB}make-sv sv.${CDB} sv.tmp
++  ' | ${CDB}make-sv-for-test sv.${CDB} sv.tmp
+   echo $?
+ 
+   echo "--- ${CDB}dump handles simple examples"



Home | Main Index | Thread Index | Old Index