Remove magic-proxy and all references to it as it is not used by any builds of any release newer than 18.04.

ubuntu-core-desktop-noble
Michael Hudson-Doyle 11 months ago
parent 37d450ca57
commit ffe99d4008

7
debian/changelog vendored

@ -1,3 +1,10 @@
livecd-rootfs (24.04.23) UNRELEASED; urgency=medium
* Remove magic-proxy and all references to it as it is not used by any
builds of any release newer than 18.04.
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Thu, 25 Jan 2024 07:30:03 +1300
livecd-rootfs (24.04.22) noble; urgency=medium livecd-rootfs (24.04.22) noble; urgency=medium
* Add a largemem subarch for ubuntu-server that ships a 64k kernel variant * Add a largemem subarch for ubuntu-server that ships a 64k kernel variant

2
debian/install vendored

@ -2,7 +2,5 @@ auto-markable-pkgs usr/share/livecd-rootfs
live-build usr/share/livecd-rootfs live-build usr/share/livecd-rootfs
get-ppa-fingerprint usr/share/livecd-rootfs get-ppa-fingerprint usr/share/livecd-rootfs
minimize-manual usr/share/livecd-rootfs minimize-manual usr/share/livecd-rootfs
magic-proxy usr/share/livecd-rootfs
lp-in-release usr/share/livecd-rootfs
checkout-translations-branch usr/share/livecd-rootfs checkout-translations-branch usr/share/livecd-rootfs
update-source-catalog usr/share/livecd-rootfs update-source-catalog usr/share/livecd-rootfs

@ -17,72 +17,6 @@ fi
. config/functions . config/functions
# New nf_tables-based versions of iptables don't work well on old kernels.
# We aren't sure exactly how old is a problem: 4.15 works, but with 4.4 new
# rules are added to all chains in the requested table rather than just one,
# and the new rules seem to have no useful effect. In such cases,
# iptables-legacy works better.
#
# We can simplify this once livecd-rootfs no longer needs to support running
# on Ubuntu 16.04 (that is, once Launchpad's build VMs are upgraded to
# Ubuntu 18.04).
run_iptables () {
local kver kver_major kver_minor
kver="$(uname -r)"
kver="${kver%%-*}"
kver_major="${kver%%.*}"
kver="${kver#*.}"
kver_minor="${kver%%.*}"
# LP: #1917920
# I'm seeing issues after iptables got upgraded from 1.8.5 to
# 1.8.7 Somehow installing our nat rule doesn't get activated, and
# no networking is happening at all.
# But somehow calling both iptables -S makes things start working.
# Maybe no default chains are installed in our network namespace?!
# Or 1.8.7 is somehow broken?
iptables -v -t nat -S
iptables-legacy -v -t nat -S
if [ "$kver_major" -lt 4 ] || \
([ "$kver_major" = 4 ] && [ "$kver_minor" -lt 15 ]); then
iptables-legacy "$@"
else
iptables "$@"
fi
}
if [ -n "$REPO_SNAPSHOT_STAMP" ]; then
if [ "`whoami`" != "root" ]; then
echo "Magic repo snapshots only work when running as root." >&2
exit 1
fi
apt-get -qyy install iptables
# Redirect all outgoing traffic to port 80 to proxy instead.
run_iptables -v -t nat -A OUTPUT -p tcp --dport 80 \
-m owner ! --uid-owner daemon -j REDIRECT --to 8080
# Run proxy as "daemon" to avoid infinite loop.
LB_PARENT_MIRROR_BOOTSTRAP=$LB_PARENT_MIRROR_BOOTSTRAP \
/usr/share/livecd-rootfs/magic-proxy \
--address="127.0.0.1" \
--port=8080 \
--run-as=daemon \
--cutoff-time="$REPO_SNAPSHOT_STAMP" \
--log-file=/build/livecd.magic-proxy.log \
--pid-file=config/magic-proxy.pid \
--background \
--setsid
# Quick check that magic proxy & iptables chains are working
timeout 3m apt-get update
fi
# Link output files somewhere launchpad-buildd will be able to find them. # Link output files somewhere launchpad-buildd will be able to find them.
PREFIX="livecd.$PROJECT${SUBARCH:+-$SUBARCH}" PREFIX="livecd.$PROJECT${SUBARCH:+-$SUBARCH}"
@ -546,12 +480,6 @@ EOF
if [ -e binary.success ]; then if [ -e binary.success ]; then
rm -f binary.success rm -f binary.success
else else
# Dump the magic-proxy log to stdout on failure to aid debugging
if [ -f /build/livecd.magic-proxy.log ] ; then
echo "================= Magic proxy log (start) ================="
cat /build/livecd.magic-proxy.log
echo "================== Magic proxy log (end) =================="
fi
exit 1 exit 1
fi fi
@ -712,15 +640,6 @@ case $SUBARCH in
;; ;;
esac esac
if [ -f "config/magic-proxy.pid" ]; then
kill -TERM $(cat config/magic-proxy.pid)
rm -f config/magic-proxy.pid
# Remove previously-inserted iptables rule.
run_iptables -t nat -D OUTPUT -p tcp --dport 80 \
-m owner ! --uid-owner daemon -j REDIRECT --to 8080
fi
case $PROJECT in case $PROJECT in
ubuntu-cpc) ubuntu-cpc)
config/hooks.d/remove-implicit-artifacts config/hooks.d/remove-implicit-artifacts

@ -237,14 +237,10 @@ class MakeHooks:
""" """
with open(os.path.join(self._script_dir, "explicit_provides"), "w", with open(os.path.join(self._script_dir, "explicit_provides"), "w",
encoding="utf-8") as fp: encoding="utf-8") as fp:
empty = True
for provides in self._provides: for provides in self._provides:
if not self._quiet: if not self._quiet:
print("[PROVIDES] %s" % provides) print("[PROVIDES] %s" % provides)
fp.write("%s\n" % provides) fp.write("%s\n" % provides)
empty = False
if not empty:
fp.write('livecd.magic-proxy.log\n')
def cli(self, args): def cli(self, args):
"""Command line interface to the hooks generator.""" """Command line interface to the hooks generator."""

@ -1 +0,0 @@
magic-proxy

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save