mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #566] dnf install fails and rpm partially fails because postinst.sh has syntax errors #429
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#429
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @danieldemus on GitHub (Dec 31, 2022).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/566
On the first install attempt user and group creation fail, because the syntax of chown is incorrect:
chown ntfy.ntfy /var/cache/ntfy /var/cache/ntfy/attachments /var/lib/ntfyIt should
ntfy:ntfy.On uninstall the group is not necessarily removed, if fx. the apache user is added to it to allow reading the socket. This means that on the next install attempt
id ntfy >/dev/null 2>&1 || useradd --system --no-create-home ntfyfails, when useradd tries to add the group again.The fedora packaging guidelines at https://fedoraproject.org/wiki/Packaging:UsersAndGroups suggest:
In this case https://github.com/binwiederhier/ntfy/pull/565 could also do the job.
@binwiederhier commented on GitHub (Dec 31, 2022):
This is wild. I didn't know the dot syntax was Ubuntu/Debian specific. Thanks for reporting this and for the PR. You suggested something other than what you did in the PR. Can I close this issue since I just merged the PR?
I'm assuming yes, and am closing this issue. Happy to re-open though if it wasn't complete. Thanks for your contribution.
@danieldemus commented on GitHub (Dec 31, 2022):
The other solution is from the linked fedora document and can see the copr rpm does use it. I had already committed a fix before I found the link, so ...
Another thing is it's only tested on fedora 37, though I would expect groupadd to be compatible.
@binwiederhier commented on GitHub (Dec 31, 2022):
The groupadd works on Ubuntu too. I tested that. I'm ok with what you added. But I'm also ok with the other one if you want to change it.
@danieldemus commented on GitHub (Jan 1, 2023):
I can see here https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/, that adding a "proper" rpm spec file would be a better solution for the production rpm packaging. I assume the copr maintainer has one.
I was trying to test something else regarding letsencrypt certs and was build the rpm using the release-snapshot target in the makefile, that was causing the issues, so this is in reality a developer issue on fedora.