diff mbox series

[meta-oe,1/3] linuxptp: update linuxptp recipe to 4.1

Message ID 20231011163346.1856498-2-luca.fancellu@arm.com
State Under Review
Headers show
Series Update linuxptp version to 4.1 | expand

Commit Message

Luca Fancellu Oct. 11, 2023, 4:33 p.m. UTC
Update linuxptp recipe to the new version, from 3.1.1 to 4.1.

Remove one downstream patch that is already applied and
update the remaining to remove merge issues.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
---
 .../0001-include-string.h-for-strncpy.patch   |  8 ++--
 ...ditional-assignment-for-KBUILD_OUTPU.patch | 42 -------------------
 .../linuxptp/Use-cross-cpp-in-incdefs.patch   |  8 ++--
 ...-Allow-CC-and-prefix-to-be-overriden.patch | 12 +++---
 .../{linuxptp_3.1.1.bb => linuxptp_4.1.bb}    | 22 ++++++----
 5 files changed, 26 insertions(+), 66 deletions(-)
 delete mode 100644 meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-makefile-use-conditional-assignment-for-KBUILD_OUTPU.patch
 rename meta-oe/recipes-connectivity/linuxptp/{linuxptp_3.1.1.bb => linuxptp_4.1.bb} (59%)
diff mbox series

Patch

diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-include-string.h-for-strncpy.patch b/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-include-string.h-for-strncpy.patch
index 60f2079d37ae..ae544699272f 100644
--- a/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-include-string.h-for-strncpy.patch
+++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-include-string.h-for-strncpy.patch
@@ -1,4 +1,4 @@ 
-From d49b4fb8063ecd89617587e5ea566cc9da9393ef Mon Sep 17 00:00:00 2001
+From ecfc8e287eb6811e42c4e2800a913822f554d7c8 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 31 Aug 2022 19:09:18 -0700
 Subject: [PATCH] include string.h for strncpy()
@@ -6,12 +6,13 @@  Subject: [PATCH] include string.h for strncpy()
 Upstream-Status: Pending
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  interface.c | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/interface.c b/interface.c
-index 65bdff0..5228db9 100644
+index 29229ad..9a83c36 100644
 --- a/interface.c
 +++ b/interface.c
 @@ -5,6 +5,7 @@
@@ -22,6 +23,3 @@  index 65bdff0..5228db9 100644
  #include "interface.h"
  
  struct interface {
--- 
-2.37.3
-
diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-makefile-use-conditional-assignment-for-KBUILD_OUTPU.patch b/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-makefile-use-conditional-assignment-for-KBUILD_OUTPU.patch
deleted file mode 100644
index fb5190652196..000000000000
--- a/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-makefile-use-conditional-assignment-for-KBUILD_OUTPU.patch
+++ /dev/null
@@ -1,42 +0,0 @@ 
-From dfd38cb29c0768692f886d3ab9158bd2b3132582 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Tue, 22 Nov 2022 15:20:48 +0800
-Subject: [PATCH] makefile: use conditional assignment for KBUILD_OUTPUT
-
-Refer [1],from make 4.4, all variables that are marked as export will
-also be passed to the shell started by the shell function. use "=" will
-make KBUILD_OUTPUT always empty for shell function, use "?=" to make
-"export KBUILD_OUTPUT" in enrironment can work.
-
-[snip of 4.4 NEWS]
-* WARNING: Backward-incompatibility!
-   Previously makefile variables marked as export were not exported to commands
-   started by the $(shell ...) function.  Now, all exported variables are
-   exported to $(shell ...).
-[snip]
-
-[1] https://git.savannah.gnu.org/cgit/make.git/tree/NEWS?h=4.4&id=ed493f6c9116cc217b99c2cfa6a95f15803235a2#n74
-
-Upstream-Status: Submitted [linuxptp-devel@lists.sourceforge.net]
-
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
----
- makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/makefile b/makefile
-index 529d8a0..3db60fa 100644
---- a/makefile
-+++ b/makefile
-@@ -15,7 +15,7 @@
- # with this program; if not, write to the Free Software Foundation, Inc.,
- # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- 
--KBUILD_OUTPUT =
-+KBUILD_OUTPUT ?=
- 
- DEBUG	=
- CC	?= $(CROSS_COMPILE)gcc
--- 
-2.25.1
-
diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp/Use-cross-cpp-in-incdefs.patch b/meta-oe/recipes-connectivity/linuxptp/linuxptp/Use-cross-cpp-in-incdefs.patch
index 876088649e3d..9c87851e48ef 100644
--- a/meta-oe/recipes-connectivity/linuxptp/linuxptp/Use-cross-cpp-in-incdefs.patch
+++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp/Use-cross-cpp-in-incdefs.patch
@@ -1,4 +1,4 @@ 
-From 8a4cad5e2f2cbb6a34bdc6e877fe499502b8c4c8 Mon Sep 17 00:00:00 2001
+From be8808005772da48c052cf34a343a6d140541f6a Mon Sep 17 00:00:00 2001
 From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
 Date: Fri, 23 Dec 2016 18:12:29 +0100
 Subject: [PATCH] linuxptp: Use cross cpp in incdefs
@@ -8,11 +8,13 @@  we need to ensure we use correct setttings from toolchain
 
 Upstream-Status: Inappropriate [OE-Specific]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
 
- makefile | 2 +-
+---
+ incdefs.sh | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/incdefs.sh b/incdefs.sh
+index a9e94f7..dd1692f 100755
 --- a/incdefs.sh
 +++ b/incdefs.sh
 @@ -27,7 +27,7 @@ user_flags()
diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch b/meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch
index 55ce4c9a9015..d4d6fac0ee5c 100644
--- a/meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch
+++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch
@@ -1,4 +1,4 @@ 
-From af485c638c61fa883212ea424e676fbf90bee594 Mon Sep 17 00:00:00 2001
+From 886bca11ff8fcc55386b6e4397b13e64950f93fb Mon Sep 17 00:00:00 2001
 From: Otavio Salvador <otavio@ossystems.com.br>
 Date: Tue, 1 Jul 2014 17:37:31 -0300
 Subject: [PATCH] build: Allow CC and prefix to be overriden
@@ -6,16 +6,17 @@  Subject: [PATCH] build: Allow CC and prefix to be overriden
 Upstream-Status: Pending
 
 Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
 ---
- makefile |    4 ++--
+ makefile | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/makefile b/makefile
-index 22e7d0d..809cc8f 100644
+index 3e3b8b3..5c1a1f9 100644
 --- a/makefile
 +++ b/makefile
 @@ -18,7 +18,7 @@
- KBUILD_OUTPUT =
+ KBUILD_OUTPUT ?=
  
  DEBUG	=
 -CC	= $(CROSS_COMPILE)gcc
@@ -32,6 +33,3 @@  index 22e7d0d..809cc8f 100644
  sbindir	= $(prefix)/sbin
  mandir	= $(prefix)/man
  man8dir	= $(mandir)/man8
--- 
-1.7.10.4
-
diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp_3.1.1.bb b/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb
similarity index 59%
rename from meta-oe/recipes-connectivity/linuxptp/linuxptp_3.1.1.bb
rename to meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb
index 5903cb38ca4e..0b559df8c3c1 100644
--- a/meta-oe/recipes-connectivity/linuxptp/linuxptp_3.1.1.bb
+++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb
@@ -1,19 +1,23 @@ 
-DESCRIPTION = "Precision Time Protocol (PTP) according to IEEE standard 1588 for Linux"
+SUMMARY = "linuxptp package for linux"
+DESCRIPTION = "Precision Time Protocol (PTP) according to IEEE standard 1588 \
+for Linux"
 HOMEPAGE = "http://linuxptp.sourceforge.net/"
 LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-SRC_URI = "http://sourceforge.net/projects/linuxptp/files/v3.1/linuxptp-${PV}.tgz \
+LINUXPTP_SRC_URI = "http://sourceforge.net/projects/linuxptp"
+
+SRC_URI = "${LINUXPTP_SRC_URI}/files/v4.1/linuxptp-${PV}.tgz \
            file://build-Allow-CC-and-prefix-to-be-overriden.patch \
            file://Use-cross-cpp-in-incdefs.patch \
            file://0001-include-string.h-for-strncpy.patch \
-           file://0001-makefile-use-conditional-assignment-for-KBUILD_OUTPU.patch \
            "
 
-UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/linuxptp/files/"
-UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
+SRC_URI[md5sum] = "1db8699fc155965341759be5e5aad938"
+SRC_URI[sha256sum] = "e1743d44f8208897e30895da3579e670ff919b914feb4b5a949f3e421ddde535"
 
-SRC_URI[sha256sum] = "94d6855f9b7f2d8e9b0ca6d384e3fae6226ce6fc012dbad02608bdef3be1c0d9"
+UPSTREAM_CHECK_URI = "${LINUXPTP_SRC_URI}/files/"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
 
 EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} EXTRA_CFLAGS='${CFLAGS}' mandir=${mandir}"
 
@@ -24,10 +28,10 @@  do_install() {
 
     # Install example configs from source tree
     install -d ${D}${docdir}/${PN}
-    cp -R --no-dereference --preserve=mode,links ${S}/configs ${D}${docdir}/${PN}
+    cp -R --no-dereference --preserve=mode,links ${S}/configs \
+        ${D}${docdir}/${PN}
 }
 
 PACKAGES =+ "${PN}-configs"
 
-FILES:${PN}-configs = "${docdir}"
-FILES:${PN}-doc = "${mandir}"
+FILES:${PN}-configs += "${docdir}"