diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2019-11-12 22:10:31 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-11-14 13:20:59 +0000 |
commit | fe8c75f72e1a75c2f964e1e41c3dad84a6b87c38 (patch) | |
tree | cac393e4b9950dc9516208d9b8a5785258b4a896 /meta/recipes-extended | |
parent | e9a9fac8c68451e6b67237e5934761238cb05796 (diff) | |
download | poky-fe8c75f72e1a75c2f964e1e41c3dad84a6b87c38.tar.gz |
mc: Fix build reproducibility
Fixes some issues with reproducible builds. Adds a patch to allow the
configure arguments to be omitted from the build and also explicitly
setting some autoconf paths that were picking up hosttools.
(From OE-Core rev: f54d60ee8f15229aa515e168b9c7d248663b48fe)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r-- | meta/recipes-extended/mc/files/0001-Add-option-to-control-configure-args.patch | 99 | ||||
-rw-r--r-- | meta/recipes-extended/mc/mc_4.8.23.bb | 5 |
2 files changed, 103 insertions, 1 deletions
diff --git a/meta/recipes-extended/mc/files/0001-Add-option-to-control-configure-args.patch b/meta/recipes-extended/mc/files/0001-Add-option-to-control-configure-args.patch new file mode 100644 index 0000000000..e76aac8161 --- /dev/null +++ b/meta/recipes-extended/mc/files/0001-Add-option-to-control-configure-args.patch | |||
@@ -0,0 +1,99 @@ | |||
1 | From a54501d3c9541bc8600225aa2d42531f93c6def7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joshua Watt <JPEWhacker@gmail.com> | ||
3 | Date: Sat, 9 Nov 2019 20:01:48 -0600 | ||
4 | Subject: [PATCH] Add option to control configure args | ||
5 | |||
6 | Embedding the configure time options into the executable can lead to | ||
7 | non-reproducible builds, since configure options often have embedded | ||
8 | paths. Add a configure time option to control if the configure args are | ||
9 | embedded so this can be disabled. | ||
10 | |||
11 | Upstream-Status: Submitted [https://midnight-commander.org/ticket/4031] | ||
12 | Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> | ||
13 | --- | ||
14 | configure.ac | 6 ++++++ | ||
15 | src/args.c | 6 ++++++ | ||
16 | src/textconf.c | 2 ++ | ||
17 | 3 files changed, 14 insertions(+) | ||
18 | |||
19 | diff --git a/configure.ac b/configure.ac | ||
20 | index 19d1a76be..a1948f6b9 100644 | ||
21 | --- a/configure.ac | ||
22 | +++ b/configure.ac | ||
23 | @@ -544,6 +544,12 @@ dnl Clarify do we really need GModule | ||
24 | AM_CONDITIONAL([HAVE_GMODULE], [test -n "$g_module_supported" && \ | ||
25 | test x"$textmode_x11_support" = x"yes" -o x"$enable_aspell" = x"yes"]) | ||
26 | |||
27 | +AC_ARG_ENABLE([configure-args], | ||
28 | + AS_HELP_STRING([--enable-configure-args], [Handle all compiler warnings as errors])) | ||
29 | +if test "x$enable_configure_args" != xno; then | ||
30 | + AC_DEFINE([ENABLE_CONFIGURE_ARGS], 1, [Define to enable showing configure arguments in help]) | ||
31 | +fi | ||
32 | + | ||
33 | AC_DEFINE_UNQUOTED([MC_CONFIGURE_ARGS], ["$ac_configure_args"], [MC configure arguments]) | ||
34 | |||
35 | AC_CONFIG_FILES( | ||
36 | diff --git a/src/args.c b/src/args.c | ||
37 | index baef1a1c8..f8dc24020 100644 | ||
38 | --- a/src/args.c | ||
39 | +++ b/src/args.c | ||
40 | @@ -95,7 +95,9 @@ static gboolean mc_args__nouse_subshell = FALSE; | ||
41 | #endif /* ENABLE_SUBSHELL */ | ||
42 | static gboolean mc_args__show_datadirs = FALSE; | ||
43 | static gboolean mc_args__show_datadirs_extended = FALSE; | ||
44 | +#ifdef ENABLE_CONFIGURE_ARGS | ||
45 | static gboolean mc_args__show_configure_opts = FALSE; | ||
46 | +#endif | ||
47 | |||
48 | static GOptionGroup *main_group; | ||
49 | |||
50 | @@ -125,6 +127,7 @@ static const GOptionEntry argument_main_table[] = { | ||
51 | NULL | ||
52 | }, | ||
53 | |||
54 | +#ifdef ENABLE_CONFIGURE_ARGS | ||
55 | /* show configure options */ | ||
56 | { | ||
57 | "configure-options", '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, | ||
58 | @@ -132,6 +135,7 @@ static const GOptionEntry argument_main_table[] = { | ||
59 | N_("Print configure options"), | ||
60 | NULL | ||
61 | }, | ||
62 | +#endif | ||
63 | |||
64 | { | ||
65 | "printwd", 'P', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING, | ||
66 | @@ -758,11 +762,13 @@ mc_args_show_info (void) | ||
67 | return FALSE; | ||
68 | } | ||
69 | |||
70 | +#ifdef ENABLE_CONFIGURE_ARGS | ||
71 | if (mc_args__show_configure_opts) | ||
72 | { | ||
73 | show_configure_options (); | ||
74 | return FALSE; | ||
75 | } | ||
76 | +#endif | ||
77 | |||
78 | return TRUE; | ||
79 | } | ||
80 | diff --git a/src/textconf.c b/src/textconf.c | ||
81 | index 1e0613e58..f39b9e028 100644 | ||
82 | --- a/src/textconf.c | ||
83 | +++ b/src/textconf.c | ||
84 | @@ -232,10 +232,12 @@ show_datadirs_extended (void) | ||
85 | |||
86 | /* --------------------------------------------------------------------------------------------- */ | ||
87 | |||
88 | +#ifdef ENABLE_CONFIGURE_ARGS | ||
89 | void | ||
90 | show_configure_options (void) | ||
91 | { | ||
92 | (void) printf ("%s\n", MC_CONFIGURE_ARGS); | ||
93 | } | ||
94 | +#endif | ||
95 | |||
96 | /* --------------------------------------------------------------------------------------------- */ | ||
97 | -- | ||
98 | 2.23.0 | ||
99 | |||
diff --git a/meta/recipes-extended/mc/mc_4.8.23.bb b/meta/recipes-extended/mc/mc_4.8.23.bb index 83de8dbb2c..71f61b4848 100644 --- a/meta/recipes-extended/mc/mc_4.8.23.bb +++ b/meta/recipes-extended/mc/mc_4.8.23.bb | |||
@@ -8,6 +8,7 @@ RDEPENDS_${PN} = "ncurses-terminfo" | |||
8 | 8 | ||
9 | SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \ | 9 | SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \ |
10 | file://0001-mc-replace-perl-w-with-use-warnings.patch \ | 10 | file://0001-mc-replace-perl-w-with-use-warnings.patch \ |
11 | file://0001-Add-option-to-control-configure-args.patch \ | ||
11 | " | 12 | " |
12 | SRC_URI[md5sum] = "152927ac29cf0e61d7d019f261bb7d89" | 13 | SRC_URI[md5sum] = "152927ac29cf0e61d7d019f261bb7d89" |
13 | SRC_URI[sha256sum] = "238c4552545dcf3065359bd50753abbb150c1b22ec5a36eaa02c82808293267d" | 14 | SRC_URI[sha256sum] = "238c4552545dcf3065359bd50753abbb150c1b22ec5a36eaa02c82808293267d" |
@@ -21,9 +22,11 @@ PACKAGECONFIG ??= "" | |||
21 | PACKAGECONFIG[smb] = "--enable-vfs-smb,--disable-vfs-smb,samba," | 22 | PACKAGECONFIG[smb] = "--enable-vfs-smb,--disable-vfs-smb,samba," |
22 | PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2," | 23 | PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2," |
23 | 24 | ||
24 | EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x" | 25 | EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --disable-configure-args" |
25 | 26 | ||
26 | CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" | 27 | CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" |
28 | CACHED_CONFIGUREVARS += "ac_cv_path_PYTHON='/usr/bin/env python'" | ||
29 | CACHED_CONFIGUREVARS += "ac_cv_path_GREP='/usr/bin/env grep'" | ||
27 | 30 | ||
28 | do_install_append () { | 31 | do_install_append () { |
29 | sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/* | 32 | sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/* |