[Pcsclite-muscle] pcsc-lite-2.2.0: --sbindir meson option broken?
balducci at units.it
balducci at units.it
Sat May 4 07:15:22 PDT 2024
hello
Apologies if I am missing some blatant point here (I'm not expert in meson)
Looks like the --sbindir meson option is broken in pcsc-lite-2.2.0.
During a test I configure with:
----8<----
--prefix=/tmp/pcsc-lite-test/pcsc-lite-2.2.0/usr
--libdir=/tmp/pcsc-lite-test/pcsc-lite-2.2.0/usr/lib64
--sbindir=/tmp/pcsc-lite-test/pcsc-lite-2.2.0/usr/sbin
--sysconfdir=/tmp/pcsc-lite-test/pcsc-lite/etc/pcsc-lite
-Dpolkit=false
-Dusbdropdir="/tmp/pcsc-lite-test/pcsc-lite-2.2.0/usr/lib64/pcsc/drivers"
-Dlibsystemd=false
---->8----
At the end of meson configuration the user defined options appear to
correct:
----8<----
pcsc-lite 2.2.0
User defined options
libdir : /tmp/pcsc-lite-test/pcsc-lite-2.2.0/usr/lib64
prefix : /tmp/pcsc-lite-test/pcsc-lite-2.2.0/usr
sbindir : /tmp/pcsc-lite-test/pcsc-lite-2.2.0/usr/sbin
sysconfdir: /tmp/pcsc-lite-test/pcsc-lite/etc/pcsc-lite
libsystemd: false
polkit : false
usbdropdir: /tmp/pcsc-lite-test/pcsc-lite-2.2.0/usr/lib64/pcsc/drivers
Found ninja-1.12.0 at /usr/bin/ninja
---->8----
but at install time the build throws this error (running as simple user):
----8<----
ninja: Entering directory `.build'
[0/1] Installing files.
Traceback (most recent call last):
File "/usr/python3/site_python3/lib64/meson/mesonbuild/mesonmain.py", line 186, in run
return options.run_func(options)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/python3/site_python3/lib64/meson/mesonbuild/minstall.py", line 863, in run
installer.do_install(datafilename)
File "/usr/python3/site_python3/lib64/meson/mesonbuild/minstall.py", line 543, in do_install
self.install_targets(d, dm, destdir, fullprefix)
File "/usr/python3/site_python3/lib64/meson/mesonbuild/minstall.py", line 740, in install_targets
file_copied = self.do_copyfile(fname, outname, makedirs=(dm, outdir))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/python3/site_python3/lib64/meson/mesonbuild/minstall.py", line 420, in do_copyfile
self.copy2(from_file, to_file)
File "/usr/python3/site_python3/lib64/meson/mesonbuild/minstall.py", line 317, in copy2
shutil.copy2(*args, **kwargs)
File "/opt/stow.d/versions/python3-3.12.3/usr/python3/lib64/python3.12/shutil.py", line 475, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/opt/stow.d/versions/python3-3.12.3/usr/python3/lib64/python3.12/shutil.py", line 262, in copyfile
with open(dst, 'wb') as fdst:
^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/sbin/pcscd'
Installing pcscd to /sbin
ERROR: Unhandled python OSError. This is probably not a Meson bug, but an issue with your build environment.
FAILED: meson-internal__install
/usr/bin/meson install --no-rebuild
ninja: build stopped: subcommand failed.
---->8----
Brutally patching meson.build as per:
----8<----
diff -c ./meson.build.FIX_SBINDIR ./meson.build
*** ./meson.build.FIX_SBINDIR 2024-05-04 15:01:04.750714792 +0200
--- ./meson.build 2024-05-04 15:01:04.750714792 +0200
***************
*** 24,30 ****
'VERSION' : meson.project_version(),
'ipcdir' : get_option('ipcdir'),
'sysconfdir' : get_option('sysconfdir'),
! 'sbindir_exp' : '/' / get_option('sbindir'),
'PCSCLITE_CONFIG_DIR' : get_option('serialconfdir'),
'usbdropdir' : get_option('usbdropdir'),
})
--- 24,30 ----
'VERSION' : meson.project_version(),
'ipcdir' : get_option('ipcdir'),
'sysconfdir' : get_option('sysconfdir'),
! 'sbindir_exp' : get_option('sbindir'),
'PCSCLITE_CONFIG_DIR' : get_option('serialconfdir'),
'usbdropdir' : get_option('usbdropdir'),
})
***************
*** 143,149 ****
dependencies : pcscd_dep,
c_args: '-DPCSCD',
export_dynamic : true,
! install_dir : '/' / get_option('sbindir'),
install : true)
# libpcsclite_real library
--- 143,149 ----
dependencies : pcscd_dep,
c_args: '-DPCSCD',
export_dynamic : true,
! install_dir : get_option('sbindir'),
install : true)
# libpcsclite_real library
---->8----
allows to install the pcscd daemon in the directory requested with the
--sbindir option. (Note: the above patch is by no means correct in
general: it does not work when --sbindir is not specified; it only
shows the possible origin of the problem)
Running meson-1.4.0 under python-3.12.3
thanks a lot for your valuable work
ciao
-g
More information about the pcsclite-muscle
mailing list