(whimsy) branch master updated: Reduce noise
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new d7df9f0a Reduce noise d7df9f0a is described below commit d7df9f0a0277b134c60ea4f4bfd4c2c8851d1992 Author: Sebb AuthorDate: Sun Apr 28 14:54:11 2024 +0100 Reduce noise --- tools/site-scan.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/site-scan.rb b/tools/site-scan.rb index 41adc6f5..a7f5750c 100755 --- a/tools/site-scan.rb +++ b/tools/site-scan.rb @@ -219,7 +219,9 @@ def parse(id, site, name, podling=false) nodisclaimer << subpage end else - $stderr.puts "#{id} #{subpage} => #{uri} #{status} '#{anchor.text.strip}'" + unless %w(nlpcraft teaclave).include? id # reported, but not yet fixed, so suppress noise +$stderr.puts "#{id} #{subpage} => #{uri} #{status} '#{anchor.text.strip}'" + end end rescue URI::InvalidURIError end
(whimsy) branch master updated: Fix up link text once
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 8d2e6e57 Fix up link text once 8d2e6e57 is described below commit 8d2e6e5794b1c45f82dc542ebb058840e1624438 Author: Sebb AuthorDate: Sat Apr 27 23:32:39 2024 +0100 Fix up link text once --- tools/download_check.rb | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/download_check.rb b/tools/download_check.rb index c5c1fc06..27ab7568 100755 --- a/tools/download_check.rb +++ b/tools/download_check.rb @@ -282,7 +282,8 @@ def get_links(path, body, checkSpaces=false) if href =~ %r{^?Preferred=https?://} href = path + URI.decode_www_form_component(href) end -text = node.text.gsub(/[[:space:]]+/, ' ').strip +# Strip spurious text from link (age, baremaps) +text = node.text.gsub(/[[:space:]]+/, ' ').sub('(opens in a new tab)', '').sub('➚', '').strip [href, text] unless href =~ %r{/httpcomponents.+/xdoc/downloads.xml} # breadcrumb link to source }.select {|x, _y| x =~ %r{^(https?:)?//} } end @@ -581,15 +582,13 @@ def _checkDownloadPage(path, tlp, version) else E "Bug: found hash #{h} for missing artifact #{stem}" end - t.sub!('➚', '') # age - t.strip! next if t == '' # empire-db tmp = text2ext(t) next if ext == tmp # i.e. link is just the type or [TYPE] next if ext == 'sha' and tmp == 'sha1' # historic next if %w(sha256 md5 mds sha512 sha1).include?(ext) and %w(SHA digest Digest CheckSum checksums).include?(t) # generic next if ext == 'mds' and (tmp == 'hashes' or t == 'Digests') - if base != t + unless base == t or h == t # Allow for full path to sig/hash if t == 'Download' # MXNet W "Mismatch: #{h} and '#{t}'" elsif not %w{checksum Hash}.include? t
(whimsy) branch master updated: Oops
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 89f4152e Oops 89f4152e is described below commit 89f4152866ea985fa4b618c963673336cd58 Author: Sebb AuthorDate: Fri Apr 26 11:09:33 2024 +0100 Oops --- tools/site-scan.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/site-scan.rb b/tools/site-scan.rb index 3657a26c..41adc6f5 100755 --- a/tools/site-scan.rb +++ b/tools/site-scan.rb @@ -163,7 +163,7 @@ def parse(id, site, name, podling=false) if a_href =~ %r{^https?://} # no need to rebase this site2 = URI.parse(a_href.gsub(' ','%20').gsub('|', '%7C')) # needs to be a URI else - site2 = URI.join(site,a_href.gsub(' ','%20').gsub('|', '%7C') # HACK + site2 = URI.join(site,a_href.gsub(' ','%20').gsub('|', '%7C')) # HACK end if site2.host == uri.host and site2.path.size > 2 subpages[site2.to_s] = a
(whimsy) branch master updated: Alloe for more special chars
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 284e4efa Alloe for more special chars 284e4efa is described below commit 284e4efac417fde8866233299fd6e02574adaa3a Author: Sebb AuthorDate: Fri Apr 26 09:12:23 2024 +0100 Alloe for more special chars --- tools/site-scan.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/site-scan.rb b/tools/site-scan.rb index 3790ee23..3657a26c 100755 --- a/tools/site-scan.rb +++ b/tools/site-scan.rb @@ -161,9 +161,9 @@ def parse(id, site, name, podling=false) unless a_href =~ %r{^(#|mailto:)} begin if a_href =~ %r{^https?://} # no need to rebase this - site2 = URI.parse(a_href) # needs to be a URI + site2 = URI.parse(a_href.gsub(' ','%20').gsub('|', '%7C')) # needs to be a URI else - site2 = URI.join(site,a_href.gsub(' ','%20')) # HACK + site2 = URI.join(site,a_href.gsub(' ','%20').gsub('|', '%7C') # HACK end if site2.host == uri.host and site2.path.size > 2 subpages[site2.to_s] = a
(whimsy) branch master updated: Fix up stale credentials
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 1810b574 Fix up stale credentials 1810b574 is described below commit 1810b574daf4f48d64662da525f880f4766dd0c2 Author: Sebb AuthorDate: Thu Apr 25 17:22:36 2024 +0100 Fix up stale credentials --- docker-config/25-authz_ldap_group_membership.conf | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-config/25-authz_ldap_group_membership.conf b/docker-config/25-authz_ldap_group_membership.conf index 1ce8054e..1680b2a3 100644 --- a/docker-config/25-authz_ldap_group_membership.conf +++ b/docker-config/25-authz_ldap_group_membership.conf @@ -59,8 +59,8 @@ # LDAP alias: infrastructure AuthLDAPUrl "ldaps://ldap-us.apache.org:636 ldap-eu.apache.org:636/ou=people,dc=apache,dc=org?uid" - AuthLDAPBindDN cn=nss_p6,ou=users,ou=services,dc=apache,dc=org - AuthLDAPBindPassword "exec:/usr/bin/asfldapsearch --pwd" + AuthLDAPBindDN <%= ldapbinddn %> + AuthLDAPBindPassword "<%= ldapbindpw %>" AuthLDAPGroupAttribute member AuthLDAPGroupAttributeIsDN on AuthLDAPMaxSubGroupDepth 0 @@ -69,8 +69,8 @@ # LDAP alias: apldap AuthLDAPUrl "ldaps://ldap-us.apache.org:636 ldap-eu.apache.org:636/ou=people,dc=apache,dc=org?uid" - AuthLDAPBindDN cn=nss_p6,ou=users,ou=services,dc=apache,dc=org - AuthLDAPBindPassword "exec:/usr/bin/asfldapsearch --pwd" + AuthLDAPBindDN <%= ldapbinddn %> + AuthLDAPBindPassword "<%= ldapbindpw %>" AuthLDAPGroupAttribute member AuthLDAPGroupAttributeIsDN on AuthLDAPMaxSubGroupDepth 0
(whimsy) branch master updated: Fix file name
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new cb97709c Fix file name cb97709c is described below commit cb97709c1100d9865d1adb904f1b274e926fddc8 Author: Sebb AuthorDate: Thu Apr 25 15:27:42 2024 +0100 Fix file name --- lib/whimsy/asf/committee.rb | 4 ++-- www/test/dataflow.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/whimsy/asf/committee.rb b/lib/whimsy/asf/committee.rb index a2402194..0e9f0e74 100644 --- a/lib/whimsy/asf/committee.rb +++ b/lib/whimsy/asf/committee.rb @@ -305,9 +305,9 @@ module ASF contents end -# record termination date in committee-info.yml +# record termination date in committee-info.yaml # Params: -# - input: the contents of committee-info.yml +# - input: the contents of committee-info.yaml # - pmc: the pmc name # - mm: -MM retirement date # Returns: the updated contents diff --git a/www/test/dataflow.json b/www/test/dataflow.json index cac408a4..098ea569 100644 --- a/www/test/dataflow.json +++ b/www/test/dataflow.json @@ -19,7 +19,7 @@ "maintainer": "/www/roster/public_committee_info.rb", "sources": [ "/lib/whimsy/asf/committee.rb", - "private/committers/board/committee-info.yml" + "private/committers/board/committee-info.yaml" ] }, "https://whimsy.apache.org/public/icla-info.json": {
(whimsy) 02/02: Show anchor for error URLs
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git commit 736aa0fdc2d4517b1e8617b17bc7ee061f1cbdda Author: Sebb AuthorDate: Thu Apr 25 14:00:51 2024 +0100 Show anchor for error URLs --- tools/site-scan.rb | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/site-scan.rb b/tools/site-scan.rb index 1a907412..3790ee23 100755 --- a/tools/site-scan.rb +++ b/tools/site-scan.rb @@ -7,7 +7,6 @@ # # Makes no value judgements. Simply extracts raw data for offline analysis. $LOAD_PATH.unshift '/srv/whimsy/lib' -require 'set' require 'net/http' require 'nokogiri' require 'json' @@ -103,7 +102,7 @@ def parse(id, site, name, podling=false) end data[:uri] = uri.to_s - subpages = Set.new + subpages = Hash.new # FIRST: scan each link's a_href to see if we need to capture it # also capture script src for events, and some page refs for podlings doc.traverse do |a| @@ -167,7 +166,7 @@ def parse(id, site, name, podling=false) site2 = URI.join(site,a_href.gsub(' ','%20')) # HACK end if site2.host == uri.host and site2.path.size > 2 - subpages.add site2.to_s + subpages[site2.to_s] = a end rescue StandardError => e $stderr.puts "#{id}: Bad a_href #{a_href} #{e}" @@ -205,7 +204,7 @@ def parse(id, site, name, podling=false) if podling hasdisclaimer = 0 nodisclaimer = [] -subpages.each do |subpage| +subpages.each do |subpage, anchor| begin uri, response, status = $cache.get(subpage) if uri&.to_s == subpage or uri&.to_s == subpage + '/' @@ -219,6 +218,8 @@ def parse(id, site, name, podling=false) else nodisclaimer << subpage end +else + $stderr.puts "#{id} #{subpage} => #{uri} #{status} '#{anchor.text.strip}'" end rescue URI::InvalidURIError end
(whimsy) branch master updated (83488587 -> 736aa0fd)
This is an automated email from the ASF dual-hosted git repository. sebb pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git from 83488587 Show error text new ce25fdac Don't show trivial URL changes new 736aa0fd Show anchor for error URLs The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: tools/site-scan.rb | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-)
(whimsy) 01/02: Don't show trivial URL changes
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git commit ce25fdaca37a7c627e9dc72362bdd1a04eb42425 Author: Sebb AuthorDate: Thu Apr 25 13:46:07 2024 +0100 Don't show trivial URL changes --- tools/site-scan.rb | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/site-scan.rb b/tools/site-scan.rb index 9877fb58..1a907412 100755 --- a/tools/site-scan.rb +++ b/tools/site-scan.rb @@ -208,7 +208,11 @@ def parse(id, site, name, podling=false) subpages.each do |subpage| begin uri, response, status = $cache.get(subpage) -puts "#{id} #{subpage} => #{uri} #{status}" # uri might be nil +if uri&.to_s == subpage or uri&.to_s == subpage + '/' + puts "#{id} #{uri} #{status}" +else + puts "#{id} #{subpage} => #{uri} #{status}" +end if %w{unchanged recent updated}.include? status if response =~ SiteStandards::PODLING_CHECKS['disclaimer'][SiteStandards::CHECK_CAPTURE] hasdisclaimer += 1
(whimsy) branch master updated: Show error text
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 83488587 Show error text 83488587 is described below commit 83488587ec6ced95e8c31be86b99082e0c7ab202 Author: Sebb AuthorDate: Thu Apr 25 13:26:12 2024 +0100 Show error text --- tools/site-scan.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/site-scan.rb b/tools/site-scan.rb index 96d1d2bd..9877fb58 100755 --- a/tools/site-scan.rb +++ b/tools/site-scan.rb @@ -169,8 +169,8 @@ def parse(id, site, name, podling=false) if site2.host == uri.host and site2.path.size > 2 subpages.add site2.to_s end - rescue StandardError -$stderr.puts "#{id}: Bad a_href #{a_href}" + rescue StandardError => e +$stderr.puts "#{id}: Bad a_href #{a_href} #{e}" end end end
(whimsy) branch master updated: Needs to be a URI
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 8ac7efea Needs to be a URI 8ac7efea is described below commit 8ac7efea44f494d0372aa386a992e41307fcf5e7 Author: Sebb AuthorDate: Thu Apr 25 13:17:39 2024 +0100 Needs to be a URI --- tools/site-scan.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/site-scan.rb b/tools/site-scan.rb index 92255621..96d1d2bd 100755 --- a/tools/site-scan.rb +++ b/tools/site-scan.rb @@ -162,7 +162,7 @@ def parse(id, site, name, podling=false) unless a_href =~ %r{^(#|mailto:)} begin if a_href =~ %r{^https?://} # no need to rebase this - site2 = a_href + site2 = URI.parse(a_href) # needs to be a URI else site2 = URI.join(site,a_href.gsub(' ','%20')) # HACK end
(whimsy) branch master updated: Have to do it ourselves now
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new df051701 Have to do it ourselves now df051701 is described below commit df05170108f8776f9bcb6fe64b4bb48b6e48f9c3 Author: Sebb AuthorDate: Thu Apr 25 13:11:03 2024 +0100 Have to do it ourselves now --- .github/workflows/unittestlib.yml | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unittestlib.yml b/.github/workflows/unittestlib.yml index eb1ed68a..5653624a 100644 --- a/.github/workflows/unittestlib.yml +++ b/.github/workflows/unittestlib.yml @@ -15,8 +15,7 @@ jobs: strategy: fail-fast: false matrix: -# Subversion not currently present on macos-13+ -os: [macos-12, ubuntu-20.04, ubuntu-22.04] +os: [macos-latest, ubuntu-20.04, ubuntu-22.04] ruby: [2.7, 3.1] # 2.7 not supported on 22.04 exclude: @@ -24,13 +23,17 @@ jobs: ruby: 2.7 runs-on: ${{ matrix.os }} steps: -- name: setup # needed for installing ruby-ldap +- name: setup non-macOS # needed for installing ruby-ldap run: | sudo apt-get update sudo apt-get install libldap2-dev sudo apt-get install libsasl2-dev sudo apt-get install libyaml-dev # seems to be needed for installing ruby since psych 5.0.0 release - if: matrix.os != 'macos-latest' + if: ${{ runner.os != 'macOS' }} +- name: setup macos + run: | +brew install subversion + if: ${{ runner.os == 'macOS' }} - uses: actions/checkout@v3 with: persist-credentials: false
(whimsy) branch master updated: Tidy up matched text
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 6d03c8b5 Tidy up matched text 6d03c8b5 is described below commit 6d03c8b53bba67c25e375ba460121978fb94652d Author: Sebb AuthorDate: Thu Apr 25 13:01:04 2024 +0100 Tidy up matched text --- tools/download_check.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/download_check.rb b/tools/download_check.rb index b62d3135..c5c1fc06 100755 --- a/tools/download_check.rb +++ b/tools/download_check.rb @@ -488,8 +488,10 @@ def _checkDownloadPage(path, tlp, version) hasGPGverify = false # Check if GPG verify has two parameters - body.scan(%r{^.+gpg --verify.+$}) { |m| + body.scan(%r{gpg --verify.+$}) { |m| hasGPGverify = true +# Hack to tidy matched text: drop spans and truncate at or +m.gsub!(%r{]+>|}, '').sub!(%r{(https://www.apache.org/info/verification.html#specify_both; end
(whimsy) branch master updated: Allow for missing Subversion
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new d53c6b39 Allow for missing Subversion d53c6b39 is described below commit d53c6b39da4b873b9e901f3c4c5b29c1e7c1924d Author: Sebb AuthorDate: Thu Apr 25 12:33:36 2024 +0100 Allow for missing Subversion --- .github/workflows/unittestlib.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unittestlib.yml b/.github/workflows/unittestlib.yml index aea0ee98..eb1ed68a 100644 --- a/.github/workflows/unittestlib.yml +++ b/.github/workflows/unittestlib.yml @@ -15,7 +15,8 @@ jobs: strategy: fail-fast: false matrix: -os: [macos-latest, ubuntu-20.04, ubuntu-22.04] +# Subversion not currently present on macos-13+ +os: [macos-12, ubuntu-20.04, ubuntu-22.04] ruby: [2.7, 3.1] # 2.7 not supported on 22.04 exclude:
(whimsy) branch master updated: Match new log messages
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new a9a500d0 Match new log messages a9a500d0 is described below commit a9a500d08869af4185986194e9c255726a199dea Author: Sebb AuthorDate: Thu Apr 25 11:41:25 2024 +0100 Match new log messages --- www/status/monitors/site_scan.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/status/monitors/site_scan.rb b/www/status/monitors/site_scan.rb index 4fcca158..d2cca96d 100644 --- a/www/status/monitors/site_scan.rb +++ b/www/status/monitors/site_scan.rb @@ -20,7 +20,7 @@ def Monitor.site_scan(previous_status) log = File.read(logfile) # Drop standard cache info - log.gsub! /^([-\w]+ )*https?:\S+ \w+\n/, '' + log.gsub! /^([-\w]+ )*https?:\S+ (=> \S* )?\w+\n/, '' # Drop other info (must agree with scanner script) log.gsub! %r{^(Started|Ended|Events):.+\n}, '' # drop 'Events: already have'
(whimsy) branch master updated: Fix up relative links
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 591e32cb Fix up relative links 591e32cb is described below commit 591e32cb2af5384522663ce3c573bd12326f1396 Author: Sebb AuthorDate: Thu Apr 25 11:20:31 2024 +0100 Fix up relative links --- tools/site-scan.rb | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/site-scan.rb b/tools/site-scan.rb index 9e2c614d..92255621 100755 --- a/tools/site-scan.rb +++ b/tools/site-scan.rb @@ -161,7 +161,11 @@ def parse(id, site, name, podling=false) end unless a_href =~ %r{^(#|mailto:)} begin -site2 = URI.join(site,a_href.gsub(' ','+')) +if a_href =~ %r{^https?://} # no need to rebase this + site2 = a_href +else + site2 = URI.join(site,a_href.gsub(' ','%20')) # HACK +end if site2.host == uri.host and site2.path.size > 2 subpages.add site2.to_s end
(whimsy) branch master updated: Show original page for error case
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 90ca069a Show original page for error case 90ca069a is described below commit 90ca069af28d2396fb56c56a77eb4e78e190ce86 Author: Sebb AuthorDate: Thu Apr 25 09:18:10 2024 +0100 Show original page for error case --- tools/site-scan.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/site-scan.rb b/tools/site-scan.rb index 583d4617..9e2c614d 100755 --- a/tools/site-scan.rb +++ b/tools/site-scan.rb @@ -204,7 +204,7 @@ def parse(id, site, name, podling=false) subpages.each do |subpage| begin uri, response, status = $cache.get(subpage) -puts "#{id} #{uri} #{status}" +puts "#{id} #{subpage} => #{uri} #{status}" # uri might be nil if %w{unchanged recent updated}.include? status if response =~ SiteStandards::PODLING_CHECKS['disclaimer'][SiteStandards::CHECK_CAPTURE] hasdisclaimer += 1
(whimsy) branch master updated: Docco
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 87b7877e Docco 87b7877e is described below commit 87b7877eb670fd5518217511b00d8e591b5ef7d5 Author: Sebb AuthorDate: Thu Apr 25 09:14:41 2024 +0100 Docco --- lib/whimsy/cache.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/whimsy/cache.rb b/lib/whimsy/cache.rb index cab0f0c1..a3103c19 100644 --- a/lib/whimsy/cache.rb +++ b/lib/whimsy/cache.rb @@ -42,8 +42,8 @@ class Cache # # Returns: # - uri (after redirects) - # - content - # - status: nocache, recent, updated, missing or no last mod/etag + # - content - or response if status is error + # - status: nocache, recent, updated, unchanged, error, cachemiss or no last mod/etag def get(url) if not @enabled uri, res = fetch(url)
(whimsy) branch master updated: Identify site with bad ref
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new b1c52f60 Identify site with bad ref b1c52f60 is described below commit b1c52f60fb99f7a7bd616c8a098789cca6c74f21 Author: Sebb AuthorDate: Thu Apr 25 09:05:01 2024 +0100 Identify site with bad ref --- tools/site-scan.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/site-scan.rb b/tools/site-scan.rb index b52ea858..583d4617 100755 --- a/tools/site-scan.rb +++ b/tools/site-scan.rb @@ -166,7 +166,7 @@ def parse(id, site, name, podling=false) subpages.add site2.to_s end rescue StandardError -$stderr.puts "Bad a_href #{a_href}" +$stderr.puts "#{id}: Bad a_href #{a_href}" end end end
(whimsy) branch master updated: Check for failed fetch
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new fe4ee630 Check for failed fetch fe4ee630 is described below commit fe4ee630fdaf3f3be27acb5fcfb82a34a6aafef6 Author: Sebb AuthorDate: Thu Apr 25 08:45:51 2024 +0100 Check for failed fetch --- tools/site-scan.rb | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/site-scan.rb b/tools/site-scan.rb index f57a832e..b52ea858 100755 --- a/tools/site-scan.rb +++ b/tools/site-scan.rb @@ -204,10 +204,13 @@ def parse(id, site, name, podling=false) subpages.each do |subpage| begin uri, response, status = $cache.get(subpage) -if response =~ SiteStandards::PODLING_CHECKS['disclaimer'][SiteStandards::CHECK_CAPTURE] - hasdisclaimer += 1 -else - nodisclaimer << subpage +puts "#{id} #{uri} #{status}" +if %w{unchanged recent updated}.include? status + if response =~ SiteStandards::PODLING_CHECKS['disclaimer'][SiteStandards::CHECK_CAPTURE] +hasdisclaimer += 1 + else +nodisclaimer << subpage + end end rescue URI::InvalidURIError end
(whimsy) branch master updated: Look for disclaimer away from home page
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 87295b5c Look for disclaimer away from home page 87295b5c is described below commit 87295b5c305ba64447012d3285c97592b3c6d5d5 Author: Sebb AuthorDate: Thu Apr 25 01:03:47 2024 +0100 Look for disclaimer away from home page TODO: add this into reports --- tools/site-scan.rb | 45 - 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/tools/site-scan.rb b/tools/site-scan.rb index 4e267580..f57a832e 100755 --- a/tools/site-scan.rb +++ b/tools/site-scan.rb @@ -7,6 +7,7 @@ # # Makes no value judgements. Simply extracts raw data for offline analysis. $LOAD_PATH.unshift '/srv/whimsy/lib' +require 'set' require 'net/http' require 'nokogiri' require 'json' @@ -66,7 +67,7 @@ end # Parse an Apache project website and return text|urls that match our checks # @return Hash of symbols: text|url found from a check made # @see SiteStandards for definitions of what we should scan for (in general) -def parse(id, site, name) +def parse(id, site, name, podling=false) data = {} # force https to avoid issue with cache (sites should use https anyway) site.sub!(%r{^http:},'https:') @@ -102,8 +103,9 @@ def parse(id, site, name) end data[:uri] = uri.to_s + subpages = Set.new # FIRST: scan each link's a_href to see if we need to capture it - # also capture script src for events + # also capture script src for events, and some page refs for podlings doc.traverse do |a| if a.name == 'script' @@ -157,6 +159,16 @@ def parse(id, site, name) end end end +unless a_href =~ %r{^(#|mailto:)} + begin +site2 = URI.join(site,a_href.gsub(' ','+')) +if site2.host == uri.host and site2.path.size > 2 + subpages.add site2.to_s +end + rescue StandardError +$stderr.puts "Bad a_href #{a_href}" + end +end end # SECOND: scan each text node to match and capture @@ -183,6 +195,28 @@ def parse(id, site, name) data[:disclaimer] = t end end + + # Brief scan of initial sub-pages to look for disclaimers + # TODO also look for a download page? + if podling +hasdisclaimer = 0 +nodisclaimer = [] +subpages.each do |subpage| + begin +uri, response, status = $cache.get(subpage) +if response =~ SiteStandards::PODLING_CHECKS['disclaimer'][SiteStandards::CHECK_CAPTURE] + hasdisclaimer += 1 +else + nodisclaimer << subpage +end + rescue URI::InvalidURIError + end +end +if nodisclaimer.size > 0 + data[:disclaimers] = [hasdisclaimer, nodisclaimer] +end + end + # THIRD: see if an image has been uploaded data[:image] = ASF::SiteImage.find(id) @@ -299,10 +333,11 @@ puts "Started: #{Time.now}" # must agree with site-scan monitor # If additional projname|podlingname are provided, only scans those sites if ARGV.first =~ /^https?:\/\/\w/ # Scan a single URL provided by user - site = ARGV.shift + podling = ARGV.delete('--podling') + site = ARGV.shift.dup # needs to be unfrozen name = ARGV.shift || site[/\/(\w[^.]*)/, 1].capitalize output_projects = ARGV.shift - results[name] = parse(name, site, name) + results[name] = parse(name, site, name, podling) else # Gather output filenames (if any) and scan various projects if ARGV.first =~ %r{[./]} # have we a file name? @@ -335,7 +370,7 @@ else if ARGV.length > 0 next unless ARGV.include? podling.name end - podlings[podling.name] = parse(podling.name, podling.podlingStatus[:website], podling.display_name) + podlings[podling.name] = parse(podling.name, podling.podlingStatus[:website], podling.display_name, true) end end end
(whimsy) branch master updated: Obsolete
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new e6072e81 Obsolete e6072e81 is described below commit e6072e81dd79747728f09a5f7ab5a64798aa8580 Author: Sebb AuthorDate: Tue Apr 23 21:31:57 2024 +0100 Obsolete --- docker-compose.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 1723e8a5..5c95b8ad 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,4 +1,3 @@ -version: '3' services: web: # must agree with Rakefile image: whimsy-web
(whimsy) branch master updated: Add separato
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 5e1f5532 Add separato 5e1f5532 is described below commit 5e1f553217c7d2038644297b80797cbfaba7bdd9 Author: Sebb AuthorDate: Tue Apr 23 21:15:19 2024 +0100 Add separato --- www/members/page-scanner.cgi | 1 + 1 file changed, 1 insertion(+) diff --git a/www/members/page-scanner.cgi b/www/members/page-scanner.cgi index 6bda8d67..05ef3428 100755 --- a/www/members/page-scanner.cgi +++ b/www/members/page-scanner.cgi @@ -45,6 +45,7 @@ if qs =~ %r{^url=(https?://[^&]+)(?:&(.+))?} puts "" puts "Transitive references:" extras.each do |k, v| +puts "" #separator puts "Loaded by: "+k v.each do |url,_| print ASFDOMAIN.asfurl?(url) ? 'OK ' : 'NO '
(whimsy) branch master updated: Look for nested JS references
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 4acc5ccd Look for nested JS references 4acc5ccd is described below commit 4acc5ccd514c0efad141da3d65979a4b38d86f4e Author: Sebb AuthorDate: Tue Apr 23 17:08:22 2024 +0100 Look for nested JS references --- tools/scan-page.js | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/scan-page.js b/tools/scan-page.js index 6aa31787..c5ea2910 100755 --- a/tools/scan-page.js +++ b/tools/scan-page.js @@ -18,6 +18,10 @@ if (!isASFhost(inithost)) { throw new Error("Only ASF hosts are supported - saw " + inithost); } +function getHost(url) { + return new URL(url).host; +} + (async () => { // new fails with: // Error: Failed to launch the browser process! @@ -41,8 +45,12 @@ if (!isASFhost(inithost)) { console.log(url); interceptedRequest.continue(); } else if (option == 'allref') { - let iniurl = interceptedRequest.initiator().url; - if (iniurl && !iniurl.startsWith(target)) { // second level + ini = interceptedRequest.initiator(); + let iniurl = ini.url; + if (!iniurl && ini.stack) { +iniurl = ini.stack.callFrames[0].url; + } + if (iniurl && inithost != getHost(iniurl)) { // second level console.log(url + ' <= ' + iniurl); } else { console.log(url);
(whimsy) branch master updated: Cannot share /srv/gems
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 400799db Cannot share /srv/gems 400799db is described below commit 400799db3478a120417468901be01532d450c61a Author: Sebb AuthorDate: Tue Apr 23 13:38:31 2024 +0100 Cannot share /srv/gems --- DOCKER.md | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/DOCKER.md b/DOCKER.md index d0455fc1..316a0763 100644 --- a/DOCKER.md +++ b/DOCKER.md @@ -5,7 +5,8 @@ Docker execution instructions check out the [setupmymac script](./SETUPMYMAC.md), which automates configuring and keeping updated a local whimsy instance with Docker. -This is experimental at this point. +This is experimental at this point, and may not work if you have already +used it to set up a local macOS installation. Do *NOT* proceed unless you are comfortable with the notion of containers, images, Dockerfiles, Volumes, Port Forwarding, and likely Docker Compose. @@ -56,6 +57,9 @@ Installation instructions * The `svn` and `git` sub-directories cannot be links to another part of host file system outside of your home directory as those files will not be visible to the container. +* The /srv/gems directory cannot be shared between macOS and the container. + This is because some Gems have native code, and the bundler versions are + unlikely to be the same. * `cd` into that directory * `git clone g...@github.com:apache/whimsy.git` OR * `git clone https://github.com/apache/whimsy.git` (whichever works best for you) @@ -65,7 +69,7 @@ Installation instructions There is a sample template `whimsy/config/bash_aliases.template` to get you started * `mkdir apache2_logs` if required - this will be used for the server logs (makes it easier to review them) * `cd whimsy` -* Start Docker if necessary: `$ open /Applications/Docker.app` +* Start Docker if necessary: `$ open [~]/Applications/Docker.app` * `rake docker:update` # this runs docker:build and updates any Gems * If you are using a local copy of SVN, you will need to start the server and run `rake svn:update` from a shell * Otherwise you can run `rake svn:update` externally
(whimsy) branch master updated: Another Docker reference
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new dffb0ecd Another Docker reference dffb0ecd is described below commit dffb0ecdf7e4e43145625caeeb0ea3d97f5e5ee5 Author: Sebb AuthorDate: Tue Apr 23 13:11:41 2024 +0100 Another Docker reference --- config/setupmymac | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/config/setupmymac b/config/setupmymac index 1115eb1b..d574f63c 100755 --- a/config/setupmymac +++ b/config/setupmymac @@ -82,6 +82,15 @@ def sudo end end +def findDocker + if Dir.exist? "#{Dir.home}/Applications/Docker.app" +return "#{Dir.home}/Applications/Docker.app" + elsif Dir.exist? '/Applications/Docker.app' +return '/Applications/Docker.app' + end + return nil +end + ### Parse options to determine how whimsy code is to be run option = :www @@ -178,7 +187,7 @@ sudo_user = ENV['SUDO_USER'] ? ### Install Homebrew -unless $root and (option != :docker or not Dir.exist? '/Applications/Docker.app') +unless $root and (option != :docker or not findDocker) if `which brew`.empty? script = 'https://raw.githubusercontent.com/Homebrew/install/master/install' color %($ ruby -e "$(curl -fsSL #{script})") @@ -334,12 +343,7 @@ if force[:prune] end if option == :docker - dockerapp = nil - if Dir.exist? "#{Dir.home}/Applications/Docker.app" -dockerapp = "#{Dir.home}/Applications/Docker.app" - elsif Dir.exist? '/Applications/Docker.app' -dockerapp = '/Applications/Docker.app' - end + dockerapp = findDocker unless dockerapp dockerapp = '/Applications/Docker.app' brew 'cask', 'install', 'docker'
(whimsy) branch master updated: Try to allow for locally installed Docker
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 03ec59e4 Try to allow for locally installed Docker 03ec59e4 is described below commit 03ec59e4f319b0277c82d0932229c75780744f11 Author: Sebb AuthorDate: Tue Apr 23 12:18:57 2024 +0100 Try to allow for locally installed Docker --- config/setupmymac | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/config/setupmymac b/config/setupmymac index b7e73dab..1115eb1b 100755 --- a/config/setupmymac +++ b/config/setupmymac @@ -66,6 +66,8 @@ def brew *args run 'brew', *args end +# TODO: this does not work well for dry-run; +# the script can be called multiple times # Switch to root def sudo if $root @@ -332,19 +334,27 @@ if force[:prune] end if option == :docker - unless Dir.exist? '/Applications/Docker.app' + dockerapp = nil + if Dir.exist? "#{Dir.home}/Applications/Docker.app" +dockerapp = "#{Dir.home}/Applications/Docker.app" + elsif Dir.exist? '/Applications/Docker.app' +dockerapp = '/Applications/Docker.app' + end + unless dockerapp +dockerapp = '/Applications/Docker.app' brew 'cask', 'install', 'docker' end if `which docker-compose`.empty? -run 'open /Applications/Docker.app' +run dockerapp end unless system 'docker info > /dev/null 2>&1' -run 'open /Applications/Docker.app' +run dockerapp end unless $root +# TODO: this is wrong if Docker is to be used alongside a local install Dir.chdir '/srv/whimsy' do run 'rake docker:update' end
(whimsy) branch master updated: Typo
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 7c59d292 Typo 7c59d292 is described below commit 7c59d2928119260554a2a2cb6f685e4d99fbc836 Author: Sebb AuthorDate: Tue Apr 23 11:29:49 2024 +0100 Typo --- config/setupmymac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/setupmymac b/config/setupmymac index ef4ef35c..b7e73dab 100755 --- a/config/setupmymac +++ b/config/setupmymac @@ -327,7 +327,7 @@ if force[:prune] end run 'docker', 'container', 'prune', '--force' - run 'docker', 'imagea', 'prune', '--force' + run 'docker', 'image', 'prune', '--force' exit end
(whimsy) branch master updated: Don't show empty changes
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 8e5708cc Don't show empty changes 8e5708cc is described below commit 8e5708cca46c887616c2deb08ddb2cab3f8555d5 Author: Sebb AuthorDate: Tue Apr 23 11:19:03 2024 +0100 Don't show empty changes --- lib/whimsy/asf/json-utils.rb | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/whimsy/asf/json-utils.rb b/lib/whimsy/asf/json-utils.rb index 4afe29ae..56d9285b 100644 --- a/lib/whimsy/asf/json-utils.rb +++ b/lib/whimsy/asf/json-utils.rb @@ -47,7 +47,15 @@ module ASFJSON out.puts [bcj, key, v1, '=>', v2].inspect when 'Array' v1, v2 = args -out.puts [bcj, key, 'Dropped', v1-v2, 'Added', v2-v1].inspect +dropped = v1 - v2 +added = v2 - v1 +if dropped.size == 0 + out.puts [bcj, key, 'Added', v2-v1].inspect +elsif added.size == 0 + out.puts [bcj, key, 'Dropped', v1-v2].inspect +else + out.puts [bcj, key, 'Dropped', v1-v2, 'Added', v2-v1].inspect +end when 'Dropped' out.puts [bcj, 'Dropped', key, args].inspect when 'Added'
(whimsy) branch master updated: Can use personal LDAP creds
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 7e7a04f8 Can use personal LDAP creds 7e7a04f8 is described below commit 7e7a04f8dfdea4518dc39b8ca3b4af02a8d05a06 Author: Sebb AuthorDate: Tue Apr 23 11:12:36 2024 +0100 Can use personal LDAP creds --- config/whimsy.template | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/whimsy.template b/config/whimsy.template index e9f01848..f4f64591 100644 --- a/config/whimsy.template +++ b/config/whimsy.template @@ -28,4 +28,6 @@ # Optionally define httpd_dn in case you want to use a different role for httpd authentication # :whimsy_dn: cn=,ou=users,ou=services,dc=apache,dc=org +# Or you can use your personal credentials: +# :whimsy_dn: uid=,ou=people,dc=apache,dc=org # :httpd_dn: cn=,ou=users,ou=services,dc=apache,dc=org
(whimsy) branch master updated: Synch with updated LDAP auth using aliases
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 0bd608c4 Synch with updated LDAP auth using aliases 0bd608c4 is described below commit 0bd608c47f3a08c2c6633e6fa239192c03c79fef Author: Sebb AuthorDate: Sun Apr 21 22:29:39 2024 +0100 Synch with updated LDAP auth using aliases --- docker-config/whimsy.conf | 105 -- 1 file changed, 35 insertions(+), 70 deletions(-) diff --git a/docker-config/whimsy.conf b/docker-config/whimsy.conf index 2f3cf6ed..bc8637df 100644 --- a/docker-config/whimsy.conf +++ b/docker-config/whimsy.conf @@ -73,10 +73,7 @@ ExpiresActive On AuthLDAPUrl "ldaps://<%= ldaphosts %>/ou=people,dc=apache,dc=org?uid" AuthLDAPBindDN <%= ldapbinddn %> AuthLDAPBindPassword "<%= ldapbindpw %>" - AuthLDAPGroupAttribute memberUid - AuthLDAPGroupAttributeIsDN off - AuthLDAPMaxSubGroupDepth 0 - Require ldap-group cn=member,ou=groups,dc=apache,dc=org + Require ldap-alias-member @@ -223,10 +220,7 @@ Alias /project/icla/ /srv/whimsy/www/project/icla/public AuthLDAPUrl "ldaps://<%= ldaphosts %>/ou=people,dc=apache,dc=org?uid" AuthLDAPBindDN <%= ldapbinddn %> AuthLDAPBindPassword "<%= ldapbindpw %>" - AuthLDAPGroupAttribute member - AuthLDAPGroupAttributeIsDN on - AuthLDAPMaxSubGroupDepth 0 - Require ldap-group cn=committers,ou=role,ou=groups,dc=apache,dc=org + Require ldap-alias-committer @@ -236,10 +230,7 @@ Alias /project/icla/ /srv/whimsy/www/project/icla/public AuthLDAPUrl "ldaps://<%= ldaphosts %>/ou=people,dc=apache,dc=org?uid" AuthLDAPBindDN <%= ldapbinddn %> AuthLDAPBindPassword "<%= ldapbindpw %>" - AuthLDAPGroupAttribute member - AuthLDAPGroupAttributeIsDN on - AuthLDAPMaxSubGroupDepth 0 - Require ldap-group cn=committers,ou=role,ou=groups,dc=apache,dc=org + Require ldap-alias-committer @@ -249,10 +240,7 @@ Alias /project/icla/ /srv/whimsy/www/project/icla/public AuthLDAPUrl "ldaps://<%= ldaphosts %>/ou=people,dc=apache,dc=org?uid" AuthLDAPBindDN <%= ldapbinddn %> AuthLDAPBindPassword "<%= ldapbindpw %>" - AuthLDAPGroupAttribute member - AuthLDAPGroupAttributeIsDN on - AuthLDAPMaxSubGroupDepth 0 - Require ldap-group cn=committers,ou=role,ou=groups,dc=apache,dc=org + Require ldap-alias-committer @@ -262,10 +250,7 @@ Alias /project/icla/ /srv/whimsy/www/project/icla/public AuthLDAPUrl "ldaps://<%= ldaphosts %>/ou=people,dc=apache,dc=org?uid" AuthLDAPBindDN <%= ldapbinddn %> AuthLDAPBindPassword "<%= ldapbindpw %>" - AuthLDAPGroupAttribute member - AuthLDAPGroupAttributeIsDN on - AuthLDAPMaxSubGroupDepth 0 - Require ldap-group cn=committers,ou=role,ou=groups,dc=apache,dc=org + Require ldap-alias-committer @@ -275,10 +260,10 @@ Alias /project/icla/ /srv/whimsy/www/project/icla/public AuthLDAPUrl "ldaps://<%= ldaphosts %>/ou=people,dc=apache,dc=org?uid" AuthLDAPBindDN <%= ldapbinddn %> AuthLDAPBindPassword "<%= ldapbindpw %>" - AuthLDAPGroupAttribute member - AuthLDAPGroupAttributeIsDN on - AuthLDAPMaxSubGroupDepth 0 - Require ldap-group cn=committers,ou=role,ou=groups,dc=apache,dc=org + +Require ldap-alias-member +Require ldap-alias-incubator-pmc + @@ -288,10 +273,10 @@ Alias /project/icla/ /srv/whimsy/www/project/icla/public AuthLDAPUrl "ldaps://<%= ldaphosts %>/ou=people,dc=apache,dc=org?uid" AuthLDAPBindDN <%= ldapbinddn %> AuthLDAPBindPassword "<%= ldapbindpw %>" - AuthLDAPGroupAttribute member - AuthLDAPGroupAttributeIsDN on - AuthLDAPMaxSubGroupDepth 0 - Require ldap-group cn=committers,ou=role,ou=groups,dc=apache,dc=org + +Require ldap-alias-member +Require ldap-alias-incubator-pmc + @@ -301,10 +286,7 @@ Alias /project/icla/ /srv/whimsy/www/project/icla/public AuthLDAPUrl "ldaps://<%= ldaphosts %>/ou=people,dc=apache,dc=org?uid" AuthLDAPBindDN <%= ldapbinddn %> AuthLDAPBindPassword "<%= ldapbindpw %>" - AuthLDAPGroupAttribute member - AuthLDAPGroupAttributeIsDN on - AuthLDAPMaxSubGroupDepth 0 - Require ldap-group cn=committers,ou=role,ou=groups,dc=apache,dc=org + Require ldap-alias-committer @@ -314,10 +296,7 @@ Alias /project/icla/ /srv/whimsy/www/project/icla/public AuthLDAPUrl "ldaps://<%= ldaphosts %>/ou=people,dc=apache,dc=org?uid" AuthLDAPBindDN <%= ldapbinddn %> AuthLDAPBindPassword "<%= ldapbindpw %>" - AuthLDAPGroupAttribute member - AuthLDAPGroupAttributeIsDN on - AuthLDAPMaxSubGroupD
(whimsy) branch master updated: Fix logic
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 89d6bb7c Fix logic 89d6bb7c is described below commit 89d6bb7c27e803579bb272368050ab08e6133223 Author: Sebb AuthorDate: Sun Apr 21 12:20:07 2024 +0100 Fix logic --- config/setupmymac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/setupmymac b/config/setupmymac index 560adae8..ef4ef35c 100755 --- a/config/setupmymac +++ b/config/setupmymac @@ -371,7 +371,7 @@ if option != :user snippet += "PassengerUser #{user}\nPassengerGroup #{group}\n" end -unless File.exist?(passenger_conf) or File.read(passenger_conf) != snippet +if !File.exist?(passenger_conf) or File.read(passenger_conf) != snippet sudo do color "$ sudo edit #{passenger_conf}" File.write passenger_conf, snippet unless $dry_run
(whimsy) branch master updated: Default to showing transitive references separately
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 8bb0d446 Default to showing transitive references separately 8bb0d446 is described below commit 8bb0d446c3516f76d376f22504cbfabc909b7763 Author: Sebb AuthorDate: Sat Apr 20 15:05:13 2024 +0100 Default to showing transitive references separately --- www/members/page-scanner.cgi | 31 +++ 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/www/members/page-scanner.cgi b/www/members/page-scanner.cgi index 0df899c8..6bda8d67 100755 --- a/www/members/page-scanner.cgi +++ b/www/members/page-scanner.cgi @@ -10,13 +10,14 @@ require_relative '../../tools/asf-site-check' print "Content-type: text/plain; charset=UTF-8\r\n\r\n" -# puts ENV['REQUEST_URI'] +DIVIDER=' <= ' + qs = ENV['QUERY_STRING'] if qs =~ %r{^url=(https?://[^&]+)(?:&(.+))?} url = $1 option = $2 # we only want full URLs - option = 'all' unless option == 'showurl' + option = 'allref' unless %w{all showurl}.include? option print "Checking the page #{url}\n\n" puts "The following references were found to hosts other than apache.org and apachecon.com" puts "The first column shows if the host is recognised as being under ASF control according to" @@ -25,9 +26,31 @@ if qs =~ %r{^url=(https?://[^&]+)(?:&(.+))?} cmd = ['node', '/srv/whimsy/tools/scan-page.js', url, option] out, err, status = Open3.capture3(*cmd) if status.success? +if out == '' + puts "No external references found" +else + puts "Top-level references:" +end +extras = Hash.new {|h,k| h[k] = Hash.new} out.split("\n").each do |url| - print ASFDOMAIN.asfurl?(url) ? 'OK ' : 'NO ' - puts url + p1, p2 = url.split(DIVIDER) + if p2 +extras[p2][p1]=1 + else +print ASFDOMAIN.asfurl?(url) ? 'OK ' : 'NO ' +puts url + end +end +if extras.size > 0 + puts "" + puts "Transitive references:" + extras.each do |k, v| +puts "Loaded by: "+k +v.each do |url,_| + print ASFDOMAIN.asfurl?(url) ? 'OK ' : 'NO ' + puts url + end + end end else puts err.scan(/^Error:.+/).first || err # Show only the Error line if present
(whimsy) branch master updated: Option to show initiator
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 51660fb3 Option to show initiator 51660fb3 is described below commit 51660fb3a6b1708b9ae6e7f5269792ac75226ca4 Author: Sebb AuthorDate: Sat Apr 20 15:04:14 2024 +0100 Option to show initiator --- tools/scan-page.js | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/scan-page.js b/tools/scan-page.js index f91107ce..6aa31787 100755 --- a/tools/scan-page.js +++ b/tools/scan-page.js @@ -6,7 +6,7 @@ module.paths.push('/usr/lib/node_modules') const puppeteer = require('puppeteer'); -const target = process.argv[2] || 'http://apache.org/'; +const target = process.argv[2] || 'https://apache.org/'; const inithost = new URL(target).host; const option = process.argv[3] || ''; @@ -40,6 +40,14 @@ if (!isASFhost(inithost)) { if (option == 'all') { console.log(url); interceptedRequest.continue(); +} else if (option == 'allref') { + let iniurl = interceptedRequest.initiator().url; + if (iniurl && !iniurl.startsWith(target)) { // second level +console.log(url + ' <= ' + iniurl); + } else { +console.log(url); + } + interceptedRequest.continue(); } else { if (option == 'showurl') { console.log(url);
(whimsy) branch master updated: selfserve page was renamed
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new d1bc1b82 selfserve page was renamed d1bc1b82 is described below commit d1bc1b82946f04b8bc361f2f9f36dda9031a2387 Author: Sebb AuthorDate: Sat Apr 20 11:39:34 2024 +0100 selfserve page was renamed --- docker-config/whimsy.conf | 2 +- www/officers/index.cgi| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-config/whimsy.conf b/docker-config/whimsy.conf index 9072a420..2f3cf6ed 100644 --- a/docker-config/whimsy.conf +++ b/docker-config/whimsy.conf @@ -101,7 +101,7 @@ RedirectMatch permanent ^/secmail /secretary/workbench RedirectMatch permanent ^/officers/public_names /secretary/public-names # redirect obsolete mailing list request form to replacement application -RedirectMatch permanent ^/officers/mlreq https://selfserve.apache.org/mail.html +RedirectMatch permanent ^/officers/mlreq https://selfserve.apache.org/mailinglist-new.html ProxyPass "/board/agenda/websocket/" "ws://localhost:34234/" diff --git a/www/officers/index.cgi b/www/officers/index.cgi index 7ce369dc..ee3eadc9 100755 --- a/www/officers/index.cgi +++ b/www/officers/index.cgi @@ -11,7 +11,7 @@ OFFICERS = { '/board/agenda' => "Monthly Board Agenda Tool", 'acreq.cgi' => "New Account Request Helper", 'unlistedclas.cgi' => "Unlisted CLAs (prospective committers)", - 'mlreq.cgi' => "New Mailing List Request Form", + 'https://selfserve.apache.org/mailinglist-new.html' => "New Mailing List Request Form", '/committers/subscribe.cgi' => "Apache Mailing List Subscription/Unsubscription Tool", '/board/subscriptions' => "PMC Chair board@ Subscription Crosscheck", 'list-traffic.cgi' => "Statistics About The board@ Mailing List",
(whimsy) branch master updated: Indent 2 spaces
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 5a1bef15 Indent 2 spaces 5a1bef15 is described below commit 5a1bef154415724295b071a8ffd4d7bc0eed2aa9 Author: Sebb AuthorDate: Fri Apr 19 23:26:11 2024 +0100 Indent 2 spaces --- tools/scan-page.js | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/tools/scan-page.js b/tools/scan-page.js index 7d184ccf..f91107ce 100755 --- a/tools/scan-page.js +++ b/tools/scan-page.js @@ -12,10 +12,10 @@ const inithost = new URL(target).host; const option = process.argv[3] || ''; function isASFhost(host) { -return host == '' || host == 'apache.org' || host.endsWith('.apache.org') || host.endsWith('.apachecon.com'); + return host == '' || host == 'apache.org' || host.endsWith('.apache.org') || host.endsWith('.apachecon.com'); } if (!isASFhost(inithost)) { -throw new Error("Only ASF hosts are supported - saw " + inithost); + throw new Error("Only ASF hosts are supported - saw " + inithost); } (async () => { @@ -31,27 +31,27 @@ if (!isASFhost(inithost)) { const url = interceptedRequest.url(); if (url == target) { -// must allow this through -interceptedRequest.continue(); + // must allow this through + interceptedRequest.continue(); } else { -let host = new URL(url).host -if (!isASFhost(host)) { -// don't visit non-ASF hosts unless requested -if (option == 'all') { -console.log(url); -interceptedRequest.continue(); -} else { -if (option == 'showurl') { - console.log(url); -} else { - console.log(host); -} -interceptedRequest.abort(); -} + let host = new URL(url).host + if (!isASFhost(host)) { +// don't visit non-ASF hosts unless requested +if (option == 'all') { + console.log(url); + interceptedRequest.continue(); } else { -// Need to visit at least an initial redirect -interceptedRequest.continue(); + if (option == 'showurl') { +console.log(url); + } else { +console.log(host); + } + interceptedRequest.abort(); } + } else { +// Need to visit at least an initial redirect +interceptedRequest.continue(); + } } }); let result = await page.goto(target);
(whimsy) branch master updated: Allow showurl option
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 561ab34d Allow showurl option 561ab34d is described below commit 561ab34dab9ac3d4b0c2f28ef6f1fb6e91ae6c35 Author: Sebb AuthorDate: Fri Apr 19 22:52:39 2024 +0100 Allow showurl option --- www/members/page-scanner.cgi | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/www/members/page-scanner.cgi b/www/members/page-scanner.cgi index 276d3ec9..0df899c8 100755 --- a/www/members/page-scanner.cgi +++ b/www/members/page-scanner.cgi @@ -12,14 +12,17 @@ print "Content-type: text/plain; charset=UTF-8\r\n\r\n" # puts ENV['REQUEST_URI'] qs = ENV['QUERY_STRING'] -if qs =~ %r{^url=(https?://.+)} +if qs =~ %r{^url=(https?://[^&]+)(?:&(.+))?} url = $1 + option = $2 + # we only want full URLs + option = 'all' unless option == 'showurl' print "Checking the page #{url}\n\n" puts "The following references were found to hosts other than apache.org and apachecon.com" puts "The first column shows if the host is recognised as being under ASF control according to" puts "https://privacy.apache.org/policies/asf-domains; print "=\n" - cmd = ['node', '/srv/whimsy/tools/scan-page.js', url, 'all'] + cmd = ['node', '/srv/whimsy/tools/scan-page.js', url, option] out, err, status = Open3.capture3(*cmd) if status.success? out.split("\n").each do |url| @@ -31,6 +34,6 @@ if qs =~ %r{^url=(https?://.+)} end print "=\n" else - print "Expecting: ?url=http://.../\n; + print "Expecting: ?url=http://.../[]\n; end
(whimsy) branch master updated: _url and _status are obsolete; use the functions instead
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new b52e8dad _url and _status are obsolete; use the functions instead b52e8dad is described below commit b52e8dadee4a2be0359d8f7861eca326158a0804 Author: Sebb AuthorDate: Thu Apr 18 10:58:17 2024 +0100 _url and _status are obsolete; use the functions instead --- tools/scan-page.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/scan-page.js b/tools/scan-page.js index e75372c8..7d184ccf 100755 --- a/tools/scan-page.js +++ b/tools/scan-page.js @@ -55,9 +55,9 @@ if (!isASFhost(inithost)) { } }); let result = await page.goto(target); - let status = result._status; // now seems to be null if it completed OK? + let status = result.status(); if (status && status != 200) { -let url = result._url; +let url = result.url(); let error = `Status ${status} for ${url}`; throw new Error(error); }
(whimsy) branch master updated: No longer present on server
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new e71c67fc No longer present on server e71c67fc is described below commit e71c67fc87a11223f7655594590ff9793be37dd0 Author: Sebb AuthorDate: Mon Apr 15 23:38:09 2024 +0100 No longer present on server --- DEPLOYMENT.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md index 9280c817..6c76a2d5 100644 --- a/DEPLOYMENT.md +++ b/DEPLOYMENT.md @@ -129,9 +129,8 @@ and running - these are only needed for a new deployment. Using the `www-data` user, copy over the following directories from the previous whimsy-vm server: * `/srv/agenda` - * `/srv/icla` * `/srv/gpg` - this contains the public key ring used to check ICLA signatures - * `/srv/mail` - Note that the /srv/mail/* directories will in general be different between hosts + * `/srv/mail` - Note that the /srv/mail/* directories will in general be different between hosts This is because the final delivery routes will vary. However, rather than try and merge the files, it is simpler to do a full copy.
(whimsy) branch master updated: Show time since meeting
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 665f019f Show time since meeting 665f019f is described below commit 665f019fd925e152450248e284026602c30c3d26 Author: Sebb AuthorDate: Fri Apr 12 17:46:57 2024 +0100 Show time since meeting --- www/members/invitations.cgi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/www/members/invitations.cgi b/www/members/invitations.cgi index 50027712..46369198 100755 --- a/www/members/invitations.cgi +++ b/www/members/invitations.cgi @@ -115,6 +115,7 @@ def match_person(hash, id, name, mails) return nil end +meeting_end = ASF::MeetingUtil.meeting_end remain = ASF::MeetingUtil.application_time_remaining # produce HTML output of reports, highlighting ones that have not (yet) @@ -158,6 +159,8 @@ _html do _b "Applications close in #{remain[:days]} days and #{remain[:hours]} hours" else _b "Applications can no longer be accepted, sorry." + _ "The meeting ended at #{Time.at(meeting_end).getutc.strftime('%Y-%m-%d %H:%M %Z')}." + _ "This was #{remain[:days]} days and #{remain[:hours]} hours ago." end end }
(whimsy) branch master updated: Fix calculation for past meetings
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 0412cc7f Fix calculation for past meetings 0412cc7f is described below commit 0412cc7fde39b10c54ebbec5207b2f0e86a54afd Author: Sebb AuthorDate: Fri Apr 12 17:46:10 2024 +0100 Fix calculation for past meetings --- lib/whimsy/asf/meeting-util.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/whimsy/asf/meeting-util.rb b/lib/whimsy/asf/meeting-util.rb index b6511de6..307fa08a 100644 --- a/lib/whimsy/asf/meeting-util.rb +++ b/lib/whimsy/asf/meeting-util.rb @@ -433,11 +433,13 @@ module ASF # How long remains before applications close? # (Time is measured from scheduled end of the meeting in which the votes were declared) # Returned as hash, e.g. {:hoursremain=>605, :days=>25, :hours=>5} +# If applications have expired, :hoursremain is negative +# and :days/:hours are elapsed time since expiry def self.application_time_remaining meetingend = self.meeting_end # this is in seconds now = DateTime.now.to_time.to_i remain = (meetingend + APPLICATION_EXPIRY_POST_VOTE_SECS - now) / 3600 - {hoursremain: remain, days: remain/24, hours: remain%24} + {hoursremain: remain, days: remain.abs/24, hours: remain.abs%24} end # Are membership applications still valid?
(whimsy) branch master updated: Make subject of board report reminders not say missing. (#222)
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 5fe07cbe Make subject of board report reminders not say missing. (#222) 5fe07cbe is described below commit 5fe07cbea4b920671847b8932bc472e8d732197d Author: Dave Fisher AuthorDate: Wed Apr 10 15:15:57 2024 -0700 Make subject of board report reminders not say missing. (#222) By changing the tone of the subject reminders to submit the report are less judgmental. --- www/board/agenda/views/buttons/email.js.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/board/agenda/views/buttons/email.js.rb b/www/board/agenda/views/buttons/email.js.rb index 6b5b407b..c12d503e 100644 --- a/www/board/agenda/views/buttons/email.js.rb +++ b/www/board/agenda/views/buttons/email.js.rb @@ -45,7 +45,7 @@ class Email < Vue cc = "#{mail_list},#{@@item.cc}" if @@item.missing - subject = "Missing #{@@item.title} Board Report" + subject = "[REMINDER] Please submit the #{@@item.title} Board Report" if @@item.attach =~ /^\d/ body = %{ Dear #{@@item.owner},
(whimsy) branch master updated: Initial parse of marker files
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new b5456158 Initial parse of marker files b5456158 is described below commit b5456158e779557697d2d33e0b9496ee9ba023c6 Author: Sebb AuthorDate: Wed Apr 10 17:09:47 2024 +0100 Initial parse of marker files --- lib/whimsy/asf/mlist.rb | 20 1 file changed, 20 insertions(+) diff --git a/lib/whimsy/asf/mlist.rb b/lib/whimsy/asf/mlist.rb index 064eac3a..91ef0cb1 100644 --- a/lib/whimsy/asf/mlist.rb +++ b/lib/whimsy/asf/mlist.rb @@ -277,6 +277,24 @@ module ASF end end +# Parse the marker files: modpost, modsub, remote +# Return hash: key="domain list", value=hash containing :modsub, :modpost, :remote +# if the list has the corresponding file +# BETA: API may change! +def self.parse_markers + hash = Hash.new {|h,k| h[k] = Hash.new} + File.open(File.join(LIST_BASE, 'list-modsub')).each do |line| +hash[line.chomp][:modsub] = 1 + end + File.open(File.join(LIST_BASE, 'list-modpost')).each do |line| +hash[line.chomp][:modpost] = 1 + end + File.open(File.join(LIST_BASE, 'list-remote')).each do |line| +hash[line.chomp][:remote] = 1 + end + hash +end + private # return the archiver type as array: [:MBOX|:PONY|:MINO|:MAIL_ARCH|:MARKMAIL|:WHIMSY, 'public'|'private'|'alias'|'direct'] @@ -444,6 +462,8 @@ end if __FILE__ == $0 $LOAD_PATH.unshift '/srv/whimsy/lib' require 'whimsy/asf' + p ASF::MLIST.parse_markers + exit domain = ARGV.shift || 'whimsical' mlist = ASF::Committee.find(domain).mail_list p mlist
(whimsy) branch master updated: Check against ASF domains
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new d798186a Check against ASF domains d798186a is described below commit d798186a41f36eb3c6805a7897f2bcefb766b0c0 Author: Sebb AuthorDate: Wed Apr 10 11:28:50 2024 +0100 Check against ASF domains --- www/members/page-scanner.cgi | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/www/members/page-scanner.cgi b/www/members/page-scanner.cgi index 7026717b..276d3ec9 100755 --- a/www/members/page-scanner.cgi +++ b/www/members/page-scanner.cgi @@ -4,6 +4,7 @@ PAGETITLE = "ASF Page Asset Checker - ALPHA" # very rudimentary page asset checker - shows references to non-ASF assets require 'open3' +require_relative '../../tools/asf-site-check' # usage: whimsy.apache.org/members/page-scanner?url=http://apache.org/ @@ -14,13 +15,17 @@ qs = ENV['QUERY_STRING'] if qs =~ %r{^url=(https?://.+)} url = $1 print "Checking the page #{url}\n\n" - puts "The following 3rd party references were found." - puts "They have not been checked against the list of allowed references." + puts "The following references were found to hosts other than apache.org and apachecon.com" + puts "The first column shows if the host is recognised as being under ASF control according to" + puts "https://privacy.apache.org/policies/asf-domains; print "=\n" cmd = ['node', '/srv/whimsy/tools/scan-page.js', url, 'all'] out, err, status = Open3.capture3(*cmd) if status.success? -puts out +out.split("\n").each do |url| + print ASFDOMAIN.asfurl?(url) ? 'OK ' : 'NO ' + puts url +end else puts err.scan(/^Error:.+/).first || err # Show only the Error line if present end
(whimsy) branch master updated: return false rather than nil if RE does not match
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new a34bcc0a return false rather than nil if RE does not match a34bcc0a is described below commit a34bcc0a747c8dec94ce852c9dacb325ecb39587 Author: Sebb AuthorDate: Wed Apr 10 11:09:44 2024 +0100 return false rather than nil if RE does not match --- tools/asf-site-check.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/asf-site-check.rb b/tools/asf-site-check.rb index 63dd3bb7..590fac39 100644 --- a/tools/asf-site-check.rb +++ b/tools/asf-site-check.rb @@ -56,7 +56,8 @@ module ASFDOMAIN def self.asfhost?(host) return true if ASF_DOMAINS.include? host # This assumes all ASF domains are of the form a.b -return host =~ %r{\.(\w+\.\w+)\z} && ASF_DOMAINS.include?($1) +# (return false rather than nil if RE does not match) +return (host =~ %r{\.(\w+\.\w+)\z} && ASF_DOMAINS.include?($1)) || false end # check if URL is known to be under ASF control # extracts hostname and calls asfhost?
(whimsy) branch master updated: Show the full error if no Error: line
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new ebbc8613 Show the full error if no Error: line ebbc8613 is described below commit ebbc86131fd9bd5b43364f8e897446e9c123480f Author: Sebb AuthorDate: Tue Apr 9 15:04:12 2024 +0100 Show the full error if no Error: line --- www/members/page-scanner.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/members/page-scanner.cgi b/www/members/page-scanner.cgi index 052260db..7026717b 100755 --- a/www/members/page-scanner.cgi +++ b/www/members/page-scanner.cgi @@ -22,7 +22,7 @@ if qs =~ %r{^url=(https?://.+)} if status.success? puts out else -puts err.scan(/^Error:.+/) # Keep only the error line +puts err.scan(/^Error:.+/).first || err # Show only the Error line if present end print "=\n" else
(whimsy) branch master updated: What are the contents
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new ec4694f0 What are the contents ec4694f0 is described below commit ec4694f0f46e7d091248bb0f3a895993be63c532 Author: Sebb AuthorDate: Tue Apr 9 13:42:08 2024 +0100 What are the contents --- www/members/page-scanner.cgi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/members/page-scanner.cgi b/www/members/page-scanner.cgi index 04247a95..052260db 100755 --- a/www/members/page-scanner.cgi +++ b/www/members/page-scanner.cgi @@ -14,6 +14,8 @@ qs = ENV['QUERY_STRING'] if qs =~ %r{^url=(https?://.+)} url = $1 print "Checking the page #{url}\n\n" + puts "The following 3rd party references were found." + puts "They have not been checked against the list of allowed references." print "=\n" cmd = ['node', '/srv/whimsy/tools/scan-page.js', url, 'all'] out, err, status = Open3.capture3(*cmd)
(whimsy) branch master updated: Show error details on failure
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 091507df Show error details on failure 091507df is described below commit 091507df494f55c6e09da452fa6ba76348b8712e Author: Sebb AuthorDate: Tue Apr 9 13:34:28 2024 +0100 Show error details on failure --- www/members/page-scanner.cgi | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/www/members/page-scanner.cgi b/www/members/page-scanner.cgi index 81b7b073..04247a95 100755 --- a/www/members/page-scanner.cgi +++ b/www/members/page-scanner.cgi @@ -3,6 +3,8 @@ PAGETITLE = "ASF Page Asset Checker - ALPHA" # very rudimentary page asset checker - shows references to non-ASF assets +require 'open3' + # usage: whimsy.apache.org/members/page-scanner?url=http://apache.org/ print "Content-type: text/plain; charset=UTF-8\r\n\r\n" @@ -13,7 +15,13 @@ if qs =~ %r{^url=(https?://.+)} url = $1 print "Checking the page #{url}\n\n" print "=\n" - system('node', '/srv/whimsy/tools/scan-page.js', url, 'all') + cmd = ['node', '/srv/whimsy/tools/scan-page.js', url, 'all'] + out, err, status = Open3.capture3(*cmd) + if status.success? +puts out + else +puts err.scan(/^Error:.+/) # Keep only the error line + end print "=\n" else print "Expecting: ?url=http://.../\n;
(whimsy) branch master updated: ASF::Mail.lists was moved
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new a7e82dec ASF::Mail.lists was moved a7e82dec is described below commit a7e82dec9db7eac38443bcea725b365ecf830ef5 Author: Sebb AuthorDate: Sun Apr 7 23:25:25 2024 +0100 ASF::Mail.lists was moved --- www/incubator/maillist.cgi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/www/incubator/maillist.cgi b/www/incubator/maillist.cgi index 93312ca1..06761de0 100755 --- a/www/incubator/maillist.cgi +++ b/www/incubator/maillist.cgi @@ -4,6 +4,7 @@ PAGETITLE = "Incubator Podling Mailing Lists" # Wvisible:incubator mail $LOAD_PATH.unshift '/srv/whimsy/lib' require 'whimsy/asf' +require 'whimsy/asf/mlist' # not loaded by default require 'wunderbar/bootstrap' _html do @@ -20,7 +21,7 @@ _html do _a 'https://whimsy.apache.org/test/dataflow.cgi#/lib/whimsy/asf/podlings.rb', href: '/test/dataflow.cgi#/lib/whimsy/asf/podlings.rb' } ) do - lists = ASF::Mail.lists + lists = ASF::MLIST _table.table do _tr do @@ -42,7 +43,7 @@ _html do _td podling.status _td podling.reporting.join(', ') -_td lists.select {|list| podling.mail_list?(list) }.join(', ') +_td ASF::MLIST.domain_lists(podling.name, true).keys.join(', ') end end end
(whimsy) branch master updated: Tweak docs
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new bcb5d367 Tweak docs bcb5d367 is described below commit bcb5d367d4360c6b8d3f817be7c342450c7a4112 Author: Sebb AuthorDate: Sun Apr 7 14:40:21 2024 +0100 Tweak docs --- www/members/mailing_lists.cgi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/members/mailing_lists.cgi b/www/members/mailing_lists.cgi index 9fa9ba65..ac221400 100755 --- a/www/members/mailing_lists.cgi +++ b/www/members/mailing_lists.cgi @@ -19,14 +19,14 @@ FLAGS = %{ -Mu allow subscribers to post, reject all others (subonly) -MU allow anyone to post (open) --mz moderate after checking sender is known --Mz unmoderated, but requires sender to be known +-mz reject if it is not from an apache.org address, then moderate +-Mz reject if sender is not an apache.org address or in LDAP -s subscriptions are moderated (usually means the list is private) -x check mime-type, size etc -y send copy to secur...@apache.org --z check that sender address is known (i.e. @apache.org or in LDAP) +-z sender/from address checking: see above } # announce@a.o: mUxYz
(whimsy) branch master updated: Allow sort by list as well as domain
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 0baa1008 Allow sort by list as well as domain 0baa1008 is described below commit 0baa1008ba20282b30f515e2ba684da04f1c88f8 Author: Sebb AuthorDate: Sun Apr 7 12:42:02 2024 +0100 Allow sort by list as well as domain --- www/members/mailing_lists.cgi | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/www/members/mailing_lists.cgi b/www/members/mailing_lists.cgi index ccd6f08e..9fa9ba65 100755 --- a/www/members/mailing_lists.cgi +++ b/www/members/mailing_lists.cgi @@ -106,6 +106,7 @@ _html do _thead_ do _tr do _th 'list', data_sort: 'string' +_th 'domain', data_sort: 'string' _th "flags #{filter}", data_sort: 'string' _th 'Type (mu)', data_sort: 'string' _th 'mod count', data_sort: 'int' @@ -122,8 +123,11 @@ _html do next if listfilter and ! lad.include? listfilter mu = flags.tr('^muMU', '') _tr do + _td data_sort_value: "#{list}-#{domain}" do +_a list, href: "https://lists.apache.org/list.html?#{lad};, target: '_blank' + end _td data_sort_value: "#{domain}-#{list}" do -_a lad, href: "https://lists.apache.org/list.html?#{lad};, target: '_blank' +_a domain, href: "https://lists.apache.org/list.html?#{lad};, target: '_blank' end _td flags _td do
(whimsy) branch master updated: Change 24H to 48H (#221)
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 22771f65 Change 24H to 48H (#221) 22771f65 is described below commit 22771f6595777c240833cf2cd4f6438ab7ecb9a8 Author: Justin Mclean AuthorDate: Sun Apr 7 19:16:06 2024 +1000 Change 24H to 48H (#221) * Update email.js.rb * fourty to forty --- www/board/agenda/views/buttons/email.js.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/board/agenda/views/buttons/email.js.rb b/www/board/agenda/views/buttons/email.js.rb index ed4f6fce..6b5b407b 100644 --- a/www/board/agenda/views/buttons/email.js.rb +++ b/www/board/agenda/views/buttons/email.js.rb @@ -64,7 +64,7 @@ class Email < Vue The board report for #{@@item.title} has not yet been submitted for this month's board meeting. If you or another member of the PMC are - unable to get it in by twenty-four hours before meeting time, please + unable to get it in by forty-eight hours before meeting time, please let the board know, and plan to report next month. https://www.apache.org/foundation/board/reporting#how
(whimsy) branch master updated: Note on local SVN setup
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new ab3f7ee8 Note on local SVN setup ab3f7ee8 is described below commit ab3f7ee82ad07e0d77e9b5ed7a3a96f5e5c0c0c5 Author: Sebb AuthorDate: Sat Apr 6 17:37:13 2024 +0100 Note on local SVN setup --- DOCKER.md | 18 ++ 1 file changed, 18 insertions(+) diff --git a/DOCKER.md b/DOCKER.md index f2401613..d0455fc1 100644 --- a/DOCKER.md +++ b/DOCKER.md @@ -132,6 +132,24 @@ To correct this, do the following: Adjust as necessary if using local (private) SVN repos +There is no support for using a whimsysvn proxy. +If a developer needs such access, they should use a local SVN repository. + +Using a local SVN repository + +Create a directory called REPO (must agree with docker-config/whimsy.conf) under the whimsy parent directory +(i.e. alonside the gems/ directory) +Set up 3 local SVN repositories under the REPO directory using `svnadmin create` with the names: asf, private, infra +Under each of these, create the directories and files you need. + +Add the following entry to the .whimsy file: `:svn_base: http://localhost/repos/` +The repositories can then be found at the following locations in Docker: +- http://localhost/repos/asf/ +- http://localhost/repos/infra/ +- http://localhost/repos/private/ + +Note: these will be checked out under /srv/svn in Docker. + Testing email -
(whimsy) branch master updated: Avoid failure
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 60cf7144 Avoid failure 60cf7144 is described below commit 60cf7144d880b7eda4d14924dc04a4dcba12b9bb Author: Sebb AuthorDate: Wed Apr 3 17:03:52 2024 +0100 Avoid failure --- tools/download_check.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/download_check.rb b/tools/download_check.rb index d5360077..b62d3135 100755 --- a/tools/download_check.rb +++ b/tools/download_check.rb @@ -579,7 +579,8 @@ def _checkDownloadPage(path, tlp, version) else E "Bug: found hash #{h} for missing artifact #{stem}" end - t.sub!('➚', '').strip! # age + t.sub!('➚', '') # age + t.strip! next if t == '' # empire-db tmp = text2ext(t) next if ext == tmp # i.e. link is just the type or [TYPE]
(whimsy) branch master updated: Clarify that LDAP GHname is not synched with the linked id
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new a1365714 Clarify that LDAP GHname is not synched with the linked id a1365714 is described below commit a1365714871a352b6d8794d9edc35bdae270e4dd Author: Sebb AuthorDate: Mon Apr 1 23:30:31 2024 +0100 Clarify that LDAP GHname is not synched with the linked id --- www/roster/views/person/github.js.rb | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/www/roster/views/person/github.js.rb b/www/roster/views/person/github.js.rb index 7f99b80d..e992c419 100644 --- a/www/roster/views/person/github.js.rb +++ b/www/roster/views/person/github.js.rb @@ -8,7 +8,10 @@ class PersonGitHub < Vue _div.row data_edit: 'github' do _div.name do -_ 'GitHub username(s) (user-provided)' +_ 'GitHub username(s) ' +_b '(user-provided)' +_br +_b 'N.B. not synched with the linked id' _br _a 'Link GitHub username to ASF id', href: 'https://gitbox.apache.org/boxer/' end @@ -49,7 +52,7 @@ class PersonGitHub < Vue end end end -_ '(might not be linked to ASF id)' +_ '(user-provided, so might not be the one linked to the ASF id)' end end end
(whimsy) branch master updated: Send mail details of shutdown
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 5f51b47b Send mail details of shutdown 5f51b47b is described below commit 5f51b47b11e9513bd0f0d0a3de435f6fbbaa5b53 Author: Sebb AuthorDate: Mon Apr 1 17:10:31 2024 +0100 Send mail details of shutdown --- tools/pubsub-ci-email.rb | 35 +-- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/tools/pubsub-ci-email.rb b/tools/pubsub-ci-email.rb index 42692eed..77ca742f 100755 --- a/tools/pubsub-ci-email.rb +++ b/tools/pubsub-ci-email.rb @@ -16,6 +16,20 @@ def stamp(*s) "%s: %s" % [Time.now.gmtime.to_s, s.join(' ')] end +def mail_notify(subject, body=nil) + mail = Mail.new do +to 'notificati...@whimsical.apache.org' +from 'notificati...@whimsical.apache.org' +subject subject +body body + end + if Status.active? or Status.testnode? +mail.deliver! + else +puts stamp "Would have sent: #{mail}" + end +end + class PubSub require 'fileutils' @@ -28,6 +42,7 @@ class PubSub mtime = File.mtime(__FILE__) FileUtils.touch(ALIVE) # Temporary debug - ensure exists done = false +except = nil ps_thread = Thread.new do begin uri = URI.parse(url) @@ -80,9 +95,11 @@ class PubSub puts stamp "Done with start" if debug rescue Errno::ECONNREFUSED => e @restartable = true +except = e puts stamp e.inspect sleep 3 rescue StandardError => e +except = e puts stamp e.inspect puts stamp e.backtrace end @@ -90,7 +107,12 @@ class PubSub end # thread puts stamp "Pubsub thread started #{url} ..." ps_thread.join -puts stamp "Pubsub thread finished %s..." % (@updated ? '(code updated) ' : '') +subject = "Pubsub thread finished %s..." % (@updated ? '(code updated) ' : '') +puts stamp subject +mail_notify subject, <<~EOD +Restartable: #{@restartable} +Exception: #{except.inspect} +EOD if @restartable and ! ARGV.include? '--prompt' puts stamp 'restarting' @@ -273,7 +295,7 @@ if $0 == __FILE__ error = nil end - body = <<~EOD + mail_notify subject, <<~EOD This is a test email Previous revision #{previous_revision} Current revision #{latest} @@ -281,14 +303,7 @@ if $0 == __FILE__ Generated by #{__FILE__} EOD - mail = Mail.new do -to 'notificati...@whimsical.apache.org' -from 'notificati...@whimsical.apache.org' -subject subject -body body - end - mail.deliver! # Does it matter if this is sent from an inactive node? - + raise ArgumentError.new error if error options = {}
(whimsy) branch master updated: Minor tidyup
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 22a01e82 Minor tidyup 22a01e82 is described below commit 22a01e82861a6d75a0c97c789e6dfd7555d029ba Author: Sebb AuthorDate: Mon Apr 1 15:46:03 2024 +0100 Minor tidyup --- tools/pubsub-ci-email.rb | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/pubsub-ci-email.rb b/tools/pubsub-ci-email.rb index 69292343..42692eed 100755 --- a/tools/pubsub-ci-email.rb +++ b/tools/pubsub-ci-email.rb @@ -80,19 +80,19 @@ class PubSub puts stamp "Done with start" if debug rescue Errno::ECONNREFUSED => e @restartable = true -$stderr.puts stamp e.inspect +puts stamp e.inspect sleep 3 rescue StandardError => e -$stderr.puts stamp e.inspect -$stderr.puts stamp e.backtrace +puts stamp e.inspect +puts stamp e.backtrace end puts stamp "Done with thread" if debug end # thread puts stamp "Pubsub thread started #{url} ..." ps_thread.join -puts stamp "Pubsub thread finished %s..." % (@updated ? '(updated) ' : '') +puts stamp "Pubsub thread finished %s..." % (@updated ? '(code updated) ' : '') if @restartable and ! ARGV.include? '--prompt' - $stderr.puts stamp 'restarting' + puts stamp 'restarting' # relaunch script after a one second delay sleep 1
(whimsy) branch master updated: Fix up tests for updates proxy wrapper
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new aa59d230 Fix up tests for updates proxy wrapper aa59d230 is described below commit aa59d230683bde8d28c525d736515756505c0e44 Author: Sebb AuthorDate: Thu Mar 28 23:21:29 2024 + Fix up tests for updates proxy wrapper --- lib/spec/lib/svn_spec.rb | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/lib/spec/lib/svn_spec.rb b/lib/spec/lib/svn_spec.rb index 8fd9059e..82d37667 100644 --- a/lib/spec/lib/svn_spec.rb +++ b/lib/spec/lib/svn_spec.rb @@ -328,24 +328,37 @@ describe ASF::SVN do end end -it "_svn_build_cmd('help', 'path', {user: 'whimsysvn'}) should include username" do +it "_svn_build_cmd('help', 'path', {user: 'whimsysvn'}) should not include username" do cmd, stdin = ASF::SVN._svn_build_cmd('help', 'path', {user: 'whimsysvn'}) expect(stdin).to eq(nil) - cmd.shift # don't make assumptions about the exact SVN command - expect(cmd).to eq(["help", "--non-interactive", ["--username", "whimsysvn", "--no-auth-cache"], "--", "path"]) + expect(cmd).to eq(["whimsysvn", "help", "--non-interactive", "--", "path"]) end -it "_svn_build_cmd('help', 'path', {user: 'whimsysvn', dryrun: false}) should include username" do +it "_svn_build_cmd('help', 'path', {user: 'whimsysvn', dryrun: false}) should not include username" do cmd, stdin = ASF::SVN._svn_build_cmd('help', 'path', {user: 'whimsysvn', dryrun: false}) expect(stdin).to eq(nil) - cmd.shift # don't make assumptions about the exact SVN command - expect(cmd).to eq(["help", "--non-interactive", ["--username", "whimsysvn", "--no-auth-cache"], "--", "path"]) + expect(cmd).to eq(["whimsysvn", "help", "--non-interactive", "--", "path"]) end it "_svn_build_cmd('help', 'path', {user: 'whimsysvn', dryrun: true}) should not include username" do cmd, stdin = ASF::SVN._svn_build_cmd('help', 'path', {user: 'whimsysvn', dryrun: true}) + expect(cmd).to eq(["whimsysvn", "help", "--non-interactive", "--", "path"]) +end + +it "_svn_build_cmd('help', 'path', {user: '_dummy_', password: 'password'}) should include username" do + cmd, stdin = ASF::SVN._svn_build_cmd('help', 'path', {user: '_dummy_', password: 'password'}) + expect(stdin).to eq('password') + expect(cmd).to eq(["svn", "help", "--non-interactive", ["--username", "_dummy_", "--no-auth-cache"], ["--password-from-stdin"], "--", "path"]) +end + +it "_svn_build_cmd('help', 'path', {user: '_dummy_', password: 'password', dryrun: false}) should include username" do + cmd, stdin = ASF::SVN._svn_build_cmd('help', 'path', {user: '_dummy_', password: 'password', dryrun: false}) + expect(stdin).to eq('password') + expect(cmd).to eq(["svn", "help", "--non-interactive", ["--username", "_dummy_", "--no-auth-cache"], ["--password-from-stdin"], "--", "path"]) +end +it "_svn_build_cmd('help', 'path', {user: '_dummy_', dryrun: true}) should not include username" do + cmd, stdin = ASF::SVN._svn_build_cmd('help', 'path', {user: '_dummy_', dryrun: true}) expect(stdin).to eq(nil) - cmd.shift # don't make assumptions about the exact SVN command - expect(cmd).to eq(["help", "--non-interactive", "--", "path"]) + expect(cmd).to eq(["svn", "help", "--non-interactive", "--", "path"]) end it "_svn_build_cmd('help', 'path', {_error: true}) should raise error" do
(whimsy) branch master updated: Simplify
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new a16b5ead Simplify a16b5ead is described below commit a16b5eadfef689a377b702746eb05e871206820a Author: Sebb AuthorDate: Thu Mar 28 23:02:11 2024 + Simplify --- lib/whimsy/asf/svn.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb index dea083c8..cd030f58 100644 --- a/lib/whimsy/asf/svn.rb +++ b/lib/whimsy/asf/svn.rb @@ -354,11 +354,9 @@ module ASF cmd[0] = 'whimsysvn' # need wrapper for SVN proxy role end unless options[:dryrun] # don't add auth for dryrun -if password or user == 'whimsysvn' # whimsysvn user does not require password - cmd << ['--username', user, '--no-auth-cache'] -end # password was supplied, add credentials if password + cmd << ['--username', user, '--no-auth-cache'] if self.passwordStdinOK?() stdin = password cmd << ['--password-from-stdin']
(whimsy) branch master updated: Don't make assumptions about the SVN command
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 37b3d6ac Don't make assumptions about the SVN command 37b3d6ac is described below commit 37b3d6acdc2ede92f170a7858dba7a427e69f857 Author: Sebb AuthorDate: Thu Mar 28 17:03:27 2024 + Don't make assumptions about the SVN command --- lib/spec/lib/svn_spec.rb | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/spec/lib/svn_spec.rb b/lib/spec/lib/svn_spec.rb index b5a37853..8fd9059e 100644 --- a/lib/spec/lib/svn_spec.rb +++ b/lib/spec/lib/svn_spec.rb @@ -331,18 +331,21 @@ describe ASF::SVN do it "_svn_build_cmd('help', 'path', {user: 'whimsysvn'}) should include username" do cmd, stdin = ASF::SVN._svn_build_cmd('help', 'path', {user: 'whimsysvn'}) expect(stdin).to eq(nil) - expect(cmd).to eq(["svn", "help", "--non-interactive", ["--username", "whimsysvn", "--no-auth-cache"], "--", "path"]) + cmd.shift # don't make assumptions about the exact SVN command + expect(cmd).to eq(["help", "--non-interactive", ["--username", "whimsysvn", "--no-auth-cache"], "--", "path"]) end it "_svn_build_cmd('help', 'path', {user: 'whimsysvn', dryrun: false}) should include username" do cmd, stdin = ASF::SVN._svn_build_cmd('help', 'path', {user: 'whimsysvn', dryrun: false}) expect(stdin).to eq(nil) - expect(cmd).to eq(["svn", "help", "--non-interactive", ["--username", "whimsysvn", "--no-auth-cache"], "--", "path"]) + cmd.shift # don't make assumptions about the exact SVN command + expect(cmd).to eq(["help", "--non-interactive", ["--username", "whimsysvn", "--no-auth-cache"], "--", "path"]) end it "_svn_build_cmd('help', 'path', {user: 'whimsysvn', dryrun: true}) should not include username" do cmd, stdin = ASF::SVN._svn_build_cmd('help', 'path', {user: 'whimsysvn', dryrun: true}) expect(stdin).to eq(nil) - expect(cmd).to eq(["svn", "help", "--non-interactive", "--", "path"]) + cmd.shift # don't make assumptions about the exact SVN command + expect(cmd).to eq(["help", "--non-interactive", "--", "path"]) end it "_svn_build_cmd('help', 'path', {_error: true}) should raise error" do
(whimsy) branch master updated: Proxy role needs a wrapper
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 3db0815f Proxy role needs a wrapper 3db0815f is described below commit 3db0815fd0480159d77ae2f865ee49dfd4699689 Author: Sebb AuthorDate: Thu Mar 28 16:38:03 2024 + Proxy role needs a wrapper --- lib/whimsy/asf/svn.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb index de211b31..dea083c8 100644 --- a/lib/whimsy/asf/svn.rb +++ b/lib/whimsy/asf/svn.rb @@ -350,6 +350,9 @@ module ASF password = options[:password] user = options[:user] end + if user == 'whimsysvn' +cmd[0] = 'whimsysvn' # need wrapper for SVN proxy role + end unless options[:dryrun] # don't add auth for dryrun if password or user == 'whimsysvn' # whimsysvn user does not require password cmd << ['--username', user, '--no-auth-cache']
(whimsy) branch master updated: Log subject if not active
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new d09f44eb Log subject if not active d09f44eb is described below commit d09f44eb8b398bbc3f47d9d743933be57b5b9285 Author: Sebb AuthorDate: Thu Mar 28 14:57:40 2024 + Log subject if not active --- tools/pubsub-ci-email.rb | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/pubsub-ci-email.rb b/tools/pubsub-ci-email.rb index 9d810758..69292343 100755 --- a/tools/pubsub-ci-email.rb +++ b/tools/pubsub-ci-email.rb @@ -199,7 +199,11 @@ def do_diff(initialhash, currenthash, triggerrev) subject subject body body end -mail.deliver! if Status.active? or Status.testnode? +if Status.active? or Status.testnode? + mail.deliver! +else + puts stamp "Would have sent: #{subject}" +end end end @@ -247,7 +251,7 @@ if $0 == __FILE__ exit end - puts stamp "Starting #{File.basename(__FILE__)}" + puts stamp "Starting #{File.basename(__FILE__)} Active?: #{Status.active?}" # show initial start previous_revision = File.read(PREVIOUS_REVISION).chomp.sub('r','').to_i
(whimsy) branch master updated: Speed up
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 15837a6e Speed up 15837a6e is described below commit 15837a6e026ba5ef22ff56ef57d01d23be55db90 Author: Sebb AuthorDate: Wed Mar 27 00:31:57 2024 + Speed up --- tools/download_check.rb | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/tools/download_check.rb b/tools/download_check.rb index a36a8b2c..d5360077 100755 --- a/tools/download_check.rb +++ b/tools/download_check.rb @@ -395,21 +395,23 @@ def _checkDownloadPage(path, tlp, version) # Some pages are mainly a single line (e.g. Hop) # This make matching the appropriate match context tricky without traversing the DOM - body.scan(%r{(^.*?([^<>]+?(nightly|snapshot)[^<>]+?)).*$}i) do |m| -m.each do |n| - if n.size < 160 -if n =~ %r{API |/api/|-docs-} # snapshot docs Datasketches (Flink)? - W "Found reference to NIGHTLY or SNAPSHOT docs?: #{n}" -else - # ignore trafficcontrol bugfix message - unless n.include? "Fixed TO log warnings when generating snapshots" or - n.include? "Kafka Raft support for snapshots" or - n.include? "zkSnapshotC" or # ZooKeepeer - n.include? "/issues.apache.org/jira/browse/" # Daffodil -W "Found reference to NIGHTLY or SNAPSHOT builds: #{n}" + if body =~ %r{nightly|snapshot}i # scan can be expensive, so skip if unneeded +body.scan(%r{(^.*?([^<>]+?(nightly|snapshot)[^<>]+?)).*$}i) do |m| + m.each do |n| +if n.size < 160 + if n =~ %r{API |/api/|-docs-} # snapshot docs Datasketches (Flink)? +W "Found reference to NIGHTLY or SNAPSHOT docs?: #{n}" + else +# ignore trafficcontrol bugfix message +unless n.include? "Fixed TO log warnings when generating snapshots" or + n.include? "Kafka Raft support for snapshots" or + n.include? "zkSnapshotC" or # ZooKeepeer + n.include? "/issues.apache.org/jira/browse/" # Daffodil + W "Found reference to NIGHTLY or SNAPSHOT builds: #{n}" +end end + break end -break end end end
(whimsy) branch master updated: Allow for some pointers
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new a17b5b15 Allow for some pointers a17b5b15 is described below commit a17b5b15321199db72d254c9aec4fe4d7001eca7 Author: Sebb AuthorDate: Wed Mar 27 00:13:25 2024 + Allow for some pointers --- tools/download_check.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/download_check.rb b/tools/download_check.rb index b839c32c..a36a8b2c 100755 --- a/tools/download_check.rb +++ b/tools/download_check.rb @@ -577,12 +577,12 @@ def _checkDownloadPage(path, tlp, version) else E "Bug: found hash #{h} for missing artifact #{stem}" end - t.strip! + t.sub!('➚', '').strip! # age next if t == '' # empire-db tmp = text2ext(t) next if ext == tmp # i.e. link is just the type or [TYPE] next if ext == 'sha' and tmp == 'sha1' # historic - next if %w(sha256 md5 mds sha512 sha1).include?(ext) and %w(SHA digest Digest checksums).include?(t) # generic + next if %w(sha256 md5 mds sha512 sha1).include?(ext) and %w(SHA digest Digest CheckSum checksums).include?(t) # generic next if ext == 'mds' and (tmp == 'hashes' or t == 'Digests') if base != t if t == 'Download' # MXNet
(whimsy) branch master updated: Follow redirects
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new a25c9477 Follow redirects a25c9477 is described below commit a25c947700d14b881d31ba01c0452c1ac0024c15 Author: Sebb AuthorDate: Tue Mar 26 17:02:19 2024 + Follow redirects --- www/members/download_check.cgi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/members/download_check.cgi b/www/members/download_check.cgi index 36b88fa8..04e90bfa 100755 --- a/www/members/download_check.cgi +++ b/www/members/download_check.cgi @@ -12,9 +12,9 @@ _html do title: PAGETITLE, related: { 'https://www.apache.org/legal/release-policy.html#release-announcements' => 'Release announcements', -'https://www.apache.org/dev/release-distribution#download-links' => 'Download links and cryptographic files', -'https://www.apache.org/dev/release-download-pages.html#download-page' => 'KEYS file and download verification', -'https://www.apache.org/dev/release-distribution#sigs-and-sums' => 'MD5 and SHA1 are deprecated', +'https://infra.apache.org/release-distribution.html#download-links' => 'Download links and cryptographic files', +'https://infra.apache.org/release-download-pages.html#download-page' => 'KEYS file and download verification', +'https://infra.apache.org/release-distribution.html#sigs-and-sums' => 'MD5 and SHA1 are deprecated', }, helpblock: -> { _p do
(whimsy) branch master updated: helpers: improve class Integer function ordinalize (#217)
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 1404fb7b helpers: improve class Integer function ordinalize (#217) 1404fb7b is described below commit 1404fb7b4715bcf053636e95e2ab0d68da3d449b Author: John Bampton AuthorDate: Sun Mar 24 09:39:22 2024 +1000 helpers: improve class Integer function ordinalize (#217) --- www/board/agenda/helpers/integer.rb | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/www/board/agenda/helpers/integer.rb b/www/board/agenda/helpers/integer.rb index 8ce9e46f..fa582487 100644 --- a/www/board/agenda/helpers/integer.rb +++ b/www/board/agenda/helpers/integer.rb @@ -2,12 +2,15 @@ unless Integer.public_method_defined? :ordinalize class Integer def ordinalize - if self % 10 == 1 -self.to_s + "st" - elsif self % 10 == 2 -self.to_s + "nd" + case self % 100 + when 11, 12, 13 then self.to_s + 'th' else -self.to_s + "th" +case self % 10 +when 1 then self.to_s + 'st' +when 2 then self.to_s + 'nd' +when 3 then self.to_s + 'rd' +else self.to_s + 'th' +end end end end
(whimsy) branch master updated: Fix broken links in `config/board-agenda.md` (#218)
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new d1f317ca Fix broken links in `config/board-agenda.md` (#218) d1f317ca is described below commit d1f317ca077190d127face44615761326315077b Author: John Bampton AuthorDate: Sun Mar 24 09:23:32 2024 +1000 Fix broken links in `config/board-agenda.md` (#218) --- config/board-agenda.md | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/board-agenda.md b/config/board-agenda.md index 9e0bde89..7141dace 100644 --- a/config/board-agenda.md +++ b/config/board-agenda.md @@ -71,17 +71,17 @@ Debugging - The server is a straightforward Sinatra/Rack application. Most of the logic -can be found in [routes.rb](../routes.rb), [models/](../models/), and -[views/actions/](../views/actions/). Parsing the agenda itself is done in +can be found in [routes.rb](../www/board/agenda/routes.rb), [models/](../www/board/agenda/models), and +[views/actions/](../www/board/agenda/views/actions). Parsing the agenda itself is done in [agenda.rb](../lib/whimsy/asf/agenda.rb) and -[agenda/](../lib/whimsy/asf/agenda/). +[agenda/](../lib/whimsy/asf/agenda). The server provides the client with data in JSON format. Most importantly, a parsed agenda can be seen by going to the agenda page for a given month and replacing the trailing `/` with `.json`. The client itself is JavaScript and is produced by converting the files in the -[view](../view) directory *except* for the `actions` subdirectory from Ruby to +[view](../www/board/agenda/views) directory *except* for the `actions` subdirectory from Ruby to JavaScript using [ruby2js](https://github.com/rubys/ruby2js). The generated JavaScript makes heavy use of [Vue.js](https://vuejs.org/).
(whimsy) branch master updated: Fix spelling in Ruby files (#215)
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new f264c54a Fix spelling in Ruby files (#215) f264c54a is described below commit f264c54a7ca156d7010502bd309ba19b1e65f779 Author: John Bampton AuthorDate: Sat Mar 23 22:43:15 2024 +1000 Fix spelling in Ruby files (#215) --- lib/whimsy/asf/svn.rb| 2 +- tools/pubsub-ci-email.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb index 9f3396a5..de211b31 100644 --- a/lib/whimsy/asf/svn.rb +++ b/lib/whimsy/asf/svn.rb @@ -480,7 +480,7 @@ module ASF out end -# get list of commmits from initial to current, and parses the output +# get list of commits from initial to current, and parses the output # Returns: [out, err], where: # out = array of entries, each of which is a hash # err = error message (in which case out is nil) diff --git a/tools/pubsub-ci-email.rb b/tools/pubsub-ci-email.rb index 61ce7889..9d810758 100755 --- a/tools/pubsub-ci-email.rb +++ b/tools/pubsub-ci-email.rb @@ -194,7 +194,7 @@ def do_diff(initialhash, currenthash, triggerrev) mail = Mail.new do from "#{currentcommittername} <#{currentcommitter}@apache.org>" sender "notificati...@whimsical.apache.org" - # to to # Intial testing, only use Bcc + # to to # Initial testing, only use Bcc bcc 'notificati...@whimsical.apache.org' # keep track of mails subject subject body body @@ -210,7 +210,7 @@ def handle_change(revision) begin previous_revision = File.read(PREVIOUS_REVISION).chomp puts stamp "Detected last known revision '#{previous_revision}'" -# get list of commmits from initial to current. +# get list of commits from initial to current. # @return array of entries, each of which is an array of [commitid, committer, datestamp] out,_ = ASF::SVN.svn_commits!(SOURCE_URL, previous_revision, revision) commits = out.size - 1
(whimsy) branch master updated: Link to podling.yml; redo conditionals
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 85f34c6c Link to podling.yml; redo conditionals 85f34c6c is described below commit 85f34c6cc2732dbafae7e749f1cd695a5b634c0d Author: Sebb AuthorDate: Fri Mar 22 00:10:13 2024 + Link to podling.yml; redo conditionals --- www/roster/views/ppmc/main.js.rb | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/www/roster/views/ppmc/main.js.rb b/www/roster/views/ppmc/main.js.rb index eab87dbd..2dc0df68 100644 --- a/www/roster/views/ppmc/main.js.rb +++ b/www/roster/views/ppmc/main.js.rb @@ -194,7 +194,7 @@ class PPMC < Vue _a 'podlings.xml', href: 'https://svn.apache.org/repos/asf/incubator/public/trunk/content/podlings.xml' end _li do - _a 'Individual status files', href: 'https://svn.apache.org/repos/asf/incubator/public/trunk/content/podlings/' + _a 'Podling status file', href: "https://svn.apache.org/repos/asf/incubator/public/trunk/content/podlings/#{@ppmc.id}.yml; end end _br @@ -239,13 +239,24 @@ class PPMC < Vue _ul do if @ppmc.podlingStatus.ipClearance _li 'IP Clearance: '+ @ppmc.podlingStatus.ipClearance + else +_li.podlingWarning 'No IP Clearance Filed (or invalid ipClearance entry)' + end + if @ppmc.podlingStatus.sga +_li 'Software Grant Received on: '+@ppmc.podlingStatus.sga + else +_li.podlingWarning 'No Software Grant Filed (or invalid sga entry)' + end + if @ppmc.podlingStatus.asfCopyright +_li 'Confirmation of ASF Copyright Headers on Source Code on: '+@ppmc.podlingStatus.asfCopyright + else +_li.podlingWarning 'No Release Yet/Missing ASF Copyright Headers on Source Code' + end + if @ppmc.podlingStatus.distributionRights +_li 'Confirmation of Binary Distribution Licensing: '+@ppmc.podlingStatus.distributionRights + else +_li.podlingWarning 'No Release Yet/Binary has licensing issues' end - _li 'Software Grant Received on: '+@ppmc.podlingStatus.sga if @ppmc.podlingStatus.sga - _li.podlingWarning 'No Software Grant and No IP Clearance Filed' unless @ppmc.podlingStatus.sga || @ppmc.podlingStatus.ipClearance - _li 'Confirmation of ASF Copyright Headers on Source Code on: '+@ppmc.podlingStatus.asfCopyright if @ppmc.podlingStatus.asfCopyright - _li.podlingWarning 'No Release Yet/Missing ASF Copyright Headers on Source Code' unless @ppmc.podlingStatus.asfCopyright - _li 'Confirmation of Binary Distribution Licensing: '+@ppmc.podlingStatus.distributionRights if @ppmc.podlingStatus.distributionRights - _li.podlingWarning 'No Release Yet/Binary has licensing issues' unless @ppmc.podlingStatus.distributionRights end # reporting schedule
(whimsy) branch master updated: Check that fields are class Date before using strftime
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new c2bfc4e4 Check that fields are class Date before using strftime c2bfc4e4 is described below commit c2bfc4e49502be0fa600737e5ae63654c382a2b3 Author: Sebb AuthorDate: Thu Mar 21 23:38:56 2024 + Check that fields are class Date before using strftime --- lib/whimsy/asf/podling.rb | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/whimsy/asf/podling.rb b/lib/whimsy/asf/podling.rb index 5ed4fba6..d2fa0cf3 100644 --- a/lib/whimsy/asf/podling.rb +++ b/lib/whimsy/asf/podling.rb @@ -334,10 +334,10 @@ module ASF if File.exist?(resource_yml) rawYaml = Psych.load_file(resource_yml, permitted_classes: [Date, Symbol]) hash = { } -hash[:sga] = rawYaml[:sga].strftime('%Y-%m-%d') if rawYaml[:sga] -hash[:asfCopyright] = rawYaml[:asfCopyright].strftime('%Y-%m-%d') if rawYaml[:asfCopyright] -hash[:distributionRights] = rawYaml[:distributionRights].strftime('%Y-%m-%d') if rawYaml[:distributionRights] -hash[:ipClearance] = rawYaml[:ipClearance].strftime('%Y-%m-%d') if rawYaml[:ipClearance] +hash[:sga] = rawYaml[:sga].strftime('%Y-%m-%d') if rawYaml[:sga]&.class == Date +hash[:asfCopyright] = rawYaml[:asfCopyright].strftime('%Y-%m-%d') if rawYaml[:asfCopyright]&.class == Date +hash[:distributionRights] = rawYaml[:distributionRights].strftime('%Y-%m-%d') if rawYaml[:distributionRights]&.class == Date +hash[:ipClearance] = rawYaml[:ipClearance].strftime('%Y-%m-%d') if rawYaml[:ipClearance]&.class == Date hash[:sourceControl] = rawYaml[:sourceControl] hash[:wiki] = rawYaml[:wiki] hash[:jira] = rawYaml[:jira] @@ -346,7 +346,7 @@ module ASF hash[:news] = [] rawYaml[:news]&.each do |ni| newsItem = {} - newsItem[:date] = ni[:date].strftime('%Y-%m-%d') + newsItem[:date] = ni[:date].strftime('%Y-%m-%d') if ni[:date]&.class == Date newsItem[:note] = ni[:note] hash[:news].push(newsItem) end
(whimsy) branch master updated: Tweak
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new e9fcec99 Tweak e9fcec99 is described below commit e9fcec995be8e2866a95ecc303927e856dc020f9 Author: Sebb AuthorDate: Thu Mar 21 18:00:05 2024 + Tweak --- tools/site-scan.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/site-scan.rb b/tools/site-scan.rb index 6475367c..4e267580 100755 --- a/tools/site-scan.rb +++ b/tools/site-scan.rb @@ -52,12 +52,12 @@ def save_events(data, value) end end -# Extract link text, skipping invisible stuff (assumed to be a class ending with '-sr-only') +# Extract link text, skipping invisible stuff (assumed to be a class ending with 'sr-only') def get_link_text(anode) bits = [] anode.traverse do |node| if node.name == 'text' - bits << node.text unless node.parent.name == 'span' and node.parent.attribute('class')&.value&.end_with? '-sr-only' + bits << node.text unless node.parent.name == 'span' and node.parent.attribute('class')&.value&.end_with? 'sr-only' end end bits.join(' ')
(whimsy) branch master updated: More general link text extraction
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new e891f8ac More general link text extraction e891f8ac is described below commit e891f8acdcbbca1752225b3f61af1da6643f25f4 Author: Sebb AuthorDate: Thu Mar 21 17:44:35 2024 + More general link text extraction --- tools/site-scan.rb | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tools/site-scan.rb b/tools/site-scan.rb index b22d830e..6475367c 100755 --- a/tools/site-scan.rb +++ b/tools/site-scan.rb @@ -52,6 +52,17 @@ def save_events(data, value) end end +# Extract link text, skipping invisible stuff (assumed to be a class ending with '-sr-only') +def get_link_text(anode) + bits = [] + anode.traverse do |node| +if node.name == 'text' + bits << node.text unless node.parent.name == 'span' and node.parent.attribute('class')&.value&.end_with? '-sr-only' +end +end + bits.join(' ') +end + # Parse an Apache project website and return text|urls that match our checks # @return Hash of symbols: text|url found from a check made # @see SiteStandards for definitions of what we should scan for (in general) @@ -106,8 +117,7 @@ def parse(id, site, name) # Normalize the text and href for our capture purposes a_href = a['href'].to_s.strip -# HACK to fix TsFile; should have better way to filter out such text -a_text = a.text.downcase.sub('open in new window', '').strip +a_text = get_link_text(a) # Not down-cased yet $stderr.puts "#{a_text.inspect} #{a_href}" if $verbose # Check the href urls for some patterns @@ -117,7 +127,7 @@ def parse(id, site, name) # use the title (hover text) in preference to the source data[:foundation] = img['title'] ? squash(img['title']) : uri + img['src'].strip else -data[:foundation] = squash(a.text) +data[:foundation] = squash(a_text) end end @@ -127,6 +137,7 @@ def parse(id, site, name) end # Check the a_text strings for other patterns +a_text = a_text.downcase.strip # needs to be downcased here # Note this is an unusual case if (a_text =~ SiteStandards::COMMON_CHECKS['license'][SiteStandards::CHECK_TEXT]) and (a_href =~ SiteStandards::COMMON_CHECKS['license'][SiteStandards::CHECK_CAPTURE])
(whimsy) branch master updated: Option to save the parsed page
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 24cbf135 Option to save the parsed page 24cbf135 is described below commit 24cbf1358eeb70d795fe0e9ebc46da7d0a4a28ee Author: Sebb AuthorDate: Thu Mar 21 11:40:41 2024 + Option to save the parsed page --- tools/site-scan.rb | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/site-scan.rb b/tools/site-scan.rb index 7e928bf7..b22d830e 100755 --- a/tools/site-scan.rb +++ b/tools/site-scan.rb @@ -84,6 +84,11 @@ def parse(id, site, name) return data end doc = Nokogiri::HTML(response) + if $saveparse +file = File.join('/tmp',"site-scan_#{$$}.txt") +File.write(file, doc.to_s) +$stderr.puts "Wrote parsed input to #{file}" + end data[:uri] = uri.to_s # FIRST: scan each link's a_href to see if we need to capture it @@ -272,6 +277,7 @@ results = {} podlings = {} $cache = Cache.new(dir: 'site-scan') $verbose = ARGV.delete '--verbose' +$saveparse = ARGV.delete '--saveparse' $skipresourcecheck = ARGV.delete '--noresource' puts "Started: #{Time.now}" # must agree with site-scan monitor
(whimsy) branch master updated: Fix TsFile
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new ee516372 Fix TsFile ee516372 is described below commit ee516372183fef23426428b96261b0574defd754 Author: Sebb AuthorDate: Thu Mar 21 11:03:45 2024 + Fix TsFile --- tools/site-scan.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/site-scan.rb b/tools/site-scan.rb index e3007c1b..7e928bf7 100755 --- a/tools/site-scan.rb +++ b/tools/site-scan.rb @@ -101,8 +101,9 @@ def parse(id, site, name) # Normalize the text and href for our capture purposes a_href = a['href'].to_s.strip -a_text = a.text.downcase.strip -$stderr.puts "#{a_text} #{a_href}" if $verbose +# HACK to fix TsFile; should have better way to filter out such text +a_text = a.text.downcase.sub('open in new window', '').strip +$stderr.puts "#{a_text.inspect} #{a_href}" if $verbose # Check the href urls for some patterns if a_href =~ SiteStandards::COMMON_CHECKS['foundation'][SiteStandards::CHECK_CAPTURE]
(whimsy) branch master updated: Add special code for M lists
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 490eabc2 Add special code for M lists 490eabc2 is described below commit 490eabc25ec5fecba43e8696271ca7aa6d4e4a98 Author: Sebb AuthorDate: Thu Mar 21 00:24:21 2024 + Add special code for M lists --- www/roster/models/nonpmc.rb | 9 + 1 file changed, 9 insertions(+) diff --git a/www/roster/models/nonpmc.rb b/www/roster/models/nonpmc.rb index 1dec3440..937b6bb7 100644 --- a/www/roster/models/nonpmc.rb +++ b/www/roster/models/nonpmc.rb @@ -31,6 +31,15 @@ class NonPMC require 'whimsy/asf/mlist' moderators, modtime = ASF::MLIST.list_moderators(mail_list) subscribers, subtime = ASF::MLIST.list_subs(mail_list) # counts only, no archivers + if mail_list == 'press' # SPECIAL +%w{markpub announce}.each do |alt_list| + mods, _ = ASF::MLIST.list_moderators(alt_list) + moderators.merge! mods + subs, _ = ASF::MLIST.list_subs(alt_list) + subscribers.merge! subs +end + end + # TODO: do any non-PMCs have private lists? analysePrivateSubs = currentUser.asf_member? unless analysePrivateSubs # check for private moderator if not already allowed access user_mail = currentUser.all_mail || []
(whimsy) branch master updated: Unused parameter
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new d1b60950 Unused parameter d1b60950 is described below commit d1b6095092ec22fa2efcaa00cac4bb34bde35433 Author: Sebb AuthorDate: Wed Mar 20 23:55:24 2024 + Unused parameter --- lib/whimsy/asf/mlist.rb| 3 +-- www/roster/models/committee.rb | 2 +- www/roster/models/ppmc.rb | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/whimsy/asf/mlist.rb b/lib/whimsy/asf/mlist.rb index 0a567617..064eac3a 100644 --- a/lib/whimsy/asf/mlist.rb +++ b/lib/whimsy/asf/mlist.rb @@ -155,10 +155,9 @@ module ASF # for a mail domain, extract related lists and their moderators # also returns the time when the data was last checked -# If podling==true, then also check for old-style podling names # returns: [{dev@a.o=>[email1, email2]}, mod-time] # if mail_domain is nil, matches all lists except infra test lists -def self.list_moderators(mail_domain, _podling=false) +def self.list_moderators(mail_domain) moderators = {} list_parse('mod') do |dom, list, subs| diff --git a/www/roster/models/committee.rb b/www/roster/models/committee.rb index 69663028..7866779f 100644 --- a/www/roster/models/committee.rb +++ b/www/roster/models/committee.rb @@ -21,7 +21,7 @@ class Committee # always needed: if not a member, for checking moderator status # and if a member, needed for showing list moderators # will be dropped later if insufficient karma -moderators, modtime = ASF::MLIST.list_moderators(pmc.mail_list, true) +moderators, modtime = ASF::MLIST.list_moderators(pmc.mail_list) subscribers = nil # we get the counts only here subtime = nil pSubs = [] # private@ subscribers diff --git a/www/roster/models/ppmc.rb b/www/roster/models/ppmc.rb index 4fb8b0e5..0bf6840f 100644 --- a/www/roster/models/ppmc.rb +++ b/www/roster/models/ppmc.rb @@ -18,7 +18,7 @@ class PPMC # always needed: if not a member, for checking moderator status # and if a member, needed for showing list moderators # will be dropped later if insufficient karma -moderators, modtime = ASF::MLIST.list_moderators(ppmc.mail_list, true) +moderators, modtime = ASF::MLIST.list_moderators(ppmc.mail_list) subscribers = nil # we get the counts only here subtime = nil pSubs = [] # private@ subscribers
(whimsy) branch master updated: Check for other no login shells
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new be2b7bca Check for other no login shells be2b7bca is described below commit be2b7bca9058c35132fb359e1af59aefcfaec1d1 Author: Sebb AuthorDate: Wed Mar 20 11:43:10 2024 + Check for other no login shells --- www/secretary/ldap-check-banned.cgi | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/www/secretary/ldap-check-banned.cgi b/www/secretary/ldap-check-banned.cgi index 4e7a6459..bae41d6b 100755 --- a/www/secretary/ldap-check-banned.cgi +++ b/www/secretary/ldap-check-banned.cgi @@ -17,9 +17,12 @@ require 'whimsy/asf' require 'whimsy/asf/mlist' require 'wunderbar' +EXPECTED_SHELL='/usr/bin/false' +NOSHELL = %w{/usr/bin/false /bin/false /home/striker/bin/no-cla /usr/sbin/nologin /bin/nologin /sbin/nologin} + CHECKS = { 'asf-banned' => 'yes', - 'loginShell' => '/usr/bin/false', + 'loginShell' => EXPECTED_SHELL, 'host' => nil, 'sshPublicKey' => nil, } @@ -34,7 +37,8 @@ ATTRS=%w{uid cn asf-banned loginShell host sshPublicKey modifiersName modifyTime if ENV['QUERY_STRING'].include? 'checkShell' CHECKSHELL = true - FILTER = '(|(asf-banned=*)(loginShell=/usr/bin/false))' + logins=NOSHELL.map{|k| "(loginshell=#{k})"}.join('') + FILTER = "(|(asf-banned=*)#{logins})" else FILTER = '(asf-banned=*)' CHECKSHELL = false @@ -53,17 +57,17 @@ _html do _p %{ This script compares the LDAP settings for asf-banned, loginShell and host. -If asf-banned is set, it is expected to equal 'yes', and loginShell should be '/usr/bin/false'. +If asf-banned is set, it is expected to equal 'yes', and loginShell should be #{EXPECTED_SHELL}. Also host and sshPublicKey should be empty. } if CHECKSHELL _p %{ - Likewise, if loginShell is '/usr/bin/false', asf-banned should probably be 'yes', and the other two fields empty. + Likewise, if loginShell is one of #{NOSHELL.join(' ')}, asf-banned should probably be 'yes', and the other two fields empty. } else _p do _a 'Append "?checkShell"', href: "#{ENV['SCRIPT_NAME']}?checkShell" - _ ' to the URL to check against loginShell=/usr/bin/false' + _ " to the URL to check against loginShell in one of #{NOSHELL.join(' ')}" end end
(whimsy) branch master updated: Link to LDAP account
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new c150c482 Link to LDAP account c150c482 is described below commit c150c482487904742eef4addce64d4b869c49818 Author: Sebb AuthorDate: Tue Mar 19 14:55:07 2024 + Link to LDAP account --- www/secretary/ldap-check-banned.cgi | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/secretary/ldap-check-banned.cgi b/www/secretary/ldap-check-banned.cgi index af1e4a2c..4e7a6459 100755 --- a/www/secretary/ldap-check-banned.cgi +++ b/www/secretary/ldap-check-banned.cgi @@ -93,7 +93,10 @@ _html do end if errs.size > 0 # Found an error _tr do - _td singleton attrs['uid'] + uid = singleton attrs['uid'] + _td do +_a uid, href: "https://whimsy.apache.org/roster/committer/#{uid}; + end _td singleton attrs['cn'] _td singleton(attrs['asf-banned']), class: errs['asf-banned'] _td singleton(attrs['loginShell']), class: errs['loginShell']
(whimsy) branch master updated: Add ASF banned LDAP checks
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 327e2038 Add ASF banned LDAP checks 327e2038 is described below commit 327e2038714144189ba60b4ad994043b4c0efaa3 Author: Sebb AuthorDate: Tue Mar 19 14:49:57 2024 + Add ASF banned LDAP checks --- www/infra/ldap-check-banned.cgi | 2 + www/secretary/ldap-check-banned.cgi | 110 2 files changed, 112 insertions(+) diff --git a/www/infra/ldap-check-banned.cgi b/www/infra/ldap-check-banned.cgi new file mode 100755 index ..180caf91 --- /dev/null +++ b/www/infra/ldap-check-banned.cgi @@ -0,0 +1,2 @@ +#!/usr/bin/env ruby +load __FILE__.sub('/infra/', '/secretary/') diff --git a/www/secretary/ldap-check-banned.cgi b/www/secretary/ldap-check-banned.cgi new file mode 100755 index ..af1e4a2c --- /dev/null +++ b/www/secretary/ldap-check-banned.cgi @@ -0,0 +1,110 @@ +#!/usr/bin/env ruby + +=begin + +Check state of asf-banned accounts. + +An account that is asf-banned due to deceased/opted out should have: +- asf-banned = yes +- loginShell = /usr/bin/false +- neither of the following attributes exist: host sshPublicKey + +=end + +$LOAD_PATH.unshift '/srv/whimsy/lib' + +require 'whimsy/asf' +require 'whimsy/asf/mlist' +require 'wunderbar' + +CHECKS = { + 'asf-banned' => 'yes', + 'loginShell' => '/usr/bin/false', + 'host' => nil, + 'sshPublicKey' => nil, +} + +def singleton(attr) + return attr.first if attr&.size == 1 + attr +end + +# banned or false? +ATTRS=%w{uid cn asf-banned loginShell host sshPublicKey modifiersName modifyTimestamp createTimestamp} + +if ENV['QUERY_STRING'].include? 'checkShell' + CHECKSHELL = true + FILTER = '(|(asf-banned=*)(loginShell=/usr/bin/false))' +else + FILTER = '(asf-banned=*)' + CHECKSHELL = false +end + +_html do + _style %{ +.error {background-color: yellow} +table, th, td {border: 1px solid black} +td {padding: 3px 6px} +tr:hover td {background-color: azure} +th {background-color: #a0ddf0} + } + + _h1 'LDAP banned checks' + + _p %{ +This script compares the LDAP settings for asf-banned, loginShell and host. +If asf-banned is set, it is expected to equal 'yes', and loginShell should be '/usr/bin/false'. +Also host and sshPublicKey should be empty. + } + if CHECKSHELL +_p %{ + Likewise, if loginShell is '/usr/bin/false', asf-banned should probably be 'yes', and the other two fields empty. +} + else +_p do + _a 'Append "?checkShell"', href: "#{ENV['SCRIPT_NAME']}?checkShell" + _ ' to the URL to check against loginShell=/usr/bin/false' +end + end + + _table do +_tr do + _th 'UID' + _th 'Name' + _th 'asf-banned?' + _th 'loginShell' + _th 'Host' + _th 'sshPublicKey count' + _th 'Created' + _th 'LastModified' + _th 'ModifiedBy' +end + +banned = ASF::Person.ldap_search(FILTER,ATTRS) +banned.sort_by {|h| h['uid']}.each do |attrs| + errs = {} + CHECKS.each do |k,v| +attr = attrs[k] +if v.nil? # special handling + errs[k] = 'error' unless attr.nil? +else + errs[k] = 'error' unless singleton(attr) == v +end + end + if errs.size > 0 # Found an error +_tr do + _td singleton attrs['uid'] + _td singleton attrs['cn'] + _td singleton(attrs['asf-banned']), class: errs['asf-banned'] + _td singleton(attrs['loginShell']), class: errs['loginShell'] + _td attrs['host']&.join(','), class: errs['host'] + _td attrs['sshPublicKey']&.size, class: errs['sshPublicKey'] + _td singleton attrs['createTimestamp'] + _td singleton attrs['modifyTimestamp'] + _td singleton attrs['modifiersName'] +end + end +end + end + +end
(whimsy) branch master updated: Low-level LDAP search function
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 9c99144a Low-level LDAP search function 9c99144a is described below commit 9c99144ad764528114e57dd3b5860b3f6cace933 Author: Sebb AuthorDate: Tue Mar 19 14:48:10 2024 + Low-level LDAP search function --- lib/whimsy/asf/ldap.rb | 8 1 file changed, 8 insertions(+) diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb index 348c5dbb..c6cbf90a 100644 --- a/lib/whimsy/asf/ldap.rb +++ b/lib/whimsy/asf/ldap.rb @@ -530,6 +530,14 @@ module ASF ASF.search_one(base, "cn=#{name}", 'cn').any? end +# Low-level search for retrieving LDAP entries. Assumes scope ONE +# Returns list of hashes, where the keys are the attributes +# Optionally provide a list of attributes to return, e.g. ['uid','mail'] +# Always includes 'dn' in the hashes +def self.ldap_search(filter, attributes=['dn']) + raise ArgumentError.new "Cannot be used for #{self.name} instances" unless base + ASF.search_one(base, filter, [attributes].flatten) +end end # a hash of attributes which is not populated until the first attempt
(whimsy) branch master updated: Optional attributes do not work; not actually used
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 7e4fa31c Optional attributes do not work; not actually used 7e4fa31c is described below commit 7e4fa31c87e9a71c33de399b021905f430b04d52 Author: Sebb AuthorDate: Tue Mar 19 12:51:04 2024 + Optional attributes do not work; not actually used See ASF::Person.preload --- lib/whimsy/asf/ldap.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb index 259cf266..348c5dbb 100644 --- a/lib/whimsy/asf/ldap.rb +++ b/lib/whimsy/asf/ldap.rb @@ -680,8 +680,8 @@ module ASF # Obtain a list of people known to LDAP. LDAP filters may be used # to retrieve only a subset. -def self.list(filter='uid=*', attributes='uid') - ASF.search_one(base, filter, attributes).flatten.map {|uid| find(uid)} +def self.list(filter='uid=*') + ASF.search_one(base, filter, 'uid').flatten.map {|uid| find(uid)} end # Obtain a list of people (ids) known to LDAP. LDAP filters may be used
(whimsy) branch master updated: Try to fix email address for Legal Affairs
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 649a81e1 Try to fix email address for Legal Affairs 649a81e1 is described below commit 649a81e1599b35bd6dccc19ff93dcdf3a9c008ab Author: Sebb AuthorDate: Mon Mar 18 22:56:11 2024 + Try to fix email address for Legal Affairs --- lib/whimsy/asf/mail.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/whimsy/asf/mail.rb b/lib/whimsy/asf/mail.rb index d881da29..38cea631 100644 --- a/lib/whimsy/asf/mail.rb +++ b/lib/whimsy/asf/mail.rb @@ -352,8 +352,10 @@ module ASF 'infra' when 'dataprivacy' 'priv...@apache.org' - when 'legalaffairs' + when 'legalaffairs' # Not sure what uses this 'legal-inter...@apache.org' + when 'legal' # This seems to be used by the board agenda +'legal-priv...@apache.org' when 'fundraising' 'fundraising-priv...@apache.org' when 'marketingandpublicity'
(whimsy) branch master updated: Doh! Drop test code
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 4a63ab63 Doh! Drop test code 4a63ab63 is described below commit 4a63ab634e44231a1e37c7894a9b46d31ea0a420 Author: Sebb AuthorDate: Sun Mar 17 13:25:40 2024 + Doh! Drop test code --- www/secretary/workbench/views/parts.js.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/secretary/workbench/views/parts.js.rb b/www/secretary/workbench/views/parts.js.rb index 901792a5..a5a2558c 100644 --- a/www/secretary/workbench/views/parts.js.rb +++ b/www/secretary/workbench/views/parts.js.rb @@ -149,7 +149,7 @@ class Parts < Vue _span 'software grant' end - if @@meeting && false + if @@meeting _label do _input type: 'radio', name: 'doctype', value: 'mem', onClick: -> {@form = MemApp}
(whimsy) branch master updated: Extract In-Reply-To
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 3dbdf19f Extract In-Reply-To 3dbdf19f is described below commit 3dbdf19fa6042dd672c710ea89b99b9cc776c8cc Author: Sebb AuthorDate: Sun Mar 17 13:14:10 2024 + Extract In-Reply-To --- tools/parsemail.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/parsemail.rb b/tools/parsemail.rb index 116b3c2f..709ce35a 100755 --- a/tools/parsemail.rb +++ b/tools/parsemail.rb @@ -81,6 +81,7 @@ module ParseMail MessageId: mail.message_id, # could be nil EnvelopeFrom: mail.envelope_from, EnvelopeDate: mail.envelope_date.to_s, # effectively the delivery date to the mailing list + InReplyTo: mail["In-Reply-To"]&.decoded, # will be nil if not present } data[name] = entry end
(whimsy) branch master updated: Allow for YAML not yet created
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 23483f4a Allow for YAML not yet created 23483f4a is described below commit 23483f4aa44f2b22e7f79015f32df49071a99715 Author: Sebb AuthorDate: Sun Mar 17 13:12:02 2024 + Allow for YAML not yet created --- tools/parsemail.rb | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/parsemail.rb b/tools/parsemail.rb index fa0adec6..116b3c2f 100755 --- a/tools/parsemail.rb +++ b/tools/parsemail.rb @@ -40,8 +40,12 @@ module ParseMail def self.parse_dir(maildir, yamlfile) # Has the directory changed since the last run? # If not, don't reprocess -ytime = File.mtime(yamlfile) -dtime = File.mtime(maildir) +begin + ytime = File.mtime(yamlfile) +rescue Errno::ENOENT # not yet created + ytime = Time.at(0) +end +dtime = File.mtime(maildir) # must exist if ytime > dtime + 60 # Allow for yaml update window log :INFO, "No change to #{maildir} (#{dtime}) since #{yamlfile} (#{ytime}), skipping" return
(whimsy) branch master updated: Allow for conversion of ': '
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new a5fbedaa Allow for conversion of ': ' a5fbedaa is described below commit a5fbedaafc4ee5eeb543d7a428b73d98d8c04816 Author: Sebb AuthorDate: Sun Mar 17 11:50:04 2024 + Allow for conversion of ': ' --- www/members/invitations.cgi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/members/invitations.cgi b/www/members/invitations.cgi index 50acc9cf..50027712 100755 --- a/www/members/invitations.cgi +++ b/www/members/invitations.cgi @@ -57,7 +57,9 @@ def setup_data # This may not find all the invites ... # Note: occasionally someone will forget to copy members@, in which case the email # may be sent as a reply - if v[:Subject] =~ /^(Re: )?Invitation to join The Apache Software Foundation Membership/ + # The alternative prefix has been seen in a reply from China + # Looks like ': ' is being treated as a separate character + if v[:Subject] =~ /^(Re: |Re:)?Invitation to join The Apache Software Foundation Membership/ pfx = $1 to = Mail::AddressList.new(v[:To]) cc = Mail::AddressList.new(v[:Cc])
(whimsy) branch master updated: Still need whimsy/asf
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 31ec29d9 Still need whimsy/asf 31ec29d9 is described below commit 31ec29d948daba889c23531a6bebcd93dda51286 Author: Sebb AuthorDate: Sun Mar 17 10:25:37 2024 + Still need whimsy/asf --- www/committers/moderate.cgi | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/www/committers/moderate.cgi b/www/committers/moderate.cgi index 373e7046..0444cc3d 100755 --- a/www/committers/moderate.cgi +++ b/www/committers/moderate.cgi @@ -7,10 +7,9 @@ PAGETITLE = "ASF Mailing List Moderator Setup" # Wvisible:mail moderation $LOAD_PATH.unshift '/srv/whimsy/lib' require 'wunderbar' require 'wunderbar/bootstrap' +require 'whimsy/asf' # for _whimsy_body _html do - # better system output styling (errors in red) - _style :system _body? do _whimsy_body( title: PAGETITLE, @@ -36,7 +35,12 @@ _html do end } ) do - _p 'No longer in use - please see webmod.apache.org' + _h4 do +_ 'No longer in use - please see' +_a 'webmod.apache.org', href: 'https://webmod.apache.org/modreq.html?action=modreq' + end + _br + _br end end end
(whimsy) branch master updated: Dropped too much
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new e5dad12c Dropped too much e5dad12c is described below commit e5dad12cbd637c133efb38bc55c4022f233eeca5 Author: Sebb AuthorDate: Sun Mar 17 09:30:57 2024 + Dropped too much --- www/committers/moderate.cgi | 1 + 1 file changed, 1 insertion(+) diff --git a/www/committers/moderate.cgi b/www/committers/moderate.cgi index eb83eae9..373e7046 100755 --- a/www/committers/moderate.cgi +++ b/www/committers/moderate.cgi @@ -6,6 +6,7 @@ PAGETITLE = "ASF Mailing List Moderator Setup" # Wvisible:mail moderation $LOAD_PATH.unshift '/srv/whimsy/lib' require 'wunderbar' +require 'wunderbar/bootstrap' _html do # better system output styling (errors in red)
(whimsy) branch master updated: Drop redundant code
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 7edc2ee4 Drop redundant code 7edc2ee4 is described below commit 7edc2ee49d3e1aacef57d7b23ba356e61ab0440c Author: Sebb AuthorDate: Sun Mar 17 09:24:26 2024 + Drop redundant code --- www/committers/moderate.cgi | 250 +--- 1 file changed, 3 insertions(+), 247 deletions(-) diff --git a/www/committers/moderate.cgi b/www/committers/moderate.cgi index f7f3974b..eb83eae9 100755 --- a/www/committers/moderate.cgi +++ b/www/committers/moderate.cgi @@ -2,50 +2,14 @@ PAGETITLE = "ASF Mailing List Moderator Setup" # Wvisible:mail moderation +# NO LONGER ACTIVE - see webmod.apache.org + $LOAD_PATH.unshift '/srv/whimsy/lib' require 'wunderbar' -require 'wunderbar/bootstrap' -require 'whimsy/asf' -require 'whimsy/asf/mlist' -require 'net/http' - -# N.B. $USER and $PASSWORD are provided by wunderbar - -user = ASF::Person.new($USER) -# authz handled by httpd - -# get the mail names of the current podlings -current = ASF::Podling.current.map(&:mail_list) - -pmcs = ASF::Committee.pmcs.map(&:mail_list) -ldap_pmcs = user.committees.map(&:mail_list) -ldap_pmcs += user.podlings.map(&:mail_list) -addrs = user.all_mail - -tlp = [] -podling = [] -ASF::Mail.canmod(ldap_pmcs, false) - .sort - .map { |dom, lname, _lid| -list = "#{lname}@#{dom}" -host = dom.sub('.apache.org', '') # get the host name -if pmcs.include? host - tlp << list -elsif current.include? host - podling << list -end - } - -# collect moderations -response = {} -ASF::MLIST.moderates(user.all_mail, response) -moderates = response[:moderates].transform_values { |v| v.join(' ')} _html do # better system output styling (errors in red) _style :system - _script src: '/assets/bootstrap-select.js' - _link rel: 'stylesheet', href: '/assets/bootstrap-select.css' _body? do _whimsy_body( title: PAGETITLE, @@ -58,22 +22,6 @@ _html do '/roster/committer/__self__' => 'Your Committer Details (and subscriptions)' }, helpblock: -> { -# _p do -# _ %{ -# This form allows PMC and podling members to automatically add themselves as -# moderators for the lists associated with the PMC or podling. -# } -# end -# _p 'Anyone can remove themselves as a moderator of any list.' -# _p do -# _span.text_info 'Note:' -# _ 'Only email address(es) associated with your Apache ID are listed here. To' -# _span.strong 'change your associated email addresses' -# _ ', login to ' -# _a 'your Whimsy personal details page', href: "https://whimsy.apache.org/roster/committer/__self__; -# _ 'where you can change your Forwarding Address(es) and alternate email addresses you may use.' -# end -# _p 'The moderation request will be activated synchronously (be patient, it may take a short while).' _p do _ 'PMC members can now update the moderator lists for their project lists' _ 'using the' @@ -87,199 +35,7 @@ _html do end } ) do - -# _h2 'BETA SOFTWARE - not yet in use.' -# _p %{ -# The form should work, but no updates will be made. -# Please report any other issues to the Whimsy PMC. -# } - -# ezmlmd_server = nil # prevent updates - # get the EZMLM server id - # ezmlmd_server = ASF::Config[:ezmlmd] || begin - # File.read('/home/whimsysvn/.ezmlmd').chomp - # rescue StandardError - # _div.alert.alert_danger role: 'alert' do - # _ 'Mailing list server is not set up. No updates are possible.' - # end - # break # skip rest of page - # end - -# if tlp.size == 0 and podling.size == 0 -# _fieldset do -# _legend 'Moderate A List' -# _p "Sorry, you cannot use this form to become a moderator" -# end -# else -# _form method: 'post', onSubmit: '$("#waitmod").show()' do -# _input type: 'hidden', name: 'request', value: 'sub' -# _fieldset do -# _legend 'Moderate A List' - -# _label 'Select a mailing list first, then select the email address to moderate that list.' -# _ '(The dropdown only shows lists which you can automatically moderate)' -# _br -# _label 'List name:' -# _select name: 'list', data_live_search: 'true' do -# if tlp.size > 0 -# _optgroup label: 'Top-Level Projects' do -# tlp.each do |list| -# _option list -# end
(whimsy) branch master updated: Allow for filing membership app after closing date
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 857a72a9 Allow for filing membership app after closing date 857a72a9 is described below commit 857a72a9eafecbb58ff67fe9f70ea1978e8fbca0 Author: Sebb AuthorDate: Sat Mar 16 23:04:35 2024 + Allow for filing membership app after closing date --- www/secretary/workbench/server.rb| 6 +- www/secretary/workbench/views/memapp.json.rb | 9 ++--- www/secretary/workbench/views/parts.js.rb| 7 ++- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/www/secretary/workbench/server.rb b/www/secretary/workbench/server.rb index 4b75f7a1..f563cfe6 100644 --- a/www/secretary/workbench/server.rb +++ b/www/secretary/workbench/server.rb @@ -196,7 +196,11 @@ get %r{/(\d{6})/(\w+)/_index_} do |month, hash| @appmtime = Wunderbar::Asset.convert(File.join(settings.views, 'app.js.rb')).mtime.to_i @projects = (ASF::Podling.current+ASF::Committee.pmcs).map(&:name).sort - @meeting = ASF::MeetingUtil.applications_valid + # Check if applications closed; if so, check it application was received in time + # Default to 'now' if envelope date not found; hopefully won't be triggered as emails + # should now all have the field set up + @meeting = ASF::MeetingUtil.applications_valid || +ASF::MeetingUtil.application_valid?(@headers[:envelope_date] || DateTime.now.iso8601) _html :parts end diff --git a/www/secretary/workbench/views/memapp.json.rb b/www/secretary/workbench/views/memapp.json.rb index 919d9dc2..f89d7738 100644 --- a/www/secretary/workbench/views/memapp.json.rb +++ b/www/secretary/workbench/views/memapp.json.rb @@ -2,12 +2,7 @@ require 'whimsy/asf/meeting-util' # parse and return the contents of the latest memapp-received file -hoursremain = ASF::MeetingUtil.application_time_remaining[:hoursremain] - -if hoursremain > 0 # Not yet expired - table = ASF::MeetingUtil.parse_memapp_to_h.sort_by{|k| k[:name]} -else - table = [] -end +# Application expiry is now handled by the GUI +table = ASF::MeetingUtil.parse_memapp_to_h.sort_by{|k| k[:name]} {received: table} diff --git a/www/secretary/workbench/views/parts.js.rb b/www/secretary/workbench/views/parts.js.rb index ff75314e..901792a5 100644 --- a/www/secretary/workbench/views/parts.js.rb +++ b/www/secretary/workbench/views/parts.js.rb @@ -149,12 +149,17 @@ class Parts < Vue _span 'software grant' end - if @@meeting + if @@meeting && false _label do _input type: 'radio', name: 'doctype', value: 'mem', onClick: -> {@form = MemApp} _span 'membership application' end + else +_label do + _input type: 'radio', name: 'doctype', disabled: true + _span '(membership application arrived after the closing date)' +end end _label do
(whimsy) branch master updated: Method to check if membership app arrived in time
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 2f841abd Method to check if membership app arrived in time 2f841abd is described below commit 2f841abd977a77a023b299f16a0f7e8101daa2c6 Author: Sebb AuthorDate: Sat Mar 16 18:05:09 2024 + Method to check if membership app arrived in time --- lib/whimsy/asf/meeting-util.rb | 10 ++ 1 file changed, 10 insertions(+) diff --git a/lib/whimsy/asf/meeting-util.rb b/lib/whimsy/asf/meeting-util.rb index 84a86934..b6511de6 100644 --- a/lib/whimsy/asf/meeting-util.rb +++ b/lib/whimsy/asf/meeting-util.rb @@ -441,11 +441,21 @@ module ASF end # Are membership applications still valid? +# Applications close date has yet to be reached # return: true/false def self.applications_valid self.application_time_remaining[:hoursremain] > 0 end +# Is this particular membership application still valid? +# Used to check if an application was received before the close date +# return: true/false +def self.application_valid?(message_datetime) + expirytime = self.meeting_end + APPLICATION_EXPIRY_POST_VOTE_SECS + msgtime = DateTime.iso8601(message_datetime).to_time.to_i + msgtime <= expirytime +end + end end
(whimsy) branch master updated: Redesign get_invite_times
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 104f5f99 Redesign get_invite_times 104f5f99 is described below commit 104f5f99bc991872a0f809c2eac04db4745ff394 Author: Sebb AuthorDate: Sat Mar 16 17:21:37 2024 + Redesign get_invite_times - also return meeting end - return a hash, rather than an anonymous array --- lib/whimsy/asf/meeting-util.rb | 41 +- www/members/board-nominate.cgi | 2 +- www/members/board-nominations.cgi | 2 +- www/members/member_nominations.cgi | 2 +- www/members/nominations.cgi| 2 +- 5 files changed, 40 insertions(+), 9 deletions(-) diff --git a/lib/whimsy/asf/meeting-util.rb b/lib/whimsy/asf/meeting-util.rb index d6810190..84a86934 100644 --- a/lib/whimsy/asf/meeting-util.rb +++ b/lib/whimsy/asf/meeting-util.rb @@ -376,12 +376,12 @@ module ASF end # get the times from the VCAL events file -# returns: nominations close, polls close, meeting starts as seconds since epoch +# returns: hash with keys: nominations_close:, polls_close:, meeting_start, meeting_close: def self.get_invite_times times = {} File.readlines(File.join(latest_meeting_dir, VCAL_EVENTS_FILENAME)).slice_before(/^BEGIN:VEVENT/).drop(1).each do |ev| uid = nil -dtstart = nil +dtstart = dtend = nil ev.each do |line| case line when /^UID:(.+)/ @@ -393,19 +393,50 @@ module ASF else raise ArgumentError.new("Cannot parse #{line.chomp} in #{VCAL_EVENTS_FILENAME}") end +when /^DTEND;TZID=(.+):(.+)/ + tz = $1 + if tz == 'UTC' +dtend = DateTime.iso8601($2.chomp).to_time.to_i + else +raise ArgumentError.new("Cannot parse #{line.chomp} in #{VCAL_EVENTS_FILENAME}") + end end end times[uid] = dtstart +times['asf-members-end'] = dtend if uid == 'asf-members' end - return [times['asf-members-nominations-close'], times['asf-members-polls-close'], times['asf-members']] + return { +nominations_close: times['asf-members-nominations-close'], +polls_close: times['asf-members-polls-close'], +meeting_start: times['asf-members'], +meeting_end: times['asf-members-end'], + } +end + +# Shorthand methods for callers +def self.nominations_close + self.get_invite_times[:nominations_close] +end + +def self.polls_close + self.get_invite_times[:polls_close] +end + +def self.meeting_start + self.get_invite_times[:meeting_start] +end + +def self.meeting_end + self.get_invite_times[:meeting_end] end # How long remains before applications close? +# (Time is measured from scheduled end of the meeting in which the votes were declared) # Returned as hash, e.g. {:hoursremain=>605, :days=>25, :hours=>5} def self.application_time_remaining - _, _, meeting = self.get_invite_times # this is in seconds + meetingend = self.meeting_end # this is in seconds now = DateTime.now.to_time.to_i - remain = (meeting + APPLICATION_EXPIRY_POST_VOTE_SECS - now) / 3600 + remain = (meetingend + APPLICATION_EXPIRY_POST_VOTE_SECS - now) / 3600 {hoursremain: remain, days: remain/24, hours: remain%24} end diff --git a/www/members/board-nominate.cgi b/www/members/board-nominate.cgi index dcfb4d22..2da953f8 100755 --- a/www/members/board-nominate.cgi +++ b/www/members/board-nominate.cgi @@ -13,7 +13,7 @@ require 'whimsy/asf/meeting-util' require 'whimsy/asf/time-utils' t_now = Time.now.to_i -t_end = ASF::MeetingUtil.get_invite_times.first +t_end = ASF::MeetingUtil.nominations_close nomclosed = t_now > t_end def emit_form(title, prev_data) diff --git a/www/members/board-nominations.cgi b/www/members/board-nominations.cgi index 9db4b23a..b9a3d2b1 100755 --- a/www/members/board-nominations.cgi +++ b/www/members/board-nominations.cgi @@ -12,7 +12,7 @@ require_relative '../../tools/parsemail' require 'whimsy/asf/time-utils' t_now = Time.now.to_i -t_end = ASF::MeetingUtil.get_invite_times.first +t_end = ASF::MeetingUtil.nominations_close # link to members private-arch diff --git a/www/members/member_nominations.cgi b/www/members/member_nominations.cgi index 71087e9a..7054ce97 100755 --- a/www/members/member_nominations.cgi +++ b/www/members/member_nominations.cgi @@ -13,7 +13,7 @@ require 'whimsy/asf/meeting-util' require 'whimsy/asf/time-utils' t_now = Time.now.to_i -t_end = ASF::MeetingUtil.get_invite_times.first +t_end = ASF::MeetingUtil.nominations_close nomclosed = t_now > t_end def emit_form
(whimsy) branch master updated: We need envelope_date for applications
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new d59b0c39 We need envelope_date for applications d59b0c39 is described below commit d59b0c393463a9fb88feea5259d0b0c2c2dfa32f Author: Sebb AuthorDate: Sat Mar 16 14:55:55 2024 + We need envelope_date for applications --- www/secretary/workbench/models/message.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/secretary/workbench/models/message.rb b/www/secretary/workbench/models/message.rb index 9d2ceb1b..a8b18771 100644 --- a/www/secretary/workbench/models/message.rb +++ b/www/secretary/workbench/models/message.rb @@ -410,6 +410,8 @@ class Message # start an entry for this mail headers = { + envelope_from: mail.envelope_from, + envelope_date: mail.envelope_date.to_s, # effectively the delivery date to secretary@ from: mail.from_addrs.first, name: from, time: (mail.date.to_time.gmtime.iso8601 rescue nil),
(whimsy) branch master updated: Show non-PMC members more clearly
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 24b56f9c Show non-PMC members more clearly 24b56f9c is described below commit 24b56f9c0e29932f97ec31ed652ad5c12c12f0bd Author: Sebb AuthorDate: Wed Mar 13 16:46:42 2024 + Show non-PMC members more clearly --- www/roster/views/pmc/members.js.rb | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/www/roster/views/pmc/members.js.rb b/www/roster/views/pmc/members.js.rb index d98b6c35..56222881 100644 --- a/www/roster/views/pmc/members.js.rb +++ b/www/roster/views/pmc/members.js.rb @@ -170,6 +170,7 @@ class PMCMember < Vue end def render +style = @@person.date ? '' : 'text-decoration: line-through' _tr do if @@auth _td do @@ -178,27 +179,27 @@ class PMCMember < Vue end end if @@person.member == true # full member -_td { _b { _a @@person.id, href: "committer/#{@@person.id}" } - _a ' (*)', href: "committee/#{@@committee.id}#crosscheck" if @@person.notSubbed +_td { _b { _a @@person.id, href: "committer/#{@@person.id}", style: style } + _a ' (*)', href: "committee/#{@@committee.id}#crosscheck", style: style if @@person.notSubbed } -_td @@person.githubUsername -_td { _b @@person.name } +_td @@person.githubUsername, style: style +_td { _b @@person.name, style: style } elsif @@person.member -_td { _i { _a @@person.id, href: "committer/#{@@person.id}" } - _a ' (*)', href: "committee/#{@@committee.id}#crosscheck" if @@person.notSubbed +_td { _i { _a @@person.id, href: "committer/#{@@person.id}", style: style } + _a ' (*)', href: "committee/#{@@committee.id}#crosscheck", style: style if @@person.notSubbed } -_td @@person.githubUsername -_td { _i @@person.name +_td @@person.githubUsername, style: style +_td { _i @@person.name, style: style _ ' (' - _ @@person.member.sub(%r{( \(Non-voting\))? Member}, '').sub(%r{^Emeritus}, 'ASF Emeritus') + _ @@person.member.sub(%r{( \(Non-voting\))? Member}, '').sub(%r{^Emeritus}, 'ASF Emeritus'), style: style _ ')' } else -_td { _a @@person.id, href: "committer/#{@@person.id}" - _a ' (*)', href: "committee/#{@@committee.id}#crosscheck" if @@person.notSubbed +_td { _a @@person.id, href: "committer/#{@@person.id}", style: style + _a ' (*)', href: "committee/#{@@committee.id}#crosscheck", style: style if @@person.notSubbed } -_td @@person.githubUsername -_td @@person.name +_td @@person.githubUsername, style: style +_td @@person.name, style: style end _td @@person.date
(whimsy) branch master updated: Fix comments
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 84c7498f Fix comments 84c7498f is described below commit 84c7498fbb8e1ccd6d58af8a1265691ed1886fc2 Author: Sebb AuthorDate: Wed Mar 13 15:35:18 2024 + Fix comments [skip ci] --- lib/whimsy/asf/meeting-util.rb | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/whimsy/asf/meeting-util.rb b/lib/whimsy/asf/meeting-util.rb index e0e16fb1..d6810190 100644 --- a/lib/whimsy/asf/meeting-util.rb +++ b/lib/whimsy/asf/meeting-util.rb @@ -198,8 +198,10 @@ module ASF # list,hdr,fmt = ASF::MeetingUtil.parse_memapp(nil, true) # Regenerate an indidividual entry: # fmt % entry -# Regenerate all the contents (excluding the header): +# Regenerate all the contents: # [hdr, list.map{|item| fmt % item}].join("\n") +# N.B. you may need to add a trailing EOL or two +# when writing the file def self.parse_memapp(path=nil,header=false) path ||= get_latest_file('memapp-received.txt') text = File.read(path) @@ -230,6 +232,8 @@ module ASF # fmt % keys.map{|key| entry[key]} # Regenerate all the contents: # [hdr, list.map{|item| fmt % keys.map{|key| item[key]} }].join("\n") +# N.B. you may need to add a trailing EOL or two +# when writing the file def self.parse_memapp_to_h(path=nil,header=false) keys = %i(invite apply mail karma id name) res = self.parse_memapp(path, header)
(whimsy) branch master updated: Simplify
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 6ae6237c Simplify 6ae6237c is described below commit 6ae6237c9f044e1d7b28f14315e48cee2a91f1f1 Author: Sebb AuthorDate: Tue Mar 12 23:38:10 2024 + Simplify --- www/secretary/workbench/views/actions/memapp.json.rb | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/www/secretary/workbench/views/actions/memapp.json.rb b/www/secretary/workbench/views/actions/memapp.json.rb index 803a6b98..7600906f 100644 --- a/www/secretary/workbench/views/actions/memapp.json.rb +++ b/www/secretary/workbench/views/actions/memapp.json.rb @@ -163,16 +163,10 @@ end # TODO combine with other SVN updates task "svn commit memapp-received.text" do - meetings = ASF::SVN['Meetings'] - file = Dir["#{meetings}/2*/memapp-received.txt"].max + file = ASF::MeetingUtil.get_latest_file('memapp-received.txt') received = File.read(file) - if received =~ /^no\s+\w+\s+\w+\s+\w+\s+#{@availid}\s/ -received[/^(no )\s+\w+\s+\w+\s+\w+\s+#{@availid}\s/,1] = 'yes' - end - received[/(no )\s+\w+\s+\w+\s+#{@availid}\s/,1] = 'yes' - received[/(no )\s+\w+\s+#{@availid}\s/,1] = 'yes' - received[/(no )\s+#{@availid}\s/,1] = 'yes' - @line = received[/.*\s#{@availid}\s.*/] + original = received[/.*\s#{@availid}\s.*/] + @line = original.gsub('no ','yes') form do _input value: @line, name: 'line' @@ -182,7 +176,7 @@ task "svn commit memapp-received.text" do meeting = file.split('/')[-2] path = ASF::SVN.svnpath!('Meetings', meeting,'memapp-received.txt') rc = ASF::SVN.update(path, @document, env, _, {diff: true}) do |_tmpdir, input| - input[/.*\s#{@availid}\s.*/] = @line + input.sub!(original, @line) input end raise RuntimeError.new("exit code: #{rc}") if rc != 0
(whimsy) branch master updated: Needs to be an array
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 600ada8e Needs to be an array 600ada8e is described below commit 600ada8e87aec8e0dd30a326fba26deb28ad5284 Author: Sebb AuthorDate: Tue Mar 12 22:40:21 2024 + Needs to be an array --- www/members/invitations.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/members/invitations.cgi b/www/members/invitations.cgi index d41a47d8..50acc9cf 100755 --- a/www/members/invitations.cgi +++ b/www/members/invitations.cgi @@ -89,7 +89,7 @@ def setup_data mails = ASF::Person.new(id).all_mail v[:invited] = match_person(invites, id, v[:name], mails) v[:replied] = match_person(replies, id, v[:name], mails) -v[:nominators] = nominated_by[id] || 'unknown' +v[:nominators] = nominated_by[id] || ['unknown'] end notapplied.each do |record| id = record[:id]
(whimsy) branch master updated: Add header parsing
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 83747734 Add header parsing 83747734 is described below commit 8374773441e428f02487f107722aa1705053ffc3 Author: Sebb AuthorDate: Tue Mar 12 22:26:21 2024 + Add header parsing --- lib/whimsy/asf/meeting-util.rb | 50 +++--- 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/lib/whimsy/asf/meeting-util.rb b/lib/whimsy/asf/meeting-util.rb index efd4618e..e0e16fb1 100644 --- a/lib/whimsy/asf/meeting-util.rb +++ b/lib/whimsy/asf/meeting-util.rb @@ -187,24 +187,58 @@ module ASF # 20100713: yes|no yes|no yes|noyes|no availid First Last # Note that the column widths may vary (especially the ID) -# parse a memapp file; if omitted, pick the latest found +# parse a memapp file, optionally returning the format +# Params: +# - path to file; if omitted, pick the latest found +# - parse header to extract format, default false # Does not support files before 2010 -# Return: array of arrays -def self.parse_memapp(path=nil) +# Return: array of arrays or [array of arrays, format, hdr lines] +# The original contents can be regenerated as follows: +# Parse the file: +# list,hdr,fmt = ASF::MeetingUtil.parse_memapp(nil, true) +# Regenerate an indidividual entry: +# fmt % entry +# Regenerate all the contents (excluding the header): +# [hdr, list.map{|item| fmt % item}].join("\n") +def self.parse_memapp(path=nil,header=false) path ||= get_latest_file('memapp-received.txt') text = File.read(path) -# latest layout; look for at least one yes column - list = text.scan(/^(no|yes)\s+(no|yes)(?:\s+(no|yes)\s+(no|yes))?\s+(\S+)\s+(.+)/) - list.each {|a| a.last.strip!} # trim the user name + # latest layout; look for at least one yes column; trim the user name + list = text.scan(/^(no|yes)\s+(no|yes)(?:\s+(no|yes)\s+(no|yes))?\s+(\S+)\s+(.+)/).each {|a| a.last.strip!} + if header +hdr = text.split(/\R/)[0..1] # Assume 2 line header +# Assume 6 columns for now +hyphens=hdr[1].scan(/^(--+ +)(---+ +)(---+ +)(---+ +)(---+ +)(+ *)$/).first +hyphens.pop # drop last; don't want to pad that +fmt = [hyphens.map{|h| "%%-%ds" % (h.size - 1)},'%s'].join(" ") +return [list, hdr, fmt] + else +return list + end end # parse a memapp file; if omitted, pick the latest found +# optionally return the line format and key list # Does not support files before 2010 # Return: array of hash entries with the symbolic keys: # :invite :apply :mail :karma :id :name -def self.parse_memapp_to_h(path=nil) +# optionally followed by format, keylist, hdr +# The original contents can be regenerated as follows: +# Parse the file: +# list,hdr,fmt,keys = ASF::MeetingUtil.parse_memapp_to_h(nil,true) +# Regenerate an indidividual entry: +# fmt % keys.map{|key| entry[key]} +# Regenerate all the contents: +# [hdr, list.map{|item| fmt % keys.map{|key| item[key]} }].join("\n") +def self.parse_memapp_to_h(path=nil,header=false) keys = %i(invite apply mail karma id name) - self.parse_memapp(path).map {|entry| keys.zip(entry).to_h} + res = self.parse_memapp(path, header) + if header +list, hdr, fmt = res # split the response +return [list.map{|entry| keys.zip(entry).to_h}, hdr, fmt, keys] + else +return res.map{|entry| keys.zip(entry).to_h} + end end # Parse all memapp-received.txt files to get better set of names
(whimsy) branch master updated: Drop unchanging columns
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 4b94732f Drop unchanging columns 4b94732f is described below commit 4b94732f1f5b939f6d235d906f82869302653907 Author: Sebb AuthorDate: Tue Mar 12 15:54:42 2024 + Drop unchanging columns --- www/members/invitations.cgi | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/www/members/invitations.cgi b/www/members/invitations.cgi index 40aa96d7..d41a47d8 100755 --- a/www/members/invitations.cgi +++ b/www/members/invitations.cgi @@ -213,9 +213,10 @@ _html do _tr do _th 'invited?' _th 'Reply seen?' - _th 'applied?' - _th 'members@?' - _th 'karma?' + # No point showing these, as we don't check them + # _th 'applied?' + # _th 'members@?' + # _th 'karma?' _th 'id' _th 'name' _th 'Nominators' @@ -241,9 +242,9 @@ _html do else _td 'no' end -_td entry[:apply] -_td entry[:mail] -_td entry[:karma] +# _td entry[:apply] +# _td entry[:mail] +# _td entry[:karma] _td do _a entry[:id], href: "https://whimsy.apache.org/roster/committer/#{entry[:id]}; end
(whimsy) branch master updated: Add closing message
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 9ecc7213 Add closing message 9ecc7213 is described below commit 9ecc7213c605ad4be38d52a944849dae413740bc Author: Sebb AuthorDate: Tue Mar 12 15:27:06 2024 + Add closing message --- www/members/invitations.cgi | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/www/members/invitations.cgi b/www/members/invitations.cgi index c61bc03c..40aa96d7 100755 --- a/www/members/invitations.cgi +++ b/www/members/invitations.cgi @@ -113,6 +113,8 @@ def match_person(hash, id, name, mails) return nil end +remain = ASF::MeetingUtil.application_time_remaining + # produce HTML output of reports, highlighting ones that have not (yet) # been posted _html do @@ -146,8 +148,16 @@ _html do _p 'It does not check against applications which are pending' _p 'The invite and reply columns link to the relevant emails in members@ if possible' _p %{ -N.B. The code only looks at the subject to determine if an email is an invite or its reply +N.B. The code only looks at the subject to determine if an email is an invite or its reply. +Also the members@ emails are only scanned every 10 minutes or so. } +_p do + if remain[:hoursremain] > 0 +_b "Applications close in #{remain[:days]} days and #{remain[:hours]} hours" + else +_b "Applications can no longer be accepted, sorry." + end +end } ) do