Accepting request 989600 from home:bnavigator:branches:devel:languages:python
- Add apparmor-setuptools61-mr897.patch https://gitlab.com/apparmor/apparmor/-/merge_requests/897 - Add buildtime dependencies on python-rpm-macros and setuptools OBS-URL: https://build.opensuse.org/request/show/989600 OBS-URL: https://build.opensuse.org/package/show/security:apparmor/apparmor?expand=0&rev=340
This commit is contained in:
parent
0789b32d69
commit
629457566e
136
apparmor-setuptools61-mr897.patch
Normal file
136
apparmor-setuptools61-mr897.patch
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
Index: apparmor-3.0.4/libraries/libapparmor/swig/python/test/Makefile.am
|
||||||
|
===================================================================
|
||||||
|
--- apparmor-3.0.4.orig/libraries/libapparmor/swig/python/test/Makefile.am
|
||||||
|
+++ apparmor-3.0.4/libraries/libapparmor/swig/python/test/Makefile.am
|
||||||
|
@@ -10,8 +10,7 @@ test_python.py: test_python.py.in $(top_
|
||||||
|
|
||||||
|
CLEANFILES = test_python.py
|
||||||
|
|
||||||
|
-# bah, how brittle is this?
|
||||||
|
-PYTHON_DIST_BUILD_PATH = '$(builddir)/../build/$$($(PYTHON) -c "import sysconfig; print(\"lib.%s-%s\" %(sysconfig.get_platform(), sysconfig.get_python_version()))")'
|
||||||
|
+PYTHON_DIST_BUILD_PATH = '$(builddir)/../build/$$($(PYTHON) buildpath.py)'
|
||||||
|
|
||||||
|
TESTS = test_python.py
|
||||||
|
TESTS_ENVIRONMENT = \
|
||||||
|
Index: apparmor-3.0.4/libraries/libapparmor/swig/python/test/testbuildpath.py
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null
|
||||||
|
+++ apparmor-3.0.4/libraries/libapparmor/swig/python/test/buildpath.py
|
||||||
|
@@ -0,0 +1,10 @@
|
||||||
|
+#!/usr/bin/env python3
|
||||||
|
+# the build path has changed in setuptools 61.2
|
||||||
|
+import sys
|
||||||
|
+import sysconfig
|
||||||
|
+import setuptools
|
||||||
|
+if tuple(map(int,setuptools.__version__.split("."))) >= (61, 2):
|
||||||
|
+ identifier = sys.implementation.cache_tag
|
||||||
|
+else:
|
||||||
|
+ identifier = "%d.%d" % sys.version_info[:2]
|
||||||
|
+print("lib.%s-%s" % (sysconfig.get_platform(), identifier))
|
||||||
|
Index: apparmor-3.0.4/utils/test/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- apparmor-3.0.4.orig/utils/test/Makefile
|
||||||
|
+++ apparmor-3.0.4/utils/test/Makefile
|
||||||
|
@@ -27,8 +27,8 @@ ifdef USE_SYSTEM
|
||||||
|
BASEDIR=
|
||||||
|
PARSER=
|
||||||
|
else
|
||||||
|
- # PYTHON_DIST_BUILD_PATH based on libapparmor/swig/python/test/Makefile.am
|
||||||
|
- PYTHON_DIST_BUILD_PATH = ../../libraries/libapparmor/swig/python/build/$$($(PYTHON) -c "import sysconfig; print(\"lib.%s-%s\" %(sysconfig.get_platform(), sysconfig.get_python_version()))")
|
||||||
|
+ # PYTHON_DIST_BUILD_PATH based on libapparmor/swig/python/test/buildpath.py
|
||||||
|
+ PYTHON_DIST_BUILD_PATH = ../../libraries/libapparmor/swig/python/build/$$($(PYTHON) ../../libraries/libapparmor/swig/python/test/buildpath.py)
|
||||||
|
LIBAPPARMOR_PATH=../../libraries/libapparmor/src/.libs/
|
||||||
|
LD_LIBRARY_PATH=$(LIBAPPARMOR_PATH):$(PYTHON_DIST_BUILD_PATH)
|
||||||
|
PYTHONPATH=..:$(PYTHON_DIST_BUILD_PATH)
|
||||||
|
Index: apparmor-3.0.4/utils/test/README.md
|
||||||
|
===================================================================
|
||||||
|
--- apparmor-3.0.4.orig/utils/test/README.md
|
||||||
|
+++ apparmor-3.0.4/utils/test/README.md
|
||||||
|
@@ -7,7 +7,7 @@ For more information, refer to the [unit
|
||||||
|
Make sure to set the environment variables pointing to the in-tree apparmor modules, and the in-tree libapparmor and its python wrapper:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
-$ export PYTHONPATH=..:../../libraries/libapparmor/swig/python/build/$(/usr/bin/python3 -c "import sysconfig; print(\"lib.%s-%s\" %(sysconfig.get_platform(), sysconfig.get_python_version()))")
|
||||||
|
+$ export PYTHONPATH=..:../../libraries/libapparmor/swig/python/build/$(/usr/bin/python3 ../../libraries/libapparmor/swig/python/test/buildpath.py)
|
||||||
|
$ export __AA_CONFDIR=.
|
||||||
|
```
|
||||||
|
|
||||||
|
@@ -15,4 +15,4 @@ To execute the test individually, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ python3 ./test-tile.py ClassFoo.test_bar
|
||||||
|
-```
|
||||||
|
\ No newline at end of file
|
||||||
|
+```
|
||||||
|
Index: apparmor-3.0.4/libraries/libapparmor/swig/python/test/Makefile.in
|
||||||
|
===================================================================
|
||||||
|
--- apparmor-3.0.4.orig/libraries/libapparmor/swig/python/test/Makefile.in
|
||||||
|
+++ apparmor-3.0.4/libraries/libapparmor/swig/python/test/Makefile.in
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
|
||||||
|
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
||||||
|
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@@ -301,6 +301,7 @@ am__set_TESTS_bases = \
|
||||||
|
bases='$(TEST_LOGS)'; \
|
||||||
|
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
|
||||||
|
bases=`echo $$bases`
|
||||||
|
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
|
||||||
|
RECHECK_LOGS = $(TEST_LOGS)
|
||||||
|
AM_RECURSIVE_TARGETS = check recheck
|
||||||
|
TEST_SUITE_LOG = test-suite.log
|
||||||
|
@@ -336,8 +337,9 @@ AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
-CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
+CSCOPE = @CSCOPE@
|
||||||
|
+CTAGS = @CTAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
@@ -348,8 +350,10 @@ ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
+ETAGS = @ETAGS@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
+FILECMD = @FILECMD@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
@@ -470,9 +474,7 @@ top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
@HAVE_PYTHON_TRUE@CLEANFILES = test_python.py
|
||||||
|
-
|
||||||
|
-# bah, how brittle is this?
|
||||||
|
-@HAVE_PYTHON_TRUE@PYTHON_DIST_BUILD_PATH = '$(builddir)/../build/$$($(PYTHON) -c "import sysconfig; print(\"lib.%s-%s\" %(sysconfig.get_platform(), sysconfig.get_python_version()))")'
|
||||||
|
+@HAVE_PYTHON_TRUE@PYTHON_DIST_BUILD_PATH = '$(builddir)/../build/$$($(PYTHON) buildpath.py)'
|
||||||
|
@HAVE_PYTHON_TRUE@TESTS = test_python.py
|
||||||
|
@HAVE_PYTHON_TRUE@TESTS_ENVIRONMENT = \
|
||||||
|
@HAVE_PYTHON_TRUE@ LD_LIBRARY_PATH='$(top_builddir)/src/.libs:$(PYTHON_DIST_BUILD_PATH)' \
|
||||||
|
@@ -631,7 +633,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
|
||||||
|
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
|
||||||
|
fi; \
|
||||||
|
echo "$${col}$$br$${std}"; \
|
||||||
|
- echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
|
||||||
|
+ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
|
||||||
|
echo "$${col}$$br$${std}"; \
|
||||||
|
create_testsuite_report --maybe-color; \
|
||||||
|
echo "$$col$$br$$std"; \
|
||||||
|
@@ -686,7 +688,6 @@ test_python.py.log: test_python.py
|
||||||
|
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
|
||||||
|
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
|
||||||
|
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||||
|
-
|
||||||
|
distdir: $(BUILT_SOURCES)
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||||
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 15 23:01:42 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Add apparmor-setuptools61-mr897.patch
|
||||||
|
https://gitlab.com/apparmor/apparmor/-/merge_requests/897
|
||||||
|
- Add buildtime dependencies on python-rpm-macros and setuptools
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jun 28 21:34:26 UTC 2022 - Christian Boltz <suse-beta@cboltz.de>
|
Tue Jun 28 21:34:26 UTC 2022 - Christian Boltz <suse-beta@cboltz.de>
|
||||||
|
|
||||||
|
@ -111,6 +111,9 @@ Patch13: python310-help-mr848.patch
|
|||||||
# extend dovecot profiles for latest dovecot (boo 1199535, submitted upstream https://gitlab.com/apparmor/apparmor/-/merge_requests/881)
|
# extend dovecot profiles for latest dovecot (boo 1199535, submitted upstream https://gitlab.com/apparmor/apparmor/-/merge_requests/881)
|
||||||
Patch14: dovecot-profiles-boo1199535-mr881.diff
|
Patch14: dovecot-profiles-boo1199535-mr881.diff
|
||||||
|
|
||||||
|
# https://gitlab.com/apparmor/apparmor/-/merge_requests/897
|
||||||
|
Patch15: apparmor-setuptools61-mr897.patch
|
||||||
|
|
||||||
PreReq: sed
|
PreReq: sed
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%define apparmor_bin_prefix %{?usrmerged:/usr}/lib/apparmor
|
%define apparmor_bin_prefix %{?usrmerged:/usr}/lib/apparmor
|
||||||
@ -127,9 +130,11 @@ BuildRequires: perl(Locale::gettext)
|
|||||||
BuildRequires: swig
|
BuildRequires: swig
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-notify2
|
BuildRequires: python3-notify2
|
||||||
BuildRequires: python3-psutil
|
BuildRequires: python3-psutil
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with ruby}
|
%if %{with ruby}
|
||||||
@ -383,6 +388,7 @@ mv -v profiles/apparmor.d/usr.lib.apache2.mpm-prefork.apache2 profiles/apparmor/
|
|||||||
%patch12 -p1
|
%patch12 -p1
|
||||||
%patch13 -p1
|
%patch13 -p1
|
||||||
%patch14 -p1
|
%patch14 -p1
|
||||||
|
%patch15 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%define _lto_cflags %{nil}
|
%define _lto_cflags %{nil}
|
||||||
|
Loading…
Reference in New Issue
Block a user