2

How can I add an unlisted repository to my Software Sources via its (http/ftp)://... URL?

I am not referring to a single entry in the /etc/apt/sources.list.
The URL I am referring to points to a full-and-complete repository (security updates main restricted universe mutliverse).

I know about manually editing /etc/apt/sources.list, but that is a general pain compared to just adding the repository's URL into Software Sources (if it is possible).

Is the Software Sources server-list dynamically downloaded from Canonical, and/or is it somewhere on my file-system? ... and would it work if I just add my URL to this list, and then choose it via the normal Software Sourced dialog?

There doesn't seem to be an "Add" option in the "Ubuntu Software" tab of Software Sorces. I can only find the "Other" option, which allows me to choose an alread listed server.

*UPDATE*
I've just found a tool called apt-mirror which allows the building of a local mirror, so I assume that there must be a way to use this new mirror, and that it grafts into the normal apt-get/aptitude/Synaptic system.. My "new" mirror is my ISP's not-fully-public Linux mirror, and I assume it can be grafted in, too.. Am I on the right train with this line of thought?

1
  • If you are really brave, use find and replace on the list.
    – mckenzm
    Apr 28, 2021 at 1:13

2 Answers 2

2

In the Software-Sources pane, there are two tabs: "Software from Ubuntu" and "other software". If you

  • deactivate all of the check boxes for the Ubuntu repositories

and

  • add your repository to the "Other Software" sources list

It will all work as you plan. Assuming of course, your replacement repository is up to scratch and doesn't have any inconsistencies and so on. Make sure your repository's sane!

The Add option you are referring to is in the software centre → edit → Software Sources → Other Software → Add

(The labels could be a bit off, since I'm looking them up on my localised installation)

Note: After you've done this, the software centre will no longer look as it does now. It will contain all of the Programs in an entry just below the "Provided by Ubuntu" label, which is activated by default. So User Experience will suffer somewhat. If you plan to do this for other users, which will regularly install random applications, it will be slightly awkward. But since Search will work as it did before, it's not a big issue.

Update: Are you sure your ISP is providing an Ubuntu 10.10 Repository? If so, maybe apt is already automatically choosing it for you. From what I remember, apt will at some point try to locate the fastest mirror for you.[1] If you're just trying to gain some speed, maybe this is what we programmers call "premature optimisation", a mistake. Is your current access to the repository particularly slow?

[1]: To do it manually, open the Software Sources dialogue, locate the drop down box "Download from" (should say something like "Servers for Australia"), click on "Others" and then click the button that says "Locate fastest server".

4
  • 1
    Thanks for the answer. The ISP is large, fast, reputable and is pro-Linux (at heart).. One reason I want to use them is because their mirror is unmetered to their clients (me).. not that it matters that much, as I rarely get close to my monthly GB limit.. I've done it manually via /etc/apt/sources.list, but main reason I want to do this is because I learn a lot from it... I've had a quick look at your method and it seems to be close to the mark, and is very useful info, but perhaps I'm chasing something that doesn't exist (or understand well enough). I'll have a look at it again in the morning
    – Peter.O
    Oct 27, 2010 at 11:39
  • ..(a bit more; following on from the previous comment).... I'm looking for a way which only requires that I enter the single MAIN URI to their ftp folder... just like what appears in the Download From list in the Ubuntu Sources tab... Your method seems to avoid the manual sources.list method, but still requires the same number of deb "lines"... but I look at it again tomorrow...
    – Peter.O
    Oct 27, 2010 at 11:46
  • I've had another look at it... It still looks to me like the "Other Software" method is not what I was after... but in looking so critically at all this, and with exposure to various "sources.list" files (by choosing different mirrors), I've come to realize that modifying "source.list" is not as complicated as it first seemed... actually it is pretty straight forward :)... There may some way to do it via a single URL, but I think you were right on target: "premature optimisation"... The "sources.list" is the way to go for my situation (now that I understand it better)... Thanks
    – Peter.O
    Oct 27, 2010 at 21:35
  • this doesn't work if you want to do a dist-upgrade since it will want to replace the mirrors and will refuse to do it with anything but one from the official list
    – Spudd86
    Apr 28, 2011 at 14:41
1

You can add your ISP's local mirror to the list in /usr/share/python-apt/templates/Ubuntu.mirrors in order to make it available in the mirror list under "Other Sources".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .