rpms/libsemanage/devel libsemanage-rhat.patch, 1.9, 1.10 libsemanage.spec, 1.72, 1.73

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Feb 10 16:42:09 UTC 2006


Author: dwalsh

Update of /cvs/dist/rpms/libsemanage/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv25322

Modified Files:
	libsemanage-rhat.patch libsemanage.spec 
Log Message:
* Fri Feb 10 2006 Dan Walsh <dwalsh at redhat.com> - 1.5.21-2
- Fix handling of seusers and users_map file


libsemanage-rhat.patch:
 direct_api.c |   25 ++++++++++++++++---------
 1 files changed, 16 insertions(+), 9 deletions(-)

Index: libsemanage-rhat.patch
===================================================================
RCS file: /cvs/dist/rpms/libsemanage/devel/libsemanage-rhat.patch,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- libsemanage-rhat.patch	14 Jan 2006 04:52:46 -0000	1.9
+++ libsemanage-rhat.patch	10 Feb 2006 16:42:07 -0000	1.10
@@ -1,42 +1,57 @@
-diff --exclude-from=exclude -N -u -r nsalibsemanage/Makefile libsemanage-1.5.14/Makefile
---- nsalibsemanage/Makefile	2006-01-05 10:33:10.000000000 -0500
-+++ libsemanage-1.5.14/Makefile	2006-01-13 23:46:32.000000000 -0500
-@@ -1,11 +1,17 @@
- all: 
- 	$(MAKE) -C src all
- 
-+pywrap: 
-+	$(MAKE) -C src pywrap
+diff -Naurp --exclude-from excludes old/libsemanage/src/direct_api.c new/libsemanage/src/direct_api.c
+--- old/libsemanage/src/direct_api.c	2006-02-08 03:20:08.000000000 -0500
++++ new/libsemanage/src/direct_api.c	2006-02-09 19:14:15.000000000 -0500
+@@ -475,7 +475,7 @@ static int semanage_direct_commit(semana
+ 
+ 		/* ==================== File-backed ================== */
+ 
+-		/* write the linked file contexts template */
++		/* File Contexts */
+ 		if ((ofilename = semanage_path(SEMANAGE_TMP, SEMANAGE_FC_TMPL)) == NULL ||
+ 		    write_file(sh, ofilename, sepol_module_package_get_file_contexts(base), 
+ 				sepol_module_package_get_file_contexts_len(base)) == -1) {
+@@ -484,29 +484,36 @@ static int semanage_direct_commit(semana
+ 
+ 		if (semanage_split_fc(sh)) 
+ 			goto cleanup;
+-	
 +
- install: 
- 	$(MAKE) -C include install
- 	$(MAKE) -C src install
- 	$(MAKE) -C man install
- 
-+install-pywrap: 
-+	$(MAKE) -C src install-pywrap
++		pfcontexts->dtable->drop_cache(pfcontexts->dbase);
 +
- relabel:
++		/* Seusers */
+ 		if (sepol_module_package_get_seusers_len(base)) {
+ 			if ((ofilename = semanage_path(SEMANAGE_TMP, SEMANAGE_SEUSERS)) == NULL ||
+ 			    write_file(sh, ofilename, sepol_module_package_get_seusers(base), 
+ 					sepol_module_package_get_seusers_len(base)) == -1) {
+ 				goto cleanup;
+ 			}
++			pseusers->dtable->drop_cache(pseusers->dbase);
++
++		} else {
++			if (pseusers->dtable->clear(sh, pseusers->dbase) < 0)
++				goto cleanup;
+ 		}
+ 
++		/* Users_extra */
+ 		if (sepol_module_package_get_user_extra_len(base)) {
+ 			if ((ofilename = semanage_path(SEMANAGE_TMP, SEMANAGE_USER_EXTRA)) == NULL ||
+ 			    write_file(sh, ofilename, sepol_module_package_get_user_extra(base), 
+ 					sepol_module_package_get_user_extra_len(base)) == -1) {
+ 				goto cleanup;
+ 			}
+-		}
++			pusers_extra->dtable->drop_cache(pusers_extra->dbase);
+ 
+-		/* Drop any cached content for file_contexts, seusers, or users_extra,
+-	 	 * since it is now superceded by the files just written, and needs to be
+-		 * re-cached */
+-		pfcontexts->dtable->drop_cache(pfcontexts->dbase);
+-		pseusers->dtable->drop_cache(pseusers->dbase);
+-		pusers_extra->dtable->drop_cache(pusers_extra->dbase);
++		} else {
++			if (pusers_extra->dtable->clear(sh, pusers_extra->dbase) < 0)
++				goto cleanup;
++		}
+ 
+ 		/* ==================== Policydb-backed ================ */
  
- clean:
-diff --exclude-from=exclude -N -u -r nsalibsemanage/src/Makefile libsemanage-1.5.14/src/Makefile
---- nsalibsemanage/src/Makefile	2005-11-29 10:54:15.000000000 -0500
-+++ libsemanage-1.5.14/src/Makefile	2006-01-13 23:46:17.000000000 -0500
-@@ -37,7 +37,7 @@
- 
- SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./
- 
--all: $(LIBA) $(LIBSO) $(SWIGSO)
-+all: $(LIBA) $(LIBSO) 
- 
- pywrap: all $(SWIGLOBJ) $(SWIGSO) 
- 
-@@ -75,7 +75,7 @@
- swigify: $(SWIGIF)
- 	$(SWIG) $^
- 
--install: all install-pywrap 
-+install: all 
- 	test -d $(LIBDIR) || install -m 755 -d $(LIBDIR)
- 	install -m 644 $(LIBA) $(LIBDIR)
- 	test -d $(SHLIBDIR) || install -m 755 -d $(SHLIBDIR)


Index: libsemanage.spec
===================================================================
RCS file: /cvs/dist/rpms/libsemanage/devel/libsemanage.spec,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- libsemanage.spec	7 Feb 2006 15:30:09 -0000	1.72
+++ libsemanage.spec	10 Feb 2006 16:42:07 -0000	1.73
@@ -3,10 +3,11 @@
 Summary: SELinux binary policy manipulation library 
 Name: libsemanage
 Version: 1.5.21
-Release: 1
+Release: 2
 License: GPL
 Group: System Environment/Libraries
 Source: http://www.nsa.gov/selinux/archives/libsemanage-%{version}.tgz
+Patch: libsemanage-rhat.patch
 
 BuildRoot: %{_tmppath}/%{name}-buildroot
 BuildRequires: libselinux-devel >= %{libselinuxver} 
@@ -39,6 +40,7 @@
 
 %prep
 %setup -q
+%patch -p2 -b .rhat
 
 %build
 make clean
@@ -75,7 +77,10 @@
 %{_mandir}/man3/*
 
 %changelog
-* Tue Feb 07 2006 Jesse Keating <jkeating at redhat.com> - 1.5.21-1
+* Fri Feb 10 2006 Dan Walsh <dwalsh at redhat.com> - 1.5.21-2
+- Fix handling of seusers and users_map file
+
+* Tue Feb 07 2006 Dan Walsh <dwalsh at redhat.com> - 1.5.21-1
 - Upgrade to latest from NSA
 	* Merged seuser/user_extra support patch from Joshua Brindle.
 	* Merged remote system dbase patch from Ivan Gyurdiev.	




More information about the fedora-cvs-commits mailing list