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#64349 - [devtools] build script does not honor PACKAGER from makepkg.conf

Attached to Project: Arch Linux
Opened by John (graysky) - Friday, 01 November 2019, 21:10 GMT
Last edited by Eli Schwartz (eschwartz) - Sunday, 03 November 2019, 01:17 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

makechrootpkg does not honor the values for PACKAGER or MAKEFLAGS when the user supplies a custom makepkg.conf file via the -M option. Instead, it takes these values from /etc/makepkg.conf on the live filesystem.

This behavior is inconsistent since makechrootpkg does honor the values for other variables defined in the a custom makepkg.conf (again passed to mkarchroot via the -M option) such as BUILDENV and CFLAGS.

Additional info:
* package version(s) 20191016-1

Steps to reproduce:

1) Edit /usr/share/devtools/makepkg-x86_64.conf to define a value for both MAKEFLAGS and PACKAGER that is different that the respective values on the live file system's /etc/makepkg.conf to illustrate.
2) Run: mkarchroot -M /usr/share/devtools/makepkg-x86_64.conf $CHROOT/root base-devel
3) Run: makechrootpkg -u -c -r $CHROOT

To illustrate, I attached a simple PKGBUILD that just echoes these values.
   PKGBUILD (0.1 KiB)
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Sunday, 03 November 2019, 01:17 GMT
Reason for closing:  Not a bug
Additional comments about closing:  BUILDENV and CFLAGS are chroot-level settings, PACKAGER and MAKEFLAGS are user-level settings. This is by design.
Comment by Eli Schwartz (eschwartz) - Sunday, 03 November 2019, 01:16 GMT
This is by design, makechrootpkg does not support -M

mkarchroot -M is intended for creating chroots designed to a spec, e.g. the configs provided by extra-x86_64-build which are configs packaged for thousands of users/systems, and PACKAGER and MAKEFLAGS are the per-user configuration options which makechrootpkg supports on top of the "official" settings provided by the chroot's makepkg.conf. These per-user settings can and should be configured via $HOME/.config/pacman/makepkg.conf, or /etc/makepkg.conf for settings which apply per-system but should be in turn overridden by the user's configs. (Arch Linux build servers configure MAKEFLAGS tuned to the server, and PACKAGER configured per user. Dozens of people use the same makepkg.conf from the same mkarchroot, but each has a different $HOME/.config/pacman/makepkg.conf with their unique PACKAGER set.)

It would defeat the entire purpose of attempting to be configurable to simply remove all support for PACKAGER from makechrootpkg, and there's absolutely nothing to distinguish between a ${chrootdir}/etc/makepkg.conf which came from extra-x86_64-build or that came from mkarchroot -M.

Just stop misusing the tools and you should be fine.

Loading...