NetBSD Problem Report #52836

From www@NetBSD.org  Sun Dec 17 14:54:25 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 08F397A180
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 17 Dec 2017 14:54:25 +0000 (UTC)
Message-Id: <20171217145423.BDA417A1E5@mollari.NetBSD.org>
Date: Sun, 17 Dec 2017 14:54:23 +0000 (UTC)
From: logix@foobar.franken.de
Reply-To: logix@foobar.franken.de
To: gnats-bugs@NetBSD.org
Subject: In kernel builds (non-standard extension) with filesystem images, NOGZIP is not correctly honored
X-Send-Pr-Version: www-1.0

>Number:         52836
>Category:       toolchain
>Synopsis:       In kernel builds (non-standard extension) with filesystem images, NOGZIP is not correctly honored
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 17 14:55:00 +0000 2017
>Closed-Date:    Tue Jan 16 09:59:55 +0000 2018
>Last-Modified:  Tue Jan 16 10:32:43 +0000 2018
>Originator:     Harold Gutch
>Release:        NetBSD 7.1
>Organization:
>Environment:
NetBSD  7.1 NetBSD 7.1 (GENERIC.201703111743Z) amd64
>Description:
When building kernels with built-in file system images (INSTALL images
etc.), setting the MDSET_NOGZIP variable is supposed to disable
gzipping of all kernels, and MDSET_NOGZIP.${FILENAME} is supposed to
disable gzipping of the kernel called ${FILENAME}.  This is both
documented and implemented in src/distrib/common/Makefile.mdset.  But
for kernels with additional suffixes (created by setting
MDSET_SUFFIXES), the test in l. 105 only disables gzipping if *both*,
MDSET_NOGZIP.${FILENAME} *and* MDSET_NOGZIP are set.

Note that for standard kernels (i.e., no special suffix),, the test in
l. 163 correctly disables gzipping if either MDSET_NOGZIP.${FILENAME}
is set or gzipping of any kernel is disabled via MDSET_NOGZIP.
>How-To-Repeat:
1) In any Makefile in src/distrib that sets MDSET_SUFFIXES (e.g.,
evbarm/instkernel/instkernel/Makefile ) correspondingly set
MDSET_NOGZIP.${FILENAME} or MDSET_NOGZIP (but not both).
2) build release
3) observe that gzipped kernels with the special suffixes are still built.
>Fix:
--- src/distrib/common/Makefile.mdset	20 Sep 2016 20:55:54 -0000
+++ src/distrib/common/Makefile.mdset	16 Dec 2017 23:46:40 -0000
@@ -102,7 +102,7 @@
 	false
 .endif

-.if defined(MDSET_NOGZIP.${_FILENAME}) && defined(MDSET_NOGZIP)
+.if defined(MDSET_NOGZIP.${_FILENAME}) || defined(MDSET_NOGZIP)
 KERNELS+=	${_KERNEL.${_K}.${_F}}.${_S}
 .else							# {
 KERNELS+=	${_KERNEL.${_K}.${_F}}.${_S}.gz

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Tue, 16 Jan 2018 09:59:55 +0000
State-Changed-Why:
Applied, thanks for the fix!


From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52836 CVS commit: src/distrib/common
Date: Tue, 16 Jan 2018 09:59:37 +0000

 Module Name:	src
 Committed By:	maya
 Date:		Tue Jan 16 09:59:37 UTC 2018

 Modified Files:
 	src/distrib/common: Makefile.mdset

 Log Message:
 Make MDSET_NOGZIP behave as documented also if MDSET_SUFFIX is set

 MDSET_NOGZIP is documented as intended to apply for all kernels, even if
 MDSET_NOGZIP.filename is not set.

 From Harold Gutch in PR toolchain/52836


 To generate a diff of this commit:
 cvs rdiff -u -r1.41 -r1.42 src/distrib/common/Makefile.mdset

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.