From patchwork Tue Jul 16 19:13:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Geissler X-Patchwork-Id: 1132909 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-103680-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=amadeus.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="JQ6P7uHM"; dkim=pass (2048-bit key; unprotected) header.d=amadeus.com header.i=@amadeus.com header.b="Q7HUR0Ch"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45p9BM0ZF3z9sBt for ; Wed, 17 Jul 2019 05:16:58 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=rMKbt/iOJN457Ma4JTUNf+tp5dyx2 PIyFF/51T7UaeV8vSbrjxETmVhJRf9FdLzDKIha1K3aDkQiiPBVUA5poWfkpNAO+ KP/XSj8rNY92pSiaD0702GtXFguzqQJPzC2qmRytjqwsFlrvKWuC6amAcfRlA0I8 yMJ65VgaLElTp0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=7S7GslV4IyuVGzmA1Zsnwu+ykSo=; b=JQ6 P7uHMLZHQsn4yIwB4FX4ReLB1wYxd1RR07vmon8yIdzO0CU9D9W1/G+iPmYh88Rl 1q7pTThU3ffHrF0fi2hr+/Ttxthl4QHM+ojLpwF2yz+TMWOvxS3HSbEhZWy63tF7 3EXOipuid0lk33wy+NEDuPUY59waCeIzPj/19Dc0= Received: (qmail 111789 invoked by alias); 16 Jul 2019 19:16:52 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 111781 invoked by uid 89); 16 Jul 2019 19:16:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Spam-Relays-External:sk:server-, H*RU:sk:server-, HX-Msg-Ref:sk:server-, UD:pl X-HELO: mail1.bemta25.messagelabs.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amadeus.com; s=SYM2018Q2; t=1563304607; i=@amadeus.com; bh=+bVxaooDdg81q30NB6nc+RwRxNL+2qOkAnOs3uEsvGs=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=Q7HUR0ChK/qyPJ5fNyN5XtwHzZejZOnAm2o59mSv64fRplcq1zYs+i8lr4LYVZsY5 9nHV2EasPfTD4Hb9SMVS5l6jCo42uux79RqLdsVSx2DjlbzQLeruiO99BZjxlu1l07 UyIqfAv0urXztl4NKKt2vRsuhnr6mn54CzQDiaqQAfqUBaV837ZA6CnnpaqcIMT/r4 f4uvvbnJcICzK66a7pr7HY9tjkfCVR7ZQ+zsmAMCnygSTj/dWSd1T66bFfT8gqLU0g TNaMld2scnhsUGxsAKhwAexYolnTtoud32eLkzW/JL4L8wH0dnxmpeLMJIHNiE6yCs k5IpHbLRM+HaA== X-Env-Sender: romain.geissler@amadeus.com X-Msg-Ref: server-8.tower-309.messagelabs.com!1563304606!1482911!1 X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.31.5; banners=-,-,- X-VirusChecked: Checked Date: Tue, 16 Jul 2019 19:13:34 +0000 From: Romain Geissler To: Subject: [BZ 24106] Remove all usage of @BASH@ or ${BASH} in installed files, and hardcode /bin/bash instead Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Hi, This trivial patch attemps to fix BZ 24106, basically the bash locally used when building glibc on the host shall not leak on the installed glibc, as the system where it is installed might be different and use another bash location. So I have looked for all occurences of @BASH@ or $(BASH) in installed files, and replaced it by /bin/bash. This was suggested by Florian Weimer in the bug report. Note: I have no copyright assignment and I know it. I hope this patch is trivial and small enough to be accepted even without such legal paper signed. Cheers, Romain 2019-07-16 Romain Geissler * debug/Makefile: ($(objpfx)xtrace): Don't replace @BASH@. * elf/Makefile: ($(objpfx)sotruss): Likewise. (ldd-rewrite): Likewise. * malloc/Makefile: ($(objpfx)memusage): Likewise. * timezone/Makefile: ($(objpfx)tzselect): Don't replace /bin/bash. * debug/xtrace.sh: Hardcode /bin/bash instead of @BASH@. * elf/ldd.bash.in: Likewise. * elf/sotruss.sh: Likewise. * malloc/memusage.sh: Likewise. From 6adceb3cc65aaa100b2368fd17b4d1d609b37de6 Mon Sep 17 00:00:00 2001 From: Romain Geissler Date: Tue, 16 Jul 2019 17:14:54 +0000 Subject: [PATCH] Remove all usage of @BASH@ or ${BASH} in installed files, and hardcode /bin/bash instead. --- debug/Makefile | 5 ++--- debug/xtrace.sh | 2 +- elf/Makefile | 4 +--- elf/ldd.bash.in | 2 +- elf/sotruss.sh | 2 +- malloc/Makefile | 5 ++--- malloc/memusage.sh | 2 +- timezone/Makefile | 3 +-- 8 files changed, 10 insertions(+), 15 deletions(-) diff --git a/debug/Makefile b/debug/Makefile index 6351b7e9f48..c5714c29db1 100644 --- a/debug/Makefile +++ b/debug/Makefile @@ -205,8 +205,7 @@ $(objpfx)pcprofiledump: $(objpfx)pcprofiledump.o $(objpfx)xtrace: xtrace.sh rm -f $@.new - sed -e 's|@BASH@|$(BASH)|' -e 's|@VERSION@|$(version)|' \ - -e 's|@SLIBDIR@|$(sLIBdir)|' -e 's|@BINDIR@|$(bindir)|' \ - -e 's|@PKGVERSION@|$(PKGVERSION)|' \ + sed -e 's|@VERSION@|$(version)|' -e 's|@SLIBDIR@|$(sLIBdir)|' \ + -e 's|@BINDIR@|$(bindir)|' -e 's|@PKGVERSION@|$(PKGVERSION)|' \ -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $^ > $@.new \ && rm -f $@ && mv $@.new $@ && chmod +x $@ diff --git a/debug/xtrace.sh b/debug/xtrace.sh index dad16113754..34fe00a0b2d 100755 --- a/debug/xtrace.sh +++ b/debug/xtrace.sh @@ -1,4 +1,4 @@ -#! @BASH@ +#!/bin/bash # Copyright (C) 1999-2019 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Ulrich Drepper , 1999. diff --git a/elf/Makefile b/elf/Makefile index a3eefd1b1f4..e80aac2519b 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -132,8 +132,7 @@ $(objpfx)sotruss-lib.so: $(common-objpfx)libc.so $(objpfx)ld.so \ $(common-objpfx)libc_nonshared.a $(objpfx)sotruss: sotruss.sh $(common-objpfx)config.make - sed -e 's%@BASH@%$(BASH)%g' \ - -e 's%@VERSION@%$(version)%g' \ + sed -e 's%@VERSION@%$(version)%g' \ -e 's%@TEXTDOMAINDIR@%$(localedir)%g' \ -e 's%@PREFIX@%$(prefix)%g' \ -e 's|@PKGVERSION@|$(PKGVERSION)|g' \ @@ -563,7 +562,6 @@ ldd-rewrite = -e 's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \ -e 's%@VERSION@%$(version)%g' \ -e 's|@PKGVERSION@|$(PKGVERSION)|g' \ -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g' \ - -e 's%@BASH@%$(BASH)%g' \ -e 's%@TEXTDOMAINDIR@%$(localedir)%g' ifeq ($(ldd-rewrite-script),no) diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in index 32ec62eda61..2cbf1a3795d 100644 --- a/elf/ldd.bash.in +++ b/elf/ldd.bash.in @@ -1,4 +1,4 @@ -#! @BASH@ +#!/bin/bash # Copyright (C) 1996-2019 Free Software Foundation, Inc. # This file is part of the GNU C Library. diff --git a/elf/sotruss.sh b/elf/sotruss.sh index 6e06eae00cf..d6bdafe9e65 100755 --- a/elf/sotruss.sh +++ b/elf/sotruss.sh @@ -1,4 +1,4 @@ -#! @BASH@ +#!/bin/bash # Copyright (C) 2011-2019 Free Software Foundation, Inc. # This file is part of the GNU C Library. diff --git a/malloc/Makefile b/malloc/Makefile index d2fba29953c..b55256f03ae 100644 --- a/malloc/Makefile +++ b/malloc/Makefile @@ -216,9 +216,8 @@ $(objpfx)mtrace: mtrace.pl $(objpfx)memusage: memusage.sh rm -f $@.new - sed -e 's|@BASH@|$(BASH)|' -e 's|@VERSION@|$(version)|' \ - -e 's|@SLIBDIR@|$(sLIBdir)|' -e 's|@BINDIR@|$(bindir)|' \ - -e 's|@PKGVERSION@|$(PKGVERSION)|' \ + sed -e 's|@VERSION@|$(version)|' -e 's|@SLIBDIR@|$(sLIBdir)|' \ + -e 's|@BINDIR@|$(bindir)|' -e 's|@PKGVERSION@|$(PKGVERSION)|' \ -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $^ > $@.new \ && rm -f $@ && mv $@.new $@ && chmod +x $@ diff --git a/malloc/memusage.sh b/malloc/memusage.sh index ee080a2ece5..e9396f09e73 100755 --- a/malloc/memusage.sh +++ b/malloc/memusage.sh @@ -1,4 +1,4 @@ -#! @BASH@ +#!/bin/bash # Copyright (C) 1999-2019 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Ulrich Drepper , 1999. diff --git a/timezone/Makefile b/timezone/Makefile index 493deca7904..0c077e5c3d7 100644 --- a/timezone/Makefile +++ b/timezone/Makefile @@ -122,8 +122,7 @@ $(testdata)/XT%: testdata/XT% cp $< $@ $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make - sed -e 's|/bin/bash|$(BASH)|' \ - -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \ + sed -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \ -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \ -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \ -e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \