[oe] [meta-oe][PATCH] libutempter: Fix compile error on arm
Martin Jansa
martin.jansa at gmail.com
Thu Jan 8 11:17:35 UTC 2015
On Thu, Jan 08, 2015 at 05:25:47PM +0800, Qian Lei wrote:
> | iface.c: In function 'utempter_add_record':
> | <command-line>:0:12: error: expected expression before '/' token
> | iface.c:46:35: note: in expansion of macro 'LIBEXECDIR'
> | #define UTEMPTER_DEFAULT_PATHNAME LIBEXECDIR "/utempter/utempter"
The issue exists on all architectures so drop "on arm"
> Signed-off-by: Qian Lei <qianl.fnst at cn.fujitsu.com>
> ---
> .../libutempter/0001-Modify-macro.patch | 28 ++++++++++++++++++++++
> .../libutempter/libutempter-pierelro.patch | 23 ++++++++++++++++++
> .../libutempter/libutempter_1.1.6.bb | 11 ++++-----
> 3 files changed, 56 insertions(+), 6 deletions(-)
> create mode 100644 meta-oe/recipes-support/libutempter/libutempter/0001-Modify-macro.patch
> create mode 100644 meta-oe/recipes-support/libutempter/libutempter/libutempter-pierelro.patch
>
> diff --git a/meta-oe/recipes-support/libutempter/libutempter/0001-Modify-macro.patch b/meta-oe/recipes-support/libutempter/libutempter/0001-Modify-macro.patch
> new file mode 100644
> index 0000000..b5c518f
> --- /dev/null
> +++ b/meta-oe/recipes-support/libutempter/libutempter/0001-Modify-macro.patch
> @@ -0,0 +1,28 @@
> +From fe0721e3f533b54ed2f916365c0458aa2069c924 Mon Sep 17 00:00:00 2001
> +From: Qian Lei <qianl.fnst at cn.fujitsu.com>
> +Date: Thu, 8 Jan 2015 16:34:09 +0900
> +Subject: [PATCH] Remove macro and use hardcode.
> +
> +Upstream-Status: Pending
> +Signed-off-by: Qian Lei <qianl.fnst at cn.fujitsu.com>
> +
> +---
> + iface.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/iface.c b/iface.c
> +index 5951d81..928ebfd 100644
> +--- a/iface.c
> ++++ b/iface.c
> +@@ -43,7 +43,7 @@
> + __result; }))
> + #endif
> +
> +-#define UTEMPTER_DEFAULT_PATHNAME LIBEXECDIR "/utempter/utempter"
> ++#define UTEMPTER_DEFAULT_PATHNAME "/usr/lib/libutempter/utempter/utempter"
This hardcodes /usr/lib which won't work for people with different
layout.
> + static const char *utempter_pathname;
> + static int saved_fd = -1;
> +--
> +1.8.4.2
> +
> diff --git a/meta-oe/recipes-support/libutempter/libutempter/libutempter-pierelro.patch b/meta-oe/recipes-support/libutempter/libutempter/libutempter-pierelro.patch
> new file mode 100644
> index 0000000..c30a92d
> --- /dev/null
> +++ b/meta-oe/recipes-support/libutempter/libutempter/libutempter-pierelro.patch
> @@ -0,0 +1,23 @@
> +Port from fedora20
> +
> +Upstream-Status: Pending
> +Signed-off-by: Qian Lei <qianl.fnst at cn.fujitsu.com>
> +
> +diff -up libutempter-1.1.6/Makefile.pierelro libutempter-1.1.6/Makefile
> +--- libutempter-1.1.6/Makefile.pierelro 2010-11-04 18:14:53.000000000 +0100
> ++++ libutempter-1.1.6/Makefile 2013-01-24 15:58:06.241865564 +0100
> +@@ -52,11 +52,12 @@ all: $(TARGETS)
> + $(COMPILE.c) -fPIC $< $(OUTPUT_OPTION)
> +
> + $(PROJECT): utempter.c
> +- $(LINK.c) -Wl,-z,now,-stats $(LDLIBS) $< $(OUTPUT_OPTION)
> ++ $(LINK.c) -pie -fPIE -Wl,-z,relro,-z,now,-stats $(LDLIBS) \
> ++ $< $(OUTPUT_OPTION)
> +
> + $(SHAREDLIB): iface.os $(MAP)
> + $(LINK.o) -shared \
> +- -Wl,-soname,$(SONAME),--version-script=$(MAP),-z,defs,-stats \
> ++ -Wl,-soname,$(SONAME),--version-script=$(MAP),-z,relro,-z,defs,-stats \
> + -lc $< $(OUTPUT_OPTION)
> +
> + $(STATICLIB): iface.o
> diff --git a/meta-oe/recipes-support/libutempter/libutempter_1.1.6.bb b/meta-oe/recipes-support/libutempter/libutempter_1.1.6.bb
> index e1dccd6..6df0f19 100644
> --- a/meta-oe/recipes-support/libutempter/libutempter_1.1.6.bb
> +++ b/meta-oe/recipes-support/libutempter/libutempter_1.1.6.bb
> @@ -4,15 +4,15 @@ This library provides interface for terminal emulators such as \
> screen and xterm to record user sessions to utmp and wtmp files."
> HOMEPAGE = "ftp://ftp.altlinux.org/pub/people/ldv/utempter"
> SECTION = "System Environment/Libraries"
> -LICENSE = "GPLv2 GPLv2+ LGPLv2 MIT"
> +LICENSE = "GPLv2 & GPLv2+ & LGPLv2 & MIT"
This was already applied in master a while ago with:
commit ba3105e6055cce009e6f54c01885768ef72d81c5
Author: Otavio Salvador <otavio at ossystems.com.br>
Date: Fri Dec 26 17:21:34 2014 -0200
libutempter: Fix license format QA error
> LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
>
> -SRC_URI = "ftp://ftp.altlinux.org/pub/people/ldv/utempter/${BP}.tar.bz2"
> +SRC_URI = "ftp://ftp.altlinux.org/pub/people/ldv/utempter/${BP}.tar.bz2 \
> + file://0001-Modify-macro.patch \
> + file://libutempter-pierelro.patch"
> SRC_URI[md5sum] = "b43827806923903aba2bc7cd3a2d45b7"
> SRC_URI[sha256sum] = "b898565f31ced7e5c1fa0a2eaa0f6ff0ed862b5fe375d26375b64bfbdfeac397"
>
> -CFLAGS += "-DLIBEXECDIR=$(libexecdir)"
> -
> do_compile() {
> oe_runmake \
> libdir=${libdir} \
> @@ -27,10 +27,9 @@ do_install() {
> includedir=${includedir} \
> mandir=${mandir}
>
> - rm -f ${D}${libdir}/*.a
> + rm -f ${D}${libdir}/*.a
> }
>
> FILES_${PN} = "${libdir}/*.so.*"
> FILES_${PN} += "${libexecdir}/utempter/utempter"
> -
> FILES_${PN}-dbg += "${libexecdir}/utempter/.debug/utempter"
> --
> 1.8.3.1
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20150108/f1c46b20/attachment-0002.sig>
More information about the Openembedded-devel
mailing list