Bug 268663 - devel/gettext-tools
Summary: devel/gettext-tools
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Tijl Coosemans
URL:
Keywords:
Depends on: 269185
Blocks:
  Show dependency treegraph
 
Reported: 2022-12-31 06:06 UTC by brian saia
Modified: 2023-03-07 17:40 UTC (History)
2 users (show)

See Also:
tijl: maintainer-feedback+


Attachments
patch (637 bytes, patch)
2022-12-31 10:49 UTC, Tijl Coosemans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description brian saia 2022-12-31 06:06:59 UTC
Version 0.21.1 fails to compile because the file '.../gettext-tools/work/stage/usr/local/share/gettext/archive.dir.tar.xz' does not exist. The file is there, but it was compressed with a different archive format so it has the name 'archive.dir.tar.bz2'.


Snippet of compilation output using Portmaster:


******
====> Compressing man pages (compress-man)                                                                                                                                                     
===>  Installing for gettext-tools-0.21_1                                                                                                                                                      
===>  Checking if gettext-tools is already installed                                                                                                                                           
===>   Registering installation for gettext-tools-0.21_1                                                                                                                                       
pkg-static: Unable to access file /usr/ports/devel/gettext-tools/work/stage/usr/local/share/gettext/archive.dir.tar.xz:No such file or directory                                               
*** Error code 1                                                                                                                                                                               
                                                                                                                                                                                               
Stop.                                                                                                                                                                                          
make[1]: stopped in /usr/ports/devel/gettext-tools                                                                                                                                             
*** Error code 1                                                                                                                                                                               
                                                                                                                                                                                               
Stop.                                                                                                                                                                                          
make: stopped in /usr/ports/devel/gettext-tools                                                                                                                                                
                                                                                                                                                                                               
===>>> Installation of gettext-tools-0.21_1 (devel/gettext-tools) failed                                                                                                                       
===>>> Aborting update
******
Comment 1 Tijl Coosemans freebsd_committer freebsd_triage 2022-12-31 10:49:45 UTC
Created attachment 239146 [details]
patch

What version of FreeBSD are you running?  What is the output of 'xz --version'?  Please try the attached patch.
Comment 2 brian saia 2023-01-02 05:59:34 UTC
(In reply to Tijl Coosemans from comment #1)

These are my system details:

# freebsd-version
13.1-RELEASE-p5

(having an issue with getting the xz version. I will have to try another method later.)
# /usr/bin/xz --version
/usr/bin/xz: : Value is not a non-negative decimal integer
Comment 3 Tijl Coosemans freebsd_committer freebsd_triage 2023-01-02 10:47:47 UTC
(In reply to brian saia from comment #2)
The gettext configure script runs "xz --version" to see if it's a recent enough version.  If not, it falls back on bzip2 and if that fails gzip.  So to get archive.dir.tar.xz you'll have to fix that error message.  Check with "env | grep ^XZ" if you have xz related environment variables set and if their value is correct.
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-02-01 11:06:27 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1414c99d7c003c64cfaa169de6d4e8a9f13aaa9e

commit 1414c99d7c003c64cfaa169de6d4e8a9f13aaa9e
Author:     Tijl Coosemans <tijl@FreeBSD.org>
AuthorDate: 2023-01-03 11:10:35 +0000
Commit:     Tijl Coosemans <tijl@FreeBSD.org>
CommitDate: 2023-02-01 11:05:19 +0000

    devel/gettext-tools: Compress archive.dir.tar with xz

    The configure script falls back to other compression formats
    (bzip2, git, gzip, ...) when it fails to detect xz.  This causes pkg
    to complain about a pkg-plist error.  Force the configure script to
    use xz so it prints a clearer error message when xz fails.

    PR:             268663

 devel/gettext-tools/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 5 Tijl Coosemans freebsd_committer freebsd_triage 2023-02-01 11:24:36 UTC
Have you been able to solve your problem?
Comment 6 plex 2023-02-03 18:19:44 UTC
(In reply to Tijl Coosemans from comment #5)
Hi Tijl, I am not the OP but had the same issue trying to run poudriere bulk for python38. devel/gettext-tools-0.21.1 was causing the failure. I applied the patch in my ports tree manually but that didn't help, unfortunately. Is there some information I can provide to help speed up the fix? Thank you
Comment 7 Tijl Coosemans freebsd_committer freebsd_triage 2023-02-03 18:52:13 UTC
(In reply to plex from comment #6)
Output of "xz --version" and "env | grep XZ", and if /usr/local/bin/xz exists, output of "pkg which /usr/local/bin/xz".
Comment 8 plex 2023-02-03 18:58:19 UTC
(In reply to Tijl Coosemans from comment #7)
# xz --version
xz (XZ Utils) 5.2.5
liblzma 5.2.5

env | grep XZ returns empty

/usr/local/bin/xz does NOT exist. It is in /usr/bin/xz but that is probably cause I am running root at the moment. 

xz was either preinstalled or installed with pkg git, I am not sure at this point.
Comment 9 Tijl Coosemans freebsd_committer freebsd_triage 2023-02-03 19:23:43 UTC
(In reply to plex from comment #8)
All of that looks normal.  Can you copy-paste the error you are seeing?
Comment 10 plex 2023-02-03 19:36:35 UTC
(In reply to Tijl Coosemans from comment #9)
xz -c -5 < '.'/archive.dir.tar > archive.dir.tar.xz-t && mv archive.dir.tar.xz-t archive.dir.tar.xz
xz: Failed to enable the sandbox
*** Error code 1

Stop.
make[3]: stopped in /wrkdirs/usr/ports/devel/gettext-tools/work/gettext-0.21.1/gettext-tools/misc
*** Error code 1

Stop.
make[2]: stopped in /wrkdirs/usr/ports/devel/gettext-tools/work/gettext-0.21.1/gettext-tools
*** Error code 1

Stop.
make[1]: stopped in /wrkdirs/usr/ports/devel/gettext-tools/work/gettext-0.21.1/gettext-tools
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/gettext-tools
Comment 11 plex 2023-02-03 19:40:59 UTC
(In reply to Tijl Coosemans from comment #9)
And I forgot to mention I am cross compiling arm64.aarch64 13.1-STABLE on freeBSD 13.1-RELEASE amd64
Comment 12 Tijl Coosemans freebsd_committer freebsd_triage 2023-02-03 19:57:18 UTC
(In reply to plex from comment #10)
That looks like the problem from bug 269185.  A fix for that bug has been committed to stable/13 earlier today so updating the base system should fix your problem.
Comment 13 plex 2023-02-03 20:23:09 UTC
(In reply to Tijl Coosemans from comment #12)
oh, thank you Tijl for your help. Will report back after reinstalling base system.
Comment 14 plex 2023-02-06 18:36:29 UTC
hi Tijl, surprisingly OS update didn;t help. I also tried rebuilding the world with just applied fix from the ticket you linked but it also didn't help. THe error message is still the same, so at this point I am not sure what to do. Is there a workaround?
Comment 15 Tijl Coosemans freebsd_committer freebsd_triage 2023-02-06 21:18:03 UTC
(In reply to plex from comment #14)
Did you update both the amd64 host and the arm64 target?  The other option is to remove WITHOUT_CAPSICUM if you added that somewhere and then rebuild the kernel(s).
Comment 16 plex 2023-02-06 21:46:21 UTC
(In reply to Tijl Coosemans from comment #15)
I didn’t update the arm64 target. Is xz used in the target too when I am building the port? I guess it does. Will update here as soon as I try
Comment 17 Xin LI freebsd_committer freebsd_triage 2023-03-07 17:40:44 UTC
This should have been mitigated in latest stable/13 as well as -CURRENT.  I'll try to get it into releng/13.2 before the release.