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

Make tar structure compatible with plain release_handler upgrades #936

Open
verbit opened this issue Mar 18, 2024 · 1 comment
Open

Make tar structure compatible with plain release_handler upgrades #936

verbit opened this issue Mar 18, 2024 · 1 comment

Comments

@verbit
Copy link

verbit commented Mar 18, 2024

When creating a tar, relx produces the following structure (simplified for demonstration)

├── erts-13.1.5
│   └── ...
├── lib
│   └── ...
└── releases
    ├── 0.7.0
    │   ├── relup
    │   ├── start.boot
    │   ├── start.script
    │   ├── sys.config
    │   └── myrel.rel
    ├── RELEASES
    ├── start_erl.data
    └── myrel.rel

in a file named myrel-0.7.0.tar.gz.

Now, if I want to unpack that with release_handler, it expects the structure to look like this (note the name of the .rel files):

├── erts-13.1.5
│   └── ...
├── lib
│   └── ...
└── releases
    ├── 0.7.0
    │   ├── relup
    │   ├── start.boot
    │   ├── start.script
    │   ├── sys.config
    │   └── myrel-0.7.0.rel
    ├── RELEASES
    ├── start_erl.data
    └── myrel-0.7.0.rel

That is, when unpacking a release called RelPackageName.tar.gz, it expects the .rel files to be named RelPackageName.rel. The relx-generated script plays some tricks to make it work but that forces everyone to do the same when not using anything relx-specific for upgrades.

So my question is: Is there a reason relx uses RelName.rel for .rel files? Can this be changed to RelName-Vsn.rel to make the RelName-Vsn.tar.gz tar compatible with plain release_handler? Am I missing something?

@tsloughter
Copy link
Member

Hm, I thought we fixed this in 4.0.0 but I see I had left an comment at the end #729 (comment)

I'm not sure yet about just changing this, there must have been a reason it wasn't simply changed.

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

No branches or pull requests

2 participants