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

Remove the metadata from tar by setting COPYFILE_DISABLE #119

Closed
wants to merge 1 commit into from

Conversation

mirshahriar
Copy link
Contributor

@mirshahriar mirshahriar commented Apr 8, 2023

Summary

When we make the tar file withtar -cvzf, OSX adds a ._ file for each file.

._com.mattermost.cloud
com.mattermost.cloud/
com.mattermost.cloud/._webapp
com.mattermost.cloud/webapp/
com.mattermost.cloud/._server
com.mattermost.cloud/server/

And this causes problem in mm-server. Issue filed

To solve this, we need to tell tar to remove the metadata by setting COPYFILE_DISABLE. Reference.

So run COPYFILE_DISABLE=1 tar -cvzf to make tar file.

Ticket Link

Release Note

None

@mm-cloud-bot
Copy link

@mirshahriar: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

I understand the commands that are listed here

Copy link
Contributor

@fmartingr fmartingr left a comment

Choose a reason for hiding this comment

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

This seems a good addition to me, though I haven't run into this problem creating bundles and uploading it to servers.

@gabrieljackson
Copy link
Contributor

I also haven't encountered this issue. Let's see if we need to standardize this change in the other plugins before merging here.

@mickmister
Copy link
Member

@gabrieljackson and I talked about this offline a bit and discussed a few options. I'm currently leaning towards applying this fix to all of the plugin repositories.

I'm not sure what the implications are for setting this COPYFILE_DISABLE env var for typical usage of tar, so I'm not sure we should recommend setting this variable globally.

@hanzei @trilopin What do you think about this problem, and the potential requirement to apply this to all of the plugin repositories?

@trilopin
Copy link

trilopin commented Apr 11, 2023

@hanzei @trilopin What do you think about this problem, and the potential requirement to apply this to all of the plugin repositories?

This is not the first time I see this problem,1 and 2. If we are concerned about some side effects, we could set the DISABLE_COPYFILE env var only for darwin arch (or just darwin_arm64 if that's the case).

@mickmister
Copy link
Member

@gabrieljackson We've decided to go with a server-side change for this mattermost/mattermost#22614 (comment). The ticket is currently marked as HW

@mattermost-build
Copy link
Contributor

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!

@gabrieljackson
Copy link
Contributor

Going to close this as another fix will be implemented to address the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lifecycle/1:stale release-note-none Denotes a PR that doesn't merit a release note.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants