commit:     ebb9f2732491f9df8f6545d32fe847d8d15abb3c
Author:     Hanno <hanno <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 14 06:45:08 2016 +0000
Commit:     Hanno Boeck <hanno <AT> gentoo <DOT> org>
CommitDate: Sun Aug 14 06:45:08 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ebb9f273

x11-libs/libfm: Version bump to 1.2.4

Use upstream tarballs.
Change ABI version (also for live ebuild, fix #578632).
Add conditional dependency to dbus-glib (fix #560586).
Fix use after free bug.

Package-Manager: portage-2.3.0

 x11-libs/libfm/Manifest                            |  1 +
 x11-libs/libfm/files/libfm-0.1.17-ssp-fix.patch    | 27 ----------------------
 x11-libs/libfm/files/libfm-fix-use-after-free.diff | 23 ++++++++++++++++++
 .../{libfm-9999.ebuild => libfm-1.2.4.ebuild}      | 25 ++++++++++++--------
 x11-libs/libfm/libfm-9999.ebuild                   |  4 ++--
 5 files changed, 41 insertions(+), 39 deletions(-)

diff --git a/x11-libs/libfm/Manifest b/x11-libs/libfm/Manifest
index 7361d3d..0a62014 100644
--- a/x11-libs/libfm/Manifest
+++ b/x11-libs/libfm/Manifest
@@ -1 +1,2 @@
 DIST libfm-1.2.3.tar.xz 898256 SHA256 
c692f1624a4cbc8d1dd55f3b3f3369fbf5d26f63a916e2c295230b2344e1fbf9 SHA512 
f4c214daffc47f05ba31c65203ab0542a03f5a246ea4bb62b6b365ac3fa120a1a51e37b00f8a43afe56875eb69f9be327ac724dafb6fc2de13aa77deea23f443
 WHIRLPOOL 
ae5354c5ef5154ebce8a9124b47e0a645171d50d4034fd1e6000ff084acc15261398029c58b067b9027d4ba68d36d8addf91a28678c91a3fbd9ce0806e9b6046
+DIST libfm-1.2.4.tar.gz 1259686 SHA256 
30474f25e4fbf78f50c7e2493cc4eca5970243089393d25a80f3d79b478a2ce7 SHA512 
7196ae4af99ef41d77e1113dea62e35244b0be57c8cd7fcef2e0559daa5564ddfb163293225708c1697068e6a41d9842f96991145c34c41a7f510f38345d2f9c
 WHIRLPOOL 
d42d7ee5d7fefd1c100a0b7f741a20a2d98e84bbea57cfe3b3f197e7731538bda51c4c916a88e185ce937bab88fcda7b511d3da81660f6f36f32ef389f480f1b

diff --git a/x11-libs/libfm/files/libfm-0.1.17-ssp-fix.patch 
b/x11-libs/libfm/files/libfm-0.1.17-ssp-fix.patch
deleted file mode 100644
index 25e500d..0000000
--- a/x11-libs/libfm/files/libfm-0.1.17-ssp-fix.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 8972eaaef0bb43491b7578dd3e8c9f14455d1d6a Mon Sep 17 00:00:00 2001
-From: Richard Grenville <[email protected]>
-Date: Wed, 9 May 2012 07:47:24 +0800
-Subject: [PATCH] Fix #3512666 - fm-archiver.c: Stack buffer overflow.
-
----
- src/base/fm-archiver.c |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/base/fm-archiver.c b/src/base/fm-archiver.c
-index 2852058..edbc62b 100644
---- a/src/base/fm-archiver.c
-+++ b/src/base/fm-archiver.c
-@@ -203,8 +203,8 @@ void _fm_archiver_init()
-     GKeyFile *kf = g_key_file_new();
-     if(g_key_file_load_from_file(kf, PACKAGE_DATA_DIR "/archivers.list", 0, 
NULL))
-     {
--        int n_archivers;
--        char** programs = g_key_file_get_groups(kf, &n_archivers);
-+        gsize n_archivers;
-+        gchar** programs = g_key_file_get_groups(kf, &n_archivers);
-         if(programs)
-         {
-             int i;
--- 
-1.7.4.1
-

diff --git a/x11-libs/libfm/files/libfm-fix-use-after-free.diff 
b/x11-libs/libfm/files/libfm-fix-use-after-free.diff
new file mode 100644
index 0000000..4a0ae61
--- /dev/null
+++ b/x11-libs/libfm/files/libfm-fix-use-after-free.diff
@@ -0,0 +1,23 @@
+diff -Naur libfm-1.2.3/src/base/fm-config.c 
libfm-1.2.3-fix-uaf-new2/src/base/fm-config.c
+--- libfm-1.2.3/src/base/fm-config.c   2014-10-14 18:29:21.000000000 +0200
++++ libfm-1.2.3-fix-uaf-new2/src/base/fm-config.c      2016-06-18 
18:23:35.721837971 +0200
+@@ -346,7 +346,8 @@
+     cfg->modules_blacklist = NULL;
+     cfg->system_modules_blacklist = NULL;
+     _cfg_monitor_free(cfg);
+-    g_free(cfg->_cfg_name);
++    if(name != cfg->_cfg_name)
++        g_free(cfg->_cfg_name);
+     if(G_LIKELY(!name))
+         name = "libfm/libfm.conf";
+     else
+@@ -363,7 +364,8 @@
+         }
+     }
+ 
+-    cfg->_cfg_name = g_strdup(name);
++    if(name != cfg->_cfg_name)
++        cfg->_cfg_name = g_strdup(name);
+     dirs = g_get_system_config_dirs();
+     /* bug SF #887: first dir in XDG_CONFIG_DIRS is the most relevant
+        so we shoult process the list in reverse order */

diff --git a/x11-libs/libfm/libfm-9999.ebuild 
b/x11-libs/libfm/libfm-1.2.4.ebuild
similarity index 83%
copy from x11-libs/libfm/libfm-9999.ebuild
copy to x11-libs/libfm/libfm-1.2.4.ebuild
index 29039c4..c7d5023 100644
--- a/x11-libs/libfm/libfm-9999.ebuild
+++ b/x11-libs/libfm/libfm-1.2.4.ebuild
@@ -1,24 +1,27 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
 EAPI=5
 
-EGIT_REPO_URI="https://github.com/lxde/${PN}";
-inherit autotools git-r3 fdo-mime vala
+inherit autotools fdo-mime multilib vala
 
+MY_PV=${PV/_/}
+MY_P="${PN}-${MY_PV}"
 DESCRIPTION="A library for file management"
 HOMEPAGE="http://pcmanfm.sourceforge.net/";
+SRC_URI="https://github.com/lxde/libfm/archive/1.2.4.tar.gz -> ${MY_P}.tar.gz"
 
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~x86 ~amd64-linux ~x86-linux"
 LICENSE="GPL-2"
-SLOT="0/4.3.0" #copy ABI_VERSION because it seems upstream change it randomly
+SLOT="0/4.4.0" #copy ABI_VERSION because it seems upstream change it randomly
 IUSE="+automount debug doc examples exif gtk udisks vala"
-KEYWORDS=""
 
 COMMON_DEPEND=">=dev-libs/glib-2.18:2
        gtk? ( >=x11-libs/gtk+-2.16:2 )
        >=lxde-base/menu-cache-0.3.2:=
-       x11-libs/libfm-extra"
+       ~x11-libs/libfm-extra-${PV}
+       udisks? ( dev-libs/dbus-glib )"
 RDEPEND="${COMMON_DEPEND}
        !lxde-base/lxshortcut
        x11-misc/shared-mime-info
@@ -32,25 +35,27 @@ DEPEND="${COMMON_DEPEND}
        doc? (
                dev-util/gtk-doc
        )
+       app-arch/xz-utils
        >=dev-util/intltool-0.40
        virtual/pkgconfig
        sys-devel/gettext"
 
-DOCS=( AUTHORS TODO )
+S="${WORKDIR}"/${MY_P}
 
 REQUIRED_USE="udisks? ( automount ) doc? ( gtk )"
 
 src_prepare() {
+       # Fix use after free bug, see
+       # 
https://github.com/lxde/libfm/pull/11/commits/9e3a809c6a8a5079f05e04edac9457d317822321
+       epatch "${FILESDIR}"/libfm-fix-use-after-free.diff
+
        if ! use doc; then
                sed -ie '/^SUBDIR.*=/s#docs##' "${S}"/Makefile.am || die "sed 
failed"
                sed -ie '/^[[:space:]]*docs/d' configure.ac || die "sed failed"
-       else
-               gtkdocize --copy || die
        fi
        sed -i -e "s:-O0::" -e "/-DG_ENABLE_DEBUG/s: -g::" \
                configure.ac || die "sed failed"
 
-       intltoolize --force --copy --automake || die
        #disable unused translations. Bug #356029
        for trans in app-chooser ask-rename exec-file file-prop preferred-apps \
                progress;do

diff --git a/x11-libs/libfm/libfm-9999.ebuild b/x11-libs/libfm/libfm-9999.ebuild
index 29039c4..7da656a 100644
--- a/x11-libs/libfm/libfm-9999.ebuild
+++ b/x11-libs/libfm/libfm-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -11,7 +11,7 @@ DESCRIPTION="A library for file management"
 HOMEPAGE="http://pcmanfm.sourceforge.net/";
 
 LICENSE="GPL-2"
-SLOT="0/4.3.0" #copy ABI_VERSION because it seems upstream change it randomly
+SLOT="0/4.4.0" #copy ABI_VERSION because it seems upstream change it randomly
 IUSE="+automount debug doc examples exif gtk udisks vala"
 KEYWORDS=""
 

Reply via email to