From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id DE3963858CDA for ; Tue, 16 Aug 2022 13:17:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DE3963858CDA Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 25CF01FD48; Tue, 16 Aug 2022 13:17:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1660655863; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M9v3jRKqmhdyBMC6ZWTOVtRqlX4NEiSH7Y5Po4ZRqbk=; b=dDaSiLaiOy0/tXB26Ui7u4sjEr4FNXMC6avapwyVwkgGzLEt+4dtGnk9K47eEjw3a7OkOr SYPD8OH+6x2tiLGk2/jmGlOezofzjYyfB07hY/NeKIfdsKxFwGkbyMJn/dShuWjysD0zQB CPCzkKoTYWyi0xyLKp2jnadXuPQTb/8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1660655863; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M9v3jRKqmhdyBMC6ZWTOVtRqlX4NEiSH7Y5Po4ZRqbk=; b=RKce8wK9ydQTBrVZMRHJMy7Eq8L3DL+tipDAqUl0kYKL616H8sfEBHm44olAWmNYyYW1eH 9HjtIeZBqenI3TCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 07509139B7; Tue, 16 Aug 2022 13:17:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id RwUKAPeY+2IvZAAAMHmgww (envelope-from ); Tue, 16 Aug 2022 13:17:42 +0000 Message-ID: Date: Tue, 16 Aug 2022 15:17:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [PATCH] Support nullglob in profile.*.in files To: elfutils-devel@sourceware.org Content-Language: en-US Cc: "Frank Ch. Eigler" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2022 13:17:46 -0000 In openSUSE we have the following RPM checker that uses shopt -s nullglob: https://github.com/openSUSE/post-build-checks/blob/master/checks/50-check-libtool-deps#L31 The script loads all /etc/profile.d/*.sh files via source $FILE which can end up by stuck cat (with no arguments): shopt -s nullglob ; cat "/etc/debuginfod"/*.urls (stuck) --- config/profile.csh.in | 2 +- config/profile.sh.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/profile.csh.in b/config/profile.csh.in index 74c20c99..d962d969 100644 --- a/config/profile.csh.in +++ b/config/profile.csh.in @@ -6,7 +6,7 @@ if (! $?DEBUGINFOD_URLS) then set prefix="@prefix@" - set DEBUGINFOD_URLS=`sh -c 'cat "$0"/*.urls 2>/dev/null; :' "@sysconfdir@/debuginfod" | tr '\n' ' '` + set DEBUGINFOD_URLS=`sh -c 'cat /dev/null "$0"/*.urls 2>/dev/null; :' "@sysconfdir@/debuginfod" | tr '\n' ' '` if ( "$DEBUGINFOD_URLS" != "" ) then setenv DEBUGINFOD_URLS "$DEBUGINFOD_URLS" else diff --git a/config/profile.sh.in b/config/profile.sh.in index bad20b1e..3f4397dc 100644 --- a/config/profile.sh.in +++ b/config/profile.sh.in @@ -6,7 +6,7 @@ if [ -z "$DEBUGINFOD_URLS" ]; then prefix="@prefix@" - DEBUGINFOD_URLS=$(cat "@sysconfdir@/debuginfod"/*.urls 2>/dev/null | tr '\n' ' ') + DEBUGINFOD_URLS=$(cat /dev/null "@sysconfdir@/debuginfod"/*.urls 2>/dev/null | tr '\n' ' ') [ -n "$DEBUGINFOD_URLS" ] && export DEBUGINFOD_URLS || unset DEBUGINFOD_URLS unset prefix fi -- 2.37.1