From patchwork Thu Oct 24 03:58:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 35271 Received: (qmail 6877 invoked by alias); 24 Oct 2019 03:58:55 -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 6720 invoked by uid 89); 24 Oct 2019 03:58:55 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-HELO: us-smtp-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571889532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to; bh=Uc3ceRXuHtlenrQfabUOLzqh1qgM56O2J/jNiR46VSo=; b=RGead6/D/ZZH+E9ty70J6WwziGol+wUZc6mCiG+Y3L2ZHIVslfdFS2nlBSMidsaI4yjk72 nrdX/TxqpaHZ5ZO61nc0O1QTjI1ghRy9fY51mxRDuxcq3LOZ1C9TSTpgBoASpRCASreojz Gg0E/clLVoqndBgINLTm3d7CF/KRGJc= From: DJ Delorie To: "Carlos O'Donell" Cc: libc-alpha@sourceware.org Subject: Re: [patch v2] Install charmaps uncompressed in testroot In-Reply-To: (carlos@redhat.com) Date: Wed, 23 Oct 2019 23:58:44 -0400 Message-ID: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 From 0325facbd14d76cdaeda65500734acf988780096 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Wed, 23 Oct 2019 17:52:26 -0400 Subject: Install charmaps uncompressed in testroot The testroot does not have a gunzip command, so the charmap files should not be installed gzipped else they cannot be used (and thus tested). With this patch, installing with INSTALL_UNCOMPRESSED=yes installs uncompressed charmaps instead. Note that we must purge the $(symbolic_link_list) as it contains references to $(DESTDIR), which we change during the testroot installation. Reviewed-by: Carlos O'Donell diff --git a/Makefile b/Makefile index 0711b9725d..335155ce3c 100644 --- a/Makefile +++ b/Makefile @@ -580,8 +580,15 @@ ifeq ($(run-built-tests),yes) $(test-wrapper) cp $$dso $(objpfx)testroot.pristine$$dso ;\ done endif + # $(symbolic-link-list) is a file that encodes $(DESTDIR) so we + # have to purge it + rm -f $(symbolic-link-list) + # Setting INSTALL_UNCOMPRESSED causes localedata/Makefile to + # install the charmaps uncompressed, as the testroot does not + # provide a gunzip program. $(MAKE) install DESTDIR=$(objpfx)testroot.pristine \ - subdirs='$(sorted-subdirs)' + INSTALL_UNCOMPRESSED=yes subdirs='$(sorted-subdirs)' + rm -f $(symbolic-link-list) touch $(objpfx)testroot.pristine/install.stamp tests-special-notdir = $(patsubst $(objpfx)%, %, $(tests-special)) diff --git a/localedata/Makefile b/localedata/Makefile index 33e473a883..ce6a750144 100644 --- a/localedata/Makefile +++ b/localedata/Makefile @@ -167,9 +167,17 @@ endif endif # Files to install. +ifeq ($(INSTALL_UNCOMPRESSED),yes) +# This option is for testing inside the testroot container, as the +# container does not include a working gunzip program. +install-others := $(addprefix $(inst_i18ndir)/, \ + $(charmaps) \ + $(locales)) +else install-others := $(addprefix $(inst_i18ndir)/, \ $(addsuffix .gz, $(charmaps)) \ $(locales)) +endif tests: $(objdir)/iconvdata/gconv-modules @@ -283,12 +291,22 @@ endif include ../Rules +ifeq ($(INSTALL_UNCOMPRESSED),yes) +# Install the charmap files as-is. This option is for testing inside +# the testroot container, as the container does not include a working +# gunzip program. +$(inst_i18ndir)/charmaps/%: charmaps/% $(+force) + $(make-target-directory) + rm -f $@ + $(INSTALL_DATA) $< $@ +else # Install the charmap files in gzipped format. $(inst_i18ndir)/charmaps/%.gz: charmaps/% $(+force) $(make-target-directory) rm -f $(@:.gz=) $@ $(INSTALL_DATA) $< $(@:.gz=) gzip -9n $(@:.gz=) +endif # Install the locale source files in the appropriate directory. $(inst_i18ndir)/locales/%: locales/% $(+force); $(do-install)