rpms/libselinux/F-13 libselinux-rhat.patch, 1.203, 1.204 libselinux.spec, 1.385, 1.386

Daniel J Walsh dwalsh at fedoraproject.org
Thu Feb 18 15:07:40 UTC 2010


Author: dwalsh

Update of /cvs/extras/rpms/libselinux/F-13
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20051

Modified Files:
	libselinux-rhat.patch libselinux.spec 
Log Message:
* Thu Feb 18 2010 Dan Walsh <dwalsh at redhat.com> - 2.0.90-4
- Fix libselinux.pc


libselinux-rhat.patch:
 man/man8/selinuxconlist.8 |   18 ++++++++++++++++++
 man/man8/selinuxdefcon.8  |   24 ++++++++++++++++++++++++
 src/Makefile              |    3 ++-
 src/callbacks.c           |    1 +
 src/init.c                |   11 ++++++-----
 src/label_file.c          |    3 +++
 src/libselinux.pc.in      |    2 +-
 src/matchpathcon.c        |    3 ++-
 8 files changed, 57 insertions(+), 8 deletions(-)

Index: libselinux-rhat.patch
===================================================================
RCS file: /cvs/extras/rpms/libselinux/F-13/libselinux-rhat.patch,v
retrieving revision 1.203
retrieving revision 1.204
diff -u -p -r1.203 -r1.204
--- libselinux-rhat.patch	18 Jan 2010 21:59:45 -0000	1.203
+++ libselinux-rhat.patch	18 Feb 2010 15:07:38 -0000	1.204
@@ -61,19 +61,44 @@ diff --exclude-from=exclude -N -u -r nsa
  	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-01-18 16:52:28.000000000 -0500
-@@ -59,8 +59,10 @@
++++ libselinux-2.0.90/src/init.c	2010-01-18 16:56: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;
+@@ -59,14 +59,14 @@
  	}
  	fclose(fp);
  
 -	if (!exists)
-+	if (!exists) {
-+		free(buf);
- 		return;
-+	}
+-		return;
++	if (!exists) 
++		goto out;
  
  	/* 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 +90,8 @@
+ 
+       out:
+ 	free(buf);
+-	fclose(fp);
++	if (fp)
++		fclose(fp);
+ 	return;
+ }
+ 
 diff --exclude-from=exclude -N -u -r nsalibselinux/src/label_file.c libselinux-2.0.90/src/label_file.c
 --- nsalibselinux/src/label_file.c	2009-05-18 13:53:14.000000000 -0400
 +++ libselinux-2.0.90/src/label_file.c	2010-01-18 16:53:54.000000000 -0500
@@ -87,6 +112,37 @@ diff --exclude-from=exclude -N -u -r nsa
  /*
   * Internals, mostly moved over from matchpathcon.c
   */
+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:04:21.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


Index: libselinux.spec
===================================================================
RCS file: /cvs/extras/rpms/libselinux/F-13/libselinux.spec,v
retrieving revision 1.385
retrieving revision 1.386
diff -u -p -r1.385 -r1.386
--- libselinux.spec	18 Jan 2010 21:44:51 -0000	1.385
+++ libselinux.spec	18 Feb 2010 15:07:39 -0000	1.386
@@ -5,7 +5,7 @@
 Summary: SELinux library and simple utilities
 Name: libselinux
 Version: 2.0.90
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: Public Domain
 Group: System Environment/Libraries
 Source: http://www.nsa.gov/research/selinux/%{name}-%{version}.tgz
@@ -166,6 +166,9 @@ exit 0
 %{ruby_sitearch}/selinux.so
 
 %changelog
+* Thu Feb 18 2010 Dan Walsh <dwalsh at redhat.com> - 2.0.90-4
+- Fix libselinux.pc
+
 * Mon Jan 18 2010 Dan Walsh <dwalsh at redhat.com> - 2.0.90-3
 - Fix man page for selinuxdefcon
 



More information about the scm-commits mailing list