public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] sites/www:master commit in: bin/
@ 2015-05-19 12:55 Alex Legler
  0 siblings, 0 replies; 10+ messages in thread
From: Alex Legler @ 2015-05-19 12:55 UTC (permalink / raw
  To: gentoo-commits

commit:     c6cb4f63de7728b93df2e9c570b8d67fe071f359
Author:     Alex Legler <alex <AT> a3li <DOT> li>
AuthorDate: Tue May 19 12:55:08 2015 +0000
Commit:     Alex Legler <a3li <AT> gentoo <DOT> org>
CommitDate: Tue May 19 12:55:08 2015 +0000
URL:        https://gitweb.gentoo.org/sites/www.git/commit/?id=c6cb4f63

Exclude bot edits in the Wiki feed

 bin/update-wiki.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/update-wiki.sh b/bin/update-wiki.sh
index af653a7..c27fb73 100755
--- a/bin/update-wiki.sh
+++ b/bin/update-wiki.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
 
 echo -n 'Updating Wiki information...'
-wget 'https://wiki.gentoo.org/index.php?title=Special:NewPages&feed=rss&hideredirs=1&limit=50&offset=&namespace=0&username=&tagfilter=' -O _data/wiki.xml 2>/dev/null
+wget 'https://wiki.gentoo.org/index.php?title=Special:NewPages&feed=rss&hidebots=1&hideredirs=1&limit=50&offset=&namespace=0&username=&tagfilter=' -O _data/wiki.xml 2>/dev/null
 echo 'done.'
\ No newline at end of file


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] sites/www:master commit in: bin/
@ 2015-08-10  9:20 Alex Legler
  0 siblings, 0 replies; 10+ messages in thread
From: Alex Legler @ 2015-08-10  9:20 UTC (permalink / raw
  To: gentoo-commits

commit:     73ea24bc8b0f253f05a14cfd72a7e291e285a5ca
Author:     Alex Legler <alex <AT> a3li <DOT> li>
AuthorDate: Mon Aug 10 09:19:54 2015 +0000
Commit:     Alex Legler <a3li <AT> gentoo <DOT> org>
CommitDate: Mon Aug 10 09:19:54 2015 +0000
URL:        https://gitweb.gentoo.org/sites/www.git/commit/?id=73ea24bc

Add nickname to gpg error output

 bin/userinfo-export.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/userinfo-export.rb b/bin/userinfo-export.rb
index c805e56..7c9c94c 100755
--- a/bin/userinfo-export.rb
+++ b/bin/userinfo-export.rb
@@ -41,13 +41,13 @@ class GentooLDAP
   end
 end
 
-def gpgfp_format(input)
+def gpgfp_format(input, nick)
   return nil if input == 'undefined'
 
   raw_fp = input.gsub(/\s/, '')
 
   unless raw_fp.length == 40
-    $stderr.puts "Invalid GPG FP: #{input}"
+    $stderr.puts "Invalid GPG FP for #{nick}: #{input}"
     return nil
   end
 
@@ -68,7 +68,7 @@ def export(data)
 
   ret['roles'] = data['gentooRoles'].first if data.has_key? 'gentooRoles'
   ret['wiki'] = data['gentooWikiUser'].first if data.has_key? 'gentooWikiUser'
-  ret['gpgfp'] = data['gpgfingerprint'].map {|fp| gpgfp_format fp }.compact if data.has_key? 'gpgfingerprint'
+  ret['gpgfp'] = data['gpgfingerprint'].map {|fp| gpgfp_format(fp, ret['nick']) }.compact if data.has_key? 'gpgfingerprint'
   ret['gpg'] = ret['gpgfp'].map {|fp| gpgfp_to_longid fp } if data.has_key? 'gpgfingerprint'
 
   # Geolocation


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] sites/www:master commit in: bin/
@ 2015-10-04 21:12 Alex Legler
  0 siblings, 0 replies; 10+ messages in thread
From: Alex Legler @ 2015-10-04 21:12 UTC (permalink / raw
  To: gentoo-commits

commit:     cf3a50598652c1ba49933b247b46284bf4e283d0
Author:     Alex Legler <alex <AT> a3li <DOT> li>
AuthorDate: Sun Oct  4 21:11:56 2015 +0000
Commit:     Alex Legler <a3li <AT> gentoo <DOT> org>
CommitDate: Sun Oct  4 21:11:56 2015 +0000
URL:        https://gitweb.gentoo.org/sites/www.git/commit/?id=cf3a5059

Keep data files when updates cannot be fetched

 bin/update-devaway.sh  | 5 +++--
 bin/update-glsa.sh     | 5 +++--
 bin/update-herds.sh    | 3 ++-
 bin/update-mirrors.sh  | 8 +++++---
 bin/update-packages.sh | 3 ++-
 bin/update-planet.sh   | 5 +++--
 bin/update-use.sh      | 3 ++-
 bin/update-wiki.sh     | 5 +++--
 8 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/bin/update-devaway.sh b/bin/update-devaway.sh
index 29bf264..cea35e5 100755
--- a/bin/update-devaway.sh
+++ b/bin/update-devaway.sh
@@ -2,5 +2,6 @@
 
 # TODO: One day, fix up the json to be compatible with jekyll's parser
 echo -n 'Updating devaway information...'
-wget 'http://dev.gentoo.org/devaway/xml/' -O _data/devaway.xml 2>/dev/null
-echo 'done.'
\ No newline at end of file
+wget 'http://dev.gentoo.org/devaway/xml/' -O _data/devaway.xml.tmp 2>/dev/null
+[ $? -eq 0 ] && mv _data/devaway.xml.tmp _data/devaway.xml
+echo 'done.'

diff --git a/bin/update-glsa.sh b/bin/update-glsa.sh
index d03f579..6a64069 100755
--- a/bin/update-glsa.sh
+++ b/bin/update-glsa.sh
@@ -1,5 +1,6 @@
 #!/bin/bash
 
 echo -n 'Updating GLSA information...'
-wget 'https://security.gentoo.org/glsa/feed.yaml' -O _data/glsa.yaml 2>/dev/null
-echo 'done.'
\ No newline at end of file
+wget 'https://security.gentoo.org/glsa/feed.yaml' -O _data/glsa.yaml.tmp 2>/dev/null
+[ $? -eq 0 ] && mv _data/glsa.yaml.tmp _data/glsa.yaml
+echo 'done.'

diff --git a/bin/update-herds.sh b/bin/update-herds.sh
index 53c3c1b..5e21b08 100755
--- a/bin/update-herds.sh
+++ b/bin/update-herds.sh
@@ -1,5 +1,6 @@
 #!/bin/bash
 
 echo -n 'Updating herd information...'
-wget 'https://api.gentoo.org/packages/herds.xml' -O _data/herds.xml 2>/dev/null
+wget 'https://api.gentoo.org/packages/herds.xml' -O _data/herds.xml.tmp 2>/dev/null
+[ $? -eq 0 ] && mv _data/herds.xml.tmp _data/herds.xml
 echo 'done.'

diff --git a/bin/update-mirrors.sh b/bin/update-mirrors.sh
index d74dbaf..0f63bf9 100755
--- a/bin/update-mirrors.sh
+++ b/bin/update-mirrors.sh
@@ -1,6 +1,8 @@
 #!/bin/bash
 
 echo -n 'Updating mirror information...'
-wget 'https://api.gentoo.org/mirrors/distfiles.xml' -O _data/mirrors-distfiles.xml 2>/dev/null
-wget 'https://api.gentoo.org/mirrors/rsync.xml' -O _data/mirrors-rsync.xml 2>/dev/null
-echo 'done.'
\ No newline at end of file
+wget 'https://api.gentoo.org/mirrors/distfiles.xml' -O _data/mirrors-distfiles.xml.tmp 2>/dev/null
+[ $? -eq 0 ] && mv _data/mirrors-distfiles.xml.tmp _data/mirrors-distfiles.xml
+wget 'https://api.gentoo.org/mirrors/rsync.xml' -O _data/mirrors-rsync.xml.tmp 2>/dev/null
+[ $? -eq 0 ] && mv _data/mirrors-rsync.xml.tmp _data/mirrors-rsync.xml
+echo 'done.'

diff --git a/bin/update-packages.sh b/bin/update-packages.sh
index 1140207..592e1cf 100755
--- a/bin/update-packages.sh
+++ b/bin/update-packages.sh
@@ -1,5 +1,6 @@
 #!/bin/bash
 
 echo -n 'Updating Packages information...'
-wget 'https://packages.gentoo.org/packages/added.atom' -O _data/packages.xml 2>/dev/null
+wget 'https://packages.gentoo.org/packages/added.atom' -O _data/packages.xml.tmp 2>/dev/null
+[ $? -eq 0 ] && mv _data/packages.xml.tmp _data/packages.xml
 echo 'done.'

diff --git a/bin/update-planet.sh b/bin/update-planet.sh
index 5fb4ff9..a0c8eb4 100755
--- a/bin/update-planet.sh
+++ b/bin/update-planet.sh
@@ -1,5 +1,6 @@
 #!/bin/bash
 
 echo -n 'Updating Planet information...'
-wget 'http://planet.gentoo.org/rss20.xml' -O _data/planet.xml 2>/dev/null
-echo 'done.'
\ No newline at end of file
+wget 'http://planet.gentoo.org/rss20.xml' -O _data/planet.xml.tmp 2>/dev/null
+[ $? -eq 0 ] && mv _data/planet.xml.tmp _data/planet.xml
+echo 'done.'

diff --git a/bin/update-use.sh b/bin/update-use.sh
index b825c3b..1a1b5a4 100755
--- a/bin/update-use.sh
+++ b/bin/update-use.sh
@@ -1,5 +1,6 @@
 #!/bin/bash
 
 echo -n 'Updating USE flag information...'
-wget 'https://api.gentoo.org/packages/use.json' -O _data/use.json 2>/dev/null
+wget 'https://api.gentoo.org/packages/use.json' -O _data/use.json.tmp 2>/dev/null
+[ $? -eq 0 ] && mv _data/use.json.tmp _data/use.json
 echo 'done.'

diff --git a/bin/update-wiki.sh b/bin/update-wiki.sh
index c27fb73..2759813 100755
--- a/bin/update-wiki.sh
+++ b/bin/update-wiki.sh
@@ -1,5 +1,6 @@
 #!/bin/bash
 
 echo -n 'Updating Wiki information...'
-wget 'https://wiki.gentoo.org/index.php?title=Special:NewPages&feed=rss&hidebots=1&hideredirs=1&limit=50&offset=&namespace=0&username=&tagfilter=' -O _data/wiki.xml 2>/dev/null
-echo 'done.'
\ No newline at end of file
+wget 'https://wiki.gentoo.org/index.php?title=Special:NewPages&feed=rss&hidebots=1&hideredirs=1&limit=50&offset=&namespace=0&username=&tagfilter=' -O _data/wiki.xml.tmp 2>/dev/null
+[ $? -eq 0 ] && mv _data/wiki.xml.tmp _data/wiki.xml
+echo 'done.'


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] sites/www:master commit in: bin/
@ 2016-03-23 17:40 Robin H. Johnson
  0 siblings, 0 replies; 10+ messages in thread
From: Robin H. Johnson @ 2016-03-23 17:40 UTC (permalink / raw
  To: gentoo-commits

commit:     f8f99ed3c0186e38b142f5cfb44bc057aaac802b
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 23 17:40:40 2016 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Wed Mar 23 17:40:40 2016 +0000
URL:        https://gitweb.gentoo.org/sites/www.git/commit/?id=f8f99ed3

Add explicit timeouts to all scripts; we had a wget that was stuck for a month

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 bin/update-devaway.sh   |  2 +-
 bin/update-downloads.sh | 17 +++++++++--------
 bin/update-glsa.sh      |  2 +-
 bin/update-mirrors.sh   |  4 ++--
 bin/update-packages.sh  |  2 +-
 bin/update-planet.sh    |  2 +-
 bin/update-use.sh       |  2 +-
 bin/update-userinfo.sh  |  4 ++--
 bin/update-wiki.sh      |  2 +-
 9 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/bin/update-devaway.sh b/bin/update-devaway.sh
index cea35e5..1c0e110 100755
--- a/bin/update-devaway.sh
+++ b/bin/update-devaway.sh
@@ -2,6 +2,6 @@
 
 # TODO: One day, fix up the json to be compatible with jekyll's parser
 echo -n 'Updating devaway information...'
-wget 'http://dev.gentoo.org/devaway/xml/' -O _data/devaway.xml.tmp 2>/dev/null
+wget -T 60 'http://dev.gentoo.org/devaway/xml/' -O _data/devaway.xml.tmp 2>/dev/null
 [ $? -eq 0 ] && mv _data/devaway.xml.tmp _data/devaway.xml
 echo 'done.'

diff --git a/bin/update-downloads.sh b/bin/update-downloads.sh
index 386de1f..8dea718 100755
--- a/bin/update-downloads.sh
+++ b/bin/update-downloads.sh
@@ -3,20 +3,21 @@ ARCHES=(amd64 x86 alpha arm hppa ia64 mips ppc s390 sh sparc)
 
 echo -n 'Updating downloads...'
 
+# TODO: fix this handling for temp files and if one of the downloads fails but not others.
 for arch in "${ARCHES[@]}"; do
   mkdir -p _data/downloads/${arch}/
-  wget "http://distfiles.gentoo.org/releases/${arch}/autobuilds/latest-iso.txt" -O _data/downloads/${arch}/iso.txt 2>/dev/null
-  wget "http://distfiles.gentoo.org/releases/${arch}/autobuilds/latest-stage3.txt" -O _data/downloads/${arch}/stage3.txt 2>/dev/null
+  wget -T 60 "http://distfiles.gentoo.org/releases/${arch}/autobuilds/latest-iso.txt" -O _data/downloads/${arch}/iso.txt 2>/dev/null
+  wget -T 60 "http://distfiles.gentoo.org/releases/${arch}/autobuilds/latest-stage3.txt" -O _data/downloads/${arch}/stage3.txt 2>/dev/null
 
   if [ ${arch} = "amd64" ]; then
-    wget "http://distfiles.gentoo.org/releases/amd64/autobuilds/latest-admincd-amd64.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
+    wget -T 60 "http://distfiles.gentoo.org/releases/amd64/autobuilds/latest-admincd-amd64.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
   elif [ ${arch} = "s390" ]; then
-    wget "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390-initramfs.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
-    wget "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390-kernel.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
-    wget "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390x-initramfs.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
-    wget "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390x-kernel.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
+    wget -T 60 "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390-initramfs.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
+    wget -T 60 "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390-kernel.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
+    wget -T 60 "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390x-initramfs.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
+    wget -T 60 "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390x-kernel.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
   elif [ ${arch} = "x86" ]; then
-    wget "http://distfiles.gentoo.org/releases/x86/autobuilds/latest-admincd-x86.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
+    wget -T 60 "http://distfiles.gentoo.org/releases/x86/autobuilds/latest-admincd-x86.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
   fi
 done
 

diff --git a/bin/update-glsa.sh b/bin/update-glsa.sh
index 6a64069..81d4f65 100755
--- a/bin/update-glsa.sh
+++ b/bin/update-glsa.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
 echo -n 'Updating GLSA information...'
-wget 'https://security.gentoo.org/glsa/feed.yaml' -O _data/glsa.yaml.tmp 2>/dev/null
+wget -T 60 'https://security.gentoo.org/glsa/feed.yaml' -O _data/glsa.yaml.tmp 2>/dev/null
 [ $? -eq 0 ] && mv _data/glsa.yaml.tmp _data/glsa.yaml
 echo 'done.'

diff --git a/bin/update-mirrors.sh b/bin/update-mirrors.sh
index 0f63bf9..19f6e51 100755
--- a/bin/update-mirrors.sh
+++ b/bin/update-mirrors.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
 
 echo -n 'Updating mirror information...'
-wget 'https://api.gentoo.org/mirrors/distfiles.xml' -O _data/mirrors-distfiles.xml.tmp 2>/dev/null
+wget -T 60 'https://api.gentoo.org/mirrors/distfiles.xml' -O _data/mirrors-distfiles.xml.tmp 2>/dev/null
 [ $? -eq 0 ] && mv _data/mirrors-distfiles.xml.tmp _data/mirrors-distfiles.xml
-wget 'https://api.gentoo.org/mirrors/rsync.xml' -O _data/mirrors-rsync.xml.tmp 2>/dev/null
+wget -T 60 'https://api.gentoo.org/mirrors/rsync.xml' -O _data/mirrors-rsync.xml.tmp 2>/dev/null
 [ $? -eq 0 ] && mv _data/mirrors-rsync.xml.tmp _data/mirrors-rsync.xml
 echo 'done.'

diff --git a/bin/update-packages.sh b/bin/update-packages.sh
index 592e1cf..b2577bd 100755
--- a/bin/update-packages.sh
+++ b/bin/update-packages.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
 echo -n 'Updating Packages information...'
-wget 'https://packages.gentoo.org/packages/added.atom' -O _data/packages.xml.tmp 2>/dev/null
+wget -T 60 'https://packages.gentoo.org/packages/added.atom' -O _data/packages.xml.tmp 2>/dev/null
 [ $? -eq 0 ] && mv _data/packages.xml.tmp _data/packages.xml
 echo 'done.'

diff --git a/bin/update-planet.sh b/bin/update-planet.sh
index a0c8eb4..e15571d 100755
--- a/bin/update-planet.sh
+++ b/bin/update-planet.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
 echo -n 'Updating Planet information...'
-wget 'http://planet.gentoo.org/rss20.xml' -O _data/planet.xml.tmp 2>/dev/null
+wget -T 60 'http://planet.gentoo.org/rss20.xml' -O _data/planet.xml.tmp 2>/dev/null
 [ $? -eq 0 ] && mv _data/planet.xml.tmp _data/planet.xml
 echo 'done.'

diff --git a/bin/update-use.sh b/bin/update-use.sh
index 1a1b5a4..3265593 100755
--- a/bin/update-use.sh
+++ b/bin/update-use.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
 echo -n 'Updating USE flag information...'
-wget 'https://api.gentoo.org/packages/use.json' -O _data/use.json.tmp 2>/dev/null
+wget -T 60 'https://api.gentoo.org/packages/use.json' -O _data/use.json.tmp 2>/dev/null
 [ $? -eq 0 ] && mv _data/use.json.tmp _data/use.json
 echo 'done.'

diff --git a/bin/update-userinfo.sh b/bin/update-userinfo.sh
index d2121be..613db4b 100755
--- a/bin/update-userinfo.sh
+++ b/bin/update-userinfo.sh
@@ -3,8 +3,8 @@
 echo -n 'Updating LDAP user information...'
 
 if [[ $(hostname -f) == *'gentoo.org'* ]] || [[ "$FORCE" == '1' ]]; then
-  bin/userinfo-export.rb > _data/userinfo.json
+  timeout 180 bin/userinfo-export.rb > _data/userinfo.json
   echo 'done.'
 else
   echo 'skipped (not a gentoo.org box, assuming no LDAP available, set FORCE=1 to override).'
-fi
\ No newline at end of file
+fi

diff --git a/bin/update-wiki.sh b/bin/update-wiki.sh
index 2759813..76196df 100755
--- a/bin/update-wiki.sh
+++ b/bin/update-wiki.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
 echo -n 'Updating Wiki information...'
-wget 'https://wiki.gentoo.org/index.php?title=Special:NewPages&feed=rss&hidebots=1&hideredirs=1&limit=50&offset=&namespace=0&username=&tagfilter=' -O _data/wiki.xml.tmp 2>/dev/null
+wget -T 60 'https://wiki.gentoo.org/index.php?title=Special:NewPages&feed=rss&hidebots=1&hideredirs=1&limit=50&offset=&namespace=0&username=&tagfilter=' -O _data/wiki.xml.tmp 2>/dev/null
 [ $? -eq 0 ] && mv _data/wiki.xml.tmp _data/wiki.xml
 echo 'done.'


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] sites/www:master commit in: bin/
@ 2016-05-27 12:07 Alex Legler
  0 siblings, 0 replies; 10+ messages in thread
From: Alex Legler @ 2016-05-27 12:07 UTC (permalink / raw
  To: gentoo-commits

commit:     dcaba6a3d14c9ec4b6424c304ddd7e99aec71235
Author:     Alex Legler <alex <AT> a3li <DOT> li>
AuthorDate: Fri May 27 12:00:23 2016 +0000
Commit:     Alex Legler <a3li <AT> gentoo <DOT> org>
CommitDate: Fri May 27 12:00:45 2016 +0000
URL:        https://gitweb.gentoo.org/sites/www.git/commit/?id=dcaba6a3

Whitespace

 bin/update-downloads.sh | 77 +++++++++++++++++++++++++------------------------
 1 file changed, 39 insertions(+), 38 deletions(-)

diff --git a/bin/update-downloads.sh b/bin/update-downloads.sh
index 3b0b894..b113fdb 100755
--- a/bin/update-downloads.sh
+++ b/bin/update-downloads.sh
@@ -6,75 +6,76 @@ URI_BASE="http://distfiles.gentoo.org/releases"
 ARCHES=(alpha amd64 arm hppa ia64 mips ppc s390 sh sparc x86)
 
 usage() {
-	cat <<EOF
+  cat <<EOF
 Usage: update-downloads.sh
 
 Helper script that runs on the servers to refresh the files that back the
 downloads page: https://gentoo.org/downloads/
 EOF
-	exit 0
+  exit 0
 }
 
 fetch() {
-	wget -T 60 -q "$@"
+  wget -T 60 -q "$@"
 }
 
 # Append extra images to the specified list.
 # append_list <local file> <list of remote urls to append>
 append_list() {
-	local list=$1 file
-	shift
-	for file in "$@" ; do
-		fetch -O - >>"${list}" "${uri_base}/${file}"
-	done
+  local list=$1 file
+  shift
+  for file in "$@"; do
+    fetch -O - >>"${list}" "${uri_base}/${file}"
+  done
 }
 
 update_amd64() {
-	append_list "${boot_list}" "latest-admincd-amd64.txt"
+  append_list "${boot_list}" "latest-admincd-amd64.txt"
 }
 
 update_hppa() {
-	append_list "${boot_list}" latest-netboot-hppa{32,64}.txt
+  append_list "${boot_list}" latest-netboot-hppa{32,64}.txt
 }
 
 update_s390() {
-	append_list "${boot_list}" latest-netboot-s390{,x}-{initramfs,kernel}.txt
+  append_list "${boot_list}" latest-netboot-s390{,x}-{initramfs,kernel}.txt
 }
 
 update_x86() {
-	append_list "${boot_list}" "latest-admincd-x86.txt"
+  append_list "${boot_list}" "latest-admincd-x86.txt"
 }
 
 # Update the bootable & stage lists.
 update_arch() {
-	local arch=$1
-	local uri_base="${URI_BASE}/${arch}/autobuilds"
-	local list_base="_data/downloads/${arch}"
-	local boot_list="${list_base}/iso.txt"
-	local stage_list="${list_base}/stage3.txt"
-
-	mkdir -p "${list_base}"
-	fetch "${uri_base}/latest-iso.txt" -O "${boot_list}"
-	fetch "${uri_base}/latest-stage3.txt" -O "${stage_list}"
-	if [[ $(type -t "update_${arch}") == "function" ]] ; then
-		update_${arch}
-	fi
+  local arch=$1
+  local uri_base="${URI_BASE}/${arch}/autobuilds"
+  local list_base="_data/downloads/${arch}"
+  local boot_list="${list_base}/iso.txt"
+  local stage_list="${list_base}/stage3.txt"
+
+  mkdir -p "${list_base}"
+  fetch "${uri_base}/latest-iso.txt" -O "${boot_list}"
+  fetch "${uri_base}/latest-stage3.txt" -O "${stage_list}"
+  if [[ $(type -t "update_${arch}") == "function" ]]; then
+    update_${arch}
+  fi
 }
 
 main() {
-	if [[ $# -ne 0 ]] ; then
-		usage
-	fi
-
-	# Make sure we're in the top level dir.
-	cd "$(dirname "$0")"/..
-
-	local arch
-	printf 'Updating ... '
-	for arch in "${ARCHES[@]}" ; do
-		printf '%s ' "${arch}"
-		update_arch "${arch}"
-	done
-	echo '... done'
+  if [[ $# -ne 0 ]]; then
+    usage
+  fi
+
+  # Make sure we're in the top level dir.
+  cd "$(dirname "$0")"/..
+
+  local arch
+  printf 'Updating downloads... '
+  for arch in "${ARCHES[@]}"; do
+    printf '%s ' "${arch}"
+    update_arch "${arch}"
+  done
+  echo 'done.'
 }
+
 main "$@"


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] sites/www:master commit in: bin/
@ 2016-05-27 12:07 Alex Legler
  0 siblings, 0 replies; 10+ messages in thread
From: Alex Legler @ 2016-05-27 12:07 UTC (permalink / raw
  To: gentoo-commits

commit:     4af8d661243e0da0b17210a8ddd788a92b19d19b
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu May 26 18:11:34 2016 +0000
Commit:     Alex Legler <a3li <AT> gentoo <DOT> org>
CommitDate: Fri May 27 11:55:37 2016 +0000
URL:        https://gitweb.gentoo.org/sites/www.git/commit/?id=4af8d661

update-downloads: rewrite to make it easier to manage

This also adds hppa netboot images to the list.

 bin/update-downloads.sh | 98 ++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 77 insertions(+), 21 deletions(-)

diff --git a/bin/update-downloads.sh b/bin/update-downloads.sh
index 8dea718..3b0b894 100755
--- a/bin/update-downloads.sh
+++ b/bin/update-downloads.sh
@@ -1,24 +1,80 @@
 #!/bin/bash
-ARCHES=(amd64 x86 alpha arm hppa ia64 mips ppc s390 sh sparc)
+# TODO: fix this handling for temp files and if one of the downloads fails but not others.
 
-echo -n 'Updating downloads...'
+URI_BASE="http://distfiles.gentoo.org/releases"
 
-# TODO: fix this handling for temp files and if one of the downloads fails but not others.
-for arch in "${ARCHES[@]}"; do
-  mkdir -p _data/downloads/${arch}/
-  wget -T 60 "http://distfiles.gentoo.org/releases/${arch}/autobuilds/latest-iso.txt" -O _data/downloads/${arch}/iso.txt 2>/dev/null
-  wget -T 60 "http://distfiles.gentoo.org/releases/${arch}/autobuilds/latest-stage3.txt" -O _data/downloads/${arch}/stage3.txt 2>/dev/null
-
-  if [ ${arch} = "amd64" ]; then
-    wget -T 60 "http://distfiles.gentoo.org/releases/amd64/autobuilds/latest-admincd-amd64.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
-  elif [ ${arch} = "s390" ]; then
-    wget -T 60 "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390-initramfs.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
-    wget -T 60 "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390-kernel.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
-    wget -T 60 "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390x-initramfs.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
-    wget -T 60 "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390x-kernel.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
-  elif [ ${arch} = "x86" ]; then
-    wget -T 60 "http://distfiles.gentoo.org/releases/x86/autobuilds/latest-admincd-x86.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null
-  fi
-done
-
-echo 'done.'
+ARCHES=(alpha amd64 arm hppa ia64 mips ppc s390 sh sparc x86)
+
+usage() {
+	cat <<EOF
+Usage: update-downloads.sh
+
+Helper script that runs on the servers to refresh the files that back the
+downloads page: https://gentoo.org/downloads/
+EOF
+	exit 0
+}
+
+fetch() {
+	wget -T 60 -q "$@"
+}
+
+# Append extra images to the specified list.
+# append_list <local file> <list of remote urls to append>
+append_list() {
+	local list=$1 file
+	shift
+	for file in "$@" ; do
+		fetch -O - >>"${list}" "${uri_base}/${file}"
+	done
+}
+
+update_amd64() {
+	append_list "${boot_list}" "latest-admincd-amd64.txt"
+}
+
+update_hppa() {
+	append_list "${boot_list}" latest-netboot-hppa{32,64}.txt
+}
+
+update_s390() {
+	append_list "${boot_list}" latest-netboot-s390{,x}-{initramfs,kernel}.txt
+}
+
+update_x86() {
+	append_list "${boot_list}" "latest-admincd-x86.txt"
+}
+
+# Update the bootable & stage lists.
+update_arch() {
+	local arch=$1
+	local uri_base="${URI_BASE}/${arch}/autobuilds"
+	local list_base="_data/downloads/${arch}"
+	local boot_list="${list_base}/iso.txt"
+	local stage_list="${list_base}/stage3.txt"
+
+	mkdir -p "${list_base}"
+	fetch "${uri_base}/latest-iso.txt" -O "${boot_list}"
+	fetch "${uri_base}/latest-stage3.txt" -O "${stage_list}"
+	if [[ $(type -t "update_${arch}") == "function" ]] ; then
+		update_${arch}
+	fi
+}
+
+main() {
+	if [[ $# -ne 0 ]] ; then
+		usage
+	fi
+
+	# Make sure we're in the top level dir.
+	cd "$(dirname "$0")"/..
+
+	local arch
+	printf 'Updating ... '
+	for arch in "${ARCHES[@]}" ; do
+		printf '%s ' "${arch}"
+		update_arch "${arch}"
+	done
+	echo '... done'
+}
+main "$@"


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] sites/www:master commit in: bin/
@ 2016-07-18  6:22 Robin H. Johnson
  0 siblings, 0 replies; 10+ messages in thread
From: Robin H. Johnson @ 2016-07-18  6:22 UTC (permalink / raw
  To: gentoo-commits

commit:     79e8bf3316fe2977a52e6bb8ee9de6d2aaa1583c
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 18 06:22:33 2016 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Mon Jul 18 06:22:43 2016 +0000
URL:        https://gitweb.gentoo.org/sites/www.git/commit/?id=79e8bf33

update-planet: wget -T timeout does not fire in some cases.

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 bin/update-planet.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/update-planet.sh b/bin/update-planet.sh
index e15571d..5a410cb 100755
--- a/bin/update-planet.sh
+++ b/bin/update-planet.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
 echo -n 'Updating Planet information...'
-wget -T 60 'http://planet.gentoo.org/rss20.xml' -O _data/planet.xml.tmp 2>/dev/null
+timeout 120 wget -T 60 'http://planet.gentoo.org/rss20.xml' -O _data/planet.xml.tmp 2>/dev/null
 [ $? -eq 0 ] && mv _data/planet.xml.tmp _data/planet.xml
 echo 'done.'


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] sites/www:master commit in: bin/
@ 2017-02-19  0:46 Robin H. Johnson
  0 siblings, 0 replies; 10+ messages in thread
From: Robin H. Johnson @ 2017-02-19  0:46 UTC (permalink / raw
  To: gentoo-commits

commit:     cbf09605f5b37e9d7aed3e6546a748bf63ed7688
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 19 00:46:37 2017 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sun Feb 19 00:46:37 2017 +0000
URL:        https://gitweb.gentoo.org/sites/www.git/commit/?id=cbf09605

bin/update-packages: add more timeout, as still seems to sometimes hang.

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 bin/update-packages.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/update-packages.sh b/bin/update-packages.sh
index b2577bd..8a267a2 100755
--- a/bin/update-packages.sh
+++ b/bin/update-packages.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
 echo -n 'Updating Packages information...'
-wget -T 60 'https://packages.gentoo.org/packages/added.atom' -O _data/packages.xml.tmp 2>/dev/null
+timeout 60 wget -T 60 'https://packages.gentoo.org/packages/added.atom' -O _data/packages.xml.tmp 2>/dev/null
 [ $? -eq 0 ] && mv _data/packages.xml.tmp _data/packages.xml
 echo 'done.'


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] sites/www:master commit in: bin/
@ 2017-07-28  4:15 Matthew Marchese
  0 siblings, 0 replies; 10+ messages in thread
From: Matthew Marchese @ 2017-07-28  4:15 UTC (permalink / raw
  To: gentoo-commits

commit:     7eff9a24227f6375b55d387771a563a7f4e17dec
Author:     Matthew Marchese <maffblaster <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 27 20:48:53 2017 +0000
Commit:     Matthew Marchese <maffblaster <AT> gentoo <DOT> org>
CommitDate: Fri Jul 28 03:54:05 2017 +0000
URL:        https://gitweb.gentoo.org/sites/www.git/commit/?id=7eff9a24

Make scripts have consistent output.

Signed-off-by: Matthew Marchese <maffblaster <AT> gentoo.org>

 bin/update-downloads.sh | 6 +++---
 bin/update-packages.sh  | 2 +-
 bin/update-wiki.sh      | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/bin/update-downloads.sh b/bin/update-downloads.sh
index b113fdb..6d618e4 100755
--- a/bin/update-downloads.sh
+++ b/bin/update-downloads.sh
@@ -70,12 +70,12 @@ main() {
   cd "$(dirname "$0")"/..
 
   local arch
-  printf 'Updating downloads... '
+  printf 'Updating downloads'
   for arch in "${ARCHES[@]}"; do
-    printf '%s ' "${arch}"
+    printf ' %s' "${arch}"
     update_arch "${arch}"
   done
-  echo 'done.'
+  echo '...done.'
 }
 
 main "$@"

diff --git a/bin/update-packages.sh b/bin/update-packages.sh
index 8a267a2..13b89c5 100755
--- a/bin/update-packages.sh
+++ b/bin/update-packages.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-echo -n 'Updating Packages information...'
+echo -n 'Updating packages information...'
 timeout 60 wget -T 60 'https://packages.gentoo.org/packages/added.atom' -O _data/packages.xml.tmp 2>/dev/null
 [ $? -eq 0 ] && mv _data/packages.xml.tmp _data/packages.xml
 echo 'done.'

diff --git a/bin/update-wiki.sh b/bin/update-wiki.sh
index 76196df..1d13235 100755
--- a/bin/update-wiki.sh
+++ b/bin/update-wiki.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-echo -n 'Updating Wiki information...'
+echo -n 'Updating wiki information...'
 wget -T 60 'https://wiki.gentoo.org/index.php?title=Special:NewPages&feed=rss&hidebots=1&hideredirs=1&limit=50&offset=&namespace=0&username=&tagfilter=' -O _data/wiki.xml.tmp 2>/dev/null
 [ $? -eq 0 ] && mv _data/wiki.xml.tmp _data/wiki.xml
 echo 'done.'


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] sites/www:master commit in: bin/
@ 2017-07-28  4:15 Matthew Marchese
  0 siblings, 0 replies; 10+ messages in thread
From: Matthew Marchese @ 2017-07-28  4:15 UTC (permalink / raw
  To: gentoo-commits

commit:     cdacc9aaf60c8a4cea9500b81db6e57a75c0791d
Author:     Matthew Marchese <maffblaster <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 27 20:44:38 2017 +0000
Commit:     Matthew Marchese <maffblaster <AT> gentoo <DOT> org>
CommitDate: Fri Jul 28 03:53:39 2017 +0000
URL:        https://gitweb.gentoo.org/sites/www.git/commit/?id=cdacc9aa

Use HTTPS for planet RSS feed download.

Signed-off-by: Matthew Marchese <maffblaster <AT> gentoo.org>

 bin/update-planet.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/update-planet.sh b/bin/update-planet.sh
index 5a410cb..46a9a3c 100755
--- a/bin/update-planet.sh
+++ b/bin/update-planet.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
 echo -n 'Updating Planet information...'
-timeout 120 wget -T 60 'http://planet.gentoo.org/rss20.xml' -O _data/planet.xml.tmp 2>/dev/null
+timeout 120 wget -T 60 'https://planet.gentoo.org/rss20.xml' -O _data/planet.xml.tmp 2>/dev/null
 [ $? -eq 0 ] && mv _data/planet.xml.tmp _data/planet.xml
 echo 'done.'


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-07-28  4:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-28  4:15 [gentoo-commits] sites/www:master commit in: bin/ Matthew Marchese
  -- strict thread matches above, loose matches on Subject: below --
2017-07-28  4:15 Matthew Marchese
2017-02-19  0:46 Robin H. Johnson
2016-07-18  6:22 Robin H. Johnson
2016-05-27 12:07 Alex Legler
2016-05-27 12:07 Alex Legler
2016-03-23 17:40 Robin H. Johnson
2015-10-04 21:12 Alex Legler
2015-08-10  9:20 Alex Legler
2015-05-19 12:55 Alex Legler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox