building a package: printer solution with espgs-8.15.4

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
User avatar
francois
Contributor
Contributor
Posts: 4902
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

building a package: printer solution with espgs-8.15.4

Post#1 by francois » 22 Jul 2011, 23:44

Still struggling for a printer issue and nostalgious of Gusterrapolis printmodule:
http://www.slax.org/modules.php?action=detail&id=26

I just threw myself on the task of trying to build the package. I thought I could use Wread hplip and build over it to get Gusterrapolis module. It seems essentially to be built on espgs:
http://www.linuxfromscratch.org/blfs/vi ... espgs.html

I need some help though. If I ever achieve the package, I will provide with the detailed steps needed to build this package for Porteus.

For now I am stuck with downloading the the patch for espgs-8.15.4:
http://www.linuxfromscratch.org/blfs/vi ... espgs.html

I made a copy of the text of the file, created a new file called espgs-8.15.4-bov_fix-1.patch, gave execute permission and put it in the folder /root/Downloads/espgs-8.15.4 where I unpacked the package for compilation. The patch comes as a text in this form:

Code: Select all

Submitted By:            Randy McMurchy <randy_at_linuxfromscratch_dot_org>
Date:                    2008-03-24
Initial Package Version: 8.15.4
Upstream Status:         In GPL Ghostscript SVN
Origin:                  http://bugs.gentoo.org/attachment.cgi?id=143467
Description:             Fixes a buffer overflow vulnerability


diff -Naur espgs-8.15.4-orig/src/zicc.c espgs-8.15.4/src/zicc.c
--- espgs-8.15.4-orig/src/zicc.c	2005-01-19 04:08:41.000000000 +0000
+++ espgs-8.15.4/src/zicc.c	2008-03-25 03:56:08.000000000 +0000
@@ -80,6 +80,9 @@
     dict_find_string(op, "N", &pnval);
     ncomps = pnval->value.intval;
 
+    if (2*ncomps > sizeof(range_buff)/sizeof(float))
+       return_error(e_rangecheck);
+
     /* verify the DataSource entry */
     if (dict_find_string(op, "DataSource", &pstrmval) <= 0)
         return_error(e_undefined);
The error message I got trying to install the patch was:

Code: Select all

bash-4.1# patch -Np1 -i ../espgs-8.15.4-bov_fix-1.patch &&
> sed -i "s/bbox.dev$/x11.dev/" Makefile.in &&
> ./configure --prefix=/usr \
>             --enable-threads \
>             --without-omni &&
> make
patch: **** Can't open patch file ../espgs-8.15.4-bov_fix-1.patch : No such file or directory
There seems to be a few missing symbols or something wrong with it.

Any suggestion?
Voltaire: Le mieux est l'ennemi du bien.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: building a package: printer solution with espgs-8.15.4

Post#2 by Ahau » 23 Jul 2011, 03:12

remove everything before 'diff'. save it as plain text, no need to chmod +x it. put it in the folder with the source makefile, and run:

patch -p1 < nameofyourtextfile

Make sure the arrow is pointing the right way (like 'lesser than').

Patch is it's own utility, and will search and replace the text as generated by the 'diff' utility. It reads the text file and interprets all of those crazy plus and minus symbols to figure out where to apply the changes. You can't run the patch as a script. Good luck!

Posted after 5 minutes 54 seconds:
If you open the file inside the source code, at espgs-8.15.4 -orig/src/zicc.c, and go to line 80, you should see some of the code that is in the patch file. that is what will get changed (looks like they added just a couple lines).
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
francois
Contributor
Contributor
Posts: 4902
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: building a package: printer solution with espgs-8.15.4

Post#3 by francois » 23 Jul 2011, 10:59

Your knowledge, helps me build some of mine. It is quite appreciated.

'' Je vous suis redevant''.
Voltaire: Le mieux est l'ennemi du bien.

Post Reply