From owner-freebsd-doc@FreeBSD.ORG Tue Feb 18 21:17:24 2014 Return-Path: Delivered-To: freebsd-doc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 287A5C26; Tue, 18 Feb 2014 21:17:24 +0000 (UTC) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 20CD51605; Tue, 18 Feb 2014 21:17:22 +0000 (UTC) Received: from alph.d.allbsd.org (p2106-ipbf2009funabasi.chiba.ocn.ne.jp [114.146.169.106]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id s1ILH4Z5071281 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 19 Feb 2014 06:17:14 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.7/8.14.7) with ESMTP id s1ILH2Wq057395; Wed, 19 Feb 2014 06:17:04 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Wed, 19 Feb 2014 05:43:29 +0900 (JST) Message-Id: <20140219.054329.650271381379595985.hrs@allbsd.org> To: gjb@FreeBSD.org Subject: Re: Website now autocleans old files/pages From: Hiroki Sato In-Reply-To: <20140218193256.GU1667@glenbarber.us> References: <201402181733.s1IHXrJW066616@build-web.stream.freebsd.org> <20140218173655.GT1667@glenbarber.us> <20140218193256.GU1667@glenbarber.us> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Wed_Feb_19_05_43_29_2014_231)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Wed, 19 Feb 2014 06:17:15 +0900 (JST) X-Spam-Status: No, score=-94.3 required=13.0 tests=CONTENT_TYPE_PRESENT, RCVD_IN_PBL,RCVD_IN_RP_RNBL,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org 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:17:24 -0000 ----Security_Multipart(Wed_Feb_19_05_43_29_2014_231)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Glen Barber wrote in <20140218193256.GU1667@glenbarber.us>: 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 "quick" 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. 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. Just my $0.02. -- Hiroki ----Security_Multipart(Wed_Feb_19_05_43_29_2014_231)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAlMDxfEACgkQTyzT2CeTzy25/gCfd2YmWuYq2zPMg5c81n1E1jvk pWQAn303FkCykmH3hgP9jfjTRVABrriB =8p0V -----END PGP SIGNATURE----- ----Security_Multipart(Wed_Feb_19_05_43_29_2014_231)----