Commit a1755d38 authored by Didier Raboud's avatar Didier Raboud

Imported Upstream version 3.11.12

parent a56bf82d

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -93,6 +93,7 @@ hp_mkuri_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\"
# hpmud.rules
rulesdir = /etc/udev/rules.d
dist_rules_DATA = data/rules/56-hpmud_support.rules
dist_rules_DATA += data/rules/86-hpmud_plugin.rules
if UDEV_ACL_RULES
dist_rules_DATA += data/rules/40-hplip.rules
else
......@@ -113,6 +114,9 @@ pstotiff_SCRIPTS = fax/filters/pstotiff
hplip_statedir = /var/lib/hp
dist_hplip_state_DATA = hplip.state
# Log Files
hplip_Logdir=/var/log/hp
if FULL_BUILD
dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py
......@@ -122,7 +126,7 @@ dist_noinst_SCRIPTS += dat2drv.py install.py hplip-install init-suse-firewall in
cmddir = $(hplipdir)
dist_cmd_SCRIPTS = align.py info.py print.py toolbox.py clean.py colorcal.py unload.py testpage.py makeuri.py check.py fab.py levels.py \
sendfax.py setup.py makecopies.py probe.py timedate.py firmware.py scan.py systray.py plugin.py linefeedcal.py pqdiag.py \
faxsetup.py devicesettings.py printsettings.py query.py pkservice.py wificonfig.py
faxsetup.py devicesettings.py printsettings.py query.py pkservice.py wificonfig.py check-plugin.py diagnose_plugin.py
# base
basedir = $(hplipdir)/base
......@@ -182,6 +186,7 @@ postscriptdir = $(hplipdir)/data/ps
localzdir = $(hplipdir)/data/localization
dist_postscript_DATA = data/ps/testpage.ps.gz data/ps/clean_page.pdf.gz
dist_models_DATA = data/models/models.dat
dist_hplip_Log_DATA=
if GUI_BUILD
dist_images_16x16_DATA = data/images/16x16/*
......@@ -423,7 +428,7 @@ if HPCUPS_INSTALL
#if NEW_HPCUPS
hpcupsdir = $(cupsfilterdir)
hpcups_PROGRAMS = hpcups
hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hpcups/Compressor.cpp prnt/hpcups/Compressor.h \
hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hpcups/dbuscomm.cpp prnt/hpcups/dbuscomm.h prnt/hpcups/Compressor.cpp prnt/hpcups/Compressor.h \
prnt/hpcups/Mode2.cpp prnt/hpcups/Mode2.h prnt/hpcups/Mode3.cpp prnt/hpcups/Mode3.h \
prnt/hpcups/Mode9.cpp prnt/hpcups/Mode9.h prnt/hpcups/Mode10.cpp prnt/hpcups/Mode10.h \
prnt/hpcups/ModeDeltaPlus.cpp prnt/hpcups/ModeDeltaPlus.h prnt/hpcups/ModeJbig.cpp prnt/hpcups/ModeJbig.h \
......@@ -455,8 +460,8 @@ prnt/hpcups/LJZjStream.cpp prnt/hpcups/LJZjStream.h \
prnt/hpcups/dj3600ColorMaps.cpp prnt/hpcups/dj3320PrintModes.h \
prnt/hpcups/dj4100PrintModes.h
hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG)
hpcups_LDADD = -ljpeg -ldl -lcups -lcupsimage
hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
hpcups_LDADD = -ljpeg -ldl -lcups -lcupsimage $(DBUS_LIBS)
#else
#hpcupsdir = $(cupsfilterdir)
#hpcups_PROGRAMS = hpcups
......@@ -498,6 +503,18 @@ cupsdrv2dir = $(drvdir)
cupsdrv2_DATA = $(cups_drv)
endif
install-dist_hplip_LogDATA:
if FULL_BUILD
test -z "$(DESTDIR)$(hplip_Logdir)" || mkdir -p $(DESTDIR)$(hplip_Logdir)
chgrp "lp" -R $(DESTDIR)$(hplip_Logdir)
chmod 774 $(DESTDIR)$(hplip_Logdir)
endif #FULL_BUILD
if HPLIP_BUILD
test -z "$(DESTDIR)$(hplip_Logdir)" || mkdir -p $(DESTDIR)$(hplip_Logdir)
chgrp "lp" -R $(DESTDIR)$(hplip_Logdir)
chmod 774 $(DESTDIR)$(hplip_Logdir)
endif #FULL_BUILD
install-data-hook:
if HPLIP_BUILD
# If scanner build, add hpaio entry to sane dll.conf.
......
This diff is collapsed.
......@@ -860,4 +860,5 @@ WIFI_CONFIG_LEDM = 3
SUPPORT_UNRELEASED = 0
SUPPORT_RELEASED = 1
#USB-Autoplugin-installation
EVENT_AUTO_CONFIGURE = 900
......@@ -94,6 +94,11 @@ ip_pat = re.compile(r"""\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25
dev_pat = re.compile(r"""/dev/.+""", re.IGNORECASE)
usb_pat = re.compile(r"""(\d+):(\d+)""", re.IGNORECASE)
### **********Lambda Function UniStar for checking type of arguments to constructor of class event*******************************
UniStr = lambda title: isinstance(title, str) and utils.xrstrip(title, '\x00')[:128] or utils.xrstrip(title, '\x00')[:128].encode('utf-8')
#
# Event Wrapper Class for pipe IPC
#
......@@ -102,13 +107,13 @@ class Event(object):
def __init__(self, device_uri, printer_name, event_code,
username=prop.username, job_id=0, title='',
timedate=0):
self.device_uri = unicode(utils.xrstrip(device_uri, '\x00'))[:128].encode('utf-8')
self.printer_name = unicode(utils.xrstrip(printer_name, '\x00'))[:128].encode('utf-8')
# UniStr = lambda title: isinstance(title, str) and utils.xrstrip(title, '\x00')[:128] or utils.xrstrip(title, '\x00')[:128].encode('utf-8')
self.device_uri = UniStr(device_uri)
self.printer_name = UniStr(printer_name)
self.event_code = int(event_code)
self.username = unicode(utils.xrstrip(username, '\x00'))[:32].encode('utf-8')
self.username = UniStr(username)
self.job_id = int(job_id)
self.title = unicode(utils.xrstrip(title, '\x00'))[:128].encode('utf-8')
self.title = UniStr(title)
if timedate:
self.timedate = float(timedate)
......@@ -2631,3 +2636,6 @@ class LocalOpener_LEDM(urllib.URLopener):
reply.seek(0)
return reply.getvalue()
......@@ -160,7 +160,6 @@ TECH_CLASS_PDLS = {
"StingrayOJ" : 'pcl3',
"Copperhead" : 'pcl3',
"Ampere" : 'pcl3'
}
PDL_TYPE_PCL = 0 # less preferred
......
......@@ -479,16 +479,25 @@ def run_plugin_command(required=True, plugin_reason=PLUGIN_REASON_NONE):
if not required:
req = '--optional'
if utils.which("hp-plugin"):
cmd = su_sudo % ("hp-plugin -u %s --reason %s" % (req, plugin_reason))
p_path="hp-plugin"
else:
p_path="python ./plugin.py"
if 'gksu' in su_sudo:
cmd = su_sudo % ("%s -u %s --reason %s" % (p_path, req, plugin_reason))
cmd +=" -m"
cmd += (" \"hp-plugin:- HP Device requires to install HP proprietary plugin. Please enter user (sudo) password to continue\"")
else:
cmd = su_sudo % ("python ./plugin.py -u %s --reason %s" % (req, plugin_reason))
cmd = su_sudo % ("%s -u %s --reason %s To_install_plugin_for_HP_Device" % (p_path, req, plugin_reason))
log.debug("%s" % cmd)
if password_f is not None:
status, output = utils.run(cmd, log_output=True, password_func=password_f, timeout=1)
else:
status, output = utils.run(cmd, log_output=True, password_func=None, timeout=1)
return (status == 0, True)
......
......@@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Author: Don Welch, Naga Samrat Chowdary Narla, Goutam Kodu
# Author: Don Welch, Naga Samrat Chowdary Narla, Goutam Kodu, Amarnath Chitumalla
#
# Thanks to Henrique M. Holschuh <hmh@debian.org> for various security patches
#
......@@ -26,6 +26,7 @@ from __future__ import generators
# Std Lib
import sys
import os
from subprocess import Popen, PIPE
import grp
import fnmatch
import tempfile
......@@ -1042,13 +1043,13 @@ def get_password_ui():
fp.close()
if qt is "qt4":
from ui4.setupdialog import showPasswordUI
username, password = showPasswordUI("Your printer requires to install HP proprietary plugin\nPlease enter root/superuser password to continue")
username, password = showPasswordUI("Your HP Device requires to install HP proprietary plugin\nPlease enter root/superuser password to continue", "root", False)
if qt is "qt3":
from ui.setupform import showPasswordUI
username, password = showPasswordUI("Your priter requires to install HP proprietary plugin\nPlease enter root/superuser password to continue")
return password
username, password = showPasswordUI("Your HP Device requires to install HP proprietary plugin\nPlease enter root/superuser password to continue", "root", False)
return password
def run(cmd, log_output=True, password_func=get_password, timeout=1):
def run(cmd, log_output=True, password_func=get_password, timeout=1, spinner=True):
output = cStringIO.StringIO()
try:
......@@ -1058,7 +1059,9 @@ def run(cmd, log_output=True, password_func=get_password, timeout=1):
try:
while True:
update_spinner()
if spinner:
update_spinner()
i = child.expect(["[pP]assword:", pexpect.EOF, pexpect.TIMEOUT])
if child.before:
......@@ -1074,7 +1077,8 @@ def run(cmd, log_output=True, password_func=get_password, timeout=1):
child.sendline(password_func())
else:
child.sendline(get_password())
elif i == 1: # EOF
break
......@@ -1084,8 +1088,8 @@ def run(cmd, log_output=True, password_func=get_password, timeout=1):
except Exception, e:
log.error("Exception: %s" % e)
cleanup_spinner()
if spinner:
cleanup_spinner()
child.close()
return child.exitstatus, output.getvalue()
......@@ -1581,7 +1585,7 @@ encoding: utf8
log.info("contact the HPLIP Team.")
log.info(".SH COPYRIGHT")
log.info("Copyright (c) 2001-9 Hewlett-Packard Development Company, L.P.")
log.info("Copyright (c) 2011-14 Hewlett-Packard Development Company, L.P.")
log.info(".LP")
log.info("This software comes with ABSOLUTELY NO WARRANTY.")
log.info("This is free software, and you are welcome to distribute it")
......@@ -1600,7 +1604,7 @@ def log_title(program_name, version, show_ver=True): # TODO: Move to base/module
log.info(log.bold("%s ver. %s" % (program_name, version)))
log.info("")
log.info("Copyright (c) 2001-9 Hewlett-Packard Development Company, LP")
log.info("Copyright (c) 2011-14 Hewlett-Packard Development Company, LP")
log.info("This software comes with ABSOLUTELY NO WARRANTY.")
log.info("This is free software, and you are welcome to distribute it")
log.info("under certain conditions. See COPYING file for more details.")
......@@ -1708,3 +1712,42 @@ def escape(s):
s = s.replace(unichr(c), u"&#%d;" % c)
return s
# checks if given process is running.
#return value:
# True or False
# None - if process is not running
# grep output - if process is running