FS#66888 - Debug package may conflict with the original

Attached to Project: Pacman
Opened by Yichao Yu (yuyichao) - Thursday, 04 June 2020, 03:05 GMT
Last edited by Morten Linderud (Foxboron) - Monday, 02 May 2022, 14:06 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 5.2.1
Due in Version 6.1.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:

For some languages, for example julia, the julia source file could be part of the package but will also appear as source files in the compiled binary. When making a package with `(debug strip)`, the source files will be included in both the debug package and the original one causing a conflict. The obvious solution would be to detect and remove such conflicts though other solutions like specifying white/black list in PKGBUILD can also work in this case.

Steps to Reproduce:
This task depends upon

Closed by  Morten Linderud (Foxboron)
Monday, 02 May 2022, 14:06 GMT
Reason for closing:  Fixed
Additional comments about closing:  ae2f506ddfd11d9becda7216033fe1b159536982
Comment by Allan McRae (Allan) - Thursday, 04 June 2020, 03:17 GMT
How do they cause a conflict? Debug sources are in /usr/src/debug. No package should be placing file there.
Comment by Eli Schwartz (eschwartz) - Thursday, 04 June 2020, 03:20 GMT
When requesting split debug packages, we define additional CFLAGS which use -fdebug-prefix-map to remap those source files to /usr/src/debug. If this were not so, then the source files would surely be packaged in /build/julia/src/julia-$pkgver, or possibly in /home/yuyichao/aur-packages/julia/src/julia-$pkgver. So I'm curious exactly how this error is supposed to happen. Does the software set fdebug-prefix-map itself? Does your package install its own source code?

(FWIW: packages producing debug sources in the build machine's ${srcdir} because they completely ignore CFLAGS are a pure and simple matter of an upstream bug, not a makepkg bug.)
Comment by Yichao Yu (yuyichao) - Thursday, 04 June 2020, 03:49 GMT
Yes I know about fdebug-prefix-map but this is different since it is a differerent language.

To be clear, this applies to non-c/c++ source code. Julia is both the package and the language. The source file is installed as part of the package under `/usr/share/julia/`, which is also how they are referred to in the language and what saved to the library as the source path.

Actually, looking at this again, it seems that `makepkg` is actually picking up the files from the system installation when compiling out of a chroot. A clean chroot build might not actually have this problem. Nonetheless, I think the logic should make sure no files are copied from outside `$srcdir`. Those are almost certainly the wrong paths.

Loading...