User Tools

Site Tools


addingxandrosrepos

This is an old revision of the document!


Adding Additional Software Repositories

This section of the wiki explains how to add additional sources from which to find and install new software. If you come to the Eee's Xandros Linux architecture from a Windows background, then this system might at first seem strange. However it is a very logical and precise method of sourcing and installing software.

There is a lot of information below explaining the reasons for pinning and listing of various sources (repositories) of software (packages). As long as you copy and paste the sources and preferences files carefully, and follow the advice given, you will successfully download and install many packages with ease.

A Quick Summary & Disclaimer

Disclaimer: Do everything on this page, or do none of it. If you do it all, including the pinning part, you can install most packages with safety. If you do only part of it, you risk causing problems to your EEE, possibly necessitating an f9/DVD restore.

The only sure safe repositories are those from Asus update, and some other community repos dedicated to the EeePC including xepc.org, download.tuxfamily.org/eeepcrepos, etc. However the list of main sources, and use of pinning has proven to be efficient, and safe.

The most important piece of advice is this: if you are installing a certain program and synaptic or apt-get is asking you to upgrade or remove a very long list of programs to fulfill dependencies, then you'd better stop, and consider the outcome!

Remember! You are making your system unsupportable by everyone if you add repositories from other distributions.

The Full Story

Xandros is a fork of Debian. The people at Xandros took the Debian distribution source code and recompiled it and tweaked it to suit their needs. As a result of the forking process Xandros is not considered to be completely Debian compatible. Downloading packages or adding the Debian software archives to the Xandros operating system might, eventually, break something important. The Eee version of Xandros is further modified for Asus, but it's closest blood relatives are Xandros Server 2.0 and Xandros Desktop 4.5 and are all based on Debian Etch.

All variants uses Xandros' “enhanced” KDE 3.4.2. Any repositories for Debian Etch based distributions can theoretically be used. Please be aware that the KDE libraries used in the Eee version of Xandros are specifically compiled for this version, you need to avoid KDE 3.5.X packages. Do not try to upgrade any latest KDE libraries from Xandros 4. It will break your system.

The official word from Xandros is that adding Debian repositories will break Xandros. This is true in some instances and while a package may appear to install, it does not guarantee that it will run, nor break your system. In order to add additional software to the Eee Xandros Distribution you will need to use Xandros packages and the Xandros Networks (Xandros' name for a software repository). The following forum post by Doctore, in the Xandros Support Forums, lists many repositories that you can add and download software from. However the main list suggested in this article contains the majority of packages you will ever require.

Editing the List of Sources

The following instructions will add a number of additional repositories to your machine, to enable it to get software from a greater number of sources, thus improving your choice. They have been in use for some time, and should provide a safe source of new packages, covering just about everything you will require.

1) Open /etc/apt/sources.list for editing, by running the kwrite text editor (or your preferred text editor) in the terminal (Ctl + Alt + T):

sudo kwrite /etc/apt/sources.list

In your text editor you should now see a list of repositories (starting with “deb”). Depending on your Eee model it will be one or more of the following. (This is not necessarily an all inclusive list).

# deb http://update.eeepc.asus.com/p701/ p701 main
# deb http://update.eeepc.asus.com/p900/ p900 main
# deb http://update.eeepc.asus.com/1.6/ p901 main
# deb http://update.eeepc.asus.com/1.6/ p904 main
# deb http://update.eeepc.asus.com/1.6/ p904hd main
# deb http://update.eeepc.asus.com/1.6/ p1000 main
# deb http://update.eeepc.asus.com/1.6/ p1000h main
# deb http://update.eeepc.asus.com/1.6/ p1000hd main

2) Copy (Ctl + C) and paste (Ctl-Paste) the following list of repositories (eg all of the lines in the box below starting with ”#Add the…”) into the blank area at the bottom of the file:

#Add the existing repos specific to your model below this line

# Original Asus 701 repos, do not change the reference to the 701!
deb http://update.eeepc.asus.com/p701/ p701 main
deb http://update.eeepc.asus.com/p701/en/ p701 main

Note that the three repositories that are in the 901 Xandros load by default are:

deb http://update.eeepc.asus.com/1.6/ p901 main
deb http://updage.eeepc.asus.com/1.6/ common main
deb http://update,eeepc.asus.com/1.6/ en main

# Community repos, good for conky. Do not change the reference to the 701 deb http://download.tuxfamily.org/eeepcrepos/ p701 main etch

# Xandros repos deb http://xnv4.xandros.com/xs2.0/upkg-srv2/ etch main contrib non-free deb http://xnv4.xandros.com/4.0/pkg/ xandros4.0-xn main contrib non-free

# XEPC repo, specifically compiled for the eee! deb http://updates.xepc.org/ p701 main # XEPC alternative repo, if main repo down # deb http://download.tuxfamily.org/xepcrepo/ p701 main

# Debian etch repos. deb http://archive.debian.org/debian/ etch main contrib non-free deb http://www.debian-multimedia.org/ oldstable main deb http://www.backports.org/debian etch-backports main contrib non-free

# Debian etch repos now offline #deb http://http.us.debian.org/debian/ etch main contrib non-free #deb http://ftp.us.debian.org/debian/ etch main non-free contrib # Edit the line below for your local server eg http://ftp.de or http://ftp.it etc #deb ftp://ftp.uk.debian.org/debian/ etch main contrib non-free </code> Your sources list, depending on model might now look something like the image below (taken from my 701):

this is how my 900 looks

3) Advanced use only: If you want to be able to compile software from debian source. You can also add the following list of repositories (starting with “deb-src”) into the above file:

For 701:

deb-src http://asusxntest.xandros.com/asus-source/p7xx/1.0.4/ v104 main contrib non-free
deb-src http://asusxntest.xandros.com/asus-source/p7xx/1.0.6/ v106 main contrib non-free
deb-src http://cle.linux.org.tw/EeePC/1.0.6 v106 main contrib non-free
deb-src http://wine.budgetdedicated.com/apt etch main

For 900/901 etc:

deb-src http://cle.linux.org.tw/EeePC/1.1 v1.1 main

(requires further citation) And for special ASUS EEE/Xandros repository by kost

deb-src http://ftp.linux.hr/asuseee/xandros/ source/

4) Save the sources.list file:

Ctl + S

(Or click file, then save)

5) Exit Kwrite:

Alt + F4

(or file, then exit)

Notes on the Repositories

You'll notice some of the repositories listed above have a # symbol in front of them. This makes them temporarily unavailable as a source. Many experienced Eee users choose to use this as a method of controlling the sourcing of software, instead of using the pinning method below. This is done by adding a # in front of all but the original Asus update repositories, and enabling others on a 'need to use' basis. This is a careful and judicious method of installing packages, that avoids some possible mistakes, yet keeps sources quickly available. Many other Eee users use the pinning method below. Both are acceptable and safe practice. Each time you change the sources and pinning, you need to issue

sudo apt-get update

in order for apt to see the changes. The advantage of the pinning method below, is that it is relatively maintenance free.

The repositories have 'keys' available. They are like certificates of authenticity. It is not compulsory to install them, but if you don't then apt will report warnings, (not errors), like this:

W: GPG error: http://xnv4.xandros.com etch Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A3CCB76FA8BCF0C9

You can install the keys with the following codes:

wget http://download.tuxfamily.org/eeepcrepos/key.asc && sudo apt-key add key.asc 

wget http://updates.xepc.org/dists/p701/xepc-pubkey.txt && sudo apt-key add xepc-pubkey.txt 

wget http://xnv4.xandros.com/xs2.0/pkg/pool/main/xandros/xandros-archive-keyring_1.0-3_all.deb && sudo dpkg -i xandros-archive-keyring_1.0-3_all.deb 

wget http://ftp.tw.debian.org/debian-multimedia/pool/main/d/debian-multimedia-keyring/debian-multimedia-keyring_2008.10.16_all.deb && sudo dpkg -i debian-multimedia-keyring_2008.10.16_all.deb 

wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg && sudo apt-key add 387EE263.gpg 

wget http://ftp.uk.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2007.02.19_all.deb && sudo dpkg -i debian-archive-keyring_2007.02.19_all.deb

Note: Xandros Server 2.0 is the closest to EeePC Xandros as it is the only other Xandros OS that is based on Debian Etch; however, it has a lower version of KDE than Debian Etch uses, therefore all KDE apps from the apt repo will not work.

Note: You can install “xandros-archive-keyring” using Synaptic. The repository where “xandros-archive-keyring” is found is:

http://xnv4.xandros.com/xs2.0/pkg/ xs2.0-xn main non-free

Pinning the System

When having multiple repositories it's not unusual that same package exists in more than one of those repositories, but with different version numbers. The default behaviour in an unpinned system is to install the one with the highest version number.

When mixing Xandros with repositories from other sites this is not the behaviour we want. Instead, what we want is to always install packages from Xandros repositories no matter what version they have, and only if packages do not exist in Xandros repositories or we explicitly says so shall packages be installed from other repositories.

To achieve this we pin our system by adding the lines below to /etc/apt/preferences (if a file called preferences does not exist, the following will create it). You do NOT need to edit anything, the asterisk is not asking you to provide any info. All you have to do is copy the code below in its entirety.

1) Open a terminal (Ctl + Alt + T) and issue the command:

sudo kwrite /etc/apt/preferences

2) Copy and paste the following into kwrite:

Package: *
Pin: origin update.eeepc.asus.com
Pin-Priority: 950

Package: *
Pin: origin updates.xepc.org
Pin-Priority: 935

Package: *
Pin: origin
Pin-Priority: 925

Package: *
Pin: origin download.tuxfamily.org
Pin-Priority: 900

Package: *
Pin: origin xnv4.xandros.com
Pin-Priority: 850

Package: *
Pin: release a=stable
Pin-Priority: 700

Package: *
Pin: release a=testing
Pin-Priority: 650

Package: *
Pin: release a=unstable
Pin-Priority: 600
Package: *

3) Save the sources.list file:

Ctl + S

(Or click file, then save)

4) Exit Kwrite:

Alt + F4

(or file, then exit)

Very Important! Now complete the procedure updating the packet manager with :

sudo apt-get update

You are now ready to install a huge range of packages from a number of different sources, in a safe and efficient manner! If you didn't install the keys you will get W warnings. (Errors are denoted by E) If you get errors like: E: Invalid record… or E: Can't stat…, then check you have copied and pasted the code correctly!

Notes on Pinning

Pinning gives various sources different priorities. Sources are recognized by their release information (requires a release file), origin or version number. In the above example we only use origin and release archive (release a=xxx) as identifiers.

This is what the pinning above does:

  • First entry is to give the Asus Eee PC repositories priority to protect important base system packages.
  • Second gives xepc priority, dedicated eee packages
  • Third entry gives local repositories (CD, HD, USB memory etc.) the next highest priority (925). Those are recognized as being from an unknown origin (an empty string). It is possible to assign local repositories their own release files, which pinning can be based on. But that is out of scope for this discussion and not really necessary
  • Fourth gives tuxfamily priority, dedicated eee packages
  • Fifth entry gives Xandros supported and unsupported sites priority (850). Those are pinned on the origin rather than release archive since Xandros does not provide proper release files.
  • The remaining entries are for download from Debian.
  • Repositories not mentioned will have priority 500.
  • Repositories with release archive name APT::Default-Release will have priority 990. We don't use this. We will however later on show how one can temporary assign an APT::Default-Release to a system to override the pinning.

If you add Xandros, Debian plus some local repositories you can use apt-cache policy to see the priority order.

Additional Available Repos

The following repos either have specific uses, or are less used or more specialised. They are included for completeness, but aren't included in the main list.

deb http://ftp.linux.hr/asuseee/xandros/ binary/

Also http://www.archlug.org/apt/ looks to be online again. This repo has been offline recently, but is back up and can be added to the sources list if specifically required. Use with caution.

#archlug was offline for a while!
deb http://www.archlug.org/apt xandros4 archlug
deb http://www.archlug.org/apt xandros4 redrum
deb http://www.archlug.org/apt xandros4 xorid/andrew
deb http://www.archlug.org/apt xandros4 xorid/matty
deb http://www.archlug.org/apt xandros4 xorid/uploads

Wine etch installs are available from

deb http://wine.budgetdedicated.com/apt/ etch main
deb http://www.lamaresh.net/apt/ etch main

There is no real reason to use the available 1.0.1 to 1.1.15, as they are no better than the xepc stable version, or the 1.1.21 beta compile

Opera also has an etch repo, which can be added to install the Opera browser.

deb http://deb.opera.com/opera/ etch non-free

Note that opera also adds an entry in /etc/apt/sources.list.d so that it may update itself. To be extra safe you can change this from stable to etch too!

As more repos go offline as the Xandros etch install becomes more outdated, you can vreate a local repo for packages you might need again.

  1. Copy your debian packages to a folder
    /home/user/deb/repo
  2. Generate a Packages.gz file:
    dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
  3. Add the new repo to your sources.list
    sudo kwrite /etc/apt/sources.list
  4. Add the following line to the sources:
    #Personal repository
    deb file:/home/user/deb/repo /
  5. Then reload the package index with this:
    sudo apt-get update

That’s it! A local (or LAN accessible) repository that will help you maintain your systems without having to lose all your bandwith to updates.

Notes About apt on the Eee

The main debian repo in the suggested list above is still commented out. The local ftp server has most required packages. Sudo apt-get update produced MMap ran out of memory errors since Debian lenny became stable as of 14/02/09. Testing proved that apt on the eee had too small a cache for all these repos to be active at once. Eeeforum user HolgerGehrke posted this fix, should you need them all enabled at the same time.

The problem is that apt has a (rather low) limit for the size of the package list cache file in '/var/cache/apt/pkgcache.bin'. On xandros there is by default no /etc/apt/apt.conf. Creating one:

sudo kwrite /etc/apt/apt.conf

and paste in:

    APT
    {
      Cache-Limit "20000000"
    }

then save & exit, should fix the problem.

Advice for Installing Packages

Before installing a new package use

apt-cache policy xxxx

where xxxx is the name of your package. It will tell you where your package will be sourced from. Also try simulating an installation first to avoid mistakes. Anything that suggests removing multiple packages needs to be approached with caution. Try running a dummy installation of the package first. apt will simulate an install, without changing your system. Use the command:

sudo apt-get -s install xxxx 

where xxxx is the name of your package. To overide pinning and take a specific version add the version required using = eg:

 sudo apt-get install mplayer=1.0~rc1-12etch1

The above example demonstrates how to downgrade mplayer to the version with more codecs, as provided by pimpmyeee.

You can use:

sudo apt-cache depends xxxx

where xxxx is the name of your package, to see what dependencies a package has.

(The section below is from the original wiki edit, left as is).

Overiding Pinning

Imagine we want to download firestarter firewall. Xandros repositories has version 0.9.3 while Debian has version 1.0.1. With the pinning in previous chapter, if we execute

apt-get install firestarter

version 0.9.3 will be installed. If we instead wanted to download the Debian version we had to execute the command below instead.

apt-get install firestarter/testing

This tells the APT system that firestarter shall be downloaded from the source with the release archive name testing and therby override the pinning for that particular package. Any libraries firestarter depends on will still be downloaded from Xandros repositories. If firestarter depends on versions of libraries not present in Xandros, installation will fail.

The solution to this is to execute following command instead:

 apt-get -t testing install firestarter

This tells the APT system to change our APT::Default-Release temporary to testing and thereby giving Debian testing repository priority 990. With the pinning in previous chapter this means firestarter and all its libraries will be downloaded from the Debian repository instead of Xandros.

Pinning gives specific repositories priority so that a package available from Xandros will never be overwritten by a Debian package, even if the Debian package is newer. This is especially important for libraries. Say you have official Asus package A using official Asus lib B. You install Debian package C which requires the same library of higher version number B1. You apt-get install and B gets overwritten with B1. Now you launch program A which uses library B but library B is now different and say the developers dropped support for something. A problem like this could even happen just by adding mixed repositories and doing an apt-get upgrade.

My suggestion is that you set up your repositories with official Asus at highest priority and Xandros desktop 4 at second. if you absolutely need something not available add Debian etch as 3rd priority, but beware there is still some risk.

RECOVERING FROM AN 'OOPS'

Occasionally you may find that despite your best intention and careful planning, and the use of pinning, you install a version of a package that breaks your system. One likely one: upgrading your version of kdebase-data from the version in the Asus repository (3.4.2.201 as of Nov 21, 2007) to a newer version available in the Debian repository (3.5.5 as of the same date) will cause the Control Centre to stop functioning correctly. In Easy Mode, you'll find that your Date & Time configurator in the Settings tab no longer works (and you'll get an error if you invoke it from a Terminal as 'kcmshell clock'), neither does your Network configurator in the Internet Tab (though Wireless Networks still works), nor Mozilla Thunderbird (which appears as Mail in the Work tab), that Control Centre has no modules to control (open it with 'kcontrol' in a Terminl in Easy Mode, or by running the Control Centre app in Advanced Mode), and that you can no longer open a Terminal window by pressing Ctrl-Alt-T… and there may be other effects as well. What you need to do in this case is downgrade your package.

  • Open File Manager and navigate to /var/cache/apt/archives. This is where all the downloaded packages are stored as .deb files (and where you should store any stray .deb files that you install on your system).
  • Scan the list of packages and look to see which versions are most common, particularly for anything related to KDE. For example, notice that many of the KDE-related packages have version 3.4.2. For confirmation, locate the Asus repository in the list above and visit that repository with your web browser. Again, look for typical version numbers.
  • Identify the offending package by noting that it has a different version number, or by its effects. In the case of a package like kcontrol, we've already seen that the wrong version can have a whole host of negative effects.
  • Determine which version you should downgrade to. One simple way to do this is to find out the history of which versions of the package have been installed on your system. To do this, open a Terminal and type:
 apt-cache policy <package-name>
  • Now downgrade the package by explicitly installing a lower version number, which you specify by adding an = after the package name and then the version number desired. For example:
 sudo apt-get install kdebase-data=4:3.4.2.201-1
  • If that worked, count yourself lucky. If it didn't fix all your problems, go looking for other packages to downgrade. Worst-case scenario: simply restore the base Asus installation.
  • In the future, never just blindly 'apt-get install <package-name>. Always take the precaution of doing a dry-run to see what will happen in the installation; do this by adding the -s argument after the apt-get:
 sudo apt-get -s install <package-name>

This will tell you what files are about to be replaced.

  • Be very suspicious any time you go to install one package and you see that 43 are to be removed, and 27 are to be installed.

INFORMATION SOURCES

addingxandrosrepos.1347660754.txt.gz · Last modified: 2012/09/14 22:12 by bl00