summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Meier <maekke@gentoo.org>2008-04-02 20:13:51 +0000
committerMarkus Meier <maekke@gentoo.org>2008-04-02 20:13:51 +0000
commit7801ed2726696c8d1ef0baea3e0ece10b9043ef1 (patch)
tree533ec7abba78bdc3ca0942a18e94ae1c2a68a8f3 /media-gfx/comix
parentQA: Do not pass $ROOT to python_mod_cleanup, as that is done for us and we wo... (diff)
downloadhistorical-7801ed2726696c8d1ef0baea3e0ece10b9043ef1.tar.gz
historical-7801ed2726696c8d1ef0baea3e0ece10b9043ef1.tar.bz2
historical-7801ed2726696c8d1ef0baea3e0ece10b9043ef1.zip
revision bump: add patches from fedora, security bug #215694
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'media-gfx/comix')
-rw-r--r--media-gfx/comix/ChangeLog11
-rw-r--r--media-gfx/comix/Manifest15
-rw-r--r--media-gfx/comix/comix-3.6.4-r1.ebuild38
-rw-r--r--media-gfx/comix/files/comix-3.6.4-command-argument-closure.patch158
-rw-r--r--media-gfx/comix/files/comix-3.6.4-tmpfile.patch163
5 files changed, 382 insertions, 3 deletions
diff --git a/media-gfx/comix/ChangeLog b/media-gfx/comix/ChangeLog
index bcea49c5ce28..be2ee523dec7 100644
--- a/media-gfx/comix/ChangeLog
+++ b/media-gfx/comix/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-gfx/comix
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/comix/ChangeLog,v 1.36 2007/10/23 17:51:45 welp Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/comix/ChangeLog,v 1.37 2008/04/02 20:13:50 maekke Exp $
+
+*comix-3.6.4-r1 (02 Apr 2008)
+
+ 02 Apr 2008; Markus Meier <maekke@gentoo.org>
+ +files/comix-3.6.4-command-argument-closure.patch,
+ +files/comix-3.6.4-tmpfile.patch, +comix-3.6.4-r1.ebuild:
+ revision bump: add patches from fedora, security bug #215694
23 Oct 2007; Peter Weller <welp@gentoo.org> comix-3.6.4.ebuild:
Stable on amd64
diff --git a/media-gfx/comix/Manifest b/media-gfx/comix/Manifest
index d3479e2bf767..e12f441c43e4 100644
--- a/media-gfx/comix/Manifest
+++ b/media-gfx/comix/Manifest
@@ -1,6 +1,19 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX comix-3.6.4-command-argument-closure.patch 6872 RMD160 44e9ac5e92efac5bc87a0e8648d82d97d48185d1 SHA1 fd89c8b23fb96b4d69a165398ff8b36f103b1e70 SHA256 9ba2ac7454e033f28056631ee73c323e49dda3e95fec2d3a257c760776b4fa98
+AUX comix-3.6.4-tmpfile.patch 5990 RMD160 807414444e335f1276328922f49732d9464a1a82 SHA1 ed850cb5af7dd39207f2db324c25ca142020e5f5 SHA256 2f08722fa7f955a6f05868bc4fdbe3ff269ae20ae63f0b1b5608f50af2733b4e
DIST comix-3.6.3.tar.gz 357536 RMD160 827a63d6b9b142deb26f499ceacf0ffc9254e1d4 SHA1 780963a4488a01cb19d06d0e8685ee51b2d3e3c9 SHA256 6330e1fb546a4f392fe3fd21d130413bcc2a50dbfac7133d3b24559acdc7bd95
DIST comix-3.6.4.tar.gz 398202 RMD160 8cd0f6459f56efb35cea7b7a899e4420796535d7 SHA1 c14a1ba9d931436eb7215f8065f1bbda22f00409 SHA256 25727929f15d626aed329298cde988ae4104e9e9797e1d948a272a61e0c735fb
EBUILD comix-3.6.3.ebuild 918 RMD160 b8a7045ff02dae3b95808549616246eb69b30d8a SHA1 b4df8bfbe7e94e55140bd085a027202b1be61f12 SHA256 fb20237e8c59d04c106d602a73b2691b9cf3b47ed88835e5e067b1c5937e277f
+EBUILD comix-3.6.4-r1.ebuild 1069 RMD160 7012a5385058fd0316483bfa5db9bd1fbae23ae9 SHA1 64d038ee7f30e1bd3d65bb9d998d68b41d5d3938 SHA256 fca19b67e4b141f55ecfe97cf4ce2509263ea0ecc17826af638ffa5c5386b1f3
EBUILD comix-3.6.4.ebuild 917 RMD160 f402b6b06fb423a7e44caa47a0fbf2c44c48002b SHA1 f37e9b699b13ffa9a74b1d1d9fb093eace8457f2 SHA256 bce7dcc850cd751f37090404f38dbcbee7dbeaa92c4c97295de08f1af902104e
-MISC ChangeLog 5583 RMD160 3be374ab3ad5c388158b32b0408bccfc8cbabc9d SHA1 30c75b8eabcd69a396583ebc6b4d07b7240c8c65 SHA256 73d6d29dfc3730356e4e175b50c4b4362cd324890037d40441b5d2b4cf8a94eb
+MISC ChangeLog 5841 RMD160 681119c71da7c6f3502b35a79927085acba84b80 SHA1 ac860d4df0b0bd5847a2ebe8ff966dee41f12673 SHA256 cf8d9ab95249942b268db112c38a1aa7a78270ef0b5672fe9b69b98b91a1a3eb
MISC metadata.xml 259 RMD160 d0a63863a81da6cb6fe6262fbf5dfc9947ec435b SHA1 538ceef1ed7128d99138734c5ef16738edb6a6de SHA256 7859bac60cd0a7da76fbdc19024aa0240a16ee974d867792c4b25fc7d7cbd161
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.9 (GNU/Linux)
+
+iEYEARECAAYFAkfz6SIACgkQkKaRLQcq0GLQMwCgna8tVSTGiSx6I2q/DfUTzSTJ
+8BIAmwZZp/c01wmvWfMNdebAhyteAo8J
+=GfJv
+-----END PGP SIGNATURE-----
diff --git a/media-gfx/comix/comix-3.6.4-r1.ebuild b/media-gfx/comix/comix-3.6.4-r1.ebuild
new file mode 100644
index 000000000000..015fd2b78900
--- /dev/null
+++ b/media-gfx/comix/comix-3.6.4-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/comix/comix-3.6.4-r1.ebuild,v 1.1 2008/04/02 20:13:50 maekke Exp $
+
+inherit toolchain-funcs gnome2 eutils
+
+DESCRIPTION="A GTK image viewer specifically designed to handle comic books."
+HOMEPAGE="http://comix.sourceforge.net"
+SRC_URI="mirror://sourceforge/comix/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
+IUSE="doc rar"
+RDEPEND=">=dev-python/pygtk-2.8.0
+ rar? ( app-arch/unrar )
+ >=dev-python/imaging-1.1.4"
+
+src_unpack() {
+ unpack ${A}
+
+ epatch "${FILESDIR}"/${P}-command-argument-closure.patch
+ epatch "${FILESDIR}"/${P}-tmpfile.patch
+}
+
+src_compile() {
+ einfo "Nothing to be compiled."
+}
+
+src_install() {
+ dodir /usr
+ python install.py install --no-mime --installdir "${D}"usr 1>/dev/null || die
+ insinto /usr/share/mime/packages/
+ doins "${S}"/mime/comix.xml
+ insinto /etc/gconf/schemas/
+ doins "${S}"/mime/comicbook.schemas
+ dobin "${S}"/mime/comicthumb
+ dodoc ChangeLog README
+}
diff --git a/media-gfx/comix/files/comix-3.6.4-command-argument-closure.patch b/media-gfx/comix/files/comix-3.6.4-command-argument-closure.patch
new file mode 100644
index 000000000000..ec8d2a3bbdd0
--- /dev/null
+++ b/media-gfx/comix/files/comix-3.6.4-command-argument-closure.patch
@@ -0,0 +1,158 @@
+--- comix-3.6.4/comix.debug 2007-05-27 01:30:16.000000000 +0900
++++ comix-3.6.4/comix 2008-04-02 20:11:53.000000000 +0900
+@@ -44,6 +44,9 @@
+ import pwd
+ import cPickle
+
++import subprocess
++import string
++
+ try:
+ import pygtk
+ pygtk.require('2.0')
+@@ -6277,9 +6280,12 @@
+ archive = tarfile.open(path, 'r')
+ files = archive.getnames()
+ elif type == 'rar':
++ #files = \
++ #os.popen(self.rar + ' vb "' + path +
++ #'"').readlines()
+ files = \
+- os.popen(self.rar + ' vb "' + path +
+- '"').readlines()
++ subprocess.Popen([self.rar, 'vb', path],
++ stdout=subprocess.PIPE).communicate()[0].splitlines()
+ files = [file.rstrip('\n') for file in files]
+ cover = None
+ files.sort()
+@@ -6302,9 +6308,20 @@
+ break
+ if cover != None:
+ if type == 'rar':
+- os.popen(self.rar + ' p -inul -- "' + path + '" "' +
+- cover + '" > "' + thumb_dir +
+- '/temp" 2>/dev/null', "r").close()
++ #os.popen(self.rar + ' p -inul -- "' + path + '" "' +
++ #cover + '" > "' + thumb_dir +
++ #'/temp" 2>/dev/null', "r").close()
++ filen = thumb_dir + '/temp'
++ try:
++ os.remove(filen)
++ except:
++ pass
++ fp = open(filen, 'w')
++ fdp = fp.fileno()
++ p = subprocess.Popen(
++ [self.rar, 'p', '-inul', '--', path,
++ cover ], stdout = fdp).wait()
++ fp.close()
+ image = Image.open(thumb_dir + '/temp')
+ os.remove(thumb_dir + '/temp')
+ elif type == 'zip':
+@@ -8733,8 +8750,10 @@
+ # =======================================================
+ elif archive_type == 'rar':
+ if self.rar:
+- os.popen(
+- self.rar + ' x "' + src_path + '" "' + dst_path + '"')
++ #os.popen(
++ #self.rar + ' x "' + src_path + '" "' + dst_path + '"')
++ subprocess.Popen(
++ [self.rar, 'x', src_path, dst_path],stdout=sys.stdout).wait()
+ else:
+ self.statusbar.push(0,
+ _('Could not find the unrar executable. Please install it if you wish to open RAR archives.'))
+@@ -9168,9 +9187,37 @@
+ self.are_you_sure_dialog.hide()
+ if response != -5:
+ return
+- os.popen(self.jpegtran + ' -copy all -trim ' + operation +
+- ' -outfile "' + self.file[self.file_number] + '" "' +
+- self.file[self.file_number] + '"')
++ #os.popen(self.jpegtran + ' -copy all -trim ' + operation +
++ #' -outfile "' + self.file[self.file_number] + '" "' +
++ #self.file[self.file_number] + '"')
++ op = operation.split()
++ op_len = len(op)
++
++ i=1
++ filen = self.file[self.file_number]
++ while (1):
++ tmp_file = filen + '.tmp' + 'z' * i
++ if os.path.exists(tmp_file):
++ i += 1
++ else:
++ break
++
++ # Ugly hack :(
++ if op_len == 2:
++ p = subprocess.Popen(
++ [self.jpegtran, '-copy', 'all', '-trim', op[0], op[1],
++ '-outfile', tmp_file, filen],
++ stdin=sys.stdin, stdout=sys.stdout)
++ else:
++ p = subprocess.Popen(
++ [self.jpegtran, '-copy', 'all', '-trim', op[0],
++ '-outfile', tmp_file, filen],
++ stdin=sys.stdin, stdout=sys.stdout)
++ p.wait()
++ if p.returncode == 0:
++ shutil.copymode(filen, tmp_file)
++ shutil.copy(tmp_file, filen)
++ os.remove(tmp_file)
+ try:
+ uri = 'file://' + urllib.pathname2url(self.file[self.file_number])
+ thumb_path = md5.new()
+--- comix-3.6.4/mime/comicthumb.debug 2007-05-27 01:30:16.000000000 +0900
++++ comix-3.6.4/mime/comicthumb 2008-04-02 21:11:10.000000000 +0900
+@@ -22,6 +22,9 @@
+ import StringIO
+ import re
+ import shutil
++
++import subprocess
++
+ try:
+ import Image
+ except:
+@@ -138,19 +141,35 @@
+ if not rar:
+ print "You must install unrar or rar to thumbnail RAR archives."
+ sys.exit(1)
+- rarfiles = os.popen('%s vb "%s"' % (rar, compressed_file)).readlines()
++ #rarfiles = os.popen('%s vb "%s"' % (rar, compressed_file)).readlines()
++ rarfiles = subprocess.Popen([rar, 'vb', compressed_file],
++ stdout=subprocess.PIPE).communicate()[0].splitlines()
+ for i in range(len(rarfiles)):
+ rarfiles[i] = rarfiles[i].rstrip("\n")
+ rarfiles.sort()
+ cover = guessCover(rarfiles)
+ if cover:
+- picture = StringIO.StringIO(os.popen('%s p -inul -- "%s" "%s"'
+- % (rar, compressed_file, cover), "r").read())
++ #picture = StringIO.StringIO(os.popen('%s p -inul -- "%s" "%s"'
++ #% (rar, compressed_file, cover), "r").read())
++ picture = StringIO.StringIO(subprocess.Popen(
++ [rar, 'p', '-inul', '--', compressed_file, cover],
++ stdout=subprocess.PIPE).stdout.read())
+ else:
+ subarchive = first_archive(rarfiles)
+ if subarchive:
+- os.popen('%s p -inul -- "%s" "%s" > "/tmp/comicthumb/archive%d"'
+- % (rar, compressed_file, subarchive, depth), "r")
++ #os.popen('%s p -inul -- "%s" "%s" > "/tmp/comicthumb/archive%d"'
++ #% (rar, compressed_file, subarchive, depth), "r")
++ filen = "/tmp/comicthumb/archive%d"%(depth)
++ try:
++ os.remove(filen)
++ except:
++ pass
++ fp = open(filen, 'w')
++ fdp = fp.fileno()
++ subprocess.Popen(
++ [rar, 'p', '-inul', '--', compressed_file, subarchive],
++ stdout = fdp).wait()
++ fp.close()
+ return get_image("/tmp/comicthumb/archive%d" % (depth),
+ depth + 1)
+ return picture
diff --git a/media-gfx/comix/files/comix-3.6.4-tmpfile.patch b/media-gfx/comix/files/comix-3.6.4-tmpfile.patch
new file mode 100644
index 000000000000..e25cbf396024
--- /dev/null
+++ b/media-gfx/comix/files/comix-3.6.4-tmpfile.patch
@@ -0,0 +1,163 @@
+--- comix-3.6.4/comix.tmpfile 2008-04-03 01:23:35.000000000 +0900
++++ comix-3.6.4/comix 2008-04-03 01:23:35.000000000 +0900
+@@ -47,6 +47,8 @@
+ import subprocess
+ import string
+
++import tempfile
++
+ try:
+ import pygtk
+ pygtk.require('2.0')
+@@ -257,6 +259,8 @@
+ window_height = 0
+ colour_adjust_signal_kill = False
+ colour_adjust_dialog_displayed = False
++
++ _tmp_dir = None
+
+ def close_application(self, widget, event=None):
+
+@@ -270,8 +274,8 @@
+ self.prefs['page of last file'] = self.file_number
+ if os.path.exists(self.base_dir):
+ shutil.rmtree(self.base_dir)
+- if len(os.listdir('/tmp/comix')) == 0:
+- shutil.rmtree('/tmp/comix')
++ if len(os.listdir(self._tmp_dir)) == 0:
++ shutil.rmtree(self._tmp_dir)
+ self.exit = True
+
+ # =======================================================
+@@ -369,9 +373,9 @@
+ # =======================================================
+ if os.path.exists(self.base_dir):
+ shutil.rmtree(self.base_dir)
+- if os.path.isdir('/tmp/comix'):
+- if len(os.listdir('/tmp/comix')) == 0:
+- shutil.rmtree('/tmp/comix')
++ if os.path.isdir(self._tmp_dir):
++ if len(os.listdir(self._tmp_dir)) == 0:
++ shutil.rmtree(self._tmp_dir)
+
+
+ # =======================================================
+@@ -8027,7 +8031,7 @@
+ return False
+
+ # We don't want to open files from our selves.
+- if selection.data.startswith('file:///tmp/comix/'):
++ if selection.data.startswith('file://' + self._tmp_dir):
+ return
+
+ uri = selection.data.strip()
+@@ -10543,15 +10547,20 @@
+ # The dir is /tmp/comix/<num> where <num> is 1 or higher
+ # depending on the number of Comix sessions opened.
+ # =======================================================
+- if not os.path.exists('/tmp/comix/'):
+- os.makedirs('/tmp/comix/')
+- os.chmod('/tmp/comix/', 0700)
++ #if not os.path.exists('/tmp/comix/'):
++ # os.makedirs('/tmp/comix/')
++ # os.chmod('/tmp/comix/', 0700)
++
++ self._tmp_dir = tempfile.mkdtemp(prefix='comix.', suffix=os.sep,
++ dir = '/tmp')
++ self._tmp_dir += "/"
++
+ dir_number = 1
+ while 1:
+- if not os.path.exists('/tmp/comix/' + str(dir_number)):
+- os.mkdir('/tmp/comix/' + str(dir_number))
+- os.chmod('/tmp/comix/' + str(dir_number), 0700)
+- self.base_dir = '/tmp/comix/' + str(dir_number) + '/'
++ if not os.path.exists(self._tmp_dir + str(dir_number)):
++ os.mkdir(self._tmp_dir + str(dir_number))
++ os.chmod(self._tmp_dir + str(dir_number), 0700)
++ self.base_dir = self._tmp_dir + str(dir_number) + '/'
+ break
+ dir_number += 1
+
+--- comix-3.6.4/mime/comicthumb.tmpfile 2008-04-03 01:23:35.000000000 +0900
++++ comix-3.6.4/mime/comicthumb 2008-04-03 01:29:52.000000000 +0900
+@@ -24,6 +24,7 @@
+ import shutil
+
+ import subprocess
++import tempfile
+
+ try:
+ import Image
+@@ -51,9 +52,13 @@
+ sys.exit(1)
+
+ # temp directory needed for multiple archives
+-if not os.path.exists('/tmp/comicthumb/'):
+- os.makedirs('/tmp/comicthumb/')
+- os.chmod('/tmp/comicthumb/', 0700)
++#if not os.path.exists('/tmp/comicthumb/'):
++# os.makedirs('/tmp/comicthumb/')
++# os.chmod('/tmp/comicthumb/', 0700)
++_tmp_dir = tempfile.mkdtemp(prefix='comixthumb', suffix=os.sep,
++ dir = '/tmp')
++_tmp_dir += "/"
++
+
+ # return the first image in the list
+ def first_image (filelist):
+@@ -104,10 +109,10 @@
+ else:
+ subarchive = first_archive(zipfiles)
+ if subarchive:
+- output = open("/tmp/comicthumb/archive%d" % (depth), "wb")
++ output = open( _tmp_dir + "archive%d" % (depth), "wb")
+ output.write(zip.read(subarchive))
+ output.close()
+- return get_image("/tmp/comicthumb/archive%d" % (depth),
++ return get_image( _tmp_dir + "archive%d" % (depth),
+ depth + 1)
+ elif tarfile.is_tarfile(compressed_file):
+ TYPE = TYPE or 'cbt'
+@@ -122,10 +127,10 @@
+ else:
+ subarchive = first_archive(tarfiles)
+ if subarchive:
+- output = open("/tmp/comicthumb/archive%d" % (depth), "wb")
++ output = open( _tmp_dir + "archive%d" % (depth), "wb")
+ output.write(tar.extractfile(subarchive).read())
+ output.close()
+- return get_image("/tmp/comicthumb/archive%d" % (depth),
++ return get_image( _tmp_dir + "archive%d" % (depth),
+ depth + 1)
+ elif open(compressed_file, 'rb').read(4) == 'Rar!':
+ TYPE = TYPE or 'cbr'
+@@ -159,7 +164,7 @@
+ if subarchive:
+ #os.popen('%s p -inul -- "%s" "%s" > "/tmp/comicthumb/archive%d"'
+ #% (rar, compressed_file, subarchive, depth), "r")
+- filen = "/tmp/comicthumb/archive%d"%(depth)
++ filen = _tmp_dir + "archive%d"%(depth)
+ try:
+ os.remove(filen)
+ except:
+@@ -170,7 +175,7 @@
+ [rar, 'p', '-inul', '--', compressed_file, subarchive],
+ stdout = fdp).wait()
+ fp.close()
+- return get_image("/tmp/comicthumb/archive%d" % (depth),
++ return get_image( _tmp_dir + "archive%d" % (depth),
+ depth + 1)
+ return picture
+
+@@ -226,8 +231,8 @@
+ exit_flag = 1
+
+ # remove tempory stuff
+-if os.path.isdir('/tmp/comicthumb/'):
+- shutil.rmtree('/tmp/comicthumb/')
++if os.path.isdir(_tmp_dir):
++ shutil.rmtree(_tmp_dir)
+
+ # and exit
+ sys.exit(exit_flag)