Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 912596 - mail-client/alpine-2.26-r2 - patch -p1 failed with /var/tmp/portage/mail-client/alpine-2.26-r2/files/alpine-2.26-fix-clang16-build
Summary: mail-client/alpine-2.26-r2 - patch -p1 failed with /var/tmp/portage/mail-clie...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robert G. Siebeck
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-08-19 15:37 UTC by Toralf Förster
Modified: 2023-08-26 04:01 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,18.58 KB, text/plain)
2023-08-19 15:37 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,222.02 KB, text/plain)
2023-08-19 15:37 UTC, Toralf Förster
Details
environment (environment,76.31 KB, text/plain)
2023-08-19 15:37 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,784 bytes, application/x-xz)
2023-08-19 15:37 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,26.52 KB, application/x-xz)
2023-08-19 15:37 UTC, Toralf Förster
Details
mail-client:alpine-2.26-r2:20230819-152735.log (mail-client:alpine-2.26-r2:20230819-152735.log,2.58 KB, text/plain)
2023-08-19 15:37 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,19.45 KB, application/x-xz)
2023-08-19 15:37 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-08-19 15:37:45 UTC
patching file pith/thread.c
Hunk #1 FAILED at 45.
Hunk #2 FAILED at 1892.
2 out of 2 hunks FAILED -- saving rejects to file pith/thread.c.rej
 [ !! ]
 * ERROR: mail-client/alpine-2.26-r2::gentoo failed (prepare phase):
 *   patch -p1  failed with /var/tmp/portage/mail-client/alpine-2.26-r2/files/alpine-2.26-fix-clang16-build.patch
 * 
 * Call stack:

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 23.0_desktop_plasma_systemd-20230815-172509

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-10
 [2] x86_64-pc-linux-gnu-13 *
clang/llvm (if any):
clang version 16.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/16/bin
Configuration file: /etc/clang/clang.cfg
/usr/lib/llvm/16
16.0.6
Python 3.11.4
Available Ruby profiles:
  [1]   ruby31 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.71.1
  [2]   rust-1.71.1 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 11.0.19_p7 [openjdk-bin-11]
*)	Eclipse Temurin JDK 17.0.7_p7 [openjdk-bin-17]
3)	Eclipse Temurin JDK 8.372_p07 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-11 
  [3]   openjdk-bin-17  system-vm

php cli (if any):
go version go1.21.0 linux/amd64

  HEAD of ::gentoo
commit ffe8a6347b5160de9bcaa67f2bf7b8c6a95a9bc1
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sat Aug 19 14:16:40 2023 +0000

    2023-08-19 14:16:40 UTC

emerge -qpvO mail-client/alpine
[ebuild  N    ] mail-client/alpine-2.26-r2  USE="ipv6 nls onlyalpine passfile smime ssl -chappa -kerberos -ldap"
Comment 1 Toralf Förster gentoo-dev 2023-08-19 15:37:46 UTC
Created attachment 868223 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-08-19 15:37:48 UTC
Created attachment 868224 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2023-08-19 15:37:49 UTC
Created attachment 868225 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2023-08-19 15:37:50 UTC
Created attachment 868226 [details]
etc.clang.tar.xz
Comment 5 Toralf Förster gentoo-dev 2023-08-19 15:37:51 UTC
Created attachment 868227 [details]
etc.portage.tar.xz
Comment 6 Toralf Förster gentoo-dev 2023-08-19 15:37:51 UTC
Created attachment 868228 [details]
mail-client:alpine-2.26-r2:20230819-152735.log
Comment 7 Toralf Förster gentoo-dev 2023-08-19 15:37:52 UTC
Created attachment 868229 [details]
temp.tar.xz
Comment 8 Holger Hoffstätte 2023-08-22 20:05:10 UTC
Can someone reproduce this? I cannot:

$ebuild alpine-2.26-r2.ebuild prepare
>>> Unpacking source...
>>> Unpacking alpine-2.26.tar.xz to /tmp/portage/mail-client/alpine-2.26-r2/work
>>> Unpacking alpine-2.26-chappa-5.patch.gz to /tmp/portage/mail-client/alpine-2.26-r2/work
>>> Source unpacked in /tmp/portage/mail-client/alpine-2.26-r2/work
>>> Preparing source in /tmp/portage/mail-client/alpine-2.26-r2/work/alpine-2.26 ...
 * Applying alpine-2.26-chappa-5.patch ... 
 * Applying alpine-2.26-fix-clang16-build.patch ... 
 * Running eautoreconf in '/tmp/portage/mail-client/alpine-2.26-r2/work/alpine-2.26' ...

Works fine on several machines.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-22 20:19:32 UTC
Probably depends on USE combination, as this ebuild conditionally patches.
Comment 10 Holger Hoffstätte 2023-08-22 20:45:50 UTC
(In reply to Sam James from comment #9)
> Probably depends on USE combination, as this ebuild conditionally patches.

Yup: -chappa now fails for me too.
Comment 11 Holger Hoffstätte 2023-08-23 06:23:05 UTC
I wonder if it wouldn't make more sense to use the chappa patch unconditionally, or even encourage upstream to merge it. The all-in-one patch is a whopping ~800k  and the functionality it adds is more than "nice to have".
I plan to address the remaining problems with -Wstrict-prototypes and will contact upstream about this.
Comment 12 Brahmajit Das 2023-08-23 06:27:51 UTC
(In reply to Holger Hoffstätte from comment #11)

> I plan to address the remaining problems with -Wstrict-prototypes and will
> contact upstream about this.

Thanks for that, I planned to send it upstream. But got busy with IRL and GSoC work.
Comment 13 Brahmajit Das 2023-08-23 06:28:56 UTC
Also, the initial patch is quite hacky. A proper fix from the developer would be much better IMO.
Comment 14 Larry the Git Cow gentoo-dev 2023-08-26 04:01:46 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37cdeedd76ed2f1f9d169431ac98c9e40afe9372

commit 37cdeedd76ed2f1f9d169431ac98c9e40afe9372
Author:     Brahmajit Das <brahmajit.xyz@gmail.com>
AuthorDate: 2023-08-23 06:09:34 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-26 04:01:25 +0000

    mail-client/alpine: Fix patch failed with -chappa use flag
    
    Conditionally patch, based on the chappa USE flag. Regression was
    introduced by commit 48ed3cf79fcd349f5014d31ff4d4f18abb897f72
    
    Closes: https://bugs.gentoo.org/912596
    Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/32417
    Signed-off-by: Sam James <sam@gentoo.org>

 mail-client/alpine/alpine-2.26-r2.ebuild           |   6 +-
 .../alpine-2.26-fix-clang16-build-no-chappa.patch  | 165 +++++++++++++++++++++
 2 files changed, 170 insertions(+), 1 deletion(-)