Author: arekm Date: Wed Nov 30 18:09:34 2011 GMT Module: packages Tag: HEAD ---- Log message: - patch binary plugin to fix https://bugs.launchpad.net/hplip/+bug/666780 (32bit only fix for now)
---- Files affected: packages/hplip: hplip.spec (1.91 -> 1.92) , hplip-binary-fixup.patch (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: packages/hplip/hplip.spec diff -u packages/hplip/hplip.spec:1.91 packages/hplip/hplip.spec:1.92 --- packages/hplip/hplip.spec:1.91 Wed Nov 30 11:39:07 2011 +++ packages/hplip/hplip.spec Wed Nov 30 19:09:28 2011 @@ -12,7 +12,7 @@ Summary(pl.UTF-8): Narzędzia Hewlett-Packard Linux Imaging and Printing - drukowanie i skanowanie przy użyciu urządzeń HP Name: hplip Version: 3.11.10 -Release: 1 +Release: 1.2 License: BSD (hpijs), MIT (low-level scanning and printing code), GPL v2 (the rest) Group: Applications/System Source0: http://downloads.sourceforge.net/hplip/%{name}-%{version}.tar.gz @@ -20,6 +20,7 @@ Patch0: %{name}-desktop.patch Patch1: unresolved.patch Patch2: pld-distro.patch +Patch3: %{name}-binary-fixup.patch URL: http://hplipopensource.com/ BuildRequires: autoconf BuildRequires: automake @@ -157,6 +158,7 @@ %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %{__sed} -i -e's,^#!/usr/bin/env python$,#!/usr/bin/python,' *.py %{__sed} -i -e 's#test -d /usr/share/polkit-1#true#' configure.in @@ -376,6 +378,9 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.92 2011/11/30 18:09:28 arekm +- patch binary plugin to fix https://bugs.launchpad.net/hplip/+bug/666780 (32bit only fix for now) + Revision 1.91 2011/11/30 10:39:07 arekm - up to 3.11.10 ================================================================ Index: packages/hplip/hplip-binary-fixup.patch diff -u /dev/null packages/hplip/hplip-binary-fixup.patch:1.1 --- /dev/null Wed Nov 30 19:09:34 2011 +++ packages/hplip/hplip-binary-fixup.patch Wed Nov 30 19:09:28 2011 @@ -0,0 +1,44 @@ +--- hplip-3.11.10/base/pkit.py~ 2011-10-02 05:06:15.000000000 +0200 ++++ hplip-3.11.10/base/pkit.py 2011-11-30 19:07:51.344925378 +0100 +@@ -318,7 +318,28 @@ + log.debug("shutdown: %s" % str(e)) + return False + +- ++def binaryPatch(f): ++ try ++ # file, md5sum, replace content at address with specified byte ++ patches = { 'lj-x86_32.so' : { 'md5': '30bdf8c844508a53d80362f9eba670c5', ++ # https://bugs.launchpad.net/hplip/+bug/666780 ++ 'replace' : [ (0xA068, 0x10) ] ++ } } ++ if f in patches: ++ d = open(f, 'rb').read() ++ m = hashlib.md5() ++ m.update(d) ++ m.digest() ++ if patches[f]['md5'] == m.hexdigest(): ++ file = open(f, 'rb+') ++ for (addr, val) in patches[f]['replace']: ++ file.seek(addr) ++ file.write(chr(val)) ++ file.close() ++ except Exception, e: ++ log.debug("binaryPatch: %s" % str(e)) ++ return False ++ return True + + def copyPluginFiles(src_dir): + os.chdir(src_dir) +@@ -411,6 +432,11 @@ + continue + + else: ++ ++ if not binaryPatch(trg): ++ log.error("Target file %s could not be binary patched to fixup bugs." % trg) ++ continue ++ + if not os.path.exists(trg): + log.error("Target file %s does not exist. File copy failed." % trg) + continue ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/hplip/hplip.spec?r1=1.91&r2=1.92&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
