Removing cups 1.5.4 to install cups 1.6.4

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Removing cups 1.5.4 to install cups 1.6.4

Post#1 by francois » 28 Dec 2013, 15:30

I am working on v. 3.0 rc1 and would like to have clean try with cups 1.6.4, see:
http://forum.porteus.org/viewtopic.php? ... 9&start=30

How do I remove cups 1.5.4?

Thanks.

Note: As a few commands are useful and as I refer to them often, I put them here:
- cups command line
http://www.cups.org/documentation.php/options.html
- PKG_CONFIG_PATH environment variable
http://ubuntuforums.org/showthread.php?t=1091717
Last edited by francois on 04 Jan 2014, 20:51, edited 2 times in total.
Prendre son temps, profiter de celui qui passe.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Removing cups 1.5.4 to install cups 1.6.4

Post#2 by fanthom » 28 Dec 2013, 21:46

please unpack your module holding cups-1.5.4 (prinitng.xzm?) and then run following command:

Code: Select all

ROOT=/path/unpacked_module removepkg cups
now you can pack it back or add new cups to it (ROOT=/path/unpacked_module installpkg cups-1.6.4-*.txz) or whatever you want.
Please add [Solved] to your thread title if the solution was found.

beny
Full of knowledge
Full of knowledge
Posts: 2086
Joined: 02 Jan 2011, 11:33
Location: italy

Re: Removing cups 1.5.4 to install cups 1.6.4

Post#3 by beny » 29 Dec 2013, 00:39

francois if you have only the cups standalone module you can remove with deactivate module, and carry it out of modules folder,but if cups is inside one of cores modules yes you have a lot of trouble with it ,rebuild the printer.xzm pack

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Removing cups 1.5.4 to install cups 1.6.4

Post#4 by francois » 29 Dec 2013, 16:54

Thanks all for your interest. I have followed fanthom's strategy.

And for now it works. Except for the print test page. I can print files from okular and from libreoffice writer. With cups 1.6.4, it is said that we leave the ps era and enter in the pdf era. Thus pdf files become the standard for the printing system:
http://www.linuxfoundation.org/collabor ... enprinting
CUPS author Mike Sweet/Apple have decided to not include the Linux-specific CUPS filters in the upstream CUPS source any more and we have agreed to maintain them at OpenPrinting. Here we have done some clean-up and have discontinued the filters for the PostScript-centric workflow in favor of the PDF workflow, meaning that the upstream standard for CUPS under Linux (using CUPS plus our cups-filters package) is the PDF-based job processing, letting every non-PDF input be converted to PDF first, page management options being applied by a pdftopdf filter and Ghostscript being called with PDF as input.

Only exception is if the input data is PostScript and the printer is a PostScript printer or the printer driver requires PostScript as input. The we do not turn PostScript into PDF and back into PostScript but pass the PostScript through the pstops filter as before.
My residual problem is with printer test page. I need to convert a png file to PNG32. Presently, I am struggling with imagemagick-6.7.7_10-x86_64-1.txz that I found on pkgs.org. It does not have the right libraries. Would you have a file converter that could do some kind of similar job to imagemagik. Here is the transformation I ought to do:

Code: Select all

root@porteus:~# convert /usr/doc/cups/images/cups.png PNG32:cups.png
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Removing cups 1.5.4 to install cups 1.6.4

Post#5 by francois » 29 Dec 2013, 21:01

Thanks peter. I will try that. :)

However, the more I dive into the problem, the more I have the impression that this is not the solution.

I have put some thread on linuxquestion:
http://www.linuxquestions.org/questions ... ost5088619
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Removing cups 1.5.4 to install cups 1.6.4

Post#6 by francois » 29 Dec 2013, 22:00

OK. I found it. It wouldn't come out easily thru googling. Here is the solution to the absent print test page:
http://www.bsmdevelopment.com/Reference ... 30002.html
The unfortunate part is that the filter for banner pages has been handed over to the OpenPrinting Project. The really unfortunate part is that the printer test page is also a banner. This means that, when you install CUPS from source, and set up a printer, you can't print a test page to see if the printer works.
There are two ways to solve the problem. The first solution being very simple and the second one being very complicated. The first one is called: Revert To The Old Test Page:
Begin by downloading the postscript printer test page testprint-1.6.ps.gz.

The printer test page is normally found in the /usr/share/cups/data directory. You will see a file named "testprint". You can overwrite it or you can rename it to something like "testprint.pdf" to keep it around for posterity. Unzip the downloaded file and copy it to the directory, renaming it on the way:

su
mv /usr/share/cups/data/testprint /usr/share/cups/data/testprint.pdf
gunzip -c testprint-1.6.ps.gz >/usr/share/cups/data/testprint

That's all there is to it. You should now be able to print the postscript printer test page using the Web UI or by entering "lpr /usr/share/cups/data/testprint" at the command line.
For those who prefer to use the porteus module approach (i.e. download module and activate it):
http://www.mediafire.com/download/vi71h ... t-page.xzm
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Removing cups 1.5.4 to install cups 1.6.4

Post#7 by francois » 29 Dec 2013, 23:41

It did not make sense, at least to me, but a post referring to the same kind of problem, see:
http://forum.porteus.org/viewtopic.php? ... 9&start=30
The link being:
https://bugs.launchpad.net/ubuntu/+sour ... bug/710881

Thanks.
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Removing cups 1.5.4 to install cups 1.6.4

Post#8 by francois » 30 Dec 2013, 01:37

Finally, I got cups 1.7.0 functioning too under porteus 3.0. I am printing from my famous brother mfc-7840dw with the generic-pcl-laser ppd provided by 07-printing module. The only funny thing now that everything works out is that the /usr/share/cups/data/testprint page is superceded by that one of cups 1.5.4. I have the same problem with my 1.6.4 module. Interesting isn't?
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Removing cups 1.5.4 to install cups 1.6.4

Post#9 by francois » 30 Dec 2013, 03:12

I should at least come out with:

Code: Select all

root@porteus:~# slocate testprint
/root/.kde4/share/apps/RecentDocuments/testprint.desktop
/usr/share/cups/data/testprint
/usr/share/cups/data/testprint.pdf
root@porteus:~# 
Don't you have any of your special tricks in one of your sleeves^ :wink:
Prendre son temps, profiter de celui qui passe.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Removing cups 1.5.4 to install cups 1.6.4

Post#10 by fanthom » 30 Dec 2013, 03:30

The only funny thing now that everything works out is that the /usr/share/cups/data/testprint page is superceded by that one of cups 1.5.4. I have the same problem with my 1.6.4 module. Interesting isn't?
please check if you have older copy of testprint saved in your changes:
/mnt/live/memory/changes/usr/share/cups/data/testprint
if yes then boot into always fresh mode and delete this file from your save.dat or folder where you are saving changes.
explanation: files from changes are virtually 'overwriting' ones from modules in stackable aufs hierarchy: click here for more info
Please add [Solved] to your thread title if the solution was found.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Removing cups 1.5.4 to install cups 1.6.4

Post#11 by francois » 30 Dec 2013, 03:53

Hello fanthom. Thanks for having a look at it.

I am working linux (i.e. no .dat container) and in always fresh mode.

But you gave me an idea. I am going to save my modules and download rc1 anew. 8)
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Removing cups 1.5.4 to install cups 1.6.4

Post#12 by francois » 30 Dec 2013, 21:18

Thanks Peter,

It seems that I wrote that last post at the same time you were filling yours. Thus I never saw it. This is what I will do. However, I may take a few days off of porteus, as I have a few other things to do.

I imagine that by minimal you mean porteus base: 000-kernel, 001-core, 002-core, 003-kde and a browser 04-firefox in the case I need to fetch some files.
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Removing cups 1.5.4 to install cups 1.6.4

Post#13 by francois » 02 Jan 2014, 03:36

Finally, I decided to build cups 1.7.0. Here is the problem:
I have some difficulty building the cups-filter from:
https://github.com/willysr/SlackHacks/t ... ps-filters

Under root:

Code: Select all

root@porteus: ./cups-filters.SlackBuild
...
...
chown: invalid group: ‘root:root’
root@porteus:/mnt/sda5/64bit_v30/porteus/test-cups/cups-filter# 
Under normal user:

Code: Select all

guest@porteus:~/cups-filter$ su ./cups-filters.SlackBuild
No passwd entry for user './cups-filters.SlackBuild'
guest@porteus:~/cups-filter$ ./cups-filters.SlackBuild
mkdir: cannot create directory ‘/tmp/build/package-cups-filters’: Permission denied
Any turnaround? I would like to run ./cups-filters.SlackBuild in root mode.
Thanks.
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Removing cups 1.5.4 to install cups 1.6.4

Post#14 by francois » 02 Jan 2014, 05:48

I imagine you are right:

Code: Select all

root@porteus:/mnt/sda5/64bit_v30/porteus/test-cups/cups-1.7# id root
uid=0(root) gid=0 groups=0
This first link of yours does not work, but the second one is really on target. Thanks a lot, I will have a try during this day. :D
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Removing cups 1.5.4 to install cups 1.6.4 or cups 1.7.0

Post#15 by francois » 03 Jan 2014, 14:08

It seems that I got it sorted out. The difficult part was to build the cups-filters package. I should come back with the necessary cups package 1.6.x and 1.7.0 as soon as porteus 3.0 hits the road.
http://www.linuxfoundation.org/collabor ... enprinting
PDF is the standard print job format from CUPS 1.6.x on

All important desktop applications (GTK/GNOME, Qt/KDE, LibreOffice/OpenOffice.org, Firefox, Thunderbird, ...) send print jobs in PDF and not in PostScript any more by default. In addition, a complete CUPS filter chain to process print jobs in PDF is available and used.(continued)
These packages get us in the pdf era characteristic of the actual printer related packages: most packages are able to generate pdf files directly. There is no need to work with ps (postscript files) anymore.
http://www.bsmdevelopment.com/Reference ... 30002.html


Comment on cups 1.6.x and higher:

The cups package were built with the following slackbuilds:
https://github.com/willysr/SlackHacks/t ... uilds/cups
For some reason the slackbuild would not work out of the box, so I built some dependencies according to linux-from-scratch gracefully suggested by phhpro:
http://www.linuxfromscratch.org/blfs/vi ... lters.html

After playing around with cups 1.7.0, I can imagine some of the reasons that slackware is not completely ready for going 1.6.x and higher:
1.0 cups does no more support cups-filters which are supported from then on by the openprinting foundation. The slackbuild package that I found needs user root and group user root which we do not have on porteus. We have user root, but its associated group user is 0.
1.1 this has consequences on additional package building needed for cups-filters 1.0.43: poppler-0.24.4, qpdf-5.1.0 (which in turn need pcre-8.34) amongst others. At some point, you might be able to print with cups and cups-filter with your usual text editor (libreoffice ...), however the print test might fail. Here are two of the solutions to be implemented to have it going on:

1.12 qpdf building needs random number generator. Under porteus it seems that we do not have a functional random number generator which should be found into /dev/random /dev/urandom. This random number generator is needed for security reason or encryption thru qpdf.

At first glance cups 1.6.4 seems different, as it need less recent files. But it is still pdf oriented.
Prendre son temps, profiter de celui qui passe.

Post Reply