FS#57938 - [devtools] makepkg git-master not working with makechrootpkg

Attached to Project: Arch Linux
Opened by Chih-Hsuan Yen (yan12125) - Saturday, 24 March 2018, 16:59 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Friday, 01 June 2018, 08:43 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Pierre Schmitz (Pierre)
Bartłomiej Piotrowski (Barthalion)
Eli Schwartz (eschwartz)
Architecture All
Severity Low
Priority Normal
Reported Version git
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Summary and Info:
With aur/pacman-git (5.0.1.249.g27f64e37-1) and aur/devtools (20180121-1), makechrootpkg does not work:

$ extra-x86_64-build
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
:: Starting full system upgrade...
there is nothing to do
==> Building in chroot for [extra] (x86_64)...
==> Synchronizing chroot copy [/var/lib/archbuild/extra-x86_64/root] -> [yen]...done
chmod: changing permissions of '/tmp/tmp.pRTQETX7HT': Operation not permitted

==> ERROR: An unknown error has occurred. Exiting...

==> ERROR: An unknown error has occurred. Exiting...
/usr/bin/makechrootpkg: line 499: 11410 User defined signal 1 sudo -u "$makepkg_user" env SRCDEST="$SRCDEST" BUILDDIR="$builddir" makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o
==> ERROR: Could not download sources.

Seems makechrootpkg creates a directory as root and then run makepkg as the original user (yen), and makepkg tries to chmod the directory, which leads to the error.

Apparently this commit causes this issue: https://git.archlinux.org/pacman.git/commit/?id=d8717a6a9666ec80c8645d190d6f9c7ab73084ac. Before this commit `chmod a-s` is run only if $BUILDDIR does not exist beforehand. Now the chmod command is run unconditionally.

Steps to Reproduce:
1. Install the latest git version for both pacman and devtools
2. Build a random package. In my example I build https://aur.archlinux.org/dropbox.git with extra-x86_64-build
This task depends upon

Closed by  Bartłomiej Piotrowski (Barthalion)
Friday, 01 June 2018, 08:43 GMT
Reason for closing:  Fixed
Additional comments about closing:  devtools 20180531-1
Comment by Eli Schwartz (eschwartz) - Sunday, 25 March 2018, 06:31 GMT Comment by Chih-Hsuan Yen (yan12125) - Sunday, 25 March 2018, 07:02 GMT
Oh, so this is a known issue :)

I can confirm the commit https://git.archlinux.org/devtools.git/commit/?id=40f0179a5e74d6d3babbefdeae21fd374be0e090 fixed my issue. This ticket can be closed.
Comment by Eli Schwartz (eschwartz) - Sunday, 25 March 2018, 15:34 GMT
Well, ideally one would not need devtools-git in order to use pacman-git, since the fix also leads to "more proper" behavior with pacman 5.0

But then again, makechrootpkg is already broken due to pacman -Sddp returning a file:// url (the fix for which requires either pacman-git, or an external pacutils dependency).

See https://lists.archlinux.org/pipermail/arch-projects/2018-January/004719.html and https://lists.archlinux.org/pipermail/arch-projects/2018-January/004720.html
Comment by Sergej Pupykin (sergej) - Wednesday, 30 May 2018, 14:04 GMT
Reproduced on current system, I guess devtools should be moved from testing to extra.

Loading...