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

Set TAR archive root directory or update installation instructions #290

Closed
redcatbear opened this issue Aug 10, 2018 · 12 comments
Closed

Set TAR archive root directory or update installation instructions #290

redcatbear opened this issue Aug 10, 2018 · 12 comments
Assignees
Labels
bug Code working other than specified. docs This issue describes required additions to the documentation.

Comments

@redcatbear
Copy link

Situation

When installing the extension manually from the Git development branch, one of the last steps is to unpack the TAR archive in the local extensions directory.

According to the documentation the archive should be unpacked in the root of the extensions directory.
Given the current tar layout, this unpacks the contents directly there instead of under a sub-directory [email protected]

Possible solutions

a) Make [email protected] the root directory of the TAR archive.

Documentation can then be unchanged. Most convenient for end user.

b) Update documentation

cd ~/git
git clone https://github.com/projecthamster/hamster-shell-extension.git
git checkout develop
make dist
cd ~/.local/share/gnome-shell/extensions/
mkdir [email protected]
cd [email protected]
tar xzf ~/git/hamster-shell-extension/dist/[email protected]
@elbenfreund elbenfreund added bug Code working other than specified. docs This issue describes required additions to the documentation. labels Mar 6, 2020
@DirkHoffmann
Copy link
Member

Thank you for your feedback, @redcatbear, and sorry for the delay in picking this up.
There are several ways to fix it. As far as I can see, 17d2bc7 addressed it successfully as well.

It was merged into the develop branch, but not master. @benjaoming, as you are the legitimate author, would you mind to create the PR (and that I assign this issue to you)?

@hedayat
Copy link
Member

hedayat commented Mar 14, 2020

Well, it is too late to say my opinion, but I wonder why the first solution was not preferred? It was always a mystery for me why the extension is packaged like that. I think it was much better if it was already packaged inside the required directory.

@DirkHoffmann
Copy link
Member

It's not too late. The main constraint that I see is that the ZIP archive needs a "rootless" structure, which does not contain the extension UUID. That's GNOME's choice, and we cannot change it.
Then, we have the TAR file. (I actually wonder why, besides the fact that it's "more unix-like".) We could have a different structure (with UUID as root directory) in the TAR file than in the ZIP file. But then it would be confusing for users (and occasional developers), as we would have different ways to install from TAR or from ZIP (and approriate instructions).

@benjaoming, you did not object to be the assignee. What is your opinion?

@mwilck
Copy link
Contributor

mwilck commented Mar 14, 2020

@hedayat, I agree, but please let's not change this before the GNOME 3.3x support PRs have been merged. Fixing this is trivial, but if it's done and merged now, I'll have to rebase all 3 PRs #312, #316, and #323. I already did for #310.

@hedayat
Copy link
Member

hedayat commented Mar 15, 2020

@mwilck Yeah, I'm not in hurry :)

@DirkHoffmann Oh, I didn't know about the ZIP structure. If so, well, I'm not sure. ZIP is OK probably because it is designed to be used automatically. But for manual installation (tar?) I'd prefer having the UUID part too.

@benjaoming
Copy link
Contributor

@benjaoming, you did not object to be the assignee. What is your opinion?

This was fixed in #310 ?

@DirkHoffmann DirkHoffmann self-assigned this May 1, 2020
@DirkHoffmann
Copy link
Member

My 2 cents on this:

  1. Instructions have been updated (i.e. corrected) in Fix installation instructions (matches Ubuntu 18.04 Tweak tool) #310. 👍
  2. The TAR may contain the path, the ZIP must not. If we add the UUID directory to the path, this breaks compatibility and Fix installation instructions (matches Ubuntu 18.04 Tweak tool) #310 has to be reverted. In the transition, we might have two different methods/instructions, depending on the branches / shell versions. 👎
  3. TAR and ZIP are redundant technologies for the same problem: bundling files. This is confusing, and one of them should be removed. ❓
    3.1 If a "more *nix-like" solution is needed for the test/dev installation, a simple cp -r might make do, or a combination of pipied tar and eventually mkdir. No need to create the TAR file explicitely.
    3.2 It would be more difficult to change the UUID name in tests, if it were generated inside the TAR file.

In my opinion a cleverly coded target for mak e test or make test-install might be sufficient and a good complement.
What do you think about this, @mwilck, @hedayat, @redcatbear? If you are not totally opposed to the idea, I make a more concrete proposal as PR for discussion.
Otherwise I think this issue itself can be closed with solution #310 (by option b) in the OP).

@mwilck
Copy link
Contributor

mwilck commented May 1, 2020

I like the idea of having the UUID in the tar, and adhering to the GNOME standard in the zip. Yes, generating both tar and zip is redundant, but does it hurt anyone?

@DirkHoffmann
Copy link
Member

Does not hurt, but confuses.
But with the path included, they have two different purposes. No strong objection from my side.

If anybody feels that it is an error to close this, please reopen.

@matthijskooijman
Copy link
Member

One additional datapoint: A reason to have a top-level directory in a tar file, is that it is conventional to do so. Software released in tarballs almost always do this, so I'm coming to expect that I can unpack a tarball without having to create a directory first.

For zips, I think think the convention is more often to not have a top-level directory.

One other angle would be to report a feature request to the GNOME folks to accept zips with a top-level directory as well (should be possible in addition to the current zips).

@hedayat
Copy link
Member

hedayat commented May 3, 2020

First, note that there is also #330 and it will change installation instructions anyway.

I'm not opposed to keeping tar output, but I myself wouldn't care much about it if a proper install target exists for make. Also, the zip file might be somehow designated that it is not suitable for manual usage, and it is only provided to be used by gnome shell tools/distribution. Or, it should not be generated at all during the manual installation instructions. Which is satisfied by a solution like #330 already.

@DirkHoffmann
Copy link
Member

Thank you, @hedayat. Let's follow up on #330 then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Code working other than specified. docs This issue describes required additions to the documentation.
Projects
None yet
Development

No branches or pull requests

7 participants