Accepting request 931252 from home:gmbr3:Active
- Change to systemd-sysusers OBS-URL: https://build.opensuse.org/request/show/931252 OBS-URL: https://build.opensuse.org/package/show/security:chipcard/pcsc-lite?expand=0&rev=172
This commit is contained in:
committed by
Git OBS Bridge
parent
b0ba46745c
commit
1748f5fb39
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Nov 13 13:20:53 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
|
||||||
|
|
||||||
|
- Change to systemd-sysusers
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Oct 18 13:25:25 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
|
Mon Oct 18 13:25:25 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
|
||||||
|
|
||||||
|
@@ -39,21 +39,23 @@ Source4: baselibs.conf
|
|||||||
Source6: pcsc-lite-reader-conf
|
Source6: pcsc-lite-reader-conf
|
||||||
Source7: https://pcsclite.apdu.fr/files/%{name}-%{version}.tar.bz2.asc
|
Source7: https://pcsclite.apdu.fr/files/%{name}-%{version}.tar.bz2.asc
|
||||||
Source8: %{name}.keyring
|
Source8: %{name}.keyring
|
||||||
|
Source9: %{name}.sysusers
|
||||||
Patch0: systemd-service.patch
|
Patch0: systemd-service.patch
|
||||||
Patch1: harden_pcscd.service.patch
|
Patch1: harden_pcscd.service.patch
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: pkg-config
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
BuildRequires: pkgconfig(libsystemd)
|
BuildRequires: pkgconfig(libsystemd)
|
||||||
|
BuildRequires: sysuser-tools
|
||||||
Requires: libpcsclite1 = %{version}
|
Requires: libpcsclite1 = %{version}
|
||||||
Requires(post): %fillup_prereq
|
Requires(post): %fillup_prereq
|
||||||
Requires(pre): shadow
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: polkit-devel
|
BuildRequires: polkit-devel
|
||||||
BuildRequires: systemd-rpm-macros
|
BuildRequires: systemd-rpm-macros
|
||||||
BuildRequires: pkgconfig(libudev)
|
BuildRequires: pkgconfig(libudev)
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
|
%sysusers_requires
|
||||||
|
|
||||||
%description
|
%description
|
||||||
PC/SC Lite provides a Windows SCard interface in a small form factor
|
PC/SC Lite provides a Windows SCard interface in a small form factor
|
||||||
@@ -113,6 +115,7 @@ cp -a %{SOURCE1} %{SOURCE2} %{SOURCE6} .
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%sysusers_generate_pre %{SOURCE9} %{PKG_USER} %{PKG_USER}.conf
|
||||||
%configure \
|
%configure \
|
||||||
--disable-silent-rules \
|
--disable-silent-rules \
|
||||||
--docdir=%{_docdir}/%{name} \
|
--docdir=%{_docdir}/%{name} \
|
||||||
@@ -135,10 +138,9 @@ mkdir -p %{buildroot}%{_docdir}/%{name}
|
|||||||
cp -a AUTHORS ChangeLog COPYING HELP NEWS README README.SUSE SECURITY TODO %{buildroot}%{_docdir}/%{name}
|
cp -a AUTHORS ChangeLog COPYING HELP NEWS README README.SUSE SECURITY TODO %{buildroot}%{_docdir}/%{name}
|
||||||
# Remove useless la files
|
# Remove useless la files
|
||||||
find %{buildroot} -type f -name "*.la" -delete -print
|
find %{buildroot} -type f -name "*.la" -delete -print
|
||||||
|
install -Dm0644 %{SOURCE9} %{buildroot}%{_sysusersdir}/%{PKG_USER}.conf
|
||||||
|
|
||||||
%pre
|
%pre -f %{PKG_USER}.pre
|
||||||
getent group %{PKG_GROUP} >/dev/null || groupadd -r %{PKG_GROUP}
|
|
||||||
getent passwd %{PKG_USER} >/dev/null || useradd -r -g %{PKG_GROUP} -s %{_sbindir}/nologin -c "Smart Card Reader" -d /run/pcscd %{PKG_USER}
|
|
||||||
%service_add_pre pcscd.service pcscd.socket
|
%service_add_pre pcscd.service pcscd.socket
|
||||||
|
|
||||||
%post
|
%post
|
||||||
@@ -178,6 +180,7 @@ getent passwd %{PKG_USER} >/dev/null || useradd -r -g %{PKG_GROUP} -s %{_sbindir
|
|||||||
%config(noreplace) %{_sysconfdir}/reader.conf.d/reader.conf
|
%config(noreplace) %{_sysconfdir}/reader.conf.d/reader.conf
|
||||||
%{ifddir}
|
%{ifddir}
|
||||||
%{_unitdir}/*
|
%{_unitdir}/*
|
||||||
|
%{_sysusersdir}/%{PKG_USER}.conf
|
||||||
%{_fillupdir}/sysconfig.pcscd
|
%{_fillupdir}/sysconfig.pcscd
|
||||||
# libpcsclite.so should stay in the main package (#732911). Third party packages may need it for dlopen().
|
# libpcsclite.so should stay in the main package (#732911). Third party packages may need it for dlopen().
|
||||||
%{_libdir}/libpcsclite.so
|
%{_libdir}/libpcsclite.so
|
||||||
|
2
pcsc-lite.sysusers
Normal file
2
pcsc-lite.sysusers
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#Type Name ID GECOS Home directory Shell
|
||||||
|
u scard - "Smart Card Reader" /run/pcscd -
|
Reference in New Issue
Block a user