From owner-svn-ports-all@FreeBSD.ORG Sun Feb 15 13:43:00 2015 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97AB3EB; Sun, 15 Feb 2015 13:43:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 687BF9D6; Sun, 15 Feb 2015 13:43:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1FDh0WR046670; Sun, 15 Feb 2015 13:43:00 GMT (envelope-from mi@FreeBSD.org) Received: (from mi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1FDh0Du046669; Sun, 15 Feb 2015 13:43:00 GMT (envelope-from mi@FreeBSD.org) Message-Id: <201502151343.t1FDh0Du046669@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mi set sender to mi@FreeBSD.org using -f From: Mikhail Teterin Date: Sun, 15 Feb 2015 13:43:00 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r379036 - head/print/foomatic-db-engine/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2015 13:43:00 -0000 Author: mi Date: Sun Feb 15 13:42:59 2015 New Revision: 379036 URL: https://svnweb.freebsd.org/changeset/ports/379036 QAT: https://qat.redports.org/buildarchive/r379036/ Log: Add a patch, that removes the reference to bash from one of the installed scripts. (This was caught by the "QA step" here.) Added: head/print/foomatic-db-engine/files/ head/print/foomatic-db-engine/files/patch-foomatic-getpjloptions.in (contents, props changed) Added: head/print/foomatic-db-engine/files/patch-foomatic-getpjloptions.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/print/foomatic-db-engine/files/patch-foomatic-getpjloptions.in Sun Feb 15 13:42:59 2015 (r379036) @@ -0,0 +1,44 @@ +Do not require bash -- BSD sh(1) is perfectly capable of executing +this script. + +While here, replace use of perl in removal of some characters from +streams with the much lighter tr(1) invocations. Strip out +carriage-returns (\r) characters from remote printer's responses too. + +Remove useless braces around variable-names. + + -mi + +--- foomatic-getpjloptions.in 2015-02-14 07:21:56.000000000 -0500 ++++ foomatic-getpjloptions.in 2015-02-15 07:36:23.000000000 -0500 +@@ -1,3 +1,3 @@ +-#!@SH@ ++#!/bin/sh + # + # Polls PJL options from local or network printers +@@ -23,6 +23,5 @@ + NC=@NC@ + CAT=@CAT@ +-PRINTF=@PRINTF@ +-PERL=@PERL@ ++PRINTF=printf # sh builtin + + usage(){ +@@ -63,12 +62,13 @@ +- # We have two arguments, do ethernet printer request ++ # We have two arguments, do network printer request + # Poll the printer's answer and filter out the newpage characters ++ # as well as the carriage-returns (\r or, in octal, 015) +- ${NC} -w 3 ${1} ${2} 2>/dev/null | ${PERL} -p -e "s/\014//" ++ $NC -w 3 $1 $2 2>/dev/null | tr -d "\015\014" + else + # We have one argument, do local printer request + # Send commands to printer port +- ${CAT} > ${1} ++ $CAT > $1 + # Wait ten seconds for the printer to process the request + sleep 10 + # Poll the printer's answer and filter out the newpage and CR characters +- ${CAT} < ${1} | ${PERL} -p -e "s/[\015\014]//" ++ exec tr -d "\015\014" < $1 + fi