Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Jul 2020 14:34:04 +0000 (UTC)
From:      "Tobias C. Berner" <tcberner@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r543482 - in head/net/py-wsdd: . files
Message-ID:  <202007261434.06QEY4dH093676@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tcberner
Date: Sun Jul 26 14:34:04 2020
New Revision: 543482
URL: https://svnweb.freebsd.org/changeset/ports/543482

Log:
  net/py-wsdd: Update to 0.6.1
  
  0.6.1 fixes a critical bug pertaining to BSD, where the HTTP server in wsdd
  would basically "do nothing" due to listen(2) being called _after_ kevent(2)
  (and pending network socket I/O was therefore never processed).  I was the
  reporter and analyst of this bug: https://github.com/christgau/wsdd/issues/49
  
  - Additionally: little change to rc.d script to properly stop the daemon.
  
  PR:		247626
  Submitted by:	Hiroo Ono <hiroo.ono+freebsd@gmail.com> (maintainer)
  Reported by:	Jeremy Chadwick <jdc@koitsu.org>

Added:
  head/net/py-wsdd/files/
  head/net/py-wsdd/files/patch-etc_rc.d_wsdd   (contents, props changed)
Modified:
  head/net/py-wsdd/Makefile
  head/net/py-wsdd/distinfo

Modified: head/net/py-wsdd/Makefile
==============================================================================
--- head/net/py-wsdd/Makefile	Sun Jul 26 14:23:41 2020	(r543481)
+++ head/net/py-wsdd/Makefile	Sun Jul 26 14:34:04 2020	(r543482)
@@ -2,7 +2,7 @@
 
 PORTNAME=	wsdd
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.6
+DISTVERSION=	0.6.1
 CATEGORIES=	net python
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
@@ -22,6 +22,9 @@ NO_BUILD=	yes
 PLIST_FILES=	bin/${PORTNAME} \
 		etc/rc.d/${PORTNAME} \
 		man/man1/${PORTNAME}.1.gz
+
+post-patch:
+	${REINPLACE_CMD} 's|PYTHON|${PYTHON_CMD}|' ${WRKSRC}/etc/rc.d/${PORTNAME}
 
 do-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/src/${PORTNAME}.py \

Modified: head/net/py-wsdd/distinfo
==============================================================================
--- head/net/py-wsdd/distinfo	Sun Jul 26 14:23:41 2020	(r543481)
+++ head/net/py-wsdd/distinfo	Sun Jul 26 14:34:04 2020	(r543482)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1591589990
-SHA256 (christgau-wsdd-v0.6_GH0.tar.gz) = 9e6caedfa92bc73b3bca2ff22fbb793254160197466a03bc1660fa2bd0bc0b15
-SIZE (christgau-wsdd-v0.6_GH0.tar.gz) = 27067
+TIMESTAMP = 1593428212
+SHA256 (christgau-wsdd-v0.6.1_GH0.tar.gz) = 930dbe2059db29b422a1d433cd4984056064b29fc768ef80cd17dfa69a35c50e
+SIZE (christgau-wsdd-v0.6.1_GH0.tar.gz) = 27254

Added: head/net/py-wsdd/files/patch-etc_rc.d_wsdd
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/py-wsdd/files/patch-etc_rc.d_wsdd	Sun Jul 26 14:34:04 2020	(r543482)
@@ -0,0 +1,74 @@
+--- etc/rc.d/wsdd.orig	2020-06-28 19:10:44 UTC
++++ etc/rc.d/wsdd
+@@ -5,25 +5,61 @@
+ # BEFORE: login
+ # KEYWORD: shutdown
+ 
++# Add the following line in /etc/rc.conf to enable wsdd:
++#
++# wsdd_enable="YES"
++# wsdd_flags="<set as needed>"
++# wsdd_domain="<set if your host is an AD member>"
++# wsdd_group="<set if you want to set the workgroup manually>"
++#
++# Do not specify -d DOMAIN or -w WORKGROUP in wsdd_flags. Instead, set
++# wsdd_domain="DOMAIN" or wsdd_group="WORKGROUP", otherwise it will be
++# overridden by automatically detected workgroup.
++#
++
+ . /etc/rc.subr
+ 
+ name=wsdd
+ rcvar=wsdd_enable
+-wsdd_group=$(/usr/local/bin/testparm -s --parameter-name workgroup 2>/dev/null)
+ 
+-: ${wsdd_smb_config_file="/usr/local/etc/smb4.conf"}
++load_rc_config ${name}
+ 
+-# try to manually extract workgroup from samba configuration if testparm failed
+-if [ -z "$wsdd_group" ] && [ -r $wsdd_smb_config_file ]; then
+-	wsdd_group="$(grep -i '^[[:space:]]*workgroup[[:space:]]*=' $wsdd_smb_config_file | cut -f2 -d= | tr -d '[:blank:]')"
++: ${wsdd_enable:="NO"}
++: ${wsdd_flags:=""}
++: ${wsdd_domain:=""}
++: ${wsdd_group:=""}
++: ${wsdd_smb_config_file:="/usr/local/etc/smb4.conf"}
++
++if [ -z "${wsdd_group}" ]; then
++	# automatic detection of workgroup
++	wsdd_group=$(/usr/local/bin/testparm -s --parameter-name workgroup 2>/dev/null)
++
++	# try to manually extract workgroup from samba configuration if testparm failed
++	if [ -z "$wsdd_group" ] && [ -r $wsdd_smb_config_file ]; then
++		wsdd_group="$(grep -i '^[[:space:]]*workgroup[[:space:]]*=' $wsdd_smb_config_file | cut -f2 -d= | tr -d '[:blank:]')"
++	fi
+ fi
+ 
+-if [ -n "$wsdd_group" ]; then
+-	wsdd_opts="-w ${wsdd_group}"
++wsdd_opts=""
++if [ -n "${wsdd_suppflags}" ]; then
++	wsdd_opts="${wsdd_flags}"
+ fi
++if [ -n "$wsdd_domain" ]; then
++	wsdd_opts="${wsdd_opts} -d ${wsdd_domain}"
++elif [ -n "$wsdd_group" ]; then
++	wsdd_opts="${wsdd_opts} -w ${wsdd_group}"
++fi
+ 
+-command="/usr/sbin/daemon"
+-command_args="-u daemon -S /usr/local/bin/wsdd $wsdd_opts"
++command="/usr/local/bin/wsdd"
++procname="PYTHON"
++pidfile="/var/run/${name}.pid"
+ 
+-load_rc_config $name
++start_cmd="${name}_start"
++
++wsdd_start()
++{
++	echo -n "Starting ${name}."
++	/usr/sbin/daemon -u daemon -S -p ${pidfile} ${command} ${wsdd_opts}
++}
++
+ run_rc_command "$1"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007261434.06QEY4dH093676>