All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] package_deb/ipk/rpm: Add more minimal do_build dependencies back
@ 2022-01-04 14:16 Richard Purdie
  2022-01-04 14:16 ` [PATCH 2/4] meson: Handle qemu riscv issues Richard Purdie
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Richard Purdie @ 2022-01-04 14:16 UTC (permalink / raw)
  To: openembedded-core

The dependencies for do_build became a little too minimal after the
removal of recrdeptask since "bitbake go" would not package go-runtime
despite it being in DEPENDS and the resulting package having a dependency
on it.

A reasonable compromise is probably rdeptask instead of recrdeptask
which is a lot lower overhead but makes the build target more useful
and importantly, lets world builds do what you'd expect them to.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/package_deb.bbclass | 1 +
 meta/classes/package_ipk.bbclass | 1 +
 meta/classes/package_rpm.bbclass | 1 +
 3 files changed, 3 insertions(+)

diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 1ae6393d37d..2e75e222bcb 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -316,6 +316,7 @@ do_package_write_deb[dirs] = "${PKGWRITEDIRDEB}"
 do_package_write_deb[cleandirs] = "${PKGWRITEDIRDEB}"
 do_package_write_deb[depends] += "${@oe.utils.build_depends_string(d.getVar('PACKAGE_WRITE_DEPS'), 'do_populate_sysroot')}"
 addtask package_write_deb after do_packagedata do_package do_deploy_source_date_epoch before do_build
+do_build[rdeptask] += "do_package_write_deb"
 
 PACKAGEINDEXDEPS += "dpkg-native:do_populate_sysroot"
 PACKAGEINDEXDEPS += "apt-native:do_populate_sysroot"
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 902b7f94c84..f67cb0e5c90 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -275,6 +275,7 @@ do_package_write_ipk[dirs] = "${PKGWRITEDIRIPK}"
 do_package_write_ipk[cleandirs] = "${PKGWRITEDIRIPK}"
 do_package_write_ipk[depends] += "${@oe.utils.build_depends_string(d.getVar('PACKAGE_WRITE_DEPS'), 'do_populate_sysroot')}"
 addtask package_write_ipk after do_packagedata do_package do_deploy_source_date_epoch before do_build
+do_build[rdeptask] += "do_package_write_ipk"
 
 PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot"
 PACKAGEINDEXDEPS += "opkg-native:do_populate_sysroot"
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index b0754421a33..e9ff1f7e65c 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -749,6 +749,7 @@ do_package_write_rpm[dirs] = "${PKGWRITEDIRRPM}"
 do_package_write_rpm[cleandirs] = "${PKGWRITEDIRRPM}"
 do_package_write_rpm[depends] += "${@oe.utils.build_depends_string(d.getVar('PACKAGE_WRITE_DEPS'), 'do_populate_sysroot')}"
 addtask package_write_rpm after do_packagedata do_package do_deploy_source_date_epoch before do_build
+do_build[rdeptask] += "do_package_write_rpm"
 
 PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot"
 PACKAGEINDEXDEPS += "createrepo-c-native:do_populate_sysroot"
-- 
2.32.0



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

* [PATCH 2/4] meson: Handle qemu riscv issues
  2022-01-04 14:16 [PATCH 1/4] package_deb/ipk/rpm: Add more minimal do_build dependencies back Richard Purdie
@ 2022-01-04 14:16 ` Richard Purdie
  2022-01-04 14:16 ` [PATCH 3/4] openssl: Add reproducibility fix Richard Purdie
  2022-01-04 14:16 ` [PATCH 4/4] webkitgtk: " Richard Purdie
  2 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2022-01-04 14:16 UTC (permalink / raw)
  To: openembedded-core

In qemu, they merged the 32 and 64 bit riscv variants into one target for meson
purposes but this isn't officially supported by upstream meson. In normal builds
this would just be a warning but in OE, this is fatal.

Avoid the fatal errors for now and build as qemu intended whilst this is resolved
by the upstreams.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 .../0001-Make-CPU-family-warnings-fatal.patch | 28 +++++++++++--------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
index c5be526b103..848dccfbe72 100644
--- a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
+++ b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
@@ -11,30 +11,34 @@ Signed-off-by: Ross Burton <ross.burton@intel.com>
  mesonbuild/environment.py | 4 +---
  2 files changed, 2 insertions(+), 4 deletions(-)
 
-diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
-index 307aac3..66fb7ec 100644
---- a/mesonbuild/envconfig.py
-+++ b/mesonbuild/envconfig.py
-@@ -267,7 +267,7 @@ class MachineInfo(HoldableObject):
+Index: meson-0.60.2/mesonbuild/envconfig.py
+===================================================================
+--- meson-0.60.2.orig/mesonbuild/envconfig.py
++++ meson-0.60.2/mesonbuild/envconfig.py
+@@ -266,8 +266,8 @@ class MachineInfo(HoldableObject):
+                 'but is missing {}.'.format(minimum_literal - set(literal)))
  
          cpu_family = literal['cpu_family']
-         if cpu_family not in known_cpu_families:
+-        if cpu_family not in known_cpu_families:
 -            mlog.warning(f'Unknown CPU family {cpu_family}, please report this at https://github.com/mesonbuild/meson/issues/new')
++        if cpu_family not in known_cpu_families and cpu_family != "riscv":
 +            raise EnvironmentException('Unknown CPU family {}, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.'.format(cpu_family))
  
          endian = literal['endian']
          if endian not in ('little', 'big'):
-diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index 71286a5..179917e 100644
---- a/mesonbuild/environment.py
-+++ b/mesonbuild/environment.py
-@@ -352,9 +352,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
+Index: meson-0.60.2/mesonbuild/environment.py
+===================================================================
+--- meson-0.60.2.orig/mesonbuild/environment.py
++++ meson-0.60.2/mesonbuild/environment.py
+@@ -354,10 +354,8 @@ def detect_cpu_family(compilers: Compile
+         if any_compiler_has_define(compilers, '__64BIT__'):
              trial = 'ppc64'
  
-     if trial not in known_cpu_families:
+-    if trial not in known_cpu_families:
 -        mlog.warning(f'Unknown CPU family {trial!r}, please report this at '
 -                     'https://github.com/mesonbuild/meson/issues/new with the '
 -                     'output of `uname -a` and `cat /proc/cpuinfo`')
++    if trial not in known_cpu_families and trail != "riscv":
 +        raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial)
  
      return trial
-- 
2.32.0



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

* [PATCH 3/4] openssl: Add reproducibility fix
  2022-01-04 14:16 [PATCH 1/4] package_deb/ipk/rpm: Add more minimal do_build dependencies back Richard Purdie
  2022-01-04 14:16 ` [PATCH 2/4] meson: Handle qemu riscv issues Richard Purdie
@ 2022-01-04 14:16 ` Richard Purdie
  2022-01-04 14:16 ` [PATCH 4/4] webkitgtk: " Richard Purdie
  2 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2022-01-04 14:16 UTC (permalink / raw)
  To: openembedded-core

When the date rolled from one year to another, it highlighted a reproducibility
issue in openssl. Patch a workaround for this to avoid autobuilder failures. Help
submitting upstream welcome.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 .../openssl/openssl/reproducibility.patch     | 22 +++++++++++++++++++
 .../openssl/openssl_3.0.1.bb                  |  1 +
 2 files changed, 23 insertions(+)
 create mode 100644 meta/recipes-connectivity/openssl/openssl/reproducibility.patch

diff --git a/meta/recipes-connectivity/openssl/openssl/reproducibility.patch b/meta/recipes-connectivity/openssl/openssl/reproducibility.patch
new file mode 100644
index 00000000000..8accbc9df20
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl/reproducibility.patch
@@ -0,0 +1,22 @@
+Using localtime() means the output can depend on the timezone of the build machine.
+Using gmtime() is safer. For complete reproducibility use SOURCE_DATE_EPOCH if set.
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Upstream-Status: Pending [should be suitable]
+
+Index: openssl-3.0.1/apps/progs.pl
+===================================================================
+--- openssl-3.0.1.orig/apps/progs.pl
++++ openssl-3.0.1/apps/progs.pl
+@@ -21,7 +21,10 @@ die "Unrecognised option, must be -C or
+ my %commands     = ();
+ my $cmdre        = qr/^\s*int\s+([a-z_][a-z0-9_]*)_main\(\s*int\s+argc\s*,/;
+ my $apps_openssl = shift @ARGV;
+-my $YEAR         = [localtime()]->[5] + 1900;
++my $YEAR         = [gmtime()]->[5] + 1900;
++if (defined($ENV{SOURCE_DATE_EPOCH}) && $ENV{SOURCE_DATE_EPOCH} !~ /\D/) {
++    $YEAR = [gmtime($ENV{SOURCE_DATE_EPOCH})]->[5] + 1900;
++}
+ 
+ # because the program apps/openssl has object files as sources, and
+ # they then have the corresponding C files as source, we need to chain
diff --git a/meta/recipes-connectivity/openssl/openssl_3.0.1.bb b/meta/recipes-connectivity/openssl/openssl_3.0.1.bb
index 162435480c4..7727ec43e87 100644
--- a/meta/recipes-connectivity/openssl/openssl_3.0.1.bb
+++ b/meta/recipes-connectivity/openssl/openssl_3.0.1.bb
@@ -12,6 +12,7 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
            file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \
            file://afalg.patch \
            file://0001-Configure-do-not-tweak-mips-cflags.patch \
+           file://reproducibility.patch \
            "
 
 SRC_URI:append:class-nativesdk = " \
-- 
2.32.0



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

* [PATCH 4/4] webkitgtk: Add reproducibility fix
  2022-01-04 14:16 [PATCH 1/4] package_deb/ipk/rpm: Add more minimal do_build dependencies back Richard Purdie
  2022-01-04 14:16 ` [PATCH 2/4] meson: Handle qemu riscv issues Richard Purdie
  2022-01-04 14:16 ` [PATCH 3/4] openssl: Add reproducibility fix Richard Purdie
@ 2022-01-04 14:16 ` Richard Purdie
  2022-01-04 15:44   ` [OE-core] " Quentin Schulz
  2022-01-04 16:25   ` Khem Raj
  2 siblings, 2 replies; 6+ messages in thread
From: Richard Purdie @ 2022-01-04 14:16 UTC (permalink / raw)
  To: openembedded-core

When the date rolled from one year to another this highlighted a reproducibility
issue. This could be better fixed by using SOURCE_DATE_EPOCH from the environment
but I'm not sure how you do that in ruby. Help from someone with that knowledge
to submit that upstream very welcome.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 .../webkit/webkitgtk/reproducibility.patch    | 22 +++++++++++++++++++
 meta/recipes-sato/webkit/webkitgtk_2.34.2.bb  |  1 +
 2 files changed, 23 insertions(+)
 create mode 100644 meta/recipes-sato/webkit/webkitgtk/reproducibility.patch

diff --git a/meta/recipes-sato/webkit/webkitgtk/reproducibility.patch b/meta/recipes-sato/webkit/webkitgtk/reproducibility.patch
new file mode 100644
index 00000000000..e866a1a193a
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/reproducibility.patch
@@ -0,0 +1,22 @@
+Injection a year based on the current date isn't reproducible. Hack this
+to a specific year for now for reproducibilty and to avoid autobuilder failures.
+
+The correct fix would be to use SOURCE_DATE_EPOCH from the environment and
+then this could be submitted upstream, sadly my ruby isn't up to that.
+
+Upstream-Status: Pending [could be reworked]
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Index: webkitgtk-2.34.2/Source/JavaScriptCore/generator/GeneratedFile.rb
+===================================================================
+--- webkitgtk-2.34.2.orig/Source/JavaScriptCore/generator/GeneratedFile.rb
++++ webkitgtk-2.34.2/Source/JavaScriptCore/generator/GeneratedFile.rb
+@@ -25,7 +25,7 @@ require 'date'
+ require 'digest'
+ 
+ $LICENSE = <<-EOF
+-Copyright (C) #{Date.today.year} Apple Inc. All rights reserved.
++Copyright (C) 2021 Apple Inc. All rights reserved.
+ 
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb b/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
index a9b151e3c3c..aa071395227 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
@@ -18,6 +18,7 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
            file://reduce-memory-overheads.patch \
            file://musl-lower-stack-usage.patch \
            file://0001-Fix-build-without-opengl-or-es.patch \
+           file://reproducibility.patch \
            "
 
 SRC_URI[sha256sum] = "584677d6e7cae12e27cdcc8e05b4cf73b54849a24afc3d7a40cec91016deff00"
-- 
2.32.0



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

* Re: [OE-core] [PATCH 4/4] webkitgtk: Add reproducibility fix
  2022-01-04 14:16 ` [PATCH 4/4] webkitgtk: " Richard Purdie
@ 2022-01-04 15:44   ` Quentin Schulz
  2022-01-04 16:25   ` Khem Raj
  1 sibling, 0 replies; 6+ messages in thread
From: Quentin Schulz @ 2022-01-04 15:44 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core

Hi Richard,

On 1/4/22 15:16, Richard Purdie wrote:
> When the date rolled from one year to another this highlighted a reproducibility
> issue. This could be better fixed by using SOURCE_DATE_EPOCH from the environment
> but I'm not sure how you do that in ruby. Help from someone with that knowledge
> to submit that upstream very welcome.
> 

Small side note, it seems like "copyright years" aren't actually any 
useful, see https://hynek.me/til/copyright-years/ and 
https://www.linuxfoundation.org/blog/copyright-notices-in-open-source-software-projects/.

I guess we can just notify the project to stop using the date entirely 
in the copyright to avoid those issues and hope they'll just agree :)

Cheers,
Quentin


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

* Re: [OE-core] [PATCH 4/4] webkitgtk: Add reproducibility fix
  2022-01-04 14:16 ` [PATCH 4/4] webkitgtk: " Richard Purdie
  2022-01-04 15:44   ` [OE-core] " Quentin Schulz
@ 2022-01-04 16:25   ` Khem Raj
  1 sibling, 0 replies; 6+ messages in thread
From: Khem Raj @ 2022-01-04 16:25 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer

On Tue, Jan 4, 2022 at 6:16 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> When the date rolled from one year to another this highlighted a reproducibility
> issue. This could be better fixed by using SOURCE_DATE_EPOCH from the environment
> but I'm not sure how you do that in ruby. Help from someone with that knowledge
> to submit that upstream very welcome.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  .../webkit/webkitgtk/reproducibility.patch    | 22 +++++++++++++++++++
>  meta/recipes-sato/webkit/webkitgtk_2.34.2.bb  |  1 +
>  2 files changed, 23 insertions(+)
>  create mode 100644 meta/recipes-sato/webkit/webkitgtk/reproducibility.patch
>
> diff --git a/meta/recipes-sato/webkit/webkitgtk/reproducibility.patch b/meta/recipes-sato/webkit/webkitgtk/reproducibility.patch
> new file mode 100644
> index 00000000000..e866a1a193a
> --- /dev/null
> +++ b/meta/recipes-sato/webkit/webkitgtk/reproducibility.patch
> @@ -0,0 +1,22 @@
> +Injection a year based on the current date isn't reproducible. Hack this
> +to a specific year for now for reproducibilty and to avoid autobuilder failures.
> +
> +The correct fix would be to use SOURCE_DATE_EPOCH from the environment and
> +then this could be submitted upstream, sadly my ruby isn't up to that.
> +
> +Upstream-Status: Pending [could be reworked]
> +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> +
> +Index: webkitgtk-2.34.2/Source/JavaScriptCore/generator/GeneratedFile.rb
> +===================================================================
> +--- webkitgtk-2.34.2.orig/Source/JavaScriptCore/generator/GeneratedFile.rb
> ++++ webkitgtk-2.34.2/Source/JavaScriptCore/generator/GeneratedFile.rb
> +@@ -25,7 +25,7 @@ require 'date'
> + require 'digest'
> +
> + $LICENSE = <<-EOF
> +-Copyright (C) #{Date.today.year} Apple Inc. All rights reserved.
> ++Copyright (C) 2021 Apple Inc. All rights reserved.

perhaps eliminating the year completely is better.

> +
> + Redistribution and use in source and binary forms, with or without
> + modification, are permitted provided that the following conditions
> diff --git a/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb b/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
> index a9b151e3c3c..aa071395227 100644
> --- a/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
> +++ b/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
> @@ -18,6 +18,7 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
>             file://reduce-memory-overheads.patch \
>             file://musl-lower-stack-usage.patch \
>             file://0001-Fix-build-without-opengl-or-es.patch \
> +           file://reproducibility.patch \
>             "
>
>  SRC_URI[sha256sum] = "584677d6e7cae12e27cdcc8e05b4cf73b54849a24afc3d7a40cec91016deff00"
> --
> 2.32.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#160165): https://lists.openembedded.org/g/openembedded-core/message/160165
> Mute This Topic: https://lists.openembedded.org/mt/88190252/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

end of thread, other threads:[~2022-01-04 16:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-04 14:16 [PATCH 1/4] package_deb/ipk/rpm: Add more minimal do_build dependencies back Richard Purdie
2022-01-04 14:16 ` [PATCH 2/4] meson: Handle qemu riscv issues Richard Purdie
2022-01-04 14:16 ` [PATCH 3/4] openssl: Add reproducibility fix Richard Purdie
2022-01-04 14:16 ` [PATCH 4/4] webkitgtk: " Richard Purdie
2022-01-04 15:44   ` [OE-core] " Quentin Schulz
2022-01-04 16:25   ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.