-
Notifications
You must be signed in to change notification settings - Fork 3.8k
umurmur: improve init script #27566
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
umurmur: improve init script #27566
Conversation
|
|
Why have you created PR for updating umurmur, when already there is one? |
| $(INSTALL_DIR) $(1)/etc/config | ||
| $(INSTALL_CONF) $(CURDIR)/files/umurmur.conf $(1)/etc/config/umurmur | ||
| $(INSTALL_DIR) $(1)/etc/umurmur | ||
| $(INSTALL_CONF) $(PKG_BUILD_DIR)/umurmur.conf.example $(1)/etc/umurmur/umurmur.conf |
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 we are shipping two files?
This has the same structure as the config file, which you are adding.
No, we dont really need two config files, this leads to misunderstandings, because you dont know, which one should use and copy.
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.
One is for uci, that saves some critical things, like host, port and config location. Why hardcoding the config location? just let procd & uci do these things, plz....
Another one is for mumble.
pkgname.conf and pkgname.init is common practice, isnt it? Do you have a better idea?
I think it's okay on user side, add comments in Makefile? It's not shipped to end user.
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 comments in the Makefile? These are not necessary at all.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
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.
Okay I'll delete them.
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.
Well, I mean the 1-4 lines on the top, okay to delete, or keeping them?
|
Love story does not belong to the commit description: 🤷 |
Yeah, I know, just want someone to hear me crying loudly, in front of a computer but it's not running JavaScript. |
When I was struggling boxing with errors, I didn't know that you have an existing pr. sry. |
|
@BKPepe And your solution is absolutely better. I simply removed |
1a9ab0e to
b7f51e2
Compare
|
Great! Both binary and init script passed test in my case. I still can't have a bundled apk file tho |
|
Test formalities failed because: |
Move these files to OpenWrt repo. For pending pull request, see link below. Link: openwrt/packages#27566 Signed-off-by: Ryan Keane <[email protected]>
Move these files to OpenWrt repo. For pending pull request, see link below. Link: openwrt/packages#27566 Signed-off-by: Ryan Keane <[email protected]>
The correct way to do this is to use UCI defaults. Search the repository for
The formalities check is correct. Please read the CONTRIBUTING.md and Submission Guidelines:
|
You could use PR description for it, but not commit itself as it stays in the history forever, but yeah, mistakes happens. |
b7f51e2 to
cff830d
Compare
BKPepe
left a comment
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.
I went through your proposed changes, but unfortunately some of them don’t quite make sense and I don’t see much value in them. I’d recommend reviewing how init scripts and UCI config files are written and what they’re meant to do — the OpenWrt documentation explains it well. If you’re still uncertain, you can always ask tools like ChatGPT, Claude AI, or GitHub Copilot for help. There’s absolutely nothing wrong with using them — just remember to double-check their suggestions.
net/umurmur/files/umurmur.conf
Outdated
| option umurmur 'config' | ||
| option conffile '/etc/umurmur/umurmur.conf' |
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 conffile? Does it need to be conffile?
What about option config_path or config_file as it it common in other uci config files in this repository?
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.
Okay.
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.
I'm stubborn, I think checking random words from AI is so tiring and can't learn anything
I grown up by googling, reading mans and wikis, and viewing others codes. Sometimes (Usually, actually?) I'm careless
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.
Can you mark conversation resolved by yourself? I'm too afraid to mark it resolved by myself now, just to make sure that everything is reviewed by you
net/umurmur/files/umurmur.conf
Outdated
| option address4 '0.0.0.0' | ||
| option address6 '::' | ||
| option port4 '64738' | ||
| option port6 '64738' |
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.
Doing this just for IP protocol and port does it make sense to introduce such breaking change?
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.
Not a breaking change I guess, by default it listens to that address and port
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
umurmurd 200752 umurmur 3u IPv4 307954 0t0 TCP *:64738 (LISTEN)
umurmurd 200752 umurmur 4u IPv6 307955 0t0 TCP *:64738 (LISTEN)
umurmurd 200752 umurmur 5u IPv4 307956 0t0 UDP *:64738
umurmurd 200752 umurmur 6u IPv6 307957 0t0 UDP *:64738
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 needs to be reworked — the intent was misunderstood. Right now you’re adding UCI and init options to allow separate IPv4/IPv6 addresses and different ports for each IP. In practice, separate ports are rarely used and will complicate client and admin setups. On typical Linux systems a single port bound on a dual-stack address (e.g. ::) will handle both IPv6 and IPv4 (unless the system explicitly enforces IPv6-only sockets), so a single port option is the norm.
Adding separate ports options changes the configuration schema and defaults, which risks a breaking change for existing deployments. Please revert the separate-port fields and expose only a single port plus a bind_address option (default :: or 0.0.0.0), and keep the new options optional so existing UCI configs continue to work. Also ensure the init script runs the daemon in the foreground under procd (no -d/daemonize).
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 package doesn't use UCI before, shouldn't breaking existing things.
Removing separate ports option makes sense, but I suggest keeping both 0.0.0.0 and :: as I explained before.
You misunderstood the -d flag, it makes it run in foreground, default behavior is fork to background.
| #!/bin/sh /etc/rc.common | ||
| # Copyright (C) 2006-2008 OpenWrt.org |
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.
Where did you take this copyright and how are you affilated to it?
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.
From upsteam? You can check here
Not sure what to do with this line if I overhauled the whole file.
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.
Then please look at CONTRIBUTING.md at this repository or Contributing guidelines, which are available at OpenWrt wiki.
| procd_set_param stdout 1 | ||
| procd_set_param stderr 1 |
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.
Do you need to really have enabled stdout and stderr?
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.
Uh, I give -d in CLI, it does print logs
# bash -xc 'umurmurd -d &2>/dev/null '
+ umurmurd -d
# INFO: OpenSSL library initialized (version: OpenSSL 3.5.3 16 Sep 2025)
INFO: Setting default channel 'Lobby'
INFO: Adding channel 'Lobby' parent 'Root'
INFO: Adding channel 'Silent' parent 'Root'
INFO: Adding channel 'Chatroom' parent 'Root'
INFO: No channel links found in configuration file.
FATAL: bind 0.0.0.0 64738: Address in use
net/umurmur/files/umurmur.conf
Outdated
| @@ -0,0 +1,6 @@ | |||
| option umurmur 'config' | |||
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.
In this UCI config, I miss options like:
- enabled
- user:group
- password for Mumble server, if someone wants to have it private
BTW: I think AI such as ChatGPT, Copilot might help you with this one instead of reinveinting a wheel here
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.
Run user & group, password cannot be specified in CLI, but in conf file
Is this that necessary?
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.
I basically learn everything from wiki and @1715173329 .
Some pages on wiki is outdated, I registered an account for editing but no contributions so far.
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.
Run user & group
Is this that necessary?
It’s not absolutely necessary for functionality, but it’s strongly recommended for security reasons. Running the daemon under root means any potential vulnerability could lead to full system compromise. By specifying a dedicated user and group in the UCI config, the service can drop privileges after startup and run in a restricted context. This is standard practice for most network services in OpenWrt and Linux in general.
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.
Uh, done. Most packages doesn't do this though
net/umurmur/files/umurmur.conf
Outdated
| option port4 '64738' | ||
| option port6 '64738' |
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 do you need to specify port for IPv4 and IPv6? That seems really weird for me.
That is not even in umurmur/umurmur@209edb5
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.
Because it's the default?
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.
And it can listen on different ports for IPv4 & 6.
If you only specify port for one IP protocol, another doesn't follow that.
umurmurd 200844 umurmur 3u IPv4 315714 0t0 TCP *:64738 (LISTEN)
umurmurd 200844 umurmur 4u IPv6 315715 0t0 TCP *:64739 (LISTEN)
umurmurd 200844 umurmur 5u IPv4 315716 0t0 UDP *:64738
umurmurd 200844 umurmur 6u IPv6 315717 0t0 UDP *:64739
| -DMBEDTLS_LIBRARIES="$(STAGING_DIR)/usr/lib" \ | ||
| -DMBEDTLS_LIBRARIES="$(STAGING_DIR)/usr/lib/libmbedtls.so" \ |
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 needs to be done in separate commit, but I am not sure what are you fixing here.
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.
Because *_LIBRARIES should point to files, not directories
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.
And what build error have you experienced? I dont see that it fails on buildbots.
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.
Won't be an error because MbedTLS_INCLUDE_DIRS is correct, but this variable is wrong indeed
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.
What about other libraries such as mbedcrypto, mbedx509? 🤔
net/umurmur/files/umurmur.init
Outdated
| config_get address4 "config" "address4" '0.0.0.0' | ||
| config_get address6 "config" "address6" '::' |
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.
Sorry, but what are you trying to do it here?
Why don't e.g. do bind_address as ::It would listen on IPv4 and IPv6.
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.
that makes sense
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.
But sadly that flag needs a valid address, can't be empty
Or I have to write more if lines in script, worth or not?
net/umurmur/files/umurmur.defaults
Outdated
| @@ -0,0 +1,4 @@ | |||
| if [ -f '/etc/umurmur.conf' ]; then | |||
| [ -f '/etc/umurmur/umurmur.conf' ] && mv /etc/umurmur/umurmur.conf{,.apk-new} | |||
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.
Uh, is it okay to rename to apk-new?
I explored a possible alternative using AI, which might serve as a cleaner skeleton for future improvements. It’s just an idea that could make the configuration easier to work with. Config: Init: **That said, it’s worth checking whether all these options actually exist and work as expected — this needs proper testing. As I mentioned, AI can be both a good and a bad helper. There’s no need to reinvent the wheel if a solid solution already exists. Please take a look and see if this approach really makes sense.** |
I know this approach, but is it okay to violate the configuration file? |
Well, why not? Why yes? I mean, if you’d like to have UCI config, then you’d probably want LUCI integration as well, right? 😇 |
|
I'm not planning to add luci support, because I don't touch luci related things... |
cff830d to
8dc72c7
Compare
|
If you’re not planning to add LuCI integration, I don’t really see the
point of introducing a UCI config at all.
UCI makes sense when you want to expose settings through LuCI or allow
runtime reconfiguration — but if the goal is only to store the port and IP
address, that’s quite limited.
In that case, it feels like unnecessary complexity and a potential breaking
change without a clear benefit.
Dne pá 10. 10. 2025 11:39 uživatel IFV ***@***.***> napsal:
… *Ra2-IFV* left a comment (openwrt/packages#27566)
<#27566 (comment)>
I'm not planning to add luci support, because I don't touch luci related
things...
I still suggest keeping it simple, at least, not in this commit, let's
make it work first, plz
—
Reply to this email directly, view it on GitHub
<#27566 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7IDVDWIZWYVT3FGVZKACT3W55FVAVCNFSM6AAAAACH5E2EFWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGOBZGA4TMOJWHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
8dc72c7 to
0b07de2
Compare
|
Well, maybe, I have to learn them from scratch and may take a long time, and if so this will be my first try |
Fix CMake MBEDTLS_LIBRARIES variable. It should set to a list of files, instead of directories. Signed-off-by: Ryan Keane <[email protected]>
|
No more amending required on this PR, I guess, LuCI support is on the way, uci config support is the base :) |
BKPepe
left a comment
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.
I don’t think this is ready to be merged at this point. And honestly, asking for it to be merged just to have your first contribution checked off your to-do list isn’t the right approach — that’s not how it works, unfortunately.
You mentioned that you plan to create a simple UCI configuration file and mark it as a conffile. That’s fine in principle — it ensures the file won’t be overwritten when new updates are installed. Instead, users or administrators who install the package would be responsible for reviewing and applying any config changes themselves (e.g. through the -opkg or -apk suffix).
That said, maybe I’m being a bit strict here, but we simply can’t add a UCI config that offers only two options and isn’t fully thought through. This is a small change, but one that could introduce breaking changes just for the sake of having something merged — especially if you don’t actively use umurmur yourself.
umurmur is actually a great package to learn from: it’s simple enough, but it still needs to be properly implemented and covered from all angles.
Right now, it would be better to make this more solid — for example, by preparing a LuCI integration later on.
But first, you should start with an init script, then gradually add the UCI config and adjust the init script accordingly. Or, if needed, spend more time on self-study and prepare it properly so that it’s truly ready for merging.
|
Roger, sir. But I want to finish this PR asap so I'll stage uci config related changes in another branch for uses ( luci ) |
Breaking change: Config file location now defaults to: /etc/umurmur/umurmur.conf And with uci-defaults script to migrate. Init script is now in "files" directory, instead of from upstrem. uMurmur example config file is now from upstream example file. Init script now calls procd to monitor service state. Signed-off-by: Ryan Keane <[email protected]>
0b07de2 to
24342a6
Compare
| STOP=01 | ||
| USE_PROCD=1 | ||
|
|
||
| CONF="umurmurd" |
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 is used where?
|
|
||
| start_service() { | ||
| local user group | ||
| user=umurmur group=umurmur |
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 this is not defined in the config file?
|
I need to close this as this is not ready to be merged. Because you removed init file and config file from umurmur (umurmur/umurmur@209edb5), we can not fix the init script in the released version (there is a bug with moved binary) and we need to ship our own init script file, which I will do. |

📦 Package Details
Maintainer: @Ansuel @neheb
(You can find this by checking the history of the package
Makefile.)Description:
Fixing good
🧪 Run Testing Details
I swear I tested the binary. As for the init script not yet. I'm burning out.
✅ Formalities