From owner-freebsd-questions@FreeBSD.ORG Mon Jan 23 19:14:21 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 590E61065670 for ; Mon, 23 Jan 2012 19:14:21 +0000 (UTC) (envelope-from max@mxcrypt.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 189078FC08 for ; Mon, 23 Jan 2012 19:14:20 +0000 (UTC) Received: by vcbfl17 with SMTP id fl17so3243678vcb.13 for ; Mon, 23 Jan 2012 11:14:20 -0800 (PST) Received: by 10.220.140.209 with SMTP id j17mr1414515vcu.66.1327346060292; Mon, 23 Jan 2012 11:14:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.118.144 with HTTP; Mon, 23 Jan 2012 11:13:49 -0800 (PST) In-Reply-To: <4F1DA620.4040207@infracaninophile.co.uk> References: <4F1DA620.4040207@infracaninophile.co.uk> From: Maxim Khitrov Date: Mon, 23 Jan 2012 14:13:49 -0500 Message-ID: To: Matthew Seaman X-Gm-Message-State: ALoCoQlbQc4hI7uNmxXOrhMfGOYxKwqfPyQEELcBIVBR+a/mcM03RNybCu3K2rrQEg3jZhwOSDJn Content-Type: text/plain; charset=UTF-8 Cc: freebsd-questions@freebsd.org Subject: Re: Applying local patches after updating FreeBSD source X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jan 2012 19:14:21 -0000 On Mon, Jan 23, 2012 at 1:25 PM, Matthew Seaman wrote: > On 23/01/2012 18:03, Maxim Khitrov wrote: >> Hi all, >> >> When I need to apply a custom patch to a port, I can set EXTRA_PATCHES >> make variable in /usr/local/etc/ports.conf (when using portconf), and >> the patch will be automatically applied whenever that port is built. >> Is there equivalent functionality for building FreeBSD world and >> kernel? >> >> When I run 'make update' in /usr/src, csup overwrites all local >> changes. There is a LOCAL_PATCHES variable, but it seems to apply only >> to 'make release'. >> >> If possible, I would like to avoid writing custom scripts for updating >> and building world, because at some point I will forget to use the >> script and build everything without the patches. How can I preserve >> the current behavior of running 'make update && make buildworld >> buildkernel' while automatically applying custom patches in between? > > Check the system sources out of svn? > > This way, you can apply your patches and the result is automatically > merged when you update the sources by 'svn up' -- unless there has been > a conflicting commit to the same file, when you may be required to > intervene manually. I don't have subversion installed on any of my servers and that's a dependency that I would prefer to do without. Are there any changes I could make to /etc/make.conf that would allow me to execute an arbitrary command after the 'update' task is finished? - Max