Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force mktemp to honor $TMPDIR in merge-squashfs script #778

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

schrockwell
Copy link
Contributor

This is a proposed solution to nerves-project/nerves#876.

On macOS, mktemp will create a temporary directory in /var/... which is on a case-insensitive volume. The merge-squashfs script will fail when Buildroot packages contain files that differ only in their case.

By adding the -p '' argument to mktemp, it is forced to honor the $TMPDIR environment variable, which the user could specify ahead of time as a special directory on a case-sensitive volume.

@fhunleth
Copy link
Member

fhunleth commented Feb 7, 2024

Adding -p '' seems reasonable regardless. It took me a bit to see if this change has any portability issues, but I really think it's safe.

Regarding using $TMPDIR as a workaround for the case-insensitivity issue, I think this is the most practical near-term solution. Getting rid of the need for merge-squashfs is my favorite one, but that's definitely more work.

Thank you for the PR.

Copy link
Member

@jjcarstens jjcarstens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants