diff --git a/pam_wrapper-1.1.4.tar.gz b/pam_wrapper-1.1.4.tar.gz new file mode 100644 index 0000000..c7563d8 Binary files /dev/null and b/pam_wrapper-1.1.4.tar.gz differ diff --git a/pam_wrapper-1.1.4.tar.gz.asc b/pam_wrapper-1.1.4.tar.gz.asc new file mode 100644 index 0000000..b32577a --- /dev/null +++ b/pam_wrapper-1.1.4.tar.gz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEEjf9T4Y8qvI2PPJIjfuD8TcwBTj0FAmF6YZYACgkQfuD8TcwB +Tj0dCA//drNm6b6q3GhW1CX5Gksc9mNCbatwHYZMCOz1Km1TXEM6pQzIYU4JJiIX +yRARln4dlrNHifsUbKOL0ipoRiCzBXeN1NK47TbefOB0vumykJwuG6LNBzbAz+a4 +iAZfvT5D2OPEJG7fkB5Pr97/AD09y5T8LlqphIsMDWTFuDErqm19MwfCgdaLA2jU +3qA9MR88HTg5wyQIJ5cfjz1qVWfQlFUxsUy+D39HE7IotAxZISfJn8+mDToznFoG +ZD0O4oMEUOvMelQPNeHworihlEVaTz9/k5VtTWAE70PzEQgxNWq1C8WOJpJ2TUDD +H8aE0/6UC2u9ava5fUuzBeIaz4hqsnKIdgeLMxne9PoSLSyyAnjRseWwdhAiJmnh +0JzKoqrB8bFQ446por2lBkJcph23w2jhrLPm/6nupndSFPPU0VKzA0R2MmR3T6JW +wmJO3Eqs04P59k+4vxog9/AqHip6VF4WGtmE1sVwZdEeMEfBkXINUF31NIigCHkB +1n1mbzxBTFb16+Qur0QpmeE5jLL/X1WWx6qWMcVZCxpNGarIjd18aMmiQmqO+ilU +KYbdxc9ssCb/oyWHBLJW/jVzpBwUiN93I7iQaqb+2Se1Y9PI/E5mA2OHFiIXDpU5 +m39WX2jK9c393jlRY+geg2AQlYQ6I4TFdk1USiaMeZT6HuqMFTg= +=wA4W +-----END PGP SIGNATURE----- diff --git a/pam_wrapper.keyring b/pam_wrapper.keyring new file mode 100644 index 0000000..411bf36 Binary files /dev/null and b/pam_wrapper.keyring differ diff --git a/pam_wrapper.spec b/pam_wrapper.spec new file mode 100644 index 0000000..26ba2f0 --- /dev/null +++ b/pam_wrapper.spec @@ -0,0 +1,153 @@ +Name: pam_wrapper +Version: 1.1.4 +Release: 1 + +Summary: A tool to test PAM applications and PAM modules +License: GPLv3+ +Url: http://cwrap.org/ + +Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz +Source1: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz.asc +Source2: pam_wrapper.keyring + +BuildRequires: gcc +BuildRequires: gnupg2 +BuildRequires: cmake +BuildRequires: libcmocka-devel +BuildRequires: python3-devel +BuildRequires: pam-devel +BuildRequires: doxygen +BuildRequires: git + +Recommends: cmake +Recommends: pkgconfig + +%description +This component of cwrap allows you to either test your PAM (Linux-PAM +and OpenPAM) application or module. + +For testing PAM applications, simple PAM module called pam_matrix is +included. If you plan to test a PAM module you can use the pamtest library, +which simplifies testing of modules. You can combine it with the cmocka +unit testing framework or you can use the provided Python bindings to +write tests for your module in Python. + + +%package -n libpamtest +Summary: A tool to test PAM applications and PAM modules +License: GPLv3+ +Requires: pam_wrapper = %{version}-%{release} + +%description -n libpamtest +If you plan to test a PAM module you can use this library, which simplifies +testing of modules. + + +%package -n libpamtest-devel +Summary: A tool to test PAM applications and PAM modules +License: GPLv3+ +Requires: pam_wrapper = %{version}-%{release} +Requires: libpamtest = %{version}-%{release} + +Recommends: cmake +Recommends: pkgconfig + + +%description -n libpamtest-devel +If you plan to develop tests for a PAM module you can use this library, +which simplifies testing of modules. This sub package includes the header +files for libpamtest. + +%package -n libpamtest-doc +Summary: The libpamtest API documentation +License: GPLv3+ + +%description -n libpamtest-doc +Documentation for libpamtest development. + + +%package -n python3-libpamtest +Summary: A python wrapper for libpamtest +License: GPLv3+ +Requires: pam_wrapper = %{version}-%{release} +Requires: libpamtest = %{version}-%{release} + +%description -n python3-libpamtest +If you plan to develop python tests for a PAM module you can use this +library, which simplifies testing of modules. This subpackage includes +the header files for libpamtest + + +%prep +gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} +%autosetup -S git + + +%build +if test ! -e "obj"; then + mkdir obj +fi +pushd obj +%cmake \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DUNIT_TESTING=ON \ + %{_builddir}/%{name}-%{version} + +make %{?_smp_mflags} VERBOSE=1 +make doc VERBOSE=1 +popd + + +%install +pushd obj +make DESTDIR=%{buildroot} install +popd + +%ldconfig_scriptlets + +%ldconfig_scriptlets -n libpamtest + + +%check +pushd obj +ctest -V +popd + +%files +%{_libdir}/libpam_wrapper.so* +%{_libdir}/pkgconfig/pam_wrapper.pc +%dir %{_libdir}/cmake/pam_wrapper +%{_libdir}/cmake/pam_wrapper/pam_wrapper-config-version.cmake +%{_libdir}/cmake/pam_wrapper/pam_wrapper-config.cmake +%{_libdir}/pam_wrapper/pam_chatty.so +%{_libdir}/pam_wrapper/pam_matrix.so +%{_libdir}/pam_wrapper/pam_get_items.so +%{_libdir}/pam_wrapper/pam_set_items.so +%{_mandir}/man1/pam_wrapper.1* +%{_mandir}/man8/pam_chatty.8* +%{_mandir}/man8/pam_matrix.8* +%{_mandir}/man8/pam_get_items.8* +%{_mandir}/man8/pam_set_items.8* + +%files -n libpamtest +%{_libdir}/libpamtest.so.* + +%files -n libpamtest-devel +%{_libdir}/libpamtest.so +%{_libdir}/pkgconfig/libpamtest.pc +%dir %{_libdir}/cmake/pamtest +%{_libdir}/cmake/pamtest/pamtest-config-relwithdebinfo.cmake +%{_libdir}/cmake/pamtest/pamtest-config-version.cmake +%{_libdir}/cmake/pamtest/pamtest-config.cmake +%{_includedir}/libpamtest.h + +%files -n libpamtest-doc +%doc obj/doc/html + +%files -n python3-libpamtest +%{python3_sitearch}/pypamtest.so + +%changelog +* Mon May 30 2022 chenchen - 1.1.4-1 +- Package init +