Start to uniformize default debian package with current official
package on work.
This commit is contained in:
parent
b7cada9a99
commit
80e04e967c
@ -127,3 +127,8 @@ http://packages.qa.debian.org/t/tcpdf.html
|
|||||||
|
|
||||||
* Package will be into release when test will be moved as stable.
|
* Package will be into release when test will be moved as stable.
|
||||||
|
|
||||||
|
|
||||||
|
To update dolibarr debian package
|
||||||
|
|
||||||
|
* You can git clone debian git repo
|
||||||
|
git.debian.org:/git/collab-maint/dolibarr.git
|
||||||
@ -1,75 +0,0 @@
|
|||||||
# Apache config file for Dolibarr
|
|
||||||
|
|
||||||
<IfModule mod_alias.c>
|
|
||||||
Alias /dolibarr /usr/share/dolibarr/htdocs
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
# You can also use dolibarr as a VirtualHost
|
|
||||||
# <VirtualHost *:*>
|
|
||||||
# ServerName mydolibarrhostname.com
|
|
||||||
# ServerAdmin root@example.com
|
|
||||||
# DocumentRoot /usr/share/dolibarr/
|
|
||||||
# ErrorLog logs/ldap.example.com-error.log
|
|
||||||
# CustomLog logs/ldap.example.com-access.log common
|
|
||||||
# </VirtualHost>
|
|
||||||
|
|
||||||
# Directory for web pages
|
|
||||||
<DirectoryMatch /usr/share/dolibarr>
|
|
||||||
Order deny,allow
|
|
||||||
Allow from all
|
|
||||||
DirectoryIndex index.php
|
|
||||||
Options +FollowSymLinks +Indexes
|
|
||||||
|
|
||||||
ErrorDocument 401 /public/error-401.php
|
|
||||||
ErrorDocument 404 /public/error-404.php
|
|
||||||
|
|
||||||
<IfModule mod_php4.c>
|
|
||||||
php_flag magic_quotes_gpc Off
|
|
||||||
php_flag register_globals Off
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
<IfModule mod_php5.c>
|
|
||||||
php_flag magic_quotes_gpc Off
|
|
||||||
php_flag register_globals Off
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
|
|
||||||
# OPTIMIZE: To use cache on static pages (A259200 = 1 month).
|
|
||||||
# Note that you must also enable the module mod_expires.
|
|
||||||
#ExpiresActive On
|
|
||||||
#ExpiresByType image/x-icon A2592000
|
|
||||||
#ExpiresByType image/gif A2592000
|
|
||||||
#ExpiresByType image/png A2592000
|
|
||||||
#ExpiresByType image/jpeg A2592000
|
|
||||||
#ExpiresByType text/css A2592000
|
|
||||||
#ExpiresByType text/javascript A2592000
|
|
||||||
#ExpiresByType application/x-javascript A2592000
|
|
||||||
#ExpiresByType application/javascript A2592000
|
|
||||||
|
|
||||||
</DirectoryMatch>
|
|
||||||
|
|
||||||
# Directory for public pages
|
|
||||||
<DirectoryMatch /usr/share/dolibarr/htdocs/public>
|
|
||||||
AllowOverride All
|
|
||||||
Order deny,allow
|
|
||||||
Allow from all
|
|
||||||
</DirectoryMatch>
|
|
||||||
|
|
||||||
# Config files
|
|
||||||
<DirectoryMatch /etc/dolibarr>
|
|
||||||
AllowOverride All
|
|
||||||
Order deny,allow
|
|
||||||
Allow from all
|
|
||||||
</DirectoryMatch>
|
|
||||||
|
|
||||||
# Directory for data files
|
|
||||||
<DirectoryMatch /usr/share/dolibarr/documents>
|
|
||||||
AllowOverride All
|
|
||||||
Order deny,allow
|
|
||||||
Allow from all
|
|
||||||
</DirectoryMatch>
|
|
||||||
<DirectoryMatch /var/lib/dolibarr/documents>
|
|
||||||
AllowOverride All
|
|
||||||
Order deny,allow
|
|
||||||
Allow from all
|
|
||||||
</DirectoryMatch>
|
|
||||||
7
build/debian/apache/.htaccess
Normal file
7
build/debian/apache/.htaccess
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<IfVersion >= 2.3>
|
||||||
|
Require all denied
|
||||||
|
</IfVersion>
|
||||||
|
<IfVersion < 2.3>
|
||||||
|
Order deny,allow
|
||||||
|
Deny from all
|
||||||
|
</IfVersion>
|
||||||
42
build/debian/apache/dolibarr.conf
Normal file
42
build/debian/apache/dolibarr.conf
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# Apache config file for Dolibarr
|
||||||
|
<IfModule mod_alias.c>
|
||||||
|
Alias /dolibarr /usr/share/dolibarr/htdocs
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# You can also use dolibarr as a VirtualHost
|
||||||
|
# <VirtualHost *:*>
|
||||||
|
# ServerName mydolibarrhostname.com
|
||||||
|
# ServerAdmin root@example.com
|
||||||
|
# DocumentRoot /usr/share/dolibarr/
|
||||||
|
# ErrorLog logs/ldap.example.com-error.log
|
||||||
|
# CustomLog logs/ldap.example.com-access.log common
|
||||||
|
# </VirtualHost>
|
||||||
|
|
||||||
|
# Directory for web pages
|
||||||
|
<Directory /usr/share/dolibarr/htdocs>
|
||||||
|
Order deny,allow
|
||||||
|
Allow from all
|
||||||
|
|
||||||
|
DirectoryIndex index.php
|
||||||
|
Options +FollowSymLinks +Indexes
|
||||||
|
|
||||||
|
ErrorDocument 401 /dolibarr/public/error-401.php
|
||||||
|
ErrorDocument 404 /dolibarr/public/error-404.php
|
||||||
|
|
||||||
|
<IfModule mod_php5.c>
|
||||||
|
php_flag magic_quotes_gpc Off
|
||||||
|
php_flag register_globals Off
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# OPTIMIZE: To use cache on static pages (A259200 = 1 month).
|
||||||
|
# Note that you must also enable the module mod_expires.
|
||||||
|
#ExpiresActive On
|
||||||
|
#ExpiresByType image/x-icon A2592000
|
||||||
|
#ExpiresByType image/gif A2592000
|
||||||
|
#ExpiresByType image/png A2592000
|
||||||
|
#ExpiresByType image/jpeg A2592000
|
||||||
|
#ExpiresByType text/css A2592000
|
||||||
|
#ExpiresByType text/javascript A2592000
|
||||||
|
#ExpiresByType application/x-javascript A2592000
|
||||||
|
#ExpiresByType application/javascript A2592000
|
||||||
|
</Directory>
|
||||||
@ -1,13 +1,13 @@
|
|||||||
debian/dolibarr.desktop usr/share/applications
|
debian/dolibarr.desktop usr/share/applications/
|
||||||
debian/dolibarr.xpm usr/share/pixmaps
|
debian/dolibarr.xpm usr/share/pixmaps/
|
||||||
ChangeLog usr/share/doc/dolibarr
|
debian/apache/.htaccess var/lib/dolibarr/documents/
|
||||||
README usr/share/doc/dolibarr
|
debian/apache/dolibarr.conf etc/apache2/conf-available/
|
||||||
doc/install usr/share/doc/dolibarr
|
debian/lighttpd/50-dolibarr.conf etc/lighttpd/conf-available/
|
||||||
doc/user usr/share/doc/dolibarr
|
debian/install.forced.php.install etc/dolibarr/
|
||||||
doc/index.html usr/share/doc/dolibarr
|
htdocs usr/share/dolibarr/
|
||||||
build/debian/apache.conf etc/dolibarr
|
scripts usr/share/dolibarr/
|
||||||
build/debian/lighttpd.conf etc/dolibarr
|
ChangeLog usr/share/doc/dolibarr/
|
||||||
build usr/share/dolibarr
|
README usr/share/doc/dolibarr/
|
||||||
dev usr/share/dolibarr
|
doc/install usr/share/doc/dolibarr/
|
||||||
htdocs usr/share/dolibarr
|
doc/user usr/share/doc/dolibarr/
|
||||||
scripts usr/share/dolibarr
|
doc/index.html usr/share/doc/dolibarr/
|
||||||
@ -13,27 +13,44 @@ set -e
|
|||||||
# <conflicting-package> <version>
|
# <conflicting-package> <version>
|
||||||
# for details, see /usr/share/doc/packaging-manual/
|
# for details, see /usr/share/doc/packaging-manual/
|
||||||
|
|
||||||
|
setup_empty_conf() {
|
||||||
|
echo Create empty file $config
|
||||||
|
mkdir -p /etc/dolibarr
|
||||||
|
touch /etc/dolibarr/conf.php
|
||||||
|
chown root:www-data /etc/dolibarr/conf.php
|
||||||
|
chmod 664 /etc/dolibarr/conf.php
|
||||||
|
}
|
||||||
|
|
||||||
|
is_new_upstream_version() {
|
||||||
|
# $1 can be empty (not installed) and will result in a true value
|
||||||
|
# for the check
|
||||||
|
old_version=$(echo "$1" | sed -e 's/-[^-]*$//' -e 's/^[0-9]*://')
|
||||||
|
new_version=$(dpkg-query -f '${Version}' -W dolibarr | \
|
||||||
|
sed -e 's/-[^-]*$//' -e 's/^[0-9]*://')
|
||||||
|
test "$old_version" != "$new_version"
|
||||||
|
}
|
||||||
|
|
||||||
|
enable_install_upgrade_wizard() {
|
||||||
lighttpd_install() {
|
echo Enable install wizard by removing install.lock file if present
|
||||||
if [ ! -f /etc/lighttpd/conf-available/50-dolibarr.conf ] ; then
|
rm -f /var/lib/dolibarr/documents/install.lock
|
||||||
if which lighty-enable-mod >/dev/null 2>&1 ; then
|
|
||||||
echo "Add link for Lighttpd config file"
|
|
||||||
ln -fs /etc/dolibarr/lighttpd.conf /etc/lighttpd/conf-available/50-dolibarr.conf
|
|
||||||
# We enabled it
|
|
||||||
lighty-enable-mod dolibarr fastcgi-php
|
|
||||||
else
|
|
||||||
echo "Lighttpd not installed, skipping"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apache_install() {
|
apache_install() {
|
||||||
webserver=$1
|
webserver=$1
|
||||||
if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/dolibarr.conf ]; then
|
if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/dolibarr.conf ]; then
|
||||||
echo "Add link for Apache config file"
|
echo "Add link for Apache config file"
|
||||||
ln -fs /etc/dolibarr/apache.conf /etc/$webserver/conf.d/dolibarr.conf
|
ln -s /etc/$webserver/conf-available/dolibarr.conf /etc/$webserver/conf.d/dolibarr.conf
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
lighttpd_install() {
|
||||||
|
if [ ! -f /etc/lighttpd/conf-available/50-dolibarr.conf ] ; then
|
||||||
|
if which lighty-enable-mod >/dev/null 2>&1 ; then
|
||||||
|
echo "Enable lighttpd link for dolibarr config file"
|
||||||
|
lighty-enable-mod dolibarr fastcgi-php
|
||||||
|
else
|
||||||
|
echo "Lighttpd not installed, skipping"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,24 +66,34 @@ echo Run the dolibarr postinst script
|
|||||||
|
|
||||||
# Define vars
|
# Define vars
|
||||||
docdir='/var/lib/dolibarr/documents'
|
docdir='/var/lib/dolibarr/documents'
|
||||||
installfileorig="/usr/share/dolibarr/build/debian/install.forced.php.install"
|
installfileorig="/etc/dolibarr/install.forced.php.install"
|
||||||
installconfig="/etc/dolibarr/install.forced.php"
|
installconfig="/etc/dolibarr/install.forced.php"
|
||||||
config="/etc/dolibarr/conf.php"
|
config="/etc/dolibarr/conf.php"
|
||||||
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
configure)
|
configure)
|
||||||
|
if [ -z "$2" ]; then
|
||||||
|
echo First install
|
||||||
|
#setup_empty_conf
|
||||||
|
else
|
||||||
|
echo This is not a first install
|
||||||
|
fi
|
||||||
|
apache_install
|
||||||
|
lighttpd_install
|
||||||
|
|
||||||
# Remove lock file
|
# Remove lock file
|
||||||
rm -f $docdir/install.lock
|
if is_new_upstream_version "$2"; then
|
||||||
|
enable_install_upgrade_wizard
|
||||||
|
fi
|
||||||
|
|
||||||
# Create document directory for uploaded data files
|
# Create document directory for uploaded data files
|
||||||
mkdir -p $docdir
|
mkdir -p $docdir
|
||||||
chown -R www-data:www-data $docdir
|
chown -R www-data:www-data $docdir
|
||||||
chmod -R 775 $docdir
|
chmod -R 775 $docdir
|
||||||
chmod -R g+s $docdir
|
chmod -R g+s $docdir
|
||||||
|
|
||||||
# Copy install config file (with matching Debian) values into target directory
|
# Copy install config file (with matching Debian values) into target directory
|
||||||
superuserlogin=''
|
superuserlogin=''
|
||||||
superuserpassword=''
|
superuserpassword=''
|
||||||
if [ -f /etc/mysql/debian.cnf ] ; then
|
if [ -f /etc/mysql/debian.cnf ] ; then
|
||||||
@ -87,10 +114,7 @@ case "$1" in
|
|||||||
if [ ! -s $config ] || ! grep -q "File generated by" $config
|
if [ ! -s $config ] || ! grep -q "File generated by" $config
|
||||||
then
|
then
|
||||||
# Create an empty conf.php with permission to web server
|
# Create an empty conf.php with permission to web server
|
||||||
echo Create empty file $config
|
setup_empty_conf
|
||||||
touch $config
|
|
||||||
chmod -R 660 $config
|
|
||||||
chown -R root:www-data $config
|
|
||||||
else
|
else
|
||||||
# File already exist. We add params not found.
|
# File already exist. We add params not found.
|
||||||
echo Add new params to overwrite path to use shared libraries/fonts
|
echo Add new params to overwrite path to use shared libraries/fonts
|
||||||
|
|||||||
0
build/debian/lighttpd.conf → build/debian/lighttpd/50-dolibarr.conf
Executable file → Normal file
0
build/debian/lighttpd.conf → build/debian/lighttpd/50-dolibarr.conf
Executable file → Normal file
@ -250,6 +250,8 @@ if ($nboftargetok) {
|
|||||||
mkdir "$BUILDROOT/$PROJECT";
|
mkdir "$BUILDROOT/$PROJECT";
|
||||||
print "Copy $SOURCE into $BUILDROOT/$PROJECT\n";
|
print "Copy $SOURCE into $BUILDROOT/$PROJECT\n";
|
||||||
$ret=`cp -pr "$SOURCE" "$BUILDROOT/$PROJECT"`;
|
$ret=`cp -pr "$SOURCE" "$BUILDROOT/$PROJECT"`;
|
||||||
|
print "Copy $SOURCE/build/debian/apache/.htaccess into $BUILDROOT/$PROJECT/build/debian/apache/.htaccess\n";
|
||||||
|
$ret=`cp -pr "$SOURCE/build/debian/apache/.htaccess" "$BUILDROOT/$PROJECT/build/debian/apache/.htaccess"`;
|
||||||
}
|
}
|
||||||
print "Clean $BUILDROOT\n";
|
print "Clean $BUILDROOT\n";
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/.buildpath`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/.buildpath`;
|
||||||
@ -568,6 +570,8 @@ if ($nboftargetok) {
|
|||||||
print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$PROJECT.tmp\n";
|
print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$PROJECT.tmp\n";
|
||||||
$cmd="cp -pr \"$BUILDROOT/$PROJECT\" \"$BUILDROOT/$PROJECT.tmp\"";
|
$cmd="cp -pr \"$BUILDROOT/$PROJECT\" \"$BUILDROOT/$PROJECT.tmp\"";
|
||||||
$ret=`$cmd`;
|
$ret=`$cmd`;
|
||||||
|
$cmd="cp -pr \"$BUILDROOT/$PROJECT/build/debian/apache/.htaccess\" \"$BUILDROOT/$PROJECT.tmp/build/debian/apache/.htaccess\"";
|
||||||
|
$ret=`$cmd`;
|
||||||
|
|
||||||
print "Remove other files\n";
|
print "Remove other files\n";
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/README-FR`;
|
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/README-FR`;
|
||||||
@ -630,11 +634,15 @@ if ($nboftargetok) {
|
|||||||
$ret=`cp -fr "$SOURCE/build/debian/patches" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
$ret=`cp -fr "$SOURCE/build/debian/patches" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||||
$ret=`cp -fr "$SOURCE/build/debian/po" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
$ret=`cp -fr "$SOURCE/build/debian/po" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||||
$ret=`cp -fr "$SOURCE/build/debian/source" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
$ret=`cp -fr "$SOURCE/build/debian/source" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||||
|
$ret=`cp -fr "$SOURCE/build/debian/apache" "$BUILDROOT/$PROJECT.tmp/debian/apache"`;
|
||||||
|
$ret=`cp -f "$SOURCE/build/debian/apache/.htaccess" "$BUILDROOT/$PROJECT.tmp/debian/apache"`;
|
||||||
|
$ret=`cp -fr "$SOURCE/build/debian/lighttpd" "$BUILDROOT/$PROJECT.tmp/debian/lighttpd"`;
|
||||||
# Add files also required to build binary package
|
# Add files also required to build binary package
|
||||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.config" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
$ret=`cp -f "$SOURCE/build/debian/dolibarr.config" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.postinst" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
$ret=`cp -f "$SOURCE/build/debian/dolibarr.postinst" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.postrm" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
$ret=`cp -f "$SOURCE/build/debian/dolibarr.postrm" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.templates" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
$ret=`cp -f "$SOURCE/build/debian/dolibarr.templates" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||||
|
$ret=`cp -f "$SOURCE/build/debian/install.forced.php.install" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||||
|
|
||||||
# Set owners and permissions
|
# Set owners and permissions
|
||||||
print "Set owners on files/dir\n";
|
print "Set owners on files/dir\n";
|
||||||
|
|||||||
@ -68,6 +68,11 @@ input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus
|
|||||||
border: 1px solid #ACBCBB;
|
border: 1px solid #ACBCBB;
|
||||||
box-shadow: 0 0 5px #C091AF;
|
box-shadow: 0 0 5px #C091AF;
|
||||||
}
|
}
|
||||||
|
input:-webkit-autofill {
|
||||||
|
background-color: #FBFFEA !important;
|
||||||
|
background-image: none !important;
|
||||||
|
-webkit-box-shadow: 0 0 0 50px #FBFFEA inset;
|
||||||
|
}
|
||||||
|
|
||||||
table.main {
|
table.main {
|
||||||
background: #F0F0F0 url(background.png) repeat-x;
|
background: #F0F0F0 url(background.png) repeat-x;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user