You are not logged in.

#1 2019-04-16 14:54

jotapesse
Member
From: Algarve, Portugal
Registered: 2019-03-23
Posts: 38

How to: Add Debian's "testing", "unstable/sid" & "experimental" repos

How to: Add/use Debian's "testing", "unstable/sid" & "experimental" repositories to a "stable" Q4OS 2.x "Scorpion" system.

(Or any other Debian based system given the specific changes where applicable.)
revision 1.0, date 2019-04-16, original publishing

1. Disclaimer/Warning (!): This is an advanced setup for advanced users. Mixing Debian's "stable" with "testing", "unstable/sid" and "experimental" repositories may lead to an unusable/broken system. Use this procedure at your own risk and be prepared to deal with issues or a broken system. Not recommended for stable/production systems/setups. No support is given and no one is liable for your own risk. You are the sole responsible for the changes you make on your systems. You are warned! A reasonable amount of effort was put in writing this tutorial as comprehensive and error free as possible but errors or inconsistencies may be present. If you find any error or inconsistency please reply to this post and I'll do my best to update and correct it. Thank you.

2. Context: Although Debian's "stable" + "backports" repositories provides reasonable updated packages/software/drivers, at times or for specific hardware/software setup/configs one may require newer versions not available on "stable". These newer versions of packages/software/drivers are first introduced to Debian's "experimental", "unstable/sid" and then "testing" repositories. Only when considered "stable" they are released as "stable" release/repository.

3. Considerations: If you know what you're doing, a reasonable near-stable system can be achieved by taking great care of what non-stable packages are added/upgraded to a stable system. Use this procedure to be able access and install only specific packages/software/drivers versions while maintaining a "stable" base/core packages on your system. If you do not know what you're doing don't do it. Having said that, I enjoy being able to upgrade and use newer versions of specific software/drivers on my system. The following procedure strives to keep the Q4OS system as stable as possible while giving you access to updated/upgraded versions of packages at your own discretion. Verify that all steps are properly implemented in the given sequence.

4. Prepare for changes:
For this purpose we'll change the default setup of Q4OS APT sources.list and preferences where needed. I also prefer to use HTTPS for Debian's secure APT transport updates and the Debian's deb.debian.org fast server automatic select service, so the following procedure uses those options. Start with a fully updated/upgraded system. The following packages are required for proper setup, use the commands:

$ sudo apt update
$ sudo apt full-upgrade
$ sudo apt install curl wget apt-transport-https dirmngr

5. Setup Debian's stable "backports, "testing", "unstable/sid" & "experimental" repositories sources list files:
Any of the following sub-steps are optional. You may choose to implement one, some or all of them, depending of the access to Debian's repositories you want to have on your system. If for example you only want to activate "backports" repository just do sub-step (5.1.) and skip the rest sub-steps. For full access implement all the steps accordingly.

   5.1. Edit and change the existing file: /etc/apt/sources.list.d/30_debian_backports.list
Activate the Debian stable "backports" repository file with the following changes:

# Q4OS essential repository
# **** !!! NEVER touch this CRITICAL system file **** !!!

# stretch-backports, previously on backports.debian.org
deb https://deb.debian.org/debian/ stretch-backports main contrib non-free
##deb-src https://deb.debian.org/debian/ stretch-backports main contrib non-free

   5.2. Create and edit the file: /etc/apt/sources.list.d/40_debian_testing.list
Add the Debian "testing" repositories file with the following:

# Debian testing/buster
deb https://deb.debian.org/debian/ testing main contrib non-free
##deb-src https://deb.debian.org/debian/ testing main contrib non-free

# Debian testing/buster Security
deb https://deb.debian.org/debian-security/ testing/updates main contrib non-free
##deb-src https://deb.debian.org/debian-security/ testing/updates main contrib non-free

# Debian testing/buster Updates
deb https://deb.debian.org/debian/ testing-updates main contrib non-free
##deb-src https://deb.debian.org/debian/ testing-updates main contrib non-free

   5.3. Create and edit the file: /etc/apt/sources.list.d/50_debian_unstable.list
Add the Debian "unstable/sid" repository file with the following:

# Debian unstable/sid
deb https://deb.debian.org/debian/ unstable main contrib non-free
##deb-src https://deb.debian.org/debian/ unstable main contrib non-free

   5.4. Create and edit the file: /etc/apt/sources.list.d/60_debian_experimental.list
Add the Debian "experimental" repository file with the following:

# Debian experimental
deb https://deb.debian.org/debian/ experimental main contrib non-free
##deb-src https://deb.debian.org/debian/ experimental main contrib non-free

6. Setup Debian's APT policy and package pinning/preferences:
This step is of great importance! This is what will keep your system stable at all times, unless you, at your discretion, install anything from the non-stable repositories. Also remember to setup the following package pinning accordingly to the (5.) sub-steps implemented (all or partial repositories and their respective package pinning). If, for example, you only activated "backports" repository then skip the following (6.1.).

   6.1. Create and edit the following to the file: /etc/apt/preferences.d/debian

# Debian packages pinning

Package: *
Pin: release o=Debian,a=stable,n=stretch
Pin-Priority: 500

Package: *
Pin: release o=Debian,a=testing,n=buster
Pin-Priority: 90

Package: *
Pin: release o=Debian,a=unstable,n=sid
Pin-Priority: 80

No need to specifiy package pinning for "backports" repository, it defaults to "100" package pin-priority. Also no need for "experimental" repository, by default it has a package pin-priority of "1".

   6.2. Verify that the above package pinning pin-priority policy is in place:
These changes should result in the following global pin-priority policy, no changes were made to Q4OS packages pin-priority pinning. Again, take in consideration what repositories and package pinning you added in the (5.) and (6.1.) steps:

  • 501 (default): Q4OS packages/repositories, highest priority to install/upgrade;

  • 500 (default): Debian "stable" and all other 3rd party packages/repositories: will install/upgrade by default;

  • 100 (default): Debian stable "backports" (won't install/upgrade by default) and current release/system installed packages;

  • 90: all packages from Debian "testing" repositories, won't install/upgrade by default;

  • 80: all packages from Debian "unstable/sid" repository, won't install/upgrade by default;

  • 1: all packages from Debian "experimental" repository, won't install/upgrade by default;

To verify, lets update the APT sources and check it's policy with the commands:

$ sudo apt update
$ apt policy

You shouldn't get any errors updating the APT sources list, if you do you must verify that step (5.) was properly implemented. Redo it if necessary and try again. APT policy should return the pin-priority values as listed above. Do not advance if APT policy returns different values! Verify step (6.) and correct it first.

7. Done! Your system should now be able to install selected packages from the added repositories:

   7.1. Update and upgrade, no upgrades from the added repositories should be proposed:

$ sudo apt update
$ sudo apt full-upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

   7.2. Check versions available for a specific package:
Let's find, for example, what versions of libreoffice package are available, at the time of this writing I got (your results may be different when you read this):

$ apt policy libreoffice
libreoffice:
  Installed: 1:6.1.3-1~bpo9+2
  Candidate: 1:6.1.3-1~bpo9+2
  Version table:
     1:6.2.3~rc1-1 1
          1 https://deb.debian.org/debian experimental/main amd64 Packages
     1:6.1.5-3 90
         90 https://deb.debian.org/debian testing/main amd64 Packages
         80 https://deb.debian.org/debian unstable/main amd64 Packages
     1:6.1.5-1~rc1-2~bpo9+1 100
        100 https://deb.debian.org/debian stretch-backports/main amd64 Packages
 *** 1:6.1.3-1~bpo9+2 500
        500 http://q4os.org/qextrepo stretch-libreoffice-cn/main amd64 Packages
        100 /var/lib/dpkg/status

So you see, I have previously installed the default stable "6.1.3-1~bpo9+2" libreoffice version provided by Q4OS repository. It's also the default candidate to upgrade/install, meaning it won't be upgraded to other versions by default. However, many more updated versions are available.

   7.3. Install a specific package from the respective repository:
If, taking the above libreoffice example, you would like to install/upgrade the latest libreoffice version "6.2.3~rc1-1" from the "experimental" repository you may do so with the following command (replace "experimental" with the desired repository archive/name):

$ sudo apt -t experimental install libreoffice

It should install/upgrade your libreoffice version to the selected one and also upgrade all the required dependencies. As always remember: It may break your installed package(s) or your entire system, depending on the changes made to core/base system package and dependencies required for that package(s). Your results may vary. If it breaks you know why! smile You may then try to reinstall the default stable candidate package and try to resolve it. No results are guaranteed, try at your own risk. Have fun!

Last edited by jotapesse (2019-05-01 11:44)


jotapesse - Obrigado / Thank you.

Offline

Board footer

Powered by FluxBB