]> Frank Brehm's Git Trees - config/sarah/etc.git/commitdiff
committing changes in /etc after apt run
authorFrank Brehm <frank@brehm-online.com>
Fri, 16 Sep 2016 09:48:31 +0000 (11:48 +0200)
committerFrank Brehm <frank@brehm-online.com>
Fri, 16 Sep 2016 09:48:31 +0000 (11:48 +0200)
Package changes:
+dbconfig-common 1.8.47+nmu3+deb8u1
+php-gettext 1.0.11-1
+phpmyadmin 4:4.2.12-2+deb8u2

13 files changed:
.etckeeper
apache2/conf-available/phpmyadmin.conf [new symlink]
dbconfig-common/config [new file with mode: 0644]
dbconfig-common/phpmyadmin.conf [new file with mode: 0644]
phpmyadmin/apache.conf [new file with mode: 0644]
phpmyadmin/config-db.php [new file with mode: 0644]
phpmyadmin/config.footer.inc.php [new file with mode: 0644]
phpmyadmin/config.header.inc.php [new file with mode: 0644]
phpmyadmin/config.inc.php [new file with mode: 0644]
phpmyadmin/htpasswd.setup [new file with mode: 0644]
phpmyadmin/lighttpd.conf [new file with mode: 0644]
phpmyadmin/phpmyadmin.desktop [new file with mode: 0644]
phpmyadmin/phpmyadmin.service [new file with mode: 0644]

index bd46b6e13f27c5406544c2bb01b1845272821855..2c5315c34cbcf772f0b20348a23e296348ba0005 100755 (executable)
@@ -34,6 +34,7 @@ mkdir -p './network/if-pre-up.d'
 mkdir -p './network/interfaces.d'
 mkdir -p './opt'
 mkdir -p './perl/CPAN'
+mkdir -p './phpmyadmin/conf.d'
 mkdir -p './postfix/sasl'
 mkdir -p './security/limits.d'
 mkdir -p './security/namespace.d'
@@ -78,6 +79,8 @@ maybe chmod 0644 'amavis/en_US/template-spam-sender.txt'
 maybe chmod 0644 'amavis/en_US/template-virus-admin.txt'
 maybe chmod 0644 'amavis/en_US/template-virus-recipient.txt'
 maybe chmod 0644 'amavis/en_US/template-virus-sender.txt'
+maybe chmod 0755 'apache2'
+maybe chmod 0755 'apache2/conf-available'
 maybe chmod 0755 'apm'
 maybe chmod 0755 'apm/event.d'
 maybe chmod 0755 'apm/event.d/01chrony'
@@ -213,6 +216,9 @@ maybe chmod 0644 'crontab'
 maybe chmod 0755 'cruft'
 maybe chmod 0755 'cruft/filters-unex'
 maybe chmod 0644 'cruft/filters-unex/etckeeper'
+maybe chmod 0755 'dbconfig-common'
+maybe chmod 0600 'dbconfig-common/config'
+maybe chmod 0600 'dbconfig-common/phpmyadmin.conf'
 maybe chmod 0755 'dbus-1'
 maybe chmod 0644 'dbus-1/session.conf'
 maybe chmod 0755 'dbus-1/session.d'
@@ -853,6 +859,19 @@ maybe chmod 0644 'php5/mods-available/mysqli.ini'
 maybe chmod 0644 'php5/mods-available/opcache.ini'
 maybe chmod 0644 'php5/mods-available/pdo.ini'
 maybe chmod 0644 'php5/mods-available/pdo_mysql.ini'
+maybe chmod 0755 'phpmyadmin'
+maybe chmod 0644 'phpmyadmin/apache.conf'
+maybe chmod 0755 'phpmyadmin/conf.d'
+maybe chgrp 'www-data' 'phpmyadmin/config-db.php'
+maybe chmod 0640 'phpmyadmin/config-db.php'
+maybe chmod 0644 'phpmyadmin/config.footer.inc.php'
+maybe chmod 0644 'phpmyadmin/config.header.inc.php'
+maybe chmod 0644 'phpmyadmin/config.inc.php'
+maybe chgrp 'www-data' 'phpmyadmin/htpasswd.setup'
+maybe chmod 0640 'phpmyadmin/htpasswd.setup'
+maybe chmod 0644 'phpmyadmin/lighttpd.conf'
+maybe chmod 0644 'phpmyadmin/phpmyadmin.desktop'
+maybe chmod 0644 'phpmyadmin/phpmyadmin.service'
 maybe chmod 0755 'postfix'
 maybe chmod 0644 'postfix/aliases'
 maybe chmod 0644 'postfix/aliases.db'
diff --git a/apache2/conf-available/phpmyadmin.conf b/apache2/conf-available/phpmyadmin.conf
new file mode 120000 (symlink)
index 0000000..93808ae
--- /dev/null
@@ -0,0 +1 @@
+../../phpmyadmin/apache.conf
\ No newline at end of file
diff --git a/dbconfig-common/config b/dbconfig-common/config
new file mode 100644 (file)
index 0000000..446478e
--- /dev/null
@@ -0,0 +1,11 @@
+# dbconfig-common system-wide configuration options
+
+# dbc_remember_admin_pass: should we cache administrative passwords?
+#      set to "true" to keep admin passwords cached in debconf
+dbc_remember_admin_pass='false'
+
+# dbc_remote_questions_default: will we be likely to install on remote servers?
+#      set to "true" to raise the priority of debconf questions related to
+#   database installation on remote servers (for database types that support this)
+dbc_remote_questions_default='false'
+
diff --git a/dbconfig-common/phpmyadmin.conf b/dbconfig-common/phpmyadmin.conf
new file mode 100644 (file)
index 0000000..c0785a7
--- /dev/null
@@ -0,0 +1,76 @@
+# automatically generated by the maintainer scripts of phpmyadmin
+# any changes you make will be preserved, though your comments
+# will be lost!  to change your settings you should edit this
+# file and then run "dpkg-reconfigure phpmyadmin"
+
+# dbc_install: configure database with dbconfig-common?
+#              set to anything but "true" to opt out of assistance
+dbc_install='true'
+
+# dbc_upgrade: upgrade database with dbconfig-common?
+#              set to anything but "true" to opt out of assistance
+dbc_upgrade='true'
+
+# dbc_remove: deconfigure database with dbconfig-common?
+#             set to anything but "true" to opt out of assistance
+dbc_remove=''
+
+# dbc_dbtype: type of underlying database to use
+#      this exists primarily to let dbconfig-common know what database
+#      type to use when a package supports multiple database types.  
+#      don't change this value unless you know for certain that this
+#      package supports multiple database types
+dbc_dbtype='mysql'
+
+# dbc_dbuser: database user
+#      the name of the user who we will use to connect to the database.
+dbc_dbuser='phpmyadmin'
+
+# dbc_dbpass: database user password
+#      the password to use with the above username when connecting
+#      to a database, if one is required
+dbc_dbpass='Ash6wuphec8O'
+
+# dbc_dbserver: database host.  
+#      leave unset to use localhost (or a more efficient local method
+#      if it exists).
+dbc_dbserver=''
+
+# dbc_dbport: remote database port
+#      leave unset to use the default.  only applicable if you are
+#      using a remote database.
+dbc_dbport=''
+
+# dbc_dbname: name of database
+#      this is the name of your application's database.
+dbc_dbname='phpmyadmin'
+
+# dbc_dbadmin: name of the administrative user
+#      this is the administrative user that is used to create all of the above
+dbc_dbadmin='root'
+
+# dbc_basepath: base directory to hold database files
+#      leave unset to use the default.  only applicable if you are
+#      using a local (filesystem based) database.    
+dbc_basepath=''
+
+##
+## postgresql specific settings.  if you don't use postgresql,
+## you can safely ignore all of these
+##
+
+# dbc_ssl: should we require ssl?
+#      set to "true" to require that connections use ssl
+dbc_ssl=''
+
+# dbc_authmethod_admin: authentication method for admin
+# dbc_authmethod_user: authentication method for dbuser
+#      see the section titled "AUTHENTICATION METHODS" in
+#      /usr/share/doc/dbconfig-common/README.pgsql for more info
+dbc_authmethod_admin=''
+dbc_authmethod_user=''
+
+##
+## end postgresql specific settings
+##
+
diff --git a/phpmyadmin/apache.conf b/phpmyadmin/apache.conf
new file mode 100644 (file)
index 0000000..3bcc4fb
--- /dev/null
@@ -0,0 +1,47 @@
+# phpMyAdmin default Apache configuration
+
+Alias /phpmyadmin /usr/share/phpmyadmin
+
+<Directory /usr/share/phpmyadmin>
+    Options FollowSymLinks
+    DirectoryIndex index.php
+
+    <IfModule mod_php5.c>
+        <IfModule mod_mime.c>
+            AddType application/x-httpd-php .php
+        </IfModule>
+        <FilesMatch ".+\.php$">
+            SetHandler application/x-httpd-php
+        </FilesMatch>
+
+        php_flag magic_quotes_gpc Off
+        php_flag track_vars On
+        php_flag register_globals Off
+        php_admin_flag allow_url_fopen Off
+        php_value include_path .
+        php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
+        php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/
+    </IfModule>
+
+</Directory>
+
+# Authorize for setup
+<Directory /usr/share/phpmyadmin/setup>
+    <IfModule mod_authz_core.c>
+        <IfModule mod_authn_file.c>
+            AuthType Basic
+            AuthName "phpMyAdmin Setup"
+            AuthUserFile /etc/phpmyadmin/htpasswd.setup
+        </IfModule>
+        Require valid-user
+    </IfModule>
+</Directory>
+
+# Disallow web access to directories that don't need it
+<Directory /usr/share/phpmyadmin/libraries>
+    Require all denied
+</Directory>
+<Directory /usr/share/phpmyadmin/setup/lib>
+    Require all denied
+</Directory>
+
diff --git a/phpmyadmin/config-db.php b/phpmyadmin/config-db.php
new file mode 100644 (file)
index 0000000..fc05284
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+##
+## database access settings in php format
+## automatically generated from /etc/dbconfig-common/phpmyadmin.conf
+## by /usr/sbin/dbconfig-generate-include
+## Fri, 16 Sep 2016 11:48:30 +0200
+##
+## by default this file is managed via ucf, so you shouldn't have to
+## worry about manual changes being silently discarded.  *however*,
+## you'll probably also want to edit the configuration file mentioned
+## above too.
+##
+$dbuser='phpmyadmin';
+$dbpass='Ash6wuphec8O';
+$basepath='';
+$dbname='phpmyadmin';
+$dbserver='';
+$dbport='';
+$dbtype='mysql';
diff --git a/phpmyadmin/config.footer.inc.php b/phpmyadmin/config.footer.inc.php
new file mode 100644 (file)
index 0000000..3613c2f
--- /dev/null
@@ -0,0 +1,8 @@
+<?php
+/**
+ * Debian local configuration file
+ *
+ * In this file you may add PHP or HTML statements that will be used to define
+ * the footer for phpMyAdmin pages.
+ */
+
diff --git a/phpmyadmin/config.header.inc.php b/phpmyadmin/config.header.inc.php
new file mode 100644 (file)
index 0000000..d5d3ace
--- /dev/null
@@ -0,0 +1,8 @@
+<?php
+/**
+ * Debian local configuration file
+ *
+ * In this file you may add PHP or HTML statements that will be used to define
+ * the header for phpMyAdmin pages.
+ */
+
diff --git a/phpmyadmin/config.inc.php b/phpmyadmin/config.inc.php
new file mode 100644 (file)
index 0000000..b3bbc40
--- /dev/null
@@ -0,0 +1,158 @@
+<?php
+/**
+ * Debian local configuration file
+ *
+ * This file overrides the settings made by phpMyAdmin interactive setup
+ * utility.
+ *
+ * For example configuration see
+ *   /usr/share/doc/phpmyadmin/examples/config.sample.inc.php
+ * or
+ *   /usr/share/doc/phpmyadmin/examples/config.manyhosts.inc.php
+ *
+ * NOTE: do not add security sensitive data to this file (like passwords)
+ * unless you really know what you're doing. If you do, any user that can
+ * run PHP or CGI on your webserver will be able to read them. If you still
+ * want to do this, make sure to properly secure the access to this file
+ * (also on the filesystem level).
+ */
+
+if (!function_exists('check_file_access')) {
+    function check_file_access($path)
+    {
+        if (is_readable($path)) {
+            return true;
+        } else {
+            error_log(
+                'phpmyadmin: Failed to load ' . $path
+                . ' Check group www-data has read access and open_basedir restrictions.'
+            );
+            return false;
+        }
+    }
+}
+
+// Load secret generated on postinst
+if (check_file_access('/var/lib/phpmyadmin/blowfish_secret.inc.php')) {
+    require('/var/lib/phpmyadmin/blowfish_secret.inc.php');
+}
+
+// Load autoconf local config
+if (check_file_access('/var/lib/phpmyadmin/config.inc.php')) {
+    require('/var/lib/phpmyadmin/config.inc.php');
+}
+
+/**
+ * Server(s) configuration
+ */
+$i = 0;
+// The $cfg['Servers'] array starts with $cfg['Servers'][1].  Do not use $cfg['Servers'][0].
+// You can disable a server config entry by setting host to ''.
+$i++;
+
+/**
+ * Read configuration from dbconfig-common
+ * You can regenerate it using: dpkg-reconfigure -plow phpmyadmin
+ */
+if (check_file_access('/etc/phpmyadmin/config-db.php')) {
+    require('/etc/phpmyadmin/config-db.php');
+}
+
+/* Configure according to dbconfig-common if enabled */
+if (!empty($dbname)) {
+    /* Authentication type */
+    $cfg['Servers'][$i]['auth_type'] = 'cookie';
+    /* Server parameters */
+    if (empty($dbserver)) $dbserver = 'localhost';
+    $cfg['Servers'][$i]['host'] = $dbserver;
+
+    if (!empty($dbport) || $dbserver != 'localhost') {
+        $cfg['Servers'][$i]['connect_type'] = 'tcp';
+        $cfg['Servers'][$i]['port'] = $dbport;
+    }
+    //$cfg['Servers'][$i]['compress'] = false;
+    /* Select mysqli if your server has it */
+    $cfg['Servers'][$i]['extension'] = 'mysqli';
+    /* Optional: User for advanced features */
+    $cfg['Servers'][$i]['controluser'] = $dbuser;
+    $cfg['Servers'][$i]['controlpass'] = $dbpass;
+    /* Optional: Advanced phpMyAdmin features */
+    $cfg['Servers'][$i]['pmadb'] = $dbname;
+    $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
+    $cfg['Servers'][$i]['relation'] = 'pma__relation';
+    $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
+    $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
+    $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
+    $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
+    $cfg['Servers'][$i]['history'] = 'pma__history';
+    $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
+    $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
+    $cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
+    $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
+    $cfg['Servers'][$i]['recent'] = 'pma__recent';
+    $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
+    $cfg['Servers'][$i]['users'] = 'pma__users';
+    $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
+    $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
+    $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
+
+    /* Uncomment the following to enable logging in to passwordless accounts,
+     * after taking note of the associated security risks. */
+    // $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
+
+    /* Advance to next server for rest of config */
+    $i++;
+}
+
+/* Authentication type */
+//$cfg['Servers'][$i]['auth_type'] = 'cookie';
+/* Server parameters */
+//$cfg['Servers'][$i]['host'] = 'localhost';
+//$cfg['Servers'][$i]['connect_type'] = 'tcp';
+//$cfg['Servers'][$i]['compress'] = false;
+/* Select mysqli if your server has it */
+//$cfg['Servers'][$i]['extension'] = 'mysql';
+/* Optional: User for advanced features */
+// $cfg['Servers'][$i]['controluser'] = 'pma';
+// $cfg['Servers'][$i]['controlpass'] = 'pmapass';
+
+/* Storage database and tables */
+// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
+// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
+// $cfg['Servers'][$i]['relation'] = 'pma__relation';
+// $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
+// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
+// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
+// $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
+// $cfg['Servers'][$i]['history'] = 'pma__history';
+// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
+// $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
+// $cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
+// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
+// $cfg['Servers'][$i]['recent'] = 'pma__recent';
+// $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
+// $cfg['Servers'][$i]['users'] = 'pma__users';
+// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
+// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
+// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
+/* Uncomment the following to enable logging in to passwordless accounts,
+ * after taking note of the associated security risks. */
+// $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
+
+/*
+ * End of servers configuration
+ */
+
+/*
+ * Directories for saving/loading files from server
+ */
+$cfg['UploadDir'] = '';
+$cfg['SaveDir'] = '';
+
+/* Support additional configurations */
+foreach (glob('/etc/phpmyadmin/conf.d/*.php') as $filename)
+{
+    include($filename);
+}
+
+
diff --git a/phpmyadmin/htpasswd.setup b/phpmyadmin/htpasswd.setup
new file mode 100644 (file)
index 0000000..01c4abd
--- /dev/null
@@ -0,0 +1 @@
+admin:*
diff --git a/phpmyadmin/lighttpd.conf b/phpmyadmin/lighttpd.conf
new file mode 100644 (file)
index 0000000..deb852f
--- /dev/null
@@ -0,0 +1,27 @@
+# Alias for phpMyAdmin directory
+alias.url += ( 
+       "/phpmyadmin" => "/usr/share/phpmyadmin",
+)
+
+# Disallow access to libraries
+$HTTP["url"] =~ "^/phpmyadmin/libraries" { 
+    url.access-deny = ( "" ) 
+}
+$HTTP["url"] =~ "^/phpmyadmin/setup/lib" { 
+    url.access-deny = ( "" ) 
+}
+
+# Limit access to setup script
+$HTTP["url"] =~ "^/phpmyadmin/setup" {
+       auth.backend = "htpasswd"
+       auth.backend.htpasswd.userfile = "/etc/phpmyadmin/htpasswd.setup"
+       auth.require = (
+               "/" => (
+                       "method" => "basic",
+                       "realm" => "phpMyAdmin Setup",
+                       "require" => "valid-user"
+               )
+       )
+}
+
+
diff --git a/phpmyadmin/phpmyadmin.desktop b/phpmyadmin/phpmyadmin.desktop
new file mode 100644 (file)
index 0000000..f9f71e3
--- /dev/null
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=phpMyAdmin
+Comment=MySQL management over web
+Exec=sensible-browser http://localhost/phpmyadmin/
+Terminal=false
+Type=Application
+Icon=phpmyadmin
+Categories=Development;Database;
diff --git a/phpmyadmin/phpmyadmin.service b/phpmyadmin/phpmyadmin.service
new file mode 100644 (file)
index 0000000..077c926
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" standalone='no'?>
+<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
+<service-group>
+ <name replace-wildcards="yes">phpMyAdmin on %h</name>
+  <service>
+   <type>_http._tcp</type>
+   <port>80</port>
+   <txt-record>path=/phpmyadmin/</txt-record>
+  </service>
+</service-group>