pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/got



Module Name:    pkgsrc
Committed By:   vins
Date:           Sun Feb 11 14:47:08 UTC 2024

Modified Files:
        pkgsrc/devel/got: DESCR Makefile PLIST distinfo
Added Files:
        pkgsrc/devel/got: MESSAGE
        pkgsrc/devel/got/files: README.pkgsrc gotd.conf gotd.sh
        pkgsrc/devel/got/patches: patch-compat_sha2.h patch-gotd_log.h
Removed Files:
        pkgsrc/devel/got/files/openbsd-compat: Makefile endian.h freezero.c
            getdtablecount.c imsg-buffer.c imsg.c imsg.h open.c
            openbsd-compat.h recallocarray.c sha1.h util.h
        pkgsrc/devel/got/patches: patch-Makefile patch-Makefile.inc
            patch-got_Makefile patch-libexec_Makefile.inc
            patch-regress_Makefile patch-regress_cmdline_Makefile
            patch-regress_cmdline_common.sh patch-regress_cmdline_histedit.sh
            patch-regress_delta_Makefile patch-regress_fetch_Makefile
            patch-regress_idset_Makefile patch-regress_path_Makefile
            patch-tog_Makefile patch-tog_tog.c

Log Message:
got: use devel/got-portable to update to v0.95

Bring this package in sync with upstream by relying on its portable
counterpart found at devel/got-portable.

Practically speaking, we're renaming devel/got-portable to devel/got and
making it supersede the former of the two. The previous devel/got
package, an independent port of Game of Trees to NetBSD by @ryoon,
predating the official portable release, gets hereby silently deleted
along with this commit.

For reference, see:
https://mail-index.netbsd.org/pkgsrc-users/2024/01/18/msg038795.html


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/devel/got/DESCR pkgsrc/devel/got/PLIST
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/got/MESSAGE
cvs rdiff -u -r1.3 -r1.4 pkgsrc/devel/got/Makefile pkgsrc/devel/got/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/got/files/README.pkgsrc \
    pkgsrc/devel/got/files/gotd.conf pkgsrc/devel/got/files/gotd.sh
cvs rdiff -u -r1.1 -r0 pkgsrc/devel/got/files/openbsd-compat/Makefile \
    pkgsrc/devel/got/files/openbsd-compat/endian.h \
    pkgsrc/devel/got/files/openbsd-compat/freezero.c \
    pkgsrc/devel/got/files/openbsd-compat/getdtablecount.c \
    pkgsrc/devel/got/files/openbsd-compat/imsg-buffer.c \
    pkgsrc/devel/got/files/openbsd-compat/imsg.c \
    pkgsrc/devel/got/files/openbsd-compat/imsg.h \
    pkgsrc/devel/got/files/openbsd-compat/open.c \
    pkgsrc/devel/got/files/openbsd-compat/openbsd-compat.h \
    pkgsrc/devel/got/files/openbsd-compat/recallocarray.c \
    pkgsrc/devel/got/files/openbsd-compat/sha1.h \
    pkgsrc/devel/got/files/openbsd-compat/util.h
cvs rdiff -u -r1.1 -r0 pkgsrc/devel/got/patches/patch-Makefile \
    pkgsrc/devel/got/patches/patch-Makefile.inc \
    pkgsrc/devel/got/patches/patch-got_Makefile \
    pkgsrc/devel/got/patches/patch-libexec_Makefile.inc \
    pkgsrc/devel/got/patches/patch-regress_Makefile \
    pkgsrc/devel/got/patches/patch-regress_cmdline_Makefile \
    pkgsrc/devel/got/patches/patch-regress_cmdline_common.sh \
    pkgsrc/devel/got/patches/patch-regress_cmdline_histedit.sh \
    pkgsrc/devel/got/patches/patch-regress_delta_Makefile \
    pkgsrc/devel/got/patches/patch-regress_fetch_Makefile \
    pkgsrc/devel/got/patches/patch-regress_idset_Makefile \
    pkgsrc/devel/got/patches/patch-regress_path_Makefile \
    pkgsrc/devel/got/patches/patch-tog_Makefile \
    pkgsrc/devel/got/patches/patch-tog_tog.c
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/got/patches/patch-compat_sha2.h \
    pkgsrc/devel/got/patches/patch-gotd_log.h

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

Modified files:

Index: pkgsrc/devel/got/DESCR
diff -u pkgsrc/devel/got/DESCR:1.1 pkgsrc/devel/got/DESCR:1.2
--- pkgsrc/devel/got/DESCR:1.1  Fri Jan 29 20:35:11 2021
+++ pkgsrc/devel/got/DESCR      Sun Feb 11 14:47:06 2024
@@ -1,2 +1,11 @@
-Game of Trees (Got) is a version control system which prioritizes ease
-of use and simplicity over flexibility.
+This is the portable version of the Game of Trees (GoT) version control
+system.
+
+Primary features of GoT include:
+
+* Prioritizes ease of use and simplicity over flexibility.
+* Designed from scratch using a OpenBSD-style C code base and licensed
+  under ISC.
+* Uses Git repositories to store versioned data. GoT is fully compatible
+  with Git, making it possible to work with both Got and Git on the same
+  repository.
Index: pkgsrc/devel/got/PLIST
diff -u pkgsrc/devel/got/PLIST:1.1 pkgsrc/devel/got/PLIST:1.2
--- pkgsrc/devel/got/PLIST:1.1  Fri Jan 29 20:35:11 2021
+++ pkgsrc/devel/got/PLIST      Sun Feb 11 14:47:06 2024
@@ -1,5 +1,9 @@
-@comment $NetBSD: PLIST,v 1.1 2021/01/29 20:35:11 ryoon Exp $
+@comment $NetBSD: PLIST,v 1.2 2024/02/11 14:47:06 vins Exp $
+bin/gitwrapper
 bin/got
+bin/gotadmin
+bin/gotctl
+bin/gotsh
 bin/tog
 libexec/got-fetch-pack
 libexec/got-index-pack
@@ -9,10 +13,30 @@ libexec/got-read-gitconfig
 libexec/got-read-gotconfig
 libexec/got-read-object
 libexec/got-read-pack
+libexec/got-read-patch
 libexec/got-read-tag
 libexec/got-read-tree
+libexec/got-send-pack
+man/man1/cvg.1
+man/man1/gitwrapper.1
 man/man1/got.1
+man/man1/gotadmin.1
+man/man1/gotsh.1
 man/man1/tog.1
 man/man5/git-repository.5
 man/man5/got-worktree.5
 man/man5/got.conf.5
+man/man5/gotd.conf.5
+man/man5/gotwebd.conf.5
+man/man8/gotctl.8
+man/man8/gotd.8
+man/man8/gotwebd.8
+sbin/cvg
+sbin/gotd
+sbin/gotwebd
+share/doc/got/CHANGELOG
+share/doc/got/README
+share/doc/got/README.pkgsrc
+share/doc/got/README.portable
+share/doc/got/TODO
+share/examples/got/gotd.conf

Index: pkgsrc/devel/got/Makefile
diff -u pkgsrc/devel/got/Makefile:1.3 pkgsrc/devel/got/Makefile:1.4
--- pkgsrc/devel/got/Makefile:1.3       Thu Jan 18 05:02:43 2024
+++ pkgsrc/devel/got/Makefile   Sun Feb 11 14:47:06 2024
@@ -1,46 +1,98 @@
-# $NetBSD: Makefile,v 1.3 2024/01/18 05:02:43 gutteridge Exp $
+# $NetBSD: Makefile,v 1.4 2024/02/11 14:47:06 vins Exp $
 
-DISTNAME=      got-0.48
+DISTNAME=      got-portable-0.95
+PKGNAME=       ${DISTNAME:S/-portable//}
 CATEGORIES=    devel
-MASTER_SITES=  https://gameoftrees.org/releases/
+MASTER_SITES=  https://gameoftrees.org/releases/portable/
 
-MAINTAINER=    ryoon%NetBSD.org@localhost
-HOMEPAGE=      https://gameoftrees.org/
-COMMENT=       Game of Trees version control system manipulating Git repo
+MAINTAINER=    vins%NetBSD.org@localhost
+HOMEPAGE=      https://gameoftrees.org/index.html
+COMMENT=       Game of Trees VCS to manipulate git repositories
 LICENSE=       isc
 
 CONFLICTS+=    got-portable-[0-9]*
+SUPERSEDES+=   got-portable-[0-9]*
+PREV_PKGPATH=  devel/got-portable
 
-USE_TOOLS+=    awk find
+BUILD_DEFS+=   VARBASE
 
-INSTALLATION_DIRS=     bin libexec ${PKGMANDIR}/man1 ${PKGMANDIR}/man5
+USE_TOOLS+=    pkg-config yacc
 
-MAKE_FLAGS+=   BINOWN=${BINOWN}
-MAKE_FLAGS+=   BINGRP=${BINGRP}
-MAKE_FLAGS+=   MANOWN=${MANOWN}
-MAKE_FLAGS+=   MANGRP=${MANGRP}
-MAKE_FLAGS+=   MANDIR=${PREFIX}/${PKGMANDIR}
-MAKE_FLAGS+=   MKHTML=no
+PKG_GROUPS=            _gotd
+PKG_USERS=             _gotd:_gotd
+PKG_GECOS._gotd=       Game of Trees Daemon
+PKG_SHELL._gotd=       /sbin/nologin
+PKG_HOME._gotd=                /nonexistent
+
+GNU_CONFIGURE=         yes
+CONFIGURE_ENV+=                YACC=${YACC:Q}
+CONFIGURE_ENV+=                CFLAGS=${CFLAGS:Q}
+CONFIGURE_ENV+=                LDFLAGS=${LDFLAGS:Q}
+CONFIGURE_ARGS+=       --enable-gotd
+CONFIGURE_ARGS+=       --enable-cvg
+CONFIGURE_ARGS+=       --with-gotd-empty-path=${VARBASE}/empty
+CONFIGURE_ARGS+=       --with-gitwrapper-git-libexec-path=${PREFIX}/libexec/git-core
+
+EGDIR=         ${PREFIX}/share/examples/got
+CONF_FILES+=   ${EGDIR}/gotd.conf ${PKG_SYSCONFDIR}/gotd.conf
+
+DOCDIR=                ${PREFIX}/share/doc/got
+PKG_DOCS=      CHANGELOG README README.pkgsrc README.portable TODO
+
+MAKE_DIRS+=    ${VARBASE}/empty ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0700
+
+INSTALLATION_DIRS=     bin libexec
+INSTALLATION_DIRS+=    ${PKGMANDIR}/man1 ${PKGMANDIR}/man5
+INSTALLATION_DIRS+=    share/doc/got share/examples/got
+
+RCD_SCRIPTS=   gotd
+PKG_SHELL=     bin/gotsh
+
+TEST_TARGET=   tests
+
+SUBST_CLASSES+=                pkgsrc
+SUBST_STAGE.pkgsrc=    pre-configure
+SUBST_FILES.pkgsrc=    README.pkgsrc
+SUBST_VARS.pkgsrc=     PKG_SYSCONFDIR PREFIX VARBASE
+SUBST_MESSAGE.pkgsrc=  Replacing pkgsrc placeholders.
+
+SUBST_CLASSES+=                conf
+SUBST_STAGE.conf=      pre-configure
+SUBST_MESSAGE.conf=    Fix configuration file path.
+SUBST_FILES.conf+=     gitwrapper/gitwrapper.1 gotd/gotd.conf.5        \
+                       gotd/gotd.h gotd/gotd.8
+SUBST_SED.conf+=       -e "s:/etc/gotd.conf:${PKG_SYSCONFDIR}/gotd.conf:g"
+
+MESSAGE_SUBST+=                DOCDIR=${DOCDIR:Q}
 
 .include "../../mk/bsd.prefs.mk"
 
+post-extract:
+       ${RUN}cp ${FILESDIR}/README.pkgsrc ${WRKSRC}
+
+.if ${OPSYS} == "Linux"
 post-patch:
-       ${FIND} ${WRKSRC} -name '*.[cy]' -exec \
-               ${AWK} '/^#include /{c += 1;} \
-                       c == 1 { \
-                       gsub("(^#include )", "#include \"openbsd-compat.h\"\n&", $$0) \
-                       } \
-                       {print $$0 > "{}.back"} \
-               ' \
-               {} \;
-       ${FIND} ${WRKSRC} -name '*.[cy]' -exec \
-               cp {}.back {} \;
-       ${CP} -r ${FILESDIR}/openbsd-compat ${WRKSRC}/
-.if ${OPSYS} == "NetBSD"
-       # NetBSD has sha1.h.
-       ${RM} -f ${WRKSRC}/openbsd-compat/sha1.h
+# let libmd include the correct header.
+       ${RUN}${RM} -f ${WRKSRC}/compat/sha2.h
 .endif
 
-# For set_panel_userptr(3)'s second argument and waddwstr(3).
+post-install:
+       ${INSTALL_DATA} ${FILESDIR}/gotd.conf ${DESTDIR}${EGDIR}
+       ${INSTALL_DATA} ${PKG_DOCS:S|^|${WRKSRC}/|} ${DESTDIR}${DOCDIR}
+
+# need libcrypto.so.1.1
+BUILDLINK_API_DEPENDS.openssl+=   openssl>=1.1.1d
+.include "../../security/openssl/buildlink3.mk"
+
+# required for set_panel_userptr(3) and waddwstr(3).
 .include "../../devel/ncursesw/buildlink3.mk"
+
+# compatibility macros and functions for Linux.
+.if ${OPSYS} == "Linux"
+.  include "../../devel/libbsd/buildlink3.mk"
+.endif
+
+.include "../../devel/libevent/buildlink3.mk"
+.include "../../devel/libuuid/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
Index: pkgsrc/devel/got/distinfo
diff -u pkgsrc/devel/got/distinfo:1.3 pkgsrc/devel/got/distinfo:1.4
--- pkgsrc/devel/got/distinfo:1.3       Tue Oct 26 10:14:48 2021
+++ pkgsrc/devel/got/distinfo   Sun Feb 11 14:47:06 2024
@@ -1,19 +1,7 @@
-$NetBSD: distinfo,v 1.3 2021/10/26 10:14:48 nia Exp $
+$NetBSD: distinfo,v 1.4 2024/02/11 14:47:06 vins Exp $
 
-BLAKE2s (got-0.48.tar.gz) = 19a320b38c4cc1ab637629dada2bb367c1051c7cc5bda46e04e2ad687bba48d3
-SHA512 (got-0.48.tar.gz) = 55ea20ee6f7c34610ef37c8f93b2ed3c71547711358bb7d88e187fd5e5d820e6ce352bfe54d35342d6e5eb1bd4c7e741bf232b1c3405d5dbcc99ca9a87226984
-Size (got-0.48.tar.gz) = 483588 bytes
-SHA1 (patch-Makefile) = b6787de1a7b505b44f29cbc697201511f521cd78
-SHA1 (patch-Makefile.inc) = 28ab688bf6ddfaf51bcf92a933864f8e89c548ff
-SHA1 (patch-got_Makefile) = e61bc61a1cbe9055e755ec42ac04d3246190da7d
-SHA1 (patch-libexec_Makefile.inc) = c56eb1aea447f65f42682a07225e81d187dc2072
-SHA1 (patch-regress_Makefile) = bc19146d5b4bb56baf849a0b38313c13c843675b
-SHA1 (patch-regress_cmdline_Makefile) = 79a6727cb0963b6ac12f1efe7c0873436f291bbc
-SHA1 (patch-regress_cmdline_common.sh) = df6011b7811e70600ad03701f4304f4b8978a077
-SHA1 (patch-regress_cmdline_histedit.sh) = 7fd4f2cdd13456fd14a2ec19630bb0db693d2616
-SHA1 (patch-regress_delta_Makefile) = 7b71d20428468de65313dda4fcfe1dba44cbbbff
-SHA1 (patch-regress_fetch_Makefile) = 33dafea0b53ce9fc096b57acb10541ae95c48561
-SHA1 (patch-regress_idset_Makefile) = 18639cc0c3a59a0da1775ea84cc7e47b1ee5b464
-SHA1 (patch-regress_path_Makefile) = 958100601458203cef4b387f63035826d9a449e8
-SHA1 (patch-tog_Makefile) = ca149a6c1d92e0ea9960e035eb761098e6e8255f
-SHA1 (patch-tog_tog.c) = f3b4d76b9fa0f706584575f96d90ead4439ba669
+BLAKE2s (got-portable-0.95.tar.gz) = 0207d87899366b18310ef711c9e0c89fb1190363be6976b105891a2cb0ee51cf
+SHA512 (got-portable-0.95.tar.gz) = d07efc24bbf3228a888fa3731672d0196411cba7f2efff654d30e2bbe4dca2518fc0892cfbf8e8a438872d1a1dece8a1df2569127cd0204042b859b54d5e4ce5
+Size (got-portable-0.95.tar.gz) = 1271793 bytes
+SHA1 (patch-compat_sha2.h) = 56c722110049bbbc6ccbbf0418717d2430788459
+SHA1 (patch-gotd_log.h) = eb0890789c1fe7a490ea01d02e48fd71cddc2891

Added files:

Index: pkgsrc/devel/got/MESSAGE
diff -u /dev/null pkgsrc/devel/got/MESSAGE:1.1
--- /dev/null   Sun Feb 11 14:47:08 2024
+++ pkgsrc/devel/got/MESSAGE    Sun Feb 11 14:47:06 2024
@@ -0,0 +1,9 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2024/02/11 14:47:06 vins Exp $
+
+A sample configuration file for the GoT daemon has been installed inside
+${PKG_SYSCONFDIR}.
+
+Check the README.pkgsrc available at ${DOCDIR}.
+
+===========================================================================

Index: pkgsrc/devel/got/files/README.pkgsrc
diff -u /dev/null pkgsrc/devel/got/files/README.pkgsrc:1.1
--- /dev/null   Sun Feb 11 14:47:08 2024
+++ pkgsrc/devel/got/files/README.pkgsrc        Sun Feb 11 14:47:06 2024
@@ -0,0 +1,119 @@
++----------------------------------------------------------------------
+| Getting started with Game of Trees on pkgsrc
++----------------------------------------------------------------------
+
+To use the Game of Trees daemon to host git repositoties, a few
+manual setup steps are required.
+
+| NOTE: this tutorial was originally written for Debian by Tobias
+| Heider (@tobhe), to whom all credit goes. This is a modified
+| version adjusted for pkgsrc/NetBSD, with minor additions.
+
+Below is an example for setting up read only anonymous access to a
+clone of the upstream got repository.
+
+First we need to check out the got source code on our host machine.
+
+    ----------------------------------------------------------------
+    # Create git directory
+    $ mkdir -p @VARBASE@/git
+    $ cd @VARBASE@/git
+
+    # Clone the repository you are planning to serve with got
+    $ got clone ssh://anonymous%got.gameoftrees.org@localhost/got.git
+
+    # Alternatively you can use git
+    $ git clone --bare ssh://anonymous%got.gameoftrees.org@localhost/got.git
+
+    # Make sure the gotd user can access the directory
+    $ chown -R _gotd:_gotd @VARBASE@/git
+    ----------------------------------------------------------------
+
+For our examplei, we need to create an anonymous ssh login user
+and group with an empty password to allow everyone read only access.
+For a more restricted setup it is also possible to create a developer
+group and users with pre-shared ssh keys.
+
+    ----------------------------------------------------------------
+    # Add anonymous user for ssh login
+    $ groupadd anonymous
+    $ useradd -g anonymous -c "Anonymous GoT server login" \
+      -d /nonexistent -s @PREFIX@/bin/gotsh anonymous
+    ----------------------------------------------------------------
+
+It is strongly recommended to harden the anonymous user's sshd config to
+make sure they can only run their gotsh shell. In our case, password
+authentication and empty passwords need to be allowed explicitly.
+
+    /etc/ssh/sshd_config:
+    ================================================================
+    Match User anonymous
+       DisableForwarding yes
+       PermitTTY no
+       PasswordAuthentication yes
+       PermitEmptyPasswords yes
+    ================================================================
+
+Now, modify @PKG_SYSCONFDIR@/gotd.conf to point the daemon to our git
+repository and allow read-only access for the anonymous user:
+
+    @PKG_SYSCONFDIR@/gotd.conf:
+    ================================================================
+    # Run as the default user
+    user _gotd
+
+    # ssh://anonymous%example.com@localhost/got
+    repository "got" {
+            path "@VARBASE@/git/got.git"
+            permit ro anonymous
+    }
+    ================================================================
+
+See the gotd.conf(5) man page to learn more about gotd configuration. 
+
+gotd requires the `git-receive-pack' and `git-upload-pack' commands to
+invoke gotsh. However, git already provides these commands as
+symbolic links to the git binary. To prevent conflicting names, GoT
+comes with the gitwrapper(1) utility, which acts similarly to
+mailwrapper(8) for MTAs, invoking the correct git server (git or got
+daemon) for the right repository, depending on the chosen policy.
+
+For this to work, the aforementioned commands need to be symlinked to
+gitwrapper under @PREFIX@/bin: 
+
+    ---------------------------------------------------------------
+    $ cd @PREFIX@/bin
+    $ ln -sf gitwrapper git-upload-pack
+    $ ln -sf gitwrapper git-receive-pack
+    ---------------------------------------------------------------
+
+In such way, any Git repository listed in @PKG_SYSCONFDIR/gotd.conf
+will be automatically served by gotd, while any Git repository not
+listed in @PKG_SYSCONFDIR/gotd.conf shall be served by git, allowing 
+a peaceful co-existence of gotd and Git.                   
+
+To run the GoT server, import the sample rc.d service script provided
+with this package and activate the gotd service:
+
+| NOTE: this assumes an underlying BSD system using rc services
+
+    ----------------------------------------------------------------
+    $ cp @PREFIX@/share/examples/rc.d/gotd /etc/rc.d
+    $ echo gotd=YES >> /etc/rc.conf
+    ----------------------------------------------------------------
+
+Finally, reload the sshd configuration and start the gotd service:
+
+    ----------------------------------------------------------------
+    $ service sshd restart
+    $ service gotd start 
+    ----------------------------------------------------------------
+
+It should now be possible to clone the git repository with:
+
+    ----------------------------------------------------------------
+    $ got clone ssh://anonymous%example.com@localhost/got
+    ----------------------------------------------------------------
+
+You can find more information on how to configure gotsh and gotd in
+their respective man pages gotsh(1), gotd(8), and got.conf(5).
Index: pkgsrc/devel/got/files/gotd.conf
diff -u /dev/null pkgsrc/devel/got/files/gotd.conf:1.1
--- /dev/null   Sun Feb 11 14:47:08 2024
+++ pkgsrc/devel/got/files/gotd.conf    Sun Feb 11 14:47:06 2024
@@ -0,0 +1,39 @@
+# Run as the default user
+#user _gotd
+
+# Listen on the default socket
+#listen on "/var/run/gotd.sock"
+
+# This repository can be accessed via ssh://user%example.com@localhost/src
+#repository "src" {
+#        path "/var/git/src.git"
+#        permit rw flan_hacker
+#        permit rw :developers
+#        permit ro anonymous
+#
+#        protect branch "main"
+#        protect tag namespace "refs/tags/"
+#}
+
+# This repository can be accessed via
+# ssh://user%example.com@localhost/openbsd/ports
+#repository "openbsd/ports" {
+#        path "/var/git/ports.git"
+#        permit rw :porters
+#        permit ro anonymous
+#        deny flan_hacker
+#
+#        protect {
+#                branch "main"
+#                tag namespace "refs/tags/"
+#        }
+#}
+
+# Use a larger request timeout value:
+#connection request timeout 2h
+
+# Some users are granted a higher concurrent connection limit:
+#connection {
+#        limit user flan_hacker 16
+#        limit user anonymous 32
+#}
Index: pkgsrc/devel/got/files/gotd.sh
diff -u /dev/null pkgsrc/devel/got/files/gotd.sh:1.1
--- /dev/null   Sun Feb 11 14:47:08 2024
+++ pkgsrc/devel/got/files/gotd.sh      Sun Feb 11 14:47:06 2024
@@ -0,0 +1,40 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: gotd.sh,v 1.1 2024/02/11 14:47:06 vins Exp $
+#
+
+# PROVIDE: gotd
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+$_rc_subr_loaded . @SYSCONFBASE@/rc.subr
+
+name="gotd"
+rcvar=$name
+
+: ${gotd_config:="@PKG_SYSCONFDIR@/${name}.conf"}
+: ${gotd_server:="@PREFIX@/sbin/${name}"}
+: ${gotd_flags:=""}
+
+command="${gotd_server}"
+command_args="-f ${gotd_config} -v"
+required_files="${gotd_config}"
+pidfile="@VARBASE@/run/${name}.pid"
+
+start_precmd="gotd_precmd"
+check_cmd="gotd_check"
+extra_commands="check"
+
+gotd_check()
+{
+       echo "Performing sanity check on gotd configuration:"
+       eval ${command} ${command_args} ${gotd_flags} -n
+}
+
+gotd_precmd()
+{
+       gotd_check
+}
+
+load_rc_config $name
+run_rc_command "$1"

Index: pkgsrc/devel/got/patches/patch-compat_sha2.h
diff -u /dev/null pkgsrc/devel/got/patches/patch-compat_sha2.h:1.1
--- /dev/null   Sun Feb 11 14:47:08 2024
+++ pkgsrc/devel/got/patches/patch-compat_sha2.h        Sun Feb 11 14:47:07 2024
@@ -0,0 +1,17 @@
+$NetBSD: patch-compat_sha2.h,v 1.1 2024/02/11 14:47:07 vins Exp $
+
+attribute __bounded__ is only defined in OpenBSD's GCC.
+
+--- compat/sha2.h.orig 2023-03-13 14:37:38.000000000 +0000
++++ compat/sha2.h
+@@ -39,6 +39,10 @@
+ #ifndef _SSHSHA2_H
+ #define _SSHSHA2_H
+
++#if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__OpenBSD__)
++#define __bounded__(x, y, z)
++#endif
++
+ #if !defined(HAVE_SHA256UPDATE) || !defined(HAVE_SHA384UPDATE) || \
+     !defined(HAVE_SHA512UPDATE)
+ 
Index: pkgsrc/devel/got/patches/patch-gotd_log.h
diff -u /dev/null pkgsrc/devel/got/patches/patch-gotd_log.h:1.1
--- /dev/null   Sun Feb 11 14:47:08 2024
+++ pkgsrc/devel/got/patches/patch-gotd_log.h   Sun Feb 11 14:47:07 2024
@@ -0,0 +1,14 @@
+$NetBSD: patch-gotd_log.h,v 1.1 2024/02/11 14:47:07 vins Exp $
+
+Provide a declaration of va_list
+
+--- gotd/log.h.orig    2024-01-14 16:07:41.039068602 +0000
++++ gotd/log.h
+@@ -14,6 +14,7 @@
+  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+  */
+ 
++#include <stdarg.h>
+ #include "got_compat.h"
+ 
+ void  log_init(int, int);



Home | Main Index | Thread Index | Old Index