commit - cff566e89cb95d37e3bc3478c154504e6cfc4b02
commit + 9985aa0db65d4e8015eac2fe780944f56d7d162d
blob - 2c026400fa305c2d7a53ed4fd25940514b9762f7
blob + ef476d41d5fe906cd23c7325e8888887a6581911
--- .github/ci/build.sh
+++ .github/ci/build.sh
#!/bin/sh
./autogen.sh || exit 1
-./configure || exit 1
+./configure --enable-gotd || exit 1
exec make
blob - c4372610089506fc90094b29f0775201458dc21a
blob + 3e1b5a6503253dd7ff37dc4d1307370d0718aee1
--- .gitignore
+++ .gitignore
gotadmin/gotadmin
gotd/gotd
gotd/parse.c
+gotsh/gotsh
gotwebd/gotwebd
gotwebd/pages.c
gotwebd/parse.c
blob - 07d1985d4531f0737185f7cf2ae4fcaa592b51ac
blob + 9ca4c3b786661579be30e922d756cf814b4885e9
--- Makefile.am
+++ Makefile.am
# TODO: gotd gotsh template
if GOTD_ENABLED
-SUBDIRS += gotd
+SUBDIRS += gotd gotsh
endif
include $(top_builddir)/Makefile.common
blob - 3ff825b09b88db266bd8e38e15d6289244fed477
blob + f2a2bfa6532702ab19ed14aa09e496b67ebe6322
--- configure.ac
+++ configure.ac
if test "x$enable_gotd" = "xyes"; then
AC_CONFIG_FILES([gotd/Makefile])
+ AC_CONFIG_FILES([gotsh/Makefile])
fi
AC_OUTPUT
blob - 523878131c3f5d6c33e9b6600b339d6a8d9bef75 (mode 644)
blob + /dev/null
--- gotsh/Makefile
+++ /dev/null
-.PATH:${.CURDIR}/../lib ${.CURDIR}/../gotd
-
-.include "../got-version.mk"
-
-PROG= gotsh
-SRCS= gotsh.c error.c pkt.c hash.c serve.c path.c gitproto.c \
- imsg.c pollfd.c dial.c reference_parse.c object_qid.c
-
-MAN = ${PROG}.1
-
-CPPFLAGS = -I${.CURDIR}/../include -I${.CURDIR}/../lib -I${.CURDIR}/../gotd
-
-.if defined(PROFILE)
-LDADD = -lutil_p -lc_p -levent_p
-.else
-LDADD = -lutil -levent
-.endif
-DPADD = ${LIBEVENT} ${LIBUTIL}
-
-.if ${GOT_RELEASE} != "Yes"
-NOMAN = Yes
-.endif
-
-realinstall:
- ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} \
- -m ${BINMODE} ${PROG} ${BINDIR}/${PROG}
-
-.include <bsd.prog.mk>
blob - /dev/null
blob + f8567a97736772370e3e0d5f72205e46536c356b (mode 644)
--- /dev/null
+++ gotsh/Makefile.am
+bin_PROGRAMS = gotsh
+
+include $(top_builddir)/Makefile.common
+
+AM_CPPFLAGS += -I$(top_builddir)/gotd
+
+gotsh_SOURCES = gotsh.c \
+ $(top_srcdir)/gotd/imsg.c \
+ $(top_srcdir)/lib/error.c \
+ $(top_srcdir)/lib/gitproto.c \
+ $(top_srcdir)/lib/path.c \
+ $(top_srcdir)/lib/pkt.c \
+ $(top_srcdir)/lib/pollfd.c \
+ $(top_srcdir)/lib/reference_parse.c \
+ $(top_srcdir)/lib/serve.c \
+ $(top_srcdir)/lib/sha1.c
+
+gotsh_DEPENDENCIES = $(top_builddir)/compat/libopenbsd-compat.a
+EXTRA_DIST = gotsh.1
+
+man1_MANS = gotsh.1
+
+LDADD = -L$(top_builddir)/compat -L$(top_builddir)/gotd -lopenbsd-compat -lm
+if HOST_FREEBSD
+LDADD += -lmd
+endif
+
+# Disable for now (per upstream)...
+#
+#install-exec-hook:
+# ln -sf $(prefix)/bin/gotsh $(prefix)/bin/git-receive-pack
+# ln -sf $(prefix)/bin/gotsh $(prefix)/bin/git-upload-pack
blob - 7cb0c0edba72b2dbaaafc7061d6915e91f743945
blob + 99f374425c6a364701634e5798526561a4013c7d
--- gotsh/gotsh.c
+++ gotsh/gotsh.c
#include "got_error.h"
#include "got_serve.h"
#include "got_path.h"
+#include "got_compat.h"
#include "got_lib_dial.h"