[gentoo-commits] repo/gentoo:master commit in: dev-util/debugedit/files/, dev-util/debugedit/

2024-01-28 Thread Sam James
commit: b16960beaa13970e77667497eeeccb13c7fba6a9
Author: Sv. Lockal  gmail  com>
AuthorDate: Sun Jan 28 14:49:52 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Jan 28 15:32:34 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b16960be

dev-util/debugedit: fix error "Unknown DWARF DW_FORM_0x25 (DW_FORM_strx1)"

This fixes builds with FEATURES="installsources" when compiled with Clang,
allowing to set correct sources path with debugedit for binaries, created with 
Clang.
The issue was caused by switch from DWARF4 to DWARF5 (by default) in Clang 14.
The patch is taken from upstream commits and repeats fix from Fedora.

Upstream bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28728
See Also: https://bugzilla.redhat.com/show_bug.cgi?id=2064052
Closes: https://bugs.gentoo.org/911306
Signed-off-by: Sv. Lockal  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/35054
Signed-off-by: Sam James  gentoo.org>

 dev-util/debugedit/debugedit-5.0-r3.ebuild |  48 +++
 .../files/debugedit-5.0-dw-form-strx-support.patch | 390 +
 2 files changed, 438 insertions(+)

diff --git a/dev-util/debugedit/debugedit-5.0-r3.ebuild 
b/dev-util/debugedit/debugedit-5.0-r3.ebuild
new file mode 100644
index ..465054197278
--- /dev/null
+++ b/dev-util/debugedit/debugedit-5.0-r3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools verify-sig
+
+DESCRIPTION="Create debuginfo and source file distributions"
+HOMEPAGE="https://sourceware.org/debugedit/;
+SRC_URI="
+   https://sourceware.org/ftp/debugedit/${PV}/${P}.tar.xz
+   verify-sig? ( 
https://sourceware.org/ftp/debugedit/${PV}/${P}.tar.xz.sig )
+"
+
+LICENSE="GPL-2+ LGPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 
~amd64-linux ~x86-linux"
+
+RDEPEND="
+   >=dev-libs/elfutils-0.176-r1
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+   sys-apps/help2man
+   virtual/pkgconfig
+   verify-sig? (
+   sec-keys/openpgp-keys-debugedit
+   )
+"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/debugedit.gpg
+
+PATCHES=(
+   "${FILESDIR}"/${P}-readelf.patch
+   "${FILESDIR}"/${P}-zero-dir-entry.patch
+   "${FILESDIR}"/${P}-hppa.patch
+   "${FILESDIR}"/${P}-musl-error.h-fix.patch
+
+   # Upstreamed, remove next release
+   "${FILESDIR}"/${P}-musl-1.2.4.patch
+   # From upstream, remove next release
+   "${FILESDIR}"/${P}-dw-form-strx-support.patch
+)
+
+src_prepare() {
+   default
+   eautoreconf
+}

diff --git a/dev-util/debugedit/files/debugedit-5.0-dw-form-strx-support.patch 
b/dev-util/debugedit/files/debugedit-5.0-dw-form-strx-support.patch
new file mode 100644
index ..3edc77e8e5ab
--- /dev/null
+++ b/dev-util/debugedit/files/debugedit-5.0-dw-form-strx-support.patch
@@ -0,0 +1,390 @@
+Fixes "Unknown DWARF DW_FORM_0x25" for clang DWARF5 output
+Bug: https://bugs.gentoo.org/911306
+Upstream bug: https://sourceware.org/PR28728
+Source: 
https://src.fedoraproject.org/rpms/debugedit/blob/rawhide/f/0001-debugedit-Add-support-for-.debug_str_offsets-DW_FORM.patch
+--- a/tools/debugedit.c
 b/tools/debugedit.c
+@@ -1,4 +1,5 @@
+ /* Copyright (C) 2001-2003, 2005, 2007, 2009-2011, 2016, 2017 Red Hat, Inc.
++   Copyright (C) 2022, 2023 Mark J. Wielaard 
+Written by Alexander Larsson , 2002
+Based on code by Jakub Jelinek , 2001.
+String/Line table rewriting by Mark Wielaard , 2017.
+@@ -264,6 +264,7 @@ typedef struct
+ })
+ 
+ static uint16_t (*do_read_16) (unsigned char *ptr);
++static uint32_t (*do_read_24) (unsigned char *ptr);
+ static uint32_t (*do_read_32) (unsigned char *ptr);
+ static void (*do_write_16) (unsigned char *ptr, uint16_t val);
+ static void (*do_write_32) (unsigned char *ptr, uint32_t val);
+@@ -271,6 +272,9 @@ static void (*do_write_32) (unsigned char *ptr, uint32_t 
val);
+ static int ptr_size;
+ static int cu_version;
+ 
++/* The offset into the .debug_str_offsets section for the current CU.  */
++static uint32_t str_offsets_base;
++
+ static inline uint16_t
+ buf_read_ule16 (unsigned char *data)
+ {
+@@ -283,6 +287,18 @@ buf_read_ube16 (unsigned char *data)
+   return data[1] | (data[0] << 8);
+ }
+ 
++static inline uint32_t
++buf_read_ule24 (unsigned char *data)
++{
++  return data[0] | (data[1] << 8) | (data[2] << 16);
++}
++
++static inline uint32_t
++buf_read_ube24 (unsigned char *data)
++{
++  return data[2] | (data[1] << 8) | (data[0] << 16);
++}
++
+ static inline uint32_t
+ buf_read_ule32 (unsigned char *data)
+ {
+@@ -544,10 +560,12 @@ setup_relbuf (DSO *dso, debug_section *sec, int *reltype)
+   /* Relocations against section symbols are uninteresting in REL.  */
+   if (dso->shdr[i].sh_type == SHT_REL && sym.st_value == 0)
+   continue;
+-  /* Only consider relocations against .debug_str, .debug_line,
+-  

[gentoo-commits] repo/gentoo:master commit in: dev-util/debugedit/files/, dev-util/debugedit/

2023-09-18 Thread Sam James
commit: 03f6b6cdc6dcb889208e1c32100f58a2b4d6eab6
Author: Violet Purcell  inventati  org>
AuthorDate: Mon Jun 26 21:52:52 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Sep 18 08:51:56 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03f6b6cd

dev-util/debugedit: Fix build on musl 1.2.4

Signed-off-by: Violet Purcell  inventati.org>
Closes: https://github.com/gentoo/gentoo/pull/31631
Signed-off-by: Sam James  gentoo.org>

 ...gedit-5.0-r1.ebuild => debugedit-5.0-r2.ebuild} |  3 ++
 .../debugedit/files/debugedit-5.0-musl-1.2.4.patch | 38 ++
 2 files changed, 41 insertions(+)

diff --git a/dev-util/debugedit/debugedit-5.0-r1.ebuild 
b/dev-util/debugedit/debugedit-5.0-r2.ebuild
similarity index 92%
rename from dev-util/debugedit/debugedit-5.0-r1.ebuild
rename to dev-util/debugedit/debugedit-5.0-r2.ebuild
index 6ec21d7d3bb5..eef678585541 100644
--- a/dev-util/debugedit/debugedit-5.0-r1.ebuild
+++ b/dev-util/debugedit/debugedit-5.0-r2.ebuild
@@ -35,6 +35,9 @@ PATCHES=(
"${FILESDIR}"/${P}-zero-dir-entry.patch
"${FILESDIR}"/${P}-hppa.patch
"${FILESDIR}"/${P}-musl-error.h-fix.patch
+
+   # Upstreamed, remove next release
+   "${FILESDIR}"/${P}-musl-1.2.4.patch
 )
 
 src_prepare() {

diff --git a/dev-util/debugedit/files/debugedit-5.0-musl-1.2.4.patch 
b/dev-util/debugedit/files/debugedit-5.0-musl-1.2.4.patch
new file mode 100644
index ..1fe01df67c2a
--- /dev/null
+++ b/dev-util/debugedit/files/debugedit-5.0-musl-1.2.4.patch
@@ -0,0 +1,38 @@
+From 187ba161d1d18ad0d675115d8a9eee7ec1790074 Mon Sep 17 00:00:00 2001
+From: Violet Purcell 
+Date: Mon, 26 Jun 2023 21:46:20 +
+Subject: [PATCH] Fix build failure on musl 1.2.4 due to removal of LFS64
+ compat symbols.
+
+--- a/tools/sepdebugcrcfix.c
 b/tools/sepdebugcrcfix.c
+@@ -144,7 +144,7 @@ crc32 (const char *fname, const char *base_fname, uint32_t 
*crcp)
+   error (0, errno, _("cannot open \"%s\""), debugname);
+   return false;
+ }
+-  off64_t size = lseek64 (fd, 0, SEEK_END);
++  off_t size = lseek (fd, 0, SEEK_END);
+   if (size == -1)
+ {
+   error (0, errno, _("cannot get size of \"%s\""), debugname);
+@@ -289,7 +289,7 @@ process (Elf *elf, int fd, const char *fname)
+ return true;
+   }
+   updated_count++;
+-  off64_t seekto = (shdr->sh_offset + data->d_off
++  off_t seekto = (shdr->sh_offset + data->d_off
+   + (crcp - (const uint8_t *) data->d_buf));
+   uint32_t crc_targetendian = (ehdr->e_ident[EI_DATA] == ELFDATA2LSB
+  ? htole32 (crc) : htobe32 (crc));
+@@ -361,7 +361,7 @@ main (int argc, char **argv)
+   error (0, errno, _("cannot chmod \"%s\" to make sure we can read and 
write"), fname);
+ 
+   bool failed = false;
+-  int fd = open64 (fname, O_RDWR);
++  int fd = open (fname, O_RDWR);
+   if (fd == -1)
+   {
+ error (0, errno, _("cannot open \"%s\""), fname);
+-- 
+2.41.0
+



[gentoo-commits] repo/gentoo:master commit in: dev-util/debugedit/files/, dev-util/debugedit/

2022-07-17 Thread Sam James
commit: 3c3c878c44cb226d776bd989b0206e543dd9ac46
Author: brahmajit das  gmail  com>
AuthorDate: Sat Jul 16 04:36:45 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Jul 18 00:26:12 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c3c878c

dev-util/debugedit: Fix build on musl

musl doesn't provide error.h as a result debugedit is failing to build
on musl. So we're creating a error define that redefines the err
function and takes precedence over it. Thanks to gentoo developer
Anthony G. Basile  gentoo.org> for the patch idea.

Signed-off-by: brahmajit das  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/26223
Signed-off-by: Sam James  gentoo.org>

 dev-util/debugedit/debugedit-5.0-r1.ebuild |  1 +
 .../files/debugedit-5.0-musl-error.h-fix.patch | 50 ++
 2 files changed, 51 insertions(+)

diff --git a/dev-util/debugedit/debugedit-5.0-r1.ebuild 
b/dev-util/debugedit/debugedit-5.0-r1.ebuild
index 18f1e7b7cde5..f510f92c003b 100644
--- a/dev-util/debugedit/debugedit-5.0-r1.ebuild
+++ b/dev-util/debugedit/debugedit-5.0-r1.ebuild
@@ -34,6 +34,7 @@ PATCHES=(
"${FILESDIR}"/${P}-readelf.patch
"${FILESDIR}"/${P}-zero-dir-entry.patch
"${FILESDIR}"/${P}-hppa.patch
+   "${FILESDIR}"/${P}-musl-error.h-fix.patch
 )
 
 src_prepare() {

diff --git a/dev-util/debugedit/files/debugedit-5.0-musl-error.h-fix.patch 
b/dev-util/debugedit/files/debugedit-5.0-musl-error.h-fix.patch
new file mode 100644
index ..4c7f23911108
--- /dev/null
+++ b/dev-util/debugedit/files/debugedit-5.0-musl-error.h-fix.patch
@@ -0,0 +1,50 @@
+# musl doesn't provide error.h as a result debugedit is failing to build on
+# musl.
+#
+# With advice from developer Anthony G. Basile  I went
+# with creating a define that redefines the err function. The major
+# improvements over the previous implementation is that this time the patch is
+# smaller and more readable compared to previous implementation.
+#
+# Closes: https://bugs.gentoo.org/714206
+--- a/configure.ac
 b/configure.ac
+@@ -57,6 +57,8 @@ PKG_CHECK_MODULES([LIBDW], [libdw])
+
+ # Checks for header files.
+ AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stddef.h stdint.h 
stdlib.h string.h unistd.h])
++AC_CHECK_HEADERS([error.h],
++   [AC_DEFINE(HAVE_ERROR_H, 1, [has error.h -- non musl system])])
+
+ # Checks for typedefs, structures, and compiler characteristics.
+ AC_CHECK_HEADER_STDBOOL
+--- a/tools/debugedit.c
 b/tools/debugedit.c
+@@ -25,7 +25,12 @@
+ #include 
+ #include 
+ #include 
++#ifdef HAVE_ERROR_H
+ #include 
++#else
++#include 
++#define error(status, errno, ...) err(status, __VA_ARGS__)
++#endif
+ #include 
+ #include 
+ #include 
+--- a/tools/sepdebugcrcfix.c
 b/tools/sepdebugcrcfix.c
+@@ -29,7 +29,12 @@
+ #include 
+ #include 
+ #include 
++#ifdef HAVE_ERROR_H
+ #include 
++#else
++#include 
++#define error(status, errno, ...) err(status, __VA_ARGS__)
++#endif
+ #include 
+ #include 
+



[gentoo-commits] repo/gentoo:master commit in: dev-util/debugedit/files/, dev-util/debugedit/

2022-02-01 Thread Sam James
commit: 8d9fa65d81d14143e4c6a45cf46d0a5147d68b8b
Author: Sam James  gentoo  org>
AuthorDate: Wed Feb  2 06:12:39 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Feb  2 06:13:54 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d9fa65d

dev-util/debugedit: add HPPA patch

Fixes tests but it's really a runtime error. Should affect
non-HPPA uses too if cross-compiling or otherwise handling
PARISC objects.

Bug: https://bugs.gentoo.org/831766
Thanks-to: Rolf Eike Beer  sf-mail.de>
Signed-off-by: Sam James  gentoo.org>

 dev-util/debugedit/debugedit-5.0-r1.ebuild| 42 +++
 dev-util/debugedit/files/debugedit-5.0-hppa.patch | 25 ++
 2 files changed, 67 insertions(+)

diff --git a/dev-util/debugedit/debugedit-5.0-r1.ebuild 
b/dev-util/debugedit/debugedit-5.0-r1.ebuild
new file mode 100644
index ..a06dbefac224
--- /dev/null
+++ b/dev-util/debugedit/debugedit-5.0-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools verify-sig
+
+DESCRIPTION="Create debuginfo and source file distributions"
+HOMEPAGE="https://sourceware.org/debugedit/;
+SRC_URI="
+   https://sourceware.org/ftp/debugedit/${PV}/${P}.tar.xz
+   https://sourceware.org/ftp/debugedit/${PV}/${P}.tar.xz.sig
+"
+
+LICENSE="GPL-2+ LGPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 
~amd64-linux ~x86-linux"
+
+RDEPEND="
+   >=dev-libs/elfutils-0.176-r1
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+   sys-apps/help2man
+   virtual/pkgconfig
+   verify-sig? (
+   sec-keys/openpgp-keys-debugedit
+   )
+"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/debugedit.gpg
+
+PATCHES=(
+   "${FILESDIR}"/${P}-readelf.patch
+   "${FILESDIR}"/${P}-zero-dir-entry.patch
+   "${FILESDIR}"/${P}-hppa.patch
+)
+
+src_prepare() {
+   default
+   eautoreconf
+}

diff --git a/dev-util/debugedit/files/debugedit-5.0-hppa.patch 
b/dev-util/debugedit/files/debugedit-5.0-hppa.patch
new file mode 100644
index ..296b9a4390ff
--- /dev/null
+++ b/dev-util/debugedit/files/debugedit-5.0-hppa.patch
@@ -0,0 +1,25 @@
+https://sourceware.org/git/?p=debugedit.git;a=commitdiff;h=86130f41d05584581530fc65aa119badb400f4d4
+
+From: Mark Wielaard 
+Date: Thu, 18 Nov 2021 14:14:28 +0100
+Subject: [PATCH] debugedit: Handle hppa EM_PARISC and R_PARISC_DIR32
+
+   * tools/debugedit.c (setup_relbuf): Handle EM_PARISC
+
+https://sourceware.org/bugzilla/show_bug.cgi?id=28598
+
+Patch-provided-by: dave.ang...@bell.net
+Signed-off-by: Mark Wielaard 
+--- a/tools/debugedit.c
 b/tools/debugedit.c
+@@ -590,6 +590,10 @@ setup_relbuf (DSO *dso, debug_section *sec, int *reltype)
+ if (rtype != R_390_32)
+   goto fail;
+ break;
++  case EM_PARISC:
++if (rtype != R_PARISC_DIR32)
++  goto fail;
++break;
+   case EM_IA_64:
+ if (rtype != R_IA64_SECREL32LSB)
+   goto fail;



[gentoo-commits] repo/gentoo:master commit in: dev-util/debugedit/files/, dev-util/debugedit/

2021-09-03 Thread Michał Górny
commit: 51b2dbe87f72d578e34b628da47826a6a727127b
Author: Michał Górny  gentoo  org>
AuthorDate: Fri Sep  3 06:43:48 2021 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Sep  3 06:53:39 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51b2dbe8

dev-util/debugedit: Bump to 5.0

Closes: https://bugs.gentoo.org/768444
Signed-off-by: Michał Górny  gentoo.org>

 dev-util/debugedit/Manifest|   2 +
 dev-util/debugedit/debugedit-5.0.ebuild|  42 +++
 .../debugedit/files/debugedit-5.0-readelf.patch| 330 +
 .../files/debugedit-5.0-zero-dir-entry.patch   | 130 
 4 files changed, 504 insertions(+)

diff --git a/dev-util/debugedit/Manifest b/dev-util/debugedit/Manifest
index 230ca396760..442b79c16b5 100644
--- a/dev-util/debugedit/Manifest
+++ b/dev-util/debugedit/Manifest
@@ -1 +1,3 @@
+DIST debugedit-5.0.tar.xz 164820 BLAKE2B 
8e79f930a7e5c91709b1646794412836fff0b08da17a4b54beac4752a3f62c7418e3e8b8f7f3c3111ba375d6c672fee0f4279632bab3fb406a2fdd75a9e81a64
 SHA512 
7e7f529eafe41b53f0b5bfc58282fdbfa0dfa93ed7908b70e81942d6d2b6f80fc9c6bff2ed9674fd98947e5750b615f4c8b222544989e2900c5f8ff5ae0efb92
+DIST debugedit-5.0.tar.xz.sig 310 BLAKE2B 
bd8b092e400575fa62f759e4fd2e6bbfc9dbd77da2a363bd13c98b32794d515fbe7987824874b9c4be048e458c334bccb74082a78d845f07429b150083f2bcbf
 SHA512 
2223841eb6c63616dc24028e8076ab9d82579e8d6efa4bba45e5dbd0eb181c947feae6f944136f3504a78678569ae96dc6c4a0dd4e7012bd9aa522b0f7525dc9
 DIST rpm-4.16.1.3.tar.bz2 4354652 BLAKE2B 
10013014bdeaf908b64c90f8e76f1d4b0cd0e8cb926f0cd979d7b1e1963b9a25c5b98531deea7e74e00168e2e6349f443fa4578c69c717ca1ab5e6b79d801f3a
 SHA512 
54e503b32dffaa73d6168f26a00220d9d9124082d8a1eb1ddf34ce32a482f07cb06ec654cf065fca1607cc37b13fa7d4fa9895553541d7cfddecf68c9eb96f2e

diff --git a/dev-util/debugedit/debugedit-5.0.ebuild 
b/dev-util/debugedit/debugedit-5.0.ebuild
new file mode 100644
index 000..ebbfafad2c1
--- /dev/null
+++ b/dev-util/debugedit/debugedit-5.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools verify-sig
+
+DESCRIPTION="Create debuginfo and source file distributions"
+HOMEPAGE="https://sourceware.org/debugedit/;
+SRC_URI="
+   https://sourceware.org/ftp/debugedit/${PV}/${P}.tar.xz
+   https://sourceware.org/ftp/debugedit/${PV}/${P}.tar.xz.sig
+"
+
+LICENSE="GPL-2+ LGPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux 
~x86-linux"
+IUSE=""
+
+RDEPEND="
+   >=dev-libs/elfutils-0.176-r1
+"
+DEPEND=${RDEPEND}
+BDEPEND="
+   sys-apps/help2man
+   virtual/pkgconfig
+   verify-sig? (
+   app-crypt/openpgp-keys-debugedit
+   )
+"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/debugedit.gpg
+
+PATCHES=(
+   "${FILESDIR}"/${P}-readelf.patch
+   "${FILESDIR}"/${P}-zero-dir-entry.patch
+)
+
+src_prepare() {
+   default
+   eautoreconf
+}

diff --git a/dev-util/debugedit/files/debugedit-5.0-readelf.patch 
b/dev-util/debugedit/files/debugedit-5.0-readelf.patch
new file mode 100644
index 000..547b6871032
--- /dev/null
+++ b/dev-util/debugedit/files/debugedit-5.0-readelf.patch
@@ -0,0 +1,330 @@
+From 56e41d7c716a3657bdcce05146f7509d8a4e4a74 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich 
+Date: Sun, 1 Aug 2021 21:15:35 +0100
+Subject: [PATCH] use $READELF, not readelf
+
+Allow user to specify own readelf. Use detected readelf,
+not 'readelf'.
+
+Noticed as a set of test failures on system with only
+$host-prefixed tools:
+
+  debugedit/tests/testsuite.dir/at-groups/4/test-source:
+line 40: readelf: command not found
+
+   * configure.ac: Add READELF user override.
+   * scripts/find-debuginfo.in: Use @READELF@ instead of 'readelf'.
+   * tests/atlocal.in: Populate READELF variable detected by configure.
+   * tests/debugedit.at: Use $READELF instad of 'readelf' in tests.
+   * Makefile.am (do_subst): Add READELF substitution.
+
+Signed-off-by: Sergei Trofimovich 
+---
+ Makefile.am   |  3 ++-
+ configure.ac  |  1 +
+ scripts/find-debuginfo.in |  2 +-
+ tests/atlocal.in  |  1 +
+ tests/debugedit.at| 54 +++
+ 5 files changed, 32 insertions(+), 29 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 98b2f20..2060b96 100644
+--- a/Makefile.am
 b/Makefile.am
+@@ -32,7 +32,8 @@ CLEANFILES = $(bin_SCRIPTS)
+ 
+ # Some standard substitutions for scripts
+ do_subst = ($(SED) -e 's,[@]PACKAGE[@],$(PACKAGE),g' \
+- -e 's,[@]VERSION[@],$(VERSION),g')
++ -e 's,[@]VERSION[@],$(VERSION),g' \
++ -e 's,[@]READELF[@],$(READELF),g')
+ 
+ find-debuginfo: $(top_srcdir)/scripts/find-debuginfo.in Makefile
+   $(do_subst) < "$(top_srcdir)/scripts/$@.in" > "$@"
+diff --git a/configure.ac 

[gentoo-commits] repo/gentoo:master commit in: dev-util/debugedit/files/, dev-util/debugedit/

2019-09-08 Thread Michał Górny
commit: 9985eb2bfefb4c77f2f56d1c468cc3ea2f9e2969
Author: Michał Górny  gentoo  org>
AuthorDate: Sun Sep  8 06:14:26 2019 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sun Sep  8 06:14:26 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9985eb2b

dev-util/debugedit: Drop old

Signed-off-by: Michał Górny  gentoo.org>

 dev-util/debugedit/debugedit-4.14.2-r1.ebuild  | 92 --
 .../files/debugedit-4.14.2-no-reorder.patch| 57 --
 2 files changed, 149 deletions(-)

diff --git a/dev-util/debugedit/debugedit-4.14.2-r1.ebuild 
b/dev-util/debugedit/debugedit-4.14.2-r1.ebuild
deleted file mode 100644
index ad6b532ec6c..000
--- a/dev-util/debugedit/debugedit-4.14.2-r1.ebuild
+++ /dev/null
@@ -1,92 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic
-
-MY_P=rpm-${PV}
-DESCRIPTION="Stand-alone debugedit from RPM"
-HOMEPAGE="http://www.rpm.org
-   https://github.com/rpm-software-management/rpm;
-SRC_URI="http://ftp.rpm.org/releases/rpm-$(ver_cut 1-2).x/${MY_P}.tar.bz2"
-
-LICENSE="GPL-2+ LGPL-2+"
-SLOT="0"
-KEYWORDS="amd64 hppa ~ia64 ppc ppc64 x86 ~amd64-linux ~x86-linux"
-IUSE=""
-
-RDEPEND="
-   sys-libs/zlib:=
-   >=dev-libs/popt-1.7
-   dev-libs/elfutils
-   dev-libs/nss
-"
-DEPEND="${RDEPEND}
-   virtual/pkgconfig
-"
-
-S=${WORKDIR}/${MY_P}
-
-src_prepare() {
-   # do not reorder sections, ever; otherwise it breaks gcc
-   # https://bugs.gentoo.org/666954
-   eapply "${FILESDIR}"/debugedit-4.14.2-no-reorder.patch
-   eapply_user
-
-   # cheat it into believing we're bundling db
-   mkdir -p db/dist || die
-   touch db/dist/configure || die
-   chmod +x db/dist/configure || die
-   echo 'install:' > db3/Makefile || die
-
-   # TODO: why do we need to do this?
-   mkdir rpm || die
-   find -name '*.h' -exec cp {} rpm/ ';' || die
-}
-
-src_configure() {
-   append-cppflags -I"${EPREFIX}/usr/include/nss" 
-I"${EPREFIX}/usr/include/nspr"
-   local myconf=(
-   # force linking to static librpmio
-   --disable-shared
-
-   # disable linking compression libraries
-   ac_cv_header_bzlib_h=no
-   ac_cv_header_lzma_h=no
-   --disable-zstd
-
-   # fake some libraries we don't use
-   ac_cv_header_magic_h=yes
-   ac_cv_lib_magic_magic_open=yes
-
-   # use nss as crypto provider
-   --with-crypto=nss
-
-   # disable other stuff irrelevant to debugedit
-   --disable-nls
-   --disable-python
-   --without-acl
-   --without-archive
-   --without-cap
-   --without-external-db
-   --without-hackingdocs
-   --without-lua
-   --without-selinux
-   )
-   econf "${myconf[@]}"
-}
-
-src_compile() {
-   emake -C misc
-   emake -C rpmio
-   emake debugedit
-}
-
-src_test() {
-   :
-}
-
-src_install() {
-   dobin debugedit
-}

diff --git a/dev-util/debugedit/files/debugedit-4.14.2-no-reorder.patch 
b/dev-util/debugedit/files/debugedit-4.14.2-no-reorder.patch
deleted file mode 100644
index 0c196a842b4..000
--- a/dev-util/debugedit/files/debugedit-4.14.2-no-reorder.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 0779d60cb5941610dd1f31632aa1655bf2cc447a Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich 
-Date: Sat, 6 Oct 2018 17:56:00 +0100
-Subject: [PATCH] debugedit: don't reorder sections
-
-In https://bugs.gentoo.org/666954 debugedit processed
-crtbeginS.o from gcc-8.2.0 and turned into invalid ELF:
-
-```
-$ cp crtbeginS-ok-7.3.0.o.back crtbeginS-ok-7.3.0.o
-$ debugedit -i -b $(pwd) -d /usr/src/debug -l ./foo crtbeginS-ok-7.3.0.o
-$ export LANG=C
-$ readelf -a crtbeginS-ok-7.3.0.o.back >/dev/null && echo ok
-readelf: Warning: [ 9]: Info field (8) should index a relocatable section.
-ok
-
-$ readelf -a crtbeginS-ok-7.3.0.o >/dev/null && echo ok
-readelf: Warning: [ 9]: Info field (8) should index a relocatable section.
-readelf: Error:  bad symbol index: 54495f00 in reloc
-readelf: Error:  bad symbol index: 656c6261 in reloc
-readelf: Error:  bad symbol index: 62615465 in reloc
-readelf: Error:  bad symbol index: 69665f61 in reloc
-readelf: Warning: local symbol 11 found at index >= symtab's sh_info value of 
11
-readelf: Warning: local symbol 14 found at index >= symtab's sh_info value of 
11
-readelf: Warning: local symbol 15 found at index >= symtab's sh_info value of 
11
-```
-
-Ths fix is not to reorder sections as debugedit does not
-account for offset change.
-
-debugedit already does it for final executables and shared libraries.
-
-Bug: https://bugs.gentoo.org/666954
-Closes: https://github.com/rpm-software-management/rpm/issues/423
-Signed-off-by: Sergei Trofimovich 

- 

[gentoo-commits] repo/gentoo:master commit in: dev-util/debugedit/files/, dev-util/debugedit/

2019-06-20 Thread Michał Górny
commit: 769d3ad8c5253937d16de8ef18770cd5b1fe5824
Author: Michał Górny  gentoo  org>
AuthorDate: Thu Jun 20 07:59:32 2019 +
Commit: Michał Górny  gentoo  org>
CommitDate: Thu Jun 20 08:01:33 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=769d3ad8

dev-util/debugedit: Drop old

Signed-off-by: Michał Górny  gentoo.org>

 dev-util/debugedit/Manifest|   1 -
 dev-util/debugedit/debugedit-0.5.3.5-r1.ebuild |  44 ---
 .../debugedit/files/debugedit-5.3.5-DWARF-4.patch  | 129 -
 3 files changed, 174 deletions(-)

diff --git a/dev-util/debugedit/Manifest b/dev-util/debugedit/Manifest
index 9a83bb233b3..355633f1484 100644
--- a/dev-util/debugedit/Manifest
+++ b/dev-util/debugedit/Manifest
@@ -1,2 +1 @@
-DIST debugedit-5.3.5.tar.bz2 27799 BLAKE2B 
f81b39122502afe66386b962d0e50e9a16a314f31acf2a44c6d53f16d24ac91b62483a67fed43d085c3dd573adcd312cbb5e15c214fd8f00bc5415835c2caa37
 SHA512 
afac800a8f2e035705fcf997500d8fd2c3dc658850f47754863e8811db97859748721c5a252cc90dc81d07bf08763a9507e2272e983ee3f6bf16d8016fe5b8c9
 DIST rpm-4.14.2.tar.bz2 4151934 BLAKE2B 
eb7e32dd736a195f2e5effc184ee8f2c700dcaf80477574c2112b6c96504d86a67c81e611f82ea35ce244e95fad339bd262eb51c35ada5eeffa8d306b6938cb7
 SHA512 
22e309e8be936e6070430cedd6f5ea0c3871db4c6aadd0d567a9c418796c178c8dd45d44920d7eaa66681790cc2821347affe471cb215d7a490fe7947fbf291c

diff --git a/dev-util/debugedit/debugedit-0.5.3.5-r1.ebuild 
b/dev-util/debugedit/debugedit-0.5.3.5-r1.ebuild
deleted file mode 100644
index 0f558d0076a..000
--- a/dev-util/debugedit/debugedit-0.5.3.5-r1.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# To recreate this tarball, just grab latest rpm5 release:
-#  http://rpm5.org/files/rpm/
-# The files are in tools/
-# Or see $FILESDIR/update.sh
-
-EAPI="5"
-
-inherit toolchain-funcs eutils
-
-# See #653906 for the need to reversion.
-MY_PV=${PV#0.}
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="standalone debugedit taken from rpm"
-HOMEPAGE="http://www.rpm5.org/;
-SRC_URI="https://dev.gentoo.org/~swegener/distfiles/${MY_P}.tar.bz2
-   https://dev.gentoo.org/~vapier/dist/${MY_P}.tar.bz2;
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 hppa ~ia64 ppc ppc64 x86 ~amd64-linux ~x86-linux"
-IUSE=""
-
-DEPEND="dev-libs/popt
-   dev-libs/elfutils
-   dev-libs/beecrypt"
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}/${MY_P}"
-
-src_prepare() {
-   epatch "${FILESDIR}"/${PN}-5.3.5-DWARF-4.patch #400663
-}
-
-src_compile() {
-   emake CC="$(tc-getCC)"
-}
-
-src_install() {
-   dobin debugedit
-}

diff --git a/dev-util/debugedit/files/debugedit-5.3.5-DWARF-4.patch 
b/dev-util/debugedit/files/debugedit-5.3.5-DWARF-4.patch
deleted file mode 100644
index 3e1406196e9..000
--- a/dev-util/debugedit/files/debugedit-5.3.5-DWARF-4.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-add DWARF 4 support
-
-https://bugs.gentoo.org/400663
-https://bugzilla.redhat.com/show_bug.cgi?id=707677
-
 debugedit-5.3.5/debugedit.c2011-10-11 05:37:49.0 +0200
-+++ debugedit-5.3.5/debugedit.c2012-01-25 01:27:23.487999039 +0100
-@@ -70,6 +70,10 @@
- #include 
- 
- #define DW_TAG_partial_unit 0x3c
-+#define DW_FORM_sec_offset 0x17
-+#define DW_FORM_exprloc 0x18
-+#define DW_FORM_flag_present 0x19
-+#define DW_FORM_ref_sig8 0x20
- 
- char *base_dir = NULL;
- char *dest_dir = NULL;
-@@ -246,6 +250,7 @@
- #define DEBUG_STR 8
- #define DEBUG_FRAME   9
- #define DEBUG_RANGES  10
-+#define DEBUG_TYPES   11
- { ".debug_info", NULL, NULL, 0, 0, 0 },
- { ".debug_abbrev", NULL, NULL, 0, 0, 0 },
- { ".debug_line", NULL, NULL, 0, 0, 0 },
-@@ -257,6 +262,7 @@
- { ".debug_str", NULL, NULL, 0, 0, 0 },
- { ".debug_frame", NULL, NULL, 0, 0, 0 },
- { ".debug_ranges", NULL, NULL, 0, 0, 0 },
-+{ ".debug_types", NULL, NULL, 0, 0, 0 },
- { NULL, NULL, NULL, 0, 0, 0 }
-   };
- 
-@@ -349,7 +355,8 @@
-   goto no_memory;
-   }
- form = read_uleb128 (ptr);
--if (form == 2 || form > DW_FORM_indirect)
-+if (form == 2
-+|| (form > DW_FORM_flag_present && form != DW_FORM_ref_sig8))
-   {
- error (0, 0, "%s: Unknown DWARF DW_FORM_%d", dso->filename, form);
- htab_delete (h);
-@@ -378,7 +385,6 @@
- canonicalize_path (const char *s, char *d)
- {
-   char *rv = d;
--  const char *sroot;
-   char *droot;
- 
-   if (IS_DIR_SEPARATOR (*s))
-@@ -394,7 +400,6 @@
-   s++;
- }
-   droot = d;
--  sroot = s;
- 
-   while (*s)
- {
-@@ -513,7 +518,7 @@
- }
- 
-   value = read_16 (ptr);
--  if (value != 2 && value != 3)
-+  if (value != 2 && value != 3 && value != 4)
- {
-   error (0, 0, "%s: DWARF version %d unhandled", dso->filename,
-value);
-@@ -529,8 +534,8 @@
-   return 1;
- }
-   
--  opcode_base = ptr[4];
--  ptr = dir = ptr + 4 + 

[gentoo-commits] repo/gentoo:master commit in: dev-util/debugedit/files/, dev-util/debugedit/

2019-03-14 Thread Michał Górny
commit: 0e56e352403a2405a99465e68218e84a057933b4
Author: Michał Górny  gentoo  org>
AuthorDate: Wed Mar 13 18:07:16 2019 +
Commit: Michał Górny  gentoo  org>
CommitDate: Thu Mar 14 12:23:41 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e56e352

dev-util/debugedit: Apply GCC breakage workaround

Thanks to slyfox for the patch.

Closes: https://bugs.gentoo.org/666954
Signed-off-by: Michał Górny  gentoo.org>

 dev-util/debugedit/debugedit-4.14.2-r1.ebuild  | 92 ++
 .../files/debugedit-4.14.2-no-reorder.patch| 57 ++
 2 files changed, 149 insertions(+)

diff --git a/dev-util/debugedit/debugedit-4.14.2-r1.ebuild 
b/dev-util/debugedit/debugedit-4.14.2-r1.ebuild
new file mode 100644
index 000..0aabb6cf18d
--- /dev/null
+++ b/dev-util/debugedit/debugedit-4.14.2-r1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic
+
+MY_P=rpm-${PV}
+DESCRIPTION="Stand-alone debugedit from RPM"
+HOMEPAGE="http://www.rpm.org
+   https://github.com/rpm-software-management/rpm;
+SRC_URI="http://ftp.rpm.org/releases/rpm-$(ver_cut 1-2).x/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2+ LGPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+   sys-libs/zlib:=
+   >=dev-libs/popt-1.7
+   dev-libs/elfutils
+   dev-libs/nss
+"
+DEPEND="${RDEPEND}
+   virtual/pkgconfig
+"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+   # do not reorder sections, ever; otherwise it breaks gcc
+   # https://bugs.gentoo.org/666954
+   eapply "${FILESDIR}"/debugedit-4.14.2-no-reorder.patch
+   eapply_user
+
+   # cheat it into believing we're bundling db
+   mkdir -p db/dist || die
+   touch db/dist/configure || die
+   chmod +x db/dist/configure || die
+   echo 'install:' > db3/Makefile || die
+
+   # TODO: why do we need to do this?
+   mkdir rpm || die
+   find -name '*.h' -exec cp {} rpm/ ';' || die
+}
+
+src_configure() {
+   append-cppflags -I"${EPREFIX}/usr/include/nss" 
-I"${EPREFIX}/usr/include/nspr"
+   local myconf=(
+   # force linking to static librpmio
+   --disable-shared
+
+   # disable linking compression libraries
+   ac_cv_header_bzlib_h=no
+   ac_cv_header_lzma_h=no
+   --disable-zstd
+
+   # fake some libraries we don't use
+   ac_cv_header_magic_h=yes
+   ac_cv_lib_magic_magic_open=yes
+
+   # use nss as crypto provider
+   --with-crypto=nss
+
+   # disable other stuff irrelevant to debugedit
+   --disable-nls
+   --disable-python
+   --without-acl
+   --without-archive
+   --without-cap
+   --without-external-db
+   --without-hackingdocs
+   --without-lua
+   --without-selinux
+   )
+   econf "${myconf[@]}"
+}
+
+src_compile() {
+   emake -C misc
+   emake -C rpmio
+   emake debugedit
+}
+
+src_test() {
+   :
+}
+
+src_install() {
+   dobin debugedit
+}

diff --git a/dev-util/debugedit/files/debugedit-4.14.2-no-reorder.patch 
b/dev-util/debugedit/files/debugedit-4.14.2-no-reorder.patch
new file mode 100644
index 000..0c196a842b4
--- /dev/null
+++ b/dev-util/debugedit/files/debugedit-4.14.2-no-reorder.patch
@@ -0,0 +1,57 @@
+From 0779d60cb5941610dd1f31632aa1655bf2cc447a Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich 
+Date: Sat, 6 Oct 2018 17:56:00 +0100
+Subject: [PATCH] debugedit: don't reorder sections
+
+In https://bugs.gentoo.org/666954 debugedit processed
+crtbeginS.o from gcc-8.2.0 and turned into invalid ELF:
+
+```
+$ cp crtbeginS-ok-7.3.0.o.back crtbeginS-ok-7.3.0.o
+$ debugedit -i -b $(pwd) -d /usr/src/debug -l ./foo crtbeginS-ok-7.3.0.o
+$ export LANG=C
+$ readelf -a crtbeginS-ok-7.3.0.o.back >/dev/null && echo ok
+readelf: Warning: [ 9]: Info field (8) should index a relocatable section.
+ok
+
+$ readelf -a crtbeginS-ok-7.3.0.o >/dev/null && echo ok
+readelf: Warning: [ 9]: Info field (8) should index a relocatable section.
+readelf: Error:  bad symbol index: 54495f00 in reloc
+readelf: Error:  bad symbol index: 656c6261 in reloc
+readelf: Error:  bad symbol index: 62615465 in reloc
+readelf: Error:  bad symbol index: 69665f61 in reloc
+readelf: Warning: local symbol 11 found at index >= symtab's sh_info value of 
11
+readelf: Warning: local symbol 14 found at index >= symtab's sh_info value of 
11
+readelf: Warning: local symbol 15 found at index >= symtab's sh_info value of 
11
+```
+
+Ths fix is not to reorder sections as debugedit does not
+account for offset change.
+
+debugedit already does it for final executables and shared libraries.
+
+Bug: https://bugs.gentoo.org/666954
+Closes: 

[gentoo-commits] repo/gentoo:master commit in: dev-util/debugedit/files/

2018-09-19 Thread Michał Górny
commit: fabfe2034914e1390f3d52d1e0992e6524ceb56b
Author: Michał Górny  gentoo  org>
AuthorDate: Wed Sep 19 22:23:22 2018 +
Commit: Michał Górny  gentoo  org>
CommitDate: Wed Sep 19 22:25:36 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fabfe203

dev-util/debugedit: Remove obsolete updater script

We are now using upstream tarballs, so the script is no longer relevant.

Signed-off-by: Michał Górny  gentoo.org>

 dev-util/debugedit/files/update.sh | 84 --
 1 file changed, 84 deletions(-)

diff --git a/dev-util/debugedit/files/update.sh 
b/dev-util/debugedit/files/update.sh
deleted file mode 100755
index 3fed29ad6dc..000
--- a/dev-util/debugedit/files/update.sh
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/bash
-
-DISTDIR="$(portageq envvar DISTDIR 2>/dev/null)"
-DISTDIR="${DISTDIR:-/usr/portage/distfiles}"
-if [[ ! -d "${DISTDIR}" ]] ; then
-   echo "No DISTDIR found."
-   exit 1
-fi
-
-PN=debugedit
-
-gentoo_functions="/lib/gentoo/functions.sh"
-if [[ -f "${gentoo_functions}" ]] ; then
-   . "${gentoo_functions}"
-else
-   echo "Failed to source ${gentoo_functions} file."
-   echo "Please install sys-apps/gentoo-functions package."
-   exit 1
-fi
-
-set -e
-
-einfo "Getting updated index"
-rm -f index.html
-wget -q http://rpm5.org/
-
-PV=$(sed -n '/Production:/{n;s:.*RPM ::;s:<.*::;p;q}' index.html)
-einfo "Latest upstream version: ${PV}"
-rm -f index.html
-
-P="${PN}-${PV}"
-A=${P}.tar.bz2
-
-e=${P}.ebuild
-if [[ -e ../${e} ]] ; then
-   einfo "All up to date"
-   exit 0
-fi
-
-#tf=${DISTDIR}/${A}
-#if [[ ! -e ${tf} ]] ; then
-#  einfo "Cannot find ${tf}"
-#  exit 0
-#fi
-
-einfo "Fetching latest rpm tarball"
-r=rpm-${PV}
-wget -nv http://rpm5.org/files/rpm/rpm-${PV%.*}/${r}.tar.gz -P ${DISTDIR} -c
-
-einfo "Unpacking ${r}"
-rm -rf ${r}
-tar xf ${DISTDIR}/${r}.tar.gz
-
-einfo "Creating ${P}"
-rm -rf ${P}
-mkdir ${P}
-cp Makefile ${r}/tools/{hashtab.?,debugedit.c} ${P}/
-pushd ${P} >/dev/null
-more=true
-while ${more} ; do
-   more=false
-   for h in $(grep '#include' *.[ch] | awk '{print $NF}' | sed 
's:[<>"]::g') ; do
-   [[ ${h} == */* ]] && continue
-   rh=$(find ../${r} -name ${h##*/})
-   if [[ -n ${rh} ]] && [[ ! -e ${rh##*/} ]] ; then
-   # don't copy glibc includes
-   if ! grep -qs 'This file is part of the GNU C Library' 
${rh} ; then
-   cp ${rh} ./
-   more=true
-   fi
-   fi
-   done
-done
-popd >/dev/null
-tar jcf ${A} ${P}
-
-einfo "Testing build"
-pushd ${P} >/dev/null
-make -s
-popd >/dev/null
-
-einfo "Cleaning up"
-rm -rf ${P} ${r}
-du -b ${A}



[gentoo-commits] repo/gentoo:master commit in: dev-util/debugedit/files/

2017-10-20 Thread Patrice Clement
commit: 648de4a2dda814d0b908d1966ce0a66eae15c648
Author: Michael Mair-Keimberger  gmail  com>
AuthorDate: Tue Oct 10 13:12:54 2017 +
Commit: Patrice Clement  gentoo  org>
CommitDate: Fri Oct 20 07:45:04 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=648de4a2

dev-util/debugedit: remove unused file.

 dev-util/debugedit/files/Makefile | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/dev-util/debugedit/files/Makefile 
b/dev-util/debugedit/files/Makefile
deleted file mode 100644
index 946a12865f6..000
--- a/dev-util/debugedit/files/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-CPPFLAGS += -I.
-LDLIBS = -lelf -lpopt -lbeecrypt
-
-all: debugedit
-
-debugedit: debugedit.o hashtab.o
-
-clean:
-   rm -f *.o debugedit
-
-.PHONY: clean



[gentoo-commits] repo/gentoo:master commit in: dev-util/debugedit/files/

2016-11-09 Thread Lars Wendler
commit: e9c2acd3fdd4e239c3d78b289351a263628c2d74
Author: Lars Wendler  gentoo  org>
AuthorDate: Wed Nov  9 10:06:46 2016 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Wed Nov  9 10:06:46 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9c2acd3

dev-util/debugedit: Added some checks to the update script.

Package-Manager: portage-2.3.2

 dev-util/debugedit/files/update.sh | 17 +++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/dev-util/debugedit/files/update.sh 
b/dev-util/debugedit/files/update.sh
index db5495d..3fed29a 100755
--- a/dev-util/debugedit/files/update.sh
+++ b/dev-util/debugedit/files/update.sh
@@ -1,9 +1,22 @@
 #!/bin/bash
 
-DISTDIR=/usr/portage/distfiles
+DISTDIR="$(portageq envvar DISTDIR 2>/dev/null)"
+DISTDIR="${DISTDIR:-/usr/portage/distfiles}"
+if [[ ! -d "${DISTDIR}" ]] ; then
+   echo "No DISTDIR found."
+   exit 1
+fi
+
 PN=debugedit
 
-. /etc/init.d/functions.sh
+gentoo_functions="/lib/gentoo/functions.sh"
+if [[ -f "${gentoo_functions}" ]] ; then
+   . "${gentoo_functions}"
+else
+   echo "Failed to source ${gentoo_functions} file."
+   echo "Please install sys-apps/gentoo-functions package."
+   exit 1
+fi
 
 set -e