davesteele / cloudprint-service

Debian packaging for the Python cloudprint proxy utility
GNU General Public License v3.0
71 stars 4 forks source link

Dependencies issue with Ubuntu 14.04 (LTS) #25

Closed jaimemrjm closed 8 years ago

jaimemrjm commented 9 years ago

I have Ubuntu 14.04 running on Raspberry Pi 2. Trying to install cloudprint-service from PPA gives me this error:

The following packages have unmet dependencies.
cloudprint-service : Depends: init-system-helpers (>= 1.18~) but 1.14 is to be installed
E: Unable to correct problems, you have held broken packages.

Will be it possible to use an old version of init-system-helpers?

akabakass commented 9 years ago

i finally manage to find a valid init system helpers 1.18 here: https://launchpad.net/ubuntu/utopic/powerpc/init-system-helpers/1.18

bits01 commented 9 years ago

Same problem on Linux Mint 17.1 x64: Dependency is not satisfiable: init-system-helpers (>= 1.18~)

Does the new cloudprint-service 0.11-7 require systemd now rather than upstart?

davesteele commented 9 years ago

April 2016: I'm hijacking this answer to point out that a non-systemd version is available at http://davesteele.github.io/cloudprint-service/


@bits01, yes, it uses systemd (it never used upstart), but I have errors in the dependencies.

bits01 commented 9 years ago

initd not systemd I assume otherwise it could not work on Ubuntu 14.04 or Mint 17.1, there's no systemd there. But the new Ubuntu 15.10 moved to systemd, I thought cloudprint may have made the move too. So is there hope that cloudprint-service will continue to work on Mint 17/Ubuntu 14.04?

davesteele commented 9 years ago

@bits01 , I don't intend to work on init.d support. I'd welcome help, or I suppose you could use an older cloudprint-service deb, and remove the '-u' options from the cloudprint calls.

bits01 commented 9 years ago

Not sure I understand your reply. Let's make the question simpler: Will Ubuntu 14.04 LTS still be supported going forward?

davesteele commented 9 years ago

Only if it supports systemd, or if someone steps up.

bits01 commented 9 years ago

The current /etc/init.d/cloudprintd is almost fine (see the addition below), why can't it be carried forward? There's a way to detect whether a distro uses systemd or init.d so it could install the correct one (Plex Media Server does that already from what I can tell).

Here's what I added to do_start() at line 71 to make sure cups is started otherwise cloudprintd doesn't start. It's a hack, it could be done better, but it gets the job done and it runs on a server that's rarely rebooted in my case.

# Need to make sure cups is running otherwise cloudprintd will not start
status cups | grep -q "start/running" || sleep 60
mfraser commented 9 years ago

Updated to the latest version this morning, now I'm getting: cloudprint-auth xxx@gmail.com GNOME environment required

cloudprint -c Google username: xxxx@gmail.com Graphical environment needed for OAuth2 login

I have python-gi installed, but I'm not installing GNOME just to get this running.

davesteele commented 9 years ago

@mfraser - You can run it on another machine with GNOME just for the authentication part, run armooo's version, or wait for another update.

heutger commented 9 years ago

I also have issues with dependencies. I use Raspberry as AirPrint Server and combined it with Cloudprint, until now with success. As I keep my system up to date, I just encountered that cloudprint and cloudprint-server can't be updated any more. I get the following errors if I try to install manually:

Die folgenden Pakete haben unerfüllte Abhängigkeiten: cloudprint : Hängt ab von: python:any (>= 2.7) ist aber nicht installierbar cloudprint-service : Hängt ab von: systemd soll aber nicht installiert werden E: Probleme können nicht korrigiert werden, Sie haben zurückgehaltene defekte Pakete.

Any possibility to keep cloudprint compatible with Raspberry? I do not see any possibilities to change the Python version neither to move to systemd.

davesteele commented 9 years ago

@heutger, the 'python:any' is a multi-architecture reference, saying that e.g. it doesn't matter if python is compiled for x86 or amd64. It has been in the code for a while, but I have been creating an independent PPA version for older distributions that don't support multiarch.

With the last Debian release, stable/Jessie now supports multiarch, so I've dropped the PPA branch.

I understand Jessie is available on Raspberry Pi, or you can force the install with 'dpkg --force-all -i '.

davesteele commented 9 years ago

0.11-8 removes the dependency for init-system-helpers.

heutger commented 9 years ago

Hi Dave,

I do an apt-get update, how can I force the update? Jessie seems not to be official for Raspberry Pi. The download page still only offers Wheezy, also recently updated, so it seems to be like an experiment to change the update paths to Jessie.

What do you mean with 0.11-8 dependency? However, doing an update, upgrade, dist-upgrade or explizit install cloudprint and cloudprint-service still shows the same error as above.

Regards, Christian

davesteele commented 9 years ago

Again, use the command-line installer dpkg, with the --force-all option, after downloading the debs.

The root problem of this thread (an installation complaint about init-system-helpers) is fixed with the latest release.

bits01 commented 9 years ago

This is still not fixed, on Linux Mint 17.1 I still see:

Dependency is not satisfiable: init-system-helpers (>= 1.18~)

when trying to update cloudprint-service using cloudprint-service_0.11-8_all.deb

davesteele commented 9 years ago

My mistake - it is used for systemd initialization.

I've looked in the Mint pool - it has version 0.13. There are some substantial differences for the scripts that are being used, but it looks like it might work.

Try the dpkg '--force-all' option. If it works for you (meaning that the service starts when it should), I'll relax the version restrictions that the build process placed on the package.

bits01 commented 9 years ago

Not sure what the plan is. It seems there are 2 problems here on Mint 17.1:

  1. init-system-helpers is 1.14 but the package requires 1.18
  2. there is no systemd on Mint 17 as it uses upstart instead
# dpkg -i cloudprint-service_0.11-8_all.deb 
(Reading database ... 216817 files and directories currently installed.)
Preparing to unpack cloudprint-service_0.11-8_all.deb ...
Unpacking cloudprint-service (0.11-8) over (0.11-6.1) ...
dpkg: dependency problems prevent configuration of cloudprint-service:
 cloudprint-service depends on init-system-helpers (>= 1.18~); however:
  Version of init-system-helpers on system is 1.14.
 cloudprint-service depends on systemd; however:
  Package systemd is not installed.

dpkg: error processing package cloudprint-service (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
 cloudprint-service

I don't really want to do a force-all and risk breaking cloud printing completely which is pretty fragile the way it is.

davesteele commented 9 years ago

You are right - no systemd is a deal killer.

bits01 commented 9 years ago

My solution for now is to put cloudprint and cloudprint-service packages on hold at version 0.11-6.1 They still seem to work OK for now, though authentication (/etc/init.d/cloudprintd login) no longer works, Google removed the old auth API. I backed up my /var/lib/cloudprintd/auth* files and they work once they are in place, but this it not a solution for new users unless they have a way to generate the auth files via some other method.

I would really like to see official support for Ubuntu 14.04 LTS though, this version will be around for another 4 yrs so it would be nice to support it, I suspect many people run it on servers for stability. Same deal with cloudprint, you usually run it on a server (at least that's what I do) rather than say a laptop that may be running the latest Ubuntu version.

iamthemitch commented 9 years ago

Issues too to install with ppa on my Readynas system. Based on a Debian 7.8.

The following packages have unmet dependencies:
 cloudprint : Depends: python:any (>= 2.7) but it is not installable
 cloudprint-service : Depends: init-system-helpers (>= 1.18~) but 1.13+netgear1 is to be installed
E: Unable to correct problems, you have held broken packages.
root@nas-80-10-05:~# dpkg -l|grep boost

I tried with manuel deb install

root@nas-80-10-05:~# dpkg -i --force-all cloudprint_0.11-9_all.deb 
Selecting previously unselected package cloudprint.
(Reading database ... 34170 files and directories currently installed.)
Unpacking cloudprint (from cloudprint_0.11-9_all.deb) ...
dpkg: cloudprint: dependency problems, but configuring anyway as you requested:
 cloudprint depends on python-cups; however:
  Package python-cups is not installed.
 cloudprint depends on python-daemon (<= 1.6); however:
  Package python-daemon is not installed.
 cloudprint depends on python:any (>= 2.7); however:
 cloudprint depends on python-pkg-resources; however:
  Package python-pkg-resources is not installed.
 cloudprint depends on rsyslog | system-log-daemon; however:
  Package rsyslog is not installed.
  Package system-log-daemon is not installed.

Setting up cloudprint (0.11-9) ...
root@nas-80-10-05:~# dpkg -i --force-all cloudprint-service_0.11-9_all.deb 
Selecting previously unselected package cloudprint-service.
(Reading database ... 34193 files and directories currently installed.)
Unpacking cloudprint-service (from cloudprint-service_0.11-9_all.deb) ...
dpkg: cloudprint-service: dependency problems, but configuring anyway as you requested:
 cloudprint-service depends on init-system-helpers (>= 1.18~); however:
  Version of init-system-helpers on system is 1.13+netgear1.

Setting up cloudprint-service (0.11-9) ...

Need to check wath is missing now...

heutger commented 9 years ago

Agree with bits, I may enforce, I also may upgrade to Jessie, although not official supported (not official posted via the official download site), but I would stay then accepting the hold back packages on updates and stay with cloudprint 0.11-6.1 and cloudprint-service 0.11-7 as final updateable versions. However, I also hope for a general solution.

davesteele commented 9 years ago

@iamthemitch, the install is complaining that you aren't running a systemd installation, or a release that understands multiarch.

The words 'official support' are being used. Perhaps those are not the right words to use here. I'd be happy to enable a more general solution, by accepting tested patches. One could start by grabbing a copy of the old init file, and running it with the latest cloudprint. i believe only the '-u' option needs to be adjusted. But, making something that would be at peace with both sysv and systemd is something I don't have the need to tackle.

0.11-9 is on the website. It removes the explicit GNOME requirement for establishing credentials.

iamthemitch commented 9 years ago

Got your point. Jumping to systemd is quite a technical gap, and extra work for "older" system. Just sad that it's broke the install on Debian 7.x stable (or Netgear has too much customized the system ?...), not so old and used as base system for a lot of distrib. Anyway, it's a great work to let use Google print from Linux! Will provide my changes if I find something more flexible.

bits01 commented 9 years ago

Ideally for Ubuntu 14.04 LTS and derivatives we should use upstart, not even sysv initd. The current initd file has problems because it can't properly wait for cups to start (I hacked mine to add a sleep 60 in there that just gets the job done but it's not the proper solution), there's a race as cups is started by upstart and cloudprint by initd, if we used upstart we could add a proper dependency on cups. I'm not an expert, just brief research and glancing at the man pages and other examples.

pryggi commented 9 years ago

Hi, I've got similar dependency issues on Raspbian Debian Wheezy. I had 11.5 installed manually "dpkg -i cloudprint*,deb" and it worked brilliantly until Google broke the authentication. Now, when I try to install 11.9 to get the OAuth login working, I get:

dpkg: dependency problems prevent configuration of cloudprint: cloudprint depends on python:any (>= 2.7).

dpkg: dependency problems prevent configuration of cloudprint-service: cloudprint-service depends on cloudprint; however: Package cloudprint is not configured yet. cloudprint-service depends on systemd; however: Package systemd is not installed.

Btw, Python 2.7.3 is installed.

I get similar messages when i add the repository and try to update using "sudo apt-get install cloudprint cloudprint-service".

Any advice?

davesteele commented 9 years ago

That question has been answered in this thread. Search for 'python:any'.

pryggi commented 9 years ago

Hi, Thanks for pointing it out to me. I skimmed through the thread and did not notice the "dpkg --force-all -i" bit.

Now, it seems that the packages are installed but as systemd was also missing, there are no cloudprintd service.

Anyway, I managed to get the OAuth authfile populated using the cps-auth, and I guess, I have to create init scripts for /usr/sbin/cloudprintd -a /var/lib/cloudprintd/authfile

Cheers.

mfraser commented 9 years ago

I've tried installing cloudprint-service 0.11-9 using sudo dpkg -i --force-all -i, but this still happens

dpkg: cloudprint-service: dependency problems, but configuring anyway as you requested: cloudprint-service depends on systemd; however: Package systemd is not installed.

And whenver I try to update the system, I get this udo apt-get dist-upgrade Reading package lists... Done Building dependency tree
Reading state information... Done You might want to run ‘apt-get -f install’ to correct these. The following packages have unmet dependencies. cloudprint-service : Depends: systemd but it is not installable E: Unmet dependencies. Try using -f.

ashokaiyar commented 9 years ago

I would dearly appreciate your help. I would like to use cloudprint on a headless Banana Pi M2 that is running Raspbian. I previously had it working on a headless Raspberry Pi B+ running Rasbian.

Using dpkg --force-all -i, I am able to install cloudprint and cloudprint-service (both version 0.11-9). Although this system doesn't have systemd, I am certain I can create an init.d script to start cloudprint at boot.

My problem is that I am unable to create an authentication file using cps-auth. I have a cloudprint-specific username (not my regular Google account) for cloudprint - I have tried using both regular authentication and just tried 2-step verification.

When I run "cps-auth my_cloudprint-username", I get the prompt "Enter code from browser authentication:"

I have tried putting in my 2-step verification password - but the authfile that is created is not populated with any password; instead, its contents are:

my_cloudprint-username@gmail.com None None

Could someone please help me figure this out?

Many, many thanks!

ashokaiyar commented 9 years ago

Ignore my previous comment - I setup X11 forwarding to my Mac and created the authfile. Just need to create suitable init scripts now.

Thanks!

mfonville commented 8 years ago

Even on Debian sid I get depedency troubles with pyton-requests being out of date. Maybe it is possible to expand the repository to contain some of the dependencies that is relied on, but that are not up to date enough in the regular (Debian) archives. That would enable all to easily fetch all necessary packages, also fixing directly possible issues for any Ubuntu users.

davesteele commented 8 years ago

That's a good idea. I won't be able to get to it soon, though.

I wasn't aware that 'requests' made an incompatible change. (and this won't help with the systemd issue)

davesteele commented 8 years ago

BTW, there's a bug for cloudprint deb not requiring python-requests.

bits01 commented 8 years ago

Here's a potential alternative by Google, though I have yet to try it: https://github.com/google/cups-connector But there are no easy to install packages.

mfonville commented 8 years ago

@bits01 They publish it in Apache/BSD license, so I guess it should be possible to wrap it in a deb package too. Google uses their 'Go' language instead of python, but maybe their work can be used as reference for @davesteele when implementing features.

davesteele commented 8 years ago

@mfonville - I'm not aware of any outstanding feature needs that code would address. Also note that feature work is typically upstream.

Recent work on backporting OAuth2 to Debian stable should help with restoring compatibility with Raspberry Pi, Ubuntu et. al.

See #35

bits01 commented 8 years ago

@davesteele when you say Ubuntu compatibility, does that include 14.04 LTS and its upstart or just newer systemd Ubuntu? Thanks.

davesteele commented 8 years ago

On Sun, Oct 4, 2015 at 2:09 PM, bits01 notifications@github.com wrote:

@davesteele https://github.com/davesteele when you say Ubuntu compatibility, does that included 14.04 LTS and its upstart or just newer systemd Ubuntu? Thanks.

The change reverts from systemd to a sysv init script. It is said to be compatible, but I have no experience with upstart.

bits01 commented 8 years ago

Any way to test it or is it not available yet?

davesteele commented 8 years ago

The branch is updates-jessie, if you know how to work with that. I'll run a package after I get reports back from Stable.

On Sun, Oct 4, 2015, 5:05 PM bits01 notifications@github.com wrote:

Any way to test it or is it not available yet?

— Reply to this email directly or view it on GitHub https://github.com/davesteele/cloudprint-service/issues/25#issuecomment-145387644 .

bits01 commented 8 years ago

I just discovered you posted these packages cloudprint-service_0.13-1+deb8u1+ppa1_all.deb cloudprint_0.13-1+deb8u1+ppa1_all.deb on http://davesteele.github.io/cloudprint-service/ Not sure how long ago. I kept some old 0.11.x version that still worked with old auth tokens that I generated in the past. But now I cleaned it all up and installed 0.13 on Linux Mint 17.2 and it's working OK so far.

There may still be a problem at startup, in the past cloudprintd would fail to start if cups was not already running (cups is started by upstart), my workaround was to do a "status cups" in the init.d script and wait for 60 sec. if it was not running. I haven't rebooted the server yet so I don't know what the situation is now.

Anyway, for those on Ubuntu 14.04 and derivatives, give the 0.13 version a try.

davesteele commented 8 years ago

Let me know how it works for you.

bits01 commented 8 years ago

Thanks. Would the script be called from the init.d script do_start? I can copy the script locally and add it there and see what happens on the next reboot (not sure when that will be though, this is a server that has multiple roles).

bits01 commented 8 years ago

And I've noticed an issue, please see #41: Jobs fail on the first try, succeed on second attempt after about 90 sec. delay

davesteele commented 8 years ago

Resolved in #36.

davesteele commented 8 years ago

Note that the 'deb8' versions at http://davesteele.github.io/cloudprint-service/ should be compatible with Ubuntu. Updating the Jessie/stable repository with a working version is covered by Debian bug #800163

aldee07 commented 7 years ago

You can try this PPA: http://neuro.debian.net/install_pkg.html?p=init-system-helpers

ranjitkumar518 commented 6 years ago

Run the below commands to add init-system-helpers wget -O- http://neuro.debian.net/lists/trusty.us-ca.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list sudo apt-key adv --recv-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9

sudo apt-get update sudo apt-get install init-system-helpers

This worked for me on Ubuntu 14.04