Update geeklog package from 1.4.1nb4 to 1.5.2.4 (1.5.2sr4).

pkgsrc changes: overhaul this package.

	* Add LICENSE.
	* Clean up bmake's macros, such as addition of PRINT_PLIST_AWK.

Geeklog changes: too many chagnes to write here.

	* New user-friendly installation.
	* New Configuration GUI.
	* New Webservice GUI.
	* And more.

	Please refer http://www.geeklog.net/docs/english/changes.html
	for more information.

Fixed some security problems about SQL injection vulnerability.
This commit is contained in:
taca 2009-05-26 14:19:29 +00:00
parent acffb4513c
commit 6d2698e886
16 changed files with 748 additions and 705 deletions

View file

@ -1,13 +1,17 @@
# $NetBSD: DEINSTALL,v 1.4 2007/05/20 15:56:44 taca Exp $ # $NetBSD: DEINSTALL,v 1.5 2009/05/26 14:19:29 taca Exp $
GEEKLOG_DIR="@GEEKLOG_DIR@" GEEKLOG_PUBDIR="${PREFIX}/@GEEKLOG_PUB@"
GEEKLOG_EXAMPLESDIR="@GEEKLOG_EXAMPLESDIR@" GEEKLOG_DIR="${PREFIX}/@GEEKLOG_BASE@"
GEEKLOG_PUBDIR="@GEEKLOG_PUBDIR@" GEEKLOG_TMPL_DIR="${PREFIX}/@GL_TMPL@"
GEEKLOG_TMPL_SUB="@GEEKLOG_TMPL_SUB@" GEEKLOG_TMPL_SUB="@GL_TMPL_SUB@"
GEEKLOG_TMPL_DIR="@GEEKLOG_TMPL_DIR@"
case ${STAGE} in case ${STAGE} in
DEINSTALL) DEINSTALL)
(cd ${GEEKLOG_DIR}; \
if [ ! -s logs/error.log ]; then
rm -f logs/error.log
fi
)
(cd ${GEEKLOG_PUBDIR}; ${RM} -fr admin) (cd ${GEEKLOG_PUBDIR}; ${RM} -fr admin)
(cd ${GEEKLOG_TMPL_DIR} (cd ${GEEKLOG_TMPL_DIR}
${FIND} ${GEEKLOG_TMPL_SUB} -type f -print | \ ${FIND} ${GEEKLOG_TMPL_SUB} -type f -print | \
@ -23,34 +27,6 @@ DEINSTALL)
while read d; do while read d; do
${RMDIR} ${d} 2>/dev/null ${RMDIR} ${d} 2>/dev/null
done done
# XXX: work around for remaining config.php and system/lib-custom.php
conf_files="${GEEKLOG_EXAMPLESDIR}/config.php \
${GEEKLOG_DIR}/config.php \
${GEEKLOG_EXAMPLESDIR}/system/lib-custom.php \
${GEEKLOG_DIR}/system/lib-custom.php"
file_list=
set ${conf_files}
while ${TEST} $# -gt 0; do
eg=$1; shift
cf=$1; shift
if ${TEST} -f ${cf} -a -f ${eg} && ${CMP} -s ${cf} ${eg}; then
${RM} ${cf}
else
file_list="${file_list} ${cf}"
fi
done
if ${TEST} -n "${file_list}"; then
${ECHO} "==========================================================================="
${ECHO} "The following files are no longer being used by ${PKGNAME},"
${ECHO} "and they can be removed if no other packages are using them:"
${ECHO} ""
for f in ${file_list}; do
${ECHO} " ${f}"
done
${ECHO} ""
${ECHO} "==========================================================================="
fi
) )
;; ;;
esac esac

View file

@ -1,10 +1,10 @@
# $NetBSD: INSTALL,v 1.3 2007/05/20 15:56:44 taca Exp $ # $NetBSD: INSTALL,v 1.4 2009/05/26 14:19:29 taca Exp $
APACHE_GROUP="@APACHE_GROUP@" APACHE_GROUP="@APACHE_GROUP@"
GEEKLOG_PUBDIR="@GEEKLOG_PUBDIR@" GEEKLOG_PUBDIR="${PREFIX}/@GEEKLOG_PUB@"
GEEKLOG_ADMIN_DIR="@GEEKLOG_ADMIN_DIR@" GEEKLOG_ADMIN_DIR="${PREFIX}/@GL_ADMIN@"
GEEKLOG_TMPL_SUB="@GEEKLOG_TMPL_SUB@" GEEKLOG_TMPL_DIR="${PREFIX}/@GL_TMPL@"
GEEKLOG_TMPL_DIR="@GEEKLOG_TMPL_DIR@" GEEKLOG_TMPL_SUB="@GL_TMPL_SUB@"
PAX="@PAX@" PAX="@PAX@"
case ${STAGE} in case ${STAGE} in
@ -26,6 +26,7 @@ POST-INSTALL)
if ${TEST} ! -f ${file}; then if ${TEST} ! -f ${file}; then
${CP} -p ${f} ${file} ${CP} -p ${f} ${file}
${CHGRP} ${APACHE_GROUP} ${file} ${CHGRP} ${APACHE_GROUP} ${file}
${CHMOD} 0660 ${file}
fi fi
done done
) )

View file

@ -1,129 +1,128 @@
# $NetBSD: Makefile,v 1.21 2008/09/28 02:25:26 taca Exp $ # $NetBSD: Makefile,v 1.22 2009/05/26 14:19:29 taca Exp $
# #
DISTNAME= geeklog-${VER} DISTNAME= geeklog-${VER}
PKGNAME= geeklog-${VER:C/(sr|-)/./g} PKGNAME= geeklog-${VER:C/(sr|-)/./g}
PKGREVISION= 4
CATEGORIES= www CATEGORIES= www
MASTER_SITES= http://www.geeklog.net/filemgmt/upload_dir/ MASTER_SITES= http://www.geeklog.net/filemgmt/upload_dir/
MAINTAINER= taca@NetBSD.org MAINTAINER= taca@NetBSD.org
HOMEPAGE= http://www.geeklog.net/ HOMEPAGE= http://www.geeklog.net/
COMMENT= PHP/MySQL based application for managing dynamic web content COMMENT= PHP/MySQL based application for managing dynamic web content
LICENSE= gnu-gpl-v2
PKG_DESTDIR_SUPPORT= user-destdir PKG_DESTDIR_SUPPORT= user-destdir
PRIVILEGED_STAGES+= clean
DEPENDS+= ${APACHE_PKG_PREFIX}-${PHP_PKG_PREFIX}>=4.3.3:../../www/ap-php
DEPENDS+= ${PHP_PKG_PREFIX}-mysql>=4.3.0:../../databases/php-mysql DEPENDS+= ${PHP_PKG_PREFIX}-mysql>=4.3.0:../../databases/php-mysql
USE_TOOLS+= pax:run USE_TOOLS+= pax
VER= 1.4.1 VER= 1.5.2sr4
NO_BUILD= YES NO_BUILD= YES
PKG_GROUPS_VARS+= APACHE_GROUP PKG_GROUPS_VARS+= APACHE_GROUP
BUILD_DEFS+= GEEKLOG_SITEBASE BUILD_DEFS+= GEEKLOG_SITEBASE
GEEKLOG_SYS= emailgeeklogstories language plugins readme sql system CHECK_PERMS_SKIP= ${GEEKLOG_PUB}/backend ${GEEKLOG_PUB}/images/*
GEEKLOG_TMPL_SUB= backend images/articles images/library \
images/topics images/userphotos
GEEKLOG_CONF_FILES= config.php plugins/calendar/config.php \ GL_SYS= emailgeeklogstories language plugins readme sql system
plugins/links/config.php plugins/polls/config.php \ GL_TMPL_SUB= backend images/articles images/library images/topics \
plugins/spamx/config.php \ images/userphotos
plugins/staticpages/config.php \
system/lib-custom.php
CONF_FILES+= ${GEEKLOG_EXAMPLESDIR}/geeklog.conf \ GL_CONF_FILES= db-config.php system/lib-custom.php
GL_CONF_PUB_FILES= public_html/siteconfig.php
CONF_FILES+= ${GL_EG}/geeklog.conf \
${PKG_SYSCONFDIR}/geeklog.conf ${PKG_SYSCONFDIR}/geeklog.conf
.for f in ${GEEKLOG_CONF_FILES} .for f in ${GL_CONF_FILES}
CONF_FILES_PERMS+= ${GEEKLOG_EXAMPLESDIR}/${f} \ CONF_FILES_PERMS+= ${GL_EG}/${f:T} ${GEEKLOG_BASE}/${f} \
${GEEKLOG_DIR}/${f} \ ${BINOWN} ${APACHE_GROUP} 0660
${BINOWN} ${APACHE_GROUP} 0640
.endfor .endfor
OWN_DIRS_PERMS+= ${GEEKLOG_DIR}/backups ${BINOWN} ${APACHE_GROUP} 0770 \ .for f in ${GL_CONF_PUB_FILES}
${GEEKLOG_DIR}/data ${BINOWN} ${APACHE_GROUP} 0770 \ CONF_FILES_PERMS+= ${GL_EG}/${f:T} ${GEEKLOG_PUB}/${f:T} \
${GEEKLOG_DIR}/logs ${BINOWN} ${APACHE_GROUP} 0775 ${BINOWN} ${APACHE_GROUP} 0660
.endfor
OWN_DIRS_PERMS+= ${GEEKLOG_BASE}/backups ${BINOWN} ${APACHE_GROUP} 0770 \
${GEEKLOG_BASE}/data ${BINOWN} ${APACHE_GROUP} 0770 \
${GEEKLOG_BASE}/logs ${BINOWN} ${APACHE_GROUP} 0775
OWN_DIRS+= ${GEEKLOG_PUB} OWN_DIRS+= ${GEEKLOG_PUB}
FILES_SUBST+= APACHE_GROUP=${APACHE_GROUP:Q} \ FILES_SUBST+= APACHE_GROUP=${APACHE_GROUP:Q} \
GEEKLOG_DIR=${GEEKLOG_DIR:Q} \ GEEKLOG_BASE=${GEEKLOG_BASE:Q} \
GEEKLOG_EXAMPLESDIR=${GEEKLOG_EXAMPLESDIR:Q} \ GL_EG=${GL_EG:Q} \
GEEKLOG_PUBDIR=${GEEKLOG_PUBDIR:Q} \ GEEKLOG_PUB=${GEEKLOG_PUB:Q} \
GEEKLOG_ADMIN_DIR=${GEEKLOG_ADMIN_DIR:Q} \ GL_ADMIN=${GL_ADMIN:Q} \
GEEKLOG_TMPL_SUB=${GEEKLOG_TMPL_SUB:Q} \ GL_TMPL_SUB=${GL_TMPL_SUB:Q} \
GEEKLOG_TMPL_DIR=${GEEKLOG_TMPL_DIR:Q} \ GL_TMPL=${GL_TMPL:Q} \
PAX=${PAX:Q} PAX=${PAX:Q}
PLIST_SUBST+= GEEKLOG_BASE=${GEEKLOG_BASE:Q} \ PLIST_SUBST+= GEEKLOG_BASE=${GEEKLOG_BASE:Q} \
GEEKLOG_PUB=${GEEKLOG_PUB:Q} \ GEEKLOG_PUB=${GEEKLOG_PUB:Q} \
GEEKLOG_ADMIN=${GEEKLOG_ADMIN:Q} \ GL_ADMIN=${GL_ADMIN:Q} \
GEEKLOG_TMPL=${GEEKLOG_TMPL:Q} GL_TMPL=${GL_TMPL:Q} \
GL_DOC=${GL_DOC:Q} \
GL_EG=${GL_EG:Q}
.include "../../www/geeklog/Makefile.common" .include "../../www/geeklog/Makefile.common"
PKG_SYSCONFSUBDIR?= geeklog PKG_SYSCONFSUBDIR?= geeklog
SUBST_CLASSES+= paths SUBST_CLASSES+= paths
SUBST_FILES.paths+= ${WRKDIR}/README ${WRKDIR}/createdb.php SUBST_FILES.paths+= ${WRKDIR}/README
SUBST_FILES.paths+= ${WRKSRC}/config.php ${WRKSRC}/emailgeeklogstories SUBST_FILES.paths+= ${WRKSRC}/emailgeeklogstories
SUBST_FILES.paths+= ${WRKSRC}/public_html/lib-common.php SUBST_FILES.paths+= ${WRKSRC}/public_html/admin/install/index.php
SUBST_SED.paths+= -e 's,@GEEKLOG_DIR@,${GEEKLOG_DIR:Q},g' SUBST_FILES.paths+= ${WRKDIR}/geeklog.conf
SUBST_SED.paths+= -e 's,@GEEKLOG_EXAMPLESDIR@,${GEEKLOG_EXAMPLESDIR:Q},g' SUBST_SED.paths+= -e 's,@GEEKLOG_BASE@,${GEEKLOG_BASE:Q},g'
SUBST_SED.paths+= -e 's,@GEEKLOG_PUBDIR@,${GEEKLOG_PUBDIR:Q},g' SUBST_SED.paths+= -e 's,@GEEKLOG_PUB@,${GEEKLOG_PUB:Q},g'
SUBST_SED.paths+= -e 's,@GEEKLOG_SITESUBDIR@,${GEEKLOG_SITESUBDIR:Q},g' SUBST_SED.paths+= -e 's,@GEEKLOG_SITESUBDIR@,${GEEKLOG_SITESUBDIR:Q},g'
SUBST_SED.paths+= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR:Q},g' SUBST_SED.paths+= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR:Q},g'
SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX:Q},g' SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX:Q},g'
SUBST_STAGE.paths= post-configure
SUBST_CLASSES+= conf
SUBST_FILES.conf+= ${WRKDIR}/geeklog.conf
SUBST_SED.conf+= -e 's,@GEEKLOG_DIR@,${GEEKLOG_DIR:Q},g'
SUBST_SED.conf+= -e 's,@GEEKLOG_PUBDIR@,${GEEKLOG_PUBDIR:Q},g'
.if empty(GEEKLOG_SITEBASE) .if empty(GEEKLOG_SITEBASE)
SUBST_SED.conf+= -e '/^Alias/s,^,\#,' SUBST_SED.conf+= -e '/^Alias/s,^,\#,'
.endif .endif
SUBST_STAGE.conf= post-configure SUBST_STAGE.paths= post-configure
INSTALLATION_DIRS= ${GEEKLOG_BASE} ${GEEKLOG_PUB} ${GEEKLOG_TMPL}/images \ INSTALLATION_DIRS= ${GEEKLOG_BASE} ${GEEKLOG_PUB} ${GL_TMPL}/images \
share/examples/geeklog ${GEEKLOG_DOCDIR} share/examples/geeklog ${GL_DOC} ${GL_EG}
post-extract: post-extract:
${CP} ${FILESDIR}/README ${FILESDIR}/createdb.php \ ${CP} ${FILESDIR}/README ${FILESDIR}/geeklog.conf ${WRKDIR}
${FILESDIR}/geeklog.conf ${WRKDIR}
pre-install: pre-install:
${FIND} ${WRKSRC:Q} -name "*.orig*" -exec ${RM} -f {} \; ${FIND} ${WRKSRC:Q} -type f -name "*.orig" -exec ${RM} -f {} \;
cd ${WRKSRC}/public_html; \ cd ${WRKSRC}/public_html; \
${FIND} ${GEEKLOG_TMPL_SUB} -type f -exec ${CHMOD} -x {} \; ${FIND} ${GL_TMPL_SUB} -type f -exec ${CHMOD} -x {} \;
${CHMOD} 0664 ${WRKSRC}/public_html/backend/geeklog.rss ${CHMOD} 0664 ${WRKSRC}/public_html/backend/geeklog.rss
cd ${WRKSRC}/system; \ cd ${WRKSRC}/system; \
${FIND} pear -type f -exec ${CHMOD} 0644 {} \; ${FIND} pear -type f -exec ${CHMOD} 0644 {} \;
do-install: do-install:
${INSTALL_DATA} ${WRKDIR}/README ${DESTDIR}${GEEKLOG_DOCDIR} ${INSTALL_DATA} ${WRKDIR}/README ${DESTDIR}${PREFIX}/${GL_DOC}
.for f in ${GEEKLOG_CONF_FILES} .for f in ${GL_CONF_FILES} ${GL_CONF_PUB_FILES}
${INSTALL_DATA_DIR} ${DESTDIR}${GEEKLOG_EXAMPLESDIR}/${f:H} ${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/${GL_EG}
${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${GEEKLOG_EXAMPLESDIR}/${f}
${RM} ${WRKSRC}/${f} ${RM} ${WRKSRC}/${f}
.endfor .endfor
${INSTALL_SCRIPT} ${WRKDIR}/createdb.php ${DESTDIR}${GEEKLOG_DIR} ${INSTALL_DATA} ${WRKDIR}/geeklog.conf ${DESTDIR}${PREFIX}/${GL_EG}
${INSTALL_DATA} ${WRKDIR}/geeklog.conf ${DESTDIR}${GEEKLOG_EXAMPLESDIR} .for f in ${GL_SYS}
.for f in ${GEEKLOG_SYS} cd ${WRKSRC}; pax -rw ${f} ${DESTDIR}${PREFIX}/${GEEKLOG_BASE}
cd ${WRKSRC}; pax -rw ${f} ${DESTDIR}${GEEKLOG_DIR}
.endfor .endfor
cd ${WRKSRC}/public_html; \ cd ${WRKSRC}/public_html; \
pax -rw admin ${DESTDIR}${GEEKLOG_DIR}; \ pax -rw admin ${DESTDIR}${PREFIX}/${GEEKLOG_BASE}; \
${RM} -rf admin ${RM} -rf admin
.for d in ${GEEKLOG_TMPL_SUB} .for d in ${GL_TMPL_SUB}
cd ${WRKSRC}/public_html; \ cd ${WRKSRC}/public_html; \
if [ -d ${d} ]; then \ if [ -d ${d} ]; then \
pax -rw ${d} ${DESTDIR}${GEEKLOG_TMPL_DIR}; \ pax -rw ${d} ${DESTDIR}${PREFIX}/${GL_TMPL}; \
${RM} -rf ${d}; \ ${RM} -rf ${d}; \
fi fi
.endfor .endfor
cd ${WRKSRC}/public_html; pax -rw . ${DESTDIR}${GEEKLOG_PUBDIR} cd ${WRKSRC}/public_html; pax -rw . ${DESTDIR}${PREFIX}/${GEEKLOG_PUB}
.include "../../mk/apache.mk"
.include "../../lang/php/phpversion.mk" .include "../../lang/php/phpversion.mk"
.include "../../mk/bsd.pkg.mk" .include "../../mk/bsd.pkg.mk"

View file

@ -1,25 +1,21 @@
# $NetBSD: Makefile.common,v 1.6 2008/06/19 14:08:42 taca Exp $ # $NetBSD: Makefile.common,v 1.7 2009/05/26 14:19:29 taca Exp $
# #
# used by www/geeklog/Makefile # used by www/geeklog/Makefile
GEEKLOG_ADMIN= ${GEEKLOG_BASE}/admin
GEEKLOG_TMPL= ${GEEKLOG_BASE}/default
# Geeklog system # Geeklog system
GEEKLOG_DIR= ${PREFIX}/${GEEKLOG_BASE} GL_ADMIN= ${GEEKLOG_BASE}/admin
GL_TMPL= ${GEEKLOG_BASE}/default
# Geeklog public area # Geeklog public area
GEEKLOG_PUBDIR= ${PREFIX}/${GEEKLOG_PUB}
GEEKLOG_ADMIN_DIR= ${PREFIX}/${GEEKLOG_ADMIN}
GEEKLOG_TMPL_DIR= ${PREFIX}/${GEEKLOG_TMPL}
GEEKLOG_DOCDIR= ${PREFIX}/share/doc/geeklog GL_DOC= share/doc/geeklog
GEEKLOG_EXAMPLESDIR= ${PREFIX}/share/examples/geeklog GL_EG= share/examples/geeklog
.include "../../mk/bsd.prefs.mk" .include "../../mk/bsd.prefs.mk"
# Geeklog's basic directories.
GEEKLOG_BASE?= share/geeklog GEEKLOG_BASE?= share/geeklog
# Geeklog's basic directories.
GEEKLOG_PUB?= share/httpd/geeklog GEEKLOG_PUB?= share/httpd/geeklog
# access Geeklog as its own directory? # access Geeklog as its own directory?
@ -30,3 +26,42 @@ BUILD_DEFS+= GEEKLOG_BASE GEEKLOG_PUB GEEKLOG_SITEBASE
.if !empty(GEEKLOG_SITEBASE) .if !empty(GEEKLOG_SITEBASE)
GEEKLOG_SITESUBDIR= /${GEEKLOG_SITEBASE} GEEKLOG_SITESUBDIR= /${GEEKLOG_SITEBASE}
.endif .endif
PRINT_PLIST_AWK+= /^(@dirrm )?${GL_ADMIN:S|/|\\/|g}/ \
{ gsub(/${GL_ADMIN:S|/|\\/|g}/, "$${GL_ADMIN}"); \
print; next; }
PRINT_PLIST_AWK+= /^(@dirrm )?${GL_TMPL:S|/|\\/|g}/ \
{ gsub(/${GL_TMPL:S|/|\\/|g}/, "$${GL_TMPL}"); \
print; next; }
PRINT_PLIST_AWK+= /^(@dirrm )?${GL_DOC:S|/|\\/|g}/ \
{ gsub(/${GL_DOC:S|/|\\/|g}/, "$${GL_DOC}"); \
print; next; }
PRINT_PLIST_AWK+= /^(@dirrm )?${GL_EG:S|/|\\/|g}/ \
{ gsub(/${GL_EG:S|/|\\/|g}/, "$${GL_EG}"); \
print; next; }
PRINT_PLIST_AWK+= /^@dirrm ${GEEKLOG_BASE:S|/|\\/|g}$$/ { next; }
PRINT_PLIST_AWK+= /^(@dirrm )?${GEEKLOG_BASE:S|/|\\/|g}\/backups/ \
{ next; }
PRINT_PLIST_AWK+= /^(@dirrm )?${GEEKLOG_BASE:S|/|\\/|g}\/data/ { next; }
PRINT_PLIST_AWK+= /^(@dirrm )?${GEEKLOG_BASE:S|/|\\/|g}\/logs/ { next; }
PRINT_PLIST_AWK+= /${GEEKLOG_BASE:S|/|\\/|g}\/db-config.php/ { next; }
PRINT_PLIST_AWK+= /${GEEKLOG_BASE:S|/|\\/|g}\/system\/lib-custom.php/ \
{ next; }
PRINT_PLIST_AWK+= /^(@dirrm )?${GEEKLOG_BASE:S|/|\\/|g}/ \
{ gsub(/${GEEKLOG_BASE:S|/|\\/|g}/, "$${GEEKLOG_BASE}"); \
print; next; }
PRINT_PLIST_AWK+= /^@dirrm ${GEEKLOG_PUB:S|/|\\/|g}$$/ { next; }
PRINT_PLIST_AWK+= /^(@dirrm )?${GEEKLOG_PUB:S|/|\\/|g}\/admin/ { next; }
PRINT_PLIST_AWK+= /^(@dirrm )?${GEEKLOG_PUB:S|/|\\/|g}\/backend/ { next; }
PRINT_PLIST_AWK+= /^(@dirrm )?${GEEKLOG_PUB:S|/|\\/|g}\/images\/articles/ \
{ next; }
PRINT_PLIST_AWK+= /^(@dirrm )?${GEEKLOG_PUB:S|/|\\/|g}\/images\/library/ \
{ next; }
PRINT_PLIST_AWK+= /^(@dirrm )?${GEEKLOG_PUB:S|/|\\/|g}\/images\/topics/ \
{ next; }
PRINT_PLIST_AWK+= /^(@dirrm )?${GEEKLOG_PUB:S|/|\\/|g}\/images\/userphotos/ \
{ next; }
PRINT_PLIST_AWK+= /${GEEKLOG_PUB:S|/|\\/|g}\/siteconfig.php/ { next; }
PRINT_PLIST_AWK+= /^(@dirrm )?${GEEKLOG_PUB:S|/|\\/|g}/ \
{ gsub(/${GEEKLOG_PUB:S|/|\\/|g}/, "$${GEEKLOG_PUB}"); \
print; next; }

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,7 @@
$NetBSD: distinfo,v 1.8 2008/09/09 14:34:13 taca Exp $ $NetBSD: distinfo,v 1.9 2009/05/26 14:19:29 taca Exp $
SHA1 (geeklog-1.4.1.tar.gz) = c323c29b523598b97d7e0957435c0ec0c31cb290 SHA1 (geeklog-1.5.2sr4.tar.gz) = fa0e1e97a8d3fa7ccdff0835eb0bd0e963d5bc24
RMD160 (geeklog-1.4.1.tar.gz) = bfac9946b34d0254fedd3a54cf742b044d347a3c RMD160 (geeklog-1.5.2sr4.tar.gz) = a218749173c0c4e1aba322759f7ee32d20ec166d
Size (geeklog-1.4.1.tar.gz) = 3631405 bytes Size (geeklog-1.5.2sr4.tar.gz) = 4499082 bytes
SHA1 (patch-aa) = f96a2391925ae66c9629ee4480053b71dc33d587 SHA1 (patch-aa) = 56252ea1af7abe3aec8c99f11788f58de0015948
SHA1 (patch-ab) = 3cbc5f3845eaaf78c349e1bc82e8e792627a12db SHA1 (patch-aj) = 846d860115d4108454799599ce41ead262efba92
SHA1 (patch-ac) = e5523aab7a13f014ecb961a53f8d962115c4d7b4
SHA1 (patch-ag) = 207ef0801d865ff16d2a99f0732ea0cb49ce2ad5
SHA1 (patch-ah) = 376e1208f0ec332e9da243a9a475d5569158d6d3
SHA1 (patch-ai) = eff7c257032feb8fcfd81a44f560e5e747d41610

View file

@ -1,11 +1,17 @@
$NetBSD: README,v 1.3 2007/05/20 15:56:44 taca Exp $ $NetBSD: README,v 1.4 2009/05/26 14:19:29 taca Exp $
1. To complete the setup, check and edit @GEEKLOG_DIR@/config.php. 1. First, create a database for Geeklog.
2. If you install Geeklog for the first time, you need to create # mysqladmin -p -u <administrator> create <dbname>.
a MySQL database for geeklog
2. Next, create a user for accessing that database.
# mysql -p -u <administrator> <dbname>
mysql> grant select, insert, update, delete, create, drop,
index, alter, create temporary tables, lock tables on
<dbname>.* to '<dbuser>'@'localhost'
identified by '<dbpass>' ;
# @PREFIX@/bin/php @GEEKLOG_DIR@/createdb.php
3. You will need to make Geeklog accessible through your HTTP server. 3. You will need to make Geeklog accessible through your HTTP server.
If you are running Apache then you may add the following lines to If you are running Apache then you may add the following lines to
@ -23,9 +29,9 @@ $NetBSD: README,v 1.3 2007/05/20 15:56:44 taca Exp $
4. Complete install or upgrade, access below URL and follow the 4. Complete install or upgrade, access below URL and follow the
instruction. instruction.
http://localhost/geeklog/admin/install/install.php http://localhost/geeklog/admin/install/
5. Last, you should remove whole @GEEKLOG_PUB@/admin directory. 5. Last, you should remove whole @PREFIX@/@GEEKLOG_PUB@/admin directory.
You can read documentation for install Geeklog: You can read documentation for install Geeklog:

View file

@ -1,61 +0,0 @@
#!@PREFIX@/bin/php
<?php
# $NetBSD: createdb.php,v 1.1.1.1 2006/06/15 13:26:44 taca Exp $
#
# After editing @GEEKLOG_DIR@/config.php,
# execute this script to create new database.
#
require_once( '@GEEKLOG_DIR@/config.php' );
define("MySQL_Admin", "@PREFIX@/bin/mysqladmin");
define("MySQL", "@PREFIX@/bin/mysql");
define("MySQL_Root", "root");
if ($_DB_dbms != "mysql") {
print("Unknown DBMS: ". $_DB_dbms . "\n");
exit(1);
}
# Create database.
print "Creating databse for geeklog, please enter DBMS's admin if promped.\n";
$cmd = MySQL_Admin . " --host=" . $_DB_host .
" --user=" . MySQL_Root . " --password create " . $_DB_name;
print($cmd . "\n");
passthru($cmd, $result);
if ($result != 0) {
print("Error on creating database, do you want to continue?: ");
$ans = fgets(STDIN, 10);
trim($ans);
if (!eregi("^y", $ans)) {
print("Abort now\n");
exit(1);
}
}
# Create user.
print "\nCreating database user for geeklog, please enter DBMS's admin if promped.\n";
$cmd = MySQL . " --host=" . $_DB_host ." --user=" . MySQL_Root . " --password";
print($cmd . "\n");
$handle = popen($cmd, "w");
if ($handle == FALSE) {
print("Error on connecting database.\n");
exit(1);
}
$sql = "GRANT " .
"SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, " .
"ALTER, CREATE TEMPORARY TABLES, LOCK TABLES" .
" ON " . $_DB_name . ".* TO '" . $_DB_user . "'@'" . $_DB_host .
"' IDENTIFIED BY '" . $_DB_pass . "';\n";
# print $sql;
fwrite($handle, $sql);
pclose($handle);
?>

View file

@ -1,9 +1,9 @@
# $NetBSD: geeklog.conf,v 1.1.1.1 2006/06/15 13:26:44 taca Exp $ # $NetBSD: geeklog.conf,v 1.2 2009/05/26 14:19:29 taca Exp $
# #
Alias /geeklog "@GEEKLOG_PUBDIR@" Alias /geeklog "@PREFIX@/@GEEKLOG_PUB@"
<Directory "@GEEKLOG_PUBDIR@"> <Directory "@PREFIX@/@GEEKLOG_PUB@">
DirectoryIndex index.php index.html DirectoryIndex index.php index.html
Options Indexes Options Indexes
AllowOverride None AllowOverride None

View file

@ -1,73 +1,19 @@
$NetBSD: patch-aa,v 1.2 2007/05/20 15:56:45 taca Exp $ $NetBSD: patch-aa,v 1.3 2009/05/26 14:19:29 taca Exp $
--- config.php.orig 2006-12-31 02:43:18.000000000 +0900 --- emailgeeklogstories.orig 2008-12-14 18:57:36.000000000 +0900
+++ config.php +++ emailgeeklogstories
@@ -65,13 +65,13 @@ $_DB_table_prefix = 'gl_'; // e. @@ -1,4 +1,4 @@
// the backslash '\' in paths. Make sure each path starts with a drive letter! -#!/usr/local/bin/php -q
+#!@PREFIX@/bin/php -q
<?php
// This code snippet is responsible for emailing Geeklog stories to users
// for the topics they select.
@@ -9,7 +9,7 @@
// flags for this file.
// This should point to the directory where your config.php file resides. // Change this path to point to your lib-common.php file
-$_CONF['path'] = '/path/to/geeklog/'; // should end in a slash -include('/path/to/geeklog/lib-common.php');
+$_CONF['path'] = '@GEEKLOG_DIR@/'; // should end in a slash +include('@PREFIX@/@GEEKLOG_PUB@/lib-common.php');
// You only need to change this if you moved or renamed the public_html COM_emailUserTopics();
// directory. In that case, you should specify the complete path to the ?>
// directory (i.e. without the $_CONF['path']) like this:
// $_CONF['path_html'] = '/path/to/your/public_html/';
-$_CONF['path_html'] = $_CONF['path'] . 'public_html/';
+$_CONF['path_html'] = '@GEEKLOG_PUBDIR@/';
// +---------------------------------------------------------------------------+
@@ -80,7 +80,7 @@ $_CONF['path_html'] = $_CONF['pa
// Make sure this is the correct URL to your site, i.e. to where Geeklog's
// index.php file resides (no trailing slash).
-$_CONF['site_url'] = 'http://www.example.com';
+$_CONF['site_url'] = 'http://localhost@GEEKLOG_SITESUBDIR@';
// Some hosting services have a preconfigured admin directory. In that case,
// you need to rename Geeklog's admin directory to something like "myadmin"
@@ -154,14 +154,14 @@ $_CONF['path_pear'] = $_CONF['path_syste
// The default is 'mail' and will work in most environments.
$_CONF['mail_settings'] = array (
- 'backend' => 'mail', // can be one of 'mail', 'sendmail', 'smtp'
+ 'backend' => 'smtp', // can be one of 'mail', 'sendmail', 'smtp'
// sendmail parameters (only needed for 'backend' => 'sendmail')
'sendmail_path' => '/usr/bin/sendmail',
'sendmail_args' => '',
// SMTP parameters (only needed for 'backend' => 'smtp')
- 'host' => 'smtp.example.com',
+ 'host' => 'localhost',
'port' => '25',
'auth' => false,
'username' => 'smtp-username',
@@ -183,7 +183,7 @@ $_DB_dbms = 'mysql'; // can be either 'm
$_CONF['allow_mysqldump'] = 1; // 1 = on, 0 = off
// full path of the mysqldump executable (Windows users: add ".exe"!)
-$_DB_mysqldump_path = '/usr/bin/mysqldump';
+$_DB_mysqldump_path = '@PREFIX@/bin/mysqldump';
// additional options for mysqldump
// If you're using InnoDB tables, include '--single-transaction' or you
@@ -677,7 +677,7 @@ $_CONF['image_lib'] = ''; // can be one
// If you set image_lib to 'imagemagick' give the complete path to mogrify
// here (i.e. including the name of the executable), otherwise comment it out
// NOTE: requires ImageMagick version 5.4.9 (or newer)
-//$_CONF['path_to_mogrify'] = '/path/to/mogrify';
+//$_CONF['path_to_mogrify'] = '@PREFIX@/bin/mogrify';
// If you set image_lib to 'netpbm' give the path to the netpbm directory, you
// need the trailing slash here.
@@ -688,7 +688,7 @@ $_CONF['image_lib'] = ''; // can be one
// only use netpbm with Geeklog, put that entire folder in /path/to/geeklog and
// adjust the path below. The only programs you need from netpbm are giftopnm,
// jpegtopnm, pngtopnm, ppmtogif, pnmtojpeg, pnmtopng and pnmscale
-//$_CONF['path_to_netpbm'] = '/path/to/netpbm/';
+//$_CONF['path_to_netpbm'] = '@PREFIX@/bin/';
// Uncomment the following line if you experience problems with the image
// upload. Debug messages will be added to the error.log file.

View file

@ -1,19 +0,0 @@
$NetBSD: patch-ab,v 1.2 2007/05/20 15:56:45 taca Exp $
--- emailgeeklogstories.orig 2003-01-10 23:44:01.000000000 +0900
+++ emailgeeklogstories
@@ -1,4 +1,4 @@
-#!/usr/local/bin/php -q
+#!@PREFIX@/bin/php -q
<?php
// This code snippet is responsible for emailing Geeklog stories to users
// for the topics they select.
@@ -9,7 +9,7 @@
// flags for this file.
// Change this path to point to your lib-common.php file
-include('/path/to/geeklog/lib-common.php');
+include('@GEEKLOG_PUBDIR@/lib-common.php');
COM_emailUserTopics();
?>

View file

@ -1,13 +0,0 @@
$NetBSD: patch-ac,v 1.2 2007/05/20 15:56:45 taca Exp $
--- public_html/lib-common.php.orig 2006-12-17 03:10:37.000000000 +0900
+++ public_html/lib-common.php
@@ -90,7 +90,7 @@ if( function_exists('set_error_handler')
* Make sure to include the name of the config file,
* i.e. the path should end in .../config.php
*/
-require_once( '/path/to/geeklog/config.php' );
+require_once( '@GEEKLOG_DIR@/config.php' );
// Before we do anything else, check to ensure site is enabled

View file

@ -1,20 +0,0 @@
$NetBSD: patch-ag,v 1.3 2007/05/20 15:56:46 taca Exp $
--- plugins/calendar/functions.inc.orig 2006-12-22 00:44:21.000000000 +0900
+++ plugins/calendar/functions.inc
@@ -1457,11 +1457,11 @@ function plugin_dopluginsearch_calendar(
$sql .= "OR title LIKE '%$mysearchterm%') ";
}
- if (!empty($dateStart) AND !empty($dateEnd)) {
- $delim = substr($dateStart, 4, 1);
+ if (!empty($datestart) AND !empty($dateend)) {
+ $delim = substr($datestart, 4, 1);
if (!empty($delim)) {
- $DS = explode($delim, $dateStart);
- $DE = explode($delim, $dateEnd);
+ $DS = explode($delim, $datestart);
+ $DE = explode($delim, $dateend);
$startdate = mktime(0, 0, 0, $DS[1], $DS[2], $DS[0]);
$enddate = mktime(23, 59, 59, $DE[1], $DE[2], $DE[0]);
$sql .= "AND (UNIX_TIMESTAMP(datestart) BETWEEN '$startdate' AND '$enddate') ";

View file

@ -1,26 +0,0 @@
$NetBSD: patch-ah,v 1.1 2008/06/19 14:08:42 taca Exp $
A security fix for HTML filter: http://www.geeklog.net/article.php/kses.
This problem will be fixed in Geeklog 1.5.0.
--- system/classes/kses.class.php.orig 2006-05-15 14:49:44.000000000 +0900
+++ system/classes/kses.class.php
@@ -941,12 +941,12 @@
*/
function _bad_protocol_once($string)
{
- return preg_replace(
- '/^((&[^;]*;|[\sA-Za-z0-9])*)'.
- '(:|&#58;|&#[Xx]3[Aa];)\s*/e',
- '\$this->_bad_protocol_once2("\\1")',
- $string
- );
+ $string2 = preg_split('/:|&#58;|&#x3a;/i', $string, 2);
+ if(isset($string2[1]) && !preg_match('%/\?%',$string2[0]))
+ {
+ $string = $this->_bad_protocol_once2($string2[0]).trim($string2[1]);
+ }
+ return $string;
}
/**

View file

@ -1,17 +0,0 @@
$NetBSD: patch-ai,v 1.1 2008/09/09 14:34:13 taca Exp $
Security fix for FCKeditor uploading files.
--- public_html/fckeditor/editor/filemanager/upload/php/upload.php.orig 2006-06-18 06:25:36.000000000 +0900
+++ public_html/fckeditor/editor/filemanager/upload/php/upload.php
@@ -18,6 +18,10 @@
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
+if (strpos($_SERVER['PHP_SELF'], 'upload.php') !== false) {
+ die('This file can not be used on its own!');
+}
+
require('config.php') ;
require('util.php') ;

View file

@ -0,0 +1,23 @@
$NetBSD: patch-aj,v 1.1 2009/05/26 14:19:29 taca Exp $
--- public_html/admin/install/index.php.orig 2009-04-18 16:55:00.000000000 +0900
+++ public_html/admin/install/index.php
@@ -1793,16 +1793,8 @@ function INST_setDefaultCharset($sitecon
// | Main |
// +---------------------------------------------------------------------------+
-// prepare some hints about what /path/to/geeklog might be ...
-$gl_path = strtr(__FILE__, '\\', '/'); // replace all '\' with '/'
-for ($i = 0; $i < 4; $i++) {
- $remains = strrchr($gl_path, '/');
- if ($remains === false) {
- break;
- } else {
- $gl_path = substr($gl_path, 0, -strlen($remains));
- }
-}
+// pkgsrc default.
+$gl_path = '@PREFIX@/@GEEKLOG_BASE@';
$html_path = str_replace('admin/install/index.php', '', str_replace('admin\install\index.php', '', str_replace('\\', '/', __FILE__)));
$siteconfig_path = '../../siteconfig.php';