From patchwork Wed Jun 13 19:32:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10462853 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 919E4603B4 for ; Wed, 13 Jun 2018 19:32:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F09428F9B for ; Wed, 13 Jun 2018 19:32:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73B9228FCD; Wed, 13 Jun 2018 19:32:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1098328F9B for ; Wed, 13 Jun 2018 19:32:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935381AbeFMTcU (ORCPT ); Wed, 13 Jun 2018 15:32:20 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:56734 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934978AbeFMTcU (ORCPT ); Wed, 13 Jun 2018 15:32:20 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5DJSo1E160994; Wed, 13 Jun 2018 19:32:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=WYYtnHiEyRNFxQ5xCufmgbygOTf3Bw4Co9iZWWZmxeg=; b=OY3wLQ4vPcYaEJGQviHUOtpJbovavbclsVjP75H21bq78rFhInoNCcAq8wsH9kuwxunG b63tC52z5Xx3ppApoQfHHcMRorEDKrnzUWHkdD40gXRNkTF0rYIHIpIE9s2xvzLzzoJS c1fz7R2gY5v2XCEarsxZLvN3Cyx4lAfQzgS1fewHtmtqjoTHMw29MhhXq3eU1/GqDtVj KY9D4vYnqOAQkEWjXw7p9CL1a8b3emJ9meLcc9xRAz9PpLTRump5QZTKo9f+IS6VRE5j EeJWJSbgdD4NkkDkCSffstP76vdCU0YPhbhvN3c1pjJZ4vyHk0dgRYSjympCZifK68E1 Ew== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2jk0xra4nn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Jun 2018 19:32:07 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w5DJW6pZ009167 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Jun 2018 19:32:06 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w5DJW64P019680; Wed, 13 Jun 2018 19:32:06 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 13 Jun 2018 12:32:06 -0700 Subject: [PATCH 3/5] mkfs: hoist mkfs configfile dir string generation to build system From: "Darrick J. Wong" To: sandeen@redhat.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Wed, 13 Jun 2018 12:32:05 -0700 Message-ID: <152891832515.3968.9067729692865604405.stgit@magnolia> In-Reply-To: <152891829964.3968.4760134019673731615.stgit@magnolia> References: <152891829964.3968.4760134019673731615.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8923 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=946 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806130206 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Move the generation of MKFS_XFS_CONF_DIR to the build system; in the next few patches we're going to use that to install a (disabled) default config file. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen --- include/builddefs.in | 4 +++- mkfs/Makefile | 5 +++++ mkfs/config.h | 3 --- 3 files changed, 8 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/builddefs.in b/include/builddefs.in index e1ee9f7b..06cb71a6 100644 --- a/include/builddefs.in +++ b/include/builddefs.in @@ -65,6 +65,9 @@ PKG_MAN_DIR = @mandir@ PKG_ETC_DIR = @sysconfdir@ PKG_DOC_DIR = @datadir@/doc/@pkg_name@ PKG_LOCALE_DIR = @datadir@/locale +PKG_CFG_DIR = $(PKG_ETC_DIR)/xfs +PKG_MKFS_CFG_DIR = $(PKG_CFG_DIR)/mkfs +PKG_MKFS_DEFAULT_CFGFILE = default CC = @cc@ BUILD_CC = @BUILD_CC@ @@ -197,7 +200,6 @@ endif GCFLAGS = $(DEBUG) \ -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\" \ - -DROOT_SYSCONFDIR=\"$(PKG_ETC_DIR)\" \ -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include -I$(TOPDIR)/libxfs ifeq ($(ENABLE_GETTEXT),yes) diff --git a/mkfs/Makefile b/mkfs/Makefile index 5af8a6cc..102f5214 100644 --- a/mkfs/Makefile +++ b/mkfs/Makefile @@ -10,6 +10,9 @@ LTCOMMAND = mkfs.xfs HFILES = CFILES = proto.c xfs_mkfs.c config.c defaults.c +CFGFILE_CFLAGS = -DMKFS_XFS_CONF_DIR=\"$(PKG_MKFS_CFG_DIR)\" \ + -DMKFS_XFS_DEFAULT_CONFIG=\"$(PKG_MKFS_DEFAULT_CFGFILE)\" +LCFLAGS += $(CFGFILE_CFLAGS) LLDLIBS += $(LIBXFS) $(LIBXCMD) $(LIBFROG) $(LIBRT) $(LIBPTHREAD) $(LIBBLKID) \ $(LIBUUID) LTDEPENDENCIES += $(LIBXFS) $(LIBXCMD) $(LIBFROG) @@ -22,6 +25,8 @@ include $(BUILDRULES) install: default $(INSTALL) -m 755 -d $(PKG_ROOT_SBIN_DIR) $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_ROOT_SBIN_DIR) + $(INSTALL) -m 755 -d $(PKG_CFG_DIR) + $(INSTALL) -m 755 -d $(PKG_MKFS_CFG_DIR) install-dev: -include .dep diff --git a/mkfs/config.h b/mkfs/config.h index f00849e9..69f44405 100644 --- a/mkfs/config.h +++ b/mkfs/config.h @@ -19,9 +19,6 @@ #ifndef _XFS_MKFS_CONFIG_H #define _XFS_MKFS_CONFIG_H -#define MKFS_XFS_CONF_DIR ROOT_SYSCONFDIR "/xfs/mkfs" -#define MKFS_XFS_DEFAULT_CONFIG "default" - struct fsxattr; /*