Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #182185

apt-cacher-ng related program and package suggestion

From "tuxderlinuxfuchs77@gmail.com" <tuxderlinuxfuchs77@gmail.com>
Newsgroups linux.debian.user
Subject apt-cacher-ng related program and package suggestion
Date 2017-06-14 22:00 +0200
Message-ID <tSmCl-X4-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hello,

I have a suggestion for a client program/package in combination with
apt-cacher-ng

Consider following situation:

User U_A has a laptop which he uses at home and at university

He has a poor internet connection in both places.

So he set up apt-cacher-ng services in both places but they are on
different networks (he does not have permission to change the network
settings at university to make the IP addresses of the apt-cacher-ng
servers math)

Lets say at home the server HOST_1 is http://192.168.1.100:3142
At university: server: HOST_2: http://192.168.76.56:3142

He uses Ubuntu (so this should work for Debian in a similar way).

He makes a backup "/etc/apt/sources.list.bak" of /etc/apt/sources.list

At university he sets up the cache repo as follows (after overwriting
the /etc/apt/sources.list with a copy of the backup if it was changed to
use the home apt-cacher-ng)

sed -i 's/de.archive.ubuntu.com/192.168.76.56:3142/g' /etc/apt/sources.list

The same procedure at home.

The shown way is not very comfortable.

1. it is annoying having to remember IP addresses
2. sed command is error prone (consider typos, etc.)
3. copying around backup files is time consuming having to type in all
the paths
4. typing in sed command or searching it in bash history for re-using is
time consuming, too.

What I would like is to setup all cachers one use a program (lets call
it apt-cacher-switch for now)

apt-cacher-switch add <Host1_Name> <http://<IP1>:<PORT1>>
apt-cacher-switch add <Host2_Name> <http://<IP2>:<PORT2>>

Then at university:
apt-cacher-switch enable <Host1_Name>

At home:
apt-cacher-switch enable <Host2_Name>

In an environment where no cacher is on the network
apt-cacher-switch disable

The apt-cacher switch should manage creating and copying around the
required /etc/apt/sources.list files.

As I am not very talented in C/C++ programming under Linux, I am asking
the community to make it happen.
I would be very happy if this could be implemented and the package be
added to the official Debian and Ubuntu (and other derivates') repositories.

Best regards

Chris


Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

apt-cacher-ng related program and package suggestion "tuxderlinuxfuchs77@gmail.com" <tuxderlinuxfuchs77@gmail.com> - 2017-06-14 22:00 +0200
  Re: apt-cacher-ng related program and package suggestion Andy Smith <andy@strugglers.net> - 2017-06-15 05:00 +0200
    Re: apt-cacher-ng related program and package suggestion Yvan Masson <yvan.masson@openmailbox.org> - 2017-06-15 08:50 +0200
      Re: apt-cacher-ng related program and package suggestion Yvan Masson <yvan.masson@openmailbox.org> - 2017-06-16 09:40 +0200
  Re: apt-cacher-ng related program and package suggestion Dan Ritter <dsr@randomstring.org> - 2017-06-15 16:20 +0200
    Re: apt-cacher-ng related program and package suggestion Darac Marjal <mailinglist@darac.org.uk> - 2017-06-15 16:30 +0200
    Re: apt-cacher-ng related program and package suggestion David Wright <deblis@lionunicorn.co.uk> - 2017-06-15 16:40 +0200
      Re: apt-cacher-ng related program and package suggestion "tuxderlinuxfuchs77@gmail.com" <tuxderlinuxfuchs77@gmail.com> - 2017-06-15 16:50 +0200
        Re: apt-cacher-ng related program and package suggestion David Wright <deblis@lionunicorn.co.uk> - 2017-06-15 19:00 +0200
    Re: apt-cacher-ng related program and package suggestion Bob Weber <bobrweber@gmail.com> - 2017-06-15 16:50 +0200
      Re: apt-cacher-ng related program and package suggestion Dan Ritter <dsr@randomstring.org> - 2017-06-16 17:50 +0200
  Re: apt-cacher-ng related program and package suggestion Eduard Bloch <edi@gmx.de> - 2017-06-16 17:40 +0200

csiph-web