On 2017/11/14 11:18, Dimitris Papastamos wrote:
> On Tue, Nov 14, 2017 at 11:15:48AM +0000, Stuart Henderson wrote:
> > On 2017/11/14 11:05, Dimitris Papastamos wrote:
> > > Hi,
> > >
> > > Since I've upgraded to 6.2 gitdaemon's pid file is no longer
> > > generated. This was working as expected on 6.1.
> > >
> > > /etc/rc.conf.local
> > >
> > > ntpd_flags=-s
> > > httpd_flags=
> > > slowcgi_flags=
> > > unbound_flags=
> > > bgpd_flags=
> > > ospfd_flags=
> > >
> > > gitdaemon_flags="--syslog --base-path=/home/git"
> > > gitdaemon_user="_gitdaemon"
> > > tincd_flags="-U _tinc --chroot -n 2f30"
> > > pkg_scripts="tincd gitdaemon"
> > >
> > > # /etc/rc.d/gitdaemon start
> > > gitdaemon(ok)
> > >
> > > # rcctl ls failed
> > > gitdaemon
> > >
> > > # ps aux | grep git-daemon
> > > _gitdaem 2294 0.0 0.0 1484 1472 ?? Is 11:00AM 0:00.01
> > > /usr/local/libexec/git/git-daemon --detach --syslog --base-path=/home/git
> > > root 87449 0.0 0.0 132 352 p3 R+/6 11:04AM 0:00.00 grep
> > > git-daemon
> > >
> > > # ls /var/run/git*
> > > ls: /var/run/git*: No such file or directory
> > > #
> > >
> >
> > Looking at git-daemon's code, it only writes the file if --pid-file is
> > given on the command line. I don't see any changes in this regard, I don't
> > see any reason for the version that was in 6.1 to write a pid file either.
> >
> > This doesn't have anything to do with rcctl though. rcctl doesn't use
> > pid files.
>
> Ah I see, I have incorrectly assumed the two are related. In any case,
> I think rcctl ls failed didn't not flag gitdaemon as failed in 6.1. This
> is my recollection, I could be wrong though.
Perhaps something changed in git-daemon that caused it to start having
a full path in the ps listing. This would fix that, but I don't know if
there are any circumstances where it _wouldn't_ have the full path that
this might then break. For that, it would be helpful to know where/when
this changed in git.
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/git/Makefile,v
retrieving revision 1.182
diff -u -p -r1.182 Makefile
--- Makefile 8 Nov 2017 09:17:14 -0000 1.182
+++ Makefile 14 Nov 2017 11:25:10 -0000
@@ -5,6 +5,7 @@ COMMENT-svn = GIT - subversion interoper
COMMENT-x11 = GIT - graphical tools
V = 2.15.0
+REVISION-main = 0
DISTNAME = git-${V}
PKGNAME-main = ${DISTNAME}
PKGNAME-svn = git-svn-${V}
Index: pkg/gitdaemon.rc
===================================================================
RCS file: /cvs/ports/devel/git/pkg/gitdaemon.rc,v
retrieving revision 1.1
diff -u -p -r1.1 gitdaemon.rc
--- pkg/gitdaemon.rc 2 Jun 2016 18:33:27 -0000 1.1
+++ pkg/gitdaemon.rc 14 Nov 2017 11:25:10 -0000
@@ -7,7 +7,7 @@ daemon_flags="--user=_gitdaemon"
. /etc/rc.d/rc.subr
-pexp="git-daemon --detach${daemon_flags:+ ${daemon_flags}}"
+pexp="${TRUEPREFIX}/libexec/git/git-daemon --detach${daemon_flags:+
${daemon_flags}}"
rc_reload=NO
rc_cmd $1