From 593852005840ebd319562b051eddf32dbd2b6972 Mon Sep 17 00:00:00 2001 From: pdancak Date: Mon, 23 Jun 2025 10:42:30 +0200 Subject: [PATCH] Resolves: RHEL-84817 --- hp-plugin.in | 2 +- hplip-plugin-curl.patch | 6 +++--- hplip.spec | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hp-plugin.in b/hp-plugin.in index 542db7c..1c0a827 100644 --- a/hp-plugin.in +++ b/hp-plugin.in @@ -16,7 +16,7 @@ download() { SOURCE="$1" - @bindir@/curl --create-dirs -O --output-dir ~/.hplip ${SOURCE} + @bindir@/curl --create-dirs -O --output-dir ~/.hplip --location ${SOURCE} } # link to the plugin diff --git a/hplip-plugin-curl.patch b/hplip-plugin-curl.patch index 023e528..380ce9b 100644 --- a/hplip-plugin-curl.patch +++ b/hplip-plugin-curl.patch @@ -32,7 +32,7 @@ index 56683fb..031ceec 100755 - cmd = "%s --cache=off -P %s %s" % (wget,self.__plugin_path,src) + curl = utils.which("curl", True) + if curl: -+ cmd = "%s --create-dirs -O --output-dir %s %s" % (curl,self.__plugin_path,src) ++ cmd = "%s --create-dirs -O --output-dir %s --location %s" % (curl,self.__plugin_path,src) log.debug(cmd) status, output = utils.run(cmd) - log.debug("wget returned: %d" % status) @@ -43,7 +43,7 @@ index 56683fb..031ceec 100755 src = os.path.join(PLUGIN_FALLBACK_LOCATION, self.__plugin_name) log.info("Plugin is not accessible. Trying to download it from fallback location: [%s]" % src) - cmd = "%s --cache=off -P %s %s" % (wget,self.__plugin_path,src) -+ cmd = "%s --create-dirs -O --output-dir %s %s" % (curl,self.__plugin_path,src) ++ cmd = "%s --create-dirs -O --output-dir %s --location %s" % (curl,self.__plugin_path,src) log.debug(cmd) status, output = utils.run(cmd) @@ -52,7 +52,7 @@ index 56683fb..031ceec 100755 status, filename = utils.download_from_network(digsig_url, digsig_file, True) else: - cmd = "%s --cache=off -P %s %s" % (wget,self.__plugin_path,digsig_url) -+ cmd = "%s --create-dirs -O --output-dir %s %s" % (curl, self.__plugin_path,digsig_url) ++ cmd = "%s --create-dirs -O --output-dir %s --location %s" % (curl, self.__plugin_path,digsig_url) log.debug(cmd) status, output = utils.run(cmd) except IOError as e: diff --git a/hplip.spec b/hplip.spec index c9f06ef..0928d3c 100644 --- a/hplip.spec +++ b/hplip.spec @@ -962,6 +962,9 @@ find doc/images -type f -exec chmod 644 {} \; %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +Tue Jun 17 2025 Petr Dancak - 3.23.12-9 +- enable following links with curl in all use cases + Resolves: RHEL-84817 - hp-plugin-download wrongly parsed file type Resolves: RHEL-97437