Skip to content

deeply nested PKGLIBDIR causes failure #3

Description

@aanderse

my PKGLIBDIR is something like /nix/store/j2kh1sb5iyrsy7dj2inwpw83n3mb40rz-initviz-1.0.0-rc1/lib/bootchart and is on a read-only filesystem - this is problematic for the following code:

	/* we need our tmpfs to look like this file-system,
	   so we can chroot into it if necessary */
	mkdir(TMPFS_PATH EARLY_PREFIX, 0777);
	mkdir(TMPFS_PATH EARLY_PREFIX LIBDIR, 0777);
	mkdir(TMPFS_PATH PKGLIBDIR, 0777);
	if (symlink("../..", TMPFS_PATH TMPFS_PATH)) {
		if (errno != EEXIST) {
			log("bootchart-collector failed to create a chroot at "
			    TMPFS_PATH TMPFS_PATH " error '%s'\n", strerror(errno));
			return 1;
		}
	}

i wrote a hacky patch to work around this for now, but i was hoping for a better solution...

additional information: i'm running bootchartd from stage 2 onward, not in my initramfs at all... so i don't specifically need any of this tmpfs stuff at the moment, which is what my hacky patch is fine

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions