From cd8baf7385a5d03c0a86b26125291db06f7e2942 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Fri, 25 May 2018 10:49:08 +0200 Subject: [PATCH] libselinux-2.8-1 - SELinux userspace 2.8 release --- .gitignore | 1 + libselinux-fedora.patch | 84 ++++++++++++++++++++--------------------- libselinux.spec | 18 ++++----- sources | 2 +- 4 files changed, 53 insertions(+), 52 deletions(-) diff --git a/.gitignore b/.gitignore index 45bc76f..5a1776e 100644 --- a/.gitignore +++ b/.gitignore @@ -208,3 +208,4 @@ libselinux-2.0.96.tgz /libselinux-2.8-rc1.tar.gz /libselinux-2.8-rc2.tar.gz /libselinux-2.8-rc3.tar.gz +/libselinux-2.8.tar.gz diff --git a/libselinux-fedora.patch b/libselinux-fedora.patch index 3a46792..19ad942 100644 --- a/libselinux-fedora.patch +++ b/libselinux-fedora.patch @@ -1,7 +1,7 @@ -diff --git libselinux-2.8-rc3/man/man8/selinux.8 libselinux-2.8-rc3/man/man8/selinux.8 +diff --git libselinux-2.8/man/man8/selinux.8 libselinux-2.8/man/man8/selinux.8 index e37aee6..bf23b65 100644 ---- libselinux-2.8-rc3/man/man8/selinux.8 -+++ libselinux-2.8-rc3/man/man8/selinux.8 +--- libselinux-2.8/man/man8/selinux.8 ++++ libselinux-2.8/man/man8/selinux.8 @@ -91,11 +91,13 @@ This manual page was written by Dan Walsh . .BR sepolicy (8), .BR system-config-selinux (8), @@ -17,10 +17,10 @@ index e37aee6..bf23b65 100644 Every confined service on the system has a man page in the following format: .br -diff --git libselinux-2.8-rc3/src/avc_sidtab.c libselinux-2.8-rc3/src/avc_sidtab.c +diff --git libselinux-2.8/src/avc_sidtab.c libselinux-2.8/src/avc_sidtab.c index 9669264..c775430 100644 ---- libselinux-2.8-rc3/src/avc_sidtab.c -+++ libselinux-2.8-rc3/src/avc_sidtab.c +--- libselinux-2.8/src/avc_sidtab.c ++++ libselinux-2.8/src/avc_sidtab.c @@ -81,6 +81,11 @@ sidtab_context_to_sid(struct sidtab *s, int hvalue, rc = 0; struct sidtab_node *cur; @@ -33,10 +33,10 @@ index 9669264..c775430 100644 *sid = NULL; hvalue = sidtab_hash(ctx); -diff --git libselinux-2.8-rc3/src/booleans.c libselinux-2.8-rc3/src/booleans.c +diff --git libselinux-2.8/src/booleans.c libselinux-2.8/src/booleans.c index b3ea362..a6d46fe 100644 ---- libselinux-2.8-rc3/src/booleans.c -+++ libselinux-2.8-rc3/src/booleans.c +--- libselinux-2.8/src/booleans.c ++++ libselinux-2.8/src/booleans.c @@ -55,6 +55,7 @@ int security_get_boolean_names(char ***names, int *len) snprintf(path, sizeof path, "%s%s", selinux_mnt, SELINUX_BOOL_DIR); *len = scandir(path, &namelist, &filename_select, alphasort); @@ -45,10 +45,10 @@ index b3ea362..a6d46fe 100644 return -1; } -diff --git libselinux-2.8-rc3/src/canonicalize_context.c libselinux-2.8-rc3/src/canonicalize_context.c +diff --git libselinux-2.8/src/canonicalize_context.c libselinux-2.8/src/canonicalize_context.c index ba4c9a2..c815872 100644 ---- libselinux-2.8-rc3/src/canonicalize_context.c -+++ libselinux-2.8-rc3/src/canonicalize_context.c +--- libselinux-2.8/src/canonicalize_context.c ++++ libselinux-2.8/src/canonicalize_context.c @@ -17,6 +17,11 @@ int security_canonicalize_context_raw(const char * con, size_t size; int fd, ret; @@ -61,10 +61,10 @@ index ba4c9a2..c815872 100644 if (!selinux_mnt) { errno = ENOENT; return -1; -diff --git libselinux-2.8-rc3/src/check_context.c libselinux-2.8-rc3/src/check_context.c +diff --git libselinux-2.8/src/check_context.c libselinux-2.8/src/check_context.c index 8a7997f..5be8434 100644 ---- libselinux-2.8-rc3/src/check_context.c -+++ libselinux-2.8-rc3/src/check_context.c +--- libselinux-2.8/src/check_context.c ++++ libselinux-2.8/src/check_context.c @@ -14,6 +14,11 @@ int security_check_context_raw(const char * con) char path[PATH_MAX]; int fd, ret; @@ -77,10 +77,10 @@ index 8a7997f..5be8434 100644 if (!selinux_mnt) { errno = ENOENT; return -1; -diff --git libselinux-2.8-rc3/src/compute_av.c libselinux-2.8-rc3/src/compute_av.c +diff --git libselinux-2.8/src/compute_av.c libselinux-2.8/src/compute_av.c index 1d05e7b..d9095cc 100644 ---- libselinux-2.8-rc3/src/compute_av.c -+++ libselinux-2.8-rc3/src/compute_av.c +--- libselinux-2.8/src/compute_av.c ++++ libselinux-2.8/src/compute_av.c @@ -26,6 +26,11 @@ int security_compute_av_flags_raw(const char * scon, return -1; } @@ -93,10 +93,10 @@ index 1d05e7b..d9095cc 100644 snprintf(path, sizeof path, "%s/access", selinux_mnt); fd = open(path, O_RDWR | O_CLOEXEC); if (fd < 0) -diff --git libselinux-2.8-rc3/src/compute_create.c libselinux-2.8-rc3/src/compute_create.c +diff --git libselinux-2.8/src/compute_create.c libselinux-2.8/src/compute_create.c index 0975aea..3e6a48c 100644 ---- libselinux-2.8-rc3/src/compute_create.c -+++ libselinux-2.8-rc3/src/compute_create.c +--- libselinux-2.8/src/compute_create.c ++++ libselinux-2.8/src/compute_create.c @@ -64,6 +64,11 @@ int security_compute_create_name_raw(const char * scon, return -1; } @@ -109,10 +109,10 @@ index 0975aea..3e6a48c 100644 snprintf(path, sizeof path, "%s/create", selinux_mnt); fd = open(path, O_RDWR | O_CLOEXEC); if (fd < 0) -diff --git libselinux-2.8-rc3/src/compute_member.c libselinux-2.8-rc3/src/compute_member.c +diff --git libselinux-2.8/src/compute_member.c libselinux-2.8/src/compute_member.c index 4e2d221..d1dd977 100644 ---- libselinux-2.8-rc3/src/compute_member.c -+++ libselinux-2.8-rc3/src/compute_member.c +--- libselinux-2.8/src/compute_member.c ++++ libselinux-2.8/src/compute_member.c @@ -25,6 +25,11 @@ int security_compute_member_raw(const char * scon, return -1; } @@ -125,10 +125,10 @@ index 4e2d221..d1dd977 100644 snprintf(path, sizeof path, "%s/member", selinux_mnt); fd = open(path, O_RDWR | O_CLOEXEC); if (fd < 0) -diff --git libselinux-2.8-rc3/src/compute_relabel.c libselinux-2.8-rc3/src/compute_relabel.c +diff --git libselinux-2.8/src/compute_relabel.c libselinux-2.8/src/compute_relabel.c index 49f77ef..c3db7c0 100644 ---- libselinux-2.8-rc3/src/compute_relabel.c -+++ libselinux-2.8-rc3/src/compute_relabel.c +--- libselinux-2.8/src/compute_relabel.c ++++ libselinux-2.8/src/compute_relabel.c @@ -25,6 +25,11 @@ int security_compute_relabel_raw(const char * scon, return -1; } @@ -141,10 +141,10 @@ index 49f77ef..c3db7c0 100644 snprintf(path, sizeof path, "%s/relabel", selinux_mnt); fd = open(path, O_RDWR | O_CLOEXEC); if (fd < 0) -diff --git libselinux-2.8-rc3/src/compute_user.c libselinux-2.8-rc3/src/compute_user.c +diff --git libselinux-2.8/src/compute_user.c libselinux-2.8/src/compute_user.c index 7b88121..401fd10 100644 ---- libselinux-2.8-rc3/src/compute_user.c -+++ libselinux-2.8-rc3/src/compute_user.c +--- libselinux-2.8/src/compute_user.c ++++ libselinux-2.8/src/compute_user.c @@ -24,6 +24,11 @@ int security_compute_user_raw(const char * scon, return -1; } @@ -157,10 +157,10 @@ index 7b88121..401fd10 100644 snprintf(path, sizeof path, "%s/user", selinux_mnt); fd = open(path, O_RDWR | O_CLOEXEC); if (fd < 0) -diff --git libselinux-2.8-rc3/src/fsetfilecon.c libselinux-2.8-rc3/src/fsetfilecon.c +diff --git libselinux-2.8/src/fsetfilecon.c libselinux-2.8/src/fsetfilecon.c index 52707d0..0cbe12d 100644 ---- libselinux-2.8-rc3/src/fsetfilecon.c -+++ libselinux-2.8-rc3/src/fsetfilecon.c +--- libselinux-2.8/src/fsetfilecon.c ++++ libselinux-2.8/src/fsetfilecon.c @@ -9,8 +9,12 @@ int fsetfilecon_raw(int fd, const char * context) @@ -176,10 +176,10 @@ index 52707d0..0cbe12d 100644 if (rc < 0 && errno == ENOTSUP) { char * ccontext = NULL; int err = errno; -diff --git libselinux-2.8-rc3/src/lsetfilecon.c libselinux-2.8-rc3/src/lsetfilecon.c +diff --git libselinux-2.8/src/lsetfilecon.c libselinux-2.8/src/lsetfilecon.c index 1d3b28a..ea6d70b 100644 ---- libselinux-2.8-rc3/src/lsetfilecon.c -+++ libselinux-2.8-rc3/src/lsetfilecon.c +--- libselinux-2.8/src/lsetfilecon.c ++++ libselinux-2.8/src/lsetfilecon.c @@ -9,8 +9,13 @@ int lsetfilecon_raw(const char *path, const char * context) @@ -196,10 +196,10 @@ index 1d3b28a..ea6d70b 100644 if (rc < 0 && errno == ENOTSUP) { char * ccontext = NULL; int err = errno; -diff --git libselinux-2.8-rc3/src/setfilecon.c libselinux-2.8-rc3/src/setfilecon.c +diff --git libselinux-2.8/src/setfilecon.c libselinux-2.8/src/setfilecon.c index d05969c..3f0200e 100644 ---- libselinux-2.8-rc3/src/setfilecon.c -+++ libselinux-2.8-rc3/src/setfilecon.c +--- libselinux-2.8/src/setfilecon.c ++++ libselinux-2.8/src/setfilecon.c @@ -9,8 +9,12 @@ int setfilecon_raw(const char *path, const char * context) @@ -215,10 +215,10 @@ index d05969c..3f0200e 100644 if (rc < 0 && errno == ENOTSUP) { char * ccontext = NULL; int err = errno; -diff --git libselinux-2.8-rc3/utils/matchpathcon.c libselinux-2.8-rc3/utils/matchpathcon.c +diff --git libselinux-2.8/utils/matchpathcon.c libselinux-2.8/utils/matchpathcon.c index 67e4a43..9756d7d 100644 ---- libselinux-2.8-rc3/utils/matchpathcon.c -+++ libselinux-2.8-rc3/utils/matchpathcon.c +--- libselinux-2.8/utils/matchpathcon.c ++++ libselinux-2.8/utils/matchpathcon.c @@ -14,7 +14,7 @@ static __attribute__ ((__noreturn__)) void usage(const char *progname) { diff --git a/libselinux.spec b/libselinux.spec index b527cd4..7a8bded 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -1,21 +1,20 @@ %define ruby_inc %(pkg-config --cflags ruby) -%define libsepolver 2.8-0 -%global rcversion rc3 +%define libsepolver 2.8-1 Summary: SELinux library and simple utilities Name: libselinux Version: 2.8 -Release: 0%{?rcversion:.%rcversion}.1%{?dist} +Release: 1%{?dist} License: Public Domain # https://github.com/SELinuxProject/selinux/wiki/Releases -Source: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180510/libselinux-2.8-rc3.tar.gz +Source: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524/libselinux-2.8.tar.gz Source1: selinuxconlist.8 Source2: selinuxdefcon.8 Url: https://github.com/SELinuxProject/selinux/wiki # download https://raw.githubusercontent.com/fedora-selinux/scripts/master/selinux/make-fedora-selinux-patch.sh # run: -# $ VERSION=2.8-rc3 ./make-fedora-selinux-patch.sh libselinux -# HEAD https://github.com/fedora-selinux/selinux/commit/11eab8523bec5fcded6c336e3112f30f7931cba6 +# $ VERSION=2.8 ./make-fedora-selinux-patch.sh libselinux +# HEAD https://github.com/fedora-selinux/selinux/commit/0e84c8fe6bb895d22f706be1c8f59119c6427f64 Patch1: libselinux-fedora.patch BuildRequires: gcc BuildRequires: python2 python2-devel ruby-devel ruby libsepol-static >= %{libsepolver} swig pcre2-devel xz-devel @@ -99,7 +98,7 @@ The libselinux-static package contains the static libraries needed for developing SELinux applications. %prep -%autosetup -p 1 -n libselinux-%{version}%{?rcversion:-%rcversion} +%autosetup -p 1 -n libselinux-%{version} %build export LDFLAGS="%{?__global_ldflags}" @@ -222,16 +221,17 @@ rm -f %{buildroot}%{_mandir}/man8/togglesebool* %{python2_sitearch}/selinux/ %{python2_sitearch}/_selinux.so -%if 0%{?with_python3} %files -n python3-libselinux %{python3_sitearch}/selinux/ %{python3_sitearch}/_selinux.*.so -%endif with_python3 %files ruby %{ruby_vendorarchdir}/selinux.so %changelog +* Fri May 25 2018 Petr Lautrbach - 2.8-1 +- SELinux userspace 2.8 release + * Mon May 14 2018 Petr Lautrbach - 2.8-0.rc3.1 - SELinux userspace 2.8-rc3 release candidate diff --git a/sources b/sources index cdd2308..d932656 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libselinux-2.8-rc3.tar.gz) = 2b0bf8790fe8d8c87613542fe7618352dd195e2fe75a9d50c15851e48442a18adb59d65b8e9316ad6d044f57f1359d23215696ee5972019a9e4e812bf42fecbe +SHA512 (libselinux-2.8.tar.gz) = 2f15d08888fbef9b0cf7bf01893b513edc6738974e2d0eab7e3f79cef9be79cf966742b0d2693b5d2ec7defddb5f4d6c6f6280be9d4158ed41f7a18d50b9f019