Commit bc161484 authored by Paul Cammish's avatar Paul Cammish
Browse files

Merge branch 'buster-testing' into 'buster'

buster-testing -> buster

See merge request !210
parents a44a9427 15063d76
......@@ -54,8 +54,8 @@ sympl-monit:
<<: *package
sympl-mysql:
<<: *package
#sympl-phpmyadmin:
# <<: *package
sympl-phpmyadmin:
<<: *package
sympl-updater:
<<: *package
sympl-webmail:
......@@ -101,6 +101,7 @@ Clean Install:
script:
- chmod -x $( which gitlab-runner )
- echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
- autotest/enable_backports
- git describe --all
- apt-get -qq update; apt-get -qq -y upgrade
- cp -r repo/ /
......@@ -120,6 +121,33 @@ Clean Install:
- repo/*
expire_in: 1 hour
Clean Install (No Backports):
tags:
- vbox:buster
stage: Install
script:
- chmod -x $( which gitlab-runner )
- echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
- git describe --all
- apt-get -qq update; apt-get -qq -y upgrade
- cp -r repo/ /
- chmod -R 664 /repo ; chmod -R +X /repo
- echo "deb [trusted=yes] file:/repo local main" > /etc/apt/sources.list.d/local.list
- apt-get -qq update
- apt-get -y --allow-unauthenticated install --install-recommends sympl-core
- run-parts --verbose --exit-on-error autotest/test.d
- hostname
- dpkg -l 'sympl*'
variables:
CI_DEBUG_TRACE: "false"
allow_failure: false
when: delayed
start_in: 5 minutes
artifacts:
paths:
- repo/*
expire_in: 1 hour
Upgrade Testing:
tags:
- vbox:buster
......
# Relax PHP Restrictions
<Directory /usr/share/phpmyadmin >
php_admin_value open_basedir /usr/share/phpmyadmin:/usr/share/php:/etc/phpmyadmin
</Directory>
<IfModule rewrite_module>
# Force phpMyAdmin to use HTTPS.
RewriteCond "%{HTTPS}" "off"
RewriteCond "%{HTTP_HOST}" =""
RewriteRule "^/?(phpmyadmin.*)$" "https://<%= hostname %>/$1" [R=301,L]
RewriteCond "%{HTTPS}" "off"
RewriteRule "^/?(phpmyadmin.*)$" "https://%{HTTP_HOST}/$1" [R=301,L]
</IfModule rewrite_module>
CHANGELOG
---------
2020-09-15
sympl-phpmyadmin
* Package now available in Buster, using phpMyAdmin from Debian Backports
sympl-core
* Enabled Debian Backports repo for Buster to allow installation of phpMyAdmin
2020-09-09
sympl-web
* Adds support for optional Apache configs in config/apache.d/*.conf (#300)
......
......@@ -6,8 +6,9 @@ It provides:
* [Apache](https://www.apache.org/) web hosting.
* [Let's Encrypt](https://letsencrypt.org/) provided free certificates.
* [PHP](https://www.php.net/) 7.3.
* [PHP](https://www.php.net/) 7.0.
* [MariaDB](https://mariadb.org/) (MySQL) database server.
* [phpMyAdmin](https://www.phpmyadmin.net/) control panel for your databases.
* [Pure-FTPd](https://www.pureftpd.org/project/pure-ftpd/) FTP server.
* [SpamAssassin](https://spamassassin.apache.org/) spam filtering.
* [ClamAV](https://www.clamav.net/) email anti-virus.
......
#!/bin/bash
if [ "$(lsb_release -c -s)" == "buster" ]; then
if [ $( cat /etc/apt/sources.list /etc/apt/sources.list.d/*.list | sed 's|#.*||' | grep -c '^deb .* buster-backports' ) -lt 1 ]; then
echo -n 'Enabling Debian buster-backports repo for phpmyadmin...'
echo "deb http://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/enable_backports.list
echo ' ok'
fi
if [ ! -f /etc/apt/preferences.d/sympl-phpmyadmin ]; then
echo -n 'Enabling install of phpmyadmin from backports...'
echo -e "Package: phpmyadmin\nPin: release a=buster-backports\nPin-Priority: 900" > /etc/apt/preferences.d/sympl-phpmyadmin
echo -e "Package: php-twig\nPin: release a=buster-backports\nPin-Priority: 900" >> /etc/apt/preferences.d/sympl-phpmyadmin
echo ' ok'
fi
fi
apt-get -qq -y update
\ No newline at end of file
......@@ -66,15 +66,37 @@ echo "deb [trusted=yes] file:/repo local main" > /etc/apt/sources.list.d/local.l
apt-get -qq update
# Remove sympl-phpmyadmin from initial install
# TODO: Revert this once pushed to stable
grep -v sympl-phpmyadmin /tmp/from_repo > /tmp/from_repo_nosympl-phpmyadmin
echo ---------- Installing -----------
cat /tmp/from_repo | tr ' ' '\t'
cat /tmp/from_repo_nosympl-phpmyadmin | tr ' ' '\t'
echo ---------------------------------
apt-get -q -y install --allow-unauthenticated --install-recommends $( cat /tmp/from_repo | tr ' ' '=' | tr '\n' ' ' )
apt-get -q -y install --allow-unauthenticated --install-recommends $( cat /tmp/from_repo_nosympl-phpmyadmin | tr ' ' '=' | tr '\n' ' ' )
rm /etc/apt/sources.list.d/sympl_mythic-beasts.list
if [ "$(lsb_release -c -s)" == "buster" ]; then
if [ $( cat /etc/apt/sources.list /etc/apt/sources.list.d/*.list | sed 's|#.*||' | grep -c '^deb .* buster-backports' ) -lt 1 ]; then
echo -n 'Enabling Debian buster-backports repo for phpmyadmin...'
echo "deb http://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/enable_backports.list
echo ' ok'
fi
if [ ! -f /etc/apt/preferences.d/sympl-phpmyadmin ]; then
echo -n 'Enabling install of phpmyadmin from backports...'
echo -e "Package: phpmyadmin\nPin: release a=buster-backports\nPin-Priority: 900" > /etc/apt/preferences.d/sympl-phpmyadmin
echo -e "Package: php-twig\nPin: release a=buster-backports\nPin-Priority: 900" >> /etc/apt/preferences.d/sympl-phpmyadmin
echo ' ok'
fi
fi
apt-get -qq update
apt-get -q -y install phpmyadmin
echo ----------- Upgrading -----------
diff /tmp/from_repo /tmp/local_versions | grep '^> ' | sed -e 's|> ||' | tr ' ' '\t'
echo ---------------------------------
......
sympl-core (10.0.200915.0) stable; urgency=medium
* Added Debian Backports with configuration to enable phpmyadmin installation
-- Paul Cammish <sympl@kelduum.net> Tue, 15 Sep 2020 16:45:10 +0100
sympl-core (10.0.200909.0) stable; urgency=medium
* sympl-filesystem-security: don't overwite permission in public/cgi-bin (#299)
......
......@@ -202,6 +202,23 @@ fi
# Run sympl-filesystem-security to enforce permissions
sympl-filesystem-security
# Enable Buster Backports, and pin the needed packages for sympl-phpmysql
if [ "$(lsb_release -c -s)" == "buster" ]; then
if [ $( cat /etc/apt/sources.list /etc/apt/sources.list.d/*.list | sed 's|#.*||' | grep -c '^deb .* buster-backports' ) -lt 1 ]; then
echo -n 'Enabling Debian buster-backports repo for phpmyadmin...'
echo "deb http://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/enable_backports.list
echo ' ok'
fi
if [ ! -f /etc/apt/preferences.d/sympl-phpmyadmin ]; then
echo -n 'Enabling install of phpmyadmin from backports...'
echo -e "Package: phpmyadmin\nPin: release a=buster-backports\nPin-Priority: 900" > /etc/apt/preferences.d/sympl-phpmyadmin
echo -e "Package: php-twig\nPin: release a=buster-backports\nPin-Priority: 900" >> /etc/apt/preferences.d/sympl-phpmyadmin
echo ' ok'
fi
fi
apt-get -qq update
# Create htop defaults
if [ ! -f /home/sympl/.config/htop/htoprc ]; then
mkdir -p /home/sympl/.config/htop/
......
# Relax PHP Restrictions
<Directory /usr/share/phpmyadmin >
php_admin_value open_basedir /usr/share/phpmyadmin:/usr/share/php:/etc/phpmyadmin:/var/lib/phpmyadmin/tmp
</Directory>
<LocationMatch "^/phpmyadmin/">
# Enforce HTTPS for phpMyAdmin URLs
<IfModule rewrite_module>
# Enable rewrites
RewriteEngine On
# If HTTPS is not being used...
RewriteCond %{HTTPS} off
# ... and there is no HTTP_HOST being sent ...
RewriteCond "%{HTTP_HOST}" =""
# ... send the traffic to HTTPS on the SERVER_NAME
RewriteRule "(.*)$" https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
# If HTTPS is not being used...
RewriteCond %{HTTPS} off
# ... send the traffic to HTTPS on the HTTP_HOST
RewriteRule "(.*)$" https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
</LocationMatch>
sympl-phpmyadmin (10.0.200915.0) stable; urgency=medium
* Restored sympl-phpmyadmin in Buster via Debian Backports
-- Paul Cammish <sympl@kelduum.net> Tue, 15 Sep 2020 10:11:01 +0100
sympl-phpmyadmin (10.0.190621.0) stable; urgency=medium
* Created Sympl v10.0 (Debian Buster)
......
......@@ -8,7 +8,7 @@ Standards-Version: 3.9.6
Package: sympl-phpmyadmin
Architecture: all
Depends: phpmyadmin, sympl-mysql, ruby, ${misc:Depends}
Depends: sympl-core (>= 10.0.200915.0), phpmyadmin, sympl-mysql, ruby, ${misc:Depends}
Pre-Depends: sympl-mysql
Replaces: symbiosis-phpmyadmin
Provides: symbiosis-phpmyadmin
......@@ -17,5 +17,5 @@ Description: This package gives remote database access
This package will enable a global MySQL/MariaDB administrative
interface which may be used remotely.
.
Note: You will need to log in as a user with a password (an admin
user is automatically created as part of sympl-mysql), rather than root.
Note: You will need to log in as a user with a password (an admin user named
'sympl' is automatically created as part of sympl-mysql), rather than root.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment