Adding Debian testing repositories to LMDE 2 (outdated, do not use)

Archived topics about LMDE 1 and LMDE 2
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Adding Debian testing repositories to LMDE 2 (outdated, do not use)

Post by xenopeek »

WARNING: This is an older tutorial and won't work correctly without changes today. That's because at the time of writing this tutorial the Jessie repository was Debian stable and the Stretch repository was Debian testing. LMDE 2 is based on Jessie. However, since mid last year Jessie was relegated to Debian old-stable, Stretch was promoted to Debian stable and Buster became the new repository for Debian testing. Where in the below it says "testing" or "stable", that no longer is correct and will not give desired results.

Do not use this tutorial without adapting it to current situation. I'll provide a new tutorial once LMDE 3 is released and will write it such that it is more future proof than this tutorial has proven to be.



Sometimes you may need a newer version of an application than is available from LMDE 2 or an application might not be available on LMDE 2 (like firejail for example). In these cases you may consider installing the application from Debian testing. You can look up which versions of a package are available in Debian here https://tracker.debian.org/.

The way to safely add Debian testing is to configure it so that it's APT Pin-Priority is between 100 and 499 (inclusive). By lowering the APT Pin-Priority we make it so that only when you explicitly state you want to install something from testing will it get installed from there. Once you have installed a package from testing it will also be upgraded from there by Update Manager. You also get security upgrades for those packages. Though note this is handled differently: https://www.debian.org/security/faq#testing

Proceed at your own risk! Adding Debian testing is not recommended but if you are diligent in checking what apt says it will do when you install an application from testing and make sure it only installs that application and nothing else then it is unlikely to cause problems. It is fine to install a few applications from Debian testing if you are careful. This is testing though, so versions from it may have issues. At any time you can downgrade a package to the LMDE 2 version as shown below.

Step 1: Add the repositories to your system. Create the file /etc/apt/sources.list.d/debian-testing.list. On Cinnamon and MATE you can do that with the following command (replace "gksudo xed" with "kdesudo kate" for KDE):

Code: Select all

gksudo xed /etc/apt/sources.list.d/debian-testing.list
Put the following in the file (remove the # in front of the two lines if you want to enable source code repositories as well):

Code: Select all

deb http://httpredir.debian.org/debian/ testing main
#deb-src http://httpredir.debian.org/debian/ testing main

deb http://security.debian.org/ testing/updates main
#deb-src http://security.debian.org/ testing/updates main
Step 2: Set the APT Pin-Priority. Create the file /etc/apt/preferences.d/debian-testing.pref. On Cinnamon and MATE you can do that with the following command (replace "gksudo xed" with "kdesudo kate" for KDE):

Code: Select all

gksudo xed /etc/apt/preferences.d/debian-testing.pref
Put the following in the file:

Code: Select all

# To find this information for other repositories use:
#   egrep '(Origin|Label|Suite|Codename)' /var/lib/apt/lists/*Release
# Meaning of the fields:
#   o=Origin, l=Label, a=Suite, n=Codename

Package: *
Pin: release o=Debian, a=testing, l=Debian-Security
Pin-Priority: 300

Package: *
Pin: release o=Debian, a=testing
Pin-Priority: 300
NOTE: If you've also added jessie-backports to your system from Debian Backports, that would default to a Pin-Priority of 100. You'll likely want to give higher precedence to jessie-backports so also add the following three lines to raise its Pin-Priority:

Code: Select all

Package: *
Pin: release o=Debian Backports, n=jessie-backports
Pin-Priority: 400
Step 3: Update the system:

Code: Select all

apt update
Install a package from testing: To explicitly install a package from testing, or upgrade an already installed package to the version from testing, I recommend you use the terminal and use the following command (replace "package" with the name of the package to install). Software Manager can't handle this and Synaptic Package Manager pretends to have the functionality but it doesn't work (to force a version with Synaptic Package Manager you'd have to first uninstall the already installed package).

Code: Select all

apt install -t testing package
Pay close attention to what apt says it will do before continuing! It's fine to install an application and specific related packages from testing but if it will install a lot of system libraries from testing you risk breaking your system.

Downgrade a package installed from testing: To downgrade a package you had installed from testing you should first check if originally the package came from LMDE 2 or from Debian stable. The most fool-proof way is probably to search for the package name on this page: http://packages.linuxmint.com/list.php?release=Betsy. If you found the package on that page downgrade it to the LMDE 2 version with this command:

Code: Select all

apt install --reinstall -t betsy package
If you didn't find the package on that page downgrade it to the Debian stable version with this command:

Code: Select all

apt install --reinstall -t stable package
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Image
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: Adding Debian testing repositories to LMDE 2

Post by xenopeek »

After Step 3 you can also confirm all your settings are correct, before you upgrade or install anything. Run for example this command:

Code: Select all

apt policy evince
It will respond something like below:

Code: Select all

evince:
  Installed: 3.14.1-2
  Candidate: 3.14.1-2
  Version table:
     3.18.2-1 0
        300 http://httpredir.debian.org/debian/ testing/main amd64 Packages
 *** 3.14.1-2 0
        500 http://ftp.us.debian.org/debian/ jessie/main amd64 Packages
        100 /var/lib/dpkg/status
Here you see that the version of Evince was install from Debian Jessie, with APT Pin-Priority showing as 500. That's also the only candidate version. The version from Debian Testing is shown correctly with APT Pin-Priority of 300 and that version isn't listed as the candidate version because the APT-Pin Priority is lower than 500. So only when you would explicitly install evince from Debian Testing would it get upgraded or installed from there.

I already mentioned firejail is not available on LMDE 2 (or Debian Jessie), but by adding Debian Testing you can install it. You can also test with that by running this command:

Code: Select all

apt policy firejail
Should respond similar to:

Code: Select all

firejail:
  Installed: (none)
  Candidate: 0.9.36-1
  Version table:
     0.9.36-1 0
        300 http://httpredir.debian.org/debian/ testing/main amd64 Packages
This shows Firejail is only available from Debian Testing, at APT Pin-Priority 300. Because there is no firejail package available from a distribution with a higher APT Pin-Priority, it will be installed from Debian Testing by default.
Image
Crewp

Re: Adding Debian testing repositories to LMDE 2

Post by Crewp »

Very nice xenopeek, thank you.
Dr. Octagon
Level 2
Level 2
Posts: 97
Joined: Mon Sep 16, 2013 4:43 pm
Location: Osnabrooklyn

Re: Adding Debian testing repositories to LMDE 2

Post by Dr. Octagon »

Thanks xenopeek,

great advice... now I am be able to install firejail without breaking my system too soon. ;) Firejail is great... btw!

Am I right that every update which comes to firejail will automatically becomes visible to the updatemanager in this way, too?

Cu
Dr. Octagon
A good stumbler doesn't fall...
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: Adding Debian testing repositories to LMDE 2

Post by xenopeek »

Dr. Octagon wrote:Am I right that every update which comes to firejail will automatically becomes visible to the updatemanager in this way, too?
Yes, once you have installed a package from Debian testing it will also be updated from there. Update Manager will show those updates.
Image
renzor

Re: Adding Debian testing repositories to LMDE 2

Post by renzor »

Hi xeno, thanks for this! Is there a way to use testing repos from the start during install (so testing repos are installed)?
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: Adding Debian testing repositories to LMDE 2

Post by xenopeek »

Not that I know, nor would it really serve a purpose. You don't want to automatically install packages from testing instead of from stable, or you will break your installation (you only want to do this for selected programs you need a newer version of, not for the rest of your OS). As this tutorial is written only explicitly installed from testing packages will be installed from testing; hence whether you set this up before or after installation doesn't make a difference as LMDE 2 installs from stable.
Image
Dadzmad

Re: Adding Debian testing repositories to LMDE 2

Post by Dadzmad »

thanks so much for this - I was able to load a fixed package from testing to replace the broken one in stable and all is well.

Again thanks alot for this walk through
lmintnewb2

Re: Adding Debian testing repositories to LMDE 2

Post by lmintnewb2 »

You're da man Xenopeek, so not criticism, people may want to add testing repos regardless at some point and good someone like yourself went to the trouble of covering it.

Though rather than testing, why not backports? Doesn't really matter, what you posted could cover that too. So will just shut it. :)
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: Adding Debian testing repositories to LMDE 2

Post by xenopeek »

Yes, if you need a specific package it is better to first look if it and the version you need is in Jessie backports (LMDE 2 is based on Debian Jessie aka Debian Stable aka Debian 8 ). Packages from Jessie Backports are tested to work with Debian Jessie, unlike packages from Debian Testing. I'll copy below the instructions for adding Jessie Backports as I wrote them recently on Firejail as security sandbox for your programs.

Jessie Backports is an additional repository you can add to your LMDE 2 system. It provides additional programs and new feature releases of programs. Only programs you explicitly install from Jessie Backports will be upgraded from there so there is no risk of your LMDE 2 installation becoming unstable if you only selectively install programs from here.

Adding Jessie Backports is easy (for more information and alternative mirrors see https://backports.debian.org/Instructions/#index2h2). Open Software Sources from your menu, go to the "Additional repositories" tab in the left sidebar and click on the "Add a new repository" button there. Put the following in the text field:
deb http://ftp.debian.org/debian jessie-backports main

After adding that repository click the "Update the cache button" in the top right of the window. For installing packages from Jessie Backports see the instructions: https://backports.debian.org/Instructions/#index3h2
Image
User avatar
all41
Level 19
Level 19
Posts: 9498
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Adding Debian testing repositories to LMDE 2

Post by all41 »

xenopeek wrote:replace "gedit" with "pluma" for MATE
My LMDE 2 MATE Betsy default text editor is xed--no pluma installed
Everything in life was difficult before it became easy.
User avatar
Fred Barclay
Level 12
Level 12
Posts: 4185
Joined: Sat Sep 13, 2014 11:12 am
Location: USA primarily

Re: Adding Debian testing repositories to LMDE 2

Post by Fred Barclay »

all41 wrote: My LMDE 2 MATE Betsy default text editor is xed--no pluma installed
That's with the updated LMDE 2 images -- xed for both Cinnamon and MATE. The old images (the only ones when this guide was written) were pluma for MATE, gedit for Cinnamon. :)
Image
"Once you can accept the universe as matter expanding into nothing that is something, wearing stripes with plaid comes easy."
- Albert Einstein
User avatar
all41
Level 19
Level 19
Posts: 9498
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Adding Debian testing repositories to LMDE 2

Post by all41 »

Hi Fred--I have been using 17.x for so long I hadn't even noticed I had been using xed when
booting to Betsy--double ds on me.
I was following the tutorial and the files were not being created, so I created them manually.
Then I started to research why this was so-and that's when I discovered xed--it was an extended forehead slapping
occasion. I've worked through (and around) most of the nuances though, and feel comfortable with it,
but I have much to learn. Still haven't got conky gpu and hdd temps up yet.
Everything in life was difficult before it became easy.
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: Adding Debian testing repositories to LMDE 2

Post by xenopeek »

I've updated the tutorial for the LMDE 2 refresh.
Image
Lucap
Level 6
Level 6
Posts: 1038
Joined: Tue May 24, 2016 1:40 am

Re: Adding Debian testing repositories to LMDE 2

Post by Lucap »

I'm loving LMDE 2. :)

Does changing to the testing repositories mean you will get updates and patches on a daily bases or is it less frequent than that?
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: Adding Debian testing repositories to LMDE 2

Post by xenopeek »

As noted, only the packages you explicitly install from testing will get updated from there. You will not get daily updates as there are not that frequent new releases for most programs. And you'll get updates only once a new version has been packaged by a Debian developer and the package meets the quality requirements for migrating to testing. The lifecycle in summary:

Image

To learn more about how the Debian lifecycle works see https://debian-handbook.info/browse/jes ... cycle.html.
Image
Lucap
Level 6
Level 6
Posts: 1038
Joined: Tue May 24, 2016 1:40 am

Re: Adding Debian testing repositories to LMDE 2

Post by Lucap »

I wrongly thought large parts of the base would be changed to support the package that would need regular updates.

Makes sense now that it's just the package , thanks :)
User avatar
Fred Barclay
Level 12
Level 12
Posts: 4185
Joined: Sat Sep 13, 2014 11:12 am
Location: USA primarily

Re: Adding Debian testing repositories to LMDE 2

Post by Fred Barclay »

Lucap wrote:I wrongly thought large parts of the base would be changed to support the package that would need regular updates.

Makes sense now that it's just the package , thanks :)
Depends on the package. :)
Something small like firejail, no, most of your base would stay the same.
But if you decided to get "creative" and install, say, gcc or X11 from Testing, you'll probably find that a large part of the base system has been updated as well.
Image
"Once you can accept the universe as matter expanding into nothing that is something, wearing stripes with plaid comes easy."
- Albert Einstein
Lucap
Level 6
Level 6
Posts: 1038
Joined: Tue May 24, 2016 1:40 am

Re: Adding Debian testing repositories to LMDE 2

Post by Lucap »

I would never be that adventurous plus what gets security updates and what doesn't is rather confusing.

Thanks for the heads up. :)
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: Adding Debian testing repositories to LMDE 2

Post by xenopeek »

Debian testing gets security updates, though not in the same way as Debian stable. See here: https://www.debian.org/security/faq#testing. For home use it could be fine. For server use I would stick with Debian stable only.
Image
Locked

Return to “LMDE Archive”