[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: SimpleBackportCreation attempt says: The value 'unstable' is invalid for APT::Default-Release



On Fri, Jun 12, 2020 at 06:38:09PM +0200, tomas@tuxteam.de wrote:
> apt show approx will help. It's an APT proxy/cache (I'm more familiar
> with apt-cacher-ng though)

Oh, that actually looks useful.  (Also, you actually gave *useful
information*, that was not simply "do research on this half a word
with zero context".)

So, the OP has a caching proxy layer that needs to be taken into
consideration when trying to diagnose the actual issues.

Of course, none of this changes that fact that one DOES NOT add an
unstable "deb" source to sources.list when building backports.  That
is simply wrong, as I have to keep restating, because certain people
do not seem to accept it.  And it's DANGEROUS!

Now, let's try to figure out how to do a backport so we can help the OP,
shall we?

First step, we have to choose a package to backport.  Ideally, something
small and not difficult to compile... sl?  No, that's basically the
same version in both stable and unstable.  ksh?  Ok, ksh looks like a
reasonable candidate.

ii  ksh            93u+20120801-3.4 amd64        Real, AT&T version of the Korn shell

https://packages.debian.org/search?keywords=ksh says it's at version
2020.something in sid, so that'll be easy to spot.

I'm starting with this sources.list file:

===============================
deb http://ftp.us.debian.org/debian/ buster main contrib non-free
deb-src http://ftp.us.debian.org/debian/ buster main contrib non-free

deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security buster/updates main contrib non-free

deb http://ftp.us.debian.org/debian/ buster-updates main contrib non-free
deb-src http://ftp.us.debian.org/debian/ buster-updates main contrib non-free
===============================

Now, according to the instructions, I need to add a deb-src line for
sid, and also the buster-backports binary lines.  So, let's edit
sources.list....

===============================
deb http://ftp.us.debian.org/debian/ buster main contrib non-free
deb-src http://ftp.us.debian.org/debian/ buster main contrib non-free

deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security buster/updates main contrib non-free

deb http://ftp.us.debian.org/debian/ buster-updates main contrib non-free
deb-src http://ftp.us.debian.org/debian/ buster-updates main contrib non-free

deb http://deb.debian.org/debian buster-backports main
deb-src http://ftp.us.debian.org/debian/ sid main
===============================

There.  Now, we "apt-get update", and change to a clean working
directory, and try to retrieve the source:

===============================
unicorn:~$ mkdir /var/tmp/clean
unicorn:~$ cd "$_"
unicorn:/var/tmp/clean$ apt-get source ksh
Reading package lists... Done
NOTICE: 'ksh' packaging is maintained in the 'Git' version control system at:
https://salsa.debian.org/debian/ksh.git
Please use:
git clone https://salsa.debian.org/debian/ksh.git
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 2,045 kB of source archives.
Get:1 http://ftp.us.debian.org/debian sid/main ksh 2020.0.0-5 (dsc) [1,960 B]
Get:2 http://ftp.us.debian.org/debian sid/main ksh 2020.0.0-5 (tar) [2,023 kB]
Get:3 http://ftp.us.debian.org/debian sid/main ksh 2020.0.0-5 (diff) [20.6 kB] 
Fetched 2,045 kB in 8s (254 kB/s)                                              
dpkg-source: info: extracting ksh in ksh-2020.0.0
dpkg-source: info: unpacking ksh_2020.0.0.orig.tar.gz
dpkg-source: info: unpacking ksh_2020.0.0-5.debian.tar.xz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying 0001-List-only-supported-names-for-ksh.patch
dpkg-source: info: applying 0002-Change-ultimate-fallback-editor-for-fc.patch
dpkg-source: info: applying 0003-Spelling-fix-in-doc.patch
dpkg-source: info: applying 0004-Set-USER-when-running-tests.patch
dpkg-source: info: applying 0005-Skip-API-test-if-build-type-not-debug.patch
dpkg-source: info: applying 0006-Use-unused-fd-for-fsync-test.patch
dpkg-source: info: applying 0007-Skip-test-if-homedir-not-found.patch
dpkg-source: info: applying 0008-CVE-2019-14868.patch
dpkg-source: info: applying 0009-Fix-rksh-issue-1479.patch
===============================

Looks good so far!

Now we cd into the directory, and install the build dependencies....

===============================
unicorn:/var/tmp/clean$ cd ksh-2020.0.0/
unicorn:/var/tmp/clean/ksh-2020.0.0$ sudo apt-get build-dep ksh
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  dh-exec ed expect libtcl8.6 locales-all meson netcat-openbsd ninja-build
  tcl-expect tcl8.6
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 12.6 MB of archives.
After this operation, 234 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ftp.us.debian.org/debian buster/main amd64 dh-exec amd64 0.23.1 [26.3 kB]
Get:2 http://ftp.us.debian.org/debian buster/main amd64 ed amd64 1.15-1 [59.7 kB]
Get:3 http://ftp.us.debian.org/debian buster/main amd64 libtcl8.6 amd64 8.6.9+dfsg-2 [1,005 kB]
Get:4 http://ftp.us.debian.org/debian buster/main amd64 tcl8.6 amd64 8.6.9+dfsg-2 [123 kB]
Get:5 http://ftp.us.debian.org/debian buster/main amd64 tcl-expect amd64 5.45.4-2 [133 kB]
Get:6 http://ftp.us.debian.org/debian buster/main amd64 expect amd64 5.45.4-2 [166 kB]
Get:7 http://ftp.us.debian.org/debian buster/main amd64 locales-all amd64 2.28-10 [10.7 MB]
Get:8 http://ftp.us.debian.org/debian buster/main amd64 ninja-build amd64 1.8.2-1 [93.6 kB]
Get:9 http://ftp.us.debian.org/debian buster/main amd64 meson all 0.49.2-1 [281 kB]
Get:10 http://ftp.us.debian.org/debian buster/main amd64 netcat-openbsd amd64 1.195-2 [41.2 kB]
Fetched 12.6 MB in 32s (392 kB/s)                                              
Selecting previously unselected package dh-exec.
(Reading database ... 90149 files and directories currently installed.)
Preparing to unpack .../0-dh-exec_0.23.1_amd64.deb ...
Unpacking dh-exec (0.23.1) ...
Selecting previously unselected package ed.
Preparing to unpack .../1-ed_1.15-1_amd64.deb ...
Unpacking ed (1.15-1) ...
Selecting previously unselected package libtcl8.6:amd64.
Preparing to unpack .../2-libtcl8.6_8.6.9+dfsg-2_amd64.deb ...
Unpacking libtcl8.6:amd64 (8.6.9+dfsg-2) ...
Selecting previously unselected package tcl8.6.
Preparing to unpack .../3-tcl8.6_8.6.9+dfsg-2_amd64.deb ...
Unpacking tcl8.6 (8.6.9+dfsg-2) ...
Selecting previously unselected package tcl-expect:amd64.
Preparing to unpack .../4-tcl-expect_5.45.4-2_amd64.deb ...
Unpacking tcl-expect:amd64 (5.45.4-2) ...
Selecting previously unselected package expect.
Preparing to unpack .../5-expect_5.45.4-2_amd64.deb ...
Unpacking expect (5.45.4-2) ...
Selecting previously unselected package locales-all.
Preparing to unpack .../6-locales-all_2.28-10_amd64.deb ...
Unpacking locales-all (2.28-10) ...
Selecting previously unselected package ninja-build.
Preparing to unpack .../7-ninja-build_1.8.2-1_amd64.deb ...
Unpacking ninja-build (1.8.2-1) ...
Selecting previously unselected package meson.
Preparing to unpack .../8-meson_0.49.2-1_all.deb ...
Unpacking meson (0.49.2-1) ...
Selecting previously unselected package netcat-openbsd.
Preparing to unpack .../9-netcat-openbsd_1.195-2_amd64.deb ...
Unpacking netcat-openbsd (1.195-2) ...
Setting up netcat-openbsd (1.195-2) ...
update-alternatives: using /bin/nc.openbsd to provide /bin/nc (nc) in auto mode
Setting up dh-exec (0.23.1) ...
Setting up locales-all (2.28-10) ...
Setting up ninja-build (1.8.2-1) ...
Setting up ed (1.15-1) ...
Setting up libtcl8.6:amd64 (8.6.9+dfsg-2) ...
Setting up tcl8.6 (8.6.9+dfsg-2) ...
Setting up tcl-expect:amd64 (5.45.4-2) ...
Setting up meson (0.49.2-1) ...
Setting up expect (5.45.4-2) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for install-info (6.5.0.dfsg.1-4+b1) ...
Processing triggers for libc-bin (2.28-10) ...
===============================

And now, we try to build the package.

===============================
unicorn:/var/tmp/clean/ksh-2020.0.0$ dpkg-buildpackage -uc -us -rfakeroot
dpkg-buildpackage: info: source package ksh
dpkg-buildpackage: info: source version 2020.0.0-5
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Thorsten Glaser <tg@mirbsd.de>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build .
 debian/rules clean
dh clean --no-parallel
...
===============================

I won't show all of the output, because it's rather long.

After the compiling, it started running a test suite.  One of the
tests failed.  So, this particular package might not have been as
good a choice as I had hoped, for a simple demonstration of the
process.

Nevertheless, I am fairly confident that this *IS* the correct
process, in general.

Notice, and I know I am repeating myself OVER and OVER, but it is
apparently NECESSARY to do so, because certain people are spreading
dangerous lies: I DID NOT add a "deb" line for unstable!

DO NOT add a "deb" line for unstable!

I will keep repeating that as many times as it takes.  Because it's
freaking IMPORTANT.


Reply to: