Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v4] mtools-native: disable reading host configs
Date: Tue, 13 Jun 2017 17:34:02 +0300	[thread overview]
Message-ID: <1497364442-23446-1-git-send-email-ed.bartosh@linux.intel.com> (raw)
In-Reply-To: <CAJTo0LYMK_QA0oBOpU5t9pNgYM+XmiB_B37AcAFR-hQa0RE9fA@mail.gmail.com>

Removed code that reads /etc/mtools.conf, /etc/default/mtools.conf,
/etc/mtools and /etc/default/mtools to ensure that mtools output
doesn't depend on the global host configs.

It's still possible to use ~/.mtoolsrc config or point MTOOLSRC
environment variable to any configuration file if user want
to configure mtools.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 .../mtools/mtools/disable-hardcoded-configs.patch  | 23 ++++++++++++++++++++++
 meta/recipes-devtools/mtools/mtools_4.0.18.bb      |  1 +
 2 files changed, 24 insertions(+)
 create mode 100644 meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch

diff --git a/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch b/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch
new file mode 100644
index 0000000..01455f1
--- /dev/null
+++ b/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch
@@ -0,0 +1,23 @@
+Disabled reading host configs.
+
+Upstream-Status: Inappropriate [native]
+
+Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
+
+--- mtools-4.0.18/config.c.orig	2017-06-13 12:27:38.644000000 +0300
++++ mtools-4.0.18/config.c	2017-06-13 12:28:47.576000000 +0300
+@@ -701,14 +701,6 @@
+ 	memcpy(devices, const_devices,
+ 	       nr_const_devices*sizeof(struct device));
+ 
+-    (void) ((parse(CONF_FILE,1) |
+-	     parse(LOCAL_CONF_FILE,1) |
+-	     parse(SYS_CONF_FILE,1)) ||
+-	    (parse(OLD_CONF_FILE,1) |
+-	     parse(OLD_LOCAL_CONF_FILE,1)));
+-    /* the old-name configuration files only get executed if none of the
+-     * new-name config files were used */
+-
+     homedir = get_homedir();
+     if ( homedir ){
+ 	strncpy(conf_file, homedir, MAXPATHLEN );
diff --git a/meta/recipes-devtools/mtools/mtools_4.0.18.bb b/meta/recipes-devtools/mtools/mtools_4.0.18.bb
index b0efc9e..5d84001 100644
--- a/meta/recipes-devtools/mtools/mtools_4.0.18.bb
+++ b/meta/recipes-devtools/mtools/mtools_4.0.18.bb
@@ -33,6 +33,7 @@ SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \
            file://0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch \
            "
 
+SRC_URI_append_class-native = " file://disable-hardcoded-configs.patch"
 
 inherit autotools texinfo
 
-- 
2.1.4



  reply	other threads:[~2017-06-13 14:35 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-13 11:21 [PATCH v2 00/26] #11283 wic ls & cp & rm Ed Bartosh
2017-06-13 11:21 ` [PATCH v2 01/26] mtools-native: disable reading host configs Ed Bartosh
2017-06-13 11:55   ` [PATCH v3] " Ed Bartosh
2017-06-13 12:54     ` Burton, Ross
2017-06-13 14:34       ` Ed Bartosh [this message]
2017-06-13 11:21 ` [PATCH v2 02/26] filemap: fix skip logic Ed Bartosh
2017-06-13 11:21 ` [PATCH v2 03/26] filemap: add parameter 'length' to sparse_copy Ed Bartosh
2017-06-13 11:21 ` [PATCH v2 04/26] bootimg-pcbios: make boot image file unique Ed Bartosh
2017-06-13 11:21 ` [PATCH v2 05/26] wic: add wic_init_parser_ls Ed Bartosh
2017-06-13 11:21 ` [PATCH v2 06/26] wic: add help and usage content for 'wic ls' Ed Bartosh
2017-06-13 11:21 ` [PATCH v2 07/26] wic: add 'wic ls' command Ed Bartosh
2017-06-13 11:21 ` [PATCH v2 08/26] engine: implement listing wic images Ed Bartosh
2017-06-13 11:21 ` [PATCH v2 09/26] selftest: add new test case test_wic_ls Ed Bartosh
2017-06-13 11:21 ` [PATCH v2 10/26] wic: add wic_init_parser_cp Ed Bartosh
2017-06-13 11:21 ` [PATCH v2 11/26] wic: add help and usage content for 'wic cp' Ed Bartosh
2017-06-13 11:22 ` [PATCH v2 12/26] wic: add 'wic cp' command Ed Bartosh
2017-06-13 11:22 ` [PATCH v2 13/26] wic: add Disk._prop helper Ed Bartosh
2017-06-13 11:22 ` [PATCH v2 14/26] wic: add mcopy property Ed Bartosh
2017-06-13 11:22 ` [PATCH v2 15/26] filemap: change signature of sparse_copy function Ed Bartosh
2017-06-13 11:22 ` [PATCH v2 16/26] filemap: check if dest is written for every block Ed Bartosh
2017-06-13 11:22 ` [PATCH v2 17/26] filemap: calculate dst size correctly Ed Bartosh
2017-06-13 11:22 ` [PATCH v2 18/26] wic: add Disk._put_part_image method Ed Bartosh
2017-06-13 11:22 ` [PATCH v2 19/26] wic: fully implement 'wic cp' Ed Bartosh
2017-06-13 11:22 ` [PATCH v2 20/26] selftest: add test_wic_cp test case Ed Bartosh
2017-06-13 11:22 ` [PATCH v2 21/26] wic: add wic_init_parser_rm Ed Bartosh
2017-06-13 11:22 ` [PATCH v2 22/26] wic: add help and usage content for 'wic rm' Ed Bartosh
2017-06-13 11:22 ` [PATCH v2 23/26] wic: add 'wic rm' command Ed Bartosh
2017-06-13 11:22 ` [PATCH v2 24/26] wic: implement removing files Ed Bartosh
2017-06-13 11:22 ` [PATCH v2 25/26] wic: implement removing directories Ed Bartosh
2017-06-13 11:22 ` [PATCH v2 26/26] selftest: add test_wic_rm test case Ed Bartosh
2017-06-13 11:31 ` ✗ patchtest: failure for #11283 wic ls & cp & rm (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1497364442-23446-1-git-send-email-ed.bartosh@linux.intel.com \
    --to=ed.bartosh@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox