From patchwork Sat Jul 1 14:23:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 106821 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp3562430qge; Sat, 1 Jul 2017 07:25:30 -0700 (PDT) X-Received: by 10.99.122.3 with SMTP id v3mr1034802pgc.98.1498919130249; Sat, 01 Jul 2017 07:25:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498919130; cv=none; d=google.com; s=arc-20160816; b=qZbt5th0VRITkfPNAMz4h7A1p14rr4pqqDeTMtZfRnwht95cYyqIo3Nx0rs78E2AVf eFOWZibnMUlE19q/NhihB2soZ6TPWDBCe4Pcv6TQx40xQYF7TXciyFRDpIPJB62RvPc1 5HNJzqQDhDalgSAm3I/4gP39wm16XGx3witxAWonO/4Qny3P4+ByUbaWD3fG2ExUjQwW ypohEZydSz0mJOtnLPyI28lCzcsTARTe6BTDGkcqrw7Qn6NMBe4RWR14zl6C21dEHQCk Qxo1NpFYbxLoCMEvoJcwBUr5Sv6J6Gs1UCN5p4jQqo/C+U8CumIinHQTU24A8HNrqRxg 3+jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=oMylMkszAjcyW5z9sqxut25o8NIXDj9dVHerDVDLGc4=; b=cWaa6jM4H3fzaoDRCzONLoUigmMCUGPzfBlp5ecmQpqh2WpxZlhu7zVDjmN6edVH2C uZNOwWkxt0FifxMt30ak80fGmjQC36ZQzBj0mm0GrYVS4V184B8b++TosxNmj/zUxjim Ew2NPhS5k8eKHrfbYTwDHENHazTFLsJ3HUSk7Q48NbeODNvOlZKIVeC+vcqds26wQByA zk+I0OPEFpr6SmBYqtAt/nmdZAOTWnzRRL01UnbccTwjkq0Ri4Ng384LK/O6Slg+OaWx TQJmp3k1CaWu+JHein3+PmHbDaeZ0doXQXmW5aCIuZ2W3H54PlrkqkJYtlOf0LuV2qJ+ uDzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=NrzowI33; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id 20si8133000pgg.324.2017.07.01.07.25.29; Sat, 01 Jul 2017 07:25:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=NrzowI33; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id D7B2B782E4; Sat, 1 Jul 2017 14:24:53 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf0-f182.google.com (mail-pf0-f182.google.com [209.85.192.182]) by mail.openembedded.org (Postfix) with ESMTP id 2ACF2775DE for ; Sat, 1 Jul 2017 14:23:50 +0000 (UTC) Received: by mail-pf0-f182.google.com with SMTP id q86so80128742pfl.3 for ; Sat, 01 Jul 2017 07:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CSTZ4auulbSDh84V+l6nf55ZFL4dEFZ5Tc+DgzTUvuc=; b=NrzowI33HKpSDCpz7R4w6RmIIf1LjxPB7ZMm53N1M9zEbadfyHa89nfxGP/RWBLRyN jFGVAP5Yw9S7PHFyLj0wo3dMPKKkT8Qja/KmjtePumRXvGXwn/rF07/liHXQVDztfvPF 4GGcMhYHChOtXNCfk03QZ+UIehUjKJYBMeCFLiUyrFpPh48aGz4o7+3bIYSeqF3qyqs/ RRfhsyVz4WDj1AqVJ5M0SCO7zCswOUivH/rpR65CE8JVYJC7oRKikHoClUXK4/tSM/Bw tg/ewnUSlwgwtJREiToUmXYWg3eXf7WvZwcYV0r9LXqNTw1bkWSJQaqaB8IKM9VGh7MF CaXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CSTZ4auulbSDh84V+l6nf55ZFL4dEFZ5Tc+DgzTUvuc=; b=Z48qj0s7ZiLcZhvQfaTJt677J3SNzZWI8g+BjTsmPipnr2jwIzUIk75tUu++rIbrkq hjmIaeJccmrOcm0xxcvouk80M0U2VGfs1mk1URvKav+uq77JLRHhLiTF6HSIEzsU5Zl+ fA2RpSM9z32IGWUtNnyjcjppHumzYsUs0e7YcK+yE2KyqdUw2RBVE3HGuQPklLh2kJAG I6gdWkMGxk1SB0J5bFW4qtmXkOs383MQ8PQQaW+0IF8sDIKliumeIqzeHn1Ph0ViPHVO 1OZS+7q1WLHxeMA0XzkNAmoW5lwYqZEmGhgiuUZE0GzPyBBvXSeFg6b20lcgZb6sy4tf xNCg== X-Gm-Message-State: AIVw112w6eIqBGo4ZgEy/jQfK0wwaqkuxb/XSrtPhULpiRsp+tHRu80k 1CRZle5Raqf2tbVP X-Received: by 10.84.200.39 with SMTP id s36mr1001706pld.129.1498919031871; Sat, 01 Jul 2017 07:23:51 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::3df3]) by smtp.gmail.com with ESMTPSA id 17sm25026909pfn.84.2017.07.01.07.23.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Jul 2017 07:23:50 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Sat, 1 Jul 2017 07:23:12 -0700 Message-Id: X-Mailer: git-send-email 2.13.2 In-Reply-To: References: Subject: [OE-core] [PATCH 09/19] sysklogd: Improve build and fix runtime crash X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Patch the makefile so it can respect flags from environment add a patch to fix a run time crash Signed-off-by: Khem Raj --- ...s-that-causes-a-segmentation-fault-under-.patch | 28 +++++++++++++++++ ...way-for-respecting-flags-from-environment.patch | 35 ++++++++++++++++++++++ meta/recipes-extended/sysklogd/sysklogd.inc | 6 ++-- 3 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 meta/recipes-extended/sysklogd/files/0001-fix-problems-that-causes-a-segmentation-fault-under-.patch create mode 100644 meta/recipes-extended/sysklogd/files/0002-Make-way-for-respecting-flags-from-environment.patch -- 2.13.2 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-extended/sysklogd/files/0001-fix-problems-that-causes-a-segmentation-fault-under-.patch b/meta/recipes-extended/sysklogd/files/0001-fix-problems-that-causes-a-segmentation-fault-under-.patch new file mode 100644 index 0000000000..56431af845 --- /dev/null +++ b/meta/recipes-extended/sysklogd/files/0001-fix-problems-that-causes-a-segmentation-fault-under-.patch @@ -0,0 +1,28 @@ +From cb72b3e172c238b4b5ae5935dc6be54f5034fcf1 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 30 Jun 2017 18:20:06 -0700 +Subject: [PATCH 1/2] fix problems that causes a segmentation fault under some + conditions + +Upstream-Status: Inappropriate [ no upstream ] + +Signed-off-by: Khem Raj +--- + ksym_mod.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/ksym_mod.c b/ksym_mod.c +index 6e26da1..a3daa7d 100644 +--- a/ksym_mod.c ++++ b/ksym_mod.c +@@ -186,7 +186,6 @@ extern int InitMsyms() + else + Syslog(LOG_ERR, "Error loading kernel symbols " \ + "- %s\n", strerror(errno)); +- fclose(ksyms); + return(0); + } + +-- +2.13.2 + diff --git a/meta/recipes-extended/sysklogd/files/0002-Make-way-for-respecting-flags-from-environment.patch b/meta/recipes-extended/sysklogd/files/0002-Make-way-for-respecting-flags-from-environment.patch new file mode 100644 index 0000000000..ebbdef303b --- /dev/null +++ b/meta/recipes-extended/sysklogd/files/0002-Make-way-for-respecting-flags-from-environment.patch @@ -0,0 +1,35 @@ +From b22f244732cd0f475af2f82fc7eecec49f90623b Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 1 Jul 2017 00:01:50 -0700 +Subject: [PATCH 2/2] Make way for respecting flags from environment + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + Makefile | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 5af1689..af699d2 100644 +--- a/Makefile ++++ b/Makefile +@@ -17,14 +17,12 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +-CC= gcc + #SKFLAGS= -g -DSYSV -Wall + #LDFLAGS= -g +-SKFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce ++SKFLAGS = $(CFLAGS) $(CPPFLAGS) -DSYSV -Wall -fno-strength-reduce + # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE + # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE + # $(shell getconf LFS_SKFLAGS) +-LDFLAGS= -s + + # Look where your install program is. + INSTALL = /usr/bin/install +-- +2.13.2 + diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc index 78b8d7a985..644728ae67 100644 --- a/meta/recipes-extended/sysklogd/sysklogd.inc +++ b/meta/recipes-extended/sysklogd/sysklogd.inc @@ -16,6 +16,8 @@ inherit update-rc.d update-alternatives systemd SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \ file://no-strip-install.patch \ file://0001-Fix-build-with-musl.patch \ + file://0001-fix-problems-that-causes-a-segmentation-fault-under-.patch \ + file://0002-Make-way-for-respecting-flags-from-environment.patch \ file://sysklogd \ file://syslog.conf \ file://syslogd.service \ @@ -32,9 +34,7 @@ SYSTEMD_AUTO_ENABLE = "enable" INITSCRIPT_NAME = "syslog" CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}" -EXTRA_OEMAKE = "-e MAKEFLAGS=" - -CFLAGS_append = " -DSYSV" +CFLAGS += "-DSYSV -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" do_install () { install -d ${D}${mandir}/man8 \