6 Star 0 Fork 8

OpenCloudOS Stream/authselect

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
authselect.spec 6.62 KB
一键复制 编辑 原始数据 按行查看 历史
ocs-bot 提交于 2025-01-21 11:44 +08:00 . - [Type] bugfix
Summary: Configures authentication and identity sources from supported profiles
Name: authselect
Version: 1.4.3
Release: 7%{?dist}
License: GPLv3+
URL: https://github.com/authselect/authselect
Source0: https://github.com/authselect/authselect/archive/refs/tags/%{version}.tar.gz
Source1: password-auth.conf
Source2: system-auth.conf
Source3: other.conf
Source4: fingerprint-auth.conf
Source5: smartcard-auth.conf
Source6: config-util.conf
Source7: postlogin.conf
Patch0001: 0001-configure-drop-user-nsswitch.conf-support.patch
Patch0002: 0002-profiles-merge-groups-records-with-SUCCESS-merge.patch
Patch0003: https://github.com/authselect/authselect/commit/ddad860e11087ab21d5533f31c2da89f8200dd58.patch
BuildRequires: autoconf, automake, gcc, libtool
BuildRequires: m4, pkgconfig, pkgconfig(popt)
BuildRequires: gettext-devel, po4a, asciidoc, libcmocka-devel, libselinux-devel
Requires: authselect-libs = %{version}-%{release}
Suggests: sssd
Suggests: samba-winbind
Suggests: fprintd-pam
Suggests: oddjob-mkhomedir
%description
Authselect is designed to be a replacement for authconfig but it takes
a different approach to configure the system. Instead of letting
the administrator build the PAM stack with a tool (which may potentially
end up with a broken configuration), it would ship several tested stacks
(profiles) that solve a use-case and are well tested and supported.
At the same time, some obsolete features of authconfig are not
supported by authselect.
%package libs
Summary: Utility library used by the authselect tool
Requires(posttrans): coreutils, sed
Suggests: systemd
%description libs
This package provides common library files for authselect.
%package devel
Summary: Development libraries and headers for authselect
Requires: authselect-libs = %{version}-%{release}
%description devel
This package provides header files and libraries for developers who use authselect.
%prep
%autosetup -p1
%build
autoreconf -if
%configure
%make_build
%check
%make_build check
%install
%make_install
install -pm644 %{SOURCE1} %{buildroot}%{_datadir}/authselect/default/minimal/password-auth
install -pm644 %{SOURCE2} %{buildroot}%{_datadir}/authselect/default/minimal/system-auth
install -pm644 %{SOURCE3} %{buildroot}%{_datadir}/authselect/default/minimal/other
install -pm644 %{SOURCE4} %{buildroot}%{_datadir}/authselect/default/minimal/fingerprint-auth
install -pm644 %{SOURCE5} %{buildroot}%{_datadir}/authselect/default/minimal/smartcard-auth
install -pm644 %{SOURCE6} %{buildroot}%{_datadir}/authselect/default/minimal/config-util
install -pm644 %{SOURCE7} %{buildroot}%{_datadir}/authselect/default/minimal/postlogin
%find_lang %{name}
find %{buildroot} -name "*.la" -delete
find %{buildroot} -name "*.a" -delete
rm -rf %{buildroot}%{_datadir}/doc/authselect
%global forcefile %{_localstatedir}/lib/rpm-state/%{name}.force
%global default_profile minimal
%pre libs -p <lua>
force_file = rpm.expand("%{forcefile}")
os.remove(force_file)
if tonumber(arg[2]) >= 1
then
f = io.open(force_file, "w")
f:write("")
f:close()
end
%posttrans libs
if test -e /run/ostree-booted; then
for PROFILE in `ls %{_datadir}/authselect/default`; do
%{_bindir}/authselect create-profile $PROFILE --vendor --base-on $PROFILE --symlink-pam --symlink-dconf --symlink=REQUIREMENTS --symlink=README &> /dev/null
sed -i -e 's/{if "with-altfiles":\([^}]\+\)}/\1/g' %{_datadir}/authselect/vendor/$PROFILE/nsswitch.conf &> /dev/null
done
fi
if [ -f %{forcefile} ]; then
%{_bindir}/authselect select %{default_profile} --force &> /dev/null
%__rm -f %{forcefile}
fi
%{_bindir}/authselect apply-changes &> /dev/null
exit 0
%files libs -f %{name}.lang
%license COPYING
%doc README.md
%{_libdir}/libauthselect.so.*
%dir %{_sysconfdir}/authselect
%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/*
%ghost %attr(0644,root,root) %{_sysconfdir}/nsswitch.conf
%ghost %attr(0644,root,root) %{_sysconfdir}/pam.d/fingerprint-auth
%ghost %attr(0644,root,root) %{_sysconfdir}/pam.d/password-auth
%ghost %attr(0644,root,root) %{_sysconfdir}/pam.d/postlogin
%ghost %attr(0644,root,root) %{_sysconfdir}/pam.d/smartcard-auth
%ghost %attr(0644,root,root) %{_sysconfdir}/pam.d/system-auth
%dir %{_sharedstatedir}/authselect
%ghost %attr(0644,root,root) %{_sharedstatedir}/authselect/*
%ghost %attr(0755,root,root) %{_sharedstatedir}/authselect/backups/
%dir %{_datadir}/authselect
%{_datadir}/authselect/default/*
%{_mandir}/*
%files devel
%{_includedir}/authselect.h
%{_libdir}/libauthselect.so
%{_libdir}/pkgconfig/authselect.pc
%files
%{_bindir}/authselect
%{_sysconfdir}/bash_completion.d/authselect-completion.sh
%changelog
* Tue Jan 21 2025 Tracker Robot <trackbot@opencloudos.tech> - 1.4.3-7
- [Type] bugfix
- [DESC] Apply patches from rpm-tracker
- [Bug Fix] ddad860e11087ab21d5533f31c2da89f8200dd58.patch: configure: fix typo
* Tue Jan 14 2025 Tracker Robot <trackbot@opencloudos.tech> - 1.4.3-6
- [Type] bugfix
- [DESC] Apply patches from rpm-tracker
- [Feature Add/Remove] configure: drop user-nsswitch.conf support
- [Bug Fix] profiles: merge groups records with [SUCCESS=merge]
* Thu Dec 26 2024 Miaojun Dong <zoedong@tencent.com> - 1.4.3-5
- Remove user-nsswitch.conf functionality
* Thu Sep 26 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 1.4.3-4
- Rebuilt for clarifying the packages requirement in BaseOS and AppStream
* Fri Aug 16 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 1.4.3-3
- Rebuilt for loongarch release
* Tue Mar 12 2024 kianli <kianli@tencent.com> - 1.4.3-2
- Set coreutils requires to posttrans dependency for authselect-libs
* Fri Jan 26 2024 Miaojun Dong <zoedong@tencent.com> - 1.4.3-1
- Upgrade to version 1.4.3
* Fri Sep 08 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 1.4.2-2
- Rebuilt for OpenCloudOS Stream 23.09
* Tue Aug 08 2023 cunshunxia <cunshunxia@tencent.com> - 1.4.2-1
- upgrade to 1.4.2
* Fri Apr 28 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 1.4.0-6
- Rebuilt for OpenCloudOS Stream 23.05
* Wed Apr 12 2023 cunshunxia <cunshunxia@tencent.com> - 1.4.0-5
- remove unsupported config of minimal mode.
* Fri Apr 07 2023 cunshunxia <cunshunxia@tencent.com> - 1.4.0-4
- add scriptlets for rpm-ostree and user-nsswitch.
- change default profile to minimal with specified password-auth
* Thu Apr 06 2023 cunshunxia <cunshunxia@tencent.com> - 1.4.0-3
- add suggest requirements back.
* Fri Mar 31 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 1.4.0-2
- Rebuilt for OpenCloudOS Stream 23
* Tue Jun 21 2022 cunshunxia <cunshunxia@tencent.com> - 1.4.0-1
- initial build
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/opencloudos-stream/authselect.git
git@gitee.com:opencloudos-stream/authselect.git
opencloudos-stream
authselect
authselect
master

搜索帮助