[arch-commits] Commit in e2fsprogs/trunk (0001-implement-com_right_r.patch PKGBUILD)
Ronald van Haren
ronald at archlinux.org
Mon Feb 22 15:24:26 UTC 2010
Date: Monday, February 22, 2010 @ 10:24:26
Author: ronald
Revision: 69753
upgpkg: e2fsprogs 1.41.10-1
update to latest version ; FS#18043 add com_right_r() for heimdal
Added:
e2fsprogs/trunk/0001-implement-com_right_r.patch
Modified:
e2fsprogs/trunk/PKGBUILD
----------------------------------+
0001-implement-com_right_r.patch | 60 +++++++++++++++++++++++++++++++++++++
PKGBUILD | 17 ++++++----
2 files changed, 71 insertions(+), 6 deletions(-)
Added: 0001-implement-com_right_r.patch
===================================================================
--- 0001-implement-com_right_r.patch (rev 0)
+++ 0001-implement-com_right_r.patch 2010-02-22 15:24:26 UTC (rev 69753)
@@ -0,0 +1,60 @@
+From 527d258d605e5a1dd841bccc6091c0b894a10411 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa at alpinelinux.org>
+Date: Wed, 27 Jan 2010 16:02:08 +0000
+Subject: [PATCH] implement com_right_r()
+
+For heimdal compat
+---
+ lib/et/com_err.h | 2 ++
+ lib/et/com_right.c | 14 ++++++++++++++
+ 2 files changed, 16 insertions(+), 0 deletions(-)
+
+diff --git a/lib/et/com_err.h b/lib/et/com_err.h
+index de0146e..eb2106f 100644
+--- a/lib/et/com_err.h
++++ b/lib/et/com_err.h
+@@ -16,6 +16,7 @@
+ #define COM_ERR_ATTR(x)
+ #endif
+
++#include <stddef.h>
+ #include <stdarg.h>
+
+ typedef long errcode_t;
+@@ -49,6 +50,7 @@ extern void add_to_error_table(struct et_list *new_table);
+
+ /* Provided for Heimdall compatibility */
+ extern const char *com_right(struct et_list *list, long code);
++extern const char *com_right_r(struct et_list *list, long code, char *str, size_t len);
+ extern void initialize_error_table_r(struct et_list **list,
+ const char **messages,
+ int num_errors,
+diff --git a/lib/et/com_right.c b/lib/et/com_right.c
+index 173fd1a..dbc1e41 100644
+--- a/lib/et/com_right.c
++++ b/lib/et/com_right.c
+@@ -55,6 +55,21 @@ com_right(struct et_list *list, long code)
+ return NULL;
+ }
+
++const char *
++com_right_r(struct et_list *list, long code, char *str, size_t len)
++{
++ struct et_list *p;
++ for (p = list; p; p = p->next) {
++ if (code >= p->table->base && code < p->table->base + p->table->n_msgs) {
++ strncpy(str, p->table->msgs[code - p->table->base], len);
++ str[len-1] = '\0';
++ return str;
++ }
++ }
++ return NULL;
++}
++
++
+ struct foobar {
+ struct et_list etl;
+ struct error_table tab;
+--
+1.6.6.1
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2010-02-22 14:26:22 UTC (rev 69752)
+++ PKGBUILD 2010-02-22 15:24:26 UTC (rev 69753)
@@ -3,7 +3,7 @@
# Contributor: judd <jvinet at zeroflux.org>
pkgname=e2fsprogs
-pkgver=1.41.9
+pkgver=1.41.10
pkgrel=1
pkgdesc="Ext2/3/4 filesystem utilities"
arch=('i686' 'x86_64')
@@ -12,15 +12,19 @@
groups=('base')
depends=('sh' 'util-linux-ng>=2.16')
makedepends=('bc')
-source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz
- MIT-LICENSE)
+source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'MIT-LICENSE' '0001-implement-com_right_r.patch')
backup=('etc/mke2fs.conf')
install=${pkgname}.install
-md5sums=('52f60a9e19a02f142f5546f1b5681927'
- '035b7c69b7a2cecf996a4708c262245e')
+md5sums=('f9c7bb5c036a119453ce02fa871038da'
+ '035b7c69b7a2cecf996a4708c262245e'
+ '20bf4f686512fa0327ca17f61db226a6')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # provide heimdal's com_right_r() directly in e2fsprogs com_err: FS#18043
+ patch -Np1 -i ${srcdir}/0001-implement-com_right_r.patch || return 1
# Remove unnecessary init.d directory
sed -i '/init\.d/s|^|#|' misc/Makefile.in || return 1
@@ -28,7 +32,8 @@
./configure --prefix=/usr --with-root-prefix="" --enable-elf-shlibs \
--disable-fsck --disable-uuidd \
--disable-libuuid --disable-libblkid || return 1
-
+
+
make || return 1
make DESTDIR="${pkgdir}" install install-libs || return 1
More information about the arch-commits
mailing list