Hello community,

here is the log from the commit of package obs-service-download_url for 
openSUSE:Factory checked in at 2020-10-13 16:17:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-service-download_url (Old)
 and      /work/SRC/openSUSE:Factory/.obs-service-download_url.new.3486 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "obs-service-download_url"

Tue Oct 13 16:17:09 2020 rev:5 rq:841551 version:0.1.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/obs-service-download_url/obs-service-download_url.changes
        2019-08-13 13:23:31.393382720 +0200
+++ 
/work/SRC/openSUSE:Factory/.obs-service-download_url.new.3486/obs-service-download_url.changes
      2020-10-13 16:17:14.586278127 +0200
@@ -1,0 +2,6 @@
+Tue Oct 06 11:43:06 UTC 2020 - [email protected]
+
+- Update to version 0.1.3:
+  * Revamp
+
+-------------------------------------------------------------------

Old:
----
  obs-service-download_url-0.1.2.tar.gz

New:
----
  debian.obs-service-download-url.install
  obs-service-download_url-0.1.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ obs-service-download_url.spec ++++++
--- /var/tmp/diff_new_pack.fdJZu3/_old  2020-10-13 16:17:15.298278438 +0200
+++ /var/tmp/diff_new_pack.fdJZu3/_new  2020-10-13 16:17:15.302278440 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package obs-service-download_url
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -20,8 +20,8 @@
 Summary:        An OBS source service: curl download tool
 License:        GPL-2.0-or-later
 Group:          Development/Tools/Building
-Url:            http://openbuildservice.org
-Version:        0.1.2
+URL:            http://openbuildservice.org
+Version:        0.1.3
 Release:        0
 Source:         %name-%version.tar.gz
 Requires:       wget

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.fdJZu3/_old  2020-10-13 16:17:15.358278465 +0200
+++ /var/tmp/diff_new_pack.fdJZu3/_new  2020-10-13 16:17:15.358278465 +0200
@@ -1,4 +1,4 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">[email protected]:openSUSE/obs-service-download_url.git</param>
-              <param 
name="changesrevision">20719f7f02de4799d7cad6a7810135a11f972207</param></service></servicedata>
\ No newline at end of file
+              <param 
name="changesrevision">7e179f25edbd75ae41200d3c769600a26027a261</param></service></servicedata>
\ No newline at end of file

++++++ debian.obs-service-download-url.install ++++++
download_url            /usr/lib/obs/service/
download_url.service    /usr/lib/obs/service/
++++++ obs-service-download_url-0.1.2.tar.gz -> 
obs-service-download_url-0.1.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-service-download_url-0.1.2/download_url 
new/obs-service-download_url-0.1.3/download_url
--- old/obs-service-download_url-0.1.2/download_url     2019-08-09 
11:51:23.000000000 +0200
+++ new/obs-service-download_url-0.1.3/download_url     2020-10-02 
12:23:04.000000000 +0200
@@ -2,6 +2,7 @@
 
 #
 # Copyright (c) 2009 Adrian Schroeter, SUSE Linux Products GmbH.
+# Copyright (c) 2020 SUSE LLC
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 2 as
@@ -21,70 +22,99 @@
 
 
 # defaults
-MYPROTOCOL="http"
-MYHOST=""
-MYPORT=""
+protocol="http"
+host=
+port=
+prefer_old=
+enforceipv4='enable'
+sslvalidation='disable'
+args=()
 
 while test $# -gt 0; do
   case $1 in
     *-host)
-      MYHOST="$2"
+      host="$2"
       shift
     ;;
     *-port)
-      MYPORT=":$2"
+      port="$2"
       shift
     ;;
     *-protocol)
-      MYPROTOCOL="$2"
+      protocol="$2"
       shift
     ;;
     *-path)
-      MYPATH="${2#/}"
+      path="${2#/}"
       shift
     ;;
     *-filename)
-      MYFILENAME="${2#/}"
+      filename="${2#/}"
       shift
     ;;
     *-outdir)
-      MYOUTDIR="$2"
+      outdir="$2"
+      shift
+    ;;
+    *-url)
+      url="$2"
+      shift
+    ;;
+    *-prefer-old)
+      prefer_old="$2"
+      shift
+    ;;
+    *-enforceipv4)
+      enforceipv4="$2"
+      shift
+    ;;
+    *-sslvalidation)
+      sslvalidation="$2"
       shift
     ;;
     *)
-      echo Unknown parameter $1.
-      echo 'Usage: http_download --host $HOST --path $PATH --outdir $OUT'
+      echo "Unknown parameter $1." >&2
       exit 1
     ;;
   esac
   shift
 done
 
-FILE="${MYPATH##*/}"
-
-if [ -z "$MYHOST" ]; then
-  echo "ERROR: no hostname is given via --host parameter!"
+if [ -z "$outdir" ]; then
+  echo "ERROR: no output directory is given via --outdir parameter!" >&2
   exit 1
 fi
-if [ -z "$MYPATH" ]; then
-  echo "ERROR: no path is given via --path parameter!"
-  exit 1
+
+if [ -z "$url" ]; then
+  if [ -z "$host" -o -z "$path" ]; then
+    echo "ERROR: need url or host, path " >&2
+    exit 1
+  fi
+
+  url="$protocol://${host}${port:+:$port}/$path"
 fi
-if [ -z "$MYOUTDIR" ]; then
-  echo "ERROR: no output directory is given via --outdir parameter!"
-  exit 1
+
+if [ -z "$filename" ]; then
+  filename="${url##*/}"
+  if [ -z "$filename" ]; then
+    echo "ERROR: can't determine file name from $url" >&2
+    exit 1
+  fi
 fi
-if [ -z "$FILE" ]; then
-  echo "ERROR: no file name was stripped from $MYPATH"
-  exit 1
+
+if [ "$prefer_old" = "enable" -a -e ".old/_service:download_url:$filename" ]; 
then
+  ln ".old/_service:download_url:$filename" "$outdir/$filename"
+  exit 0
 fi
 
-cd "$MYOUTDIR"
-# yes, not nice, but too many broken servers out there who either break with 
IPv6 or have broken certificates :/
-# let's use verify service to validate the downloaded source
-if [ -n "$MYFILENAME" ]; then
-  exec /usr/bin/wget -4 --no-check-certificate -q -O "${MYFILENAME##*/}" 
"$MYPROTOCOL://${MYHOST}${MYPORT}/$MYPATH"
-else
-  exec /usr/bin/wget -4 --no-check-certificate -q 
"$MYPROTOCOL://${MYHOST}${MYPORT}/$MYPATH"
+if [ "$enforceipv4" = "enable" ]; then
+  args+=("-4")
+fi
+if [ "$sslvalidation" = "disable" ]; then
+  args+=("--no-check-certificate")
 fi
+args+=(-O "${filename##*/}")
 
+cd "$outdir"
+set -- /usr/bin/wget "${args[@]}" "$url"
+exec "$@"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/obs-service-download_url-0.1.2/download_url.service 
new/obs-service-download_url-0.1.3/download_url.service
--- old/obs-service-download_url-0.1.2/download_url.service     2019-08-09 
11:51:23.000000000 +0200
+++ new/obs-service-download_url-0.1.3/download_url.service     2020-10-02 
12:23:04.000000000 +0200
@@ -9,7 +9,6 @@
   </parameter>
   <parameter name="host">
     <description>Server Hostname</description>
-    <required/>
   </parameter>
   <parameter name="port">
     <description>Used Port</description>
@@ -21,5 +20,23 @@
   <parameter name="filename">
     <description>Stored with this file name. Otherwise with the file name as 
reported by the server.</description>
   </parameter>
+  <parameter name="url">
+    <description>url to download</description>
+  </parameter>
+  <parameter name="prefer-old">
+    <description>reuse files from previous run if possible</description>
+    <allowedvalue>enable</allowedvalue>
+    <allowedvalue>disable</allowedvalue>
+  </parameter>
+  <parameter name="enforceipv4">
+    <description>Enforce IPv4 hostname resolution. This is currently the 
default due to too many invalid configured servers.</description>
+    <allowedvalue>enable</allowedvalue>
+    <allowedvalue>disable</allowedvalue>
+  </parameter>
+  <parameter name="sslvalidation">
+    <description>Disable SSL verification on download.</description>
+    <allowedvalue>enable</allowedvalue>
+    <allowedvalue>disable</allowedvalue>
+  </parameter>
 </service>
 


Reply via email to