From owner-cvs-ports@FreeBSD.ORG Tue Oct 13 20:09:59 2009 Return-Path: Delivered-To: cvs-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E908D106568D for ; Tue, 13 Oct 2009 20:09:58 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 8FB118FC1E for ; Tue, 13 Oct 2009 20:09:58 +0000 (UTC) Received: (qmail 20994 invoked by uid 399); 13 Oct 2009 20:09:55 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 13 Oct 2009 20:09:55 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4AD4DE92.3090808@FreeBSD.org> Date: Tue, 13 Oct 2009 13:09:54 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: Dag-Erling Smorgrav References: <200910131851.n9DIpB7P057665@repoman.freebsd.org> In-Reply-To: <200910131851.n9DIpB7P057665@repoman.freebsd.org> X-Enigmail-Version: 0.96.0 OpenPGP: id=D5B2F0FB Content-Type: multipart/mixed; boundary="------------080707040407050708030103" Cc: cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org Subject: Re: cvs commit: ports/www/varnish Makefile ports/www/varnish/files pkg-message.in varnishd.in varnishlog.in varnishncsa.in X-BeenThere: cvs-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2009 20:09:59 -0000 This is a multi-part message in MIME format. --------------080707040407050708030103 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Dag-Erling Smorgrav wrote: > des 2009-10-13 18:51:11 UTC > > FreeBSD ports repository > > Modified files: > www/varnish Makefile > www/varnish/files varnishd.in varnishlog.in varnishncsa.in > Added files: > www/varnish/files pkg-message.in > Log: > Reorganize the rc scripts; there were several things about the old ones > that simply didn't make sense. Add a pkg-message containing a very brief > quick-start guide and a warning to existing users about the rc changes. > > Revision Changes Path > 1.28 +6 -0 ports/www/varnish/Makefile > 1.1 +18 -0 ports/www/varnish/files/pkg-message.in (new) > 1.7 +49 -21 ports/www/varnish/files/varnishd.in > 1.5 +23 -13 ports/www/varnish/files/varnishlog.in > 1.3 +23 -13 ports/www/varnish/files/varnishncsa.in > > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/www/varnish/Makefile.diff?&r1=1.27&r2=1.28&f=h > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/www/varnish/files/pkg-message.in > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/www/varnish/files/varnishd.in.diff?&r1=1.6&r2=1.7&f=h > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/www/varnish/files/varnishlog.in.diff?&r1=1.4&r2=1.5&f=h > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/www/varnish/files/varnishncsa.in.diff?&r1=1.2&r2=1.3&f=h Overall the scripts now look quite good. :) I have a few notes, only the first of which is really significant. Since the varnishd script uses a specific user and group it should REQUIRE: LOGIN rather than DAEMON. In fact, unless there is a good reason to start before LOGIN we generally prefer that all ports scripts REQUIRE it. Also in varnishd, the test for the existence of $varnishd_config should really be encased in a pre_start method since that's the only time it's relevant (unless I'm missing something). I've also simplified it a bit to make it more clear what is different. If there is some reason that the command line flags have to be in a certain order I'm sure you can adapt it as you like. I'd also suggest using varnishd_[ug]id instead of _user and _group, since as you point out rc.subr special cases those two variables. I used _uid in rc.d/named to good effect. hth, Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ --------------080707040407050708030103 Content-Type: text/plain; name="varnish-rcd.diff" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="varnish-rcd.diff" SW5kZXg6IHZhcm5pc2hkLmluCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9ob21lL3BjdnMv cG9ydHMvd3d3L3Zhcm5pc2gvZmlsZXMvdmFybmlzaGQuaW4sdgpyZXRyaWV2aW5nIHJldmlz aW9uIDEuNwpkaWZmIC11IC1yMS43IHZhcm5pc2hkLmluCi0tLSB2YXJuaXNoZC5pbgkxMyBP Y3QgMjAwOSAxODo1MToxMCAtMDAwMAkxLjcKKysrIHZhcm5pc2hkLmluCTEzIE9jdCAyMDA5 IDIwOjA4OjQxIC0wMDAwCkBAIC00LDcgKzQsNyBAQAogIwogCiAjIFBST1ZJREU6IHZhcm5p c2hkCi0jIFJFUVVJUkU6IERBRU1PTgorIyBSRVFVSVJFOiBMT0dJTgogIyBLRVlXT1JEOiBz aHV0ZG93bgogCiAjCkBAIC0zNCwxNSArMzQsMTggQEAKICMgdmFybmlzaGRfc3RvcmFnZSAt IHN0b3JhZ2UgbWV0aG9kIGFuZCBwYXJhbWV0ZXJzLgogIwlkZWZhdWx0OiAiZmlsZSwvdG1w LDUwJSIKICMKLSMgdmFybmlzaGRfdXNlciAtIHVucHJpdmlsZWdlZCB1c2VyIGZvciB0aGUg Y2hpbGQgcHJvY2Vzcy4KKyMgdmFybmlzaGRfdWlkIC0gdW5wcml2aWxlZ2VkIHVzZXIgZm9y IHRoZSBjaGlsZCBwcm9jZXNzLgogIwlkZWZhdWx0OiAid3d3IgogIwotIyB2YXJuaXNoZF9n cm91cCAtIHVucHJpdmlsZWdlZCBncm91cCBmb3IgdGhlIGNoaWxkIHByb2Nlc3MuCisjIHZh cm5pc2hkX2dpZCAtIHVucHJpdmlsZWdlZCBncm91cCBmb3IgdGhlIGNoaWxkIHByb2Nlc3Mu CiAjCWRlZmF1bHQ6ICJ3d3ciCiAjCi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zIE9jdCAyMDA5IDE4OjUxOjEwIC0wMDAwCTEuNQorKysgdmFybmlzaGxvZy5pbgkx MyBPY3QgMjAwOSAyMDowODo0MSAtMDAwMApAQCAtNCw3ICs0LDcgQEAKICMKIAogIyBQUk9W SURFOiB2YXJuaXNobG9nCi0jIFJFUVVJUkU6IERBRU1PTgorIyBSRVFVSVJFOiBMT0dJTgog IyBLRVlXT1JEOiBzaHV0ZG93bgogCiAjCkluZGV4OiB2YXJuaXNobmNzYS5pbgo9PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09ClJDUyBmaWxlOiAvaG9tZS9wY3ZzL3BvcnRzL3d3dy92YXJuaXNoL2ZpbGVzL3Zh cm5pc2huY3NhLmluLHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjMKZGlmZiAtdSAtcjEuMyB2 YXJuaXNobmNzYS5pbgotLS0gdmFybmlzaG5jc2EuaW4JMTMgT2N0IDIwMDkgMTg6NTE6MTAg LTAwMDAJMS4zCisrKyB2YXJuaXNobmNzYS5pbgkxMyBPY3QgMjAwOSAyMDowODo0MSAtMDAw MApAQCAtNCw3ICs0LDcgQEAKICMKIAogIyBQUk9WSURFOiB2YXJuaXNobmNzYQotIyBSRVFV SVJFOiBEQUVNT04KKyMgUkVRVUlSRTogTE9HSU4KICMgS0VZV09SRDogc2h1dGRvd24KIAog Iwo= --------------080707040407050708030103--