{"action":"created","issue":{"url":"https://api.github.com/repos/AladW/aurutils/issues/120","repository_url":"https://api.github.com/repos/AladW/aurutils","labels_url":"https://api.github.com/repos/AladW/aurutils/issues/120/labels{/name}","comments_url":"https://api.github.com/repos/AladW/aurutils/issues/120/comments","events_url":"https://api.github.com/repos/AladW/aurutils/issues/120/events","html_url":"https://github.com/AladW/aurutils/issues/120","id":150839748,"number":120,"title":"makechrootpkg silently discards PKGDEST variable","user":{"login":"runical","id":2693945,"avatar_url":"https://avatars.githubusercontent.com/u/2693945?v=3","gravatar_id":"","url":"https://api.github.com/users/runical","html_url":"https://github.com/runical","followers_url":"https://api.github.com/users/runical/followers","following_url":"https://api.github.com/users/runical/following{/other_user}","gists_url":"https://api.github.com/users/runical/gists{/gist_id}","starred_url":"https://api.github.com/users/runical/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runical/subscriptions","organizations_url":"https://api.github.com/users/runical/orgs","repos_url":"https://api.github.com/users/runical/repos","events_url":"https://api.github.com/users/runical/events{/privacy}","received_events_url":"https://api.github.com/users/runical/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-25T12:17:53Z","updated_at":"2016-04-25T12:39:05Z","closed_at":null,"body":"I'm having problems with 'aurbuild' (and by extension 'aursync') when building in a chroot. The built package is not moved to the pool when building in a chroot because `makechrootpkg`, via `sudo`, discards the `PKGDEST` variable passed in `aurbuild` (see [this bugreport](https://bugs.archlinux.org/task/44827?string=makechroot&project=0&search_name=&type%5B0%5D=&sev%5B0%5D=&pri%5B0%5D=&due%5B0%5D=&reported%5B0%5D=&cat%5B0%5D=&status%5B0%5D=open&percent%5B0%5D=&opened=&dev=&closed=&duedatefrom=&duedateto=&changedfrom=&changedto=&openedfrom=&openedto=&closedfrom=&closedto=) on bugs.archlinux.org).\r\n\r\nThere are three solutions to work around this (as far as I can see and read about):\r\n\r\n1. Run makechrootpkg as root via sudo: `sudo PKGDEST=$pool makechrootpkg`\r\n2. Add a rule to the sudoers file to keep the PKGDEST variable (or pass all env variables)\r\n3. Generate a new makepkg.conf file with the pkgdest\r\n\r\nSolution 2 is on the side of the user and should be documented as such if it is chosen."},"comment":{"url":"https://api.github.com/repos/AladW/aurutils/issues/comments/214297570","html_url":"https://github.com/AladW/aurutils/issues/120#issuecomment-214297570","issue_url":"https://api.github.com/repos/AladW/aurutils/issues/120","id":214297570,"user":{"login":"AladW","id":5507364,"avatar_url":"https://avatars.githubusercontent.com/u/5507364?v=3","gravatar_id":"","url":"https://api.github.com/users/AladW","html_url":"https://github.com/AladW","followers_url":"https://api.github.com/users/AladW/followers","following_url":"https://api.github.com/users/AladW/following{/other_user}","gists_url":"https://api.github.com/users/AladW/gists{/gist_id}","starred_url":"https://api.github.com/users/AladW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AladW/subscriptions","organizations_url":"https://api.github.com/users/AladW/orgs","repos_url":"https://api.github.com/users/AladW/repos","events_url":"https://api.github.com/users/AladW/events{/privacy}","received_events_url":"https://api.github.com/users/AladW/received_events","type":"User","site_admin":false},"created_at":"2016-04-25T12:39:05Z","updated_at":"2016-04-25T12:39:05Z","body":"I used to have `sudo -E` in there, but removed because I thought makechrootpkg would respect PKGDEST. Looks I was wrong, so please test 2e8767653075b01a4940185877447eb71eb6f89b."}}