Hi everyone,
I just stumbled over a nasty bug, but I'm not sure if it is a bug that is limited to X2Go, or if Debian/apt/dpkg is at fault here.
Situation: I would like to upgrade a system from wheezy to jessie. This system is running X2Go stable.
Step 1: s/wheezy/jessie/ in sources.list
Step 2: apt-get update
Step 3: Try any of the following:
apt-get install x2goserver # when it's already present in # it's wheezy incarnation apt-get upgrade
apt-get dist-upgrade
and you will see that all X2Go packages remain in their wheezy state.
Step 4: Force the installation of the exact version of x2goserver.
apt-get -t jessie install x2goserver=4.0.1.19-0x2go2+git20150608.1064+jessie.main.1
And tadaa, we get a hint at what's going on:
Reading package lists... Building dependency tree... Reading state information... The following packages were automatically installed and are no longer required: libfile-readbackwards-perl libglib1.2ldbl libgtk1.2 libgtk1.2-common libmozjs24d libnet-daemon-perl libnx-x11 libplrpc-perl libtommath0 xulrunner-24.0 Use 'apt-get autoremove' to remove them. Suggested packages: x2goserver-compat x2goserver-fmbindings x2goserver-pyhoca The following packages will be REMOVED: x2goserver-extensions x2goserver-printing x2goserver-xsession The following packages will be DOWNGRADED: x2goserver 0 upgraded, 0 newly installed, 1 downgraded, 3 to remove and 782 not upgraded. Need to get 85.5 kB of archives. After this operation, 360 kB disk space will be freed. Do you want to continue [Y/n]?
apt-get believes it is DOWNGRADING even though we're actually trying to perform an update.
Looking at the version numbers given...
4.0.1.19-0x2go2+git20150608.1064+jessie.main.1 4.0.1.19-0x2go2+git20150608.1064+wheezy.main.1
... it becomes obvious - apt does a numerical/alphabetic sort, and the only difference in those two version strings is "jessie" vs. "wheezy", with the "w" in wheezy being "higher" than the "j" in jessie.
Is this something we can fix on our own, by using numeric release numbers (7 for wheezy, 8 for jessie), or is this actually a bug that needs to be reported upstream, because maybe apt shouldn't act that way, and "latch" onto the release name instead of adding it to the numerical/alphabetic sort?
If it is entirely our own bug, what should I file it against? Picking out a particular package doesn't seem to make sense, they will all be affected. Do we have a meta-category for that?
Kind Regards, Stefan (now heading to bed after banging my head against the wall for the last 3 hours or so)
-- BAUR-ITCS UG (haftungsbeschränkt) Geschäftsführer: Stefan Baur Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364 Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243
On Fr 16 Okt 2015 03:31:50 CEST, Stefan Baur wrote:
Oh yeah, this is entirely an X2Go package builder bug.
The best approach probably is:
Replace wheezy, jessie, ,,, etc. by deb7, deb8, ...
Then rebuild all release builds.
Done.
Mike
--
DAS-NETZWERKTEAM mike gabriel, herweg 7, 24357 fleckeby fon: +49 (1520) 1976 148
GnuPG Key ID 0x25771B31 mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de
freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xf...
Hi Mihai,
On Fr 16 Okt 2015 05:28:11 CEST, Mihai Moldovan wrote:
outside of a Debian system/chroot, this is not possible, I fear. At
least, I don't have an enlighting idea at the moment where to obtain
those mappings. Inside a chroot, the mapping could be obtained from
/etc/os-release.
DAS-NETZWERKTEAM mike gabriel, herweg 7, 24357 fleckeby fon: +49 (1520) 1976 148
GnuPG Key ID 0x25771B31 mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de
freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xf...
On 16.10.2015 05:36 AM, Mike Gabriel wrote:
Yes, but that's probably not possible/practical.
Is there a variable that will be substituted automatically by dh (or any other build utility) that maps to the major version number of the "affected" Debian version number? That was my best guess, but I fear there's none and I have to hardcode a list within the build scripts.
Mihai
Am 16.10.2015 um 05:41 schrieb Mihai Moldovan:
Assuming the system you are working on has Internet access ;-) - you could take the following script and name it codename2major:
#!/bin/bash # (c) 2015 Stefan Baur, x2go-ml-1@baur-itcs.de # Released into Public Domain
RELNAME=$1 LOOKUPTABLE='/SOMESTORAGEPLACE/codename2major' touch "$LOOKUPTABLE" RELMAJOR=$(awk '$1 == '$RELNAME' { print $2 }' "$LOOKUPTABLE")
if [ -z "$RELMAJOR" ] ; then
if wget -q -O /dev/null
ftp://ftp.debian.org/debian/dists/$RELNAME ; then # $RELNAME is a currently supported release RELMAJOR=$( wget -q -O - ftp://ftp.debian.org/debian/dists/$RELNAME/Release | awk -F '[ .]' '$1 == "Version:" { print $2 }' ) echo "$RELNAME $RELMAJOR" >> "$LOOKUPTABLE" elif wget -q -O /dev/null http://archive.debian.org/debian/dists/$RELNAME ; then # $RELNAME is an archived release RELMAJOR=$( wget -q -O - http://archive.debian.org/debian/dists/$RELNAME/Release | awk -F '[ .]' '$1 == "Version:" { print $2 }' ) echo "$RELNAME $RELMAJOR" >> "$LOOKUPTABLE" else # $RELNAME is unknown exit 1 fi fi
if [ -z "$RELMAJOR" ] ; then # unknown error exit 1 else echo "$RELMAJOR" exit 0 fi
Running this as codename2major RELEASENAME will return the major number of the matching release. It will first try to look up the name in a local cache file; if it can't find it there, it will query the current debian repo, and, if it can't find it there either, the debian archive repo. Assuming it finds a match, it will log the result into the cache file in each case. If it can't find a match anywhere, or if it can retrieve a release file, but fails at parsing it, it will exit with an error code of 1.
-Stefan
-- BAUR-ITCS UG (haftungsbeschränkt) Geschäftsführer: Stefan Baur Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364 Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243
Am 16.10.2015 um 12:29 schrieb Stefan Baur:
RELMAJOR=$(awk '$1 == '$RELNAME' { print $2 }' "$LOOKUPTABLE")
Sorry, that line must say:
RELMAJOR=$( awk '$1 == "'$RELNAME'" { print $2 }' "$LOOKUPTABLE" | head -1 )
or else it will do a wget call each time, and cause duplicate entries in the cache file.
-Stefan
-- BAUR-ITCS UG (haftungsbeschränkt) Geschäftsführer: Stefan Baur Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364 Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243
Replace wheezy, jessie, ,,, etc. by deb7, deb8, ... Yes, but how do I get the release version for a codename? I wouldn't
Am 16.10.2015 um 05:28 schrieb Mihai Moldovan: like to
Where do the codenames come from, in our build system/source/whatever?
-Stefan
-- BAUR-ITCS UG (haftungsbeschränkt) Geschäftsführer: Stefan Baur Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364 Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243