[pacman-dev] Setting HOME in build() breaks package signing
brainpower
brainpower at mailbox.org
Thu May 7 20:47:36 UTC 2020
Am 05.05.20 um 22:40 schrieb Eli Schwartz:
> On 5/5/20 4:11 PM, brainpower wrote:
> [...]
>
>> This made me wonder:
>> Is this something makepkg should take care of (e.g.by restoring $HOME after build() or ensuring gpg will use $OLDHOME/.gnupg)
>> or should such a PKGBUILD be considered broken / invalid?
>
> [...]
>
>> $ cat PKGBUILD
>> pkgname=broken-home
>> pkgver=1
>> pkgrel=1
>> arch=('any')
>>
>> build() {
>> export HOME="${srcdir}/tmphome"
>> }
> I would argue this should probably be a 'local' variable. e.g.
>
> build() {
> local HOME="${srcdir}/tmphome"
> some-command-that-needs-fakehome
> }
>
> Since HOME is previously marked as exportable, it is still getting
> exported, and modifying an exported variable causes the changes to be
> picked up.
This part I actually knew!
> And the 'local' attribute coexists with the exported attribute:
But this I did not.
Thanks for your answer!
--
regards,
brainpower
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20200507/fe1af6e6/attachment.sig>
More information about the pacman-dev
mailing list