From 90d72f399500106f5fa63877e5c3bc77364cb31f Mon Sep 17 00:00:00 2001 From: milisbir Date: Mon, 20 Aug 2018 17:02:36 +0300 Subject: [PATCH] hplip --- ...ng-of-unicode-filenames-in-sixext.py.patch | 29 +++++++ .../genel/h/hplip/disable_upgrade.patch | 14 +++ talimatname/genel/h/hplip/fix_tabs.patch | 17 ---- talimatname/genel/h/hplip/hplip.kur-kos | 4 +- talimatname/genel/h/hplip/talimat | 87 +++++++++---------- 5 files changed, 84 insertions(+), 67 deletions(-) create mode 100644 talimatname/genel/h/hplip/0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch create mode 100644 talimatname/genel/h/hplip/disable_upgrade.patch delete mode 100644 talimatname/genel/h/hplip/fix_tabs.patch diff --git a/talimatname/genel/h/hplip/0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch b/talimatname/genel/h/hplip/0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch new file mode 100644 index 000000000..f3a8c1732 --- /dev/null +++ b/talimatname/genel/h/hplip/0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch @@ -0,0 +1,29 @@ +From 04b5a1ddac1dd90c5a392f23aaf7df42eae32918 Mon Sep 17 00:00:00 2001 +From: Gaurav Sood +Date: Thu, 4 May 2017 18:32:08 +0200 +Subject: Fix handling of unicode filenames in sixext.py + +LP: #1480152 +Closes: #861731 +--- + base/sixext.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/base/sixext.py b/base/sixext.py +index 0bf4fc4f4..311bf72c6 100644 +--- a/base/sixext.py ++++ b/base/sixext.py +@@ -110,11 +110,11 @@ if PY3: + + + def to_string_utf8(s): +- return s.decode("utf-8") ++ return s.decode("utf-8", 'ignore') + + + def to_string_latin(s): +- return s.decode("latin-1") ++ return s.decode("latin-1", 'ignore') + + + def to_unicode(s, enc=None): diff --git a/talimatname/genel/h/hplip/disable_upgrade.patch b/talimatname/genel/h/hplip/disable_upgrade.patch new file mode 100644 index 000000000..f7d8fb322 --- /dev/null +++ b/talimatname/genel/h/hplip/disable_upgrade.patch @@ -0,0 +1,14 @@ +--- upgrade.py.orig 2013-10-31 12:46:54.000000000 +0100 ++++ upgrade.py 2013-12-04 14:58:03.000000000 +0100 +@@ -134,6 +134,11 @@ except getopt.GetoptError, e: + if os.getenv("HPLIP_DEBUG"): + log.set_level('debug') + ++ ++log.error("HPLIP upgrade is disabled by Archlinux for security reasons, see https://bugs.archlinux.org/task/38083 - if you like to upgrade HPLIP, use the Archlinux software package manager pacman.") ++clean_exit(1) ++ ++ + for o, a in opts: + if o in ('-h', '--help'): + usage() diff --git a/talimatname/genel/h/hplip/fix_tabs.patch b/talimatname/genel/h/hplip/fix_tabs.patch deleted file mode 100644 index 1552933df..000000000 --- a/talimatname/genel/h/hplip/fix_tabs.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- prnt/filters/hpps 2016-08-26 12:04:29.000000000 +0200 -+++ prnt/filters/hpps.new 2016-08-31 21:19:57.868640372 +0200 -@@ -191,11 +191,11 @@ - msg("Setting Pin to default") - else: - szKeyInitials = ['HPFIDigit', 'HPSEDigit', 'HPTHDigit', 'HPFTDigit'] -- for x in szKeyInitials: -+ for x in szKeyInitials: - try: -- secpin += opts[x] -+ secpin += opts[x] - except KeyError: -- secpin += '0' -+ secpin += '0' - - os.write(output_fd, to_bytes_utf8('@PJL SET HOLDKEY="%s"\x0a' % secpin)) - diff --git a/talimatname/genel/h/hplip/hplip.kur-kos b/talimatname/genel/h/hplip/hplip.kur-kos index eaf822ba0..8b1378917 100644 --- a/talimatname/genel/h/hplip/hplip.kur-kos +++ b/talimatname/genel/h/hplip/hplip.kur-kos @@ -1,3 +1 @@ -# Pour que les scanners en reseau soient reconnus -# -echo "hpaio" >> /etc/sane.d/dll.conf + diff --git a/talimatname/genel/h/hplip/talimat b/talimatname/genel/h/hplip/talimat index 5a51b16b8..aa89df9a5 100644 --- a/talimatname/genel/h/hplip/talimat +++ b/talimatname/genel/h/hplip/talimat @@ -1,63 +1,56 @@ # Tanım: HP DeskJet, OfficeJet, Photosmart, Business Inkjet ve bazı LaserJet serileri için sürücü # URL: http://hplipopensource.com/hplip-web/index.html -# Paketçi: alihan-ozturk28@hotmail.com +# Paketçi: milisarge # Gerekler: v4l-utils libgphoto2 python3-sip python3-qt5 avahi python3 wget ghostscript foomatic-db foomatic-db-engine usbutils sane xsane cups cups-filters rpcbind libusb libusb-compat net-snmp dbus-python python3-gobject python-notify python3-pillow python3-reportlab # Grup: sürücü isim=hplip -surum=3.16.10 +surum=3.18.6 devir=1 kaynak=(http://downloads.sourceforge.net/$isim/$isim-$surum.tar.gz + disable_upgrade.patch 0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch - fix_tabs.patch) - + 0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch) derle() { - cd $isim-$surum - patch -Np0 -i $SRC/fix_tabs.patch - patch -Np1 -i $SRC/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch + cd $isim-$surum + + patch -Np0 -i ${SRC}/disable_upgrade.patch - # Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip - # The hpcups driver does not use foomatic-rip - local i - for i in ppd/hpijs/*.ppd.gz ; do - rm -f ${i}.temp - gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \ - gzip > ${i}.temp || return 1 - mv ${i}.temp ${i} - done + # add missing 'include ' at various places + patch -Np1 -i ${SRC}/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch + # fix some handling unicode file names FS#58412 + patch -Np1 -i ${SRC}/0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch + export PYTHON=/usr/bin/python3 + export AUTOMAKE='automake --foreign' + autoreconf --force --install + + ./configure --prefix=/usr \ + --enable-qt5 \ + --disable-qt4 \ + --disable-policykit \ + --enable-hpcups-install \ + --enable-cups-drv-install \ + --enable-pp-build #--help + make + make -j1 rulesdir=/usr/lib/udev/rules.d DESTDIR="$PKG/" install - export AUTOMAKE='automake --foreign' - autoreconf --force --install + # remove config provided by sane and autostart of hp-daemon + rm -rf "$PKG"/etc/{sane.d,xdg} + install -dm755 ${PKG}/etc/sane.d/dll.d + echo hpaio > ${PKG}/etc/sane.d/dll.d/hpaio - ./configure --prefix=/usr \ - --enable-qt5 \ - --disable-qt4 \ - --disable-foomatic-rip-hplip-install \ - --enable-foomatic-ppd-install \ - --enable-hpcups-install \ - --enable-new-hpcups \ - --enable-cups-ppd-install \ - --enable-cups-drv-install \ - --enable-hpijs-install \ - --enable-foomatic-drv-install \ - --enable-pp-build \ - --enable-udev-acl-rules \ - --enable-dbus-build \ - --enable-scan-build \ - --enable-fax-build \ - --enable-network-build - make - make -j1 rulesdir=/usr/lib/udev/rules.d DESTDIR=$PKG install - - # hplip ne connait que lfs 6 ... - mkdir -pv $PKG/etc - echo "lfs 6" > $PKG/etc/issue - - # remove config provided by sane and autostart of hp-daemon - rm -rf $PKG/etc/{sane.d,xdg} - - # remove HAL .fdi file because HAL is no longer used - rm -vrf $PKG/usr/share/hal + # remove HAL .fdi file because HAL is no longer used + rm -vrf "$PKG"/usr/share/hal + #systemd sil + rm -vrf "$PKG"/usr/lib/systemd + # remove rc script + rm -vrf "$PKG"/etc/init.d + #doc sil + rm -vrf "$PKG"/usr/share/doc + # add mixed license file + install -Dt "${PKG}"/usr/share/licenses/${isim} -m644 COPYING + cd $PKG/usr/share/hplip + grep -rli python | xargs sed -i "s/\/usr\/bin\/env python/\/usr\/bin\/env python3/g" }