Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] How can I backport a dependency-rich package?

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
n_hologram
Posts: 459
Joined: 2013-06-16 00:10

[SOLVED] How can I backport a dependency-rich package?

#1 Post by n_hologram »

Before you ask: no, I do not have a rogue line pulling Sid/Stretch/Buster to Jessie in my sources.list(.d), and yes, I'm aware that KDE is built on an ungodly number of dependencies.

I wanted to try backporting a package (kdeconnect) from stretch to jessie. I know I could upgrade to stretch, but I'd really rather not at the moment. Also, I think this question general is enough to disregard the solve-all of "upgrade to the next version," because it could apply to any version, including backporting buster -> stretch.

I've read all the wiki pages and tried to go with the formal build route: using sbuild, but (for the time being, at least,) disregarding the version changes, like "dch --bpo". (By the way, as a fun fact, on jessie, one has to use the backported sbuild for anything to work properly.) For now, I don't mind an almost-formal backport, as I'm still learning the general approach. However, I also see the value in creating a formal backport, so I don't want to ignore an approach that might one day be of use.

With that said, here's the issue. Stretch's kdeconnect compiles and all, but it does nothing for the dependencies; and I know that the wiki says to pass --extra-package <absolute-path-to-deb-file>, but it also requires one to "build them as described above," which means building dependencies for dependencies [for dependencies], and I assume that means sitting at the keyboard until death.

Aside from upgrading, or just not using the newest version of kdeconnect, is there a better way to automate the dependency resolution and building for a dependency-rich package?
Last edited by n_hologram on 2017-09-18 18:44, edited 1 time in total.
bester69 wrote:There is nothing to install in linux, from time to time i go to google searching for something fresh to install in linux, but, there is nothing
the crunkbong project: scripts, operating system, the list goes on...

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: Most sensible way to backport a dependency-rich pcakage

#2 Post by kedaha »

The best way is to follow the procedure at SimpleBackportCreation
Do it in a directory:

Code: Select all

$ mkdir build && cd build
Then kick off with:

Code: Select all

user@debian:~/build$ dget -x http://ftp.de.debian.org/debian/pool/main/k/kdeconnect/kdeconnect_1.0.1-1.dsc
As explained there, no problems with multiple dependencies which you'll be able to get rid of later, in this case simply be removing the package kdeconnect-build-deps and running apt-get autoremove.
DebianStable

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: How can I backport a dependency-rich package?

#3 Post by stevepusser »

Exactly how are you trying to backport the package? If you use the debianized source from Stretch, it lists quite a few KDE 5/Qt5 build-dependencies that are not available in Jessie repositories:

Code: Select all

               libkf5configwidgets-dev,
               libkf5dbusaddons-dev,
               libkf5doctools-dev,
               libkf5i18n-dev,
               libkf5iconthemes-dev,
               libkf5kcmutils-dev,
               libkf5kio-dev,
               libkf5notifications-dev,
               libkf5wayland-dev,
               libqca-qt5-2-dev,
               libqca-qt5-2-plugins,
Are you trying to use the build-deps listed for the Jessie kdeconnect?

As for dependencies, they are handled in the debian/control file. The stretch version lists:

Code: Select all

Depends: kde-cli-tools,
         libqca-qt5-2-plugins,
         plasma-workspace,
         sshfs,
         ${misc:Depends},
         ${shlibs:Depends}
The first four can be changed by the maintainer, but the rest (most of them) are automatically generated by those last two variables from what the binaries say they need. It's possible to add an override to prevent specified libraries being added to the shlibdebps, but that's about as far as my limited knowledge extends.
MX Linux packager and developer

n_hologram
Posts: 459
Joined: 2013-06-16 00:10

Re: How can I backport a dependency-rich package?

#4 Post by n_hologram »

stevepusser wrote:Exactly how are you trying to backport the package? If you use the debianized source from Stretch, it lists quite a few KDE 5/Qt5 build-dependencies that are not available in Jessie repositories (...) Are you trying to use the build-deps listed for the Jessie kdeconnect?
I can "formally" (or informally) backport it, but when I go to run commands, it complains (as I expected) about those other dependencies. Example, after following the formal backport tutorial in a stretch sbuild environment (same behavior when following kehada's advice):

Code: Select all

# Installing the .deb
/path/to/build/dir/backports/kdeconnect:# dpkg -i kdeconnect_1.0.1-1~bpo8+1_i386.deb
Selecting previously unselected package kdeconnect.
(Reading database ... 296745 files and directories currently installed.)
Preparing to unpack kdeconnect_1.0.1-1~bpo8+1_i386.deb ...
Unpacking kdeconnect (1.0.1-1~bpo8+1) ...
dpkg: dependency problems prevent configuration of kdeconnect:
 kdeconnect depends on kde-cli-tools; however:
  Package kde-cli-tools is not installed.
 kdeconnect depends on libqca-qt5-2-plugins; however:
  Package libqca-qt5-2-plugins is not installed.
 kdeconnect depends on plasma-workspace; however:
  Package plasma-workspace is not installed.
 kdeconnect depends on kio; however:
  Package kio is not installed.
 kdeconnect depends on libkf5configcore5 (>= 4.97.0); however:
  Package libkf5configcore5 is not installed.
 kdeconnect depends on libkf5configwidgets5 (>= 4.96.0); however:
  Package libkf5configwidgets5 is not installed.
 kdeconnect depends on libkf5coreaddons5 (>= 5.2.0); however:
  Package libkf5coreaddons5 is not installed.
 kdeconnect depends on libkf5dbusaddons5 (>= 4.97.0); however:
  Package libkf5dbusaddons5 is not installed.
 kdeconnect depends on libkf5i18n5 (>= 4.97.0); however:
  Package libkf5i18n5 is not installed.
 kdeconnect depends on libkf5iconthemes5 (>= 5.0.0); however:
  Package 
dpkg: error processing package kdeconnect (--install):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.19-18+deb8u10) ...
Processing triggers for desktop-file-utils (0.22-1) ...
Processing triggers for mime-support (3.58) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
 kdeconnect
# Running the program
/home/me:$ kdeconnect-cli
kdeconnect-cli: error while loading shared libraries: libKF5CoreAddons.so.5: cannot open shared object file: No such file or directory
When I build and try to install local dependencies one-by-one, dpkg complains that they need other dependencies. Example, plasma-workspace is compiled into a deb, but it too has unresolved dependencies:

Code: Select all

 plasma-workspace : Depends: frameworkintegration but it is not installable
                    Depends: kactivitymanagerd but it is not installable
                    Depends: kded5 but it is not installable
                    Depends: kinit but it is not installable
                    ( ... )
And so on.
That makes it really hard to do things like run apt-get upgrade, because apt wants to remove them all since it can't resolve all the dependencies for the dependencies

My biggest issue at the moment is that I don't know of a method for backporting kdeconnect where I could just tell a program/script: "please download and compile all dependencies and their dependencies properly." The current methods require me to babysit, manually find everything, wait for broken dependency errors, etc, because I don't know of any ways to automate all of those dependencies.
bester69 wrote:There is nothing to install in linux, from time to time i go to google searching for something fresh to install in linux, but, there is nothing
the crunkbong project: scripts, operating system, the list goes on...

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: How can I backport a dependency-rich package?

#5 Post by kedaha »

When multiple dependencies of dependencies are required then things get very complicated. If the package is really needed then you might persevere. I've sometimes spent days trying to backport packages to no avail but given up when, as you say, "that means sitting at the keyboard until death."
DebianStable

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: How can I backport a dependency-rich package?

#6 Post by stevepusser »

It's not a backport if you're rebuild the Stretch package in a Stretch sbuild. :(

Basically, it needs backported KDE 5 runtime libraries, which in turn needs backported Qt 5 libraries. This is a lot of work, but there's no way around that. It's in the source code. You're trying to make a FrankenDebian if you attempt to install the Stretch packages in Jessie to get around that work. Perhaps you can get a Flatpak or AppImage of kdeconnect instead; there are already some for KDE programs such as Digikam and Krita.

NeptuneOS has accomplished the above backports on a Wheezy (!) base, more power to them.
MX Linux packager and developer

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: How can I backport a dependency-rich package?

#7 Post by sunrat »

kdeconnect is in Jessie repo. Instead of trying to backport the whole of Plasma 5 (and Qt and KDE Frameworks) to Jessie, it's the option I would use.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

n_hologram
Posts: 459
Joined: 2013-06-16 00:10

Re: How can I backport a dependency-rich package?

#8 Post by n_hologram »

Thanks for the help. I now understand how not-worth-it backporting KDE applications is since I'd need to build plasma and friends, and I just don't have the time to invest in that. I gained a lot of insight on the purpose/setup of sbuild, the nature of KDE dependencies, and the practicality of making a true backport for something like kdeconnect. Trivial as it sounds, I wanted the 1.x version (jessie ships with 0.7.2) because it allows one to send SMS from the desktop (through the phone), which is really convenient when your phone is on the opposite side of the house than the office; but it seems that I've exhausted any convenience factor by unknowingly attempting a frankendebian. Also, it appears that the KDE developers don't seem too thrilled about flatpak for running KDE5/Plasma.

Cheers.
Image
bester69 wrote:There is nothing to install in linux, from time to time i go to google searching for something fresh to install in linux, but, there is nothing
the crunkbong project: scripts, operating system, the list goes on...

n_hologram
Posts: 459
Joined: 2013-06-16 00:10

Re: How can I backport a dependency-rich package?

#9 Post by n_hologram »

wizard10000 wrote:I know you're aware upgrading to Stretch is an option but KDE Neon User Edition might be an alternative; latest KDE on an Ubuntu LTS base.
I looked into that a few months ago. The project seems solid. I want to stay away from systemd though, out of principle. I've actually been trying out FreeBSD since I finally have a (refurbished) laptop with compatible hardware.
bester69 wrote:There is nothing to install in linux, from time to time i go to google searching for something fresh to install in linux, but, there is nothing
the crunkbong project: scripts, operating system, the list goes on...

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: How can I backport a dependency-rich package?

#10 Post by sunrat »

n_hologram wrote: I want to stay away from systemd though, out of principle.
But you're running Jessie.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

n_hologram
Posts: 459
Joined: 2013-06-16 00:10

Re: How can I backport a dependency-rich package?

#11 Post by n_hologram »

sunrat wrote:
n_hologram wrote: I want to stay away from systemd though, out of principle.
But you're running Jessie.
I replaced systemd with sysv. It's imperfect, if that's what you're getting at.
bester69 wrote:There is nothing to install in linux, from time to time i go to google searching for something fresh to install in linux, but, there is nothing
the crunkbong project: scripts, operating system, the list goes on...

Post Reply