#11 Fallback to proprietary plugin for Hbpl1 printers
Merged 6 months ago by zdohnal. Opened 6 months ago by zdohnal.
rpms/ zdohnal/hplip fallback_hbpl1_printers  into  rawhide

file modified
+1 -1
@@ -19,7 +19,7 @@ 

  # the directory can be used by other hplip tools, so we don't have to remove it if the failure happens

  if [ ! -d ~/.hplip ]

  then

-   @bindir@/mkdir ~/.hplip || @bindir@/echo "Cannot create the ~/.hplip dir, exiting" && exit 1

+   @bindir@/mkdir ~/.hplip || (@bindir@/echo "Cannot create the ~/.hplip dir, exiting" && exit 1)

  fi

  

  @bindir@/curl --create-dir -O  --output-dir ~/.hplip ${PLUGIN_SOURCE}

file modified
+25 -3
@@ -16,18 +16,40 @@ 

   

   hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)

  diff --git a/prnt/hpcups/Hbpl1.cpp b/prnt/hpcups/Hbpl1.cpp

- index 74a67f0..4cac4ab 100644

+ index 74a67f0..48f5f94 100644

  --- a/prnt/hpcups/Hbpl1.cpp

  +++ b/prnt/hpcups/Hbpl1.cpp

- @@ -72,11 +72,6 @@ Hbpl1::Hbpl1 () : Encapsulator ()

+ @@ -60,7 +60,7 @@ Hbpl1::Hbpl1 () : Encapsulator ()

+      m_ColorMode = COLORTYPE_BOTH; //Grayscale

+      m_ColorTheme = NONE;

+  

+ -    /*m_hHPLibHandle = load_plugin_library(UTILS_PRINT_PLUGIN_LIBRARY, PRNT_PLUGIN_HBPL1);

+ +    m_hHPLibHandle = load_plugin_library(UTILS_PRINT_PLUGIN_LIBRARY, PRNT_PLUGIN_HBPL1);

+      if (m_hHPLibHandle)

+      {

+          dlerror ();

+ @@ -71,12 +71,7 @@ Hbpl1::Hbpl1 () : Encapsulator ()

+  

           if ((m_pHbpl1Wrapper = fptr_create(this)) == NULL)

                m_init = false;

-      }*/

+ -    }*/

  -    m_pHbpl1Wrapper = new Hbpl1Wrapper(this);

  -    if(m_pHbpl1Wrapper == NULL)

  -	m_init = false;

  -    else

  -	m_init = true;

+ +    }

   }

   

   Hbpl1::~Hbpl1()

+ @@ -93,8 +88,8 @@ Hbpl1::~Hbpl1()

+          if(fptr_destroy)

+              fptr_destroy( m_pHbpl1Wrapper );

+  

+ -        //unload_library(m_hHPLibHandle);

+ -        //m_hHPLibHandle = NULL;

+ +        unload_library(m_hHPLibHandle);

+ +        m_hHPLibHandle = NULL;

+      }

+  }

+  

file modified
+12 -1
@@ -7,7 +7,7 @@ 

  Summary: HP Linux Imaging and Printing Project

  Name: hplip

  Version: 3.23.5

- Release: 7%{?dist}

+ Release: 8%{?dist}

  # most files (base/*, *, ui*/...) - GPL2+

  # prnt/hpijs/ jpeg related files - IJG

  # prnt/* - BSD-3-Clause - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 - proposed as BSD-3-Clause-HP
@@ -229,6 +229,7 @@ 

  # be shared and copied for other than archival purposes without HP permission

  # - this looks as incompatible conditional for Fedora, so the files are removed,

  # hplip repacked and this patch removes its mentions in Makefile.am

+ # https://bugs.launchpad.net/hplip/+bug/2028938

  Patch66: hplip-nocdmfilter.patch

  # 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed

  # https://bugs.launchpad.net/hplip/+bug/2027972
@@ -242,8 +243,10 @@ 

  # Upstream https://bugs.launchpad.net/hplip/+bug/2028001

  Patch69: hplip-no-readfp.patch

  # fix SyntaxWarning from python3.12

+ # https://bugs.launchpad.net/hplip/+bug/2029480

  Patch70: hplip-use-raw-strings.patch

  # more unfriendly licenses...

+ # https://bugs.launchpad.net/hplip/+bug/2028938

  Patch71: hplip-remove-hbpl.patch

  

  %if 0%{?fedora} || 0%{?rhel} <= 8
@@ -587,6 +590,8 @@ 

  %patch -P 64 -p1 -b .pcardext-disable

  # C99 compatibility patch by fweimer - undefined strcasestr() in sclpml.c - build with _GNU_SOURCE

  %patch -P 65 -p1 -b .sclpml-strcasestr

+ # jetlib.h/.c have suspicious license, root them out

+ # https://bugs.launchpad.net/hplip/+bug/2028938

  %patch -P 66 -p1 -b .nocdmfilter

  # 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed

  # https://bugs.launchpad.net/hplip/+bug/2027972
@@ -597,7 +602,10 @@ 

  # 2221311 - [python3.12] hplip tools/binaries crash due depending on removed configparser.readfp()

  # Upstream https://bugs.launchpad.net/hplip/+bug/2028001

  %patch -P 69 -p1 -b .no-readfp

+ # fix warnings

+ # upstream https://bugs.launchpad.net/hplip/+bug/2029480

  %patch -P 70 -p1 -b .raw-strings

+ # upstream https://bugs.launchpad.net/hplip/+bug/2028938

  %patch -P 71 -p1 -b .hbpl

  

  # Fedora specific patches now, don't put a generic patches under it
@@ -969,6 +977,9 @@ 

  %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio

  

  %changelog

+ * Thu Aug 03 2023 Zdenek Dohnal <zdohnal@redhat.com> - 3.23.5-8

+ - fallback to using external plugin for Hbpl1 printers

+ 

  * Fri Jul 28 2023 Zdenek Dohnal <zdohnal@redhat.com> - 3.23.5-7

  - SPDX migration

  

Since files for Hbpl1 printers were removed until the licensing is
cleared up, try to fall back to proprietary plugin.

1 new commit added

  • hp-plugin.in: Add brackets to prevent early exit
6 months ago

Pull-Request has been merged by zdohnal

6 months ago