From patchwork Fri Nov 10 12:13:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Michal_Such=C3=A1nek?= X-Patchwork-Id: 163874 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp1300328vqs; Fri, 10 Nov 2023 10:22:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IFbLjsK6vF1O85dyLo4LlCHwWvc+WPqPcRs84pYrarWTkDqUKqWDSNXIUJaO/f8PO/xky5k X-Received: by 2002:a9d:7f8f:0:b0:6d6:4d9d:efee with SMTP id t15-20020a9d7f8f000000b006d64d9defeemr1269141otp.3.1699640561948; Fri, 10 Nov 2023 10:22:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699640561; cv=none; d=google.com; s=arc-20160816; b=kq7MMJH3tUAQ94h0RQh3rNXAycecqsiBTT19taf1AOerVkLIf3PP3TZWeoHuomJPny ZeDWM0rj0ZTymJKdt15/jZCeke92kCkgXQdcLU9mkmbtxNAel7r4nWbIlfB6T1oujtNS 4y5be6Y5sFVyOlFTnYS264vuSOFDsYPPnTMuE5gLnpw90uj30B/25Oaq3UtP4h1G5jwX hxSUg/wuSOHDYgHDvntQd3ndFYXF6O1bg9QnDNp1rG8U9pb2xeOQ72+OBOh0KDE0IWFM 34TrKGlWJWZlw7RfbrUxsVeK8tdczDo6opsANLotA3IkjxPuoRJZ2I3XCFtdJWVy//YO Rykw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=Dq19wJSmTOrZRzEGt4AZFA5wmg4WvLvB9MbM94XFO7k=; fh=vIHUIwy/clQzugG7LrK0ZGiPxe8/wAUIKKmBWrk9I5U=; b=wwTKAPWl/lzD/QBkYeUgkAq5NNXLFRbcSrO4OS9caa+9DQMsR5GgUu+EikStSC9LJz kaxVEiGFn25sT4oLbIFA6ejNjoXrxB/zzAWrpmXBa00TMFu6KRIfUirsdp5r/EB/9sYl TZEYz5PDViFDrgGnh667gcaBvIqp3C7EvEH2jiW+Q3mLxTqYPnKew1Ssv3+BNXYQ4nS1 rS8jgK9Sc38YwhiBlLS9ddk3Oh5nY9DNR/PBJmNgM/mJ3H7Rqqd5lP8e2GcKh4yq112+ fJXNxwtXMXMQOUxsDNbbwGRY6sxEO9SBnokcF34vwaTsbDndZlGRcSMvfSgde3rjk1zI 8kzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=cYTmn7Cu; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id t3-20020a654083000000b005bce8cfb592si9845208pgp.245.2023.11.10.10.22.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Nov 2023 10:22:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=cYTmn7Cu; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 0597C807EB11; Fri, 10 Nov 2023 10:22:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345558AbjKJSUf (ORCPT + 30 others); Fri, 10 Nov 2023 13:20:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345059AbjKJSRX (ORCPT ); Fri, 10 Nov 2023 13:17:23 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A33373304B; Fri, 10 Nov 2023 04:14:15 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 060FC219C4; Fri, 10 Nov 2023 12:14:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1699618454; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Dq19wJSmTOrZRzEGt4AZFA5wmg4WvLvB9MbM94XFO7k=; b=cYTmn7Cu5Hwf6dEwJm2Dfuphy49HT1ncwzz63aOGu9p+CD8c2blI9bAm9+DM8sSHqLuv3c E8eSAFeVkQ0xT/E/X8bVsEGbLGYY6n+oFUTn4Yz/sWxyMB2W9ecJ7mvbmgIqdUnftk07zW 6cqDA+0jSFKR6T9iL8HBAJzGZwHvJK0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1699618454; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Dq19wJSmTOrZRzEGt4AZFA5wmg4WvLvB9MbM94XFO7k=; b=ArSIIaCcyPZ/qGHDyDqGuJmiIQaBWEq0JmsIWnWTnc+p9QQn2hoMnCmarEV2Wor6UZFv6Z PosazrD2S6yHsTDQ== Received: from kitsune.suse.cz (kitsune.suse.cz [10.100.12.127]) by relay2.suse.de (Postfix) with ESMTP id A17E72C162; Fri, 10 Nov 2023 12:14:13 +0000 (UTC) From: Michal Suchanek To: linux-modules@vger.kernel.org, Lucas De Marchi Cc: Michal Suchanek , Takashi Iwai , Lucas De Marchi , =?utf-8?q?Michal_Koutn=C3=BD?= , Jiri Slaby , Jan Engelhardt , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] configure: Check that provided paths are absolute Date: Fri, 10 Nov 2023 13:13:55 +0100 Message-ID: <8aff0c9c491d8afeec7f6b2cd96cbd0439e26fbb.1699618135.git.msuchanek@suse.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 10 Nov 2023 10:22:13 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782202301967742239 X-GMAIL-MSGID: 1782202301967742239 configure checks that its built-in directory options get an absolute path. Copy the check for custom options. Signed-off-by: Michal Suchanek --- v6: new patch --- configure.ac | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/configure.ac b/configure.ac index d6da5ee9ae9a..de01e08cf2e8 100644 --- a/configure.ac +++ b/configure.ac @@ -97,6 +97,23 @@ AC_ARG_WITH([module_directory], [], [with_module_directory=/lib/modules]) AC_SUBST([module_directory], [$with_module_directory]) +# Check all directory arguments for consistency. +for ac_var in distconfdir rootlibdir module_directory +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*@<:@^/@:>@\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + @<:@\\/$@:>@* | ?:@<:@\\/@:>@* ) continue;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + AC_ARG_WITH([zstd], AS_HELP_STRING([--with-zstd], [handle Zstandard-compressed modules @<:@default=disabled@:>@]), [], [with_zstd=no])