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

Add configure option to enable/disable creation of user/group #1820

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

hvilleneuve29
Copy link

Useful for Yocto, for example, where groupadd or getenv is not available.

Enabled by default, to keep same behavior as before.

Useful for Yocto, for example, where groupadd or getenv is not available.

Enabled by default, to keep same behavior as before.
@mikebrady
Copy link
Owner

Thanks for this suggestion, but TBH I'm not too sure about it.

Does Yocto use systemd for example? If so, the systemd service files for Shairport Sync include directives to set the user and group to shairport-sync so they need to be defined. If Yocto doesn't use systemd, then why not omit --with-systemd from the configuration step?

@hvilleneuve29
Copy link
Author

hvilleneuve29 commented Mar 7, 2024

Hi Mike,
I am pretty sure about it :) My commit message should probably indicate that it causes a bug at the "make install" stage in Yocto.

Normally, if a package conforms to the autotools conventions (configure, make and make install), yocto is able to compile and install it automatically with a simple recipe. Except that user and group creation needs to be done in a special way in Yocto. You can see how it is done in my Yocto recipe for shairport-sync:

http://gitweb.hugovil.com/?p=yocto/meta-hvmpd.git;a=blob_plain;f=recipes-multimedia/shairport-sync/shairport-sync_git.bb;hb=HEAD

My Yocto recipe handles the user and group creation manually, using the USERADD_* constructs. Most Yocto recipes handle user and group creation that way.

And yes, Yocto can use either systemd or sysvinit, I use systemd in my configuration. And my recipe uses the systemd files provided in shairport-sync directly, without any modification.

And by the way, thanks a lot for shairport-sync, it works very well!

@mikebrady
Copy link
Owner

Thanks for the clarifications.

@mikebrady mikebrady merged commit 9862793 into mikebrady:development Mar 8, 2024
9 checks passed
@mikebrady
Copy link
Owner

Thanks for this -- let's try it out!

@hvilleneuve29
Copy link
Author

Hi Mike,
thank you, and normally, if you don't specify the option, the behavior should be the same as before.

As a side note, I did a lot of search on how best to create users/groups when using autotools, or to add option to disable it, but couldn't find anything, and so came up with this solution.

If you or anyone has a better suggestion, I am all ears :)

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

Successfully merging this pull request may close these issues.

2 participants