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
# Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip patch -Np0 -i ${SRC}/disable_upgrade.patch
# 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 <cups/ppd.h>' 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' export AUTOMAKE='automake --foreign'
autoreconf --force --install autoreconf --force --install
./configure --prefix=/usr \ ./configure --prefix=/usr \
--enable-qt5 \ --enable-qt5 \
--disable-qt4 \ --disable-qt4 \
--disable-foomatic-rip-hplip-install \ --disable-policykit \
--enable-foomatic-ppd-install \
--enable-hpcups-install \ --enable-hpcups-install \
--enable-new-hpcups \
--enable-cups-ppd-install \
--enable-cups-drv-install \ --enable-cups-drv-install \
--enable-hpijs-install \ --enable-pp-build #--help
--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
make -j1 rulesdir=/usr/lib/udev/rules.d DESTDIR=$PKG install 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 # remove config provided by sane and autostart of hp-daemon
rm -rf $PKG/etc/{sane.d,xdg} rm -rf "$PKG"/etc/{sane.d,xdg}
install -dm755 ${PKG}/etc/sane.d/dll.d
echo hpaio > ${PKG}/etc/sane.d/dll.d/hpaio
# remove HAL .fdi file because HAL is no longer used # remove HAL .fdi file because HAL is no longer used
rm -vrf $PKG/usr/share/hal 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"
} }