NetBSD Problem Report #52861

From root@lyrion.ch  Sun Dec 24 23:11:23 2017
Return-Path: <root@lyrion.ch>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 47A3A7A1A0
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 24 Dec 2017 23:11:23 +0000 (UTC)
Message-Id: <20171224220517.07FCA21AFE46@lyrion.ch>
Date: Sun, 24 Dec 2017 23:05:17 +0100 (CET)
From: dziltener@lyrion.ch
Reply-To: dziltener@lyrion.ch
To: gnats-bugs@NetBSD.org
Subject: net/syncthing update
X-Send-Pr-Version: 3.95

>Number:         52861
>Category:       pkg
>Synopsis:       Adding an rc file to syncthing.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gdt
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 24 23:15:00 +0000 2017
>Last-Modified:  Mon Sep 17 13:52:15 +0000 2018
>Originator:     dziltener@lyrion.ch
>Release:        NetBSD 7.1
>Organization:

>Environment:


System: NetBSD lyrion.ch 7.1 NetBSD 7.1 (GENERIC.201703111743Z) amd64
Architecture: x86_64
Machine: amd64
>Description:
	This patch adds an rc file for syncthing.
>How-To-Repeat:
	Does not apply here.
>Fix:
	syncthing.patch follows:

	diff -ENwbur /usr/pkgsrc/net/syncthing/Makefile /usr/pkgsrc/net/syncthing/Makefile
	--- /usr/pkgsrc/net/syncthing/Makefile	2017-09-08 22:14:20.000000000 +0200
	+++ /usr/pkgsrc/net/syncthing/Makefile	2017-12-24 22:49:35.000000000 +0100
	@@ -36,6 +36,8 @@

	 INSTALLATION_DIRS=	bin

	+RCD_SCRIPTS=		syncthing
	+
	 # Go has very strong notions of how building is supposed to work, and
	 # paths.  Until 0.14, syncthing had symlink workarounds to have
	 # sources be found via a gopath directory.  Then, building failed
	diff -ENwbur /usr/pkgsrc/net/syncthing/files/syncthing.sh /usr/pkgsrc/net/syncthing/files/syncthing.sh
	--- /usr/pkgsrc/net/syncthing/files/syncthing.sh	1970-01-01 01:00:00.000000000 +0100
	+++ /usr/pkgsrc/net/syncthing/files/syncthing.sh	2017-12-24 22:47:14.000000000 +0100
	@@ -0,0 +1,19 @@
	+#!@RCD_SCRIPTS_SHELL@
	+#
	+#$NetBSD$
	+#
	+
	+# PROVIDE: syncthing
	+# REQUIRE: LOGIN
	+# KEYWORD: shutdown
	+
	+$_rc_subr_loaded . /etc/rc.subr
	+
	+name="syncthing"
	+rcvar=$name
	+procname=$name
	+pids="$(check_process $procname)"
	+command="@PREFIX@/bin/${name}"
	+
	+load_rc_config $name
	+run_rc_command "$1"

>Release-Note:

>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/52861: net/syncthing update
Date: Mon, 25 Dec 2017 00:51:44 +0100

 On Sun, Dec 24, 2017 at 11:15:00PM +0000, dziltener@lyrion.ch wrote:
 > 	This patch adds an rc file for syncthing.

 Doesn't this, as provided, let syncthing run as root user?
 I wouldn't want that...
  Thomas

From: Daniel Ziltener <dziltener@lyrion.ch>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/52861: net/syncthing update
Date: Mon, 25 Dec 2017 01:06:29 +0100

 --nextPart4312740.pikeJhpcpn
 Content-Transfer-Encoding: 7Bit
 Content-Type: text/plain; charset="us-ascii"

 Am Montag, 25. Dezember 2017, 00:55:01 CET schrieben Sie:
 > The following reply was made to PR pkg/52861; it has been noted by GNATS.
 > 
 > From: Thomas Klausner <wiz@NetBSD.org>
 > To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
 > Cc:
 > Subject: Re: pkg/52861: net/syncthing update
 > Date: Mon, 25 Dec 2017 00:51:44 +0100
 > 
 >  On Sun, Dec 24, 2017 at 11:15:00PM +0000, dziltener@lyrion.ch wrote:
 >  > 	This patch adds an rc file for syncthing.
 > 
 >  Doesn't this, as provided, let syncthing run as root user?
 >  I wouldn't want that...
 >   Thomas

 The user has to specify the username syncthing should use anyway, using 
 syncthing_user="username". Maybe it's possible to add a "clause" to have the 
 service refuse to start if $syncthing_user is undefined?
 Daniel

 --nextPart4312740.pikeJhpcpn
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: This is a digitally signed message part.
 Content-Transfer-Encoding: 7Bit

 -----BEGIN PGP SIGNATURE-----

 iQIzBAABCAAdFiEEcdSZKMvUikE74N7ZqdczoChUf/cFAlpAQQUACgkQqdczoChU
 f/fEqhAAvxovRJWKRNva8OE8vQouDWn9BZKcf+2pC8LxF45ExenvI7DP5j7J9sqL
 Vr9KHrTu17sB8Zx3yOl93vd06ABJoThIaRbpoQK6c01LcBAbx/aRvEMAoG9gdG4O
 O1vfrE4f/EQUmQeHGjRc2shZIYnwjcfCih7k+fDiYtBzTMX8dedc66YWD73mJ5Mw
 0sPU5Y0lf9AGLd/fkEv3iHFhKmjIBJZpZbY/qDNlQNpnIv6VMsCdaxdNRiCJBN9V
 ZvTDzJPtLkOdRHkOPxeVTUvKxJbiS2w47275qKi5SmaEGAk0qmYTHbFlsf0i65gD
 AFWTYAa1NI6hbrS3E9+GaysRwBa2TsEYAiVQV7IjrXNJ9Afe1jIH98DWr3buM7Ow
 Xie++4TNwRqFj3KSmqTPj/fK/vo9GblRidPshaQ+qA/XmFsRTujgFQx4WmB5OmwV
 NZEtZpX3yci097qUw5CVPK5rQQi7Eo0hZgdTfhk1qDtjV0Xk4DIvmWr8ttvIfibZ
 BvJAxHAO9lZSRimFwBJzW/rNm0pzyTwlCb/rGFMvFkekg/3bqsL5XSwM874IaQCd
 P21BEGmCXr3jDfvM71rDymD8+k6ShwKln96pM5t6sZrDhmLgqbk1Pq0JbBgiTDFT
 /6bIt29bYk29aZiME3ox2nKmEiEhudawCLXBZrzyL61A0y88mog=
 =qN5x
 -----END PGP SIGNATURE-----

 --nextPart4312740.pikeJhpcpn--



From: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52861: Adding an rc file to syncthing.
Date: Mon, 17 Sep 2018 13:42:30 +0000

 We can try to add the user _syncthing if it doesn't exist in the
 package. An example of this is tcpdump:

 PKG_GROUPS=             _tcpdump
 PKG_USERS=              _tcpdump:_tcpdump

Responsible-Changed-From-To: pkg-manager->gdt
Responsible-Changed-By: leot@NetBSD.org
Responsible-Changed-When: Mon, 17 Sep 2018 13:52:15 +0000
Responsible-Changed-Why:
Greg, can you please give it a look?
(over to MAINTAINER)


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.