From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 15 06:31:51 2014 Return-Path: Delivered-To: freebsd-hackers@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 9CC7CE50 for ; Sat, 15 Mar 2014 06:31:51 +0000 (UTC) Received: from nm5-vm0.bullet.mail.bf1.yahoo.com (nm5-vm0.bullet.mail.bf1.yahoo.com [98.139.213.150]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 278943A1 for ; Sat, 15 Mar 2014 06:31:50 +0000 (UTC) Received: from [98.139.215.143] by nm5.bullet.mail.bf1.yahoo.com with NNFMP; 15 Mar 2014 06:28:28 -0000 Received: from [98.139.211.195] by tm14.bullet.mail.bf1.yahoo.com with NNFMP; 15 Mar 2014 06:28:28 -0000 Received: from [127.0.0.1] by smtp204.mail.bf1.yahoo.com with NNFMP; 15 Mar 2014 06:28:28 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1394864908; bh=j6UmVMcpFM1rR+xDyhX52z3ALrBbgMBs0nKLazdhc4I=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:Content-Transfer-Encoding:In-Reply-To:User-Agent; b=uIUZ5X3wEyf5g+ZO2ZsbMblSFqexz6HfjcvlndM+9nbG2uCLkGVb8Cfhu7WWD07g9bIgj13bL2FDifJsvGwz8CwDnGKHx1BgPlLAeSxvn46vP7ck8YiMLm6PeA5WtFncupkI3ntGHZUaFa9jO5hQf4QiZw7lXxApzjE4BOEESBw= X-Yahoo-Newman-Id: 80046.28117.bm@smtp204.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: knDdq_cVM1knO6Lss9Ppf80U6JbuNZ4DTYKJO25Gtdl_JJw v867ZHivdUarbtVp.CZ4tZe4ASIgQZPuAC31apOFvgDfjLEcsyk8lqxbRzq7 B1rpjymw9.lOR5pyH6SmvaKoHpqFHQAtm4wCnKCAXeHtxh940kdVTO7CiZBn GAundpw3fYHP8sU8kIDd2ZbDp_P_DRMDQEbZeHmE8keQjncVh1V_sHcMjsfK wmQWVDza9Tx7v8qdBbVgp34HbKOQF55SZRseoMvpQl0vhTfGcwQrt14cfHz2 UCxmUEKfMziZLPuJcvQn59pD2OrrcNQrTozjQkAMHC9DY.Xd86z.ud5re8xL ghLrXQsQckAdtw_fbk68fl9DykB_RURhwVkn7q8yenYBvG6YdOnk8wuVBEL2 SniwtaTVhNMpfw8yzf9jXG6D2RgfEovJriDxfpADW6Nmcvz8ZJUNRrTw.3Fd JM3DlzWAncjIDuRq5RCK1GdeRiKF7Mz3YhUjs3i5PmvZkbSJRY4Kkf.Q52S5 uksD.UqKIMg-- X-Yahoo-SMTP: yVvIDoOswBD5zOzqXnwUE.yVSR2Kvw-- X-Rocket-Received: from nbu (walt.ford@71.168.199.64 with plain [63.250.193.229]) by smtp204.mail.bf1.yahoo.com with SMTP; 14 Mar 2014 23:28:28 -0700 PDT Date: Sat, 15 Mar 2014 02:27:53 -0400 From: Walt Ford To: =?utf-8?B?5pyx5rGf?= Subject: Re: Overhaul the config system with Lua Message-ID: <20140315062753.GE6674@nbu> References: <20140315001820.GB5765@nbu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2014 06:31:51 -0000 On Sat, Mar 15, 2014 at 01:27:37PM +0800, 朱江 wrote: > > Your experience is very helpful to me. Can you provide more detail about > your work? And I can learn something from your work. Sure, but my work was mainly to give a unified appearance to those base utilties that either provide statistics, control subsystems, or configure devices. Unfortunately, config(8) doesn't really implement any of that. The user interface code could be reuseable, but config only has a command-line interface right now. If you work on this, even though FreeBSD doesn't have Lua in the base system, then in addition to moving the knowledge of options into config(8), the logic used to determine proper option defaults based on architecture and other options selected should go too. It's currently in a Makefile. Ideally, that would be part of config as well so the same utility could be used to configure a kernel to build using make(1) or to configure a custom binary kernel to install using pkg(8). It's currently not possible to do that, but we're getting closer. Options and the logic controlling them should be accessible without a source tree installed. Let me know what you're planning to implement and I'll see what can be reused. -- Walt