summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Ahlberg <aliz@gentoo.org>2002-09-04 10:04:00 +0000
committerDaniel Ahlberg <aliz@gentoo.org>2002-09-04 10:04:00 +0000
commitc9e17f241886303b36bd1fce547233d899cec8d4 (patch)
tree02e7fea392f0b6b6a2d49191dc141506036bb1ef /app-text
parentsmall fix0rs (diff)
downloadgentoo-2-c9e17f241886303b36bd1fce547233d899cec8d4.tar.gz
gentoo-2-c9e17f241886303b36bd1fce547233d899cec8d4.tar.bz2
gentoo-2-c9e17f241886303b36bd1fce547233d899cec8d4.zip
Security update.
Diffstat (limited to 'app-text')
-rw-r--r--app-text/scrollkeeper/ChangeLog8
-rw-r--r--app-text/scrollkeeper/files/digest-scrollkeeper-0.3.11-r11
-rw-r--r--app-text/scrollkeeper/files/scrollkeeper-0.3.11-gentoo.diff122
-rw-r--r--app-text/scrollkeeper/scrollkeeper-0.3.11-r1.ebuild100
4 files changed, 227 insertions, 4 deletions
diff --git a/app-text/scrollkeeper/ChangeLog b/app-text/scrollkeeper/ChangeLog
index 26a85381c296..59db92009c19 100644
--- a/app-text/scrollkeeper/ChangeLog
+++ b/app-text/scrollkeeper/ChangeLog
@@ -1,11 +1,15 @@
# ChangeLog for app-text/scrollkeeper
# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
-# $Header: /var/cvsroot/gentoo-x86/app-text/scrollkeeper/ChangeLog,v 1.14 2002/08/27 20:55:17 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/scrollkeeper/ChangeLog,v 1.15 2002/09/04 10:03:59 aliz Exp $
+*scrollkeeper-0.3.11-r1 (04 Sep 2002)
+ 04 Sep 2002; Daniel Ahlberg <aliz@gentoo.org> scrollkeeper-0.3.11.ebuild-r1 files/scrollkeeper-0.3.11-gentoo.diff :
+ Security update.
+
+*scrollkeeper-0.3.11 (29 Jul 2002)
27 Aug 2002; Martin Schlemmer <azarah@gentoo.org> scrollkeeper-0.3.11.ebuild :
Touch ${S}/intl/libintl.h if "nls" is not in USE. Closes bug #7011.
-*scrollkeeper-0.3.11 (29 Jul 2002)
29 Jul 2002; Spider <spider@gentoo.org> scrollkeeper-0.3.11.ebuild :
Update ebuild and patch
diff --git a/app-text/scrollkeeper/files/digest-scrollkeeper-0.3.11-r1 b/app-text/scrollkeeper/files/digest-scrollkeeper-0.3.11-r1
new file mode 100644
index 000000000000..fd45668c41d2
--- /dev/null
+++ b/app-text/scrollkeeper/files/digest-scrollkeeper-0.3.11-r1
@@ -0,0 +1 @@
+MD5 33ea7a193adcb2ff9534da68a0f8bd7f scrollkeeper-0.3.11.tar.gz 437816
diff --git a/app-text/scrollkeeper/files/scrollkeeper-0.3.11-gentoo.diff b/app-text/scrollkeeper/files/scrollkeeper-0.3.11-gentoo.diff
index 8d35ca35792c..9adc5cb04d90 100644
--- a/app-text/scrollkeeper/files/scrollkeeper-0.3.11-gentoo.diff
+++ b/app-text/scrollkeeper/files/scrollkeeper-0.3.11-gentoo.diff
@@ -1,5 +1,5 @@
---- Makefile.in.old Wed May 1 15:55:59 2002
-+++ Makefile.in Wed May 1 15:56:07 2002
+--- scrollkeeper/extract/dtds/Makefile.in.old Wed May 1 15:55:59 2002
++++ scrollkeeper/extract/dtds/Makefile.in Wed May 1 15:56:07 2002
@@ -222,7 +222,6 @@
install-data-am: install-dtdsHEADERS
@@ -8,3 +8,121 @@
install-data: install-data-am
install-am: all-am
+
+diff -u -Nur --exclude CVS orig/scrollkeeper-0.3.6/libs/extract.c scrollkeeper-0.3.6/libs/extract.c
+--- scrollkeeper-0.3.6/libs/extract.c 2002-03-21 06:08:51.000000000 +0100
++++ scrollkeeper-0.3.6/libs/extract.c 2002-09-02 21:33:16.000000000 +0200
+@@ -49,8 +49,8 @@
+ FILE *res_fid;
+ char *doctype;
+ char command[1024];
+- pid_t pid;
+ char temp1[PATHLEN], temp2[PATHLEN], errors[PATHLEN];
++ int temp1_fd, temp2_fd, errors_fd;
+ #endif
+ struct stat buf;
+
+@@ -69,11 +69,22 @@
+ #ifdef SOLARIS
+ doc = docbParseFile(input_file, NULL);
+ #else
+- pid = getpid();
+-
+- snprintf(temp1, PATHLEN, "/var/tmp/scrollkeeper-extract-1-%ld.xml", (long)pid);
+- snprintf(temp2, PATHLEN, "/var/tmp/scrollkeeper-extract-2-%ld.xml", (long)pid);
+- snprintf(errors, PATHLEN, "/var/tmp/scrollkeeper-extract-errors-%ld", (long)pid);
++ snprintf(temp1, PATHLEN, "/var/tmp/scrollkeeper-extract-1.xml.XXXXXX");
++ snprintf(temp2, PATHLEN, "/var/tmp/scrollkeeper-extract-2.xml.XXXXXX");
++ snprintf(errors, PATHLEN, "/var/tmp/scrollkeeper-extract-errors.XXXXXX");
++
++ temp1_fd = mkstemp(temp1);
++ if (temp1_fd == -1) {
++ sk_message(outputprefs, SKOUT_DEFAULT, SKOUT_QUIET, "(apply_stylesheets)", _("Cannot open temporary file: %s : %s\n"), temp1, strerror(errno));
++ return 0;
++ }
++
++ errors_fd = mkstemp(errors);
++ if (errors_fd == -1) {
++ sk_message(outputprefs, SKOUT_DEFAULT, SKOUT_QUIET, "(apply_stylesheets)", _("Cannot open temporary file: %s : %s\n"), errors, strerror(errno));
++ return 0;
++ }
++ close(errors_fd);
+
+ snprintf(command, 1024, "sgml2xml -xlower -f%s %s > %s", errors, input_file, temp1);
+ system(command);
+@@ -83,6 +94,7 @@
+ fid = fopen(input_file, "r");
+ if (fid == NULL) {
+ sk_message(outputprefs, SKOUT_DEFAULT, SKOUT_QUIET, "(apply_stylesheets)", _("Cannot read file: %s : %s\n"),input_file, strerror(errno));
++ close(temp1_fd);
+ return 0;
+ }
+
+@@ -106,14 +118,26 @@
+ }
+
+ if (doctype == NULL) {
++ close(temp1_fd);
+ unlink(temp1);
+ return 0;
+ }
+
+- fid = fopen(temp1, "r");
+- res_fid = fopen(temp2, "w");
++ temp2_fd = mkstemp(temp2);
++ if (temp2_fd == -1) {
++ close(temp1_fd);
++ unlink(temp1);
++ sk_message(outputprefs, SKOUT_DEFAULT, SKOUT_QUIET, "(apply_stylesheets)", _("Cannot create temporary file: %s : %s\n"),temp2, strerror(errno));
++ return 0;
++ }
++
++ fid = fdopen(temp1_fd, "r");
++ res_fid = fdopen(temp2_fd, "w");
++
+ if (fid == NULL || res_fid == NULL) {
++ close(temp1_fd);
+ unlink(temp1);
++ close(temp2_fd);
+ unlink(temp2);
+ return 0;
+ }
+
+
+--- scrollkeeper-0.3.6/cl/src/get-cl.c 2002-03-21 06:08:51.000000000 +0100
++++ scrollkeeper-0.3.6/cl/src/get-cl.c 2002-09-02 21:31:43.000000000 +0200
+@@ -27,6 +27,7 @@
+ #include <unistd.h>
+ #include <sys/stat.h>
+ #include <locale.h>
++#include <fcntl.h>
+
+ /* cycles through five temporary filenames of the form /tmp/scrollkeeper-templfile.x,
+ where x is number from 0 to 4 and returns the first one that does not exist or the
+@@ -36,6 +37,7 @@
+ {
+ char path[PATHLEN], *filename;
+ int i, num;
++ int fd;
+ struct stat buf;
+ time_t prev;
+
+@@ -82,6 +84,17 @@
+ check_ptr(filename, "scrollkeeper-get-cl");
+ snprintf(filename, PATHLEN, "/tmp/scrollkeeper-tempfile.%d", num);
+
++ unlink(filename);
++
++ fd = open(filename, O_RDWR | O_CREAT | O_EXCL | O_TRUNC | O_NONBLOCK,
++ S_IRWXU | S_IRGRP | S_IROTH);
++
++ if (fd < 0) {
++ fprintf (stderr, _("scrollkeeper-get-cl: Cannot open temporary file: %s\n"), filename);
++ exit (EXIT_FAILURE);
++ }
++ close(fd);
++
+ return filename;
+ }
+
+
diff --git a/app-text/scrollkeeper/scrollkeeper-0.3.11-r1.ebuild b/app-text/scrollkeeper/scrollkeeper-0.3.11-r1.ebuild
new file mode 100644
index 000000000000..091485522565
--- /dev/null
+++ b/app-text/scrollkeeper/scrollkeeper-0.3.11-r1.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/app-text/scrollkeeper/scrollkeeper-0.3.11-r1.ebuild,v 1.1 2002/09/04 10:03:59 aliz Exp $
+
+inherit libtool
+KEYWORDS="x86 ppc sparc sparc64"
+
+S=${WORKDIR}/${P}
+DESCRIPTION="Scrollkeeper"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+http://telia.dl.sourceforge.net/sourceforge/${PN}/${P}.tar.gz
+http://unc.dl.sourceforge.net/sourceforge/${PN}/${P}.tar.gz
+http://belnet.dl.sourceforge.net/sourceforge/${PN}/${P}.tar.gz"
+HOMEPAGE="http://scrollkeeper.sourceforge.net"
+SLOT="0"
+LICENSE="FDL-1.1 LGPL-2.1"
+
+RDEPEND=">=dev-libs/libxml2-2.4.19
+ >=dev-libs/libxslt-1.0.14
+ >=sys-libs/zlib-1.1.3
+ >=app-text/docbook-xml-dtd-4.1.2-r2
+ >=app-text/docbook-sgml-utils-0.6.6"
+
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.17
+ nls? ( sys-devel/gettext )"
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+ patch -l -p1 < ${FILESDIR}/${P}-gentoo.diff || die
+}
+
+src_compile() {
+ elibtoolize
+
+ local myconf=""
+
+ use nls || {
+ myconf="${myconf} --disable-nls"
+ # Not existing can cause ./configure to fail in some cases.
+ touch ${S}/intl/libintl.h
+ }
+
+ # hack around some to make sure we find the libxml2 includes. odd bug.
+ #CFLAGS="${CFLAGS} -I/usr/include/libxml2/libxml"
+
+ ./configure --host=${CHOST} \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ ${myconf} || die
+
+ emake || die
+}
+
+src_install() {
+ make DESTDIR=${D} install || die
+
+ dodoc AUTHORS INSTALL TODO COPYING* ChangeLog README NEWS
+}
+
+pkg_preinst() {
+ if [ -d ${ROOT}/usr/share/scrollkeeper/Templates ]
+ then
+ rm -rf ${ROOT}/usr/share/scrollkeeper/Templates
+ fi
+}
+
+pkg_postinst() {
+ echo ">>> Installing catalog..."
+ ${ROOT}/usr/bin/xmlcatalog --noout --add "public" \
+ "-//OMF//DTD Scrollkeeper OMF Variant V1.0//EN" \
+ "`echo "${ROOT}/usr/share/xml/scrollkeeper/dtds/scrollkeeper-omf.dtd" |sed -e "s://:/:g"`" \
+ ${ROOT}/etc/xml/catalog
+ echo ">>> Rebuilding Scrollkeeper database..."
+ scrollkeeper-rebuilddb -q -p ${ROOT}/var/lib/scrollkeeper
+ echo ">>> Updating Scrollkeeper database..."
+ scrollkeeper-update -v &>${T}/foo
+}
+
+pkg_postrm() {
+ if [ ! -x ${ROOT}/usr/bin/scrollkeeper-config ]
+ then
+ # SK is being removed, not upgraded.
+ # Remove all generated files
+ einfo ">>> Cleaning up ${ROOT}/var/lib/scrollkeeper..."
+ rm -rf ${ROOT}/var/lib/scrollkeeper
+ rm -rf ${ROOT}/var/log/scrollkeeper.log
+ rm -rf ${ROOT}/var/log/scrollkeeper.log.1
+ ${ROOT}/usr/bin/xmlcatalog --noout --del \
+ "${ROOT}/usr/share/xml/scrollkeeper/dtds/scrollkeeper-omf.dtd" \
+ ${ROOT}/etc/xml/catalog
+
+ einfo ">>> Scrollkeeper ${PV} unmerged, if you removed the package"
+ einfo ">>> you might want to clean up /var/lib/scrollkeeper."
+ fi
+}
+