суббота, 13 сентября 2014 г.

про gnome 2

на основной машине до сих пор сижу с блокировками gnome3 уже писал как осуществить  /etc/portage/package.mask/package.mask.gnome3

при попытке новой установки gnome-light / мета gnome вылет на gnome-keyring:
-f 'egg-libgcrypt.c' || echo './'`egg-libgcrypt.c
make[4]: *** [libegg_la-egg-asn1x.lo] Error 1make[4]: *** Waiting for unfinished jobs....
libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -O2 -pipe -march=amdfam10 -Wno-strict-aliasing -Wno-sign-compare -c egg-libgcrypt.c -fPIC -DPIC -o .libs/libegg_la-egg-libgcrypt.o
egg-libgcrypt.c: In function 'glib_thread_mutex_init':
egg-libgcrypt.c:57:2: warning: 'g_mutex_new' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:273) [-Wdeprecated-declarations]egg-libgcrypt.c: In function 'glib_thread_mutex_destroy':
egg-libgcrypt.c:64:2: warning: 'g_mutex_free' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:275) [-Wdeprecated-declarations]make[4]: Leaving directory `/tmp/portage/gnome-base/gnome-keyring-2.32.1-r2/work/gnome-keyring-2.32.1/egg' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/tmp/portage/gnome-base/gnome-keyring-2.32.1-r2/work/gnome-keyring-2.32.1/egg'make[3]: *** [all-recursive] Error 1make[3]: Leaving directory `/tmp/portage/gnome-base/gnome-keyring-2.32.1-r2/work/gnome-keyring-2.32.1/egg'make[2]: *** [all] Error 2make[2]: Leaving directory `/tmp/portage/gnome-base/gnome-keyring-2.32.1-r2/work/gnome-keyring-2.32.1/egg' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/portage/gnome-base/gnome-keyring-2.32.1-r2/work/gnome-keyring-2.32.1'make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/tmp/portage/gnome-base/gnome-keyring-2.32.1-r2/work/gnome-keyring-2.32.1'make: *** [all] Error 2 * ERROR: gnome-base/gnome-keyring-2.32.1-r2::localoverlay failed (compile phase):
* emake failed
* * If you need support, post the output of `emerge --info '=gnome-base/gnome-keyring-2.32.1-r2::localoverlay'`,
* the complete build log and the output of `emerge -pqv '=gnome-base/gnome-keyring-2.32.1-r2::localoverlay'`.
* The complete build log is located at '/tmp/portage/gnome-base/gnome-keyring-2.32.1-r2/temp/build.log'.
* The ebuild environment file is located at '/tmp/portage/gnome-base/gnome-keyring-2.32.1-r2/temp/environment'.
* Working directory: '/tmp/portage/gnome-base/gnome-keyring-2.32.1-r2/work/gnome-keyring-2.32.1' * S: '/tmp/portage/gnome-base/gnome-keyring-2.32.1-r2/work/gnome-keyring-2.32.1'
>>> Failed to emerge gnome-base/gnome-keyring-2.32.1-r2, Log file:

>>> '/tmp/portage/gnome-base/gnome-keyring-2.32.1-r2/temp/build.log'
* Messages for package gnome-base/gnome-keyring-2.32.1-r2:

* ERROR: gnome-base/gnome-keyring-2.32.1-r2::localoverlay failed (compile phase):
* emake failed
* * If you need support, post the output of `emerge --info '=gnome-base/gnome-keyring-2.32.1-r2::localoverlay'`,
* the complete build log and the output of `emerge -pqv '=gnome-base/gnome-keyring-2.32.1-r2::localoverlay'`.
* The complete build log is located at '/tmp/portage/gnome-base/gnome-keyring-2.32.1-r2/temp/build.log'.
* The ebuild environment file is located at '/tmp/portage/gnome-base/gnome-keyring-2.32.1-r2/temp/environment'.
* Working directory: '/tmp/portage/gnome-base/gnome-keyring-2.32.1-r2/work/gnome-keyring-2.32.1' * S: '/tmp/portage/gnome-base/gnome-keyring-2.32.1-r2/work/gnome-keyring-2.32.1'

есть рабочий patch
но, он не подхватывается автоматом из /etc/portage/patches!
решим правкой ебилда

с установкой локального оверлея:

папка для оверлея:
mkdir -p /home/allusr/localoverlay/gnome-base/gnome-keyring/files
прописываем его в make.conf: 
PORTDIR_OVERLAY=/home/allusr/localoverlay
чтобы portage не ругался (папки создать нужно):
echo "masters = gentoo" >> /home/allusr/localoverlay/metadata/layout.conf
echo "localoverlay" >> /home/allusr/localoverlay/profiles/repo_name
сам  ебилд
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-keyring/gnome-keyring-2.32.1-r1.ebuild,v 1.11 2014/03/01 22:29:51 mgorny Exp $ 
  4. EAPI="4"
  5. GCONF_DEBUG="yes"
  6. GNOME2_LA_PUNT="yes"
  7. GNOME_TARBALL_SUFFIX="bz2"
  8.  inherit autotools eutils gnome2 multilib pam virtualx
  9.  DESCRIPTION="Password and keyring managing daemon"
  10. HOMEPAGE="http://live.gnome.org/GnomeKeyring"
  11.  LICENSE="GPL-2+ LGPL-2+"
  12. SLOT="0"
  13. KEYWORDS="alpha amd64 arm ia64 ~mips ppc ppc64 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
  14. IUSE="debug pam test"
  15. # USE=valgrind is probably not a good idea for the tree
  16. RDEPEND=">=dev-libs/glib-2.25:2
  17.         >=x11-libs/gtk+-2.20:2
  18.         gnome-base/gconf:2
  19.         >=sys-apps/dbus-1.0
  20.         pam? ( virtual/pam )
  21.         >=dev-libs/libgcrypt-1.2.2:0
  22.         >=dev-libs/libtasn1-1"
  23. #       valgrind? ( dev-util/valgrind )"
  24. DEPEND="${RDEPEND}
  25.         >=dev-util/gtk-doc-am-1.9
  26.         >=dev-util/intltool-0.35
  27.         sys-devel/gettext
  28.         virtual/pkgconfig"
  29. PDEPEND="gnome-base/libgnome-keyring"
  30. # tests fail in several ways, they should be fixed in the next cycle (bug #340283),
  31. # revisit then.
  32. RESTRICT="test" 
  33. src_prepare() {
  34.         DOCS="AUTHORS ChangeLog NEWS README"
  35.         G2CONF="${G2CONF}
  36.                 $(use_enable debug)
  37.                 $(use_enable test tests)
  38.                 $(use_enable pam)
  39.                 $(use_with pam pam-dir $(getpam_mod_dir))
  40.                 --with-root-certs=${EPREFIX}/usr/share/ca-certificates/
  41.                 --enable-acl-prompts
  42.                 --enable-ssh-agent
  43.                 --enable-gpg-agent
  44.                 --with-gtk=2.0"
  45. #               $(use_enable valgrind)
  46.          epatch "${FILESDIR}/${P}-glib-2.32.patch"
  47.         epatch "${FILESDIR}"/egg-asn1x.patch
  48.         eautoreconf
  49.         gnome2_src_prepare
  50.         # Remove silly CFLAGS
  51.         sed 's:CFLAGS="$CFLAGS -Werror:CFLAGS="$CFLAGS:' \
  52.                 -i configure.in configure || die "sed failed"
  53.         # Remove DISABLE_DEPRECATED flags
  54.         sed -e '/-D[A-Z_]*DISABLE_DEPRECATED/d' \
  55.                 -i configure.in configure || die "sed 2 failed"
  56.         # Fix undefined type in egg-asn1x.c
  57.         epatch "${FILESDIR}/${PN}-2.32.1-fix-undefined.patch"
  58. }
  59.  
  60. src_test() {
  61.         unset DBUS_SESSION_BUS_ADDRESS
  62.         Xemake check || die "emake check failed!"
  63. } 
копируем необходимые патчи:
cp -rfv /usr/portage/gnome-base/gnome-keyring/files/* /home/allusr/localoverlay/gnome-base/gnome-keyring/files
сам patch тудаже запихиваем  (cd /home/allusr/localoverlay/gnome-base/gnome-keyring/files && wget https://raw.githubusercontent.com/openembedded/meta-oe/master/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring/egg-asn1x.patch):
  1. Fixed build error with gcc 4.8
  2.  Errors like below
  3.  egg-asn1x.c: In function 'anode_encode_build':
  4. egg-asn1x.c:1280:7: warning: variable 'type' set but not used [-Wunused-but-set-variable]
  5. egg-asn1x.c: In function 'traverse_and_prepare':
  6. egg-asn1x.c:3354:3: warning: passing argument 1 of 'egg_asn1x_create' from incompatible pointer type [enabled by default]
  7. In file included from egg-asn1x.c:50:0:
  8. egg-asn1x.h:38:8: note: expected 'const struct static_struct_asn *' but argument is of type 'const struct asn1_static_node *'
  9. egg-asn1x.c: At top level:
  10. egg-asn1x.c:3509:1: error: conflicting types for 'egg_asn1x_create'
  11. In file included from egg-asn1x.c:50:0:
  12. egg-asn1x.h:38:8: note: previous declaration of 'egg_asn1x_create' was here
  13. egg-asn1x.c:3572:1: error: conflicting types for 'egg_asn1x_create_quark'
  14. In file included from egg-asn1x.c:50:0:
  15. egg-asn1x.h:41:8: note: previous declaration of 'egg_asn1x_create_quark' was here
  16. egg-asn1x.c:3579:1: error: conflicting types for 'egg_asn1x_create_and_decode'
  17. In file included from egg-asn1x.c:50:0:
  18. egg-asn1x.h:44:8: note: previous declaration of 'egg_asn1x_create_and_decode' was here
  19. make[4]*** [libegg_la-egg-asn1x.lo] Error 1
  20.  
  21. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  22.  
  23. Upstream-Status: Pending
  24. Index: gnome-keyring-2.32.1/egg/egg-asn1x.h
  25. ===================================================================
  26. --- gnome-keyring-2.32.1.orig/egg/egg-asn1x.h 2010-10-18 19:11:38.000000000 -0700
  27. +++ gnome-keyring-2.32.1/egg/egg-asn1x.h 2013-06-11 15:15:00.675399263 -0700
  28. @@ -25,6 +25,7 @@
  29.  #define EGG_ASN1X_H_
  30.  
  31.  #include <glib.h>
  32. +#include <libtasn1.h>
  33.  
  34.  #ifndef HAVE_EGG_ALLOCATOR
  35.  typedef void* (*EggAllocator) (void* p, gsize);
  36. @@ -35,13 +36,13 @@
  37.  
  38.  struct static_struct_asn;
  39.  
  40. -GNode*              egg_asn1x_create                 (const struct static_struct_asn *defs,
  41. +GNode*              egg_asn1x_create                 (const ASN1_ARRAY_TYPE *defs,
  42.                                                        const gchar *type);
  43.  
  44. -GNode*              egg_asn1x_create_quark           (const struct static_struct_asn *defs,
  45. +GNode*              egg_asn1x_create_quark           (const ASN1_ARRAY_TYPE *defs,
  46.                                                        GQuark type);
  47.  
  48. -GNode*              egg_asn1x_create_and_decode      (const struct static_struct_asn *defs,
  49. +GNode*              egg_asn1x_create_and_decode      (const ASN1_ARRAY_TYPE *defs,
  50.                                                        const gchar *type,
  51.                                                        gconstpointer data,
  52.                                                        gsize n_data);


после чего:

ebuild /home/allusr/localoverlay/gnome-base/gnome-keyring/gnome-keyring-2.32.1-r2.ebuild digest
>>> Creating Manifest for /home/allusr/localoverlay/gnome-base/gnome-keyring
EMERGE_DEFAULT_OPTS="--quiet-build=n"  emerge gnome-keyring


ключевая строчка:

* Applying egg-asn1x.patch ...      [ ok ]


PS: ссылки

https://www.linux.org.ru/forum/general/7169422#comment-7170433
http://forums.gentoo.org/viewtopic-p-7601564.html
https://github.com/openembedded/meta-oe/blob/master/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring/egg-asn1x.patch
http://highlight.hohli.com/

1 комментарий:

Xenobiot комментирует...

Поправь файл деБилда.
# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-keyring/gnome-keyring-2.32.1-r1.ebuild,v 1.11 2014/03/01 22:29:51 mgorny
Exp $
EAPI="4"

На странице норм. В файле "Exp $ " перенесен на след. строчку.