[med-svn] [openemr] 02/03: Hard coding of globals.conf to make web work.
Ian Wallace
iankarlwallace-guest at moszumanska.debian.org
Tue Jun 17 03:47:13 UTC 2014
This is an automated email from the git hooks/post-receive script.
iankarlwallace-guest pushed a commit to branch master
in repository openemr.
commit 23f37d4e16d27a3a0e662db2f4b32bf3a4178541
Author: Ian Wallace <iankarlwallace at gmail.com>
Date: Sun Jun 15 22:21:53 2014 -0700
Hard coding of globals.conf to make web work.
---
debian/apache.conf | 15 +++++++------
debian/patches/globals_conf_hardcoded.diff | 19 +++++++++++++++++
debian/patches/series | 1 +
debian/postinst | 14 ++++++------
debian/preinst | 12 ++++++-----
debian/prerm | 2 +-
debian/rules | 34 +++++++++++++++++++++++++++++-
7 files changed, 78 insertions(+), 19 deletions(-)
diff --git a/debian/apache.conf b/debian/apache.conf
index 596917d..b8bc14b 100644
--- a/debian/apache.conf
+++ b/debian/apache.conf
@@ -12,14 +12,17 @@ Alias /openemr /usr/share/openemr
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
-
- php_flag magic_quotes_gpc Off
- php_flag track_vars On
+ php_flag short_open_tag On
+ php_flag display_errors Off
php_flag register_globals Off
- php_admin_flag allow_url_fopen Off
- php_value include_path .
+ php_flag file_uploads On
+ php_value max_execution_time 60
+ php_value max_input_time 90
+ php_value post_max_size 30M
+ php_value memory_limit 128M
php_value post_max_size 32M
- php_value upload_max_filesize 16M
+ php_value include_path ".:/usr/share/openemr:/usr/share/php5:/usr/share/php"
+ php_admin_value upload_max_filesize 16M
php_admin_value upload_tmp_dir /var/lib/openemr/tmp
php_admin_value open_basedir /usr/share/openemr/:/etc/openemr/:/var/lib/openemr/
</IfModule>
diff --git a/debian/patches/globals_conf_hardcoded.diff b/debian/patches/globals_conf_hardcoded.diff
new file mode 100644
index 0000000..ec28ecd
--- /dev/null
+++ b/debian/patches/globals_conf_hardcoded.diff
@@ -0,0 +1,19 @@
+Description: Hard code globals.php for webserverroot and webroot
+Author: Ian Wallace <iankarlwallace at gmail.com>
+Origin: upstream
+Last-Update: 2014-06-14
+--- a/interface/globals.php
++++ b/interface/globals.php
+@@ -70,8 +70,10 @@ if (preg_match("/^[^\/]/",$web_root)) {
+ // The webserver_root and web_root are now automatically collected in
+ // real time per above code. If above is not working, can uncomment and
+ // set manually here:
+-// $webserver_root = "/var/www/openemr";
+-// $web_root = "/openemr";
++// TODO: FIX THE AUTO DETECTION RULES ABOVE FOR DEBIAN PACKAGE
++// Debian Package sets b/c the auto method doesn't work correctly -- will need a permanent fix
++$webserver_root = "/usr/share/openemr";
++$web_root = "/openemr";
+ //
+
+ // This is the directory that contains site-specific data. Change this
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..76306ce
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+globals_conf_hardcoded.diff
diff --git a/debian/postinst b/debian/postinst
index 314cea4..97749f6 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -68,7 +68,7 @@ case "$1" in
LOG=$LOGDIR/install
CONFIGDIR=/etc/openemr
CONFIG=$CONFIGDIR/openemr.conf
- TMPDIR=/tmp/openemr-tmp
+ TMPDIR=`mktemp -d`
WEB=/usr/share/
OPENEMR=$WEB/openemr
SITEDIR=$OPENEMR/sites
@@ -202,14 +202,16 @@ case "$1" in
php -f $OPENEMR/TEMPsql_upgrade.php >> $LOG 2>&1
rm -f $OPENEMR/TEMPsql_upgrade.php
+
+## WARNING THIS HAS BEEN REMOVED AND WILL NEED TO BE REWORKED FOR DEBIAN. Unsecure HANDLING OF tmp dirs.
#copy the old config file into new with the OLD at end to allow manual configuration of old
# optional settings.
- if [ -d "$TMPDIR/openemr_web_$OLD_VERSION/sites/$SITENAME" ]; then
- cp -f "$TMPDIR/openemr_web_$OLD_VERSION/sites/$SITENAME/config.php" "$SITEDIR/$SITENAME/config.php.OLD"
- else
+# if [ -d "$TMPDIR/openemr_web_$OLD_VERSION/sites/$SITENAME" ]; then
+# cp -f "$TMPDIR/openemr_web_$OLD_VERSION/sites/$SITENAME/config.php" "$SITEDIR/$SITENAME/config.php.OLD"
+# else
#need to move from old location, so sitename will always be default in this case
- cp -f $TMPDIR/openemr_web_$OLD_VERSION/includes/config.php $SITEDIR/default/config.php.OLD
- fi
+# cp -f $TMPDIR/openemr_web_$OLD_VERSION/includes/config.php $SITEDIR/default/config.php.OLD
+# fi
#log
log_only "Upgraded OpenEMR site ($SITENAME) with sql database ($SQLDATABASE) and sql user ($SQLUSER)."
diff --git a/debian/preinst b/debian/preinst
index 82f940c..4523839 100644
--- a/debian/preinst
+++ b/debian/preinst
@@ -46,7 +46,7 @@ LOGDIR=/var/log/openemr
LOG=$LOGDIR/install
CONFIGDIR=/etc/openemr
CONFIG=$CONFIGDIR/openemr.conf
-TMPDIR=/tmp/openemr-tmp
+TMPDIR=`mktemp -d openemr-tmp-XXX`
WEB=/var/www
OPENEMR=$WEB/openemr
SITEDIR=$OPENEMR/sites
@@ -168,10 +168,11 @@ upgrade_prepare_database () {
TEMP_SETTING=$TEMP_SETTING$SITE_NAME"_sqlutfflag=$SQL_UTFFLAG\n"
#create the tmp sql directory
- mkdir -p "$TMPDIR/openemr_mysql_${OLD_VERSION}_${SITE_NAME}"
+ MYSQLTMPDIR=`mktemp --tmpdir $TMPDIR openemr_mysql_${OLD_VERSION}_${SITE_NAME}`
+ #mkdir -p "$TMPDIR/openemr_mysql_${OLD_VERSION}_${SITE_NAME}"
#backup mysql database to tmp
- mysqldump -u "$SQL_USER" -h "$SQL_LOCATION" --password="$SQL_PASSWORD" "$SQL_DATABASE" > "$TMPDIR/openemr_mysql_${OLD_VERSION}_${SITE_NAME}/openemr_mysql_${OLD_VERSION}_${SITE_NAME}.sql"
+ mysqldump -u "$SQL_USER" -h "$SQL_LOCATION" --password="$SQL_PASSWORD" "$SQL_DATABASE" > "$MYSQLTMPDIR/openemr_mysql_${OLD_VERSION}_${SITE_NAME}.sql"
#return the settings (to be used for the config file passed to postinst
echo $TEMP_SETTING
@@ -268,10 +269,11 @@ previous_version=$OLD_VERSION\n"
fi
#create the tmp web directory
- mkdir -p $TMPDIR/openemr_web_$OLD_VERSION
+ WEBTMPDIR=`mktemp --tmpdir $TMPDIR openemr_web_$OLD_VERSION`
+ #mkdir -p $TMPDIR/openemr_web_$OLD_VERSION
#backup web directory to tmp
- cp -fr $OPENEMR/* $TMPDIR/openemr_web_$OLD_VERSION/
+ cp -fr $OPENEMR/* $WEBTMPDIR
#clear the temporary openemr cache directories (no need to keep these during upgrade)
rm -fr $OPENEMR/interface/main/calendar/modules/PostCalendar/pntemplates/compiled/*
diff --git a/debian/prerm b/debian/prerm
index 1ec4f5a..ca0f308 100644
--- a/debian/prerm
+++ b/debian/prerm
@@ -44,7 +44,7 @@ case "$1" in
LOG=$LOGDIR/install
CONFIGDIR=/etc/openemr
CONFIG=$CONFIGDIR/openemr.conf
- TMPDIR=/tmp/openemr-tmp
+ TMPDIR=`mktemp -d`
WEB=/var/www
OPENEMR=$WEB/openemr
SITEDIR=$OPENEMR/sites
diff --git a/debian/rules b/debian/rules
index 4dfa51e..01f014e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,18 +19,50 @@ DH_OPTIONS := -v
dh $@
override_dh_link:
- # Originally these were placed so the empty templates_c dir wouldn't be pruned but we create a link for it to /var/lib/openemr/gacl ...
+ # Remove the directories that we will symlink into /var/lib
rm debian/openemr/usr/share/openemr/gacl/admin/templates_c/README
rmdir debian/openemr/usr/share/openemr/gacl/admin/templates_c
rm debian/openemr/usr/share/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache/README
rmdir debian/openemr/usr/share/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache
rm debian/openemr/usr/share/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled/README
rmdir debian/openemr/usr/share/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled
+ # Run the default target
dh_link
override_dh_fixperms:
+ # Find all files that are executable and remove the executable bit
find debian/openemr/usr/share/openemr/ccr -type f -perm /a+x | xargs -I{} chmod a-x "{}"
find debian/openemr/usr/share/openemr/images -type f -perm /a+x | xargs -I{} chmod a-x "{}"
find debian/openemr/usr/share/openemr/interface -type f -perm /a+x | xargs -I{} chmod a-x "{}"
find debian/openemr/usr/share/openemr/library -type f -perm /a+x | xargs -I{} chmod a-x "{}"
+ # Some straggles
+ chmod a-x debian/openemr/usr/share/openemr/CategoryTreeMenu.js
+ chmod a-x debian/openemr/usr/share/openemr/DocumentTreeMenu.js
+ chmod a-x debian/openemr/usr/share/openemr/contrib/util/express.php
+ # These scripts actually need executable bit set
+ chmod a+x debian/openemr/usr/share/openemr/accounting/ws_server_28.pl
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/backup_oemr.sh
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/installScripts/cvsDemoInstall
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/installScripts/cvsDemoMisc/StartupDeveloperAppliance2
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/installScripts/cvsDemoMisc/refresh
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/language_translations/buildLanguageDatabase.pl
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/language_translations/collectConstants.pl
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/language_translations/combineConstantsSpreadsheet.pl
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/language_translations/sortCleanList.pl
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/ubuntu_package_scripts/development/config
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/ubuntu_package_scripts/development/postinst
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/ubuntu_package_scripts/development/postrm
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/ubuntu_package_scripts/development/preinst
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/ubuntu_package_scripts/development/prerm
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/ubuntu_package_scripts/production/config
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/ubuntu_package_scripts/production/postinst
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/ubuntu_package_scripts/production/postrm
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/ubuntu_package_scripts/production/preinst
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/ubuntu_package_scripts/production/prerm
+ chmod a+x debian/openemr/usr/share/openemr/contrib/util/undelete_from_log/convert_logcomments.pl
+ chmod a+x debian/openemr/usr/share/openemr/gacl/soap/clients/perl_client.pl
+ chmod a+x debian/openemr/usr/share/openemr/interface/de_identification_forms/de_identification_procedure.sh
+ chmod a+x debian/openemr/usr/share/openemr/interface/de_identification_forms/re_identification_procedure.sh
+ chmod a+x debian/openemr/usr/share/openemr/library/adldap/adLDAP_sync.sh
+ # Run the default target
dh_fixperms
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/openemr.git
More information about the debian-med-commit
mailing list