[arch-projects] [devtools] [PATCH v2 1/1] arch-nspawn: ignore localhost for repository mirror

Erich Eckner arch at eckner.net
Mon Jul 23 07:20:26 UTC 2018


On 23.07.2018 09:16, Christian Hesse wrote:
> From: Christian Hesse <mail at eworm.de>
> 
> My system has a mirror configuration where only the host can access a
> local caching service on localhost. So ignore localhost urls.

I'm curious, how this can happen / why this is desirable. Shouldn't the
client be able to access the same network resources as the host?
In general, my feeling is, that it is rather desired to repair the
caching for the client than skipping it.

regards,
deep42thought

> 
> Signed-off-by: Christian Hesse <mail at eworm.de>
> ---
>  arch-nspawn.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch-nspawn.in b/arch-nspawn.in
> index b9c846e..020ed71 100644
> --- a/arch-nspawn.in
> +++ b/arch-nspawn.in
> @@ -60,7 +60,7 @@ fi
>  
>  pacconf_cmd=$(command -v pacman-conf || command -v pacconf)
>  # shellcheck disable=2016
> -host_mirror=$($pacconf_cmd --repo extra Server 2> /dev/null | head -1 | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#')
> +host_mirror=$($pacconf_cmd --repo extra Server 2> /dev/null | grep -E -v '(127\.0\.0\.1|localhost)' | head -1 | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#')
>  # shellcheck disable=2016
>  [[ $host_mirror == *file://* ]] && host_mirror_path=$(echo "$host_mirror" | sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g')
>  
> 

-------------- 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/arch-projects/attachments/20180723/dc2c261a/attachment.asc>


More information about the arch-projects mailing list