Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#65108 - [pacman] disable either strip or debug

Attached to Project: Arch Linux
Opened by artoo (artoo) - Friday, 10 January 2020, 15:06 GMT
Last edited by Eli Schwartz (eschwartz) - Friday, 10 January 2020, 17:03 GMT
Task Type Support Request
Category Packages: Core
Status Closed
Assigned To No-one
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Pacman's PKGBUILD has both strip and debug options set

Additional info:
* pacman 5.2.1-4

Steps to reproduce:

Consuming scripts of makepkg's internal print_all_package_names() passes a wrong package list. There is no debug package built with this setting.
Either set '!strip' or '!debug'

This task depends upon

Closed by  Eli Schwartz (eschwartz)
Friday, 10 January 2020, 17:03 GMT
Reason for closing:  None
Additional comments about closing:  Due to  FS#65100 , debug packages were not being built, but artix has now successfully reproduced our build technique and their pacman package is correctly built.
Comment by Eli Schwartz (eschwartz) - Friday, 10 January 2020, 15:21 GMT
I cannot parse the meaning of this sentence, please clarify:

"Consuming scripts of makepkg's internal print_all_package_names() passes a wrong package list. There is no debug package built with this setting."
Comment by artoo (artoo) - Friday, 10 January 2020, 15:24 GMT
I explain, the options set will not produce a debug package. However, if you call print_all_package_names(), it will print a pacman and a pacman-debug package supposedly built.
This confuses our CI/CD when transforming the PKGBUILD into it's yaml representation.
Comment by Eli Schwartz (eschwartz) - Friday, 10 January 2020, 15:27 GMT
$ makepkg --packagelist
/var/cache/svnrepos/packages/pacman/trunk/pacman-5.2.1-4-x86_64.pkg.tar.zst
/var/cache/svnrepos/packages/pacman/trunk/pacman-debug-5.2.1-4-x86_64.pkg.tar.zst


So, it is printing both pacman and pacman-debug packages will be created.

Now, if I try building it, I get:

[...]
==> Creating package "pacman-debug"...
-> Generating .PKGINFO file...
-> Generating .BUILDINFO file...
-> Generating .MTREE file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: pacman 5.2.1-4 (Fri 10 Jan 2020 03:21:12 PM UTC)
==> Installing package pacman with pacman -U...
loading packages...
warning: pacman-5.2.1-4 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (2) pacman-5.2.1-4 pacman-debug-5.2.1-4
Comment by Eli Schwartz (eschwartz) - Friday, 10 January 2020, 15:27 GMT
Please explain why you believe there isn't a debug package being created.
Comment by artoo (artoo) - Friday, 10 January 2020, 15:32 GMT
You are right, I just built it in chroot like the CI does, the debug package is now present. Need to investigate the makepkg.conf on server, sorry for the false alarm. someting is wrong on our end.
I just noticed that the repo-add failed because the debug package wasn't there.

Comment by Eli Schwartz (eschwartz) - Friday, 10 January 2020, 15:46 GMT
The setting should really be overriding makepkg.conf, though.

In case you are wondering why archlinux builds a debug package specially for this PKGBUILD but doesn't release it, it can be provided on request for debugging purposes, we do this for a small handful of high-priority packages.
Comment by artoo (artoo) - Friday, 10 January 2020, 15:54 GMT
Thx, I also realized it has nothing to do with makepkg.conf.

It is however strange, if you are interested

This was build 5.2.1-1, debug package present
https://orion.artixlinux.org/job/packagesP/job/pacman/job/master/4/consoleText

This was the build 5.2.1-2, no debug package
https://orion.artixlinux.org/job/packagesP/job/pacman/job/master/6/consoleText

5.2.1-4, no debug
https://orion.artixlinux.org/job/packagesP/job/pacman/job/master/7/consoleText

Nothing has changed on our server.

Are you sure debug and stip need to be set?

the default makepkg.conf is OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug)
Comment by artoo (artoo) - Friday, 10 January 2020, 15:58 GMT
Is this the strip tidy patch eventually?
Comment by Eli Schwartz (eschwartz) - Friday, 10 January 2020, 16:08 GMT
Those jenkins links require me to sign in before I can view them, so no idea.

But I'm willing to bet that the builds which were missing debug packages, occurred due to being built with a broken version of makepkg.

You need to build makepkg with file 5.38 inside the build chroot, or else you will run into  FS#65100  and  FS#58626 
Comment by artoo (artoo) - Friday, 10 January 2020, 16:25 GMT
Interesting, thx.

file-5.38 was built Jan 9, 2020 4:49:17 PM
pacman 5.2.1-2 was built Jan 9, 2020 5:23:40 PM against file-3.38
pacman 5.2.1-4 on Jan 10, 2020 10:43:54 AM

I have the suspicion the current 5.2.1-4 in our testing works.

Maybe I should update the pacman on the server... probably does the trick.
Comment by Eli Schwartz (eschwartz) - Friday, 10 January 2020, 16:33 GMT
pacman 5.2.1-4 in a build chroot is the first version of pacman that will successfully strip packages in a build chroot that contains file 5.38.

Try using it to rebuild pacman again (pkgrel=4.1 or pkgrel=5) and it should work. Make sure the package is stripped, and that the file /usr/share/makepkg/source/file.sh contains the line:

local file_type=$(file -S -bizL -- "$file")

and NOT

local file_type=$(file -bizL -- "$file")
Comment by artoo (artoo) - Friday, 10 January 2020, 16:39 GMT
My theory is atm that I have to update the pacman on the server from 5.2.1-1 to rel 4, because pkg2yaml script is run outside the chroot to read PKGBUILD into yaml object.

Will report back, a bump is always possible, we use rel=x.y if we bump outside arch anyway. ;)
Comment by artoo (artoo) - Friday, 10 January 2020, 16:58 GMT
The update should have done the trick, pacman 5.2.1-4 on my local system has

local file_type=$(file -S -bizL -- "$file")

and produces the debug package, but doesn't with 5.2.1-1(file-5.37).

I hit the rebuild before I move pacman in stable to have the debug package, and it indeed present now.

Thx for your help.

Loading...