[Dev] [PATCH] fix for regression in libremakepkg if SRCDEST is set in /etc/makepkg.conf

Andreas Grapentin andreas at grapentin.org
Tue Jun 25 07:55:16 GMT 2019


Since nobody cared to raise any issues with the patch below, I've
commited it and rebuilt libretools below.

-oak


On Thu, Jun 06, 2019 at 07:17:54PM +0200, Andreas Grapentin wrote:
> 
> libretools-20181004-4 has introduced a regression in libremakepkg where
> setting the SRCDEST variable in /etc/makepkg.conf will result in the
> package sources not being available when the build enters the chroot:
> 
> example from icecat:
> 
>   [...]
>   |  ==> Retrieving sources...
>   |    -> Downloading icecat-60.3.0-gnu1.tar.bz2...
>   |    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>   |                                   Dload  Upload   Total   Spent    Left  Speed
>   |    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Transient problem: timeout Will retry in 3 seconds. 3 retries left.
>   |    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Transient problem: timeout Will retry in 3 seconds. 2 retries left.
>   |    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Transient problem: timeout Will retry in 3 seconds. 1 retries left.
>   |    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: ftp.gnu.org
>   |  ==> ERROR: Failure while downloading http://ftp.gnu.org/gnu/gnuzilla/60.3.0/icecat-60.3.0-gnu1.tar.bz2
>   [...]
> 
> this behaviour is caused by the current version of the patch:
> 0001-libremakepkg-fix-building-packages-requring-a-rw-sta.patch
> to restore the functionality of libremakepkg in environments where
> SRCDEST is set, I propose the following changeset instead:
> 
> --- a/src/chroot-tools/libremakepkg
> +++ b/src/chroot-tools/libremakepkg
> @@ -124,11 +124,11 @@ build() (
>         local run_ynet=()
>         local run_nnet=()
>         if $INCHROOT; then
> -               local _run=(sh -c "mount --bind -o ro -- ${startdir at Q} ${startdir at Q} && cd ${startdir at Q} && \$@" --)
> +               local _run=(sh -c "cd ${startdir at Q} && \$@" --)
>                 run_ynet=(unshare --mount       -- "${_run[@]}")
>                 run_nnet=(unshare --mount --net -- "${_run[@]}")
>         else
> -               librechroot_flags+=(-r "$startdir:/startdir")
> +               librechroot_flags+=(-w "$startdir:/startdir")
>                 run_ynet=(librechroot "${librechroot_flags[@]}"    run)
>                 run_nnet=(librechroot "${librechroot_flags[@]}" -N run)
>         fi
> 
> I also feel like we should not maintain that change as a patch, but
> instead integrate them into libretools once we have reached consensus on
> whether we want a writable startdir or not. I don't remember that thread
> having reached consensus yet.
> 
> Best,
> Andreas
> 
> ~oaken-source
> 
> -- 
> 
> ------------------------------------------------------------------------------
> my GPG Public Key:                 https://files.grapentin.org/.gpg/public.key
> ------------------------------------------------------------------------------



> _______________________________________________
> Dev mailing list
> Dev at lists.parabola.nu
> https://lists.parabola.nu/mailman/listinfo/dev


-- 

------------------------------------------------------------------------------
my GPG Public Key:                 https://files.grapentin.org/.gpg/public.key
------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <https://lists.parabola.nu/pipermail/dev/attachments/20190625/48da3b1a/attachment.sig>


More information about the Dev mailing list