Page 1 of 1

building a package: printer solution with espgs-8.15.4

Posted: 22 Jul 2011, 23:44
by francois
Still struggling for a printer issue and nostalgious of Gusterrapolis printmodule:

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: ... 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: ... 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
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)
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/$/" &&
> ./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?

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

Posted: 23 Jul 2011, 03:12
by Ahau
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).

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

Posted: 23 Jul 2011, 10:59
by francois
Your knowledge, helps me build some of mine. It is quite appreciated.

'' Je vous suis redevant''.