commit - b6022c9fad93e13b6592554569a50b82e9ddd43f
commit + 2703d2f4d80ce78d7b32944456f766933db36b6b
blob - dfdc5731cff41609b9887eb0e293a88e8cebf00a
blob + 8c127ad43614e1496915d927fd864d0118a171d7
--- Makefile
+++ Makefile
PREFIX = /usr/local
SBINDIR = ${PREFIX}/sbin
MANDIR = ${PREFIX}/man
-WWWDIR = /var/www/htdocs
# -- build-related variables --
# ${MAKE} -C template distclean
install:
- mkdir -p ${DESTDIR}${MANDIR}/man5
mkdir -p ${DESTDIR}${MANDIR}/man8
mkdir -p ${DESTDIR}${SBINDIR}
- mkdir -p ${DESTDIR}${WWWDIR}
- ${INSTALL_MAN} galileo.conf.5 ${DESTDIR}${MANDIR}/man5/${PROG}.conf.5
- ${INSTALL_MAN} galileo.8 ${DESTDIR}${MANDIR}/man8/${PROG}.8
+ ${INSTALL_MAN} pkg_fcgi.8 ${DESTDIR}${MANDIR}/man8/${PROG}.8
${INSTALL_PROGRAM} ${PROG} ${DESTDIR}${SBINDIR}
- ${INSTALL_DATA} galileo.css ${DESTDIR}${WWWDIR}
uninstall:
- rm ${DESTDIR}${MANDIR}/man5/${PROG}.conf.5
rm ${DESTDIR}${MANDIR}/man8/${PROG}.8
rm ${DESTDIR}${SBINDIR}/${PROG}
- rm ${DESTDIR}${WWWDIR}/galileo.css
# -- internal build targets --
# -- maintainer targets --
+PUBKEY = keys/pkg_fcgi-${VERSION:S/.//}.pub
PRIVKEY = set-PRIVKEY
-DISTFILES = CHANGES \
- Makefile \
- README \
+DISTFILES = Makefile \
+ README.md \
configure \
fcgi.c \
- pkg_fcgi.8 \
- pkg_fcgi.c \
- pkg_fcgi.css \
- pkg_fcgi.h \
log.c \
log.h \
+ pkg.h \
+ pkg_fcgi.8 \
+ pkg_fcgi.c \
+ schema.sql \
server.c \
- ui.c \
- ui.tmpl \
xmalloc.c \
- xmalloc.h \
+ xmalloc.h
.PHONY: release dist
${INSTALL} -m 0644 ${DISTFILES} .dist/${DISTNAME}
${MAKE} -C compat DESTDIR=${PWD}/.dist/${DISTNAME}/compat dist
${MAKE} -C keys DESTDIR=${PWD}/.dist/${DISTNAME}/keys dist
- ${MAKE} -C template DESTDIR=${PWD}/.dist/${DISTNAME}/template dist
+# ${MAKE} -C template DESTDIR=${PWD}/.dist/${DISTNAME}/template dist
${MAKE} -C tests DESTDIR=${PWD}/.dist/${DISTNAME}/tests dist
- cd .dist/${DISTNAME} && chmod 755 configure template/configure
+ cd .dist/${DISTNAME} && chmod 755 configure # template/configure
cd .dist && tar czf ../$@ ${DISTNAME}
rm -rf .dist/
.PHONY: ${DISTNAME}.tar.gz
+verify-release:
+ signify -C -p ${PUBKEY} -x ${DISTNAME}.sha256.sig
+
# -- dependencies --
-include fcgi.d
-include log.d
--include pgk_fcgi.d
+-include pkg_fcgi.d
-include server.d
--include ui.d
-include xmalloc.d
blob - 65aa7d9e4b3189c0b560fe906708dc0c142dac51
blob + 13dec3bf78f6d2c3c90fddbcbd1bf6b125dbe8a1
--- compat/Makefile
+++ compat/Makefile
DISTFILES = Makefile \
- bufferevent_read_pressure_cb.c \
err.c \
event.h \
- event_asr_run.c \
freezero.c \
getdtablecount.c \
getdtablesize.c \
dist: ${DISTFILES}
mkdir -p ${DESTDIR}/
${INSTALL} -m 0644 ${DISTFILES} ${DESTDIR}/
- ${MAKE} -C imsg DESTDIR=${DESTDIR}/imsg dist
${MAKE} -C sys DESTDIR=${DESTDIR}/sys dist
.PHONY: all dist
blob - 6366503ab43a6917d9958656c6c7f5c381f3ef80 (mode 644)
blob + /dev/null
--- compat/event_asr_run.c
+++ /dev/null
-/*
- * Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-
-#include <netdb.h>
-#include <asr.h>
-#include <event.h>
-#include <stdlib.h>
-
-/*
- * Libevent glue for ASR.
- */
-struct event_asr {
- struct event ev;
- struct asr_query *async;
- void (*cb)(struct asr_result *, void *);
- void *arg;
-};
-
-static void
-event_asr_dispatch(int fd __attribute__((__unused__)),
- short ev __attribute__((__unused__)), void *arg)
-{
- struct event_asr *eva = arg;
- struct asr_result ar;
- struct timeval tv;
-
- event_del(&eva->ev);
-
- if (asr_run(eva->async, &ar)) {
- eva->cb(&ar, eva->arg);
- free(eva);
- } else {
- event_set(&eva->ev, ar.ar_fd,
- ar.ar_cond == ASR_WANT_READ ? EV_READ : EV_WRITE,
- event_asr_dispatch, eva);
- tv.tv_sec = ar.ar_timeout / 1000;
- tv.tv_usec = (ar.ar_timeout % 1000) * 1000;
- event_add(&eva->ev, &tv);
- }
-}
-
-struct event_asr *
-event_asr_run(struct asr_query *async, void (*cb)(struct asr_result *, void *),
- void *arg)
-{
- struct event_asr *eva;
- struct timeval tv;
-
- eva = calloc(1, sizeof *eva);
- if (eva == NULL)
- return (NULL);
- eva->async = async;
- eva->cb = cb;
- eva->arg = arg;
- tv.tv_sec = 0;
- tv.tv_usec = 0;
- evtimer_set(&eva->ev, event_asr_dispatch, eva);
- evtimer_add(&eva->ev, &tv);
- return (eva);
-}
-
-void
-event_asr_abort(struct event_asr *eva)
-{
- asr_abort(eva->async);
- event_del(&eva->ev);
- free(eva);
-}
blob - 2cef3cda79960358a8bf5b2f9be655931973aa2b
blob + af46cdcad90bb844b5b4e6aada23c823a20bb61e
--- configure
+++ configure
HAVE_ACCEPT4=
HAVE_ASR_RUN=
HAVE_ERR=
-HAVE_EVENT_ASR_RUN=
HAVE_FREEZERO=
HAVE_GETDTABLECOUNT=
HAVE_GETDTABLESIZE=
runtest unveil UNVEIL || true
runtest vasprintf VASPRINTF -D_GNU_SOURCE || true
runtest __progname __PROGNAME || true
-
-deptest event_asr_run EVENT_ASR_RUN || true
# mandatory things:
#define HAVE_ACCEPT4 ${HAVE_ACCEPT4}
#define HAVE_ASR_RUN ${HAVE_ASR_RUN}
#define HAVE_ERR ${HAVE_ERR}
-#define HAVE_EVENT_ASR_RUN ${HAVE_EVENT_ASR_RUN}
#define HAVE_FREEZERO ${HAVE_FREEZERO}
#define HAVE_GETDTABLECOUNT ${HAVE_GETDTABLECOUNT}
#define HAVE_GETDTABLESIZE ${HAVE_GETDTABLESIZE}
blob - eeea39ab2f7055479d97e4cc3295a54e92afa194
blob + 4f7268cef09e6afe4707aa112f1a611c26ceb264
--- tests/Makefile
+++ tests/Makefile
__progname.c \
accept4.c \
asr_run.c \
- bufferevent_read_pressure_cb.c \
err.c \
- event_asr_run.c \
freezero.c \
getdtablecount.c \
getdtablesize.c \
getexecname.c \
getprogname.c \
- imsg.c \
libevent.c \
- libevent2.c \
libsqlite3.c \
- libtls.c \
pledge.c \
reallocarray.c \
recallocarray.c \
blob - 060264e7c011ca4961c63fdeda4d7af53e14cf8c (mode 644)
blob + /dev/null
--- tests/event_asr_run.c
+++ /dev/null
-/*
- * Copyright (c) 2021 Omar Polo <op@omarpolo.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <netdb.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <asr.h>
-#include <event.h>
-
-int
-main(void)
-{
- struct asr_query *query;
- struct addrinfo hints;
-
- event_init();
-
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = AF_UNSPEC;
- hints.ai_socktype = SOCK_STREAM;
-
- query = getaddrinfo_async("openbsd.org", "www", &hints, NULL);
- if (query == NULL)
- return 1;
-
- /* just testing whether it compiles */
- event_asr_run(query, NULL, NULL);
-
- return 0;
-}