whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] 02/02: Merge branch 'master' of github.com:apache/whimsy
Date Mon, 25 Nov 2019 19:22:35 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git

commit 2d2669b5c150836da385f143b2eef1bf8b66f19a
Merge: 8b99e10 a27ab24
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Mon Nov 25 14:20:28 2019 -0500

    Merge branch 'master' of github.com:apache/whimsy

 Gemfile                         |  2 +-
 config/setupmymac               |  2 ++
 lib/spec/lib/svn_spec.rb        | 65 +++++++++++++++++++++++++++++++++++++++++
 lib/whimsy/asf/svn.rb           | 55 ++++++++++++++++++++++++++++++++--
 tools/wwwdocs.rb                | 20 +++----------
 www/board/agenda/Gemfile        |  6 ++--
 www/committers/config_info.cgi  | 12 ++++++++
 www/committers/tools.cgi        |  2 +-
 www/members/repo-use.cgi        |  2 +-
 www/project/icla/Gemfile        |  4 +--
 www/racktest/config.ru          | 15 +++++++++-
 www/roster/Gemfile              |  2 +-
 www/secretary/Gemfile           |  2 +-
 www/secretary/workbench/Gemfile |  2 +-
 www/status/Gemfile              |  2 +-
 www/test.cgi                    |  1 +
 www/treasurer/statements.cgi    |  1 -
 17 files changed, 162 insertions(+), 33 deletions(-)

diff --cc config/setupmymac
index c3c029b,beb697f..6382142
--- a/config/setupmymac
+++ b/config/setupmymac
@@@ -84,74 -52,7 +84,76 @@@ def sud
    end
  end
  
 -# Configure passenger
 +### Create /srv
 +
 +mac_version = `sw_vers`[/ProductVersion:\s+(.*)/, 1]
 +unless Dir.exist? '/srv'
 +  sudo_user = ENV['SUDO_USER']
 +  sudo_group = Etc.getpwnam(sudo_user).gid
 +  sudo do
 +    if (mac_version.split('.').map(&:to_i) <=> [10, 15, 0]) >= 0
 +      # Catalina or later
 +      Dir.mkdir '/var/whimsy' unless Dir.exist? '/var/whimsy'
 +      FileUtils.chown sudo_user, sudo_group, '/var/whimsy'
 +      FileUtils.touch '/etc/synthetic.conf'
 +      SYNTHETIC = '/etc/synthetic.conf'
 +      unless File.read(SYNTHETIC).include? "/var/whimsy"
 +        File.write SYNTHETIC, File.read(SYNTHETIC) + "srv\t/var/whimsy\n"
 +        STDERR.puts "#{SYNTHETIC} updated; reboot machine and rerun this script"
++        puts %(\nPress "y" to reboot now, anything else to exit)
++        system "shutdown -r now" if gets.strip.downcase == "y"
 +        exit 1
 +      end
 +    else
 +      # prior to Catalina
 +      Dir.mkdir '/srv'
 +      FileUtils.chown sudo_user, sudo_group, '/srv'
 +    end
 +  end
 +end
 +
 +# relocate whimsy clone
 +if not Dir.exist? '/srv/whimsy'
 +  sudo do
 +    FileUtils.mv WHIMSY, '/srv/whimsy'
 +    File.symlink '/srv/whimsy', WHIMSY
 +  end
 +end
 +
 +### Define directories
 +directories = [
 +  '/srv/agenda',
 +  '/srv/cache',
 +  '/srv/secretary',
 +  '/srv/secretary/tlpreq',
 +  '/srv/whimsy/www/board/minutes',
 +  '/srv/whimsy/www/logs',
 +  '/srv/whimsy/www/public',
 +]
 +
 +directories.each do |dir|
 +  sudo {FileUtils.mkdir_p dir} unless Dir.exist? dir
 +  sudo {FileUtils.chown_R uid, gid, dir} unless File.stat(dir).uid == uid
 +end
 +
 +### Docker installation
 +
 +if option == :docker
 +  unless system 'docker info > /dev/null 2>&1'
 +    STDERR.puts "Please start docker and run this command again"
 +    exit 1
 +  end
 +
 +  if Process.uid != 0
 +    Dir.chdir '/srv/whimsy' do
 +      system 'rake docker:update'
 +    end
 +  end
 +
 +  exit
 +end
 +
 +### Configure passenger
  
  passenger_conf = '/etc/apache2/other/passenger.conf'
  if Process.uid == 0


Mime
View raw message