From owner-freebsd-ports@freebsd.org Thu Jan 12 12:12:38 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25A0FCAA7F1 for ; Thu, 12 Jan 2017 12:12:38 +0000 (UTC) (envelope-from me@cschwarz.com) Received: from orion.uberspace.de (orion.uberspace.de [95.143.172.79]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B69B196F for ; Thu, 12 Jan 2017 12:12:36 +0000 (UTC) (envelope-from me@cschwarz.com) Received: (qmail 29787 invoked from network); 12 Jan 2017 12:12:28 -0000 Received: from localhost (HELO csarch.local) (127.0.0.1) by orion.uberspace.de with SMTP; 12 Jan 2017 12:12:28 -0000 Received: by csarch.local (Postfix, from userid 1000) id 0DD2639806F; Thu, 12 Jan 2017 13:12:24 +0100 (CET) Date: Thu, 12 Jan 2017 13:12:23 +0100 From: Christian Schwarz To: freebsd-ports@freebsd.org Subject: Preferred directory for server data (/var/db/pkgname?) Message-ID: <20170112121223.fupbtizrp3ne5ouz@csarch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20161126 (1.7.1) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 12:12:38 -0000 What is the correct directory for storing the state of a server application? That might be - the data directory of a database server (MySQL uses /var/db/mysql Postgres uses /var/db/postgres) - Configuration managed by the application, not the admin (Quassel uses /var/db/quasselcore) - net-im/prosody curiously uses /usr/local/var/lib/prosody to store application-managed state data [1] I am writing this because I stumbled over the net-im/prosody path, which I think is not intuitive given the behavior of other ports. But before I submit my patch for this, I would like to know if there is an actual policy in place. Taking a look at hier(7): >/var/ multi-purpose log, temporary, transient, and spool files > > [...] > > db/ miscellaneous automatically generated > system-specific database files Doesn't seem like the above cases match this description. Interestingly, the Arch Linux hier(7) has an entry for this kind of data: > /var/lib/ > State data for packages and subsystems (optional). What do you think? -- Christian Schwarz