Adding Debian testing repositories to LMDE 2

Write tutorials here
More tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please, Before you post please read this
User avatar
xenopeek
Level 24
Level 24
Posts: 21382
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Adding Debian testing repositories to LMDE 2

Postby xenopeek » Mon Dec 28, 2015 11:26 am

Note: this tutorial was updated for the LMDE 2 refresh from January 2017. If you have an older install either first install xed from Software Manager or in below text replace "gksudo xed" with "gksudo gedit" for Cinnamon or "gksudo pluma" for MATE.



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 killer de bug on Fri Jan 15, 2016 2:39 pm, edited 1 time in total.
Image

User avatar
xenopeek
Level 24
Level 24
Posts: 21382
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Adding Debian testing repositories to LMDE 2

Postby xenopeek » Fri Jan 15, 2016 11:07 am

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

User avatar
Crewp
Level 9
Level 9
Posts: 2522
Joined: Sat Dec 01, 2012 8:36 pm
Location: Connecticut,USA

Re: Adding Debian testing repositories to LMDE 2

Postby Crewp » Sun Jan 17, 2016 12:28 pm

Very nice xenopeek, thank you.
Image

Dr. Octagon
Level 1
Level 1
Posts: 49
Joined: Mon Sep 16, 2013 4:43 pm
Location: Osnabrooklyn

Re: Adding Debian testing repositories to LMDE 2

Postby Dr. Octagon » Tue Jan 19, 2016 6:42 pm

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 24
Level 24
Posts: 21382
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Adding Debian testing repositories to LMDE 2

Postby xenopeek » Wed Jan 20, 2016 4:31 am

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
Level 1
Level 1
Posts: 48
Joined: Thu Jul 30, 2015 3:22 pm

Re: Adding Debian testing repositories to LMDE 2

Postby renzor » Wed Mar 30, 2016 5:20 pm

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 24
Level 24
Posts: 21382
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Adding Debian testing repositories to LMDE 2

Postby xenopeek » Thu Mar 31, 2016 2:20 am

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
Level 1
Level 1
Posts: 2
Joined: Fri Nov 18, 2011 11:06 am

Re: Adding Debian testing repositories to LMDE 2

Postby Dadzmad » Fri Mar 10, 2017 10:14 pm

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

Postby lmintnewb2 » Tue Mar 28, 2017 10:43 am

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 24
Level 24
Posts: 21382
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Adding Debian testing repositories to LMDE 2

Postby xenopeek » Tue Mar 28, 2017 12:38 pm

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 11
Level 11
Posts: 3532
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Adding Debian testing repositories to LMDE 2

Postby all41 » Tue Mar 28, 2017 9:40 pm

xenopeek wrote:replace "gedit" with "pluma" for MATE

My LMDE 2 MATE Betsy default text editor is xed--no pluma installed
Proud to be a supporter and monthly contributor to Mint.

User avatar
Fred Barclay
Level 11
Level 11
Posts: 3963
Joined: Sat Sep 13, 2014 11:12 am
Location: Bumping around in the bush

Re: Adding Debian testing repositories to LMDE 2

Postby Fred Barclay » Tue Mar 28, 2017 11:12 pm

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 11
Level 11
Posts: 3532
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Adding Debian testing repositories to LMDE 2

Postby all41 » Tue Mar 28, 2017 11:44 pm

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.
Proud to be a supporter and monthly contributor to Mint.

User avatar
xenopeek
Level 24
Level 24
Posts: 21382
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Adding Debian testing repositories to LMDE 2

Postby xenopeek » Wed Mar 29, 2017 1:32 am

I've updated the tutorial for the LMDE 2 refresh.
Image

User avatar
Lucap
Level 5
Level 5
Posts: 621
Joined: Tue May 24, 2016 1:40 am

Re: Adding Debian testing repositories to LMDE 2

Postby Lucap » Fri Nov 10, 2017 4:13 am

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 24
Level 24
Posts: 21382
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Adding Debian testing repositories to LMDE 2

Postby xenopeek » Fri Nov 10, 2017 10:53 am

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

User avatar
Lucap
Level 5
Level 5
Posts: 621
Joined: Tue May 24, 2016 1:40 am

Re: Adding Debian testing repositories to LMDE 2

Postby Lucap » Fri Nov 10, 2017 7:28 pm

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 11
Level 11
Posts: 3963
Joined: Sat Sep 13, 2014 11:12 am
Location: Bumping around in the bush

Re: Adding Debian testing repositories to LMDE 2

Postby Fred Barclay » Sat Nov 11, 2017 2:05 am

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

User avatar
Lucap
Level 5
Level 5
Posts: 621
Joined: Tue May 24, 2016 1:40 am

Re: Adding Debian testing repositories to LMDE 2

Postby Lucap » Sat Nov 11, 2017 4:50 am

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 24
Level 24
Posts: 21382
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Adding Debian testing repositories to LMDE 2

Postby xenopeek » Sat Nov 11, 2017 5:15 am

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


Return to “Tutorials”