Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] opkg: backport patch to fix build when sha256 support is enabled
@ 2016-07-13 10:19 André Draszik
  2016-07-13 10:22 ` [PATCH v2] " André Draszik
  2016-07-13 10:23 ` [PATCH] " Burton, Ross
  0 siblings, 2 replies; 5+ messages in thread
From: André Draszik @ 2016-07-13 10:19 UTC (permalink / raw)
  To: openembedded-core

---
 ...-implicit-declaration-of-release_get_sha2.patch | 78 ++++++++++++++++++++++
 meta/recipes-devtools/opkg/opkg_0.3.2.bb           |  1 +
 2 files changed, 79 insertions(+)
 create mode 100644 meta/recipes-devtools/opkg/opkg/0001-release-fix-implicit-declaration-of-release_get_sha2.patch

diff --git a/meta/recipes-devtools/opkg/opkg/0001-release-fix-implicit-declaration-of-release_get_sha2.patch b/meta/recipes-devtools/opkg/opkg/0001-release-fix-implicit-declaration-of-release_get_sha2.patch
new file mode 100644
index 0000000..57f5fe8
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/0001-release-fix-implicit-declaration-of-release_get_sha2.patch
@@ -0,0 +1,78 @@
+From 3fe6c043f5d62710f86ca92692b02f4ffd3bb5c9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <ad@andred.net>
+Date: Fri, 24 Jun 2016 13:18:52 +0100
+Subject: [PATCH] release: fix implicit declaration of release_get_sha256()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+| ../../opkg-0.3.2/libopkg/release.c: In function ‘release_verify_file’:
+| ../../opkg-0.3.2/libopkg/release.c:120:26: warning: implicit declaration of function ‘release_get_sha256’ [-Wimplicit-function-declaration]
+|      const char *sha256 = release_get_sha256(release, pathname);
+|                           ^
+| ../../opkg-0.3.2/libopkg/release.c:120:26: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
+| ../../opkg-0.3.2/libopkg/release.c: At top level:
+| ../../opkg-0.3.2/libopkg/release.c:324:13: error: conflicting types for ‘release_get_sha256’
+|  const char *release_get_sha256(release_t * release, const char *pathname)
+|              ^
+| ../../opkg-0.3.2/libopkg/release.c:120:26: note: previous implicit declaration of ‘release_get_sha256’ was here
+|      const char *sha256 = release_get_sha256(release, pathname);
+|                           ^
+
+At the same time, make it static, too, similar to
+release_get_md5().
+
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+---
+Upstream-Status: Backport
+
+ libopkg/release.c | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/libopkg/release.c b/libopkg/release.c
+index b6aceb4..7db0bd4 100644
+--- a/libopkg/release.c
++++ b/libopkg/release.c
+@@ -109,6 +109,20 @@ static const char *release_get_md5(release_t * release, const char *pathname)
+     return '\0';
+ }
+ 
++#ifdef HAVE_SHA256
++static const char *release_get_sha256(release_t * release, const char *pathname)
++{
++    const cksum_t *cksum;
++
++    if (release->sha256sums) {
++        cksum = cksum_list_find(release->sha256sums, pathname);
++        return cksum->value;
++    }
++
++    return '\0';
++}
++#endif
++
+ int release_verify_file(release_t * release, const char *file_name,
+                         const char *pathname)
+ {
+@@ -319,17 +333,3 @@ int release_download(release_t * release, pkg_src_t * dist, char *lists_dir,
+ 
+     return ret;
+ }
+-
+-#ifdef HAVE_SHA256
+-const char *release_get_sha256(release_t * release, const char *pathname)
+-{
+-    const cksum_t *cksum;
+-
+-    if (release->sha256sums) {
+-        cksum = cksum_list_find(release->sha256sums, pathname);
+-        return cksum->value;
+-    }
+-
+-    return '\0';
+-}
+-#endif
+-- 
+2.8.1
+
diff --git a/meta/recipes-devtools/opkg/opkg_0.3.2.bb b/meta/recipes-devtools/opkg/opkg_0.3.2.bb
index 0251b7d..5731939 100644
--- a/meta/recipes-devtools/opkg/opkg_0.3.2.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.3.2.bb
@@ -15,6 +15,7 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz
            file://opkg-configure.service \
            file://opkg.conf \
            file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
+           file://0001-release-fix-implicit-declaration-of-release_get_sha2.patch \
 "
 
 SRC_URI[md5sum] = "b2cc1baa89d0b3d49e63ab002fd2e0a6"
-- 
2.8.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2] opkg: backport patch to fix build when sha256 support is enabled
  2016-07-13 10:19 [PATCH] opkg: backport patch to fix build when sha256 support is enabled André Draszik
@ 2016-07-13 10:22 ` André Draszik
  2016-07-13 10:25   ` Burton, Ross
  2016-07-13 10:23 ` [PATCH] " Burton, Ross
  1 sibling, 1 reply; 5+ messages in thread
From: André Draszik @ 2016-07-13 10:22 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: André Draszik <git@andred.net>
---
 ...-implicit-declaration-of-release_get_sha2.patch | 78 ++++++++++++++++++++++
 meta/recipes-devtools/opkg/opkg_0.3.2.bb           |  1 +
 2 files changed, 79 insertions(+)
 create mode 100644 meta/recipes-devtools/opkg/opkg/0001-release-fix-implicit-declaration-of-release_get_sha2.patch

diff --git a/meta/recipes-devtools/opkg/opkg/0001-release-fix-implicit-declaration-of-release_get_sha2.patch b/meta/recipes-devtools/opkg/opkg/0001-release-fix-implicit-declaration-of-release_get_sha2.patch
new file mode 100644
index 0000000..57f5fe8
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/0001-release-fix-implicit-declaration-of-release_get_sha2.patch
@@ -0,0 +1,78 @@
+From 3fe6c043f5d62710f86ca92692b02f4ffd3bb5c9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <ad@andred.net>
+Date: Fri, 24 Jun 2016 13:18:52 +0100
+Subject: [PATCH] release: fix implicit declaration of release_get_sha256()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+| ../../opkg-0.3.2/libopkg/release.c: In function ‘release_verify_file’:
+| ../../opkg-0.3.2/libopkg/release.c:120:26: warning: implicit declaration of function ‘release_get_sha256’ [-Wimplicit-function-declaration]
+|      const char *sha256 = release_get_sha256(release, pathname);
+|                           ^
+| ../../opkg-0.3.2/libopkg/release.c:120:26: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
+| ../../opkg-0.3.2/libopkg/release.c: At top level:
+| ../../opkg-0.3.2/libopkg/release.c:324:13: error: conflicting types for ‘release_get_sha256’
+|  const char *release_get_sha256(release_t * release, const char *pathname)
+|              ^
+| ../../opkg-0.3.2/libopkg/release.c:120:26: note: previous implicit declaration of ‘release_get_sha256’ was here
+|      const char *sha256 = release_get_sha256(release, pathname);
+|                           ^
+
+At the same time, make it static, too, similar to
+release_get_md5().
+
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+---
+Upstream-Status: Backport
+
+ libopkg/release.c | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/libopkg/release.c b/libopkg/release.c
+index b6aceb4..7db0bd4 100644
+--- a/libopkg/release.c
++++ b/libopkg/release.c
+@@ -109,6 +109,20 @@ static const char *release_get_md5(release_t * release, const char *pathname)
+     return '\0';
+ }
+ 
++#ifdef HAVE_SHA256
++static const char *release_get_sha256(release_t * release, const char *pathname)
++{
++    const cksum_t *cksum;
++
++    if (release->sha256sums) {
++        cksum = cksum_list_find(release->sha256sums, pathname);
++        return cksum->value;
++    }
++
++    return '\0';
++}
++#endif
++
+ int release_verify_file(release_t * release, const char *file_name,
+                         const char *pathname)
+ {
+@@ -319,17 +333,3 @@ int release_download(release_t * release, pkg_src_t * dist, char *lists_dir,
+ 
+     return ret;
+ }
+-
+-#ifdef HAVE_SHA256
+-const char *release_get_sha256(release_t * release, const char *pathname)
+-{
+-    const cksum_t *cksum;
+-
+-    if (release->sha256sums) {
+-        cksum = cksum_list_find(release->sha256sums, pathname);
+-        return cksum->value;
+-    }
+-
+-    return '\0';
+-}
+-#endif
+-- 
+2.8.1
+
diff --git a/meta/recipes-devtools/opkg/opkg_0.3.2.bb b/meta/recipes-devtools/opkg/opkg_0.3.2.bb
index 0251b7d..5731939 100644
--- a/meta/recipes-devtools/opkg/opkg_0.3.2.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.3.2.bb
@@ -15,6 +15,7 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz
            file://opkg-configure.service \
            file://opkg.conf \
            file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
+           file://0001-release-fix-implicit-declaration-of-release_get_sha2.patch \
 "
 
 SRC_URI[md5sum] = "b2cc1baa89d0b3d49e63ab002fd2e0a6"
-- 
2.8.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] opkg: backport patch to fix build when sha256 support is enabled
  2016-07-13 10:19 [PATCH] opkg: backport patch to fix build when sha256 support is enabled André Draszik
  2016-07-13 10:22 ` [PATCH v2] " André Draszik
@ 2016-07-13 10:23 ` Burton, Ross
  2016-07-13 12:04   ` André Draszik
  1 sibling, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2016-07-13 10:23 UTC (permalink / raw)
  To: André Draszik; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 636 bytes --]

On 13 July 2016 at 11:19, André Draszik <git@andred.net> wrote:

> +++
> b/meta/recipes-devtools/opkg/opkg/0001-release-fix-implicit-declaration-of-release_get_sha2.patch
> @@ -0,0 +1,78 @@
> +From 3fe6c043f5d62710f86ca92692b02f4ffd3bb5c9 Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <ad@andred.net>
> +Date: Fri, 24 Jun 2016 13:18:52 +0100
> +Subject: [PATCH] release: fix implicit declaration of release_get_sha256()
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
>

This patch needs an explanation, signed-off-by, and upstream-status.

Ross

[-- Attachment #2: Type: text/html, Size: 1087 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] opkg: backport patch to fix build when sha256 support is enabled
  2016-07-13 10:22 ` [PATCH v2] " André Draszik
@ 2016-07-13 10:25   ` Burton, Ross
  0 siblings, 0 replies; 5+ messages in thread
From: Burton, Ross @ 2016-07-13 10:25 UTC (permalink / raw)
  To: André Draszik; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 4774 bytes --]

That was quicker than I was expecting, thanks :)

On 13 July 2016 at 11:22, André Draszik <git@andred.net> wrote:

> Signed-off-by: André Draszik <git@andred.net>
> ---
>  ...-implicit-declaration-of-release_get_sha2.patch | 78
> ++++++++++++++++++++++
>  meta/recipes-devtools/opkg/opkg_0.3.2.bb           |  1 +
>  2 files changed, 79 insertions(+)
>  create mode 100644
> meta/recipes-devtools/opkg/opkg/0001-release-fix-implicit-declaration-of-release_get_sha2.patch
>
> diff --git
> a/meta/recipes-devtools/opkg/opkg/0001-release-fix-implicit-declaration-of-release_get_sha2.patch
> b/meta/recipes-devtools/opkg/opkg/0001-release-fix-implicit-declaration-of-release_get_sha2.patch
> new file mode 100644
> index 0000000..57f5fe8
> --- /dev/null
> +++
> b/meta/recipes-devtools/opkg/opkg/0001-release-fix-implicit-declaration-of-release_get_sha2.patch
> @@ -0,0 +1,78 @@
> +From 3fe6c043f5d62710f86ca92692b02f4ffd3bb5c9 Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <ad@andred.net>
> +Date: Fri, 24 Jun 2016 13:18:52 +0100
> +Subject: [PATCH] release: fix implicit declaration of release_get_sha256()
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +| ../../opkg-0.3.2/libopkg/release.c: In function ‘release_verify_file’:
> +| ../../opkg-0.3.2/libopkg/release.c:120:26: warning: implicit
> declaration of function ‘release_get_sha256’
> [-Wimplicit-function-declaration]
> +|      const char *sha256 = release_get_sha256(release, pathname);
> +|                           ^
> +| ../../opkg-0.3.2/libopkg/release.c:120:26: warning: initialization
> makes pointer from integer without a cast [-Wint-conversion]
> +| ../../opkg-0.3.2/libopkg/release.c: At top level:
> +| ../../opkg-0.3.2/libopkg/release.c:324:13: error: conflicting types for
> ‘release_get_sha256’
> +|  const char *release_get_sha256(release_t * release, const char
> *pathname)
> +|              ^
> +| ../../opkg-0.3.2/libopkg/release.c:120:26: note: previous implicit
> declaration of ‘release_get_sha256’ was here
> +|      const char *sha256 = release_get_sha256(release, pathname);
> +|                           ^
> +
> +At the same time, make it static, too, similar to
> +release_get_md5().
> +
> +Signed-off-by: André Draszik <adraszik@tycoint.com>
> +Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
> +---
> +Upstream-Status: Backport
> +
> + libopkg/release.c | 28 ++++++++++++++--------------
> + 1 file changed, 14 insertions(+), 14 deletions(-)
> +
> +diff --git a/libopkg/release.c b/libopkg/release.c
> +index b6aceb4..7db0bd4 100644
> +--- a/libopkg/release.c
> ++++ b/libopkg/release.c
> +@@ -109,6 +109,20 @@ static const char *release_get_md5(release_t *
> release, const char *pathname)
> +     return '\0';
> + }
> +
> ++#ifdef HAVE_SHA256
> ++static const char *release_get_sha256(release_t * release, const char
> *pathname)
> ++{
> ++    const cksum_t *cksum;
> ++
> ++    if (release->sha256sums) {
> ++        cksum = cksum_list_find(release->sha256sums, pathname);
> ++        return cksum->value;
> ++    }
> ++
> ++    return '\0';
> ++}
> ++#endif
> ++
> + int release_verify_file(release_t * release, const char *file_name,
> +                         const char *pathname)
> + {
> +@@ -319,17 +333,3 @@ int release_download(release_t * release, pkg_src_t
> * dist, char *lists_dir,
> +
> +     return ret;
> + }
> +-
> +-#ifdef HAVE_SHA256
> +-const char *release_get_sha256(release_t * release, const char *pathname)
> +-{
> +-    const cksum_t *cksum;
> +-
> +-    if (release->sha256sums) {
> +-        cksum = cksum_list_find(release->sha256sums, pathname);
> +-        return cksum->value;
> +-    }
> +-
> +-    return '\0';
> +-}
> +-#endif
> +--
> +2.8.1
> +
> diff --git a/meta/recipes-devtools/opkg/opkg_0.3.2.bb
> b/meta/recipes-devtools/opkg/opkg_0.3.2.bb
> index 0251b7d..5731939 100644
> --- a/meta/recipes-devtools/opkg/opkg_0.3.2.bb
> +++ b/meta/recipes-devtools/opkg/opkg_0.3.2.bb
> @@ -15,6 +15,7 @@ SRC_URI = "
> http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz
>             file://opkg-configure.service \
>             file://opkg.conf \
>
> file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
> +
>  file://0001-release-fix-implicit-declaration-of-release_get_sha2.patch \
>  "
>
>  SRC_URI[md5sum] = "b2cc1baa89d0b3d49e63ab002fd2e0a6"
> --
> 2.8.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 6305 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] opkg: backport patch to fix build when sha256 support is enabled
  2016-07-13 10:23 ` [PATCH] " Burton, Ross
@ 2016-07-13 12:04   ` André Draszik
  0 siblings, 0 replies; 5+ messages in thread
From: André Draszik @ 2016-07-13 12:04 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

Ross,

On Mi, 2016-07-13 at 11:23 +0100, Burton, Ross wrote:
> On 13 July 2016 at 11:19, André Draszik <git@andred.net> wrote:
> 
> > +++
> > b/meta/recipes-devtools/opkg/opkg/0001-release-fix-implicit-declaration-
> > of-release_get_sha2.patch
> > @@ -0,0 +1,78 @@
> > +From 3fe6c043f5d62710f86ca92692b02f4ffd3bb5c9 Mon Sep 17 00:00:00 2001
> > +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <ad@andred.net>
> > +Date: Fri, 24 Jun 2016 13:18:52 +0100
> > +Subject: [PATCH] release: fix implicit declaration of
> > release_get_sha256()
> > +MIME-Version: 1.0
> > +Content-Type: text/plain; charset=UTF-8
> > +Content-Transfer-Encoding: 8bit
> > 
> 
> This patch needs an explanation, signed-off-by, and upstream-status.

Explanation and upstream-status are in the commit message of the actual
cherry-picked opkg patch, just not explicitly in the OE commit message.

Do you want me to copy the two into the OE commit message as well?

I've added the Signed-off-by in v2 before I saw your mail.


Cheers,
Andre'



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-07-13 12:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-13 10:19 [PATCH] opkg: backport patch to fix build when sha256 support is enabled André Draszik
2016-07-13 10:22 ` [PATCH v2] " André Draszik
2016-07-13 10:25   ` Burton, Ross
2016-07-13 10:23 ` [PATCH] " Burton, Ross
2016-07-13 12:04   ` André Draszik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox