From 4835d9805442954808cefbd5835878e89da17a5bdc3aa55c0c7c1a43248c3e46 Mon Sep 17 00:00:00 2001 From: Factory Maintainer Date: Mon, 4 Jun 2012 13:46:09 +0000 Subject: [PATCH] Accepting request 123445 from home:mlschroe:branches:security:SELinux update to libselinux-2.1.9, needed for rpm-4.10.0 update OBS-URL: https://build.opensuse.org/request/show/123445 OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libselinux?expand=0&rev=41 --- libselinux-2.0.91.tar.bz2 | 3 -- libselinux-2.1.9.tar.gz | 3 ++ libselinux-bindings.changes | 10 +++++ libselinux-bindings.spec | 29 +++++++------- libselinux-rhat.patch | 75 ------------------------------------- libselinux-ruby.patch | 22 +++++++++++ libselinux.changes | 9 +++++ libselinux.spec | 27 +++++++------ 8 files changed, 73 insertions(+), 105 deletions(-) delete mode 100644 libselinux-2.0.91.tar.bz2 create mode 100644 libselinux-2.1.9.tar.gz create mode 100644 libselinux-ruby.patch diff --git a/libselinux-2.0.91.tar.bz2 b/libselinux-2.0.91.tar.bz2 deleted file mode 100644 index 20528dc..0000000 --- a/libselinux-2.0.91.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:67a89821c9cd01288af5e6c784cc963fd13cc7c5d2a06ae8e7241ce187682ea1 -size 156090 diff --git a/libselinux-2.1.9.tar.gz b/libselinux-2.1.9.tar.gz new file mode 100644 index 0000000..e2f2d43 --- /dev/null +++ b/libselinux-2.1.9.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:749d4b39c80aa9df8247b8b3187ab72442c0dbad6e70bf312e25052bd4e7063f +size 155840 diff --git a/libselinux-bindings.changes b/libselinux-bindings.changes index 97b364a..d2ab0c4 100644 --- a/libselinux-bindings.changes +++ b/libselinux-bindings.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Jun 1 18:34:04 CEST 2012 - mls@suse.de + +- update to libselinux-2.1.9 + * better man pages + * selinux_status interfaces + * simple interface for access checks + * multiple bug fixes +- fix build for ruby-1.9 + ------------------------------------------------------------------- Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de diff --git a/libselinux-bindings.spec b/libselinux-bindings.spec index 756ae60..42c236b 100644 --- a/libselinux-bindings.spec +++ b/libselinux-bindings.spec @@ -1,7 +1,7 @@ # # spec file for package libselinux-bindings # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,23 +15,25 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild %define libsepol_ver 2.0.32 -BuildRequires: python-devel ruby-devel swig BuildRequires: libsepol-devel-static >= %{libsepol_ver} +BuildRequires: python-devel +BuildRequires: ruby-devel +BuildRequires: swig Name: libselinux-bindings -Version: 2.0.91 -Release: 9 +Version: 2.1.9 +Release: 0 Url: http://www.nsa.gov/selinux/ -License: GPLv2 ; Public Domain, Freeware -Group: System/Libraries Summary: SELinux library and simple utilities -Source: libselinux-%{version}.tar.bz2 +License: GPL-2.0 ; SUSE-Public-Domain +Group: System/Libraries +Source: libselinux-%{version}.tar.gz Source1: selinux-ready Source2: baselibs.conf Patch0: libselinux-rhat.patch +Patch1: libselinux-ruby.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %define debug_package_requires python-selinux = %{version}-%{release} @@ -53,9 +55,9 @@ decisions. Required for any applications that use the SELinux API. %package -n python-selinux -License: Public Domain, Freeware Summary: SELinux library and simple utilities -Group: System/Libraries +License: SUSE-Public-Domain +Group: Development/Libraries/Python Requires: libselinux1 = %{version} Requires: python @@ -77,9 +79,9 @@ decisions. Required for any applications that use the SELinux API. %package -n ruby-selinux -License: Public Domain, Freeware Summary: SELinux library and simple utilities -Group: System/Libraries +License: SUSE-Public-Domain +Group: Development/Languages/Ruby Requires: libselinux1 = %{version} Requires: ruby @@ -103,6 +105,7 @@ decisions. Required for any applications that use the SELinux API. %prep %setup -q -n libselinux-%{version} %patch0 -p1 +%patch1 %build make %{?_smp_mflags} LIBDIR="%{_libdir}" CFLAGS="$RPM_OPT_FLAGS" -C src @@ -126,6 +129,6 @@ rm -rf $RPM_BUILD_ROOT %files -n ruby-selinux %defattr(-,root,root,-) -%{_libdir}/ruby/site_ruby/%{rb_ver}/%{rb_arch}/selinux.so +%{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/selinux.so %changelog diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index cbd9279..5c6370b 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -59,81 +59,6 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/callbacks.c libselinux-2. va_start(ap, fmt); rc = vfprintf(stderr, fmt, ap); va_end(ap); -diff --exclude-from=exclude -N -u -r nsalibselinux/src/init.c libselinux-2.0.90/src/init.c ---- nsalibselinux/src/init.c 2009-07-14 11:16:03.000000000 -0400 -+++ libselinux-2.0.90/src/init.c 2010-02-22 11:04:16.000000000 -0500 -@@ -23,7 +23,7 @@ - static void init_selinuxmnt(void) - { - char *buf=NULL, *p; -- FILE *fp; -+ FILE *fp=NULL; - struct statfs sfbuf; - int rc; - size_t len; -@@ -57,16 +57,17 @@ - break; - } - } -- fclose(fp); - -- if (!exists) -- return; -+ if (!exists) -+ goto out; -+ -+ fclose(fp); - - /* At this point, the usual spot doesn't have an selinuxfs so - * we look around for it */ - fp = fopen("/proc/mounts", "r"); - if (!fp) -- return; -+ goto out; - - __fsetlocking(fp, FSETLOCKING_BYCALLER); - while ((num = getline(&buf, &len, fp)) != -1) { -@@ -90,7 +91,8 @@ - - out: - free(buf); -- fclose(fp); -+ if (fp) -+ fclose(fp); - return; - } - -diff --exclude-from=exclude -N -u -r nsalibselinux/src/libselinux.pc.in libselinux-2.0.90/src/libselinux.pc.in ---- nsalibselinux/src/libselinux.pc.in 2009-11-02 12:58:30.000000000 -0500 -+++ libselinux-2.0.90/src/libselinux.pc.in 2010-02-18 10:02:46.000000000 -0500 -@@ -1,6 +1,6 @@ - prefix=@prefix@ - exec_prefix=${prefix} --libdir=${exec_prefix}/lib -+libdir=${exec_prefix}/@libdir@ - includedir=@includedir@ - - Name: libselinux -diff --exclude-from=exclude -N -u -r nsalibselinux/src/Makefile libselinux-2.0.90/src/Makefile ---- nsalibselinux/src/Makefile 2009-12-01 15:46:50.000000000 -0500 -+++ libselinux-2.0.90/src/Makefile 2010-02-18 10:20:27.000000000 -0500 -@@ -11,6 +11,7 @@ - RUBYPLATFORM ?= $(shell ruby -e 'print RUBY_PLATFORM') - RUBYINC ?= $(LIBDIR)/ruby/$(RUBYLIBVER)/$(RUBYPLATFORM) - RUBYINSTALL ?= $(LIBDIR)/ruby/site_ruby/$(RUBYLIBVER)/$(RUBYPLATFORM) -+LIBBASE=$(shell basename $(LIBDIR)) - - VERSION = $(shell cat ../VERSION) - LIBVERSION = 1 -@@ -85,7 +86,7 @@ - ln -sf $@ $(TARGET) - - $(LIBPC): $(LIBPC).in -- sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBDIR):; s:@includedir@:$(INCLUDEDIR):' < $< > $@ -+ sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBBASE):; s:@includedir@:$(INCLUDEDIR):' < $< > $@ - - selinuxswig_python_exception.i: ../include/selinux/selinux.h - bash exception.sh > $@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-2.0.90/src/matchpathcon.c --- nsalibselinux/src/matchpathcon.c 2009-03-06 14:41:45.000000000 -0500 +++ libselinux-2.0.90/src/matchpathcon.c 2010-01-18 16:52:28.000000000 -0500 diff --git a/libselinux-ruby.patch b/libselinux-ruby.patch new file mode 100644 index 0000000..151e6c9 --- /dev/null +++ b/libselinux-ruby.patch @@ -0,0 +1,22 @@ +--- ./src/Makefile.orig 2012-06-04 08:20:19.000000000 +0000 ++++ ./src/Makefile 2012-06-04 09:43:23.000000000 +0000 +@@ -15,8 +15,8 @@ PYTHONLIBDIR ?= $(shell pkg-config --lib + PYLIBDIR ?= $(LIBDIR)/$(PYLIBVER) + RUBYLIBVER ?= $(shell ruby -e 'print RUBY_VERSION.split(".")[0..1].join(".")') + RUBYPLATFORM ?= $(shell ruby -e 'print RUBY_PLATFORM') +-RUBYINC ?= $(LIBDIR)/ruby/$(RUBYLIBVER)/$(RUBYPLATFORM) +-RUBYINSTALL ?= $(LIBDIR)/ruby/site_ruby/$(RUBYLIBVER)/$(RUBYPLATFORM) ++RUBYINC ?= $(shell ruby -r rbconfig -e "print Config::CONFIG['rubyhdrdir'].nil? ? '$(LIBDIR)/ruby/$(RUBYLIBVER)' : Config::CONFIG['rubyhdrdir']") ++RUBYINSTALL ?= $(shell ruby -r rbconfig -e "print Config::CONFIG['vendorarchdir'].nil? ? '$(DESTDIR)'+Config::CONFIG['sitearchdir'] : '$(DESTDIR)'+Config::CONFIG['vendorarchdir']") + LIBBASE=$(shell basename $(LIBDIR)) + + VERSION = $(shell cat ../VERSION) +@@ -76,7 +76,7 @@ $(SWIGLOBJ): $(SWIGCOUT) + $(CC) $(filter-out -Werror, $(CFLAGS)) $(PYINC) -fPIC -DSHARED -c -o $@ $< + + $(SWIGRUBYLOBJ): $(SWIGRUBYCOUT) +- $(CC) $(filter-out -Werror, $(CFLAGS)) -I$(RUBYINC) -fPIC -DSHARED -c -o $@ $< ++ $(CC) $(filter-out -Werror, $(CFLAGS)) -I$(RUBYINC) -I$(RUBYINC)/$(RUBYPLATFORM) -fPIC -DSHARED -c -o $@ $< + + $(SWIGSO): $(SWIGLOBJ) + $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lselinux -L$(LIBDIR) $(PYTHONLIBDIR) -Wl,-soname,$@,-z,defs diff --git a/libselinux.changes b/libselinux.changes index 192bde9..cab0529 100644 --- a/libselinux.changes +++ b/libselinux.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Jun 1 18:34:04 CEST 2012 - mls@suse.de + +- update to libselinux-2.1.9 + * better man pages + * selinux_status interfaces + * simple interface for access checks + * multiple bug fixes + ------------------------------------------------------------------- Wed Oct 5 15:09:25 UTC 2011 - uli@suse.com diff --git a/libselinux.spec b/libselinux.spec index 25d4e0d..14c150f 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -1,7 +1,7 @@ # # spec file for package libselinux # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,22 +15,23 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild %define libsepol_ver 2.0.32 -BuildRequires: libsepol-devel >= %{libsepol_ver} pkg-config +BuildRequires: libsepol-devel >= %{libsepol_ver} +BuildRequires: pkg-config Name: libselinux -Version: 2.0.91 -Release: 9 +Version: 2.1.9 +Release: 0 Url: http://www.nsa.gov/selinux/ -License: GPLv2 ; Public Domain, Freeware -Group: System/Libraries Summary: SELinux library and simple utilities -Source: %{name}-%{version}.tar.bz2 +License: GPL-2.0 ; SUSE-Public-Domain +Group: System/Libraries +Source: %{name}-%{version}.tar.gz Source1: selinux-ready Source2: baselibs.conf Patch0: %{name}-rhat.patch +Patch1: %{name}-ruby.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %define debug_package_requires libselinux1 = %{version}-%{release} @@ -52,9 +53,8 @@ decisions. Required for any applications that use the SELinux API. %package -n libselinux1 -License: GPLv2 ; Public Domain, Freeware -Group: System/Libraries Summary: SELinux library and simple utilities +Group: System/Libraries %description -n libselinux1 Security-enhanced Linux is a feature of the Linux(R) kernel and a @@ -74,9 +74,8 @@ decisions. Required for any applications that use the SELinux API. %package -n selinux-tools -License: GPLv2 ; Public Domain, Freeware -Group: System/Base Summary: SELinux library and simple utilities +Group: System/Base %description -n selinux-tools Security-enhanced Linux is a feature of the Linux(R) kernel and a @@ -96,7 +95,6 @@ decisions. Required for any applications that use the SELinux API. %package devel -License: GPLv2 ; Public Domain, Freeware Summary: Development Include Files and Libraries for SELinux Group: Development/Libraries/C and C++ Requires: libselinux1 = %{version} @@ -109,7 +107,6 @@ necessary to develop your own software using libselinux. %package devel-static -License: GPLv2 ; Public Domain, Freeware Summary: Static development Include Files and Libraries for SELinux Group: Development/Libraries/C and C++ Requires: libselinux-devel = %{version} @@ -122,6 +119,7 @@ necessary to develop your own software using libselinux. %prep %setup -q %patch0 -p1 +%patch1 %build make %{?_smp_mflags} LIBDIR="%{_libdir}" CC="%{__cc}" CFLAGS="$RPM_OPT_FLAGS" @@ -166,6 +164,7 @@ rm -rf $RPM_BUILD_ROOT %{_sbindir}/selinuxconlist %{_sbindir}/selinuxdefcon %{_sbindir}/selinuxenabled +%{_sbindir}/selinuxexeccon %{_sbindir}/setenforce %{_sbindir}/togglesebool %{_sbindir}/selinux-ready