From owner-freebsd-doc@FreeBSD.ORG Tue Feb 18 21:21:48 2014 Return-Path: Delivered-To: freebsd-doc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3553BCCC; Tue, 18 Feb 2014 21:21:48 +0000 (UTC) Received: from mail0.glenbarber.us (mail0.glenbarber.us [208.86.227.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E3F811696; Tue, 18 Feb 2014 21:21:47 +0000 (UTC) Received: from glenbarber.us (c-71-224-221-174.hsd1.nj.comcast.net [71.224.221.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id E0F731BA7D; Tue, 18 Feb 2014 21:21:40 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us E0F731BA7D Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Tue, 18 Feb 2014 16:21:39 -0500 From: Glen Barber To: Hiroki Sato Subject: Re: Website now autocleans old files/pages Message-ID: <20140218212139.GW1667@glenbarber.us> References: <201402181733.s1IHXrJW066616@build-web.stream.freebsd.org> <20140218173655.GT1667@glenbarber.us> <20140218193256.GU1667@glenbarber.us> <20140219.054329.650271381379595985.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MgQdU7jr+b9ajvaw" Content-Disposition: inline In-Reply-To: <20140219.054329.650271381379595985.hrs@allbsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 User-Agent: Mutt/1.5.22 (2013-10-16) Cc: freebsd-doc@FreeBSD.org X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Feb 2014 21:21:48 -0000 --MgQdU7jr+b9ajvaw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 19, 2014 at 05:43:29AM +0900, Hiroki Sato wrote: > Glen Barber wrote > in <20140218193256.GU1667@glenbarber.us>: >=20 > gj> On Tue, Feb 18, 2014 at 12:36:55PM -0500, Glen Barber wrote: > gj> > On Tue, Feb 18, 2014 at 05:33:53PM +0000, User Www-data wrote: > gj> > > [...] > gj> > > > gj> > > 13.59 real 6.06 user 8.14 sys > gj> > > mkdir: /usr/local/www/www.freebsd.org-clean: Permission denied > gj> > > *** [realinstall] Error code 1 > gj> > > > gj> > > Stop in /home/www/build/head/en_US.ISO8859-1/htdocs. > gj> > > 0.03 real 0.00 user 0.02 sys > gj> > > gj> > Whoops. > gj> > > gj> > This is me "fixing" things. > gj> > > gj> > gj> So, what I was working on is making the build clean up after itself, = in > gj> particular, things that are no longer part of the build. > gj> > gj> DESTDIR has changed, and is purged before every build (even the "quic= k" > gj> incremental builds). Once the build finishes, the files are installed > gj> to the new DESTDIR, then synced to the public web root. > gj> > gj> When a full site refresh is done (once a week, as was done before), > gj> rsync is called with '--delete', so anything removed from the DESTDIR > gj> will be purged from the public web root. >=20 > Hmm, replacing www/www.freebsd.org with a symlink might be simpler > than copying files in DESTDIR into PUBDIR and removing DESTDIR > everytime. Create a staging directory and set DESTDIR to it, do make > install as before, and make the symlink to point the DESTDIR as a > newly-built document set (and removing the old directory). It does > not need copying files and the contents can be switched atomically. >=20 I did think about this, but did not want to change the permissions on the web root (root:wheel now) to allow the unprivileged user to arbitrarily create symlinks. Glen --MgQdU7jr+b9ajvaw Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBCAAGBQJTA87jAAoJELls3eqvi17QugEQAJo6tyyKSdTrqujINOWUs0Oc IjbRU+g95Hdm/5YkQfaQtobbmzgXKbGTRSd6+sX2vDnA4UAH4utLO1zvk13G2BPD aheP5mQWKaS4D1W4Y4Jdxxbq01hDKBMSAEimZiDfvWsGqj3Wg0bpvHIELZ5HMeCC x/0Bz430B/jWHsmjo7pgfnJ8S/awAcPC0xe8uUyINAuHM4Xzvutgou2j2j4G9Shr C1UZVTgRXqbvD2nnztLrbibUoZWrPjQYbJ1y8ODglWwN8jG5KTsCARr2rWPC/agw GOWDiqz8IqFCdHFfdkp82Fa/V3Py5KKxXQCnlALt7l2r1RyJqFXTsR/dva4MprsV /jPQrELdODa+Qrf3gBE/lRAGCy8N/F1Ir5NLMcmMnEFRljlVH6QlP/ZReJXHuOu9 xvV8c+O2KL1tqXYMAV/m90pS9aNoe1fNIeOVL96htq8hSwQc7YCjt8wgQ/3AEYbe jfkvyyA2icZoAKcxQO+rF20Q+Fuhte/YN+jBjQVKA43r/SK9aU1GctvmessQolJr MEsvNJXxv8FwqTcmprJOW2CQhss2yxsJY/ZjsFgwkBvHnLWflh0dbOX/uNrYgusA KIFlDoAzci7YgiPaSwkkKoAI8yOkIC+qRb5Ysncr4Xs4dIfELNJO200fVAIrOS2w Xjz4kcw9VW+iAAra0AD5 =qiFA -----END PGP SIGNATURE----- --MgQdU7jr+b9ajvaw--