From owner-freebsd-ports@FreeBSD.ORG Fri Jan 11 16:34:17 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3615A16A418 for ; Fri, 11 Jan 2008 16:34:17 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by mx1.freebsd.org (Postfix) with ESMTP id AC5FE13C459 for ; Fri, 11 Jan 2008 16:34:16 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: by fg-out-1718.google.com with SMTP id 16so1254229fgg.35 for ; Fri, 11 Jan 2008 08:34:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=Z2DeP9ogVZaEvuRpIySEfcaVEjR/FJ4EMok0sKOgNZo=; b=bONxU4c65/T9JzCG58WhOz4L12pgb3sCkO0eB+9EtrlnLQFRgeyaBxvFq2JI5KMqpkM/FzJfav9VGKX2YtmBnZQ6MrIBCOFQgRngGTj3xLhfhBswg2QlZ8CQm0PiOzMINyY0m23RU/Xi8s0DPfpeJ0QKgUkXMu3GSB1UIf5MdvU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=kd1X0m55XcwFCTG2UWXdCh/ViUNYGrTCPN0HJqn0d7masCvfn8/ulcgtFPETwdOdmKtDDWWNquzI3iEDa1KAw5ieEFMyDxBDA7O3fQFnX+yNAAxSsiDDIqvQAdzs1iNuHcurHrpgtWjs68ZY7l5kACTmWSVke2b9EQbo5nC+4Xg= Received: by 10.86.78.4 with SMTP id a4mr3151449fgb.0.1200069255278; Fri, 11 Jan 2008 08:34:15 -0800 (PST) Received: by 10.86.3.20 with HTTP; Fri, 11 Jan 2008 08:34:15 -0800 (PST) Message-ID: <790a9fff0801110834s532a7282lf63061ad2b73acf5@mail.gmail.com> Date: Fri, 11 Jan 2008 10:34:15 -0600 From: "Scot Hetzel" To: "Paul Schmehl" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: FreeBSD Ports Subject: Re: Suggested improvements for ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2008 16:34:17 -0000 n 1/11/08, Paul Schmehl wrote: > Some of this has been discussed ad infinitum, but, in an off-list conversation, > I came up with this list of suggested improvements for port. I'd like to see > these things done, but I'm not sure how. Improve the docs? Create a checklist? > : > 3) There's no standard for the format of pkg-plist, pkg-message or pkg-descr, > so port maintainers are free to put whatever they want in there. There's a > customary way of doing it, but it's not set in stone and variations are found > throughout ports. There is a standard format for pkg-plist. Which is documented in the port's handbook. pkg-descr does have a standard format: WWW: pkg-message format is left to the maintainer. The only requirement for pkg-descr and pkg-message is that it should be able to display on an 80 column screen without the lines wrapping. > 4) There's no standard for config files. Do you overwrite? Do you ignore? Do > you create port.conf-sample? port.conf-dist? port.conf-example? Do you check > to see if port.conf is there, and, if not, copy it to ${LOCALBASE}/etc? > ${PREFIX}/etc? There is a standard for config files, and is documented in the porters handbook. The port maintainer should install configuration files so that they don't overwrite existing configuration files. The way that most ports take is by patching the src to install the standard config files with an extension (currently we use -sample, -dist, -orig, or -example). Then the port should check for the existance of the config file, and install one if it doesn't exist. When the port is uninstalled, it compares the config file with the default config file, and only removes the config file if they are the same. NOTE: should standardize a default extension. When there are a large number of configuration files, a few ports install the default configuration files into an alternate directory (i.e PREFIX/share/example/), and then copy them to PREFIX/etc when they don't exist. On deinstall, they compare the config file with the default config file, and only remove the config files if they are the same. Scot