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

meson: add options to disable polkit and libsystemd #203

Closed
wants to merge 1 commit into from

Conversation

brad0
Copy link
Contributor

@brad0 brad0 commented Aug 14, 2024

No description provided.

@LudovicRousseau
Copy link
Owner

You can already build without polkit using: meson setup -Dpolkit=false.

What problem do you want to solve?

@ssauvin
Copy link

ssauvin commented Aug 22, 2024

Hello!

I was about to send the same patch for PolKit on Debian's Salsa but my spider sense made me check GitHub first.

@LudovicRousseau, currently this build option will only make PolKit optional at compilation time and disable it only if polkit-gobject-1 is actually missing on the system. For example, if I have PolKit available and -Dpolkit=false, pcscd will still use PolKit because polkit_dep.found() will be true.

Disclaimer, I haven't tested it without libsystemd, only without polkit.

With the current Meson configuration (slightly redacted for readability):

❯ meson setup -Dpolkit=false build
The Meson build system
Version: 1.5.1
[...]
Library dl found: YES
Run-time dependency polkit-gobject-1 found: YES 124
Run-time dependency libsystemd found: YES 256
[...]
pcsc-lite 2.3.0

  User defined options
    polkit: false

Found ninja-1.12.1 at /usr/host/bin/ninja

❯ cd build && meson compile
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/host/bin/ninja
[45/45] Linking target testpcsc

❯ ./pcscd -v | grep Enabled
Enabled features: USB serial filter_names libudev polkit systemd Linux x86_64 ipcdir=/run/pcscd usbdropdir=/usr/lib/pcsc/drivers serialconfdir=/etc/reader.conf.d

With this PR:

❯ curl -s https://github.com/LudovicRousseau/PCSC/commit/bde1526e879804bbcadf65cb8b532531dd0e56b8.patch | patch
patching file meson.build

❯ meson setup -Dpolkit=false build
[...]
Library dl found: YES
Run-time dependency libsystemd found: YES 256
[...]
pcsc-lite 2.3.0

  User defined options
    polkit: false

Found ninja-1.12.1 at /usr/host/bin/ninja

❯ cd build && meson compile
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/host/bin/ninja
[45/45] Linking target libpcsclite_real.so.1

❯ ./pcscd -v | grep Enabled
Enabled features: USB serial filter_names libudev systemd Linux x86_64 ipcdir=/run/pcscd usbdropdir=/usr/lib/pcsc/drivers serialconfdir=/etc/reader.conf.d

Thank you!

@LudovicRousseau
Copy link
Owner

Merged in d688f7e

Thanks

@brad0 brad0 deleted the meson_options branch August 23, 2024 22:25
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.

3 participants