@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator

Update Install and Update Scripts to the new Paths and Repository links

Summary:
Set the Reposity links to actually install Phorge, Update Documentation links to the new Website.

Notes:
- Github Mirrors are not set up. Use one anyway? Or just use the Repos at we.phorge.it?
- Documentation Links still contain "phabricator". The Docs are changed, but the Diviner Books are not rebuilt. (Add a Cronjob or do it after every Commit?)
- mysql-server is not included anymore in Debian environments. Should mariadb-server be used?
- Should we print somewhere that Phorge is a Fork of Phabricator?

Test Plan:
Run the install script.
It should install Phorge and display Links to we.phore.it

Reviewers: O1 Blessed Committers, speck

Reviewed By: O1 Blessed Committers, speck

Subscribers: speck, tobiaswiese

Differential Revision: https://we.phorge.it/D25019

authored by

Leon Eckardt and committed by
Christopher Speck
fd1922c7 ce312892

+93 -79
+16 -11
scripts/install/install_rhel-derivs.sh
··· 6 6 } 7 7 8 8 RHEL_VER_FILE="/etc/redhat-release" 9 + INSTALL_URI=" https://we.phorge.it/book/phorge/article/installation_guide/" 10 + CONFIG_URI=" https://we.phorge.it/book/phorge/article/configuration_guide/" 11 + REPOSITORY_URI="https://we.phorge.it/source" 12 + NAME_MAIN="phorge" 13 + NAME_ARC="arcanist" 9 14 10 15 if [[ ! -f $RHEL_VER_FILE ]] 11 16 then 12 17 echo "It looks like you're not running a Red Hat-derived distribution." 13 - echo "This script is intended to install Phabricator on RHEL-derived" 18 + echo "This script is intended to install $NAME_MAIN on RHEL-derived" 14 19 echo "distributions such as RHEL, Fedora, CentOS, and Scientific Linux." 15 20 echo "Proceed with caution." 16 21 confirm 17 22 fi 18 23 19 - echo "PHABRICATOR RED HAT DERIVATIVE INSTALLATION SCRIPT"; 20 - echo "This script will install Phabricator and all of its core dependencies."; 24 + echo "$NAME_MAIN RED HAT DERIVATIVE INSTALLATION SCRIPT"; 25 + echo "This script will install $NAME_MAIN and all of its core dependencies."; 21 26 echo "Run it from the directory you want to install into."; 22 27 echo 23 28 ··· 43 48 confirm 44 49 fi 45 50 46 - echo "Phabricator will be installed to: $(pwd)."; 51 + echo "$NAME_MAIN will be installed to: $(pwd)."; 47 52 confirm 48 53 49 54 echo "Testing sudo/root..." ··· 117 122 118 123 confirm 119 124 120 - if [[ ! -e arcanist ]] 125 + if [[ ! -e "$NAME_ARC" ]] 121 126 then 122 - git clone https://github.com/phacility/arcanist.git 127 + git clone "$REPOSITORY_URI/$NAME_ARC.git" 123 128 else 124 - (cd arcanist && git pull --rebase) 129 + (cd "$NAME_ARC" && git pull --rebase) 125 130 fi 126 131 127 - if [[ ! -e phabricator ]] 132 + if [[ ! -e "$NAME_MAIN" ]] 128 133 then 129 - git clone https://github.com/phacility/phabricator.git 134 + git clone "$REPOSITORY_URI/$NAME_MAIN.git" 130 135 else 131 - (cd phabricator && git pull --rebase) 136 + (cd "$NAME_MAIN" && git pull --rebase) 132 137 fi 133 138 134 139 echo 135 140 echo 136 141 echo "Install probably worked mostly correctly. Continue with the 'Configuration Guide':"; 137 142 echo 138 - echo " https://secure.phabricator.com/book/phabricator/article/configuration_guide/"; 143 + echo $CONFIG_URI
+21 -15
scripts/install/install_ubuntu.sh
··· 5 5 read -e ignored 6 6 } 7 7 8 - INSTALL_URI=" https://phurl.io/u/install" 8 + INSTALL_URI=" https://we.phorge.it/book/phorge/article/installation_guide/" 9 + CONFIG_URI=" https://we.phorge.it/book/phorge/article/configuration_guide/" 10 + REPOSITORY_URI="https://we.phorge.it/source" 11 + NAME_MAIN="phorge" 12 + NAME_ARC="arcanist" 13 + 14 + NAME_UPPER="$(echo $NAME_MAIN | tr a-z A-Z)" 9 15 10 16 failed() { 11 17 echo ··· 30 36 confirm 31 37 fi 32 38 33 - echo "PHABRICATOR UBUNTU INSTALL SCRIPT"; 34 - echo "This script will install Apache, Phabricator and its core dependencies."; 39 + echo "$NAME_UPPER UBUNTU INSTALL SCRIPT"; 40 + echo "This script will install Apache, $NAME_MAIN and its core dependencies."; 35 41 echo "Run it from the directory you want to install into."; 36 42 echo 37 43 ··· 52 58 then 53 59 echo 'This script is intented to install on modern operating systems; Your ' 54 60 echo 'operating system is too old for this script.' 55 - echo 'You can still install Phabricator manually - please consult the installation' 56 - echo 'guide to see how:' 61 + echo 'You can still install $NAME_MAIN manually - please consult the' 62 + echo 'installation guide to see how:' 57 63 echo 58 64 echo $INSTALL_URI 59 65 echo ··· 65 71 if [ "$MAJOR" -eq 16 ] 66 72 then 67 73 echo 'This version of Ubuntu requires additional resources in order to install' 68 - echo 'and run Phabricator.' 74 + echo 'and run $NAME_MAIN.' 69 75 echo 'We will now add a the following package repository to your system:' 70 76 echo ' https://launchpad.net/~ondrej/+archive/ubuntu/php' 71 77 echo ··· 76 82 fi 77 83 78 84 ROOT=`pwd` 79 - echo "Phabricator will be installed to: ${ROOT}."; 85 + echo "$NAME_MAIN will be installed to: ${ROOT}."; 80 86 confirm 81 87 82 88 echo "Installing dependencies: git, apache, mysql, php..."; ··· 91 97 echo 92 98 sudo a2enmod rewrite || failed 93 99 94 - echo "Downloading Phabricator and dependencies..." 100 + echo "Downloading $NAME_MAIN and dependencies..." 95 101 echo 96 102 97 - if [ ! -e arcanist ] 103 + if [ ! -e "$NAME_ARC" ] 98 104 then 99 - git clone https://github.com/phacility/arcanist.git 105 + git clone "$REPOSITORY_URI/$NAME_ARC.git" 100 106 else 101 - (cd arcanist && git pull --rebase) 107 + (cd "$NAME_ARC" && git pull --rebase) 102 108 fi 103 109 104 - if [ ! -e phabricator ] 110 + if [ ! -e "$NAME_MAIN" ] 105 111 then 106 - git clone https://github.com/phacility/phabricator.git 112 + git clone "$REPOSITORY_URI/$NAME_MAIN.git" 107 113 else 108 - (cd phabricator && git pull --rebase) 114 + (cd "$NAME_MAIN" && git pull --rebase) 109 115 fi 110 116 111 117 echo 112 118 echo 113 119 echo "Install probably worked mostly correctly. Continue with the 'Configuration Guide':"; 114 120 echo 115 - echo " https://secure.phabricator.com/book/phabricator/article/configuration_guide/"; 121 + echo $CONFIG_URI 116 122 echo 117 123 echo 'Next step is "Configuring Apache webserver".'
-53
scripts/install/update_phabricator.sh
··· 1 - #!/bin/sh 2 - 3 - set -e 4 - set -x 5 - 6 - # This is an example script for updating Phabricator, similar to the one used to 7 - # update <https://secure.phabricator.com/>. It might not work perfectly on your 8 - # system, but hopefully it should be easy to adapt. This script is not intended 9 - # to work without modifications. 10 - 11 - # NOTE: This script assumes you are running it from a directory which contains 12 - # arcanist/ and phabricator/. 13 - 14 - ROOT=`pwd` # You can hard-code the path here instead. 15 - 16 - ### UPDATE WORKING COPIES ###################################################### 17 - 18 - cd $ROOT/arcanist 19 - git pull 20 - 21 - cd $ROOT/phabricator 22 - git pull 23 - 24 - 25 - ### CYCLE WEB SERVER AND DAEMONS ############################################### 26 - 27 - # Stop daemons. 28 - $ROOT/phabricator/bin/phd stop 29 - 30 - # If running the notification server, stop it. 31 - # $ROOT/phabricator/bin/aphlict stop 32 - 33 - # Stop the webserver (apache, nginx, lighttpd, etc). This command will differ 34 - # depending on which system and webserver you are running: replace it with an 35 - # appropriate command for your system. 36 - # NOTE: If you're running php-fpm, you should stop it here too. 37 - 38 - sudo /etc/init.d/httpd stop 39 - 40 - 41 - # Upgrade the database schema. You may want to add the "--force" flag to allow 42 - # this script to run noninteractively. 43 - $ROOT/phabricator/bin/storage upgrade 44 - 45 - # Restart the webserver. As above, this depends on your system and webserver. 46 - # NOTE: If you're running php-fpm, restart it here too. 47 - sudo /etc/init.d/httpd start 48 - 49 - # Restart daemons. 50 - $ROOT/phabricator/bin/phd start 51 - 52 - # If running the notification server, start it. 53 - # $ROOT/phabricator/bin/aphlict start
+56
scripts/install/update_phorge.sh
··· 1 + #!/bin/sh 2 + 3 + set -e 4 + set -x 5 + 6 + # This is an example script for updating Phabricator. It might not work 7 + # perfectly on your system, but hopefully it should be easy to adapt. This 8 + # script is not intended to work without modifications. 9 + 10 + # NOTE: This script assumes you are running it from a directory which contains 11 + # arcanist/ and phorge/. If you named them differently, you can change them 12 + # here: 13 + NAME_MAIN="phorge" 14 + NAME_ARC="arcanist" 15 + 16 + 17 + ROOT=`pwd` # You can hard-code the path here instead. 18 + 19 + ### UPDATE WORKING COPIES ###################################################### 20 + 21 + cd $ROOT/$NAME_ARC 22 + git pull 23 + 24 + cd $ROOT/$NAME_MAIN 25 + git pull 26 + 27 + 28 + ### CYCLE WEB SERVER AND DAEMONS ############################################### 29 + 30 + # Stop daemons. 31 + $ROOT/$NAME_MAIN/bin/phd stop 32 + 33 + # If running the notification server, stop it. 34 + # $ROOT/$NAME_MAIN/bin/aphlict stop 35 + 36 + # Stop the webserver (apache, nginx, lighttpd, etc). This command will differ 37 + # depending on which system and webserver you are running: replace it with an 38 + # appropriate command for your system. 39 + # NOTE: If you're running php-fpm, you should stop it here too. 40 + 41 + sudo /etc/init.d/httpd stop 42 + 43 + 44 + # Upgrade the database schema. You may want to add the "--force" flag to allow 45 + # this script to run noninteractively. 46 + $ROOT/$NAME_MAIN/bin/storage upgrade 47 + 48 + # Restart the webserver. As above, this depends on your system and webserver. 49 + # NOTE: If you're running php-fpm, restart it here too. 50 + sudo /etc/init.d/httpd start 51 + 52 + # Restart daemons. 53 + $ROOT/$NAME_MAIN/bin/phd start 54 + 55 + # If running the notification server, start it. 56 + # $ROOT/$NAME_MAIN/bin/aphlict start