From 13cb6681d525996a26a1f787b9836cd12e1846b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Wed, 22 Apr 2020 13:29:32 +0200 Subject: [PATCH 1/6] chg: [vagrant] fix permissions issues and db initialization when deploying new dev env. sudo is no more required when updating MONARC in the VM vagrant --- vagrant/Vagrantfile | 6 ++-- vagrant/bootstrap.sh | 77 ++++++++++++++++++++------------------------ 2 files changed, 38 insertions(+), 45 deletions(-) diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile index 4ed7bb8..1713ea2 100644 --- a/vagrant/Vagrantfile +++ b/vagrant/Vagrantfile @@ -12,7 +12,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Every Vagrant virtual environment requires a box to build off of. config.vm.box = "ubuntu/bionic64" config.disksize.size = "50GB" - config.vm.provision :shell, path: "bootstrap.sh" + config.vm.provision "shell", privileged: false, path: "bootstrap.sh" # Disable automatic box update checking. If you disable this, then # boxes will only be checked for updates when the user runs @@ -42,8 +42,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # the path on the host to the actual folder. The second argument is # the path on the guest to mount the folder. And the optional third # argument is a set of non-required options. - config.vm.synced_folder "..", "/home/ubuntu/monarc", - owner: "www-data", group: "www-data", disabled: false + config.vm.synced_folder "..", "/home/vagrant/monarc", + owner: "vagrant", group: "vagrant", disabled: false # Provider-specific configuration so you can fine-tune various # backing providers for Vagrant. These expose provider-specific options. diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh index f14fa1a..50cdf84 100644 --- a/vagrant/bootstrap.sh +++ b/vagrant/bootstrap.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -PATH_TO_MONARC='/home/ubuntu/monarc' +PATH_TO_MONARC='/home/vagrant/monarc' APPENV='local' ENVIRONMENT='development' @@ -26,29 +26,29 @@ export DEBIAN_FRONTEND=noninteractive export LANGUAGE=en_US.UTF-8 export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 -locale-gen en_US.UTF-8 -dpkg-reconfigure locales +sudo -E locale-gen en_US.UTF-8 +sudo -E dpkg-reconfigure locales echo -e "\n--- Installing now… ---\n" echo -e "\n--- Updating packages list… ---\n" -apt-get update && apt-get upgrade +sudo apt-get update && sudo apt-get upgrade echo -e "\n--- Install base packages… ---\n" -apt-get -y install vim zip unzip git gettext curl gsfonts > /dev/null +sudo apt-get -y install vim zip unzip git gettext curl gsfonts > /dev/null echo -e "\n--- Install MariaDB specific packages and settings… ---\n" -apt-get -y install mariadb-server mariadb-client > /dev/null +sudo apt-get -y install mariadb-server mariadb-client > /dev/null # Secure the MariaDB installation (especially by setting a strong root password) -systemctl restart mariadb.service > /dev/null +sudo systemctl restart mariadb.service > /dev/null sleep 5 -apt-get -y install expect > /dev/null +sudo apt-get -y install expect > /dev/null ## do we need to spawn mysql_secure_install with sudo in future? expect -f - <<-EOF set timeout 10 - spawn mysql_secure_installation + spawn sudo mysql_secure_installation expect "Enter current password for root (enter for none):" send -- "\r" expect "Set root password?" @@ -70,36 +70,36 @@ EOF sudo apt-get purge -y expect php-xdebug > /dev/null 2>&1 echo -e "\n--- Configuring… ---\n" -sed -i "s/skip-external-locking/#skip-external-locking/g" $MARIA_DB_CFG -sed -i "s/.*bind-address.*/bind-address = 0.0.0.0/" $MARIA_DB_CFG +sudo sed -i "s/skip-external-locking/#skip-external-locking/g" $MARIA_DB_CFG +sudo sed -i "s/.*bind-address.*/bind-address = 0.0.0.0/" $MARIA_DB_CFG echo -e "\n--- Setting up our MariaDB user for MONARC… ---\n" -mysql -u root -p$DBPASSWORD_ADMIN -e "CREATE USER '$DBUSER_MONARC'@'%' IDENTIFIED BY '$DBPASSWORD_MONARC';" -mysql -u root -p$DBPASSWORD_ADMIN -e "GRANT ALL PRIVILEGES ON * . * TO '$DBUSER_MONARC'@'%';" -mysql -u root -p$DBPASSWORD_ADMIN -e "FLUSH PRIVILEGES;" -systemctl restart mariadb.service > /dev/null +sudo mysql -u root -p$DBPASSWORD_ADMIN -e "CREATE USER '$DBUSER_MONARC'@'%' IDENTIFIED BY '$DBPASSWORD_MONARC';" +sudo mysql -u root -p$DBPASSWORD_ADMIN -e "GRANT ALL PRIVILEGES ON * . * TO '$DBUSER_MONARC'@'%';" +sudo mysql -u root -p$DBPASSWORD_ADMIN -e "FLUSH PRIVILEGES;" +sudo systemctl restart mariadb.service > /dev/null echo -e "\n--- Installing PHP-specific packages… ---\n" -apt-get -y install php apache2 libapache2-mod-php php-curl php-gd php-mysql php-pear php-apcu php-xml php-mbstring php-intl php-imagick php-zip php-xdebug > /dev/null +sudo apt-get -y install php apache2 libapache2-mod-php php-curl php-gd php-mysql php-pear php-apcu php-xml php-mbstring php-intl php-imagick php-zip php-xdebug > /dev/null echo -e "\n--- Configuring PHP… ---\n" for key in upload_max_filesize post_max_size max_execution_time max_input_time memory_limit do - sed -i "s/^\($key\).*/\1 = $(eval echo \${$key})/" $PHP_INI + sudo sed -i "s/^\($key\).*/\1 = $(eval echo \${$key})/" $PHP_INI done echo -e "\n--- Configuring Xdebug for development ---\n" -cat > $X_DEBUG_CFG < $X_DEBUG_CFG zend_extension=xdebug.so xdebug.remote_enable=1 xdebug.remote_connect_back=1 xdebug.idekey=IDEKEY -EOF +EOF" echo -e "\n--- Enabling mod-rewrite and ssl… ---\n" -a2enmod rewrite > /dev/null 2>&1 -a2enmod ssl > /dev/null 2>&1 -a2enmod headers > /dev/null 2>&1 +sudo a2enmod rewrite > /dev/null 2>&1 +sudo a2enmod ssl > /dev/null 2>&1 +sudo a2enmod headers > /dev/null 2>&1 echo -e "\n--- Allowing Apache override to all ---\n" sudo sed -i "s/AllowOverride None/AllowOverride All/g" /etc/apache2/apache2.conf @@ -111,7 +111,7 @@ if [ $? -ne 0 ]; then echo "\nERROR: unable to install composer\n" exit 1; fi -composer self-update +# sudo composer self-update echo -e "\n--- Installing MONARC… ---\n" cd $PATH_TO_MONARC @@ -151,13 +151,13 @@ if [ $? -ne 0 ]; then fi cd .. -chown -R www-data $PATH_TO_MONARC -chgrp -R www-data $PATH_TO_MONARC -chmod -R 700 $PATH_TO_MONARC +# chown -R www-data $PATH_TO_MONARC +# chgrp -R www-data $PATH_TO_MONARC +chmod -R 777 $PATH_TO_MONARC echo -e "\n--- Add a VirtualHost for MONARC ---\n" -cat > /etc/apache2/sites-enabled/000-default.conf < /etc/apache2/sites-enabled/000-default.conf ServerName localhost DocumentRoot $PATH_TO_MONARC/public @@ -170,7 +170,7 @@ cat > /etc/apache2/sites-enabled/000-default.conf < Header always set X-Content-Type-Options nosniff - Header always set X-XSS-Protection "1; mode=block" + Header always set X-XSS-Protection '1; mode=block' Header always set X-Robots-Tag none Header always set X-Frame-Options SAMEORIGIN @@ -178,23 +178,16 @@ cat > /etc/apache2/sites-enabled/000-default.conf < -EOF +EOF" echo -e "\n--- Restarting Apache… ---\n" -systemctl restart apache2.service > /dev/null +sudo systemctl restart apache2.service > /dev/null echo -e "\n--- Configuration of MONARC database connection ---\n" -cat > config/autoload/local.php < config/autoload/local.php array( 'connection' => array( @@ -235,7 +228,7 @@ return array( */ 'activeLanguages' => array('fr','en','de','nl',), - 'appVersion' => \$package_json['version'], + 'appVersion' => '2.9.13', 'checkVersion' => false, 'appCheckingURL' => 'https://version.monarc.lu/check/MONARC', @@ -252,7 +245,7 @@ return array( 'salt' => '', // private salt for password encryption ), ); -EOF +EOF" echo -e "\n--- Creation of the data bases… ---\n" @@ -274,7 +267,7 @@ sudo npm install -g grunt-cli echo -e "\n--- Update the project… ---\n" -/bin/bash ./scripts/update-all.sh > /dev/null +./scripts/update-all.sh > /dev/null @@ -286,7 +279,7 @@ php ./bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php echo -e "\n--- Restarting Apache… ---\n" -systemctl restart apache2.service > /dev/null +sudo systemctl restart apache2.service > /dev/null From ab4606e085290327f9ef52cc48a99a15e7c5e360 Mon Sep 17 00:00:00 2001 From: Ruslan Baidan Date: Fri, 24 Apr 2020 10:19:01 +0200 Subject: [PATCH 2/6] Release of new version 2.9.14 of monarc. --- CHANGELOG.md | 12 ++++ VERSION.json | 2 +- composer.lock | 155 +++++++++++++++++++++++++++++++++++++------------- package.json | 2 +- 4 files changed, 131 insertions(+), 40 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9a1401..7b31b3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,18 @@ MONARC Changelog ================ +## 2.9.14 (2020-04-24) + +### Fix + +- "Edit impacts" in version 2.9.13 + ([#273](https://github.com/monarc-project/MonarcAppFO/issues/273)). +- Duplicate assets + ([#279](https://github.com/monarc-project/MonarcAppFO/issues/279)). +- Translation "Vulnerabilities" in the Knowledge Base + ([#275](https://github.com/monarc-project/MonarcAppFO/issues/275)). + + ## 2.9.13 (2020-04-14) ### Fix diff --git a/VERSION.json b/VERSION.json index a7d7178..d4e1ed6 100644 --- a/VERSION.json +++ b/VERSION.json @@ -1 +1 @@ -{"major":2, "minor":9, "hotfix":13} +{"major":2, "minor":9, "hotfix":14} diff --git a/composer.lock b/composer.lock index b300716..fa8a4d1 100644 --- a/composer.lock +++ b/composer.lock @@ -8,25 +8,26 @@ "packages": [ { "name": "brick/math", - "version": "0.8.14", + "version": "0.8.15", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "6f7a46b5c3d487b277f38fbd17df57d348cace8a" + "reference": "9b08d412b9da9455b210459ff71414de7e6241cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/6f7a46b5c3d487b277f38fbd17df57d348cace8a", - "reference": "6f7a46b5c3d487b277f38fbd17df57d348cace8a", + "url": "https://api.github.com/repos/brick/math/zipball/9b08d412b9da9455b210459ff71414de7e6241cd", + "reference": "9b08d412b9da9455b210459ff71414de7e6241cd", "shasum": "" }, "require": { - "php": ">=7.1" + "ext-json": "*", + "php": "^7.1|^8.0" }, "require-dev": { - "php-coveralls/php-coveralls": "2.*", - "phpunit/phpunit": "7.*", - "vimeo/psalm": "3.*" + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^7.5.15|^8.5", + "vimeo/psalm": "^3.5" }, "type": "library", "autoload": { @@ -49,7 +50,13 @@ "brick", "math" ], - "time": "2020-02-17T13:57:43+00:00" + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/brick/math", + "type": "tidelift" + } + ], + "time": "2020-04-15T15:59:35+00:00" }, { "name": "cakephp/cache", @@ -421,16 +428,16 @@ }, { "name": "doctrine/annotations", - "version": "1.10.1", + "version": "1.10.2", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "5eb79f3dbdffed6544e1fc287572c0f462bd29bb" + "reference": "b9d758e831c70751155c698c2f7df4665314a1cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/5eb79f3dbdffed6544e1fc287572c0f462bd29bb", - "reference": "5eb79f3dbdffed6544e1fc287572c0f462bd29bb", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/b9d758e831c70751155c698c2f7df4665314a1cb", + "reference": "b9d758e831c70751155c698c2f7df4665314a1cb", "shasum": "" }, "require": { @@ -486,7 +493,7 @@ "docblock", "parser" ], - "time": "2020-04-02T12:33:25+00:00" + "time": "2020-04-20T09:18:32+00:00" }, { "name": "doctrine/cache", @@ -725,16 +732,16 @@ }, { "name": "doctrine/dbal", - "version": "v2.10.1", + "version": "2.10.2", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "c2b8e6e82732a64ecde1cddf9e1e06cb8556e3d8" + "reference": "aab745e7b6b2de3b47019da81e7225e14dcfdac8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/c2b8e6e82732a64ecde1cddf9e1e06cb8556e3d8", - "reference": "c2b8e6e82732a64ecde1cddf9e1e06cb8556e3d8", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/aab745e7b6b2de3b47019da81e7225e14dcfdac8", + "reference": "aab745e7b6b2de3b47019da81e7225e14dcfdac8", "shasum": "" }, "require": { @@ -746,9 +753,11 @@ "require-dev": { "doctrine/coding-standard": "^6.0", "jetbrains/phpstorm-stubs": "^2019.1", - "phpstan/phpstan": "^0.11.3", + "nikic/php-parser": "^4.4", + "phpstan/phpstan": "^0.12", "phpunit/phpunit": "^8.4.1", - "symfony/console": "^2.0.5|^3.0|^4.0|^5.0" + "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", + "vimeo/psalm": "^3.11" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -813,7 +822,21 @@ "sqlserver", "sqlsrv" ], - "time": "2020-01-04T12:56:21+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", + "type": "tidelift" + } + ], + "time": "2020-04-20T17:19:26+00:00" }, { "name": "doctrine/doctrine-module", @@ -2686,16 +2709,16 @@ }, { "name": "laminas/laminas-mail", - "version": "2.10.0", + "version": "2.10.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-mail.git", - "reference": "019fb670c1dff6be7fc91d3b88942bd0a5f68792" + "reference": "cfe0711446c8d9c392e9fc664c9ccc180fa89005" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/019fb670c1dff6be7fc91d3b88942bd0a5f68792", - "reference": "019fb670c1dff6be7fc91d3b88942bd0a5f68792", + "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/cfe0711446c8d9c392e9fc664c9ccc180fa89005", + "reference": "cfe0711446c8d9c392e9fc664c9ccc180fa89005", "shasum": "" }, "require": { @@ -2709,7 +2732,7 @@ "true/punycode": "^2.1" }, "replace": { - "zendframework/zend-mail": "self.version" + "zendframework/zend-mail": "^2.10.0" }, "require-dev": { "laminas/laminas-coding-standard": "~1.0.0", @@ -2748,7 +2771,13 @@ "laminas", "mail" ], - "time": "2019-12-31T17:21:22+00:00" + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2020-04-21T16:42:19+00:00" }, { "name": "laminas/laminas-mime", @@ -3653,16 +3682,16 @@ }, { "name": "monarc/core", - "version": "v2.9.17", + "version": "v2.9.18", "source": { "type": "git", "url": "https://github.com/monarc-project/zm-core.git", - "reference": "329104bb66c69ff27c11313851236fa254ee8714" + "reference": "bcb0b2bea8c83c55284ab77571ff4692268582ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/monarc-project/zm-core/zipball/329104bb66c69ff27c11313851236fa254ee8714", - "reference": "329104bb66c69ff27c11313851236fa254ee8714", + "url": "https://api.github.com/repos/monarc-project/zm-core/zipball/bcb0b2bea8c83c55284ab77571ff4692268582ae", + "reference": "bcb0b2bea8c83c55284ab77571ff4692268582ae", "shasum": "" }, "require": { @@ -3737,7 +3766,7 @@ } ], "description": "Core for monarc/monarc application", - "time": "2020-04-14T10:00:52+00:00" + "time": "2020-04-24T08:06:23+00:00" }, { "name": "monarc/frontoffice", @@ -4466,6 +4495,12 @@ "identifier", "uuid" ], + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + } + ], "time": "2020-03-29T20:13:32+00:00" }, { @@ -4656,6 +4691,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-03-27T16:56:45+00:00" }, { @@ -4732,6 +4781,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-03-30T11:42:42+00:00" }, { @@ -4782,6 +4845,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-03-27T16:56:45+00:00" }, { @@ -5113,12 +5190,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "0f73cf4b4b9227eb8845723bc2a8869bc4dd6e8f" + "reference": "81541a731da2f245a08666de73169cb5da7ac573" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/0f73cf4b4b9227eb8845723bc2a8869bc4dd6e8f", - "reference": "0f73cf4b4b9227eb8845723bc2a8869bc4dd6e8f", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/81541a731da2f245a08666de73169cb5da7ac573", + "reference": "81541a731da2f245a08666de73169cb5da7ac573", "shasum": "" }, "conflict": { @@ -5164,6 +5241,8 @@ "endroid/qr-code-bundle": "<3.4.2", "enshrined/svg-sanitize": "<0.13.1", "erusev/parsedown": "<1.7.2", + "ezsystems/demobundle": ">=5.4,<5.4.6.1", + "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1", "ezsystems/ezfind-ls": ">=5.3,<5.3.6.1|>=5.4,<5.4.11.1|>=2017.12,<2017.12.0.1", "ezsystems/ezplatform": ">=1.7,<1.7.9.1|>=1.13,<1.13.5.1|>=2.5,<2.5.4", "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6", @@ -5239,7 +5318,7 @@ "serluck/phpwhois": "<=4.2.6", "shopware/shopware": "<5.3.7", "silverstripe/admin": ">=1.0.3,<1.0.4|>=1.1,<1.1.1", - "silverstripe/assets": ">=1,<1.3.5|>=1.4,<1.4.4", + "silverstripe/assets": ">=1,<1.4.7|>=1.5,<1.5.2", "silverstripe/cms": "<4.3.6|>=4.4,<4.4.4", "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1", "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", @@ -5252,7 +5331,7 @@ "silverstripe/userforms": "<3", "simple-updates/phpwhois": "<=1", "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4", - "simplesamlphp/simplesamlphp": "<1.18.4", + "simplesamlphp/simplesamlphp": "<1.18.6", "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", "simplito/elliptic-php": "<1.0.6", "slim/slim": "<2.6", @@ -5379,7 +5458,7 @@ "type": "tidelift" } ], - "time": "2020-03-31T14:30:16+00:00" + "time": "2020-04-23T00:01:30+00:00" } ], "aliases": [], diff --git a/package.json b/package.json index 58c2723..b13221e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "MONARC", - "version": "2.9.13", + "version": "2.9.14", "description": "Monarc front office application", "private": true, "repository": { From e0f9d1265b3a52e3cce79eac9c4ccded1d2d203c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Fri, 24 Apr 2020 11:49:44 +0200 Subject: [PATCH 3/6] Fix the issue with NPM check updates and specify -master instead of a version number for the version of MONARC in the vagrant VM. --- vagrant/bootstrap.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh index 50cdf84..295d6f2 100644 --- a/vagrant/bootstrap.sh +++ b/vagrant/bootstrap.sh @@ -228,7 +228,7 @@ return array( */ 'activeLanguages' => array('fr','en','de','nl',), - 'appVersion' => '2.9.13', + 'appVersion' => '-master', 'checkVersion' => false, 'appCheckingURL' => 'https://version.monarc.lu/check/MONARC', @@ -267,6 +267,7 @@ sudo npm install -g grunt-cli echo -e "\n--- Update the project… ---\n" +sudo chown -R $USER:$(id -gn $USER) /home/vagrant/.config ./scripts/update-all.sh > /dev/null From 737774a151f619b731ba87711ac2db3fe248cbd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Fri, 24 Apr 2020 15:55:29 +0200 Subject: [PATCH 4/6] chg: [vagrant] adjusted usermod and permissions on files (data for backend) --- vagrant/bootstrap.sh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh index 295d6f2..dcdcad8 100644 --- a/vagrant/bootstrap.sh +++ b/vagrant/bootstrap.sh @@ -129,12 +129,6 @@ ln -s ./../../vendor/monarc/frontoffice FrontOffice cd $PATH_TO_MONARC -mkdir -p $PATH_TO_MONARC/data/cache -mkdir -p $PATH_TO_MONARC/data/LazyServices/Proxy -mkdir -p $PATH_TO_MONARC/data/DoctrineORMModule/Proxy -chown -R www-data data -chmod -R 777 data - # Front-end mkdir node_modules @@ -151,9 +145,6 @@ if [ $? -ne 0 ]; then fi cd .. -# chown -R www-data $PATH_TO_MONARC -# chgrp -R www-data $PATH_TO_MONARC -chmod -R 777 $PATH_TO_MONARC echo -e "\n--- Add a VirtualHost for MONARC ---\n" @@ -265,6 +256,18 @@ sudo npm install -g grunt-cli +echo -e "\n--- Creating cache folders for backend… ---\n" +mkdir -p $PATH_TO_MONARC/data/cache +mkdir -p $PATH_TO_MONARC/data/LazyServices/Proxy +mkdir -p $PATH_TO_MONARC/data/DoctrineORMModule/Proxy + + + +echo -e "\n--- Adjusting user mod… ---\n" +sudo usermod -aG www-data vagrant +sudo usermod -aG vagrant www-data + + echo -e "\n--- Update the project… ---\n" sudo chown -R $USER:$(id -gn $USER) /home/vagrant/.config From f49b7ac20102cde9dd03d5f6bc70ecde98b2cba4 Mon Sep 17 00:00:00 2001 From: Ruslan Baidan Date: Fri, 24 Apr 2020 20:34:42 +0200 Subject: [PATCH 5/6] fixed the permissions issue for the vm generation. --- vagrant/Vagrantfile | 2 +- vagrant/bootstrap.sh | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile index 1713ea2..bba961f 100644 --- a/vagrant/Vagrantfile +++ b/vagrant/Vagrantfile @@ -43,7 +43,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # the path on the guest to mount the folder. And the optional third # argument is a set of non-required options. config.vm.synced_folder "..", "/home/vagrant/monarc", - owner: "vagrant", group: "vagrant", disabled: false + owner: "vagrant", group: "vagrant", disabled: false, mount_options: ["dmode=777", "fmode=775"] # Provider-specific configuration so you can fine-tune various # backing providers for Vagrant. These expose provider-specific options. diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh index dcdcad8..5f817b6 100644 --- a/vagrant/bootstrap.sh +++ b/vagrant/bootstrap.sh @@ -124,21 +124,25 @@ composer install -o # Make modules symlinks. mkdir -p module/Monarc cd module/Monarc -ln -s ./../../vendor/monarc/core Core -ln -s ./../../vendor/monarc/frontoffice FrontOffice +ln -sfn ./../../vendor/monarc/core Core +ln -sfn ./../../vendor/monarc/frontoffice FrontOffice cd $PATH_TO_MONARC # Front-end -mkdir node_modules +mkdir -p node_modules cd node_modules -git clone --config core.fileMode=false https://github.com/monarc-project/ng-client.git ng_client > /dev/null 2>&1 +if [ ! -d "ng_client" ]; then + git clone --config core.fileMode=false https://github.com/monarc-project/ng-client.git ng_client > /dev/null 2>&1 +fi if [ $? -ne 0 ]; then echo "\nERROR: unable to clone the ng-client repository\n" exit 1; fi -git clone --config core.fileMode=false https://github.com/monarc-project/ng-anr.git ng_anr > /dev/null 2>&1 +if [ ! -d "ng_anr" ]; then + git clone --config core.fileMode=false https://github.com/monarc-project/ng-anr.git ng_anr > /dev/null 2>&1 +fi if [ $? -ne 0 ]; then echo "\nERROR: unable to clone the ng-anr repository\n" exit 1; From 04ac95d0384a698b69ed23486cc8f1486a067251 Mon Sep 17 00:00:00 2001 From: Ruslan Baidan Date: Fri, 24 Apr 2020 20:46:17 +0200 Subject: [PATCH 6/6] Renamed xdebug variable. --- vagrant/bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh index 5f817b6..80dcf3f 100644 --- a/vagrant/bootstrap.sh +++ b/vagrant/bootstrap.sh @@ -19,7 +19,7 @@ max_execution_time=100 max_input_time=223 memory_limit=512M PHP_INI=/etc/php/7.2/apache2/php.ini -X_DEBUG_CFG=/etc/php/7.2/apache2/conf.d/20-xdebug.ini +XDEBUG_CFG=/etc/php/7.2/apache2/conf.d/20-xdebug.ini MARIA_DB_CFG=/etc/mysql/mariadb.conf.d/50-server.cnf export DEBIAN_FRONTEND=noninteractive @@ -89,7 +89,7 @@ do done echo -e "\n--- Configuring Xdebug for development ---\n" -sudo bash -c cat "<< EOF > $X_DEBUG_CFG +sudo bash -c cat "<< EOF > $XDEBUG_CFG zend_extension=xdebug.so xdebug.remote_enable=1 xdebug.remote_connect_back=1