Use separate patches instead of one big libsemanage-fedora.patch

This commit is contained in:
Petr Lautrbach 2019-08-13 21:11:13 +02:00
parent 079ba207f7
commit 04b65113f0
2 changed files with 21 additions and 10 deletions

View File

@ -1,7 +1,17 @@
diff --git libsemanage-2.9/src/direct_api.c libsemanage-2.9/src/direct_api.c
index c58961b..8e4d116 100644
--- libsemanage-2.9/src/direct_api.c
+++ libsemanage-2.9/src/direct_api.c
From dc105dcb5e34e256bcbcf547fea590cfcee06933 Mon Sep 17 00:00:00 2001
From: Petr Lautrbach <plautrba@redhat.com>
Date: Wed, 7 Nov 2018 18:17:34 +0100
Subject: [PATCH] libsemanage: Fix RESOURCE_LEAK and USE_AFTER_FREE coverity
scan defects
---
libsemanage/src/direct_api.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/libsemanage/src/direct_api.c b/libsemanage/src/direct_api.c
index c58961be..8e4d116d 100644
--- a/libsemanage/src/direct_api.c
+++ b/libsemanage/src/direct_api.c
@@ -1028,7 +1028,7 @@ static int semanage_direct_write_langext(semanage_handle_t *sh,
fp = NULL;
@ -51,3 +61,6 @@ index c58961b..8e4d116 100644
return status;
}
--
2.23.0.rc1

View File

@ -7,11 +7,9 @@ Version: 2.9
Release: 2%{?dist}
License: LGPLv2+
Source0: https://github.com/SELinuxProject/selinux/releases/download/20190315/libsemanage-2.9.tar.gz
# download https://raw.githubusercontent.com/fedora-selinux/scripts/master/selinux/make-fedora-selinux-patch.sh
# run:
# $ VERSION=2.9 ./make-fedora-selinux-patch.sh libsemanage
# HEAD https://github.com/fedora-selinux/selinux/commit/431f72836d6c02450725cf6ffb1c7223b9fa6acc
Patch1: libsemanage-fedora.patch
# fedora-selinux/selinux: git format-patch -N 20190315 -- libsemanage
# i=1; for j in 00*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done
Patch0001: 0001-libsemanage-Fix-RESOURCE_LEAK-and-USE_AFTER_FREE-cov.patch
URL: https://github.com/SELinuxProject/selinux/wiki
Source1: semanage.conf
@ -87,7 +85,7 @@ The libsemanage-python3 package contains the python 3 bindings for developing
SELinux management applications.
%prep
%autosetup -n libsemanage-%{version} -p 1
%autosetup -n libsemanage-%{version} -p 2
%build