summaryrefslogtreecommitdiffstats
path: root/sysutils/apcupsd
diff options
context:
space:
mode:
authorlkoeller <lkoeller@FreeBSD.org>2001-12-05 21:15:26 +0000
committerlkoeller <lkoeller@FreeBSD.org>2001-12-05 21:15:26 +0000
commit9b02502ab90ebef10340effdf111220d4a07288d (patch)
tree08c141f9dfbe21560869deb8e49b0063bfc9215c /sysutils/apcupsd
parent9f9e91d7b7f1db01b7f3c789a03a23bcbc56962d (diff)
downloadFreeBSD-ports-9b02502ab90ebef10340effdf111220d4a07288d.zip
FreeBSD-ports-9b02502ab90ebef10340effdf111220d4a07288d.tar.gz
* Add missing patch file to compile correctly with libwrap
* Use --disable-install-distdir instead of patching Makefile * Bump port revision
Diffstat (limited to 'sysutils/apcupsd')
-rw-r--r--sysutils/apcupsd/Makefile4
-rw-r--r--sysutils/apcupsd/files/patch-ab17
-rw-r--r--sysutils/apcupsd/files/patch-ac64
3 files changed, 66 insertions, 19 deletions
diff --git a/sysutils/apcupsd/Makefile b/sysutils/apcupsd/Makefile
index 0ed95fd..7af172e4 100644
--- a/sysutils/apcupsd/Makefile
+++ b/sysutils/apcupsd/Makefile
@@ -7,7 +7,7 @@
PORTNAME= apcupsd
PORTVERSION= 3.8.3
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.apcupsd.org/pub/apcupsd/stable/tar/
@@ -20,7 +20,7 @@ PLIST_SUB= STARTUP_SCRIPT=${STARTUP_SCRIPT}
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX} --sbindir=${PREFIX}/sbin \
- --enable-nls \
+ --enable-nls --disable-install-distdir \
--sysconfdir=${PREFIX}/etc/apcupsd \
--with-serial-dev=/dev/usv \
--enable-cgi --with-cgi-bin=${PREFIX}/etc/apcupsd/cgi
diff --git a/sysutils/apcupsd/files/patch-ab b/sysutils/apcupsd/files/patch-ab
index 2c4847c..a55ca19 100644
--- a/sysutils/apcupsd/files/patch-ab
+++ b/sysutils/apcupsd/files/patch-ab
@@ -1,23 +1,6 @@
*** Makefile.in.orig Sat Nov 24 09:23:03 2001
--- Makefile.in Sun Dec 2 11:47:56 2001
***************
-*** 196,202 ****
- install-:
- $(MAKE) dummy
-
-! install: install-apcupsd@WIN32@ install-@POWERFLUTE@ install-cgi @INSTALL_DISTDIR@
-
- install-powerflute: powerflute
- @echo "Installing powerflute binary..."
---- 196,202 ----
- install-:
- $(MAKE) dummy
-
-! install: install-apcupsd@WIN32@ install-@POWERFLUTE@ install-cgi
-
- install-powerflute: powerflute
- @echo "Installing powerflute binary..."
-***************
*** 219,249 ****
@echo "Installing apcaccess binary..."
$(INSTALL_PROGRAM) $(srcdir)/apcaccess $(sbindir)/apcaccess
diff --git a/sysutils/apcupsd/files/patch-ac b/sysutils/apcupsd/files/patch-ac
new file mode 100644
index 0000000..23e0cf5
--- /dev/null
+++ b/sysutils/apcupsd/files/patch-ac
@@ -0,0 +1,64 @@
+*** apcnisd.c.orig Sat Apr 28 09:12:05 2001
+--- apcnisd.c Mon Dec 3 22:05:08 2001
+***************
+*** 68,79 ****
+--- 68,84 ----
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
++ #ifdef HAVE_LIBWRAP
++ #include <tcpd.h>
++ #endif
+
+ #define NETD_VERSION "1.0"
+
+ char *pname;
+
+ UPSINFO myUPS;
++ UPSINFO *core_ups = &myUPS;;
++ char argvalue[MAXSTRING];
+ static char largebuf[4096];
+ static int stat_recs;
+ static int logstats = 0;
+***************
+*** 82,87 ****
+--- 87,124 ----
+ void handle_client_request();
+ int do_daemon(int argc, char *argv[]);
+ int do_inetd(int argc, char *argv[]);
++ int check_wrappers(char *av, int newsock);
++
++ #ifdef HAVE_LIBWRAP
++ int allow_severity = LOG_INFO;
++ int deny_severity = LOG_WARNING;
++
++ int check_wrappers(char *av, int newsock)
++ {
++ struct request_info req;
++ char *av0;
++
++ if (strchr(av, '/'))
++ av0 = strrchr(av, '/');
++ else
++ av0 = av;
++
++ request_init(&req, RQ_DAEMON, av0, RQ_FILE, newsock, NULL);
++ fromhost(&req);
++ if (!hosts_access(&req)) {
++ log_event(core_ups, LOG_WARNING,
++ _("Connection from %.500s refused by tcp_wrappers."),
++ eval_client(&req));
++ return FAILURE;
++ }
++ #ifdef I_WANT_LOTS_OF_LOGGING
++ log_event(core_ups, LOG_NOTICE, "connect from %.500s", eval_client(&req));
++ #endif
++ return SUCCESS;
++ }
++
++ #endif /* HAVE_LIBWRAP */
++
+
+ void error_cleanup(UPSINFO *ups)
+ {
+
OpenPOWER on IntegriCloud