summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames An2015-08-08 12:44:31 -0400
committerJames An2015-08-08 12:45:06 -0400
commit36fb191227e41d766d735c06a360ec886efa6d4b (patch)
treeacde7514d57a1fcdcb4e393b3e86318d191669c6
parent25308412674311161996c11361370db1fbc85670 (diff)
downloadaur-36fb191227e41d766d735c06a360ec886efa6d4b.tar.gz
Changed the aegir root to be inside the /usr/share/webapps folder, changed the Aegir user to share UID with the HTTP user, and set up Aegir setup process to only require a couple of shell commands.
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD9
-rw-r--r--aegir.install6
-rw-r--r--php.ini13
-rw-r--r--sudoers3
5 files changed, 16 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4892f95a09c..ad57478291c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = aegir
pkgdesc = Configuration for a dedicated Aegir server to host Drupal sites.
pkgver = 7.x_3.0
- pkgrel = 2
+ pkgrel = 3
url = http://aegirproject.org
install = aegir.install
arch = any
@@ -27,7 +27,6 @@ pkgbase = aegir
source = nginx.systemd.conf
source = php-fpm.conf
source = php-fpm.systemd.conf
- source = php.ini
source = sudoers
md5sums = b0f2e5dca01b32c967cd823dab6b8779
md5sums = 95bce00a6c0ac2a0b51642449554105b
@@ -36,8 +35,7 @@ pkgbase = aegir
md5sums = 75535f9870f06c540f513262a9b7b1ab
md5sums = 496b1fa2533d1306318115e2b02984bd
md5sums = f9ae0c781a7ccefc63329daaf81fca36
- md5sums = c67b0758fde1d0fa45344c2c4222f50b
- md5sums = abef83520df5c7ee6a98884db5e741de
+ md5sums = 0dab31966eada66adb159355ed814a54
pkgname = aegir
diff --git a/PKGBUILD b/PKGBUILD
index edeedf8bd36..061e2861573 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=aegir
pkgver=7.x_3.0
-pkgrel=2
+pkgrel=3
pkgdesc="Configuration for a dedicated Aegir server to host Drupal sites."
arch=('any')
url='http://aegirproject.org'
@@ -33,7 +33,6 @@ source=("$pkgname.service"
'nginx.systemd.conf'
'php-fpm.conf'
'php-fpm.systemd.conf'
- 'php.ini'
'sudoers'
)
md5sums=('b0f2e5dca01b32c967cd823dab6b8779'
@@ -43,8 +42,7 @@ md5sums=('b0f2e5dca01b32c967cd823dab6b8779'
'75535f9870f06c540f513262a9b7b1ab'
'496b1fa2533d1306318115e2b02984bd'
'f9ae0c781a7ccefc63329daaf81fca36'
- 'c67b0758fde1d0fa45344c2c4222f50b'
- 'abef83520df5c7ee6a98884db5e741de')
+ '0dab31966eada66adb159355ed814a54')
#~ pkgver() {
#~ echo \
@@ -59,7 +57,6 @@ package() {
install -Dm644 msmtprc "$pkgdir/etc/msmtprc.$pkgname"
install -Dm644 nginx.conf "$pkgdir/etc/nginx/$pkgname.conf"
install -Dm644 php-fpm.conf "$pkgdir/etc/php/fpm.d/$pkgname.conf"
- install -Dm644 php.ini "$pkgdir/etc/php/conf.d/$pkgname.ini"
install -Dm400 sudoers "$pkgdir/etc/sudoers.d/$pkgname"
install -Dm644 --owner=http --group=http <( ) "$pkgdir/var/spool/cron/$pkgname"
@@ -70,7 +67,7 @@ package() {
install -Dm644 php-fpm.systemd.conf "$pkgdir/usr/lib/systemd/system/php-fpm.service.d/aegir.conf"
msg2 'Creating $pkgname directory structure'
- mkdir -p "$pkgdir/etc/drush" "$pkgdir/usr/share/webapps/$pkgname"
+ install --directory --owner=http --group=http --mode=6775 "$pkgdir/etc/drush" "$pkgdir/usr/share/webapps/$pkgname"
ln -s /etc/drush "$pkgdir/usr/share/webapps/$pkgname/.drush"
umask 077
mkdir -p "$pkgdir/usr/share/webapps/$pkgname/"{backups,clients/admin,config/{includes,self,server_master/nginx/{platform,post,pre,subdir,platform,vhost}.d}}
diff --git a/aegir.install b/aegir.install
index 71ffeb978c0..9b238f9890e 100644
--- a/aegir.install
+++ b/aegir.install
@@ -4,6 +4,10 @@ post_install() {
echo "User already exists; no action taken."
} || {
useradd --gid $(id --group http) --home-dir /usr/share/webapps/aegir --non-unique --uid $(id --user http) aegir
+ # Replace /etc/passwd with itself having the Aegir user rearranged above the HTTP user.
+ tempfile=$(mktemp)
+ cat <(sed -n '1,/^http/p' /etc/passwd | head -n-1) <(getent passwd aegir) <(sed -n '/^http/,$p' /etc/passwd | head -n-1) >| $tempfile
+ install -m644 $tempfile /etc/passwd
echo "Done."
}
@@ -56,4 +60,6 @@ post_upgrade() {
pre_remove() {
[ $(systemctl --system is-enabled aegir.target) = enabled ] && systemctl --system disable --now aegir.target
[ $(systemctl --system is-active aegir.target) = enabled ] && systemctl --system stop --now aegir.target
+ [ $(getent passwd aegir &>/dev/null; echo $?) -eq 0 ] && userdel aegir
+ echo ">>> There are still files related to Aegir at: /usr/share/webapps/aegir."
}
diff --git a/php.ini b/php.ini
index 01019758195..dbc3a385574 100644
--- a/php.ini
+++ b/php.ini
@@ -1,13 +1,4 @@
-extension = gd.so
-extension = mysqli.so
-extension = pdo_mysql.so
-mbstring.http_input = pass
-mbstring.http_output = pass
+; Drupal requirements.
date.timezone = UTC
-open_basedir =
-
-; Recommended settings
+open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/etc/drush/
memory_limit = 192M
-display_errors = stderr
-error_reporting = E_ALL | E_NOTICE | E_STRICT
-
diff --git a/sudoers b/sudoers
index 78a76739b9d..417e8bb8bad 100644
--- a/sudoers
+++ b/sudoers
@@ -1,3 +1,6 @@
Defaults:aegir !requiretty
aegir ALL=NOPASSWD: /usr/bin/systemctl reload-or-try-restart nginx.service
aegir ALL=NOPASSWD: /usr/bin/nginx
+Defaults:http !requiretty
+http ALL=NOPASSWD: /usr/bin/systemctl reload-or-try-restart nginx.service
+http ALL=NOPASSWD: /usr/bin/nginx