-
Notifications
You must be signed in to change notification settings - Fork 224
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
create an empty default welcome file #3194
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,7 @@ set -e | |
|
||
adduser --system --quiet --home /nonexistent --no-create-home jamulus | ||
|
||
sudo mkdir /etc/jamulus | ||
sudo touch /etc/jamulus/welcome.html | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will require the user to edit the file as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about: chmod -c 666 /path/to/file Everyone can read and write, nobody can execute. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wouldn't want files installed on a system that any user could edit without control, that were then displayed publicly... Ideally:
This is getting outside the scope of this PR, though, so I think just leaving (with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a+r appears to work There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Check jamulus.install file and deploy_deb.sh. I think you just need to move the file to the correct location during deb creation. This ensures the file doesn't get overwritten by updates, I suppose There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't want my custom welcome file to be overwritten when I upgrade. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exactly. I think that we might want to add an empty file to the deb directly instead of creating it during install time. But I'm unsure about the actual way config files are handled. For example I'd like that a apt purge deletes it while an apt remove doesn't. I found https://wiki.debian.org/ConfigPackages but it doesn't help me. @mirabilos how should config files be handled correctly in deb files? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The usual Debian way: ship it as conffile by placing it in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ann0see, touch won't overwrite anything. The Debian technique would behave more appropriately with apt purge vs. apt remove, and I guess that's good citizenship. Someday deploying default welcome file metadata could be a thing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mirabilos thanks for answering.
mcfnord marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#DEBHELPER# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will fail if the directory already exists. It will also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is sudo required anyway? If adduser I'd executable meditate should also work without sudo. Nevertheless, I believe there's another way to add files and folders which is then also automatically cleaned up by dpkg/apt. Check out deploy_linux.sh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Writing in /etc might require root access, but I can't explain why adduser doesn't in this instance. Should I test this without the sudo?
There is no deploy_linux.sh. Do you mean deploy_deb.sh ?
If I am uninstalling an application, there's a case for intentionally not removing a small file the user has customized. I guess a concern is that if I re-install, I don't expect the previous welcome file?
Are there examples of our files that are handled in the auto-cleanup way you prefer?