This commit is contained in:
milisbir 2018-08-20 17:02:36 +03:00
parent dda979c46a
commit 90d72f3995
5 changed files with 84 additions and 67 deletions

View File

@ -0,0 +1,29 @@
From 04b5a1ddac1dd90c5a392f23aaf7df42eae32918 Mon Sep 17 00:00:00 2001
From: Gaurav Sood <gaurav-sood@invalid-email.launchpad.net>
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):

View File

@ -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()

View File

@ -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))

View File

@ -1,3 +1 @@
# Pour que les scanners en reseau soient reconnus
#
echo "hpaio" >> /etc/sane.d/dll.conf

View File

@ -1,63 +1,56 @@
# Tanım: HP DeskJet, OfficeJet, Photosmart, Business Inkjet ve bazı LaserJet serileri için sürücü # 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 # 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 # 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ü # Grup: sürücü
isim=hplip isim=hplip
surum=3.16.10 surum=3.18.6
devir=1 devir=1
kaynak=(http://downloads.sourceforge.net/$isim/$isim-$surum.tar.gz 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 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() { derle() {
cd $isim-$surum 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 patch -Np0 -i ${SRC}/disable_upgrade.patch
# Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip # add missing 'include <cups/ppd.h>' at various places
# The hpcups driver does not use foomatic-rip patch -Np1 -i ${SRC}/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
local i # fix some handling unicode file names FS#58412
for i in ppd/hpijs/*.ppd.gz ; do patch -Np1 -i ${SRC}/0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch
rm -f ${i}.temp export PYTHON=/usr/bin/python3
gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \ export AUTOMAKE='automake --foreign'
gzip > ${i}.temp || return 1 autoreconf --force --install
mv ${i}.temp ${i}
done ./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' # remove config provided by sane and autostart of hp-daemon
autoreconf --force --install 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 \ # remove HAL .fdi file because HAL is no longer used
--enable-qt5 \ rm -vrf "$PKG"/usr/share/hal
--disable-qt4 \ #systemd sil
--disable-foomatic-rip-hplip-install \ rm -vrf "$PKG"/usr/lib/systemd
--enable-foomatic-ppd-install \ # remove rc script
--enable-hpcups-install \ rm -vrf "$PKG"/etc/init.d
--enable-new-hpcups \ #doc sil
--enable-cups-ppd-install \ rm -vrf "$PKG"/usr/share/doc
--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
# 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"
} }