Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [Bug 9386] New: ubinize fails with or without custom config
@ 2016-10-27 18:20 bugzilla at busybox.net
  2016-10-27 20:30 ` [Buildroot] [Bug 9386] " bugzilla at busybox.net
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: bugzilla at busybox.net @ 2016-10-27 18:20 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=9386

            Bug ID: 9386
           Summary: ubinize fails with or without custom config
           Product: buildroot
           Version: 2016.08
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
          Assignee: unassigned at buildroot.uclibc.org
          Reporter: yurovsky at gmail.com
                CC: buildroot at uclibc.org
  Target Milestone: ---

Created attachment 6781
  --> https://bugs.busybox.net/attachment.cgi?id=6781&action=edit
my experimental fix or workaround

I'm unable to build a UBI image regardless of whether I use the provided
ubinize.cfg or the new custom config option.  In case it's useful, the build
host is Fedora 24.

Sanitized output:

output/foo/build/_device_table.txt'
iniparser: cannot open output/foo/build/ubinize.cfg
ubinize: error!: cannot load the input ini file "output/build/ubinize.cfg"

I think that the issue is that ubinize.cfg is being copied and edited under
fakeroot and the permissions mask is wrong.  As an experiment I added another
routine that's called directly (rather than printed into _fakeroot.sh) and
moved the ubi.mk _CMD to my new _SETUP_CMD and that resolves the problem.

I'm not sure if something like this is a reasonable solution and I don't
understand why copying/sed/etc is done under fakeroot to begin with:

--- a/buildroot/fs/common.mk
+++ b/buildroot/fs/common.mk
@@ -95,6 +95,7 @@
        $$(foreach s,$$(call qstrip,$$(BR2_ROOTFS_POST_FAKEROOT_SCRIPT)),\
                echo "echo '$$(TERM_BOLD)>>>   Executing fakeroot script
$$(s)$$(TERM_RESET)'" >> $$(FAKEROOT_SCRIPT); \
                echo $$(s) $$(TARGET_DIR) $$(BR2_ROOTFS_POST_SCRIPT_ARGS) >>
$$(FAKEROOT_SCRIPT)$$(sep))
+       $$(call $$(ROOTFS_$(2)_SETUP_CMD))
        $$(call PRINTF,$$(ROOTFS_$(2)_CMD)) >> $$(FAKEROOT_SCRIPT)
        chmod a+x $$(FAKEROOT_SCRIPT)
        PATH=$$(BR_PATH) $$(HOST_DIR)/usr/bin/fakeroot -- $$(FAKEROOT_SCRIPT)
--- a/buildroot/fs/ubifs/ubi.mk
+++ b/buildroot/fs/ubifs/ubi.mk
@@ -20,7 +20,7 @@
 UBINIZE_CONFIG_FILE_PATH = fs/ubifs/ubinize.cfg
 endif

-define ROOTFS_UBI_CMD
+define ROOTFS_UBI_SETUP_CMD
        $(INSTALL) -m 0644 $(UBINIZE_CONFIG_FILE_PATH) $(BUILD_DIR)/ubinize.cfg
        $(SED) 's;BR2_ROOTFS_UBIFS_PATH;$@fs;' $(BUILD_DIR)/ubinize.cfg
        $(HOST_DIR)/usr/sbin/ubinize -o $@ $(UBI_UBINIZE_OPTS)
$(BUILD_DIR)/ubinize.cfg

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2016-11-28 18:06 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-27 18:20 [Buildroot] [Bug 9386] New: ubinize fails with or without custom config bugzilla at busybox.net
2016-10-27 20:30 ` [Buildroot] [Bug 9386] " bugzilla at busybox.net
2016-10-27 20:39 ` bugzilla at busybox.net
2016-10-27 21:22 ` bugzilla at busybox.net
2016-10-27 21:24 ` bugzilla at busybox.net
2016-10-27 21:56 ` bugzilla at busybox.net
2016-10-27 22:13 ` bugzilla at busybox.net
2016-10-27 23:08 ` bugzilla at busybox.net
2016-10-28 18:42 ` bugzilla at busybox.net
2016-10-28 21:31 ` bugzilla at busybox.net
2016-10-29  7:45 ` bugzilla at busybox.net
2016-10-29  8:28 ` bugzilla at busybox.net
2016-11-03 20:40 ` bugzilla at busybox.net
2016-11-23 12:37 ` bugzilla at busybox.net
2016-11-23 12:41 ` bugzilla at busybox.net
2016-11-23 12:56 ` bugzilla at busybox.net
2016-11-27 20:29 ` bugzilla at busybox.net
2016-11-28 18:06 ` bugzilla at busybox.net

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