!5 [sync] PR-4: add dde.conf

From: @openeuler-sync-bot 
Reviewed-by: @yeqinglong01 
Signed-off-by: @yeqinglong01
This commit is contained in:
openeuler-ci-bot 2022-08-03 05:15:53 +00:00 committed by Gitee
commit 6e531dd5dc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 22 additions and 8 deletions

12
dde.conf Normal file
View File

@ -0,0 +1,12 @@
[Password]
STRONG_PASSWORD = true
PASSWORD_MIN_LENGTH = 8
PASSWORD_MAX_LENGTH = 511
VALIDATE_POLICY = 1234567890;abcdefghijklmnopqrstuvwxyz;ABCDEFGHIJKLMNOPQRSTUVWXYZ;!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
VALIDATE_REQUIRED = 3
PALINDROME_NUM = 4
WORD_CHECK = 1
MONOTONE_CHARACTER_NUM = 0
CONSECUTIVE_SAME_CHARACTER_NUM = 0
DICT_PATH =
FIRST_LETTER_UPPERCASE = false

View File

@ -7,12 +7,13 @@
%endif %endif
Name: deepin-pw-check Name: deepin-pw-check
Version: 5.0.20.7 Version: 5.0.20.7
Release: 1 Release: 2
Summary: Used to check password and manager the configuration for password. Summary: Used to check password and manager the configuration for password.
License: GPL-3.0 License: GPL-3.0
URL: https://github.com/linuxdeepin/%{name} URL: https://github.com/linuxdeepin/%{name}
Source0: %{name}-%{version}.orig.tar.xz Source0: %{name}-%{version}.orig.tar.xz
Source1: vendor.tar.gz Source1: vendor.tar.gz
Source2: dde.conf
BuildRequires: golang BuildRequires: golang
BuildRequires: pam-devel BuildRequires: pam-devel
@ -55,15 +56,10 @@ export GOPATH=%{_builddir}/%{name}-%{version}/vendor:$GOPATH
%make_build GO_BUILD_FLAGS=-trimpath GOBUILD="go build -compiler gc -ldflags \"-B $BUILDID\"" %make_build GO_BUILD_FLAGS=-trimpath GOBUILD="go build -compiler gc -ldflags \"-B $BUILDID\""
%post %post
pwd-conf-update
sed -i "s/pam_pwquality.so/pam_deepin_pw_check.so/g" /etc/pam.d/system-auth
sed -i "s/pam_pwquality.so/pam_deepin_pw_check.so/g" /etc/pam.d/password-auth
%postun %postun
if [ "$1" = "0" ] ; then
sed -i "s/pam_deepin_pw_check.so/pam_pwquality.so/g" /etc/pam.d/system-auth
sed -i "s/pam_deepin_pw_check.so/pam_pwquality.so/g" /etc/pam.d/password-auth
fi
%install %install
mkdir -p %{buildroot}/%{_sysconfdir}/deepin mkdir -p %{buildroot}/%{_sysconfdir}/deepin
@ -72,11 +68,14 @@ export PKG_FILE_DIR=%{_libdir}/pkgconfig
%make_install PKG_FILE_DIR=%{_libdir}/pkgconfig LIBDIR=lib64 PAM_MODULE_DIR=%{_libdir}/security GOBUILD="go build -compiler gc -ldflags \"-B $BUILDID\"" %make_install PKG_FILE_DIR=%{_libdir}/pkgconfig LIBDIR=lib64 PAM_MODULE_DIR=%{_libdir}/security GOBUILD="go build -compiler gc -ldflags \"-B $BUILDID\""
%find_lang deepin-pw-check %find_lang deepin-pw-check
install -Dm644 %{SOURCE2} %{buildroot}%{_sysconfdir}/deepin/dde.conf
%files -f deepin-pw-check.lang %files -f deepin-pw-check.lang
%doc README.md %doc README.md
%license %license
%dir %{_sysconfdir}/deepin %dir %{_sysconfdir}/deepin
%{_sysconfdir}/deepin/dde.conf
%{_bindir}/pwd-conf-update %{_bindir}/pwd-conf-update
%{_prefix}/lib/deepin-pw-check/deepin-pw-check %{_prefix}/lib/deepin-pw-check/deepin-pw-check
%{_libdir}/libdeepin_pw_check.so.* %{_libdir}/libdeepin_pw_check.so.*
@ -92,5 +91,8 @@ export PKG_FILE_DIR=%{_libdir}/pkgconfig
%{_includedir}/deepin_pw_check.h %{_includedir}/deepin_pw_check.h
%changelog %changelog
* Tue Aug 02 2022 liweiganga <liweiganga@uniontech.com> - 5.0.20.7-2
- add dde.conf
* Fri Jul 22 2022 konglidong <konglidong@uniontech.com> - 5.0.20.7-1 * Fri Jul 22 2022 konglidong <konglidong@uniontech.com> - 5.0.20.7-1
- package init - package init