Hello community,

here is the log from the commit of package fetchmsttfonts for openSUSE:Factory 
checked in at 2017-08-16 16:14:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fetchmsttfonts (Old)
 and      /work/SRC/openSUSE:Factory/.fetchmsttfonts.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fetchmsttfonts"

Wed Aug 16 16:14:58 2017 rev:14 rq:516817 version:11.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/fetchmsttfonts/fetchmsttfonts.changes    
2015-12-16 17:42:27.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.fetchmsttfonts.new/fetchmsttfonts.changes       
2017-08-16 16:15:21.419543473 +0200
@@ -1,0 +2,10 @@
+Fri Aug 11 15:21:20 UTC 2017 - [email protected]
+
+- Remove unnecessary BuildRequires
+- Refactor download script
+  * Use sf.net automatic mirror selection
+  * Remove proxy settings code as it is already applied as part of
+    openSUSE’s default /etc/profile.sh
+  * Fix some issues pointed out by shellcheck
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ fetchmsttfonts.spec ++++++
--- /var/tmp/diff_new_pack.WTF6FO/_old  2017-08-16 16:15:22.463396950 +0200
+++ /var/tmp/diff_new_pack.WTF6FO/_new  2017-08-16 16:15:22.471395827 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package fetchmsttfonts
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -38,8 +38,6 @@
 Requires:       fonts-config
 Requires:       mktemp
 Requires:       w3m
-BuildRequires:  fonts-config
-BuildRequires:  freetype2
 BuildArch:      noarch
 
 %description

++++++ fetchmsttfonts.sh.in ++++++
--- /var/tmp/diff_new_pack.WTF6FO/_old  2017-08-16 16:15:22.719361021 +0200
+++ /var/tmp/diff_new_pack.WTF6FO/_new  2017-08-16 16:15:22.719361021 +0200
@@ -5,163 +5,82 @@
 POST_MESSAGE="/var/adm/update-messages/__NAME__-__VERSION__-__RELEASE__-1"
 
 FONTS=" \
-dl.sourceforge.net/project/corefonts/the%20fonts/final/andale32.exe \
-dl.sourceforge.net/project/corefonts/the%20fonts/final/arial32.exe  \
-dl.sourceforge.net/project/corefonts/the%20fonts/final/arialb32.exe \
-dl.sourceforge.net/project/corefonts/the%20fonts/final/comic32.exe  \
-dl.sourceforge.net/project/corefonts/the%20fonts/final/courie32.exe \
-dl.sourceforge.net/project/corefonts/the%20fonts/final/georgi32.exe \
-dl.sourceforge.net/project/corefonts/the%20fonts/final/impact32.exe \
-dl.sourceforge.net/project/corefonts/the%20fonts/final/times32.exe  \
-dl.sourceforge.net/project/corefonts/the%20fonts/final/trebuc32.exe \
-dl.sourceforge.net/project/corefonts/the%20fonts/final/verdan32.exe \
-dl.sourceforge.net/project/corefonts/the%20fonts/final/webdin32.exe \
-"
-
-SERVER=" \
-jaist    \
-heanet   \
-kent     \
-nchc     \
-easynews \
-waix     \
-internode \
-internap \
+https://sourceforge.net/projects/corefonts/files/the%20fonts/final/andale32.exe
 \
+https://sourceforge.net/projects/corefonts/files/the%20fonts/final/arial32.exe 
 \
+https://sourceforge.net/projects/corefonts/files/the%20fonts/final/arialb32.exe
 \
+https://sourceforge.net/projects/corefonts/files/the%20fonts/final/comic32.exe 
 \
+https://sourceforge.net/projects/corefonts/files/the%20fonts/final/courie32.exe
 \
+https://sourceforge.net/projects/corefonts/files/the%20fonts/final/georgi32.exe
 \
+https://sourceforge.net/projects/corefonts/files/the%20fonts/final/impact32.exe
 \
+https://sourceforge.net/projects/corefonts/files/the%20fonts/final/times32.exe 
 \
+https://sourceforge.net/projects/corefonts/files/the%20fonts/final/trebuc32.exe
 \
+https://sourceforge.net/projects/corefonts/files/the%20fonts/final/verdan32.exe
 \
+https://sourceforge.net/projects/corefonts/files/the%20fonts/final/webdin32.exe
 \
 "
 
 CURL_OPTIONS="-L -s --speed-limit 3500 --speed-time 15"
 
-if [ ! -f /usr/bin/id -o ! -f /usr/bin/cabextract -o ! -f 
/usr/sbin/fonts-config ]; then
- echo "Running in non-chrooted (install into directory) mode... Exit safely."
- exit 0
-fi
-
-if [ "`id -u`" != "0" ]; then
- echo "error: You must be root to use this program!"
- exit 1
-fi
-
-if [ ! -x /usr/bin/cabextract ]; then
-  echo "error: cabextract missing! Please install package cabextract first."
-  exit 2
-fi
-
-if [ -f /etc/sysconfig/proxy ] ; then
-   . /etc/sysconfig/proxy
-fi
-
-if test "x$PROXY_ENABLED" != "xno"; then
-  if test -n "$HTTP_PROXY" ; then
-    export http_proxy="$HTTP_PROXY"
-  fi
-fi
-
-if [ -z $http_proxy ]; then
-  echo 
-  echo "note: No proxy is used. Please set the environment variable 
\"http_proxy\""
-  echo "note: to your favorite proxy, if you want to use a proxy for the 
download."
-  echo "note:"
-  echo "note:   bash: export http_proxy=\"http://proxy.example.com:3128/\"";
-  echo "note:   tcsh: setenv http_proxy \"http://proxy.example.com:3128/\"";
-fi
-
 echo "EULA:"
 echo -n "  Fetching   ... "
 curl $CURL_OPTIONS -o /usr/share/doc/corefonts/EULA.html $EULA || \
   rm -f /usr/share/doc/corefonts/EULA.html
 echo "done"
 
-tmpname=`basename $0`
-tmpdir=`mktemp -d /tmp/$tmpname.XXXXXX`
+tmpname=$(basename "$0")
+tmpdir=$(mktemp -d "/tmp/$tmpname.XXXXXX")
 trap "rm -rf $tmpdir" EXIT
 if [ $? -ne 0 ]; then
   echo "$0: Can't create temp dir, exiting..."
   exit 4
 fi
 
-cd $tmpdir
+cd "$tmpdir"
 
-echo
-echo "Trying to find the fastest server:"
-besttime=1000
-
-for server in $SERVER; do
-  echo -n " $server ... "
-  start=${SECONDS:-$(date +%s)}
-  curl $CURL_OPTIONS --connect-timeout 10 -o cabextract.rpm \
-    
http://$server.dl.sourceforge.net/project/corefonts/cabextract/0.5/cabextract-0.5-1.i386.rpm
-  if [ $? -ne 0 ]; then
-    echo "too slow (aborted)"
-    continue
-  fi
-  stop=${SECONDS:-$(date +%s)}
-  time=$((stop - start))
-  echo "$time sec"
-  if [ $time -lt $besttime ]; then 
-    besttime=$time
-    useserver=$server
-  fi
-done
+for archive in $FONTS; do
+    file=$(echo "$archive" | awk -F "/" '{print $NF}')
+    echo "$file ($archive):"
+    echo -n "  Fetching   ... "
+
+    if ! curl $CURL_OPTIONS -o "$file" "$archive"; then
+        rm -f "$file"
+        echo "failed ... deleted!"
+        continue
+    fi
 
-rm -f cabextract.rpm
-if [ -n "$useserver" ]; then
-  echo "The winner is: >> $useserver <<"
-  echo
-else
-  echo "Connection too slow or no server available. Aborting ... "
-  exit 5
-fi
+    for algo in md5 sha1 sha512; do
+        if ! grep "$file" "__DOCDIR__/__NAME__/corefonts.$algo" | ${algo}sum 
--check --quiet --status > /dev/null 2>&1; then
+            rm -f "$file"
+            echo "$algo checksum mismatch for $file ... deleted!"
+            continue
+        fi
+    done
 
-for font in $FONTS; do
- for i in $useserver $SERVER; do
-  archive=http://$i.$font
-  file=`echo $archive|awk -F "/" '{print $NF}'`
-  rm -f $file
-  echo "$file ($archive):"
-  echo -n "  Fetching   ... "
-  curl $CURL_OPTIONS -o $file $archive
-  if [ $? -ne 0 ]; then
-    rm -f $file
-    echo "failed ... deleted!"
-    continue
-  fi
-  for algo in md5 sha1 sha512; do
-    grep $file __DOCDIR__/__NAME__/corefonts.$algo | ${algo}sum --check 
--quiet --status > /dev/null 2>&1
-    if [ $? -ne 0 ]; then
-      rm -f $file
-      echo "$algo checksum mismatch for $file ... deleted!"
-      continue 2
-    fi
-  done
-  echo done
-  echo -n "  Extracting ... "
-  cabextract -l $file >/dev/null 2>&1
-  if [ $? -ne 0 ]; then
-    rm -f $file
-    echo "failed ... deleted!"
-  else
-    cabextract $file >/dev/null 2>&1
     echo "done"
-    success=true
-    break
-  fi
-  rm -f $file
- done
+    echo -n "  Extracting ... "
+    if ! cabextract -l "$file" >/dev/null 2>&1; then
+        rm -f "$file"
+        echo "failed ... deleted!"
+    else
+        cabextract "$file" >/dev/null 2>&1
+        echo "done"
+        success=true
+    fi
+
+    rm -f "$file"
 done
 
 if [ "x$success" != "x" ]; then 
-  for i in *.[Tt][Tt][CFcf]; do
-    lower=`echo $i|tr [:upper:] [:lower:]`
-    test "$i" != "$lower" && mv $i $lower
-  done
-  chmod 644 *.tt[cf]
-  mv -f *.tt[cf] /usr/share/fonts/truetype
-  /usr/sbin/fonts-config
-  echo "*** Fonts installed. ***" | tee $POST_MESSAGE
+    for i in ./*.[Tt][Tt][CFcf]; do
+        lower=$(echo "$i" | tr "[:upper:]" "[:lower:]")
+        test "$i" != "$lower" && mv "$i" "$lower"
+    done
+
+    chmod 644 ./*.tt[cf]
+    mv -f ./*.tt[cf] /usr/share/fonts/truetype
+    /usr/sbin/fonts-config
+    echo "*** Fonts installed. ***" | tee $POST_MESSAGE
 else
-  echo "*** No Fonts installed. ***" | tee $POST_MESSAGE
+    echo "*** No Fonts installed. ***" | tee $POST_MESSAGE
 fi
 
 test -f /usr/share/doc/corefonts/EULA.html && w3m -dump 
/usr/share/doc/corefonts/EULA.html | tee $POST_MESSAGE
-
-cd - >/dev/null


Reply via email to