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

Blueprint should not assume certain things about the environment #29

Open
itsvic-dev opened this issue Mar 28, 2024 · 8 comments
Open

Comments

@itsvic-dev
Copy link
Member

itsvic-dev commented Mar 28, 2024

  • Certain distros do not have a /usr/local directory (such as NixOS), or even a /usr/bin! (NixOS has it, but it only contains env) Because of this, the blueprint alias does not get installed if /usr/local/bin is not present or if it's not writable to by the current user.
  • The installer falls apart anywhere outside of /var/www/pterodactyl. A safer assumption would be setting FOLDER="$(dirname $0)". chore: don't use ::f placeholders #40
  • When setting up symlinks to .blueprint, Blueprint will create absolute links. If the panel directory is renamed, Blueprint will partially break. Use relative symlinks instead of absolute ones/hardlinks #30
@prplwtf
Copy link
Member

prplwtf commented Mar 28, 2024

In all honestly, I doubt people would run Pterodactyl on NixOS.

@itsvic-dev
Copy link
Member Author

In all honestly, I doubt people would run Pterodactyl on NixOS.

I do -- but that's not the point. Point is, Blueprint shouldn't assume certain things about the environment. Another one is, Blueprint assumes that www-data is the owner of the panel directory. Doesn't break anything, but is annoying nonetheless.

@Ahwxorg
Copy link
Member

Ahwxorg commented Mar 28, 2024

Works on my machine

@Ahwxorg
Copy link
Member

Ahwxorg commented Mar 28, 2024

In all seriousness:

@prplwtf we/you could just add a simple if-statement, or tell people that NixOS is unsupported? Also possible to make the directories a variable and define the variable using a interactive script?

@prplwtf
Copy link
Member

prplwtf commented Mar 28, 2024

Non-standard directory support has been implemented since ages ago.

Non-standard file ownership has been implemented recently, but is waiting for the next release.

@itsvic-dev
Copy link
Member Author

Non-standard directory support has been implemented since ages ago.

It's a bit wonky in my experience. When running with _FOLDER set, it breaks. Running it a second time, with or without _FOLDER, gets it to actually install.
This still doesn't address my initial complaint that the directory can change, and you should avoid absolute symlinks.

Non-standard file ownership has been implemented recently, but is waiting for the next release.

Glad to hear that.

we/you could just add a simple if-statement, or tell people that NixOS is unsupported?

This isn't a NixOS-specific issue. If the user running Blueprint does not have write permissions to /usr/local/bin, it will also fail to install the blueprint tool, as was the case for me as I was running it as myself, not as root.

@prplwtf
Copy link
Member

prplwtf commented Mar 28, 2024

We could switch to a .env-like config file for Blueprint which would store settings like these in a readable manner:

For the "blueprint" command issue, we could just add a statement to check from a list of directories, and if it exists, place it in there.

@prplwtf
Copy link
Member

prplwtf commented Jun 9, 2024

_FOLDER functionality has now been removed in commit 6faa0c3 in favor of ✨ sed commands ✨.

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

3 participants