diff --git a/.gitignore b/.gitignore index be1042f..a8611e2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ SOURCES/pam_wrapper-1.1.4.tar.gz -SOURCES/pam_wrapper.keyring diff --git a/.pam_wrapper.metadata b/.pam_wrapper.metadata index e38b35d..98b2a02 100644 --- a/.pam_wrapper.metadata +++ b/.pam_wrapper.metadata @@ -1,2 +1 @@ -dde61c296979dafd7a526995acb2acef6b119357 SOURCES/pam_wrapper-1.1.4.tar.gz -3f2ab0bca02893402ba0ad172a6bd44456a65f86 SOURCES/pam_wrapper.keyring +dde61c296979dafd7a526995acb2acef6b119357 SOURCES/pam_wrapper-1.1.4.tar.gz diff --git a/SOURCES/pam_wrapper-fix-cmocka-1.1.6+-support.patch b/SOURCES/pam_wrapper-fix-cmocka-1.1.6+-support.patch new file mode 100644 index 0000000..125b85c --- /dev/null +++ b/SOURCES/pam_wrapper-fix-cmocka-1.1.6+-support.patch @@ -0,0 +1,107 @@ +From 9e7f8ac9ee1f968ac8af2d9c2e9dbd91a3090b73 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Fri, 17 Feb 2023 18:08:45 +0100 +Subject: [PATCH 1/2] cmake: Drop FindCMocka.cmake Module +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We should use config mode. + +Signed-off-by: Andreas Schneider +Reviewed-by: Pavel Filipenský +--- + cmake/Modules/FindCMocka.cmake | 49 ---------------------------------- + 1 file changed, 49 deletions(-) + delete mode 100644 cmake/Modules/FindCMocka.cmake + +diff --git a/cmake/Modules/FindCMocka.cmake b/cmake/Modules/FindCMocka.cmake +deleted file mode 100644 +index 2dd9fc5..0000000 +--- a/cmake/Modules/FindCMocka.cmake ++++ /dev/null +@@ -1,49 +0,0 @@ +-# - Try to find CMocka +-# Once done this will define +-# +-# CMOCKA_ROOT_DIR - Set this variable to the root installation of CMocka +-# +-# Read-Only variables: +-# CMOCKA_FOUND - system has CMocka +-# CMOCKA_INCLUDE_DIR - the CMocka include directory +-# CMOCKA_LIBRARIES - Link these to use CMocka +-# CMOCKA_DEFINITIONS - Compiler switches required for using CMocka +-# +-#============================================================================= +-# Copyright (c) 2011-2012 Andreas Schneider +-# +-# Distributed under the OSI-approved BSD License (the "License"); +-# see accompanying file Copyright.txt for details. +-# +-# This software is distributed WITHOUT ANY WARRANTY; without even the +-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +-# See the License for more information. +-#============================================================================= +-# +- +-find_path(CMOCKA_INCLUDE_DIR +- NAMES +- cmocka.h +- PATHS +- ${CMOCKA_ROOT_DIR}/include +-) +- +-find_library(CMOCKA_LIBRARY +- NAMES +- cmocka +- PATHS +- ${CMOCKA_ROOT_DIR}/include +-) +- +-if (CMOCKA_LIBRARY) +- set(CMOCKA_LIBRARIES +- ${CMOCKA_LIBRARIES} +- ${CMOCKA_LIBRARY} +- ) +-endif (CMOCKA_LIBRARY) +- +-include(FindPackageHandleStandardArgs) +-find_package_handle_standard_args(CMocka DEFAULT_MSG CMOCKA_LIBRARIES CMOCKA_INCLUDE_DIR) +- +-# show the CMOCKA_INCLUDE_DIR and CMOCKA_LIBRARIES variables only in the advanced view +-mark_as_advanced(CMOCKA_INCLUDE_DIR CMOCKA_LIBRARIES) +-- +2.39.2 + + +From 8e94874bf5c0d569a16985eafa9922d8c527a9fb Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Fri, 17 Feb 2023 17:51:27 +0100 +Subject: [PATCH 2/2] cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Andreas Schneider +Reviewed-by: Pavel Filipenský +--- + tests/CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 9d56f21..26f2da2 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -1,5 +1,9 @@ + project(tests C) + ++if (TARGET cmocka::cmocka) ++ set(CMOCKA_LIBRARY cmocka::cmocka) ++endif() ++ + set(PAM_MATRIX_PATH "${CMAKE_BINARY_DIR}/src/modules/pam_matrix.so") + + configure_file(services/matrix.in ${CMAKE_CURRENT_BINARY_DIR}/services/matrix @ONLY) +-- +2.39.2 + diff --git a/SOURCES/pam_wrapper.keyring b/SOURCES/pam_wrapper.keyring new file mode 100644 index 0000000..411bf36 Binary files /dev/null and b/SOURCES/pam_wrapper.keyring differ diff --git a/SPECS/pam_wrapper.spec b/SPECS/pam_wrapper.spec index 3792371..c92ff85 100644 --- a/SPECS/pam_wrapper.spec +++ b/SPECS/pam_wrapper.spec @@ -1,20 +1,23 @@ Name: pam_wrapper Version: 1.1.4 -Release: 2%{?dist} +Release: 14%{?dist} Summary: A tool to test PAM applications and PAM modules -License: GPLv3+ +License: GPL-3.0-or-later 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 +Patch0: pam_wrapper-fix-cmocka-1.1.6+-support.patch + BuildRequires: gcc BuildRequires: gnupg2 BuildRequires: cmake BuildRequires: libcmocka-devel BuildRequires: python3-devel +BuildRequires: python3-setuptools BuildRequires: pam-devel BuildRequires: doxygen BuildRequires: git @@ -74,13 +77,16 @@ 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 +Python module to quickly write tests in Python. %prep -gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} -%autosetup -S git +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' +%autosetup -p1 +# Not compatible with Python 3.12 headers +sed -i -e '/Werror=declaration-after-statement/d' CompilerChecks.cmake +# renamed in Python 3.2, old name dropped in 3.12 +sed -i -e 's/assertRaisesRegexp/assertRaisesRegex/' tests/pypamtest_test.py %build @@ -138,18 +144,60 @@ gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} %{python3_sitearch}/pypamtest.so %changelog -* Tue May 03 2022 Norbert Pocs - 1.1.4-2 -- related: rhbz#2048653 - Add package to CRB +* Mon Dec 16 2024 Arkady L. Shane - 1.1.4-14 +- Rebuilt for MSVSphere 10 + +* Tue Oct 29 2024 Troy Dawson - 1.1.4-14 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 + +* Mon Jun 24 2024 Troy Dawson - 1.1.4-13 +- Bump release for June 2024 mass rebuild + +* Thu Jan 25 2024 Fedora Release Engineering - 1.1.4-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 1.1.4-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Nov 24 2023 Andreas Schneider - 1.1.4-10 +- Fix description of python3-libpamtest + +* Thu Jul 20 2023 Fedora Release Engineering - 1.1.4-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jun 13 2023 Python Maint - 1.1.4-8 +- Rebuilt for Python 3.12 + +* Mon Mar 06 2023 Andreas Schneider - 1.1.4-7 +- Update License to SPDX expression + +* Mon Feb 27 2023 Andreas Schneider - 1.1.4-6 +- Fix building with cmocka >= 1.1.6 + +* Thu Jan 19 2023 Fedora Release Engineering - 1.1.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 1.1.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 1.1.4-3 +- Rebuilt for Python 3.11 + +* Thu Jan 20 2022 Fedora Release Engineering - 1.1.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Oct 28 2021 Andreas Schneider - 1.1.4-1 +- Update to version 1.1.4 -* Thu Apr 21 2022 Andreas Schneider - 1.1.4-1 -- related: rhbz#2028819 - Update to version 1.1.4 +* Wed Sep 15 2021 Jakub Jelen - 1.1.3-9 +- Fix PID range as reported in #1881377 -* Mon Aug 09 2021 Mohan Boddu - 1.1.3-8 -- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Related: rhbz#1991688 +* Thu Jul 22 2021 Fedora Release Engineering - 1.1.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild -* Fri Apr 16 2021 Mohan Boddu - 1.1.3-7 -- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 +* Fri Jun 04 2021 Python Maint - 1.1.3-7 +- Rebuilt for Python 3.10 * Tue Jan 26 2021 Fedora Release Engineering - 1.1.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild