bugGNU roff - Bugs: bug #64906, libgroff.am:...

 
 

bug #64906: libgroff.am: "charset.alias" is created (almost empty) with wrong value of "$HOST"

Submitter:  Bjarni Ingi Gislason <bjarniig>
Submitted:  Sun 19 Nov 2023 01:15:24 AM UTC
   
 
Category:  Core Severity:  2 - Minor
Item Group:  Build/Installation Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 27 Nov 2023 11:04:44 PM UTC, comment #4: 

The patch in comment #2 changing only the case of "host" suggests the all-caps spelling may have been used when a coder was misled by the reportedly (in bug #64913) incorrect casing of that variable's documentation in Makefile.am.

In my latest groff build (a few months old, but I don't think the build system has changed significantly if at all), the entirety of the charset.alias file is:

# This file contains a table of character encoding aliases,
# suitable for operating system ''.
# It was automatically generated from config.charset.
# Packages using this file:

So clearly something is going wrong, the operating system string being left empty.  Tellingly, on my system the environment variable $HOST is undefined, suggesting that the make rule building charset.alias is using environment variable $HOST where it means to use make variable $host.

The comment #1 paragraph about localcharset replacing config.charset strikes me as a separate issue.

Dave <barx>
Group Member
Sat 25 Nov 2023 11:58:50 AM UTC, comment #3: 


comment #1:

>   This is still using "config.charset" which should be substituted by
> the GNU GNULIB module "localcharset" (?).
>
>   Or this is superfluous.
>
>   The only use of "charset.alias" is in "(un)install_charset_data" which
> installs it and "t-charset.alias".


I think the foregoing are issues that need to be better understood before any code changes are made.
 

>   Neither of these file is in Debian testing
> "/var/lib/dpkg/info/{groff,groff-base}.*"


That suggests that the file is unnecessary on GNU/Linux platforms.  But others exist, and groff targets some of them.

We need domain knowledge here, not blind patching.

G. Branden Robinson <gbranden>
Group administrator
Fri 24 Nov 2023 10:20:30 PM UTC, comment #2: 

From baf66e7e75a5332f311f043fab849fe7e668779d Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@simnet.is>
Date: Fri, 24 Nov 2023 22:03:00 +0000
Subject: [PATCH] libgroff.am: "charset.alias" needs the variable
 'host' (defined) instead of 'HOST'

Directory "src/libs/libgroff".

  Variable 'host' is defined by "automake" in "Makefile.in".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@simnet.is>
---
 src/libs/libgroff/libgroff.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libs/libgroff/libgroff.am b/src/libs/libgroff/libgroff.am
index 8dbccecd4..1a50a6991 100644
--- a/src/libs/libgroff/libgroff.am
+++ b/src/libs/libgroff/libgroff.am
@@ -125,7 +125,7 @@ all: charset.alias ref-add.sed ref-del.sed

 charset.alias: $(libgroff_srcdir)/config.charset
         $(AM_V_GEN)$(SHELL) $(libgroff_srcdir)/config.charset \
-            '$(HOST)' > t-$@ \
+            '$(host)' > t-$@ \
           && mv t-$@ $@

 ref-add.sed: $(libgroff_srcdir)/ref-add.sin
--
2.42.0

  The patch is (also) in the attachment.


(file #55353)

Bjarni Ingi Gislason <bjarniig>
Mon 20 Nov 2023 07:20:10 PM UTC, comment #1: 

  Using "host" instead of "HOST" (host is earlier defined as
"x86_64-pc-linux-gnu") in

charset.alias: $(libgroff_srcdir)/config.charset
        $(AM_V_GEN)$(SHELL) $(libgroff_srcdir)/config.charset \
            '$(HOST)' > t-$@ \
          && mv t-$@ $@

produces

# This file contains a table of character encoding aliases,
# suitable for operating system 'linux-gnu'.
# It was automatically generated from config.charset.
# Packages using this file:
ISO_646.IRV:1983 ASCII


  This is still using "config.charset" which should be substituted by
the GNU GNULIB module "localcharset" (?).

  Or this is superfluous.

  The only use of "charset.alias" is in "(un)install_charset_data" which
installs it and "t-charset.alias".

  Neither of these file is in Debian testing
"/var/lib/dpkg/info/{groff,groff-base}.*"

Bjarni Ingi Gislason <bjarniig>
Sun 19 Nov 2023 01:15:24 AM UTC, original submission:  

Subject: libgroff.am: charset.alias is created (almost empty) with
wrong value of "$HOST"

  "charset.alias" is created in

  src/libs/libgroff/libgroff.am

  with

charset.alias: $(libgroff_srcdir)/config.charset
        $(AM_V_GEN)$(SHELL) $(libgroff_srcdir)/config.charset \
            '$(HOST)' > t-$@ \
          && mv t-$@ $@

Content is:
---cut---
# This file contains a table of character encoding aliases,
# suitable for operating system 'kassi'.
# It was automatically generated from config.charset.
# Packages using this file:
---cut---

  "kassi" is the value of the environmental variable HOST, which is the
name of the computer.

  It is documented in the Makefile as being

# HOST
# `HOST' is the canonical host specification,
#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM

  and should therefore have the same content as

build_triplet = x86_64-pc-linux-gnu
host_triplet = x86_64-pc-linux-gnu

build = x86_64-pc-linux-gnu

host = x86_64-pc-linux-gnu

  or

host_cpu = x86_64
host_os = linux-gnu
host_vendor = pc

  The file "config.charset" is from GNU GNULIB, which removed it

2018-05-19  Bruno Haible  <bruno@clisp.org> (in Changelog)

        * lib/config.charset: Remove file.








Bjarni Ingi Gislason <bjarniig>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by barx (Posted a comment)
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by bjarniig (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-11-25 gbranden Severity3 - Normal 2 - Minor
        StatusNone Need Info
    2023-11-24 bjarniig Attached File- Added 0001-libgroff.am-charset.alias-needs-the-variable.patch.txt, #55353

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code