You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(6) |
Jul
(14) |
Aug
(156) |
Sep
(35) |
Oct
(48) |
Nov
(55) |
Dec
(16) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(24) |
Feb
(154) |
Mar
(139) |
Apr
(175) |
May
(87) |
Jun
(34) |
Jul
(42) |
Aug
(68) |
Sep
(41) |
Oct
(76) |
Nov
(77) |
Dec
(50) |
2008 |
Jan
(98) |
Feb
(43) |
Mar
(102) |
Apr
(27) |
May
(55) |
Jun
(13) |
Jul
(58) |
Aug
(62) |
Sep
(61) |
Oct
(43) |
Nov
(87) |
Dec
(134) |
2009 |
Jan
(175) |
Feb
(106) |
Mar
(58) |
Apr
(41) |
May
(74) |
Jun
(123) |
Jul
(252) |
Aug
(192) |
Sep
(69) |
Oct
(38) |
Nov
(117) |
Dec
(95) |
2010 |
Jan
(146) |
Feb
(76) |
Mar
(90) |
Apr
(60) |
May
(23) |
Jun
(19) |
Jul
(208) |
Aug
(140) |
Sep
(103) |
Oct
(114) |
Nov
(50) |
Dec
(47) |
2011 |
Jan
(59) |
Feb
(47) |
Mar
(61) |
Apr
(58) |
May
(41) |
Jun
(11) |
Jul
(17) |
Aug
(49) |
Sep
(34) |
Oct
(166) |
Nov
(38) |
Dec
(70) |
2012 |
Jan
(87) |
Feb
(37) |
Mar
(28) |
Apr
(25) |
May
(29) |
Jun
(30) |
Jul
(43) |
Aug
(27) |
Sep
(46) |
Oct
(27) |
Nov
(51) |
Dec
(70) |
2013 |
Jan
(92) |
Feb
(34) |
Mar
(58) |
Apr
(37) |
May
(46) |
Jun
(9) |
Jul
(38) |
Aug
(22) |
Sep
(28) |
Oct
(42) |
Nov
(44) |
Dec
(34) |
2014 |
Jan
(63) |
Feb
(39) |
Mar
(48) |
Apr
(31) |
May
(21) |
Jun
(43) |
Jul
(36) |
Aug
(69) |
Sep
(53) |
Oct
(56) |
Nov
(46) |
Dec
(49) |
2015 |
Jan
(63) |
Feb
(35) |
Mar
(30) |
Apr
(38) |
May
(27) |
Jun
(42) |
Jul
(42) |
Aug
(63) |
Sep
(18) |
Oct
(45) |
Nov
(65) |
Dec
(71) |
2016 |
Jan
(54) |
Feb
(79) |
Mar
(59) |
Apr
(38) |
May
(32) |
Jun
(46) |
Jul
(42) |
Aug
(30) |
Sep
(58) |
Oct
(33) |
Nov
(98) |
Dec
(59) |
2017 |
Jan
(79) |
Feb
(12) |
Mar
(43) |
Apr
(32) |
May
(76) |
Jun
(59) |
Jul
(44) |
Aug
(14) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <abe...@us...> - 2015-08-16 00:58:57
|
Revision: 7195 http://sourceforge.net/p/astlinux/code/7195 Author: abelbeck Date: 2015-08-16 00:58:55 +0000 (Sun, 16 Aug 2015) Log Message: ----------- fossil, new package, version 1.33, disabled by default Modified Paths: -------------- branches/1.0/astlinux-ast11.config branches/1.0/astlinux-ast13.config branches/1.0/astlinux18.config branches/1.0/initrd.config branches/1.0/package/Config.in branches/1.0/runnix-uclibc.config branches/1.0/runnix.config Added Paths: ----------- branches/1.0/package/fossil/ branches/1.0/package/fossil/Config.in branches/1.0/package/fossil/fossil.mk Modified: branches/1.0/astlinux-ast11.config =================================================================== --- branches/1.0/astlinux-ast11.config 2015-08-15 21:55:36 UTC (rev 7194) +++ branches/1.0/astlinux-ast11.config 2015-08-16 00:58:55 UTC (rev 7195) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot 2011.08-svn7070-dirty Configuration -# Tue May 19 19:11:47 2015 +# Buildroot 2011.08-svn7194-dirty Configuration +# Sat Aug 15 19:23:13 2015 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -266,6 +266,7 @@ # BR2_PACKAGE_CVS is not set # BR2_PACKAGE_DISTCC is not set BR2_PACKAGE_FLEX=y +# BR2_PACKAGE_FOSSIL is not set # BR2_PACKAGE_GMP is not set # BR2_PACKAGE_GPERF is not set # BR2_PACKAGE_MAKE is not set Modified: branches/1.0/astlinux-ast13.config =================================================================== --- branches/1.0/astlinux-ast13.config 2015-08-15 21:55:36 UTC (rev 7194) +++ branches/1.0/astlinux-ast13.config 2015-08-16 00:58:55 UTC (rev 7195) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot 2011.08-svn7070-dirty Configuration -# Tue May 19 19:11:54 2015 +# Buildroot 2011.08-svn7194-dirty Configuration +# Sat Aug 15 19:23:16 2015 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -266,6 +266,7 @@ # BR2_PACKAGE_CVS is not set # BR2_PACKAGE_DISTCC is not set BR2_PACKAGE_FLEX=y +# BR2_PACKAGE_FOSSIL is not set # BR2_PACKAGE_GMP is not set # BR2_PACKAGE_GPERF is not set # BR2_PACKAGE_MAKE is not set Modified: branches/1.0/astlinux18.config =================================================================== --- branches/1.0/astlinux18.config 2015-08-15 21:55:36 UTC (rev 7194) +++ branches/1.0/astlinux18.config 2015-08-16 00:58:55 UTC (rev 7195) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot 2011.08-svn7070-dirty Configuration -# Tue May 19 19:11:42 2015 +# Buildroot 2011.08-svn7194-dirty Configuration +# Sat Aug 15 19:23:12 2015 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -266,6 +266,7 @@ # BR2_PACKAGE_CVS is not set # BR2_PACKAGE_DISTCC is not set BR2_PACKAGE_FLEX=y +# BR2_PACKAGE_FOSSIL is not set # BR2_PACKAGE_GMP is not set # BR2_PACKAGE_GPERF is not set # BR2_PACKAGE_MAKE is not set Modified: branches/1.0/initrd.config =================================================================== --- branches/1.0/initrd.config 2015-08-15 21:55:36 UTC (rev 7194) +++ branches/1.0/initrd.config 2015-08-16 00:58:55 UTC (rev 7195) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot 2011.08-svn6989-dirty Configuration -# Fri Feb 27 10:53:56 2015 +# Buildroot 2011.08-svn7194-dirty Configuration +# Sat Aug 15 19:23:35 2015 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -243,6 +243,7 @@ # BR2_PACKAGE_CVS is not set # BR2_PACKAGE_DISTCC is not set # BR2_PACKAGE_FLEX is not set +# BR2_PACKAGE_FOSSIL is not set # BR2_PACKAGE_GMP is not set # BR2_PACKAGE_GPERF is not set # BR2_PACKAGE_MAKE is not set Modified: branches/1.0/package/Config.in =================================================================== --- branches/1.0/package/Config.in 2015-08-15 21:55:36 UTC (rev 7194) +++ branches/1.0/package/Config.in 2015-08-16 00:58:55 UTC (rev 7195) @@ -73,6 +73,7 @@ source "package/findutils/Config.in" endif source "package/flex/Config.in" +source "package/fossil/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/gawk/Config.in" endif Added: branches/1.0/package/fossil/Config.in =================================================================== --- branches/1.0/package/fossil/Config.in (rev 0) +++ branches/1.0/package/fossil/Config.in 2015-08-16 00:58:55 UTC (rev 7195) @@ -0,0 +1,9 @@ +config BR2_PACKAGE_FOSSIL + bool "fossil" + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + Fossil is a simple, high-reliability, distributed software + configuration management system. + + http://www.fossil-scm.org/ Added: branches/1.0/package/fossil/fossil.mk =================================================================== --- branches/1.0/package/fossil/fossil.mk (rev 0) +++ branches/1.0/package/fossil/fossil.mk 2015-08-16 00:58:55 UTC (rev 7195) @@ -0,0 +1,39 @@ +################################################################################ +# +# fossil +# +################################################################################ + +FOSSIL_VERSION = 1.33 +FOSSIL_SOURCE = fossil-src-$(FOSSIL_VERSION).tar.gz +FOSSIL_SITE = http://www.fossil-scm.org/download +FOSSIL_DEPENDENCIES = zlib openssl + +define FOSSIL_CONFIGURE_CMDS + # this is *NOT* GNU autoconf stuff + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure \ + --prefix=/usr \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --with-openssl="$(STAGING_DIR)/usr" \ + --with-zlib="$(STAGING_DIR)/usr" \ + ) +endef + +FOSSIL_MAKE_ENV = \ + $(TARGET_MAKE_ENV) \ + TCC="$(TARGET_CC)" + +FOSSIL_UNINSTALL_STAGING_OPT = --version + +define FOSSIL_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/fossil $(TARGET_DIR)/usr/bin/fossil +endef + +define FOSSIL_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/bin/fossil +endef + +$(eval $(call AUTOTARGETS,package,fossil)) Modified: branches/1.0/runnix-uclibc.config =================================================================== --- branches/1.0/runnix-uclibc.config 2015-08-15 21:55:36 UTC (rev 7194) +++ branches/1.0/runnix-uclibc.config 2015-08-16 00:58:55 UTC (rev 7195) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot 2011.08-svn6989-dirty Configuration -# Fri Feb 27 10:53:53 2015 +# Buildroot 2011.08-svn7194-dirty Configuration +# Sat Aug 15 19:23:25 2015 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -367,6 +367,7 @@ # findutils requires a toolchain with WCHAR support # # BR2_PACKAGE_FLEX is not set +# BR2_PACKAGE_FOSSIL is not set # # gcc needs development files in target filesystem Modified: branches/1.0/runnix.config =================================================================== --- branches/1.0/runnix.config 2015-08-15 21:55:36 UTC (rev 7194) +++ branches/1.0/runnix.config 2015-08-16 00:58:55 UTC (rev 7195) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot 2011.08-svn6989-dirty Configuration -# Fri Feb 27 10:53:49 2015 +# Buildroot 2011.08-svn7194-dirty Configuration +# Sat Aug 15 19:23:19 2015 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -252,6 +252,7 @@ # BR2_PACKAGE_DISTCC is not set # BR2_PACKAGE_FINDUTILS is not set # BR2_PACKAGE_FLEX is not set +# BR2_PACKAGE_FOSSIL is not set # BR2_PACKAGE_GAWK is not set # BR2_PACKAGE_GMP is not set # BR2_PACKAGE_GPERF is not set This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-15 21:55:38
|
Revision: 7194 http://sourceforge.net/p/astlinux/code/7194 Author: abelbeck Date: 2015-08-15 21:55:36 +0000 (Sat, 15 Aug 2015) Log Message: ----------- host-tcl, version bump to 8.6.3 Modified Paths: -------------- branches/1.0/package/tcl/Config.in branches/1.0/package/tcl/tcl.mk Added Paths: ----------- branches/1.0/package/tcl/tcl-0001-dont-build-compat.patch Removed Paths: ------------- branches/1.0/package/tcl/tcl-8.4.19-strtod.patch Modified: branches/1.0/package/tcl/Config.in =================================================================== --- branches/1.0/package/tcl/Config.in 2015-08-13 23:37:17 UTC (rev 7193) +++ branches/1.0/package/tcl/Config.in 2015-08-15 21:55:36 UTC (rev 7194) @@ -5,10 +5,11 @@ http://www.tcl.tk +if BR2_PACKAGE_TCL + config BR2_PACKAGE_TCL_DEL_ENCODINGS bool "delete encodings (saves 1.4Mb)" default y - depends on BR2_PACKAGE_TCL help Delete encoding files for TCL. If your programs do not use various tcl character recoding functions, you may safely @@ -19,9 +20,10 @@ config BR2_PACKAGE_TCL_SHLIB_ONLY bool "install only shared library" default y - depends on BR2_PACKAGE_TCL help Install only TCL shared library and not binary tcl interpreter(tclsh8.4). Saves ~14kb. + +endif Added: branches/1.0/package/tcl/tcl-0001-dont-build-compat.patch =================================================================== --- branches/1.0/package/tcl/tcl-0001-dont-build-compat.patch (rev 0) +++ branches/1.0/package/tcl/tcl-0001-dont-build-compat.patch 2015-08-15 21:55:36 UTC (rev 7194) @@ -0,0 +1,33 @@ +From: Andrew Ruder <and...@el...> +Subject: [PATCH] Disable tcl compatibility layers + +Turn off building compatibility layers for old/broken versions of +standard functions (strstr, strtoul, strtod) with the assumption that +anything buildroot is using as a standard C library will be good enough +to not have broken behavior. + +Signed-off-by: Andrew Ruder <and...@el...> +--- + +diff --git a/unix/tcl.m4 b/unix/tcl.m4 +--- a/unix/tcl.m4 ++++ b/unix/tcl.m4 +@@ -2464,7 +2464,7 @@ AC_DEFUN([SC_BUGGY_STRTOD], [ + } + exit(0); + }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy, +- tcl_cv_strtod_buggy=buggy)]) ++ tcl_cv_strtod_buggy=ok)]) + if test "$tcl_cv_strtod_buggy" = buggy; then + AC_LIBOBJ([fixstrtod]) + USE_COMPAT=1 +@@ -2723,7 +2723,7 @@ AC_DEFUN([SC_TCL_CHECK_BROKEN_FUNC],[ + if test ["$tcl_ok"] = 1; then + AC_CACHE_CHECK([proper ]$1[ implementation], [tcl_cv_]$1[_unbroken], + AC_TRY_RUN([[int main() {]$2[}]],[tcl_cv_]$1[_unbroken]=ok, +- [tcl_cv_]$1[_unbroken]=broken,[tcl_cv_]$1[_unbroken]=unknown)) ++ [tcl_cv_]$1[_unbroken]=broken,[tcl_cv_]$1[_unbroken]=ok)) + if test ["$tcl_cv_]$1[_unbroken"] = "ok"; then + tcl_ok=1 + else + Deleted: branches/1.0/package/tcl/tcl-8.4.19-strtod.patch =================================================================== --- branches/1.0/package/tcl/tcl-8.4.19-strtod.patch 2015-08-13 23:37:17 UTC (rev 7193) +++ branches/1.0/package/tcl/tcl-8.4.19-strtod.patch 2015-08-15 21:55:36 UTC (rev 7194) @@ -1,11 +0,0 @@ ---- tcl8.4.9/compat/strtod.c 2002-02-25 16:26:12.000000000 +0200 -+++ tcl8.4.9/compat/strtod.c 2005-05-30 08:55:18.000000000 +0300 -@@ -24,6 +24,8 @@ - #define NULL 0 - #endif - -+#undef strtod -+ - static int maxExponent = 511; /* Largest possible base 10 exponent. Any - * exponent larger than this will already - * produce underflow or overflow, so there's Modified: branches/1.0/package/tcl/tcl.mk =================================================================== --- branches/1.0/package/tcl/tcl.mk 2015-08-13 23:37:17 UTC (rev 7193) +++ branches/1.0/package/tcl/tcl.mk 2015-08-15 21:55:36 UTC (rev 7194) @@ -1,27 +1,93 @@ -############################################################# +################################################################################ # -# TCL8.4 +# tcl # -############################################################# -TCL_VERSION:=8.4.19 -TCL_SOURCE:=tcl$(TCL_VERSION)-src.tar.gz -TCL_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/tcl +################################################################################ + +TCL_VERSION_MAJOR = 8.6 +TCL_VERSION = $(TCL_VERSION_MAJOR).3 +TCL_SOURCE = tcl$(TCL_VERSION)-src.tar.gz +TCL_SITE = http://downloads.sourceforge.net/project/tcl/Tcl/$(TCL_VERSION) TCL_SUBDIR = unix +TCL_INSTALL_STAGING = YES +TCL_AUTORECONF = YES + +# Note that --with-system-sqlite will only make a difference +# in the sqlite package (which gets removed if sqlite not +# configured). Don't need to worry about conditionally including +# it in the configure options TCL_CONF_OPT = \ - --disable-symbols \ - --disable-langinfo \ - --disable-framework + --disable-symbols \ + --disable-langinfo \ + --disable-framework \ + --with-system-sqlite -define TCL_POST_INSTALL_CLEANUP - -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libtcl8.4.so - -if [ "$(BR2_PACKAGE_TCL_DEL_ENCODINGS)" = "y" ]; then \ - rm -Rf $(TARGET_DIR)/usr/lib/tcl8.4/encoding/*; \ - fi - -if [ "$(BR2_PACKAGE_TCL_SHLIB_ONLY)" = "y" ]; then \ - rm -f $(TARGET_DIR)/usr/bin/tclsh8.4; \ - fi +HOST_TCL_SUBDIR = unix + +HOST_TCL_CONF_OPT = \ + --disable-symbols \ + --disable-langinfo \ + --disable-framework + +# I haven't found a good way to force pkgs to not build +# or configure without just removing the entire pkg directory. +define HOST_TCL_REMOVE_PACKAGES + rm -fr $(@D)/pkgs/sqlite[0-9].[0-9].[0-9] \ + $(@D)/pkgs/tdbc[0-9].[0-9].[0-9] \ + $(@D)/pkgs/tdbcmysql[0-9].[0-9].[0-9] \ + $(@D)/pkgs/tdbcodbc[0-9].[0-9].[0-9] \ + $(@D)/pkgs/tdbcpostgres[0-9].[0-9].[0-9] \ + $(@D)/pkgs/tdbcsqlite3-[0-9].[0-9].[0-9] endef +HOST_TCL_PRE_CONFIGURE_HOOKS += HOST_TCL_REMOVE_PACKAGES +define TCL_REMOVE_PACKAGES + rm -fr $(if $(BR2_PACKAGE_SQLITE),,$(@D)/pkgs/sqlite[0-9].[0-9].[0-9]) \ + $(if $(BR2_PACKAGE_SQLITE),,$(@D)/pkgs/tdbc[0-9].[0-9].[0-9]) \ + $(@D)/pkgs/tdbcmysql[0-9].[0-9].[0-9] \ + $(@D)/pkgs/tdbcodbc[0-9].[0-9].[0-9] \ + $(@D)/pkgs/tdbcpostgres[0-9].[0-9].[0-9] \ + $(if $(BR2_PACKAGE_SQLITE),,$(@D)/pkgs/tdbcsqlite3-[0-9].[0-9].[0-9]) +endef +TCL_PRE_CONFIGURE_HOOKS += TCL_REMOVE_PACKAGES -TCL_POST_INSTALL_TARGET_HOOKS += TCL_POST_INSTALL_CLEANUP +ifeq ($(BR2_PACKAGE_TCL_DEL_ENCODINGS),y) +define TCL_REMOVE_ENCODINGS + rm -rf $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/encoding/* +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_ENCODINGS +endif +ifeq ($(BR2_PACKAGE_TCL_SHLIB_ONLY),y) +define TCL_REMOVE_TCLSH + rm -f $(TARGET_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR) +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_TCLSH +else +define TCL_SYMLINK_TCLSH + ln -sf tclsh$(TCL_VERSION_MAJOR) $(TARGET_DIR)/usr/bin/tclsh +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_SYMLINK_TCLSH +endif + +define HOST_TCL_SYMLINK_TCLSH + ln -sf tclsh$(TCL_VERSION_MAJOR) $(HOST_DIR)/usr/bin/tclsh +endef +HOST_TCL_POST_INSTALL_HOOKS += HOST_TCL_SYMLINK_TCLSH + +# Until someone needs it, we don't handle locale installation. tcl has +# a complicated method of translating LANG-style locale names into its internal +# .msg name which makes it difficult to save the correct locales per the +# configured whitelist. +define TCL_REMOVE_EXTRA + rm -fr $(TARGET_DIR)/usr/lib/tclConfig.sh \ + $(TARGET_DIR)/usr/lib/tclooConfig.sh \ + $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/tclAppInit.c \ + $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/msgs +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_EXTRA + +TCL_DEPENDENCIES = $(if $(BR2_PACKAGE_SQLITE),sqlite) +HOST_TCL_DEPENDENCIES = + $(eval $(call AUTOTARGETS,package,tcl)) +$(eval $(call AUTOTARGETS,package,tcl,host)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-13 23:37:20
|
Revision: 7193 http://sourceforge.net/p/astlinux/code/7193 Author: abelbeck Date: 2015-08-13 23:37:17 +0000 (Thu, 13 Aug 2015) Log Message: ----------- update ChangeLog Modified Paths: -------------- branches/1.0/docs/ChangeLog.txt Modified: branches/1.0/docs/ChangeLog.txt =================================================================== --- branches/1.0/docs/ChangeLog.txt 2015-08-13 23:29:22 UTC (rev 7192) +++ branches/1.0/docs/ChangeLog.txt 2015-08-13 23:37:17 UTC (rev 7193) @@ -29,6 +29,8 @@ -- parse-csv, new command, parse a comma-seperated-value string like an Asterisk CDR line and output each value followed by a new-line. Fields may be quoted with double-quotes and a quoted quote is encoded as two double-quotes. +-- Time Zone Database update, tzdata2015f and php-timezonedb-2015.6 + ** Networking -- OpenSSL, version bump to 1.0.1p, security fix: CVE-2015-1793 @@ -38,6 +40,8 @@ -- OpenVPN, version bump to 2.3.8 +-- arnofw (AIF), version bump to pre-release 2.0.1f + -- iptables, version bump to 1.4.21 -- libpcap, version bump to 1.7.4 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-13 23:29:25
|
Revision: 7192 http://sourceforge.net/p/astlinux/code/7192 Author: abelbeck Date: 2015-08-13 23:29:22 +0000 (Thu, 13 Aug 2015) Log Message: ----------- Add a reminder at the end of the script Modified Paths: -------------- branches/1.0/scripts/php-timezonedb/makearchive.sh Modified: branches/1.0/scripts/php-timezonedb/makearchive.sh =================================================================== --- branches/1.0/scripts/php-timezonedb/makearchive.sh 2015-08-13 23:18:13 UTC (rev 7191) +++ branches/1.0/scripts/php-timezonedb/makearchive.sh 2015-08-13 23:29:22 UTC (rev 7192) @@ -78,5 +78,10 @@ rm -f timezonedb.idx timezonedb.idx.php timezonedb.dta echo "" -echo "Done" +echo "Install using... +# mv timezonedb-$version.tar.gz dl/ + +# ./scripts/upload-dl-pair dl/timezonedb-$version.tar.gz +" + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-13 23:18:15
|
Revision: 7191 http://sourceforge.net/p/astlinux/code/7191 Author: abelbeck Date: 2015-08-13 23:18:13 +0000 (Thu, 13 Aug 2015) Log Message: ----------- zoneinfo, version bump to 2015f and PHP_TIMEZONEDB 2015.6 Modified Paths: -------------- branches/1.0/package/php/php.mk branches/1.0/package/zoneinfo/zoneinfo.mk Modified: branches/1.0/package/php/php.mk =================================================================== --- branches/1.0/package/php/php.mk 2015-08-13 22:43:35 UTC (rev 7190) +++ branches/1.0/package/php/php.mk 2015-08-13 23:18:13 UTC (rev 7191) @@ -13,7 +13,7 @@ PHP_DEPENDENCIES = host-pkg-config ifeq ($(BR2_PACKAGE_PHP_EXT_TIMEZONEDB),y) -PHP_TIMEZONEDB_VERSION = 2015.5 +PHP_TIMEZONEDB_VERSION = 2015.6 PHP_TIMEZONEDB_SITE = http://files.astlinux.org PHP_TIMEZONEDB_SOURCE = timezonedb-$(PHP_TIMEZONEDB_VERSION).tar.gz Modified: branches/1.0/package/zoneinfo/zoneinfo.mk =================================================================== --- branches/1.0/package/zoneinfo/zoneinfo.mk 2015-08-13 22:43:35 UTC (rev 7190) +++ branches/1.0/package/zoneinfo/zoneinfo.mk 2015-08-13 23:18:13 UTC (rev 7191) @@ -3,7 +3,7 @@ # zoneinfo # ############################################################## -ZONEINFO_VERSION := 2015e +ZONEINFO_VERSION := 2015f ZONEINFO_DATA := tzdata$(ZONEINFO_VERSION).tar.gz ZONEINFO_SOURCE := tzcode$(ZONEINFO_VERSION).tar.gz ZONEINFO_SITE := ftp://ftp.iana.org/tz/releases This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-13 22:43:37
|
Revision: 7190 http://sourceforge.net/p/astlinux/code/7190 Author: abelbeck Date: 2015-08-13 22:43:35 +0000 (Thu, 13 Aug 2015) Log Message: ----------- arnofw, version bump to pre-release 2.0.1f Modified Paths: -------------- branches/1.0/package/arnofw/adaptive-ban/95adaptive-ban.plugin.sh branches/1.0/package/arnofw/arnofw.mk branches/1.0/package/arnofw/arnofw.serial branches/1.0/package/arnofw/dyndns-host-open/50dyndns-host-open.plugin.sh branches/1.0/package/arnofw/miniupnpd/50miniupnpd.plugin.sh branches/1.0/package/arnofw/openvpn-server/50openvpn-server.plugin.sh branches/1.0/package/arnofw/pptp-vpn/50pptp-vpn.plugin.sh branches/1.0/package/arnofw/sip-user-agent/30sip-user-agent.plugin.sh branches/1.0/package/arnofw/time-schedule-host-block/30time-schedule-host-block.plugin.sh branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh Removed Paths: ------------- branches/1.0/package/arnofw/arnofw-NAT_LOCAL_REDIRECT.patch branches/1.0/package/arnofw/arnofw-enable-iptables-lock-wait.patch Modified: branches/1.0/package/arnofw/adaptive-ban/95adaptive-ban.plugin.sh =================================================================== --- branches/1.0/package/arnofw/adaptive-ban/95adaptive-ban.plugin.sh 2015-08-08 14:07:11 UTC (rev 7189) +++ branches/1.0/package/arnofw/adaptive-ban/95adaptive-ban.plugin.sh 2015-08-13 22:43:35 UTC (rev 7190) @@ -164,10 +164,12 @@ CONF_FILE="$PLUGIN_CONF_PATH/$PLUGIN_CONF_FILE" fi +# Preinit to success: +PLUGIN_RET_VAL=0 + # Check if the config file exists if [ ! -e "$CONF_FILE" ]; then printf "NOTE: Config file \"$CONF_FILE\" not found!\n Plugin \"$PLUGIN_NAME v$PLUGIN_VERSION\" ignored!\n" >&2 - PLUGIN_RET_VAL=0 else # Source the plugin config file . "$CONF_FILE" @@ -182,16 +184,15 @@ INDENT="$INDENT " # Only proceed if environment ok - if plugin_sanity_check; then + if ! plugin_sanity_check; then + PLUGIN_RET_VAL=1 + else case $PLUGIN_CMD in - start|'') plugin_start; PLUGIN_RET_VAL=$?;; - stop ) plugin_stop; PLUGIN_RET_VAL=$?;; - status ) plugin_status; PLUGIN_RET_VAL=$?;; - * ) PLUGIN_RET_VAL=1; printf "\033[40m\033[1;31m${INDENT}ERROR: Invalid plugin option \"$PLUGIN_CMD\"!\033[0m\n" >&2;; + start|'') plugin_start; PLUGIN_RET_VAL=$? ;; + stop ) plugin_stop; PLUGIN_RET_VAL=$? ;; + status ) plugin_status; PLUGIN_RET_VAL=$? ;; + * ) PLUGIN_RET_VAL=1; printf "\033[40m\033[1;31m${INDENT}ERROR: Invalid plugin option \"$PLUGIN_CMD\"!\033[0m\n" >&2 ;; esac fi - else - PLUGIN_RET_VAL=0 fi fi - Deleted: branches/1.0/package/arnofw/arnofw-NAT_LOCAL_REDIRECT.patch =================================================================== --- branches/1.0/package/arnofw/arnofw-NAT_LOCAL_REDIRECT.patch 2015-08-08 14:07:11 UTC (rev 7189) +++ branches/1.0/package/arnofw/arnofw-NAT_LOCAL_REDIRECT.patch 2015-08-13 22:43:35 UTC (rev 7190) @@ -1,44 +0,0 @@ -From efc3c82552ec009a20252ed3e412aff3ef983fa2 Mon Sep 17 00:00:00 2001 -From: Lonnie Abelbeck <lo...@ab...> -Date: Mon, 28 Jul 2014 08:19:47 -0500 -Subject: [PATCH] fixed: Move NAT_LOCAL_REDIRECT to be applied before the drop - logs, Issue #13 - ---- - bin/arno-iptables-firewall | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/bin/arno-iptables-firewall b/bin/arno-iptables-firewall -index 0f74051..1e52ec8 100755 ---- a/bin/arno-iptables-firewall -+++ b/bin/arno-iptables-firewall -@@ -3373,6 +3373,13 @@ setup_ext_input_chain() - ip6tables -A EXT_INPUT_CHAIN -d ff00::/8 -j EXT_MULTICAST_CHAIN - fi - -+ # Allow all packets that have been locally redirected -+ ##################################################### -+ if [ "$NAT_LOCAL_REDIRECT" = "1" ]; then -+ echo " Enabling support for NAT local redirect" -+ ip4tables -A EXT_INPUT_CHAIN -m conntrack --ctstate DNAT -j ACCEPT -+ fi -+ - # Log packets to privileged TCP ports? - ################################################## - if [ "$PRIV_TCP_LOG" != "0" ]; then -@@ -3439,13 +3446,6 @@ setup_ext_input_chain() - echo " Logging of IPv4 IGMP packets disabled" - fi - -- # Allow all packets that have been locally redirected -- ##################################################### -- if [ "$NAT_LOCAL_REDIRECT" = "1" ]; then -- echo " Enabling support for NAT local redirect" -- ip4tables -A EXT_INPUT_CHAIN -m conntrack --ctstate DNAT -j ACCEPT -- fi -- - # Finally drop all in the broadcast chain - iptables -A EXT_BROADCAST_CHAIN -j DROP - --- -2.0.3 Deleted: branches/1.0/package/arnofw/arnofw-enable-iptables-lock-wait.patch =================================================================== --- branches/1.0/package/arnofw/arnofw-enable-iptables-lock-wait.patch 2015-08-08 14:07:11 UTC (rev 7189) +++ branches/1.0/package/arnofw/arnofw-enable-iptables-lock-wait.patch 2015-08-13 22:43:35 UTC (rev 7190) @@ -1,64 +0,0 @@ -From 8a5f13173cbc21b4c21b0fc97370f9882ef4cd94 Mon Sep 17 00:00:00 2001 -From: Lonnie Abelbeck <lo...@ab...> -Date: Mon, 3 Aug 2015 17:11:00 -0500 -Subject: [PATCH] fixed: Issue #17, Enable xtables lock "wait" option found in - iptables 1.4.20+ - ---- - share/arno-iptables-firewall/environment | 15 +++++++++++---- - 1 file changed, 11 insertions(+), 4 deletions(-) - -diff --git a/share/arno-iptables-firewall/environment b/share/arno-iptables-firewall/environment -index 0fe708f..bc2d24e 100644 ---- a/share/arno-iptables-firewall/environment -+++ b/share/arno-iptables-firewall/environment -@@ -296,7 +296,7 @@ ip4tables() - { - local result retval IFS=' ' - -- result=`$IP4TABLES "$@" 2>&1` -+ result=`$IP4TABLES${IPTABLES_OPTIONS:+ $IPTABLES_OPTIONS} "$@" 2>&1` - retval=$? - - if [ $retval -ne 0 ]; then -@@ -323,7 +323,7 @@ ip6tables() - { - local result retval IFS=' ' - -- result=`$IP6TABLES "$@" 2>&1` -+ result=`$IP6TABLES${IPTABLES_OPTIONS:+ $IPTABLES_OPTIONS} "$@" 2>&1` - retval=$? - - if [ $retval -ne 0 ]; then -@@ -422,7 +422,7 @@ try_ip4tables() - { - local IFS=' ' - -- $IP4TABLES "$@" >/dev/null 2>&1 -+ $IP4TABLES${IPTABLES_OPTIONS:+ $IPTABLES_OPTIONS} "$@" >/dev/null 2>&1 - } - - -@@ -430,7 +430,7 @@ try_ip6tables() - { - local IFS=' ' - -- $IP6TABLES "$@" >/dev/null 2>&1 -+ $IP6TABLES${IPTABLES_OPTIONS:+ $IPTABLES_OPTIONS} "$@" >/dev/null 2>&1 - } - - -@@ -1672,6 +1672,13 @@ if [ -z "$DIG" ]; then - NSLOOKUP="$(find_command /usr/bin/nslookup)" - fi - -+# Enable xtables lock "wait" option found in iptables 1.4.20+ -+if $IP4TABLES -w --version >/dev/null 2>&1; then -+ IPTABLES_OPTIONS="-w" -+else -+ IPTABLES_OPTIONS="" -+fi -+ - # Setup IPv6 detected environment variable - if sysctl_key net.ipv6.conf; then - IPV6_DETECTED=1 Modified: branches/1.0/package/arnofw/arnofw.mk =================================================================== --- branches/1.0/package/arnofw/arnofw.mk 2015-08-08 14:07:11 UTC (rev 7189) +++ branches/1.0/package/arnofw/arnofw.mk 2015-08-13 22:43:35 UTC (rev 7190) @@ -3,20 +3,20 @@ # Arno's IPtables Firewall Script # ############################################################# -ARNOFW_VER:=2.0.1e -ARNOFW_ROOT:=arno-iptables-firewall -ARNOFW_SOURCE:=$(ARNOFW_ROOT)_$(ARNOFW_VER).tar.gz -ARNOFW_SITE:=http://rocky.eld.leidenuniv.nl/arno-iptables-firewall -#ARNOFW_SITE:=http://files.astlinux.org -ARNOFW_DIR:=$(BUILD_DIR)/$(ARNOFW_ROOT)_$(ARNOFW_VER) -ARNOFW_CAT:=zcat -ARNOFW_TARGET_BINARY:=/usr/sbin/arno-iptables-firewall -ARNOFW_CONFIG_DIR:=/etc/arno-iptables-firewall -ARNOFW_SCRIPT_DIR:=/usr/share/arno-iptables-firewall -ARNOFW_PLUGIN_CONFIG_DIR:=$(ARNOFW_CONFIG_DIR)/plugins -ARNOFW_PLUGIN_SCRIPT_DIR:=$(ARNOFW_SCRIPT_DIR)/plugins -ARNOFW_CONFIG_SHIM:=$(ARNOFW_SCRIPT_DIR)/astlinux.shim -ARNOFW_CONFIG_SERIAL:=$(ARNOFW_CONFIG_DIR)/serial +ARNOFW_VER := 2.0.1f-DEVEL +ARNOFW_ROOT := arno-iptables-firewall +ARNOFW_SOURCE := $(ARNOFW_ROOT)_$(ARNOFW_VER).tar.gz +#ARNOFW_SITE := http://rocky.eld.leidenuniv.nl/arno-iptables-firewall +ARNOFW_SITE := http://files.astlinux.org +ARNOFW_DIR := $(BUILD_DIR)/$(ARNOFW_ROOT)_$(ARNOFW_VER) +ARNOFW_CAT := zcat +ARNOFW_TARGET_BINARY := /usr/sbin/arno-iptables-firewall +ARNOFW_CONFIG_DIR := /etc/arno-iptables-firewall +ARNOFW_SCRIPT_DIR := /usr/share/arno-iptables-firewall +ARNOFW_PLUGIN_CONFIG_DIR := $(ARNOFW_CONFIG_DIR)/plugins +ARNOFW_PLUGIN_SCRIPT_DIR := $(ARNOFW_SCRIPT_DIR)/plugins +ARNOFW_CONFIG_SHIM := $(ARNOFW_SCRIPT_DIR)/astlinux.shim +ARNOFW_CONFIG_SERIAL := $(ARNOFW_CONFIG_DIR)/serial $(DL_DIR)/$(ARNOFW_SOURCE): $(WGET) -P $(DL_DIR) $(ARNOFW_SITE)/$(ARNOFW_SOURCE) @@ -50,8 +50,6 @@ -e 's:^ENV_FILE="[^"]*":ENV_FILE="$(ARNOFW_SCRIPT_DIR)/environment":' \ -e 's:^ENV_FILE=[^"]*$$:ENV_FILE="$(ARNOFW_SCRIPT_DIR)/environment":' \ -e 's:^LOCAL_CONFIG_FILE="":LOCAL_CONFIG_FILE="$(ARNOFW_CONFIG_SHIM)":' \ - -e 's:^IP4TABLES="[^"]*":IP4TABLES="$(IPTABLES_BIN)":' \ - -e 's:^IP6TABLES="[^"]*":IP6TABLES="$(IP6TABLES_BIN)":' \ -e 's:^(INT_IF|EXT_IF|MODEM_IF|INTERNAL_NET|NAT|NAT_INTERNAL_NET|EXT_IF_DHCP_IP)=:#&:' \ -e 's:^NAT_LOCAL_REDIRECT=0$$:NAT_LOCAL_REDIRECT=1:' \ -e 's:^IGMP_LOG=1$$:IGMP_LOG=0:' \ Modified: branches/1.0/package/arnofw/arnofw.serial =================================================================== --- branches/1.0/package/arnofw/arnofw.serial 2015-08-08 14:07:11 UTC (rev 7189) +++ branches/1.0/package/arnofw/arnofw.serial 2015-08-13 22:43:35 UTC (rev 7190) @@ -1 +1 @@ -0002~0024~0000~0000~0000~ +0002~0025~0000~0000~0000~ Modified: branches/1.0/package/arnofw/dyndns-host-open/50dyndns-host-open.plugin.sh =================================================================== --- branches/1.0/package/arnofw/dyndns-host-open/50dyndns-host-open.plugin.sh 2015-08-08 14:07:11 UTC (rev 7189) +++ branches/1.0/package/arnofw/dyndns-host-open/50dyndns-host-open.plugin.sh 2015-08-13 22:43:35 UTC (rev 7190) @@ -243,10 +243,12 @@ CONF_FILE="$PLUGIN_CONF_PATH/$PLUGIN_CONF_FILE" fi +# Preinit to success: +PLUGIN_RET_VAL=0 + # Check if the config file exists if [ ! -e "$CONF_FILE" ]; then printf "NOTE: Config file \"$CONF_FILE\" not found!\n Plugin \"$PLUGIN_NAME v$PLUGIN_VERSION\" ignored!\n" >&2 - PLUGIN_RET_VAL=0 else # Source the plugin config file . "$CONF_FILE" @@ -262,16 +264,16 @@ INDENT="$INDENT " # Only proceed if environment ok - if plugin_sanity_check; then + if ! plugin_sanity_check; then + PLUGIN_RET_VAL=1 + else case $PLUGIN_CMD in - start|'') plugin_start; PLUGIN_RET_VAL=$?;; - restart ) plugin_restart; PLUGIN_RET_VAL=$?;; - stop|stop-restart) plugin_stop; PLUGIN_RET_VAL=$?;; - status ) plugin_status; PLUGIN_RET_VAL=$?;; - * ) PLUGIN_RET_VAL=1; printf "\033[40m\033[1;31m${INDENT}ERROR: Invalid plugin option \"$PLUGIN_CMD\"!\033[0m\n" >&2;; + start|'') plugin_start; PLUGIN_RET_VAL=$? ;; + restart ) plugin_restart; PLUGIN_RET_VAL=$? ;; + stop|stop-restart) plugin_stop; PLUGIN_RET_VAL=$? ;; + status ) plugin_status; PLUGIN_RET_VAL=$? ;; + * ) PLUGIN_RET_VAL=1; printf "\033[40m\033[1;31m${INDENT}ERROR: Invalid plugin option \"$PLUGIN_CMD\"!\033[0m\n" >&2 ;; esac fi - else - PLUGIN_RET_VAL=0 fi fi Modified: branches/1.0/package/arnofw/miniupnpd/50miniupnpd.plugin.sh =================================================================== --- branches/1.0/package/arnofw/miniupnpd/50miniupnpd.plugin.sh 2015-08-08 14:07:11 UTC (rev 7189) +++ branches/1.0/package/arnofw/miniupnpd/50miniupnpd.plugin.sh 2015-08-13 22:43:35 UTC (rev 7190) @@ -129,10 +129,12 @@ CONF_FILE="$PLUGIN_CONF_PATH/$PLUGIN_CONF_FILE" fi +# Preinit to success: +PLUGIN_RET_VAL=0 + # Check if the config file exists if [ ! -e "$CONF_FILE" ]; then printf "NOTE: Config file \"$CONF_FILE\" not found!\n Plugin \"$PLUGIN_NAME v$PLUGIN_VERSION\" ignored!\n" >&2 - PLUGIN_RET_VAL=0 else # Source the plugin config file . "$CONF_FILE" @@ -148,17 +150,16 @@ INDENT="$INDENT " # Only proceed if environment ok - if plugin_sanity_check; then + if ! plugin_sanity_check; then + PLUGIN_RET_VAL=1 + else case $PLUGIN_CMD in - start|'') plugin_start; PLUGIN_RET_VAL=$?;; - restart ) plugin_restart; PLUGIN_RET_VAL=$?;; - stop|stop-restart) plugin_stop; PLUGIN_RET_VAL=$?;; - status ) plugin_status; PLUGIN_RET_VAL=$?;; - * ) PLUGIN_RET_VAL=1; printf "\033[40m\033[1;31m ERROR: Invalid plugin option \"$PLUGIN_CMD\"!\033[0m\n" >&2;; + start|'') plugin_start; PLUGIN_RET_VAL=$? ;; + restart ) plugin_restart; PLUGIN_RET_VAL=$? ;; + stop|stop-restart) plugin_stop; PLUGIN_RET_VAL=$? ;; + status ) plugin_status; PLUGIN_RET_VAL=$? ;; + * ) PLUGIN_RET_VAL=1; printf "\033[40m\033[1;31m ERROR: Invalid plugin option \"$PLUGIN_CMD\"!\033[0m\n" >&2 ;; esac fi - else - PLUGIN_RET_VAL=0 fi fi - Modified: branches/1.0/package/arnofw/openvpn-server/50openvpn-server.plugin.sh =================================================================== --- branches/1.0/package/arnofw/openvpn-server/50openvpn-server.plugin.sh 2015-08-08 14:07:11 UTC (rev 7189) +++ branches/1.0/package/arnofw/openvpn-server/50openvpn-server.plugin.sh 2015-08-13 22:43:35 UTC (rev 7190) @@ -102,10 +102,12 @@ CONF_FILE="$PLUGIN_CONF_PATH/$PLUGIN_CONF_FILE" fi +# Preinit to success: +PLUGIN_RET_VAL=0 + # Check if the config file exists if [ ! -e "$CONF_FILE" ]; then printf "NOTE: Config file \"$CONF_FILE\" not found!\n Plugin \"$PLUGIN_NAME v$PLUGIN_VERSION\" ignored!\n" >&2 - PLUGIN_RET_VAL=0 else # Source the plugin config file . "$CONF_FILE" @@ -121,16 +123,16 @@ INDENT="$INDENT " # Only proceed if environment ok - if plugin_sanity_check; then + if ! plugin_sanity_check; then + PLUGIN_RET_VAL=1 + else case $PLUGIN_CMD in - start|'') plugin_start; PLUGIN_RET_VAL=$?;; - restart ) plugin_restart; PLUGIN_RET_VAL=$?;; - stop|stop-restart) plugin_stop; PLUGIN_RET_VAL=$?;; - status ) plugin_status; PLUGIN_RET_VAL=$?;; - * ) PLUGIN_RET_VAL=1; printf "\033[40m\033[1;31m ERROR: Invalid plugin option \"$PLUGIN_CMD\"!\033[0m\n" >&2;; + start|'') plugin_start; PLUGIN_RET_VAL=$? ;; + restart ) plugin_restart; PLUGIN_RET_VAL=$? ;; + stop|stop-restart) plugin_stop; PLUGIN_RET_VAL=$? ;; + status ) plugin_status; PLUGIN_RET_VAL=$? ;; + * ) PLUGIN_RET_VAL=1; printf "\033[40m\033[1;31m ERROR: Invalid plugin option \"$PLUGIN_CMD\"!\033[0m\n" >&2 ;; esac fi - else - PLUGIN_RET_VAL=0 fi fi Modified: branches/1.0/package/arnofw/pptp-vpn/50pptp-vpn.plugin.sh =================================================================== --- branches/1.0/package/arnofw/pptp-vpn/50pptp-vpn.plugin.sh 2015-08-08 14:07:11 UTC (rev 7189) +++ branches/1.0/package/arnofw/pptp-vpn/50pptp-vpn.plugin.sh 2015-08-13 22:43:35 UTC (rev 7190) @@ -185,10 +185,12 @@ CONF_FILE="$PLUGIN_CONF_PATH/$PLUGIN_CONF_FILE" fi +# Preinit to success: +PLUGIN_RET_VAL=0 + # Check if the config file exists if [ ! -e "$CONF_FILE" ]; then printf "NOTE: Config file \"$CONF_FILE\" not found!\n Plugin \"$PLUGIN_NAME v$PLUGIN_VERSION\" ignored!\n" >&2 - PLUGIN_RET_VAL=0 else # Source the plugin config file . "$CONF_FILE" @@ -204,16 +206,16 @@ INDENT="$INDENT " # Only proceed if environment ok - if plugin_sanity_check; then + if ! plugin_sanity_check; then + PLUGIN_RET_VAL=1 + else case $PLUGIN_CMD in - start|'') plugin_start; PLUGIN_RET_VAL=$?;; - restart ) plugin_restart; PLUGIN_RET_VAL=$?;; - stop|stop-restart) plugin_stop; PLUGIN_RET_VAL=$?;; - status ) plugin_status; PLUGIN_RET_VAL=$?;; - * ) PLUGIN_RET_VAL=1; printf "\033[40m\033[1;31m ERROR: Invalid plugin option \"$PLUGIN_CMD\"!\033[0m\n" >&2;; + start|'') plugin_start; PLUGIN_RET_VAL=$? ;; + restart ) plugin_restart; PLUGIN_RET_VAL=$? ;; + stop|stop-restart) plugin_stop; PLUGIN_RET_VAL=$? ;; + status ) plugin_status; PLUGIN_RET_VAL=$? ;; + * ) PLUGIN_RET_VAL=1; printf "\033[40m\033[1;31m ERROR: Invalid plugin option \"$PLUGIN_CMD\"!\033[0m\n" >&2 ;; esac fi - else - PLUGIN_RET_VAL=0 fi fi Modified: branches/1.0/package/arnofw/sip-user-agent/30sip-user-agent.plugin.sh =================================================================== --- branches/1.0/package/arnofw/sip-user-agent/30sip-user-agent.plugin.sh 2015-08-08 14:07:11 UTC (rev 7189) +++ branches/1.0/package/arnofw/sip-user-agent/30sip-user-agent.plugin.sh 2015-08-13 22:43:35 UTC (rev 7190) @@ -150,10 +150,12 @@ CONF_FILE="$PLUGIN_CONF_PATH/$PLUGIN_CONF_FILE" fi +# Preinit to success: +PLUGIN_RET_VAL=0 + # Check if the config file exists if [ ! -e "$CONF_FILE" ]; then printf "NOTE: Config file \"$CONF_FILE\" not found!\n Plugin \"$PLUGIN_NAME v$PLUGIN_VERSION\" ignored!\n" >&2 - PLUGIN_RET_VAL=0 else # Source the plugin config file . "$CONF_FILE" @@ -169,16 +171,16 @@ INDENT="$INDENT " # Only proceed if environment ok - if plugin_sanity_check; then + if ! plugin_sanity_check; then + PLUGIN_RET_VAL=1 + else case $PLUGIN_CMD in - start|'') plugin_start; PLUGIN_RET_VAL=$?;; - restart ) plugin_restart; PLUGIN_RET_VAL=$?;; - stop|stop-restart) plugin_stop; PLUGIN_RET_VAL=$?;; - status ) plugin_status; PLUGIN_RET_VAL=$?;; - * ) PLUGIN_RET_VAL=1; printf "\033[40m\033[1;31m${INDENT}ERROR: Invalid plugin option \"$PLUGIN_CMD\"!\033[0m\n" >&2;; + start|'') plugin_start; PLUGIN_RET_VAL=$? ;; + restart ) plugin_restart; PLUGIN_RET_VAL=$? ;; + stop|stop-restart) plugin_stop; PLUGIN_RET_VAL=$? ;; + status ) plugin_status; PLUGIN_RET_VAL=$? ;; + * ) PLUGIN_RET_VAL=1; printf "\033[40m\033[1;31m${INDENT}ERROR: Invalid plugin option \"$PLUGIN_CMD\"!\033[0m\n" >&2 ;; esac fi - else - PLUGIN_RET_VAL=0 fi fi Modified: branches/1.0/package/arnofw/time-schedule-host-block/30time-schedule-host-block.plugin.sh =================================================================== --- branches/1.0/package/arnofw/time-schedule-host-block/30time-schedule-host-block.plugin.sh 2015-08-08 14:07:11 UTC (rev 7189) +++ branches/1.0/package/arnofw/time-schedule-host-block/30time-schedule-host-block.plugin.sh 2015-08-13 22:43:35 UTC (rev 7190) @@ -234,10 +234,12 @@ CONF_FILE="$PLUGIN_CONF_PATH/$PLUGIN_CONF_FILE" fi +# Preinit to success: +PLUGIN_RET_VAL=0 + # Check if the config file exists if [ ! -e "$CONF_FILE" ]; then printf "NOTE: Config file \"$CONF_FILE\" not found!\n Plugin \"$PLUGIN_NAME v$PLUGIN_VERSION\" ignored!\n" >&2 - PLUGIN_RET_VAL=0 else # Source the plugin config file . "$CONF_FILE" @@ -253,16 +255,16 @@ INDENT="$INDENT " # Only proceed if environment ok - if plugin_sanity_check; then + if ! plugin_sanity_check; then + PLUGIN_RET_VAL=1 + else case $PLUGIN_CMD in - start|'') plugin_start; PLUGIN_RET_VAL=$?;; - restart ) plugin_restart; PLUGIN_RET_VAL=$?;; - stop|stop-restart) plugin_stop; PLUGIN_RET_VAL=$?;; - status ) plugin_status; PLUGIN_RET_VAL=$?;; - * ) PLUGIN_RET_VAL=1; printf "\033[40m\033[1;31m ERROR: Invalid plugin option \"$PLUGIN_CMD\"!\033[0m\n" >&2;; + start|'') plugin_start; PLUGIN_RET_VAL=$? ;; + restart ) plugin_restart; PLUGIN_RET_VAL=$? ;; + stop|stop-restart) plugin_stop; PLUGIN_RET_VAL=$? ;; + status ) plugin_status; PLUGIN_RET_VAL=$? ;; + * ) PLUGIN_RET_VAL=1; printf "\033[40m\033[1;31m ERROR: Invalid plugin option \"$PLUGIN_CMD\"!\033[0m\n" >&2 ;; esac fi - else - PLUGIN_RET_VAL=0 fi fi Modified: branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh =================================================================== --- branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh 2015-08-08 14:07:11 UTC (rev 7189) +++ branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh 2015-08-13 22:43:35 UTC (rev 7190) @@ -438,10 +438,12 @@ CONF_FILE="$PLUGIN_CONF_PATH/$PLUGIN_CONF_FILE" fi +# Preinit to success: +PLUGIN_RET_VAL=0 + # Check if the config file exists if [ ! -e "$CONF_FILE" ]; then printf "NOTE: Config file \"$CONF_FILE\" not found!\n Plugin \"$PLUGIN_NAME v$PLUGIN_VERSION\" ignored!\n" >&2 - PLUGIN_RET_VAL=0 else # Source the plugin config file . "$CONF_FILE" @@ -456,15 +458,15 @@ INDENT="$INDENT " # Only proceed if environment ok - if plugin_sanity_check; then + if ! plugin_sanity_check; then + PLUGIN_RET_VAL=1 + else case $PLUGIN_CMD in - start|'') plugin_start; PLUGIN_RET_VAL=$?;; - stop ) plugin_stop; PLUGIN_RET_VAL=$?;; - status ) plugin_status; PLUGIN_RET_VAL=$?;; + start|'') plugin_start; PLUGIN_RET_VAL=$? ;; + stop ) plugin_stop; PLUGIN_RET_VAL=$? ;; + status ) plugin_status; PLUGIN_RET_VAL=$? ;; * ) PLUGIN_RET_VAL=1; printf "\033[40m\033[1;31m${INDENT}ERROR: Invalid plugin option \"$PLUGIN_CMD\"!\033[0m\n" >&2 ;; esac fi - else - PLUGIN_RET_VAL=0 fi fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-08 14:07:13
|
Revision: 7189 http://sourceforge.net/p/astlinux/code/7189 Author: abelbeck Date: 2015-08-08 14:07:11 +0000 (Sat, 08 Aug 2015) Log Message: ----------- update ChangeLog Modified Paths: -------------- branches/1.0/docs/ChangeLog.txt Modified: branches/1.0/docs/ChangeLog.txt =================================================================== --- branches/1.0/docs/ChangeLog.txt 2015-08-08 14:04:38 UTC (rev 7188) +++ branches/1.0/docs/ChangeLog.txt 2015-08-08 14:07:11 UTC (rev 7189) @@ -60,7 +60,7 @@ ** Asterisk --- Asterisk 1.8.32.3 (no change), 11.18.0 (no change) and 13.4.0 (no change) +-- Asterisk 1.8.32.3 (no change), 11.19.0 (version bump) and 13.5.0 (version bump) -- DAHDI, dahdi-linux 2.8.0.1 (no change) and dahdi-tools 2.8.0 (no change) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-08 14:04:40
|
Revision: 7188 http://sourceforge.net/p/astlinux/code/7188 Author: abelbeck Date: 2015-08-08 14:04:38 +0000 (Sat, 08 Aug 2015) Log Message: ----------- asterisk, version bump to 11.19.0 and 13.5.0 Modified Paths: -------------- branches/1.0/package/asterisk/asterisk-11-extension-changed-verbosity-chan_sip.patch branches/1.0/package/asterisk/asterisk-13-extension-changed-verbosity-chan_sip.patch branches/1.0/package/asterisk/asterisk.mk Modified: branches/1.0/package/asterisk/asterisk-11-extension-changed-verbosity-chan_sip.patch =================================================================== --- branches/1.0/package/asterisk/asterisk-11-extension-changed-verbosity-chan_sip.patch 2015-08-07 14:48:41 UTC (rev 7187) +++ branches/1.0/package/asterisk/asterisk-11-extension-changed-verbosity-chan_sip.patch 2015-08-08 14:04:38 UTC (rev 7188) @@ -1,6 +1,6 @@ --- asterisk-11.17.1/channels/chan_sip.c.orig 2015-04-23 10:22:04.000000000 -0500 +++ asterisk-11.17.1/channels/chan_sip.c 2015-04-23 10:22:40.000000000 -0500 -@@ -16734,7 +16734,7 @@ +@@ -16743,7 +16743,7 @@ } if (!force) { Modified: branches/1.0/package/asterisk/asterisk-13-extension-changed-verbosity-chan_sip.patch =================================================================== --- branches/1.0/package/asterisk/asterisk-13-extension-changed-verbosity-chan_sip.patch 2015-08-07 14:48:41 UTC (rev 7187) +++ branches/1.0/package/asterisk/asterisk-13-extension-changed-verbosity-chan_sip.patch 2015-08-08 14:04:38 UTC (rev 7188) @@ -1,6 +1,6 @@ --- asterisk-11.17.1/channels/chan_sip.c.orig 2015-04-23 10:22:04.000000000 -0500 +++ asterisk-11.17.1/channels/chan_sip.c 2015-04-23 10:22:40.000000000 -0500 -@@ -16871,7 +16871,7 @@ +@@ -16894,7 +16894,7 @@ } if (!force) { Modified: branches/1.0/package/asterisk/asterisk.mk =================================================================== --- branches/1.0/package/asterisk/asterisk.mk 2015-08-07 14:48:41 UTC (rev 7187) +++ branches/1.0/package/asterisk/asterisk.mk 2015-08-08 14:04:38 UTC (rev 7188) @@ -7,9 +7,9 @@ ASTERISK_VERSION := 1.8.32.3 else ifeq ($(BR2_PACKAGE_ASTERISK_v11),y) -ASTERISK_VERSION := 11.18.0 +ASTERISK_VERSION := 11.19.0 else -ASTERISK_VERSION := 13.4.0 +ASTERISK_VERSION := 13.5.0 endif endif ASTERISK_SOURCE := asterisk-$(ASTERISK_VERSION).tar.gz This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-07 14:48:43
|
Revision: 7187 http://sourceforge.net/p/astlinux/code/7187 Author: abelbeck Date: 2015-08-07 14:48:41 +0000 (Fri, 07 Aug 2015) Log Message: ----------- update ChangeLog Modified Paths: -------------- branches/1.0/docs/ChangeLog.txt Modified: branches/1.0/docs/ChangeLog.txt =================================================================== --- branches/1.0/docs/ChangeLog.txt 2015-08-07 14:47:43 UTC (rev 7186) +++ branches/1.0/docs/ChangeLog.txt 2015-08-07 14:48:41 UTC (rev 7187) @@ -12,7 +12,7 @@ ** System --- php, version bump to 5.5.27, bug and security fixes +-- php, version bump to 5.5.28, bug and security fixes -- perl, version 5.20.2 using perlcross 0.9.7 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-07 14:47:45
|
Revision: 7186 http://sourceforge.net/p/astlinux/code/7186 Author: abelbeck Date: 2015-08-07 14:47:43 +0000 (Fri, 07 Aug 2015) Log Message: ----------- php, version bump to 5.5.28 Modified Paths: -------------- branches/1.0/package/php/php.mk Modified: branches/1.0/package/php/php.mk =================================================================== --- branches/1.0/package/php/php.mk 2015-08-06 21:08:21 UTC (rev 7185) +++ branches/1.0/package/php/php.mk 2015-08-07 14:47:43 UTC (rev 7186) @@ -4,7 +4,7 @@ # ############################################################# -PHP_VERSION = 5.5.27 +PHP_VERSION = 5.5.28 PHP_SITE = http://www.php.net/distributions PHP_SOURCE = php-$(PHP_VERSION).tar.xz PHP_INSTALL_STAGING = YES This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-06 21:08:23
|
Revision: 7185 http://sourceforge.net/p/astlinux/code/7185 Author: abelbeck Date: 2015-08-06 21:08:21 +0000 (Thu, 06 Aug 2015) Log Message: ----------- update ChangeLog Modified Paths: -------------- branches/1.0/docs/ChangeLog.txt Modified: branches/1.0/docs/ChangeLog.txt =================================================================== --- branches/1.0/docs/ChangeLog.txt 2015-08-06 20:38:46 UTC (rev 7184) +++ branches/1.0/docs/ChangeLog.txt 2015-08-06 21:08:21 UTC (rev 7185) @@ -16,6 +16,8 @@ -- perl, version 5.20.2 using perlcross 0.9.7 +-- sudo, version bump to 1.8.14p3 + -- lm-sensors, version bump to 3.4.0 -- nano, version bump to 2.4.2 @@ -34,6 +36,8 @@ -- lighttpd, version bump to 1.4.36, security fix: CVE-2015-3200 Note: SSLv3 is now disabled by default, clients must support TLS. +-- OpenVPN, version bump to 2.3.8 + -- iptables, version bump to 1.4.21 -- libpcap, version bump to 1.7.4 @@ -70,7 +74,14 @@ and optional "Secondary Server" configuration. More Info: http://doc.astlinux.org/userdoc:tt_dnscrypt_proxy +-- PhoneProv tab, add real-time links for "Status", "Reload" and "Reboot" + == Status retrieves "sip show peer <account>" and displays a few useful lines. + == Reload issues "sip notify <reload> <account>" using the model or vendor to determine the <reload> argument + == Reboot issues "sip notify <reboot> <account>" using the model or vendor to determine the <reboot> argument +-- SQL-Data tab, version bump to phpLiteAdmin 1.9.6, modified for AstLinux + + Additions for AstLinux 1.2.3: ============================= This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-06 20:38:48
|
Revision: 7184 http://sourceforge.net/p/astlinux/code/7184 Author: abelbeck Date: 2015-08-06 20:38:46 +0000 (Thu, 06 Aug 2015) Log Message: ----------- web interface, SQL-Data tab, phpliteadmin upstream regression fix Ref: https://bitbucket.org/phpliteadmin/public/commits/b10da53486856961b9c1219168cab412e5855e84?at=master Modified Paths: -------------- branches/1.0/package/webinterface/altweb/admin/phpliteadmin.php Modified: branches/1.0/package/webinterface/altweb/admin/phpliteadmin.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/phpliteadmin.php 2015-08-06 15:39:29 UTC (rev 7183) +++ branches/1.0/package/webinterface/altweb/admin/phpliteadmin.php 2015-08-06 20:38:46 UTC (rev 7184) @@ -3204,7 +3204,7 @@ echo "<span style='font-size:11px;'>".htmlencode($master[0]['sql'])."</span>"; echo "</div>"; echo "<br/>"; - if($target_table_type == 'view') + if($target_table_type != 'view') { echo "<br/><hr/><br/>"; //$query = "SELECT * FROM sqlite_master WHERE type='index' AND tbl_name='".$target_table."'"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-06 15:39:32
|
Revision: 7183 http://sourceforge.net/p/astlinux/code/7183 Author: abelbeck Date: 2015-08-06 15:39:29 +0000 (Thu, 06 Aug 2015) Log Message: ----------- web interface, PhoneProv tab, add an HTTP external link for the Phone Web Admin using the status info data Modified Paths: -------------- branches/1.0/package/webinterface/altweb/admin/phoneprov.php Modified: branches/1.0/package/webinterface/altweb/admin/phoneprov.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/phoneprov.php 2015-08-06 04:05:40 UTC (rev 7182) +++ branches/1.0/package/webinterface/altweb/admin/phoneprov.php 2015-08-06 15:39:29 UTC (rev 7183) @@ -133,6 +133,19 @@ return($info); } +// Function: addSpecialInfo +// +function addSpecialInfo($label, $field) { + $str = ''; + + if (strtolower($label) === 'addr->ip') { + if (preg_match('/^([0-9]+[.][0-9]+[.][0-9]+[.][0-9]+).*$/', $field, $ips)) { + $str = ' <a href="http://'.$ips[1].'/" class="headerText" title="Phone Web Admin" target="_blank">Admin</a>'; + } + } + return($str); +} + // Function: isMACreload // function isMACreload($mac, $sql, $map) { @@ -823,7 +836,7 @@ echo '<tr ', ($i % 2 == 0) ? 'class="dtrow0"' : 'class="dtrow1"', '>'; echo '<td style="text-align: right;">'.htmlspecialchars($info_label).':</td>'; echo '<td colspan="6">'; - echo htmlspecialchars($info_field); + echo htmlspecialchars($info_field).addSpecialInfo($info_label, $info_field); echo '</td>'; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-06 04:05:43
|
Revision: 7182 http://sourceforge.net/p/astlinux/code/7182 Author: abelbeck Date: 2015-08-06 04:05:40 +0000 (Thu, 06 Aug 2015) Log Message: ----------- web interface, jump to the displayed Status link data Modified Paths: -------------- branches/1.0/package/webinterface/altweb/admin/phoneprov.php Modified: branches/1.0/package/webinterface/altweb/admin/phoneprov.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/phoneprov.php 2015-08-05 22:44:59 UTC (rev 7181) +++ branches/1.0/package/webinterface/altweb/admin/phoneprov.php 2015-08-06 04:05:40 UTC (rev 7182) @@ -799,7 +799,7 @@ putHtml("</tr>"); $mac = $data[$i]['mac']; echo '<tr ', ($i % 2 == 0) ? 'class="dtrow0"' : 'class="dtrow1"', '>'; - echo '<td><a href="'.$myself.'?key='.rawurlencode($mac).'" class="actionText">'.$mac.'</a>', '</td>'; + echo '<td'.($info_data_mac === $mac ? ' id="to_status"' : '').'><a href="'.$myself.'?key='.rawurlencode($mac).'" class="actionText">'.$mac.'</a>', '</td>'; echo '<td>', htmlspecialchars($data[$i]['template']), '</td>'; echo '<td>', wordwrap(htmlspecialchars(expandPHONEPROVexttext($data[$i])), 10, '<br />', FALSE), '</td>'; echo '<td>', htmlspecialchars(substr($data[$i]['password'], 0, 6)), '…', '</td>'; @@ -812,7 +812,7 @@ echo '<tr ', ($i % 2 == 0) ? 'class="dtrow0"' : 'class="dtrow1"', '>'; echo '<td style="text-align: right;" colspan="7">'; if ($sql['sip_driver'] !== 'pjsip') { - echo ' <a href="'.$myself.'?info='.rawurlencode($mac).'" class="headerText" title="Show SIP Peer Info">Status</a>'; + echo ' <a href="'.$myself.'?info='.rawurlencode($mac).'&#to_status" class="headerText" title="Show SIP Peer Info">Status</a>'; } echo ' <a href="'.$myself.'?reload='.rawurlencode($mac).'" class="headerText" title="Send SIP Notify to Reload Config">Reload</a>'; echo ' <a href="'.$myself.'?reboot='.rawurlencode($mac).'" class="headerText" title="Send SIP Notify to Reboot Phone">Reboot</a>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-05 22:45:01
|
Revision: 7181 http://sourceforge.net/p/astlinux/code/7181 Author: abelbeck Date: 2015-08-05 22:44:59 +0000 (Wed, 05 Aug 2015) Log Message: ----------- web interface, SQL-Data tab, version bump to phpLiteAdmin 1.9.6, modified for AstLinux Modified Paths: -------------- branches/1.0/package/webinterface/altweb/admin/phpliteadmin.php branches/1.0/package/webinterface/altweb/common/license-packages.txt branches/1.0/package/webinterface/altweb/common/phpliteadmin.js Modified: branches/1.0/package/webinterface/altweb/admin/phpliteadmin.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/phpliteadmin.php 2015-08-04 23:30:23 UTC (rev 7180) +++ branches/1.0/package/webinterface/altweb/admin/phpliteadmin.php 2015-08-05 22:44:59 UTC (rev 7181) @@ -1,38 +1,38 @@ <?php +// +// Project: phpLiteAdmin (https://bitbucket.org/phpliteadmin/public) +// Version: 1.9.6 +// Summary: PHP-based admin tool to manage SQLite2 and SQLite3 databases on the web +// Last updated: 2015-07-05 +// Developers: +// Dane Iracleous (dan...@gm...) +// Ian Aldrighetti (ian...@gm...) +// George Flanagin & Digital Gaslight, Inc (ge...@di...) +// Christopher Kramer (cra...@gm..., http://en.christosoft.de) +// Ayman Teryaki (http://havalite.com) +// Dreadnaut (dre...@gm..., http://dreadnaut.altervista.org) +// +// +// Copyright (C) 2015, phpLiteAdmin +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +// +// //////////////////////////////////////////////////////////////////////// +// +// Please report any bugs you may encounter to our issue tracker here: +// https://bitbucket.org/phpliteadmin/public/issues?status=new&status=open -// -// Project: phpLiteAdmin (http://phpliteadmin.googlecode.com) -// Version: 1.9.4.1 -// Summary: PHP-based admin tool to manage SQLite2 and SQLite3 databases on the web -// Last updated: 2013-03-18 -// Developers: -// Dane Iracleous (dan...@gm...) -// Ian Aldrighetti (ian...@gm...) -// George Flanagin & Digital Gaslight, Inc (ge...@di...) -// Christopher Kramer (cra...@gm..., http://en.christosoft.de) -// Ayman Teryaki (http://havalite.com) -// Dreadnaut (dre...@gm..., http://dreadnaut.altervista.org) -// -// -// Copyright (C) 2013 phpLiteAdmin -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. -// -/////////////////////////////////////////////////////////////////////////// - -//please report any bugs you encounter to http://code.google.com/p/phpliteadmin/issues/list - //AstLinux// Restrict to 'admin' or 'staff' user. function getPHPusername() { @@ -50,32 +50,19 @@ } //AstLinux// end of restrict to 'admin' or 'staff' user. -//BEGIN USER-DEFINED VARIABLES -////////////////////////////// - -// These are the default configuration value for phpLiteAdmin and will be overridden -// by the optional configuration file. Feel free to edit below if you want to use -// phpLiteAdmin as a single file; otherwise, rename phpliteadmin.config.sample.php to -// phpliteadmin.config.php and edit it. // -// Please see http://code.google.com/p/phpliteadmin/wiki/Configuration for more details +// This is sample configuration file +// +// You can configure phpliteadmin in one of 2 ways: +// 1. Rename phpliteadmin.config.sample.php to phpliteadmin.config.php and change parameters in there. +// You can set only your custom settings in phpliteadmin.config.php. All other settings will be set to defaults. +// 2. Change parameters directly in main phpliteadmin.php file +// +// Please see https://bitbucket.org/phpliteadmin/public/wiki/Configuration for more details //password to gain access $password = ''; -// Theme! If you want to change theme, save the CSS file in same folder of phpliteadmin or in folder 'themes' -$theme = 'phpliteadmin.css'; - -// the default language! If you want to change it, save the language file in same folder of phpliteadmin or in folder 'languages' -// More about localizations (downloads, how to translate etc.): http://code.google.com/p/phpliteadmin/wiki/Localization -$language = 'en'; - -// set default number of rows. You need to relog after changing the number -$rowsNum = 30; - -// reduce string characters by a number bigger than 10 -$charsNum = 300; - //directory relative to this file to search for databases (if false, manually list databases in the $databases variable) $directory = false; @@ -102,31 +89,57 @@ //AstLinux// end of define database files +/* ---- Interface settings ---- */ + +// Theme! If you want to change theme, save the CSS file in same folder of phpliteadmin or in folder "themes" +$theme = 'phpliteadmin.css'; + +// the default language! If you want to change it, save the language file in same folder of phpliteadmin or in folder "languages" +// More about localizations (downloads, how to translate etc.): https://bitbucket.org/phpliteadmin/public/wiki/Localization +$language = 'en'; + +// set default number of rows. You need to relog after changing the number +$rowsNum = 30; + +// reduce string characters by a number bigger than 10 +$charsNum = 300; + +// maximum number of SQL queries to save in the history +$maxSavedQueries = 10; + +/* ---- Custom functions ---- */ + //a list of custom functions that can be applied to columns in the databases //make sure to define every function below if it is not a core PHP function -$custom_functions = array('md5', 'sha1', 'time', 'strtotime'); +$custom_functions = array( + 'md5', 'sha1', 'time', 'strtotime', + // add the names of your custom functions to this array + /* 'leet_text', */ +); +// define your custom functions here +/* +function leet_text($value) +{ + return strtr($value, 'eaAsSOl', '344zZ01'); +} +*/ + + +/* ---- Advanced options ---- */ + //changing the following variable allows multiple phpLiteAdmin installs to work under the same domain. $cookie_name = 'pla3412'; //whether or not to put the app in debug mode where errors are outputted $debug = false; -// the user is allowed to create databases with only these extensions +// the user is allowed to create databases with only these extensions $allowed_extensions = array('db','db3','sqlite','sqlite3'); -//////////////////////////// -//END USER-DEFINED VARIABLES -// load optional configuration file -//$config_filename = './phpliteadmin.config.php'; -//if (is_readable($config_filename)) { -// include_once $config_filename; -//} - - -// Start English language-texts -// Read our wiki on how to translate: http://code.google.com/p/phpliteadmin/wiki/Localization +// English language-texts. +// Read our wiki on how to translate: https://bitbucket.org/phpliteadmin/public/wiki/Localization $lang = array( "direction" => "LTR", "date_format" => 'M d H:i:s T Y', //AstLinux// @@ -135,6 +148,7 @@ "to" => "to", "go" => "Go", "yes" => "Yes", + "no" => "No", "sql" => "SQL", "csv" => "CSV", "csv_tbl" => "Table that CSV pertains to", @@ -178,6 +192,9 @@ "autoincrement" => "Autoincrement", "not_null" => "Not NULL", "attention" => "Attention", + "none" => "None", + "as_defined" => "As defined", + "expression" => "Expression", "sqlite_ext" => "SQLite extension", "sqlite_ext_support" => "It appears that none of the supported SQLite library extensions are available in your installation of PHP. You may not use %s until you install at least one of them.", @@ -187,6 +204,7 @@ "sqlite_limit" => "Due to the limitations of SQLite, only the field name and data type can be modified.", "php_v" => "PHP version", + "new_version" => "There is a new version!", "db_dump" => "database dump", "db_f" => "database file", @@ -218,6 +236,8 @@ "bad_php_directive" => "It appears that the PHP directive, 'register_globals' is enabled. This is bad. You need to disable it before continuing.", "page_gen" => "Page generated in %s seconds.", "powered" => "Powered by", + "free_software" => "This is free software.", + "please_donate" => "Please donate.", "remember" => "Remember me", "no_db" => "Welcome to %s. It appears that you have selected to scan a directory for databases to manage. However, %s could not find any valid SQLite databases. You may use the form below to create your first database.", "no_db2" => "The directory you specified does not contain any existing databases to manage, and the directory is not writable. This means you can't create any new databases using %s. Either make the directory writable or manually upload databases to the directory.", @@ -279,15 +299,19 @@ "query_time" => "(Query took %s sec)", "syntax_err" => "There is a problem with the syntax of your query (Query was not executed)", "run_sql" => "Run SQL query/queries on database '%s'", + "recent_queries" => "Recent Queries", + "full_texts" => "Show full texts", + "no_full_texts" => "Shorten long texts", "ques_empty" => "Are you sure you want to empty the table '%s'?", "ques_drop" => "Are you sure you want to drop the table '%s'?", "ques_drop_view" => "Are you sure you want to drop the view '%s'?", "ques_del_rows" => "Are you sure you want to delete row(s) %s from table '%s'?", "ques_del_db" => "Are you sure you want to delete the database '%s'?", - "ques_del_col" => "Are you sure you want to delete column(s) %s from table '%s'?", + "ques_column_delete" => "Are you sure you want to delete column(s) %s from table '%s'?", "ques_del_index" => "Are you sure you want to delete index '%s'?", "ques_del_trigger" => "Are you sure you want to delete trigger '%s'?", + "ques_primarykey_add" => "Are you sure you want to add a primary key for the column(s) %s in table '%s'?", "export_struct" => "Export with structure", "export_data" => "Export with data", @@ -356,6 +380,7 @@ "warn0" => "You have been warned.", "warn_passwd" => "You are using the default password, which can be dangerous. You can change it easily at the top of %s.", "warn_dumbass" => "You didn't change the value dumbass ;-)", + "counting_skipped" => "Counting of records has been skipped for some tables because your database is comparably big and some tables don't have primary keys assigned to them so counting might be slow. Add a primary key to these tables or %sforce counting%s.", "sel_state" => "Select Statement", "delimit" => "Delimiter", "back_top" => "Back to Top", @@ -402,26 +427,37 @@ "help8_x" => "During the process for exporting to an SQL file, you may choose to wrap the queries around a TRANSACTION so that if an error occurs at any time during the importation process using the exported file, the database can be reverted to its previous state, preventing partially updated data from populating the database.", "help9" => "Add Comments to Exported SQL File", "help9_x" => "During the process for exporting to an SQL file, you may choose to include comments that explain each step of the process so that a human can better understand what is happening." - - ); +); //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //there is no reason for the average user to edit anything below this comment //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +//- Initialization + +//AstLinux// +// load optional configuration file +//$config_filename = './phpliteadmin.config.php'; +//if (is_readable($config_filename)) { +// include_once $config_filename; +//} + //constants 1 define("PROJECT", "phpLiteAdmin"); -define("VERSION", "1.9.4.1"); +define("VERSION", "1.9.6"); define("PAGE", basename(__FILE__)); //AstLinux// Force PDO define("FORCETYPE", "PDO"); //force the extension that will be used (set to false in almost all circumstances except debugging) define("SYSTEMPASSWORD", $password); // Makes things easier. -define('PROJECT_URL','http://phpliteadmin.googlecode.com'); -define('PROJECT_BUGTRACKER_LINK','<a href="http://code.google.com/p/phpliteadmin/issues/list" target="_blank">http://code.google.com/p/phpliteadmin/issues/list</a>'); +define('PROJECT_URL','https://bitbucket.org/phpliteadmin/public'); +define('DONATE_URL','http://phpliteadmin.christosoft.de/donate.php'); +define('VERSION_CHECK_URL','https://phpliteadmin.christosoft.de/current_version.php'); +define('PROJECT_BUGTRACKER_LINK','<a href="https://bitbucket.org/phpliteadmin/public/issues?status=new&status=open" target="_blank">https://bitbucket.org/phpliteadmin/public/issues?status=new&status=open</a>'); +define('PROJECT_INSTALL_LINK','<a href="https://bitbucket.org/phpliteadmin/public/wiki/Installation" target="_blank">https://bitbucket.org/phpliteadmin/public/wiki/Installation</a>'); // Resource output (css and javascript files) -//AstLinux// Remove all 'resource' related code, use external files instead +//AstLinux// Remove all 'resource' (?resource=) related code, use .js and .css external files instead // don't mess with this - required for the login session ini_set('session.cookie_httponly', '1'); @@ -452,10 +488,13 @@ // load language file if($language != 'en') { + $temp_lang=$lang; if(is_file('languages/lang_'.$language.'.php')) include('languages/lang_'.$language.'.php'); elseif(is_file('lang_'.$language.'.php')) include('lang_'.$language.'.php'); + $lang = array_merge($temp_lang, $lang); + unset($temp_lang); } // version-number added so after updating, old session-data is not used anylonger // cookies names cannot contain symbols, except underscores @@ -482,14 +521,13 @@ //data types array -$types = array("INTEGER", "REAL", "TEXT", "BLOB"); -define("DATATYPES", serialize($types)); +$sqlite_datatypes = array("INTEGER", "REAL", "TEXT", "BLOB","NUMERIC","BOOLEAN","DATETIME"); //available SQLite functions array (don't add anything here or there will be problems) -$functions = array("abs", "hex", "length", "lower", "ltrim", "random", "round", "rtrim", "trim", "typeof", "upper"); -define("FUNCTIONS", serialize($functions)); -define("CUSTOM_FUNCTIONS", serialize($custom_functions)); +$sqlite_functions = array("abs", "hex", "length", "lower", "ltrim", "random", "round", "rtrim", "trim", "typeof", "upper"); +//- Support functions + //function that allows SQL delimiter to be ignored inside comments or strings function explode_sql($delimiter, $sql) { @@ -582,7 +620,7 @@ function helpLink($name) { global $lang; - return "<a href='".PAGE."?help=1' onclick='openHelp(\"".$name."\"); return false;' class='helpq' title='".$lang['help'].": ".$name."' target='_blank'><span>[?]</span></a>"; + return "<a href='?help=1' onclick='openHelp(\"".$name."\"); return false;' class='helpq' title='".$lang['help'].": ".$name."' target='_blank'><span>[?]</span></a>"; } // function to encode value into HTML just like htmlentities, but with adjusted default settings @@ -602,19 +640,13 @@ function subString($str) { global $charsNum; - if($charsNum > 10){ - if(strlen($str)>$charsNum) $str = substr($str, 0, $charsNum).'...'; + if($charsNum > 10 && !$_SESSION[COOKIENAME.'fulltexts'] && strlen($str)>$charsNum) + { + $str = substr($str, 0, $charsNum).'...'; } return $str; } -function getRowId($table, $where=''){ - global $db; - $query = "SELECT ROWID FROM ".$db->quote_id($table).$where; - $result = $db->selectArray($query); - return $result; -} - // checks the (new) name of a database file function checkDbName($name) { @@ -649,7 +681,3538 @@ return false; } +// from a typename of a colun, get the type of the column's affinty +// see http://www.sqlite.org/datatype3.html section 2.1 for rules +function get_type_affinity($type) +{ + if (preg_match("/INT/i", $type)) + return "INTEGER"; + else if (preg_match("/(?:CHAR|CLOB|TEXT)/i", $type)) + return "TEXT"; + else if (preg_match("/BLOB/i", $type) || $type=="") + return "NONE"; + else if (preg_match("/(?:REAL|FLOA|DOUB)/i", $type)) + return "REAL"; + else + return "NUMERIC"; +} + + +//- Check user authentication, login and logout +$auth = new Authorization(); //create authorization object + +//AstLinux// +// check if user has attempted to log out +//if (isset($_POST['logout'])) +// $auth->revoke(); +// check if user has attempted to log in +//else if (isset($_POST['login']) && isset($_POST['password'])) +// $auth->attemptGrant($_POST['password'], isset($_POST['remember'])); + +//- Actions on database files and bulk data +if ($auth->isAuthorized()) +{ + + //- Create a new database + if(isset($_POST['new_dbname'])) + { + if($_POST['new_dbname']=='') + { + // TODO: Display an error message (do NOT echo here. echo below in the html-body!) + } + else + { + $str = preg_replace('@[^\w-.]@','', $_POST['new_dbname']); + $dbname = $str; + $dbpath = $str; + if(checkDbName($dbname)) + { + $tdata = array(); + $tdata['name'] = $dbname; + $tdata['path'] = $directory.DIRECTORY_SEPARATOR.$dbpath; + $td = new Database($tdata); + $td->query("VACUUM"); + } else + { + if(is_file($dbname) || is_dir($dbname)) $dbexists = true; + else $extension_not_allowed=true; + } + } + } + + //- Scan a directory for databases + if($directory!==false) + { + if($directory[strlen($directory)-1]==DIRECTORY_SEPARATOR) //if user has a trailing slash in the directory, remove it + $directory = substr($directory, 0, strlen($directory)-1); + + if(is_dir($directory)) //make sure the directory is valid + { + if($subdirectories===true) + $arr = dir_tree($directory); + else + $arr = scandir($directory); + $databases = array(); + $j = 0; + for($i=0; $i<sizeof($arr); $i++) //iterate through all the files in the databases + { + if($subdirectories===false) + $arr[$i] = $directory.DIRECTORY_SEPARATOR.$arr[$i]; + + if(@!is_file($arr[$i])) continue; + $con = file_get_contents($arr[$i], NULL, NULL, 0, 60); + if(strpos($con, "** This file contains an SQLite 2.1 database **", 0)!==false || strpos($con, "SQLite format 3", 0)!==false) + { + $databases[$j]['path'] = $arr[$i]; + if($subdirectories===false) + $databases[$j]['name'] = basename($arr[$i]); + else + $databases[$j]['name'] = $arr[$i]; + $databases[$j]['writable'] = is_writable($databases[$j]['path']); + $databases[$j]['writable_dir'] = is_writable(dirname($databases[$j]['path'])); + $databases[$j]['readable'] = is_readable($databases[$j]['path']); + $j++; + } + } + // 22 August 2011: gkf fixed bug #50. + sort($databases); + if(isset($tdata)) + { + foreach($databases as $db_id => $database) + { + if($database['path'] == $tdata['path']) + { + $_SESSION[COOKIENAME.'currentDB'] = $database; + break; + } + } + } + } + else //the directory is not valid - display error and exit + { + echo "<div class='confirm' style='margin:20px;'>".$lang['not_dir']."</div>"; + exit(); + } + } + else + { + for($i=0; $i<sizeof($databases); $i++) + { + if(!file_exists($databases[$i]['path'])) + continue; //skip if file not found ! - probably a warning can be displayed - later + $databases[$i]['writable'] = is_writable($databases[$i]['path']); + $databases[$i]['writable_dir'] = is_writable(dirname($databases[$i]['path'])); + $databases[$i]['readable'] = is_readable($databases[$i]['path']); + } + sort($databases); + } + // we now have the $databases array set. Check whethet currentDB is a managed Db (is in this array) + if(isset($_SESSION[COOKIENAME.'currentDB']) && isManagedDB($_SESSION[COOKIENAME.'currentDB']['path']) === false) + unset($_SESSION[COOKIENAME.'currentDB']); + + //- Delete an existing database + if(isset($_GET['database_delete'])) + { + $dbpath = $_POST['database_delete']; + // check whether $dbpath really is a db we manage + $checkDB = isManagedDB($dbpath); + if($checkDB !== false) + { + unlink($dbpath); + unset($_SESSION[COOKIENAME.'currentDB']); + unset($databases[$checkDB]); + } else die($lang['err'].': '.$lang['delete_only_managed']); + } + + //- Rename an existing database + if(isset($_GET['database_rename'])) + { + $oldpath = $_POST['oldname']; + $newpath = $_POST['newname']; + $oldpath_parts = pathinfo($oldpath); + $newpath_parts = pathinfo($newpath); + // only rename? + $newpath = $oldpath_parts['dirname'].DIRECTORY_SEPARATOR.basename($_POST['newname']); + if($newpath != $_POST['newname'] && $subdirectories) + { + // it seems that the file should not only be renamed but additionally moved. + // we need to make sure it stays within $directory... + $new_realpath = realpath($newpath_parts['dirname']).DIRECTORY_SEPARATOR; + $directory_realpath = realpath($directory).DIRECTORY_SEPARATOR; + if(strpos($new_realpath, $directory_realpath)===0) + { + // its okay, the new directory is within $directory + $newpath = $_POST['newname']; + } + else die($lang['err'].': '.$lang['db_moved_outside']); + } + + if(checkDbName($newpath)) + { + $checkDB = isManagedDB($oldpath); + if($checkDB !==false ) + { + rename($oldpath, $newpath); + $databases[$checkDB]['path'] = $newpath; + $databases[$checkDB]['name'] = basename($newpath); + $_SESSION[COOKIENAME.'currentDB'] = $databases[$checkDB]; + $justrenamed = true; + } + else die($lang['err'].': '.$lang['rename_only_managed']); + } + else + { + if(is_file($newpath) || is_dir($newpath)) $dbexists = true; + else $extension_not_allowed = true; + } + } + + + //- Export (download a dump) an existing database + if(isset($_POST['export'])) + { + $export_filename = str_replace(array("\r", "\n"), '',$_POST['filename']); // against http header injection (php < 5.1.2 only) + if($_POST['export_type']=="sql") + { + header('Content-Type: text/sql'); + header('Content-Disposition: attachment; filename="'.$export_filename.'.'.$_POST['export_type'].'";'); + if(isset($_POST['tables'])) + $tables = $_POST['tables']; + else + { + $tables = array(); + $tables[0] = $_POST['single_table']; + } + $drop = isset($_POST['drop']); + $structure = isset($_POST['structure']); + $data = isset($_POST['data']); + $transaction = isset($_POST['transaction']); + $comments = isset($_POST['comments']); + $db = new Database($_SESSION[COOKIENAME.'currentDB']); + echo $db->export_sql($tables, $drop, $structure, $data, $transaction, $comments); + } + else if($_POST['export_type']=="csv") + { + header("Content-type: application/csv"); + header('Content-Disposition: attachment; filename="'.$export_filename.'.'.$_POST['export_type'].'";'); + header("Pragma: no-cache"); + header("Expires: 0"); + if(isset($_POST['tables'])) + $tables = $_POST['tables']; + else + { + $tables = array(); + $tables[0] = $_POST['single_table']; + } + $field_terminate = $_POST['export_csv_fieldsterminated']; + $field_enclosed = $_POST['export_csv_fieldsenclosed']; + $field_escaped = $_POST['export_csv_fieldsescaped']; + $null = $_POST['export_csv_replacenull']; + $crlf = isset($_POST['export_csv_crlf']); + $fields_in_first_row = isset($_POST['export_csv_fieldnames']); + $db = new Database($_SESSION[COOKIENAME.'currentDB']); + echo $db->export_csv($tables, $field_terminate, $field_enclosed, $field_escaped, $null, $crlf, $fields_in_first_row); + } + exit(); + } + + //- Import a file into an existing database + if(isset($_POST['import'])) + { + $db = new Database($_SESSION[COOKIENAME.'currentDB']); + $db->registerUserFunction($custom_functions); + //AstLinux// missing file fix. + if ($_FILES["file"]["tmp_name"] !== '') { + if($_POST['import_type']=="sql") + { + $data = file_get_contents($_FILES["file"]["tmp_name"]); + $importSuccess = $db->import_sql($data); + } + else + { + $field_terminate = $_POST['import_csv_fieldsterminated']; + $field_enclosed = $_POST['import_csv_fieldsenclosed']; + $field_escaped = $_POST['import_csv_fieldsescaped']; + $null = $_POST['import_csv_replacenull']; + $fields_in_first_row = isset($_POST['import_csv_fieldnames']); + $importSuccess = $db->import_csv($_FILES["file"]["tmp_name"], $_POST['single_table'], $field_terminate, $field_enclosed, $field_escaped, $null, $fields_in_first_row); + } + } + else + { + $importSuccess = 'No File Selected, choose a file.'; + } + //AstLinux// end of missing file fix. + } + //- Download (backup) a database file (as SQLite file, not as dump) + if(isset($_GET['download']) && isManagedDB($_GET['download'])!==false) + { + header("Content-type: application/octet-stream"); + header('Content-Disposition: attachment; filename="'.basename($_GET['download']).'";'); + header("Pragma: no-cache"); + header("Expires: 0"); + readfile($_GET['download']); + exit; + } +} + +//- HTML: output starts here +header('Content-Type: text/html; charset=utf-8'); +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> +<!-- Copyright <?php echo date("Y").' '.PROJECT.' ('.PROJECT_URL.')'; ?> --> +<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /> +<title><?php echo PROJECT ?></title> + +<?php +//AstLinux// use external style sheet. +echo "<link href='/common/phpliteadmin.css' rel='stylesheet' type='text/css' />", PHP_EOL; +//- HTML: css/theme include +//if(isset($_GET['theme'])) $theme = basename($_GET['theme']); // +// allow themes to be dropped in subfolder "themes" +//if(is_file('themes/'.$theme)) $theme = 'themes/'.$theme; +// +//if (file_exists($theme)) +// // an external stylesheet exists - import it +// echo "<link href='{$theme}' rel='stylesheet' type='text/css' />", PHP_EOL; +//else +// // only use the default stylesheet if an external one does not exist +// echo "<link href='?resource=css' rel='stylesheet' type='text/css' />", PHP_EOL; +//AstLinux// + +// HTML: output help text, then exit +if(isset($_GET['help'])) +{ + //help section array + $help = array + ( + $lang['help1'] => sprintf($lang['help1_x'], PROJECT, PROJECT, PROJECT), $lang['help2'] => $lang['help2_x'], $lang['help3'] => $lang['help3_x'], + $lang['help4'] => $lang['help4_x'], $lang['help5'] => $lang['help5_x'], $lang['help6'] => $lang['help6_x'], + $lang['help7'] => $lang['help7_x'], $lang['help8'] => $lang['help8_x'], $lang['help9'] => $lang['help9_x'] + ); + ?> + </head> + <body style="direction:<?php echo $lang['direction']; ?>;"> + <div id='help_container'> + <?php + echo "<div class='help_list'>"; + echo "<span style='font-size:18px;'>".PROJECT." v".VERSION." ".$lang['help_doc']."</span><br/><br/>"; + foreach((array)$help as $key => $val) + { + echo "<a href='#".$key."'>".$key."</a><br/>"; + } + echo "</div>"; + echo "<br/><br/>"; + foreach((array)$help as $key => $val) + { + echo "<div class='help_outer'>"; + echo "<a class='headd' name='".$key."'>".$key."</a>"; + echo "<div class='help_inner'>"; + echo $val; + echo "</div>"; + echo "<a class='help_top' href='#top'>".$lang['back_top']."</a>"; + echo "</div>"; + } + ?> + </div> + </body> + </html> + <?php + exit(); +} + +//- Javascript include +?> +<!-- JavaScript Support --> +<script type='text/javascript' src='/common/phpliteadmin.js'></script> +</head> +<body style="direction:<?php echo $lang['direction']; ?>;"> +<?php +if(ini_get("register_globals") == "on" || ini_get("register_globals")=="1") //check whether register_globals is turned on - if it is, we need to not continue +{ + echo "<div class='confirm' style='margin:20px;'>".$lang['bad_php_directive']."</div>"; + echo "</body></html>"; + exit(); +} + +//- HTML: login screen if not authorized, exit +if(!$auth->isAuthorized()) +{ + echo "<div id='loginBox'>"; + echo "<h1><span id='logo'>".PROJECT."</span> <span id='version'>v".VERSION."</span></h1>"; + echo "<div style='padding:15px; text-align:center;'>"; + if ($auth->isFailedLogin()) + echo "<span class='warning'>".$lang['passwd_incorrect']."</span><br/><br/>"; + echo "<form action='".PAGE."' method='post'>"; + echo $lang['passwd'].": <input type='password' name='password'/><br/>"; + echo "<label><input type='checkbox' name='remember' value='yes' checked='checked'/> ".$lang['remember']."</label><br/><br/>"; + echo "<input type='submit' value='".$lang['login']."' class='btn'/>"; + echo "<input type='hidden' name='login' value='true' />"; + echo "</form>"; + echo "</div>"; + echo "</div>"; + echo "<br/>"; + //AstLinux// + //echo "<div style='text-align:center;'>"; + //echo "<span style='font-size:11px;'>".$lang['powered']." <a href='".PROJECT_URL."' target='_blank' style='font-size:11px;'>".PROJECT."</a> | "; + //printf($lang['page_gen'], $pageTimer); + //echo "</span></div>"; + echo "</body></html>"; + exit(); +} + +//- User is authorized, display the main application + +//- Select database (from session or first available) +if(!isset($_SESSION[COOKIENAME.'currentDB']) && count($databases)>0) +{ + //set the current database to the first existing one in the array (default) + $_SESSION[COOKIENAME.'currentDB'] = reset($databases); +} +if(sizeof($databases)>0) + $currentDB = $_SESSION[COOKIENAME.'currentDB']; +else // the database array is empty, offer to create a new database +{ + //- HTML: form to create a new database, exit + if($directory!==false && is_writable($directory)) + { + echo "<div class='confirm' style='margin:20px;'>"; + printf($lang['no_db'], PROJECT, PROJECT); + echo "</div>"; + if(isset($extension_not_allowed)) + { + echo "<div class='confirm' style='margin:10px 20px;'>"; + echo $lang['err'].': '.$lang['extension_not_allowed'].': '; + echo implode(', ', array_map('htmlencode', $allowed_extensions)); + echo '<br />'.$lang['add_allowed_extension']; + echo "</div><br/>"; + } + echo "<fieldset style='margin:15px;'><legend><b>".$lang['db_create']."</b></legend>"; + echo "<form name='create_database' method='post' action='".PAGE."'>"; + echo "<input type='text' name='new_dbname' style='width:150px;'/> <input type='submit' value='".$lang['create']."' class='btn'/>"; + echo "</form>"; + echo "</fieldset>"; + } + else + { + echo "<div class='confirm' style='margin:20px;'>"; + echo $lang['err'].": ".sprintf($lang['no_db2'], PROJECT); + echo "</div><br/>"; + } + exit(); +} + +//- Switch to a different database with drop-down menu +if(isset($_POST['database_switch'])) +{ + foreach($databases as $db_id => $database) + { + if($database['path'] == $_POST['database_switch']) + { + $_SESSION[COOKIENAME."currentDB"] = $database; + break; + } + } + $currentDB = $_SESSION[COOKIENAME.'currentDB']; +} +else if(isset($_GET['switchdb'])) +{ + foreach($databases as $db_id => $database) + { + if($database['path'] == $_GET['switchdb']) + { + $_SESSION[COOKIENAME."currentDB"] = $database; + break; + } + } + $currentDB = $_SESSION[COOKIENAME.'currentDB']; +} +if(isset($_SESSION[COOKIENAME.'currentDB']) && in_array($_SESSION[COOKIENAME.'currentDB'], $databases)) + $currentDB = $_SESSION[COOKIENAME.'currentDB']; + +//- Open database (creates a Database object) +$db = new Database($currentDB); //create the Database object +$db->registerUserFunction($custom_functions); + +// collect parameters early, just once +$target_table = isset($_GET['table']) ? $_GET['table'] : null; + +//- Switch on $_GET['action'] for operations without output +if(isset($_GET['action']) && isset($_GET['confirm'])) +{ + switch($_GET['action']) + { + //- Table actions + + //- Create table (=table_create) + case "table_create": + if ($global_user === 'staff') { //AstLinux// + $completed = "Failed: Insufficient 'staff' user privileges for action: ".$_GET['action']; + } else { + $num = intval($_POST['rows']); + $name = $_POST['tablename']; + $primary_keys = array(); + for($i=0; $i<$num; $i++) + { + if($_POST[$i.'_field']!="" && isset($_POST[$i.'_primarykey'])) + { + $primary_keys[] = $_POST[$i.'_field']; + } + } + $query = "CREATE TABLE ".$db->quote($name)." ("; + for($i=0; $i<$num; $i++) + { + if($_POST[$i.'_field']!="") + { + $query .= $db->quote($_POST[$i.'_field'])." "; + $query .= $_POST[$i.'_type']." "; + if(isset($_POST[$i.'_primarykey'])) + { + if(count($primary_keys)==1) + { + $query .= "PRIMARY KEY "; + if(isset($_POST[$i.'_autoincrement']) && $db->getType() != "SQLiteDatabase") + $query .= "AUTOINCREMENT "; + } + $query .= "NOT NULL "; + } + if(!isset($_POST[$i.'_primarykey']) && isset($_POST[$i.'_notnull'])) + $query .= "NOT NULL "; + if($_POST[$i.'_defaultoption']!='defined' && $_POST[$i.'_defaultoption']!='none' && $_POST[$i.'_defaultoption']!='expr') + $query .= "DEFAULT ".$_POST[$i.'_defaultoption']." "; + elseif($_POST[$i.'_defaultoption']=='expr') + $query .= "DEFAULT (".$_POST[$i.'_defaultvalue'].") "; + elseif(isset($_POST[$i.'_defaultvalue']) && $_POST[$i.'_defaultoption']=='defined') + { + $typeAffinity = get_type_affinity($_POST[$i.'_type']); + if(($typeAffinity=="INTEGER" || $typeAffinity=="REAL" || $typeAffinity=="NUMERIC") && is_numeric($_POST[$i.'_defaultvalue'])) + $query .= "DEFAULT ".$_POST[$i.'_defaultvalue']." "; + else + $query .= "DEFAULT ".$db->quote($_POST[$i.'_defaultvalue'])." "; + } + $query = substr($query, 0, sizeof($query)-2); + $query .= ", "; + } + } + if (count($primary_keys)>1) + { + $compound_key = ""; + foreach ($primary_keys as $primary_key) + { + $compound_key .= ($compound_key=="" ? "" : ", ") . $db->quote($primary_key); + } + $query .= "PRIMARY KEY (".$compound_key."), "; + } + $query = substr($query, 0, sizeof($query)-3); + $query .= ")"; + $result = $db->query($query); + if($result===false) + $error = true; + $completed = $lang['tbl']." '".htmlencode($_POST['tablename'])."' ".$lang['created'].".<br/><span style='font-size:11px;'>".htmlencode($query)."</span>"; + } //AstLinux// + $backlinkParameters = "&action=column_view&table=".urlencode($name); + break; + + //- Empty table (=table_empty) + case "table_empty": + if ($global_user === 'staff') { //AstLinux// + $completed = "Failed: Insufficient 'staff' user privileges for action: ".$_GET['action']; + } else { + $query = "DELETE FROM ".$db->quote_id($_POST['tablename']); + $result = $db->query($query); + if($result===false) + $error = true; + $query = "VACUUM"; + $result = $db->query($query); + if($result===false) + $error = true; + $completed = $lang['tbl']." '".htmlencode($_POST['tablename'])."' ".$lang['emptied'].".<br/><span style='font-size:11px;'>".htmlencode($query)."</span>"; + } //AstLinux// + $backlinkParameters = "&action=row_view&table=".urlencode($name); + break; + + //- Create view (=view_create) + case "view_create": + if ($global_user === 'staff') { //AstLinux// + $completed = "Failed: Insufficient 'staff' user privileges for action: ".$_GET['action']; + } else { + $query = "CREATE VIEW ".$db->quote($_POST['viewname'])." AS ".$_POST['select']; + $result = $db->query($query); + if($result===false) + $error = true; + $completed = $lang['view']." '".htmlencode($_POST['viewname'])."' ".$lang['created'].".<br/><span style='font-size:11px;'>".htmlencode($query)."</span>"; + } //AstLinux// + $backlinkParameters = "&action=column_view&table=".urlencode($_POST['viewname']); + break; + + //- Drop table (=table_drop) + case "table_drop": + if ($global_user === 'staff') { //AstLinux// + $completed = "Failed: Insufficient 'staff' user privileges for action: ".$_GET['action']; + } else { + $query = "DROP TABLE ".$db->quote_id($_POST['tablename']); + $result=$db->query($query); + if($result===false) + $error = true; + $completed = $lang['tbl']." '".htmlencode($_POST['tablename'])."' ".$lang['dropped']."."; + } //AstLinux// + $backlinkParameters = ""; + break; + + //- Drop view (=view_drop) + case "view_drop": + if ($global_user === 'staff') { //AstLinux// + $completed = "Failed: Insufficient 'staff' user privileges for action: ".$_GET['action']; + } else { + $query = "DROP VIEW ".$db->quote_id($_POST['viewname']); + $result=$db->query($query); + if($result===false) + $error = true; + $completed = $lang['view']." '".htmlencode($_POST['viewname'])."' ".$lang['dropped']."."; + } //AstLinux// + $backlinkParameters = ""; + break; + + //- Rename table (=table_rename) + case "table_rename": + $query = "ALTER TABLE ".$db->quote_id($_POST['oldname'])." RENAME TO ".$db->quote($_POST['newname']); + if($db->getVersion()==3) + $result = $db->query($query, true); + else + $result = $db->query($query, false); + if($result===false) + $error = true; + $completed = $lang['tbl']." '".htmlencode($_POST['oldname'])."' ".$lang['renamed']." '".htmlencode($_POST['newname'])."'.<br/><span style='font-size:11px;'>".htmlencode($query)."</span>"; + $backlinkParameters = "&action=row_view&table=".urlencode($_POST['newname']); + break; + + //- Row actions + + //- Create row (=row_create) + case "row_create": + $completed = ""; + $num = $_POST['numRows']; + $fields = explode(":", $_POST['fields']); + $z = 0; + + $query = "PRAGMA table_info(".$db->quote_id($target_table).")"; + $result = $db->selectArray($query); + + for($i=0; $i<$num; $i++) + { + if(!isset($_POST[$i.":ignore"])) + { + $query_cols = ""; + $query_vals = ""; + $all_default = true; + for($j=0; $j<sizeof($fields); $j++) + { + // PHP replaces space with underscore + $fields[$j] = str_replace(" ","_",$fields[$j]); + + $null = isset($_POST[$i.":".$fields[$j]."_null"]); + if(!$null) + { + if(!isset($_POST[$i.":".$fields[$j]]) && $debug) + { + echo "MISSING POST INDEX (".$i.":".$fields[$j].")<br><pre />"; + var_dump($_POST); + echo "</pre><hr />"; + } + $value = $_POST[$i.":".$fields[$j]]; + } + else + $value = ""; + if($value===$result[$j]['dflt_value']) + { + // if the value is the default value, skip it + continue; + } else + $all_default = false; + $query_cols .= $db->quote_id($fields[$j]).","; + + $type = $result[$j]['type']; + $typeAffinity = get_type_affinity($type); + $function = $_POST["function_".$i."_".$fields[$j]]; + if($function!="") + $query_vals .= $function."("; + if(($typeAffinity=="TEXT" || $typeAffinity=="NONE") && !$null) + $query_vals .= $db->quote($value); + elseif(($typeAffinity=="INTEGER" || $typeAffinity=="REAL"|| $typeAffinity=="NUMERIC") && $value=="") + $query_vals .= "NULL"; + elseif($null) + $query_vals .= "NULL"; + else + $query_vals .= $db->quote($value); + if($function!="") + $query_vals .= ")"; + $query_vals .= ","; + } + $query = "INSERT INTO ".$db->quote_id($target_table); + if(!$all_default) + { + $query_cols = substr($query_cols, 0, strlen($query_cols)-1); + $query_vals = substr($query_vals, 0, strlen($query_vals)-1); + + $query.=" (". $query_cols . ") VALUES (". $query_vals. ")"; + } else { + $query .= " DEFAULT VALUES"; + } + $result1 = $db->query($query); + if($result1===false) + $error = true; + $completed .= "<span style='font-size:11px;'>".htmlencode($query)."</span><br/>"; + $z++; + } + } + $completed = $z." ".$lang['rows']." ".$lang['inserted'].".<br/><br/>".$completed; + $backlinkParameters = "&action=column_view&table=".urlencode($target_table); + break; + + //- Delete row (=row_delete) + case "row_delete": + $pks = json_decode($_GET['pk']); + + $query = "DELETE FROM ".$db->quote_id($target_table)." WHERE (".$db->wherePK($target_table,json_decode($pks[0])).")"; + for($i=1; $i<sizeof($pks); $i++) + { + $query .= " OR (".$db->wherePK($target_table,json_decode($pks[$i])).")"; + } + $result = $db->query($query); + if($result===false) + $error = true; + $completed = sizeof($pks)." ".$lang['rows']." ".$lang['deleted'].".<br/><span style='font-size:11px;'>".htmlencode($query)."</span>"; + $backlinkParameters = "&action=row_view&table=".urlencode($target_table); + break; + + //- Edit row (=row_edit) + case "row_edit": + $pks = json_decode($_GET['pk']); + $fields = explode(":", $_POST['fieldArray']); + + $z = 0; + + $query = "PRAGMA table_info(".$db->quote_id($target_table).")"; + $result = $db->selectArray($query); + + if(isset($_POST['new_row'])) + $completed = ""; + else + $completed = sizeof($pks)." ".$lang['rows']." ".$lang['affected'].".<br/><br/>"; + + for($i=0; $i<sizeof($pks); $i++) + { + if(isset($_POST['new_row'])) + { + $query_cols = ""; + $query_vals = ""; + $all_default = true; + for($j=0; $j<sizeof($fields); $j++) + { + // PHP replaces space with underscore + $fields[$j] = str_replace(" ","_",$fields[$j]); + + $null = isset($_POST[$fields[$j]."_null"][$i]); + if(!$null) + { + $value = $_POST[$fields[$j]][$i]; + } + else + $value = ""; + if($value===$result[$j]['dflt_value']) + { + // if the value is the default value, skip it + continue; + } else + $all_default = false; + $query_cols .= $db->quote_id($fields[$j]).","; + + $type = $result[$j]['type']; + $typeAffinity = get_type_affinity($type); + $function = $_POST["function_".$fields[$j]][$i]; + if($function!="") + $query_vals .= $function."("; + if(($typeAffinity=="TEXT" || $typeAffinity=="NONE") && !$null) + $query_vals .= $db->quote($value); + elseif(($typeAffinity=="INTEGER" || $typeAffinity=="REAL"|| $typeAffinity=="NUMERIC") && $value=="") + $query_vals .= "NULL"; + elseif($null) + $query_vals .= "NULL"; + else + $query_vals .= $db->quote($value); + if($function!="") + $query_vals .= ")"; + $query_vals .= ","; + } + $query = "INSERT INTO ".$db->quote_id($target_table); + if(!$all_default) + { + $query_cols = substr($query_cols, 0, strlen($query_cols)-1); + $query_vals = substr($query_vals, 0, strlen($query_vals)-1); + + $query.=" (". $query_cols . ") VALUES (". $query_vals. ")"; + } else { + $query .= " DEFAULT VALUES"; + } + $result1 = $db->query($query); + if($result1===false) + $error = true; + $z++; + } + else + { + $query = "UPDATE ".$db->quote_id($target_table)." SET "; + for($j=0; $j<sizeof($fields); $j++) + { + $field_index = str_replace(" ","_",$fields[$j]); + $function = $_POST["function_".$field_index][$i]; + $null = isset($_POST[$field_index."_null"][$i]); + $query .= $db->quote_id($fields[$j])."="; + if($function!="") + $query .= $function."("; + if($null) + $query .= "NULL"; + else + $query .= $db->quote($_POST[$field_index][$i]); + if($function!="") + $query .= ")"; + $query .= ", "; + } + $query = substr($query, 0, sizeof($query)-3); + $query .= " WHERE ".$db->wherePK($target_table, json_decode($pks[$i])); + $result1 = $db->query($query); + if($result1===false) + { + $error = true; + } + } + $completed .= "<span style='font-size:11px;'>".htmlencode($query)."</span><br/>"; + } + if(isset($_POST['new_row'])) + $completed = $z." ".$lang['rows']." ".$lang['inserted'].".<br/><br/>".$completed; + $backlinkParameters = "&action=row_view&table=".urlencode($target_table); + break; + + //- Column actions + + //- Create column (=column_create) + case "column_create": + $num = intval($_POST['rows']); + for($i=0; $i<$num; $i++) + { + if($_POST[$i.'_field']!="") + { + $query = "ALTER TABLE ".$db->quote_id($target_table)." ADD ".$db->quote($_POST[$i.'_field'])." "; + $query .= $_POST[$i.'_type']." "; + if(isset($_POST[$i.'_primarykey'])) + $query .= "PRIMARY KEY "; + if(isset($_POST[$i.'_notnull'])) + $query .= "NOT NULL "; + if($_POST[$i.'_defaultoption']!='defined' && $_POST[$i.'_defaultoption']!='none' && $_POST[$i.'_defaultoption']!='expr') + $query .= "DEFAULT ".$_POST[$i.'_defaultoption']." "; + elseif($_POST[$i.'_defaultoption']=='expr') + $query .= "DEFAULT (".$_POST[$i.'_defaultvalue'].") "; + elseif(isset($_POST[$i.'_defaultvalue']) && $_POST[$i.'_defaultoption']=='defined') + { + $typeAffinity = get_type_affinity($_POST[$i.'_type']); + if(($typeAffinity=="INTEGER" || $typeAffinity=="REAL" || $typeAffinity=="NUMERIC") && is_numeric($_POST[$i.'_defaultvalue'])) + $query .= "DEFAULT ".$_POST[$i.'_defaultvalue']." "; + else + $query .= "DEFAULT ".$db->quote($_POST[$i.'_defaultvalue'])." "; + } + if($db->getVersion()==3 && + ($_POST[$i.'_defaultoption']=='defined' || $_POST[$i.'_defaultoption']=='none' || $_POST[$i.'_defaultoption']=='NULL') + // Sqlite3 cannot add columns with default values that are not constant, so use AlterTable-workaround + && !isset($_POST[$i.'_primarykey'])) // sqlite3 cannot add primary key columns + $result = $db->query($query, true); + else + $result = $db->query($query, false); + if($result===false) + $error = true; + } + } + $completed = $lang['tbl']." '".htmlencode($target_table)."' ".$lang['altered']."."; + $backlinkParameters = "&action=column_view&table=".urlencode($target_table); + break; + + //- Delete column (=column_delete) + case "column_delete": + $pks = explode(":", $_GET['pk']); + $query = "ALTER TABLE ".$db->quote_id($target_table).' DROP '.$db->quote_id($pks[0]); + for($i=1; $i<sizeof($pks); $i++) + { + $query .= ", DROP ".$db->quote_id($pks[$i]); + } + $result = $db->query($query); + if($result===false) + $error = true; + $completed = $lang['tbl']." '".htmlencode($target_table)."' ".$lang['altered']."."; + $backlinkParameters = "&action=column_view&table=".urlencode($target_table); + break; + + //- Add a primary key (=primarykey_add) + case "primarykey_add": + $pks = explode(":", $_GET['pk']); + $query = "ALTER TABLE ".$db->quote_id($target_table).' ADD PRIMARY KEY ('.$db->quote_id($pks[0]); + for($i=1; $i<sizeof($pks); $i++) + { + $query .= ", ".$db->quote_id($pks[$i]); + } + $query .= ")"; + $result = $db->query($query); + if($result===false) + $error = true; + $completed = $lang['tbl']." '".htmlencode($target_table)."' ".$lang['altered']."."; + $backlinkParameters = "&action=column_view&table=".urlencode($target_table); + break; + + //- Edit column (=column_edit) + case "column_edit": + $query = "ALTER TABLE ".$db->quote_id($target_table).' CHANGE '.$db->quote_id($_POST['oldvalue'])." ".$db->quote($_POST['0_field'])." ".$_POST['0_type']; + $result = $db->query($query); + if($result===false) + $error = true; + $completed = $lang['tbl']." '".htmlencode($target_table)."' ".$lang['altered']."."; + $backlinkParameters = "&action=column_view&table=".urlencode($target_table); + break; + + //- Delete trigger (=trigger_delete) + case "trigger_delete": + $query = "DROP TRIGGER ".$db->quote_id($_GET['pk']); + $result = $db->query($query); + if($result===false) + $error = true; + $completed = $lang['trigger']." '".htmlencode($_GET['pk'])."' ".$lang['deleted'].".<br/><span style='font-size:11px;'>".htmlencode($query)."</span>"; + $backlinkParameters = "&action=column_view&table=".urlencode($target_table); + break; + + //- Delete index (=index_delete) + case "index_delete": + $query = "DROP INDEX ".$db->quote_id($_GET['pk']); + $result = $db->query($query); + if($result===false) + $error = true; + $completed = $lang['index']." '".htmlencode($_GET['pk'])."' ".$lang['deleted'].".<br/><span style='font-size:11px;'>".htmlencode($query)."</span>"; + $backlinkParameters = "&action=column_view&table=".urlencode($target_table); + break; + + //- Create trigger (=trigger_create) + case "trigger_create": + $str = "CREATE TRIGGER ".$db->quote($_POST['trigger_name']); + if($_POST['beforeafter']!="") + $str .= " ".$_POST['beforeafter']; + $str .= " ".$_POST['event']." ON ".$db->quote_id($target_table); + if(isset($_POST['foreachrow'])) + $str .= " FOR EACH ROW"; + if($_POST['whenexpression']!="") + $str .= " WHEN ".$_POST['whenexpression']; + $str .= " BEGIN"; + $str .= " ".$_POST['triggersteps']; + $str .= " END"; + $query = $str; + $result = $db->query($query); + if($result===false) + $error = true; + $completed = $lang['trigger']." ".$lang['created'].".<br/><span style='font-size:11px;'>".htmlencode($query)."</span>"; + $backlinkParameters = "&action=column_view&table=".urlencode($target_table); + break; + + //- Create index (=index_create) + case "index_create": + $num = $_POST['num']; + if($_POST['name']=="") + { + $completed = $lang['blank_index']; + } + else if($_POST['0_field']=="") + { + $completed = $lang['one_index']; + } + else + { + $str = "CREATE "; + if($_POST['duplicate']=="no") + $str .= "UNIQUE "; + $str .= "INDEX ".$db->quote($_POST['name'])." ON ".$db->quote_id($target_table)." ("; + $str .= $db->quote_id($_POST['0_field']).$_POST['0_order']; + for($i=1; $i<$num; $i++) + { + if($_POST[$i.'_field']!="") + $str .= ", ".$db->quote_id($_POST[$i.'_field']).$_POST[$i.'_order']; + } + $str .= ")"; + $query = $str; + $result = $db->query($query); + if($result===false) + $error = true; + $completed = $lang['index']." ".$lang['created'].".<br/><span style='font-size:11px;'>".htmlencode($query)."</span>"; + } + $backlinkParameters = "&action=column_view&table=".urlencode($target_table); + break; + } +} + +// are we working on a view? let's check once here +$target_table_type = $target_table ? $db->getTypeOfTable($target_table) : null; + +//- HTML: sidebar +echo '<table class="body_tbl" width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top" class="left_td" style="width:100px; padding:9px 2px 9px 9px;">'; +echo "<div id='leftNav'>"; +//AstLinux// +//echo "<h1><a href='".PAGE."'>"; +//echo "<span id='logo'>".PROJECT."</span> <span id='version'>v".VERSION."</span>"; +//echo "</a></h1>"; +//echo "<div id='headerlinks'>"; +//echo "<a href='javascript:void' onclick='openHelp(\"top\");'>".$lang['docu']."</a> | "; +//echo "<a href='http://www.gnu.org/licenses/gpl.html' target='_blank'>".$lang['license']."</a> | "; +//echo "<a href='".PROJECT_URL."' target='_blank'>".$lang['proj_site']."</a>"; +//echo "</div>"; + +//- HTML: database list +echo "<fieldset style='margin:15px;'><legend><b>".$lang['db_ch']."</b></legend>"; +if(sizeof($databases)<10) //if there aren't a lot of databases, just show them as a list of links instead of drop down menu +{ + $i=0; + foreach($databases as $database) + { + $i++; + echo '[' . ($database['readable'] ? 'r':' ' ) . ($database['writable'] && $database['writable_dir'] ? 'w':' ' ) . '] '; + if($database == $_SESSION[COOKIENAME.'currentDB']) + echo "<a href='?switchdb=".urlencode($database['path'])."' class='active_db'>".htmlencode($database['name'])."</a> (<a href='?download=".urlencode($database['path'])."' title='".$lang['backup']."'>↓</a>)"; + else + echo "<a href='?switchdb=".urlencode($database['path'])."'>".htmlencode($database['name'])."</a> (<a href='?download=".urlencode($database['path'])."' title='".$lang['backup']."'>↓</a>)"; + if($i<sizeof($databases)) + echo "<br/>"; + } +} +else //there are a lot of databases - show a drop down menu +{ + echo "<form action='".PAGE."' method='post'>"; + echo "<select name='database_switch'>"; + foreach($databases as $database) + { + $perms_string = htmlencode('[' . ($database['readable'] ? 'r':' ' ) . ($database['writable'] && $database['writable_dir'] ? 'w':' ' ) . '] '); + if($database == $_SESSION[COOKIENAME.'currentDB']) + echo "<option value='".htmlencode($database['path'])."' selected='selected'>".$perms_string.htmlencode($database['name'])."</option>"; + else + echo "<option value='".htmlencode($database['path'])."'>".$perms_string.htmlencode($database['name'])."</option>"; + } + echo "</select> "; + echo "<input type='submit' value='".$lang['go']."' class='btn'>"; + echo "</form>"; +} +echo "</fieldset>"; +echo "<fieldset style='margin:15px;'><legend>"; +echo "<a href='".PAGE."'"; +if (!$target_table) + echo " class='active_table'"; +echo ">".htmlencode($currentDB['name'])."</a>"; +echo "</legend>"; + +//- HTML: table list +$query = "SELECT type, name FROM sqlite_master WHERE type='table' OR type='view' ORDER BY name"; +$result = $db->selectArray($query); +$j=0; +for($i=0; $i<sizeof($result); $i++) +{ + if(substr($result[$i]['name'], 0, 7)!="sqlite_" && $result[$i]['name']!="") + { + echo "<span class='sidebar_table'>[".$lang[$result[$i]['type']=='table'?'tbl':'view']."]</span> "; + echo "<a href='?action=row_view&table=".urlencode($result[$i]['name'])."'"; + if ($target_table == $result[$i]['name']) + echo " class='active_table'"; + echo ">".htmlencode($result[$i]['name'])."</a><br/>"; + $j++; + } +} +if($j==0) + echo $lang['no_tbl']; +echo "</fieldset>"; + +//- HTML: form to create a new database +if($directory!==false && is_writable($directory)) +{ + echo "<fieldset style='margin:15px;'><legend><b>".$lang['db_create']."</b> ".helpLink($lang['help2'])."</legend>"; + echo "<form name='create_database' method='post' action='".PAGE."'>"; + echo "<input type='text' name='new_dbname' style='width:150px;'/> <input type='submit' value='".$lang['create']."' class='btn'/>"; + echo "</form>"; + echo "</fieldset>"; +} + +//AstLinux// +//echo "<div style='text-align:center;'>"; +//echo "<form action='".PAGE."' method='post'>"; +//echo "<input type='submit' value='".$lang['logout']."' name='logout' class='btn'/>"; +//echo "</form>"; +//echo "</div>"; +echo "</div>"; +echo '</td><td valign="top" id="main_column" class="right_td" style="padding:9px 2px 9px 9px;">'; + +//- HTML: breadcrumb navigation +echo "<a href='".PAGE."'>".htmlencode($currentDB['name'])."</a>"; +if ($target_table) + echo " → <a href='?table=".urlencode($target_table)."&action=row_view'>".htmlencode($target_table)."</a>"; +echo "<br/><br/>"; + +//- HTML: confirmation panel +//if the user has performed some action, show the resulting message +if(isset($_GET['confirm'])) +{ + echo "<div id='main'>"; + echo "<div class='confirm'>"; + if(isset($error) && $error) //an error occured during the action, so show an error message + echo $lang['err'].": ".$db->getError()."<br/>".$lang['bug_report'].' '.PROJECT_BUGTRACKER_LINK; + else //action was performed successfully - show success message + echo $completed; + echo "</div>"; + if($_GET['action']=="row_delete" || $_GET['action']=="row_create" || $_GET['action']=="row_edit") + echo "<br/><br/><a href='?table=".urlencode($target_table)."&action=row_view'>".$lang['return']."</a>"; + else if($_GET['action']=="column_create" || $_GET['action']=="column_delete" || $_GET['action']=="column_edit" || $_GET['action']=="index_create" || $_GET['action']=="index_delete" || $_GET['action']=="trigger_delete" || $_GET['action']=="trigger_create") + echo "<br/><br/><a href='?table=".urlencode($target_table)."&action=column_view'>".$lang['return']."</a>"; + else + echo "<br/><br/><a href='".PAGE.(isset($backlinkParameters)?"?".$backlinkParameters:'')."'>".$lang['return']."</a>"; + echo "</div>"; +} + +//- Show the various tab views for a table +if(!isset($_GET['confirm']) && $target_table && isset($_GET['action']) && ($_GET['action']=="table_export" || $_GET['action']=="table_import" || $_GET['action']=="table_sql" || $_GET['action']=="row_view" || $_GET['action']=="row_create" || $_GET['action']=="column_view" || $_GET['action']=="table_rename" || $_GET['action']=="table_search" || $_GET['action']=="table_triggers")) +{ + //- HTML: tabs for tables + if($target_table_type == 'table') + { + echo "<a href='?table=".urlencode($target_table)."&action=row_view' "; + if($_GET['action']=="row_view") + echo "class='tab_pressed'"; + else + echo "class='tab'"; + echo ">".$lang['browse']."</a>"; + echo "<a href='?table=".urlencode($target_table)."&action=column_view' "; + if($_GET['action']=="column_view") + echo "class='tab_pressed'"; + else + echo "class='tab'"; + echo ">".$lang['struct']."</a>"; + echo "<a href='?table=".urlencode($target_table)."&action=table_sql' "; + if($_GET['action']=="table_sql") + echo "class='tab_pressed'"; + else + echo "class='tab'"; + echo ">".$lang['sql']."</a>"; + echo "<a href='?table=".urlencode($target_table)."&action=table_search' "; + if($_GET['action']=="table_search") + echo "class='tab_pressed'"; + else + echo "class='tab'"; + echo ">".$lang['srch']."</a>"; + echo "<a href='?table=".urlencode($target_table)."&action=row_create' "; + if($_GET['action']=="row_create") + echo "class='tab_pressed'"; + else + echo "class='tab'"; + echo ">".$lang['insert']."</a>"; + echo "<a href='?table=".urlencode($target_table)."&action=table_export' "; + if($_GET['action']=="table_export") + echo "class='tab_pressed'"; + else + echo "class='tab'"; + echo ">".$lang['export']."</a>"; + echo "<a href='?table=".urlencode($target_table)."&action=table_import' "; + if($_GET['action']=="table_import") + echo "class='tab_pressed'"; + else + echo "class='tab'"; + echo ">".$lang['import']."</a>"; + echo "<a href='?table=".urlencode($target_table)."&action=table_rename' "; + if($_GET['action']=="table_rename") + echo "class='tab_pressed'"; + else + echo "class='tab'"; + echo ">".$lang['rename']."</a>"; + echo "<a href='?action=table_empty&table=".urlencode($target_table)."' "; + echo "class='tab empty'"; + echo ">".$lang['empty']."</a>"; + echo "<a href='?action=table_drop&table=".urlencode($target_table)."' "; + echo "class='tab drop'"; + echo ">".$lang['drop']."</a>"; + echo "<div style='clear:both;'></div>"; + } + else + //- HTML: tabs for views + { + echo "<a href='?table=".urlencode($target_table)."&action=row_view' "; + if($_GET['action']=="row_view") + echo "class='tab_pressed'"; + else + echo "class='tab'"; + echo ">".$lang['browse']."</a>"; + echo "<a href='?table=".urlencode($target_table)."&action=column_view' "; + if($_GET['action']=="column_view") + echo "class='tab_pressed'"; + else + echo "class='tab'"; + echo ">".$lang['struct']."</a>"; + echo "<a href='?table=".urlencode($target_table)."&action=table_sql' "; + if($_GET['action']=="table_sql") + echo "class='tab_pressed'"; + else + echo "class='tab'"; + echo ">".$lang['sql']."</a>"; + echo "<a href='?table=".urlencode($target_table)."&action=table_search' "; + if($_GET['action']=="table_search") + echo "class='tab_pressed'"; + else + echo "class='tab'"; + echo ">".$lang['srch']."</a>"; + echo "<a href='?table=".urlencode($target_table)."&action=table_export' "; + if($_GET['action']=="table_export") + echo "class='tab_pressed'"; + else... [truncated message content] |
From: <abe...@us...> - 2015-08-04 23:30:25
|
Revision: 7180 http://sourceforge.net/p/astlinux/code/7180 Author: abelbeck Date: 2015-08-04 23:30:23 +0000 (Tue, 04 Aug 2015) Log Message: ----------- openvpn, version bump to 2.3.8 Modified Paths: -------------- branches/1.0/package/openvpn/openvpn.mk Modified: branches/1.0/package/openvpn/openvpn.mk =================================================================== --- branches/1.0/package/openvpn/openvpn.mk 2015-08-04 23:20:22 UTC (rev 7179) +++ branches/1.0/package/openvpn/openvpn.mk 2015-08-04 23:30:23 UTC (rev 7180) @@ -4,7 +4,7 @@ # ############################################################# -OPENVPN_VERSION = 2.3.7 +OPENVPN_VERSION = 2.3.8 OPENVPN_SITE = http://swupdate.openvpn.net/community/releases OPENVPN_DEPENDENCIES = host-pkg-config OPENVPN_CONF_OPT = --disable-plugins --enable-iproute2 --enable-password-save This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-04 23:20:24
|
Revision: 7179 http://sourceforge.net/p/astlinux/code/7179 Author: abelbeck Date: 2015-08-04 23:20:22 +0000 (Tue, 04 Aug 2015) Log Message: ----------- sudo, version bump to 1.8.14p3 Modified Paths: -------------- branches/1.0/package/sudo/sudo.mk Modified: branches/1.0/package/sudo/sudo.mk =================================================================== --- branches/1.0/package/sudo/sudo.mk 2015-08-04 21:43:52 UTC (rev 7178) +++ branches/1.0/package/sudo/sudo.mk 2015-08-04 23:20:22 UTC (rev 7179) @@ -4,7 +4,7 @@ # ############################################################# -SUDO_VERSION = 1.8.13 +SUDO_VERSION = 1.8.14p3 SUDO_SITE = http://www.sudo.ws/sudo/dist # This is to avoid sudo's make install from chown()ing files which fails This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-04 21:43:54
|
Revision: 7178 http://sourceforge.net/p/astlinux/code/7178 Author: abelbeck Date: 2015-08-04 21:43:52 +0000 (Tue, 04 Aug 2015) Log Message: ----------- web interface, PhoneProv tab, add support for pjsip if 'sip_driver=pjsip' is defined in the template Modified Paths: -------------- branches/1.0/package/webinterface/altweb/admin/phoneprov.php Modified: branches/1.0/package/webinterface/altweb/admin/phoneprov.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/phoneprov.php 2015-08-04 21:37:45 UTC (rev 7177) +++ branches/1.0/package/webinterface/altweb/admin/phoneprov.php 2015-08-04 21:43:52 UTC (rev 7178) @@ -9,6 +9,7 @@ // phoneprov.php for AstLinux // 03-14-2014 // 08-02-2015, Add Status, Reload and Reboot links +// 08-04-2015, Add pjsip support // // System location of /mnt/kd/rc.conf.d directory $PHONEPROVCONFDIR = '/mnt/kd/rc.conf.d'; @@ -16,6 +17,8 @@ $PHONEPROVCONFFILE = '/mnt/kd/rc.conf.d/gui.phoneprov.conf'; // Asterisk sip_notify config file $ASTERISK_SIP_NOTIFY_CONF = '/etc/asterisk/sip_notify.conf'; +// Asterisk pjsip_notify config file +$ASTERISK_PJSIP_NOTIFY_CONF = '/etc/asterisk/pjsip_notify.conf'; $family = "phoneprov"; $myself = $_SERVER['PHP_SELF']; @@ -49,6 +52,7 @@ ); $sip_notify_reboot = array ( + 'cisco' => 'linksys-cold-restart', 'linksys' => 'linksys-cold-restart', 'snom' => 'snom-reboot', 'yealink' => 'snom-reboot' @@ -72,12 +76,13 @@ $pdo_db = new PDO("sqlite:$db_file"); $pdo_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - $sql_str = "SELECT account,model,vendor FROM phoneprov WHERE mac_addr='$mac'"; + $sql_str = "SELECT * FROM phoneprov WHERE mac_addr='$mac'"; foreach ($pdo_db->query($sql_str) as $row) { - if ($row['account'] !== '') { + if ($row['account'] != '') { $sql['account'] = $row['account']; - $sql['model'] = ($row['model'] !== '') ? $row['model'] : 'unknown'; - $sql['vendor'] = ($row['vendor'] !== '') ? $row['vendor'] : 'unknown'; + $sql['model'] = ($row['model'] != '') ? $row['model'] : 'unknown'; + $sql['vendor'] = ($row['vendor'] != '') ? $row['vendor'] : 'unknown'; + $sql['sip_driver'] = ($row['sip_driver'] != '') ? $row['sip_driver'] : 'sip'; break; } } @@ -96,6 +101,9 @@ // function isMACinfo($mac, $sql) { + if ($sql['sip_driver'] === 'pjsip') { + return(FALSE); + } if (($text = asteriskCMDtext('sip show peer '.$sql['account'])) === FALSE) { return(FALSE); } @@ -129,10 +137,11 @@ // function isMACreload($mac, $sql, $map) { global $ASTERISK_SIP_NOTIFY_CONF; + global $ASTERISK_PJSIP_NOTIFY_CONF; $model = $sql['model'].'-reload'; $vendor = $sql['vendor'].'-reload'; - $name = $ASTERISK_SIP_NOTIFY_CONF; + $name = ($sql['sip_driver'] === 'pjsip') ? $ASTERISK_PJSIP_NOTIFY_CONF : $ASTERISK_SIP_NOTIFY_CONF; if (is_file($name)) { $cmd = 'grep -q "^\['.$model.'\]" '.$name; shell($cmd.' >/dev/null 2>/dev/null', $status); @@ -155,10 +164,11 @@ // function isMACreboot($mac, $sql, $map) { global $ASTERISK_SIP_NOTIFY_CONF; + global $ASTERISK_PJSIP_NOTIFY_CONF; $model = $sql['model'].'-reboot'; $vendor = $sql['vendor'].'-reboot'; - $name = $ASTERISK_SIP_NOTIFY_CONF; + $name = ($sql['sip_driver'] === 'pjsip') ? $ASTERISK_PJSIP_NOTIFY_CONF : $ASTERISK_SIP_NOTIFY_CONF; if (is_file($name)) { $cmd = 'grep -q "^\['.$model.'\]" '.$name; shell($cmd.' >/dev/null 2>/dev/null', $status); @@ -625,7 +635,10 @@ $mac = rawurldecode($_GET['reload']); if (($sql = isMACinSQL($mac)) !== FALSE) { if (($sip_notify = isMACreload($mac, $sql, $sip_notify_reload)) !== FALSE) { - if (($sip_notify_text = asteriskCMDtext('sip notify '.$sip_notify.' '.$sql['account'])) !== FALSE) { + $notify_cmd = ($sql['sip_driver'] === 'pjsip') ? 'pjsip send notify '.$sip_notify.' endpoint ' + : 'sip notify '.$sip_notify.' '; + $notify_cmd .= $sql['account']; + if (($sip_notify_text = asteriskCMDtext($notify_cmd)) !== FALSE) { putHtml('<p>'.$sip_notify_text[0].'</p>'); } else { putHtml('<p style="color: red;">Reload Action Failed.</p>'); @@ -640,7 +653,10 @@ $mac = rawurldecode($_GET['reboot']); if (($sql = isMACinSQL($mac)) !== FALSE) { if (($sip_notify = isMACreboot($mac, $sql, $sip_notify_reboot)) !== FALSE) { - if (($sip_notify_text = asteriskCMDtext('sip notify '.$sip_notify.' '.$sql['account'])) !== FALSE) { + $notify_cmd = ($sql['sip_driver'] === 'pjsip') ? 'pjsip send notify '.$sip_notify.' endpoint ' + : 'sip notify '.$sip_notify.' '; + $notify_cmd .= $sql['account']; + if (($sip_notify_text = asteriskCMDtext($notify_cmd)) !== FALSE) { putHtml('<p>'.$sip_notify_text[0].'</p>'); } else { putHtml('<p style="color: red;">Reboot Action Failed.</p>'); @@ -795,7 +811,9 @@ putHtml("</tr>"); echo '<tr ', ($i % 2 == 0) ? 'class="dtrow0"' : 'class="dtrow1"', '>'; echo '<td style="text-align: right;" colspan="7">'; - echo ' <a href="'.$myself.'?info='.rawurlencode($mac).'" class="headerText" title="Show SIP Peer Info">Status</a>'; + if ($sql['sip_driver'] !== 'pjsip') { + echo ' <a href="'.$myself.'?info='.rawurlencode($mac).'" class="headerText" title="Show SIP Peer Info">Status</a>'; + } echo ' <a href="'.$myself.'?reload='.rawurlencode($mac).'" class="headerText" title="Send SIP Notify to Reload Config">Reload</a>'; echo ' <a href="'.$myself.'?reboot='.rawurlencode($mac).'" class="headerText" title="Send SIP Notify to Reboot Phone">Reboot</a>'; echo '</td>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-04 21:37:47
|
Revision: 7177 http://sourceforge.net/p/astlinux/code/7177 Author: abelbeck Date: 2015-08-04 21:37:45 +0000 (Tue, 04 Aug 2015) Log Message: ----------- phoneprov-tools, add a 'sip_driver' column to the SQL table to indicate sip vs. pjsip for each template Modified Paths: -------------- branches/1.0/package/phoneprov-tools/phoneprov-build branches/1.0/package/phoneprov-tools/templates/gxp1400.conf branches/1.0/package/phoneprov-tools/templates/snom320.conf branches/1.0/package/phoneprov-tools/templates/spa942-no-reg.conf branches/1.0/package/phoneprov-tools/templates/yealink-2line.conf branches/1.0/package/phoneprov-tools/templates/yealink.conf Modified: branches/1.0/package/phoneprov-tools/phoneprov-build =================================================================== --- branches/1.0/package/phoneprov-tools/phoneprov-build 2015-08-03 22:34:50 UTC (rev 7176) +++ branches/1.0/package/phoneprov-tools/phoneprov-build 2015-08-04 21:37:45 UTC (rev 7177) @@ -167,7 +167,8 @@ 'mac_addr' TEXT DEFAULT '', 'template' TEXT DEFAULT '', 'model' TEXT DEFAULT '', - 'vendor' TEXT DEFAULT '' + 'vendor' TEXT DEFAULT '', + 'sip_driver' TEXT DEFAULT '' ); EOF } @@ -186,7 +187,8 @@ 'mac_addr', 'template', 'model', -'vendor' +'vendor', +'sip_driver' ) VALUES ( '${EXT[$i]}', @@ -196,7 +198,8 @@ '${mac_addr}', '${template}', '${model}', -'${vendor}' +'${vendor}', +'${sip_driver}' );" fi done @@ -387,6 +390,12 @@ else sql_enable="$(echo "$sql_enable" | tr '[:upper:]' '[:lower:]')" fi +sip_driver="$(extract_var sip_driver)" +if [ -z "$sip_driver" ]; then + sip_driver="sip" +else + sip_driver="$(echo "$sip_driver" | tr '[:upper:]' '[:lower:]')" +fi # Special case to initialize dialplan and sip output files if [ "$ext" = "init" -o "$ext" = "init-dialplan" -o "$ext" = "init-sip" ]; then Modified: branches/1.0/package/phoneprov-tools/templates/gxp1400.conf =================================================================== --- branches/1.0/package/phoneprov-tools/templates/gxp1400.conf 2015-08-03 22:34:50 UTC (rev 7176) +++ branches/1.0/package/phoneprov-tools/templates/gxp1400.conf 2015-08-04 21:37:45 UTC (rev 7177) @@ -36,6 +36,7 @@ sip_file=astlinux-phoneprov-sip.conf sql_enable=yes +sip_driver=sip # Dialplan File entries: # Exten-intern Modified: branches/1.0/package/phoneprov-tools/templates/snom320.conf =================================================================== --- branches/1.0/package/phoneprov-tools/templates/snom320.conf 2015-08-03 22:34:50 UTC (rev 7176) +++ branches/1.0/package/phoneprov-tools/templates/snom320.conf 2015-08-04 21:37:45 UTC (rev 7177) @@ -28,6 +28,7 @@ sip_file=astlinux-phoneprov-sip.conf sql_enable=yes +sip_driver=sip # Dialplan File entries [dialplan] Modified: branches/1.0/package/phoneprov-tools/templates/spa942-no-reg.conf =================================================================== --- branches/1.0/package/phoneprov-tools/templates/spa942-no-reg.conf 2015-08-03 22:34:50 UTC (rev 7176) +++ branches/1.0/package/phoneprov-tools/templates/spa942-no-reg.conf 2015-08-04 21:37:45 UTC (rev 7177) @@ -29,6 +29,7 @@ sip_file=astlinux-phoneprov-sip.conf sql_enable=yes +sip_driver=sip # Dialplan File entries [dialplan] Modified: branches/1.0/package/phoneprov-tools/templates/yealink-2line.conf =================================================================== --- branches/1.0/package/phoneprov-tools/templates/yealink-2line.conf 2015-08-03 22:34:50 UTC (rev 7176) +++ branches/1.0/package/phoneprov-tools/templates/yealink-2line.conf 2015-08-04 21:37:45 UTC (rev 7177) @@ -30,6 +30,7 @@ sip_file=astlinux-phoneprov-sip.conf sql_enable=yes +sip_driver=sip # Dialplan File entries [dialplan] Modified: branches/1.0/package/phoneprov-tools/templates/yealink.conf =================================================================== --- branches/1.0/package/phoneprov-tools/templates/yealink.conf 2015-08-03 22:34:50 UTC (rev 7176) +++ branches/1.0/package/phoneprov-tools/templates/yealink.conf 2015-08-04 21:37:45 UTC (rev 7177) @@ -30,6 +30,7 @@ sip_file=astlinux-phoneprov-sip.conf sql_enable=yes +sip_driver=sip # Dialplan File entries [dialplan] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-03 22:34:52
|
Revision: 7176 http://sourceforge.net/p/astlinux/code/7176 Author: abelbeck Date: 2015-08-03 22:34:50 +0000 (Mon, 03 Aug 2015) Log Message: ----------- arnofw, update patch to match upstream fix, no functional change Modified Paths: -------------- branches/1.0/package/arnofw/arnofw-enable-iptables-lock-wait.patch Modified: branches/1.0/package/arnofw/arnofw-enable-iptables-lock-wait.patch =================================================================== --- branches/1.0/package/arnofw/arnofw-enable-iptables-lock-wait.patch 2015-08-03 18:32:01 UTC (rev 7175) +++ branches/1.0/package/arnofw/arnofw-enable-iptables-lock-wait.patch 2015-08-03 22:34:50 UTC (rev 7176) @@ -1,38 +1,64 @@ ---- arno-iptables-firewall_2.0.1e/share/arno-iptables-firewall/environment.orig 2015-08-02 08:31:33.000000000 -0500 -+++ arno-iptables-firewall_2.0.1e/share/arno-iptables-firewall/environment 2015-08-02 08:33:37.000000000 -0500 -@@ -291,7 +291,7 @@ +From 8a5f13173cbc21b4c21b0fc97370f9882ef4cd94 Mon Sep 17 00:00:00 2001 +From: Lonnie Abelbeck <lo...@ab...> +Date: Mon, 3 Aug 2015 17:11:00 -0500 +Subject: [PATCH] fixed: Issue #17, Enable xtables lock "wait" option found in + iptables 1.4.20+ + +--- + share/arno-iptables-firewall/environment | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +diff --git a/share/arno-iptables-firewall/environment b/share/arno-iptables-firewall/environment +index 0fe708f..bc2d24e 100644 +--- a/share/arno-iptables-firewall/environment ++++ b/share/arno-iptables-firewall/environment +@@ -296,7 +296,7 @@ ip4tables() { local result retval IFS=' ' - result=`$IP4TABLES "$@" 2>&1` -+ result=`$IP4TABLES -w "$@" 2>&1` ++ result=`$IP4TABLES${IPTABLES_OPTIONS:+ $IPTABLES_OPTIONS} "$@" 2>&1` retval=$? if [ $retval -ne 0 ]; then -@@ -318,7 +318,7 @@ +@@ -323,7 +323,7 @@ ip6tables() { local result retval IFS=' ' - result=`$IP6TABLES "$@" 2>&1` -+ result=`$IP6TABLES -w "$@" 2>&1` ++ result=`$IP6TABLES${IPTABLES_OPTIONS:+ $IPTABLES_OPTIONS} "$@" 2>&1` retval=$? if [ $retval -ne 0 ]; then -@@ -417,7 +417,7 @@ +@@ -422,7 +422,7 @@ try_ip4tables() { local IFS=' ' - $IP4TABLES "$@" >/dev/null 2>&1 -+ $IP4TABLES -w "$@" >/dev/null 2>&1 ++ $IP4TABLES${IPTABLES_OPTIONS:+ $IPTABLES_OPTIONS} "$@" >/dev/null 2>&1 } -@@ -425,7 +425,7 @@ +@@ -430,7 +430,7 @@ try_ip6tables() { local IFS=' ' - $IP6TABLES "$@" >/dev/null 2>&1 -+ $IP6TABLES -w "$@" >/dev/null 2>&1 ++ $IP6TABLES${IPTABLES_OPTIONS:+ $IPTABLES_OPTIONS} "$@" >/dev/null 2>&1 } +@@ -1672,6 +1672,13 @@ if [ -z "$DIG" ]; then + NSLOOKUP="$(find_command /usr/bin/nslookup)" + fi + ++# Enable xtables lock "wait" option found in iptables 1.4.20+ ++if $IP4TABLES -w --version >/dev/null 2>&1; then ++ IPTABLES_OPTIONS="-w" ++else ++ IPTABLES_OPTIONS="" ++fi ++ + # Setup IPv6 detected environment variable + if sysctl_key net.ipv6.conf; then + IPV6_DETECTED=1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-03 18:32:03
|
Revision: 7175 http://sourceforge.net/p/astlinux/code/7175 Author: abelbeck Date: 2015-08-03 18:32:01 +0000 (Mon, 03 Aug 2015) Log Message: ----------- lighttpd, version 1.4.36 adds an annoying mod_proxy.c log, silence it Added Paths: ----------- branches/1.0/package/lighttpd/lighttpd-silence-proxy_request_finished.patch Added: branches/1.0/package/lighttpd/lighttpd-silence-proxy_request_finished.patch =================================================================== --- branches/1.0/package/lighttpd/lighttpd-silence-proxy_request_finished.patch (rev 0) +++ branches/1.0/package/lighttpd/lighttpd-silence-proxy_request_finished.patch 2015-08-03 18:32:01 UTC (rev 7175) @@ -0,0 +1,11 @@ +--- lighttpd-1.4.36/src/mod_proxy.c.orig 2015-08-03 13:03:02.000000000 -0500 ++++ lighttpd-1.4.36/src/mod_proxy.c 2015-08-03 13:04:51.000000000 -0500 +@@ -940,7 +940,7 @@ + case 1: + /* we are done */ + proxy_connection_close(srv, hctx); +- log_error_write(srv, __FILE__, __LINE__, "s", "proxy request finished"); ++ /* log_error_write(srv, __FILE__, __LINE__, "s", "proxy request finished"); */ + + joblist_append(srv, con); + return HANDLER_FINISHED; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-03 17:02:31
|
Revision: 7174 http://sourceforge.net/p/astlinux/code/7174 Author: abelbeck Date: 2015-08-03 17:02:29 +0000 (Mon, 03 Aug 2015) Log Message: ----------- web interface, layout tweaks to PhoneProv tab and add hover-text to CDR Log column title links Modified Paths: -------------- branches/1.0/package/webinterface/altweb/admin/cdrlog.php branches/1.0/package/webinterface/altweb/admin/phoneprov.php Modified: branches/1.0/package/webinterface/altweb/admin/cdrlog.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/cdrlog.php 2015-08-03 00:07:58 UTC (rev 7173) +++ branches/1.0/package/webinterface/altweb/admin/cdrlog.php 2015-08-03 17:02:29 UTC (rev 7174) @@ -420,7 +420,7 @@ function putCDRheader($sortby, $title) { global $myself; - return('<a href="'.$myself.'?sortcolumnby='.$sortby.'" class="headerText">'.$title.'</a>'); + return('<a href="'.$myself.'?sortcolumnby='.$sortby.'" class="headerText" title="Column Sort by: '.$sortby.'">'.$title.'</a>'); } Modified: branches/1.0/package/webinterface/altweb/admin/phoneprov.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/phoneprov.php 2015-08-03 00:07:58 UTC (rev 7173) +++ branches/1.0/package/webinterface/altweb/admin/phoneprov.php 2015-08-03 17:02:29 UTC (rev 7174) @@ -8,7 +8,7 @@ // phoneprov.php for AstLinux // 03-14-2014 -// 08-02-2015, Add Status Info, Reload Config and Reboot buttons +// 08-02-2015, Add Status, Reload and Reboot links // // System location of /mnt/kd/rc.conf.d directory $PHONEPROVCONFDIR = '/mnt/kd/rc.conf.d'; @@ -616,7 +616,7 @@ $info_data_mac = $mac; putHtml('<p> </p>'); } else { - putHtml('<p style="color: red;">Status Info Failed.</p>'); + putHtml('<p style="color: red;">Status Action Failed.</p>'); } } else { putHtml('<p style="color: red;">SQL Action Failed.</p>'); @@ -628,10 +628,10 @@ if (($sip_notify_text = asteriskCMDtext('sip notify '.$sip_notify.' '.$sql['account'])) !== FALSE) { putHtml('<p>'.$sip_notify_text[0].'</p>'); } else { - putHtml('<p style="color: red;">Reload Config Failed.</p>'); + putHtml('<p style="color: red;">Reload Action Failed.</p>'); } } else { - putHtml('<p style="color: red;">Reload Config Failed.</p>'); + putHtml('<p style="color: red;">Reload Action Failed.</p>'); } } else { putHtml('<p style="color: red;">SQL Action Failed.</p>'); @@ -643,10 +643,10 @@ if (($sip_notify_text = asteriskCMDtext('sip notify '.$sip_notify.' '.$sql['account'])) !== FALSE) { putHtml('<p>'.$sip_notify_text[0].'</p>'); } else { - putHtml('<p style="color: red;">Reboot Failed.</p>'); + putHtml('<p style="color: red;">Reboot Action Failed.</p>'); } } else { - putHtml('<p style="color: red;">Reboot Failed.</p>'); + putHtml('<p style="color: red;">Reboot Action Failed.</p>'); } } else { putHtml('<p style="color: red;">SQL Action Failed.</p>'); @@ -794,11 +794,10 @@ if (($sql = isMACinSQL($mac)) !== FALSE) { putHtml("</tr>"); echo '<tr ', ($i % 2 == 0) ? 'class="dtrow0"' : 'class="dtrow1"', '>'; - echo '<td> </td>'; - echo '<td colspan="6">'; - echo ' <a href="'.$myself.'?info='.rawurlencode($mac).'" class="actionText">Status Info</a>'; - echo ' <a href="'.$myself.'?reload='.rawurlencode($mac).'" class="actionText">Reload Config</a>'; - echo ' <a href="'.$myself.'?reboot='.rawurlencode($mac).'" class="actionText">Reboot</a>'; + echo '<td style="text-align: right;" colspan="7">'; + echo ' <a href="'.$myself.'?info='.rawurlencode($mac).'" class="headerText" title="Show SIP Peer Info">Status</a>'; + echo ' <a href="'.$myself.'?reload='.rawurlencode($mac).'" class="headerText" title="Send SIP Notify to Reload Config">Reload</a>'; + echo ' <a href="'.$myself.'?reboot='.rawurlencode($mac).'" class="headerText" title="Send SIP Notify to Reboot Phone">Reboot</a>'; echo '</td>'; if ($info_data_mac === $mac) { foreach ($info_data as $info_label => $info_field) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-03 00:08:00
|
Revision: 7173 http://sourceforge.net/p/astlinux/code/7173 Author: abelbeck Date: 2015-08-03 00:07:58 +0000 (Mon, 03 Aug 2015) Log Message: ----------- web interface, PhoneProv tab, add real-time buttons for 'Status Info', 'Reload Config' and 'Reboot' Modified Paths: -------------- branches/1.0/package/webinterface/altweb/admin/phoneprov.php Modified: branches/1.0/package/webinterface/altweb/admin/phoneprov.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/phoneprov.php 2015-08-02 14:21:20 UTC (rev 7172) +++ branches/1.0/package/webinterface/altweb/admin/phoneprov.php 2015-08-03 00:07:58 UTC (rev 7173) @@ -1,6 +1,6 @@ <?php -// Copyright (C) 2014 Lonnie Abelbeck +// Copyright (C) 2015 Lonnie Abelbeck // This is free software, licensed under the GNU General Public License // version 3 as published by the Free Software Foundation; you can // redistribute it and/or modify it under the terms of the GNU @@ -8,15 +8,20 @@ // phoneprov.php for AstLinux // 03-14-2014 +// 08-02-2015, Add Status Info, Reload Config and Reboot buttons // // System location of /mnt/kd/rc.conf.d directory $PHONEPROVCONFDIR = '/mnt/kd/rc.conf.d'; // System location of gui.phoneprov.conf file $PHONEPROVCONFFILE = '/mnt/kd/rc.conf.d/gui.phoneprov.conf'; +// Asterisk sip_notify config file +$ASTERISK_SIP_NOTIFY_CONF = '/etc/asterisk/sip_notify.conf'; $family = "phoneprov"; $myself = $_SERVER['PHP_SELF']; +$info_data_mac = ''; + require_once '../common/functions.php'; $MAXNUM = (int)getPREFdef($global_prefs, 'phoneprov_extensions_displayed'); @@ -33,6 +38,159 @@ 'EXTIF' => 'External Interface' ); +$sip_notify_reload = array ( + 'aastra' => 'aastra-check-cfg', + 'cisco' => 'cisco-check-cfg', + 'linksys' => 'linksys-warm-restart', + 'polycom' => 'polycom-check-cfg', + 'sipura' => 'sipura-check-cfg', + 'snom' => 'snom-check-cfg', + 'yealink' => 'snom-check-cfg' +); + +$sip_notify_reboot = array ( + 'linksys' => 'linksys-cold-restart', + 'snom' => 'snom-reboot', + 'yealink' => 'snom-reboot' +); + +// Function: isMACinSQL +// +function isMACinSQL($mac) { + + if (! class_exists('PDO')) { + return(FALSE); + } + + $db_file = '/mnt/kd/asterisk-odbc.sqlite3'; + if (! is_file("$db_file")) { + return(FALSE); + } + + $sql = array(); + try { + $pdo_db = new PDO("sqlite:$db_file"); + $pdo_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + + $sql_str = "SELECT account,model,vendor FROM phoneprov WHERE mac_addr='$mac'"; + foreach ($pdo_db->query($sql_str) as $row) { + if ($row['account'] !== '') { + $sql['account'] = $row['account']; + $sql['model'] = ($row['model'] !== '') ? $row['model'] : 'unknown'; + $sql['vendor'] = ($row['vendor'] !== '') ? $row['vendor'] : 'unknown'; + break; + } + } + $pdo_db = NULL; + } catch (PDOException $e) { + return(FALSE); + } + + if (! isset($sql['account'])) { + return(FALSE); + } + return($sql); +} + +// Function: isMACinfo +// +function isMACinfo($mac, $sql) { + + if (($text = asteriskCMDtext('sip show peer '.$sql['account'])) === FALSE) { + return(FALSE); + } + + $match = array ( + 'useragent', + 'addr->ip', + 'status' + ); + + $info = array(); + foreach ($match as $value) { + foreach ($text as $line) { + $strtokens = explode(':', $line, 2); + $label = trim($strtokens[0]); + if ($value === strtolower($label)) { + if (($field = trim($strtokens[1])) !== '') { + $info[$label] = $field; + } + break; + } + } + } + if (count($info) < 1) { + return(FALSE); + } + return($info); +} + +// Function: isMACreload +// +function isMACreload($mac, $sql, $map) { + global $ASTERISK_SIP_NOTIFY_CONF; + + $model = $sql['model'].'-reload'; + $vendor = $sql['vendor'].'-reload'; + $name = $ASTERISK_SIP_NOTIFY_CONF; + if (is_file($name)) { + $cmd = 'grep -q "^\['.$model.'\]" '.$name; + shell($cmd.' >/dev/null 2>/dev/null', $status); + if ($status == 0) { + return($model); + } + $cmd = 'grep -q "^\['.$vendor.'\]" '.$name; + shell($cmd.' >/dev/null 2>/dev/null', $status); + if ($status == 0) { + return($vendor); + } + if (isset($map[$sql['vendor']])) { + return($map[$sql['vendor']]); + } + } + return(FALSE); +} + +// Function: isMACreboot +// +function isMACreboot($mac, $sql, $map) { + global $ASTERISK_SIP_NOTIFY_CONF; + + $model = $sql['model'].'-reboot'; + $vendor = $sql['vendor'].'-reboot'; + $name = $ASTERISK_SIP_NOTIFY_CONF; + if (is_file($name)) { + $cmd = 'grep -q "^\['.$model.'\]" '.$name; + shell($cmd.' >/dev/null 2>/dev/null', $status); + if ($status == 0) { + return($model); + } + $cmd = 'grep -q "^\['.$vendor.'\]" '.$name; + shell($cmd.' >/dev/null 2>/dev/null', $status); + if ($status == 0) { + return($vendor); + } + if (isset($map[$sql['vendor']])) { + return($map[$sql['vendor']]); + } + } + return(FALSE); +} + +// Function: asteriskCMDtext +// +function asteriskCMDtext($cmd) { + + $tmpfile = tempnam("/tmp", "PHP_"); + if (asteriskCMD($cmd, $tmpfile) == 0) { + $text = @file($tmpfile, FILE_IGNORE_NEW_LINES); + } else { + $text = FALSE; + } + @unlink($tmpfile); + return($text); +} + // Function: putACTIONresult // function putACTIONresult($result_str, $status) { @@ -451,6 +609,48 @@ } else { putHtml('<p> </p>'); } + } elseif (isset($_GET['info'])) { + $mac = rawurldecode($_GET['info']); + if (($sql = isMACinSQL($mac)) !== FALSE) { + if (($info_data = isMACinfo($mac, $sql)) !== FALSE) { + $info_data_mac = $mac; + putHtml('<p> </p>'); + } else { + putHtml('<p style="color: red;">Status Info Failed.</p>'); + } + } else { + putHtml('<p style="color: red;">SQL Action Failed.</p>'); + } + } elseif (isset($_GET['reload'])) { + $mac = rawurldecode($_GET['reload']); + if (($sql = isMACinSQL($mac)) !== FALSE) { + if (($sip_notify = isMACreload($mac, $sql, $sip_notify_reload)) !== FALSE) { + if (($sip_notify_text = asteriskCMDtext('sip notify '.$sip_notify.' '.$sql['account'])) !== FALSE) { + putHtml('<p>'.$sip_notify_text[0].'</p>'); + } else { + putHtml('<p style="color: red;">Reload Config Failed.</p>'); + } + } else { + putHtml('<p style="color: red;">Reload Config Failed.</p>'); + } + } else { + putHtml('<p style="color: red;">SQL Action Failed.</p>'); + } + } elseif (isset($_GET['reboot'])) { + $mac = rawurldecode($_GET['reboot']); + if (($sql = isMACinSQL($mac)) !== FALSE) { + if (($sip_notify = isMACreboot($mac, $sql, $sip_notify_reboot)) !== FALSE) { + if (($sip_notify_text = asteriskCMDtext('sip notify '.$sip_notify.' '.$sql['account'])) !== FALSE) { + putHtml('<p>'.$sip_notify_text[0].'</p>'); + } else { + putHtml('<p style="color: red;">Reboot Failed.</p>'); + } + } else { + putHtml('<p style="color: red;">Reboot Failed.</p>'); + } + } else { + putHtml('<p style="color: red;">SQL Action Failed.</p>'); + } } else { putHtml('<p> </p>'); } @@ -591,6 +791,26 @@ $sel = ($data[$i]['enabled'] === '0') ? ' checked="checked"' : ''; echo '<td style="text-align: center;">', '<input type="checkbox" name="disabled[]" value="', $mac, '"'.$sel.' />', '</td>'; echo '<td style="text-align: center;">', '<input type="checkbox" name="delete[]" value="', $mac, '" />', '</td>'; + if (($sql = isMACinSQL($mac)) !== FALSE) { + putHtml("</tr>"); + echo '<tr ', ($i % 2 == 0) ? 'class="dtrow0"' : 'class="dtrow1"', '>'; + echo '<td> </td>'; + echo '<td colspan="6">'; + echo ' <a href="'.$myself.'?info='.rawurlencode($mac).'" class="actionText">Status Info</a>'; + echo ' <a href="'.$myself.'?reload='.rawurlencode($mac).'" class="actionText">Reload Config</a>'; + echo ' <a href="'.$myself.'?reboot='.rawurlencode($mac).'" class="actionText">Reboot</a>'; + echo '</td>'; + if ($info_data_mac === $mac) { + foreach ($info_data as $info_label => $info_field) { + putHtml("</tr>"); + echo '<tr ', ($i % 2 == 0) ? 'class="dtrow0"' : 'class="dtrow1"', '>'; + echo '<td style="text-align: right;">'.htmlspecialchars($info_label).':</td>'; + echo '<td colspan="6">'; + echo htmlspecialchars($info_field); + echo '</td>'; + } + } + } } } else { if ($db['status'] == 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-08-02 14:21:22
|
Revision: 7172 http://sourceforge.net/p/astlinux/code/7172 Author: abelbeck Date: 2015-08-02 14:21:20 +0000 (Sun, 02 Aug 2015) Log Message: ----------- arnofw, add -w (enable iptables lock wait) option, added to iptables 1.4.20 Modified Paths: -------------- branches/1.0/package/arnofw/adaptive-ban/adaptive-ban-helper.sh branches/1.0/package/arnofw/dyndns-host-open/dyndns-host-open-helper.sh Added Paths: ----------- branches/1.0/package/arnofw/arnofw-enable-iptables-lock-wait.patch Modified: branches/1.0/package/arnofw/adaptive-ban/adaptive-ban-helper.sh =================================================================== --- branches/1.0/package/arnofw/adaptive-ban/adaptive-ban-helper.sh 2015-07-31 16:41:13 UTC (rev 7171) +++ branches/1.0/package/arnofw/adaptive-ban/adaptive-ban-helper.sh 2015-08-02 14:21:20 UTC (rev 7172) @@ -286,7 +286,7 @@ { local result retval - result="$($IP4TABLES "$@" 2>&1)" + result="$($IP4TABLES -w "$@" 2>&1)" retval=$? if [ $retval -ne 0 ]; then @@ -302,7 +302,7 @@ { local result retval - result="$($IP6TABLES "$@" 2>&1)" + result="$($IP6TABLES -w "$@" 2>&1)" retval=$? if [ $retval -ne 0 ]; then Added: branches/1.0/package/arnofw/arnofw-enable-iptables-lock-wait.patch =================================================================== --- branches/1.0/package/arnofw/arnofw-enable-iptables-lock-wait.patch (rev 0) +++ branches/1.0/package/arnofw/arnofw-enable-iptables-lock-wait.patch 2015-08-02 14:21:20 UTC (rev 7172) @@ -0,0 +1,38 @@ +--- arno-iptables-firewall_2.0.1e/share/arno-iptables-firewall/environment.orig 2015-08-02 08:31:33.000000000 -0500 ++++ arno-iptables-firewall_2.0.1e/share/arno-iptables-firewall/environment 2015-08-02 08:33:37.000000000 -0500 +@@ -291,7 +291,7 @@ + { + local result retval IFS=' ' + +- result=`$IP4TABLES "$@" 2>&1` ++ result=`$IP4TABLES -w "$@" 2>&1` + retval=$? + + if [ $retval -ne 0 ]; then +@@ -318,7 +318,7 @@ + { + local result retval IFS=' ' + +- result=`$IP6TABLES "$@" 2>&1` ++ result=`$IP6TABLES -w "$@" 2>&1` + retval=$? + + if [ $retval -ne 0 ]; then +@@ -417,7 +417,7 @@ + { + local IFS=' ' + +- $IP4TABLES "$@" >/dev/null 2>&1 ++ $IP4TABLES -w "$@" >/dev/null 2>&1 + } + + +@@ -425,7 +425,7 @@ + { + local IFS=' ' + +- $IP6TABLES "$@" >/dev/null 2>&1 ++ $IP6TABLES -w "$@" >/dev/null 2>&1 + } + + Modified: branches/1.0/package/arnofw/dyndns-host-open/dyndns-host-open-helper.sh =================================================================== --- branches/1.0/package/arnofw/dyndns-host-open/dyndns-host-open-helper.sh 2015-07-31 16:41:13 UTC (rev 7171) +++ branches/1.0/package/arnofw/dyndns-host-open/dyndns-host-open-helper.sh 2015-08-02 14:21:20 UTC (rev 7172) @@ -142,7 +142,7 @@ { local result retval - result="$($IP4TABLES "$@" 2>&1)" + result="$($IP4TABLES -w "$@" 2>&1)" retval=$? if [ $retval -ne 0 ]; then This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-07-31 16:41:15
|
Revision: 7171 http://sourceforge.net/p/astlinux/code/7171 Author: abelbeck Date: 2015-07-31 16:41:13 +0000 (Fri, 31 Jul 2015) Log Message: ----------- update ChangeLog Modified Paths: -------------- branches/1.0/docs/ChangeLog.txt Modified: branches/1.0/docs/ChangeLog.txt =================================================================== --- branches/1.0/docs/ChangeLog.txt 2015-07-31 16:39:40 UTC (rev 7170) +++ branches/1.0/docs/ChangeLog.txt 2015-07-31 16:41:13 UTC (rev 7171) @@ -46,7 +46,7 @@ -- stunnel, version bump to 5.22 --- dnsmasq, version bump to 2.74 +-- dnsmasq, version bump to 2.75 -- dnscrypt-proxy, version bump to 1.6.0, add support for ephemeral-keys and an optional secondary proxy server. New rc.conf variables are: DNSCRYPT_EPHEMERAL_KEYS, DNSCRYPT_2SERVER_ADDRESS, DNSCRYPT_2PROVIDER_NAME, DNSCRYPT_2PROVIDER_KEY This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |