Merge remote-tracking branch 'origin/pr/254'
* origin/pr/254: archlinux: improve pacman proxy implementation
This commit is contained in:
commit
0fd872f717
@ -119,21 +119,26 @@ fi
|
|||||||
# Pacman (archlinux) also
|
# Pacman (archlinux) also
|
||||||
if [ -d /etc/pacman.d ]; then
|
if [ -d /etc/pacman.d ]; then
|
||||||
if [ -n "$PROXY_ADDR" ]; then
|
if [ -n "$PROXY_ADDR" ]; then
|
||||||
cat > /etc/pacman.d/01-qubes-proxy.conf <<EOF
|
mkdir -p /run/qubes/bin
|
||||||
|
cat > /run/qubes/bin/pacman <<EOF
|
||||||
|
#!/bin/bash
|
||||||
### This file is automatically generated by Qubes ($0 script).
|
### This file is automatically generated by Qubes ($0 script).
|
||||||
### All modifications here will be lost.
|
### All modifications here will be lost.
|
||||||
### If you want to override some of this settings, create another file under
|
exec env ALL_PROXY=$PROXY_ADDR /usr/bin/pacman "\$@"
|
||||||
### /etc/pacman.d
|
EOF
|
||||||
|
chmod +x /run/qubes/bin/pacman
|
||||||
[options]
|
cat > /etc/profile.d/qubes-proxy.sh << EOF
|
||||||
# Use Qubes Update Proxy
|
### This file is automatically generated by Qubes ($0 script).
|
||||||
XferCommand = /usr/bin/env ALL_PROXY=$PROXY_ADDR /usr/bin/curl -C - -f -o %o %u
|
### All modifications here will be lost.
|
||||||
|
export PATH=/run/qubes/bin:\$PATH
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
rm -r /etc/pacman.d/01-qubes-proxy.conf
|
rm -f /run/qubes/bin/pacman
|
||||||
|
rm -f /etc/profile.d/qubes-proxy.sh
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# DNF configuration doesn't support including other files
|
# DNF configuration doesn't support including other files
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1352234
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1352234
|
||||||
if [ -e /etc/dnf/dnf.conf ]; then
|
if [ -e /etc/dnf/dnf.conf ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user