Merge branch '20160515-secu' of github.com:AlternC/AlternC into 20160515-secu
This commit is contained in:
commit
13ee5ce1dc
8
Makefile
8
Makefile
|
@ -21,8 +21,7 @@
|
|||
# Purpose of file: Global Makefile
|
||||
# ----------------------------------------------------------------------
|
||||
MAJOR=$(shell sed -ne 's/^[^(]*(\([^)]*\)).*/\1/;1p' debian/changelog)
|
||||
REV=$(shell env LANG=C svn info --non-interactive | awk '/^Revision:/ { print $$2 }')
|
||||
VERSION="${MAJOR}~svn${REV}"
|
||||
VERSION=$MAJOR
|
||||
export VERSION
|
||||
|
||||
build:
|
||||
|
@ -44,14 +43,11 @@ install-common:
|
|||
cp -r etc/alternc $(DESTDIR)/etc
|
||||
cp -r etc/incron.d $(DESTDIR)/etc
|
||||
install -o root -g root -m 440 etc/sudoers.d/alternc $(DESTDIR)/etc/sudoers.d
|
||||
# SVN cleanup (bad if installing without DESTDIR, FIXME)
|
||||
find $(DESTDIR)/etc/ -depth -type d -name ".svn" -exec rm {} -rf \;
|
||||
chmod 755 $(DESTDIR)/etc/alternc etc/incron.d
|
||||
|
||||
# Installer and upgrade scripts
|
||||
test -d $(DESTDIR)/usr/share/alternc/install || mkdir -p $(DESTDIR)/usr/share/alternc/install
|
||||
cp -r install/* $(DESTDIR)/usr/share/alternc/install
|
||||
find $(DESTDIR)/usr/share/alternc/install -depth -type d -name ".svn" -exec rm {} -rf \;
|
||||
chmod a+x $(DESTDIR)/usr/share/alternc/install/alternc.install $(DESTDIR)/usr/share/alternc/install/dopo.sh $(DESTDIR)/usr/share/alternc/install/mysql.sh $(DESTDIR)/usr/share/alternc/install/newone.php $(DESTDIR)/usr/share/alternc/install/reset_root.php $(DESTDIR)/usr/share/alternc/install/upgrade_check.sh $(DESTDIR)/usr/share/alternc/install/upgrades/*.php $(DESTDIR)/usr/share/alternc/install/upgrades/*.sh
|
||||
|
||||
|
||||
|
@ -60,9 +56,7 @@ install-alternc: install-common
|
|||
# Web Panel
|
||||
test -d $(DESTDIR)/usr/share/alternc/panel || mkdir $(DESTDIR)/usr/share/alternc/panel
|
||||
cp -r bureau/* $(DESTDIR)/usr/share/alternc/panel
|
||||
find $(DESTDIR)/usr/share/alternc/panel -depth -type d -name ".svn" -exec rm {} -rf \;
|
||||
sed -i -e "s/@@REPLACED_DURING_BUILD@@/${MAJOR}/" $(DESTDIR)/usr/share/alternc/panel/class/local.php
|
||||
echo ${VERSION} > $(DESTDIR)/usr/share/alternc/panel/class/.svn-infos
|
||||
chown -R root:root $(DESTDIR)/usr/share/alternc/panel
|
||||
chmod -R 644 $(DESTDIR)/usr/share/alternc/panel
|
||||
chmod -R a+X $(DESTDIR)/usr/share/alternc/panel
|
||||
|
|
|
@ -56,12 +56,8 @@ case "$1" in
|
|||
test -d "$VMAIL_HOME" || mkdir -p "$VMAIL_HOME"
|
||||
chown vmail:vmail "$VMAIL_HOME"
|
||||
chown vmail:vmail "$VMAIL_HOME"/* 2>/dev/null || true # It may be empty
|
||||
chmod u+rxw "$VMAIL_HOME"
|
||||
chmod u+rxw "$VMAIL_HOME"/* 2>/dev/null || true # It may be empty
|
||||
chmod g+rxw "$VMAIL_HOME"
|
||||
chmod g+rxw "$VMAIL_HOME"/* 2>/dev/null || true # It may be empty
|
||||
|
||||
chown alterncpanel:alterncpanel "/var/lib/alternc/panel"
|
||||
chmod 770 "$VMAIL_HOME"
|
||||
chmod 770 "$VMAIL_HOME"/* 2>/dev/null || true # It may be empty
|
||||
|
||||
# build local.sh if it does not exist
|
||||
if [ ! -f $CONFIGFILE ]; then
|
||||
|
|
|
@ -7,10 +7,6 @@
|
|||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
export DH_VERBOSE=1
|
||||
MAJOR=$(shell sed -ne 's/^[^(]*(\([^)]*\)).*/\1/;1p' debian/changelog)
|
||||
REV=$(shell env LANG=C svn info --non-interactive | awk '/^Revision:/ { print $$2 }')
|
||||
VERSION="${MAJOR}~svn${REV}"
|
||||
export VERSION
|
||||
|
||||
override_dh_install:
|
||||
#dh install
|
||||
|
@ -23,6 +19,10 @@ override_dh_install:
|
|||
$(MAKE) install-api DESTDIR=$(CURDIR)/debian/alternc-api
|
||||
$(MAKE) -C ssl install DESTDIR=$(CURDIR)/debian/alternc-ssl
|
||||
|
||||
override_dh_fixperms:
|
||||
dh_fixperms
|
||||
chmod 700 debian/alternc/var/lib/alternc/backups
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
|
|
|
@ -259,6 +259,7 @@ done
|
|||
BACKUPS="$BACKUPS etc/postfix/main.cf"
|
||||
|
||||
tar -zcf "$BACKUP_FILE" -C / $BACKUPS 2>/dev/null || true
|
||||
chmod 600 "$BACKUP_FILE"
|
||||
|
||||
#######################################################################
|
||||
# Expand templates in the right place
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
# change ownership of the panel's file, MUST be root:root
|
||||
# since some cron-script of AlternC are launched as root.
|
||||
|
||||
chown -R root:root /usr/share/alternc/panel
|
||||
|
||||
# AlternC's backup of system files must NOT be readable but everyone !
|
||||
chmod -R og-rwx /var/lib/alternc/backups
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Migrate a svn repository to WHEEZY
|
||||
# Migrate a repository to WHEEZY
|
||||
|
||||
# DON'T COMMIT ANYTHING AFTER launching this
|
||||
# reset your subversion repos back to the serverside one!
|
||||
|
|
|
@ -200,7 +200,7 @@ if ($r=="8" || $r=="a") {
|
|||
|
||||
// Send anonymous statistics to AlternC team.
|
||||
if ($r=="100" || $r=="a") {
|
||||
$f=fopen("http://svn.alternc.org/stats.php?m1=$m1&m2=$m2&m3=$m3&m4=$m4&m5=$m5&m6=$m6&m7=$m7","rb");
|
||||
$f=fopen("https://alternc.com/stats.php?m1=$m1&m2=$m2&m3=$m3&m4=$m4&m5=$m5&m6=$m6&m7=$m7","rb");
|
||||
if ($f) {
|
||||
while ($s=fgets($f,1024)) {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Migrate a svn repository to WHEEZY
|
||||
# Migrate a repository to WHEEZY
|
||||
|
||||
# DON'T COMMIT ANYTHING AFTER launching this
|
||||
# reset your subversion repos back to the serverside one!
|
||||
|
|
Loading…
Reference in New Issue