From a4442f752aca1600a613c34da2f6bfc0b2f02d5f Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 24 Nov 2020 12:00:50 +0100 Subject: [PATCH] Remove ncp backend It uses 'nprint' command, which is no longer available. --- cups.spec | 2 -- ncp.backend | 51 --------------------------------------------------- 2 files changed, 53 deletions(-) delete mode 100755 ncp.backend diff --git a/cups.spec b/cups.spec index 3493581..288b3ec 100644 --- a/cups.spec +++ b/cups.spec @@ -24,7 +24,6 @@ Source1: cupsprinter.png # Logrotate configuration Source2: cups.logrotate # Backend for NCP protocol -Source3: ncp.backend Source4: macros.cups # PAM enablement, very old patch, not even git can track when or why @@ -443,7 +442,6 @@ mv %{buildroot}%{_unitdir}/org.cups.cups-lpd@.service %{buildroot}%{_unitdir}/cu mkdir -p %{buildroot}%{_datadir}/pixmaps %{buildroot}%{_sysconfdir}/X11/sysconfig %{buildroot}%{_sysconfdir}/X11/applnk/System %{buildroot}%{_sysconfdir}/logrotate.d install -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/cups -install -p -m 755 %{SOURCE3} %{buildroot}%{cups_serverbin}/backend/ncp # Ship an rpm macro for where to put driver executables. mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d diff --git a/ncp.backend b/ncp.backend deleted file mode 100755 index d57ada1..0000000 --- a/ncp.backend +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# This is a modified version of 'ncpprint'. It can now be used as a CUPS -# backend. -# Modifications: -# Copyright (C) 2002 Red Hat, inc -# Copyright (C) 2002 Tim Waugh -# Before modification: shipped as /usr/share/printconf/util/ncpprint - -if [ -z "$*" ] -then - # This is where we would enumerate all the URIs we support. - # Patches welcome. - exit 0 -fi - -FILE=$6 -if [ -z "$FILE" ] -then - FILE=- -fi - -# $DEVICE_URI is 'ncp://[user:password@]server/queue' -URI=${DEVICE_URI#*://} -queue=${URI#*/} -URI=${URI%/$queue} -server=${URI#*@} -URI=${URI%$server} -URI=${URI%@} -if [ -n "$URI" ] -then - user=${URI%:*} - URI=${URI#$user} - password=${URI#:} -fi - -#echo user: ${user-(none)} -#echo password: ${password-(none)} -#echo server: $server -#echo queue: $queue - -if [ -n "$user" ] -then - if [ -n "$password" ] - then - /usr/bin/nprint -S "$server" -q "$queue" -U "$user" -P "$password" -N "$FILE" 2>/dev/null - else - /usr/bin/nprint -S "$server" -q "$queue" -U "$user" -n -N "$FILE" 2>/dev/null - fi -else - /usr/bin/nprint -S "$server" -q "$queue" -N "$FILE" 2>/dev/null -fi