You are not logged in.

#1 2024-05-15 11:28:05

starfry
Member
From: Surrey, UK
Registered: 2010-08-18
Posts: 232

Why does makepkg config now have debug enabled?

I have a build process that uses the arch iso to install a new system. I have just tried to use it after a few months of not using it. I had the usual expected task of bringing things up to date however there is one remaining issue I am unsure of that I'd appreciate some commentary on.

My build script runs on a clean Arch ISO live environment. It begins with a pacman -Syu to ensure it is bang up to date.

It then installs make gcc fakeroot into the live environment and proceeds to build AUR packages, however this now fails with an error

==> ERROR: Cannot find the debugedit binary required for including source files in debug packages.

I believe this has started to happen because debug has been enabled in /etc/makepkg.conf options. This happened in a change that was merged on Feb 6th. I can fix the problem by changing this value back to !debug like it was before the merge. Or I can install debugedit.

This is easily reproducible: netboot a live Arch env and then

$ mount -o remount,size=100% /run/archiso/cowspace
$ pacman -Syu
$ pacman -S make gcc fakeroot
$ cd /tmp
$ curl -s https://aur.archlinux.org/cgit/aur.git/snapshot/mkinitcpio-sd-zfs.tar.gz | tar zx 
$ chown -R nobody: mkinitcpio-sd-zfs
$ cd mkinitcpio-sd-zfs
$ sudo -u nobody makepkg

This will fail with the error. However, if you do this:

$ sed -i -e '/^OPTIONS=/s/debug/!debug/' /etc/makepkg.conf
$ sudo -u nobody makepkg

Then it works. Alternatively pacman -S debugedit.

My question is really about what this change brings to the party. Do I want debugedit or not? If so, why?

Or is this a change that slipped into that merge but isn't really required?

Offline

#2 2024-05-15 11:47:01

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,412
Website

Re: Why does makepkg config now have debug enabled?

Arch devs decided that the makepkg.conf that they use to build system packages should be the same as the one they install on your system.  This is the result.

Offline

#3 2024-05-15 13:07:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,621
Website

Re: Why does makepkg config now have debug enabled?

I was about to argue how stupid this change was not because I don't like the config setting, that's subjective and defaults are just defaults.  But I was going to argue that it's stupid to have a default setting that will not work on a default system: either the debug option should not be enabled by default, or the necessary package debugedit should be a dependency of base-devel.

Of course before I posted such a rant I checked: debugedit is required by base-devel.  If you are using makepkg and you do not have base-devel installed, you are doing it wrong.  I may still subjectively dislike this being the default, but it is an internally consistent setup.  You would not get this error if you were using makepkg properly (by installing base-devel).

EDIT: side-note, I do not have debugedit installed as I do not have base-devel installed.  I've made my own slimmed down "aur-devel" package.  But I'm aware of the fact that I'm using the AUR in an unsupported way.  If / when stuff breaks as a result, that's on me.  I diverged from using base-devel due to 'sudo' being included: PKGBUILDs should never use sudo, ever.  So there's no reason for this to be in base-devel.

Last edited by Trilby (2024-05-15 13:14:42)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2024-05-15 14:28:23

starfry
Member
From: Surrey, UK
Registered: 2010-08-18
Posts: 232

Re: Why does makepkg config now have debug enabled?

OK yes that makes sense. I was trying to install (into the live env) the barest minimum so as not to run out of space and that is why I had previously worked out what dependencies were required to build the packages I was using and I had it work successfully. The change to the debug setting broke that and led me to where we are. I could just install base-devel or change the makepkg config to remove debug. I guess that's my call and, as you say, on me if it breaks.

But seeing as we're here... what's the need for debug being enabled (other than convenience for the devs)? Am I losing something by disabling it (in makepkg config) that I don't know I need? I guess not given you've disabled it also.

I have noticed my images have bloated by around 20% since a few months ago. May be down to everything being built debug or may be just natural growth, I don't know.

Offline

#5 2024-05-15 14:43:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,621
Website

Re: Why does makepkg config now have debug enabled?

starfry wrote:

Am I losing something by disabling it (in makepkg config) that I don't know I need? I guess not given you've disabled it also.

My two cents on this may not be worth that much - but yes, I do not have debugging disabled, nor do I have base-devel installed.  And this has been working very well for me.  It'd be great if some of the devs using could present the case for the debug flag and what value it provides.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2024-05-15 14:59:40

seth
Member
Registered: 2012-09-03
Posts: 52,333

Re: Why does makepkg config now have debug enabled?

"Backtraces" - the flag certainly makes sense for centrally mass-distributed packages because when users run into obscure issues signals, they can provide a backtrace that often makes it rather easy to debug the error and is typically requested upstream for that reason.

For local, private builds? Rather pointless default action.
Ifff you should indeed run into issues w/ a package you think a more detailed backtrace might be useful for you can enable it for that package you're building (and apparently debugging) yourself anyway - otherwise it's just bloat.

Just like with the default compression, context matters and some of the settings that are extremely reasonable in one context are not very smart in a another one.

Online

#7 2024-05-16 00:47:43

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,412
Website

Re: Why does makepkg config now have debug enabled?

Trilby wrote:

EDIT: side-note, I do not have debugedit installed as I do not have base-devel installed.  I've made my own slimmed down "aur-devel" package.  But I'm aware of the fact that I'm using the AUR in an unsupported way.  If / when stuff breaks as a result, that's on me.  I diverged from using base-devel due to 'sudo' being included: PKGBUILDs should never use sudo, ever.  So there's no reason for this to be in base-devel.

More side note: As always, base-devel is packaged in the way the Arch Packagers need it to be.  The Arch packaging buildsystem relies on sudo for setting up chroots etc.  The fact that people decided this was a standard for the AUR is irrelevant in decision making at the packaging level.   (I do not even have the "base" package installed - noone ever needs bzip2...)

Offline

Board footer

Powered by FluxBB