rpms/jed/devel jed-0.99.12-xkeys.patch, NONE, 1.1 jed-info.patch, NONE, 1.1 jed-multilib.patch, NONE, 1.1 jed-selinux.patch, NONE, 1.1 jed.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Bill Nottingham (notting) fedora-extras-commits at redhat.com
Fri Mar 4 22:37:57 UTC 2005


Author: notting

Update of /cvs/extras/rpms/jed/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19063/devel

Modified Files:
	.cvsignore sources 
Added Files:
	jed-0.99.12-xkeys.patch jed-info.patch jed-multilib.patch 
	jed-selinux.patch jed.spec 
Log Message:
auto-import jed-0.99.16-7 on branch devel from jed-0.99.16-7.src.rpm


jed-0.99.12-xkeys.patch:

--- NEW FILE jed-0.99.12-xkeys.patch ---
--- jed-B0.99-12/src/xkeys.c.xkeys	Sat Oct 21 23:15:58 2000
+++ jed-B0.99-12/src/xkeys.c	Thu Dec 28 12:24:21 2000
@@ -943,17 +943,17 @@
    "\003\033OQ",	/* 0xFF92 	 XK_KP_F2        PF2 */
    "\003\033OR",	/* 0xFF93 	 XK_KP_F3        PF3 */
    "\003\033OS",	/* 0xFF94 	 XK_KP_F4        PF4 */
-   "",			/* 0xFF95 */
-   "",			/* 0xFF96 */
-   "",			/* 0xFF97 */
-   "",			/* 0xFF98 */
-   "",			/* 0xFF99 */
-   "",			/* 0xFF9A */
-   "",			/* 0xFF9B */
-   "",			/* 0xFF9C */
-   "",			/* 0xFF9D */
-   "",			/* 0xFF9E */
-   "",			/* 0xFF9F */
+   "\003\033Ow",	/* 0xFF95 	 XK_KP_Home */
+   "\003\033Ot",	/* 0xFF96 	 XK_KP_Left */
+   "\003\033Ox",	/* 0xFF97 	 XK_KP_Up */
+   "\003\033Ov",	/* 0xFF98 	 XK_KP_Right */
+   "\003\033Or",	/* 0xFF99 	 XK_KP_Down */
+   "\003\033Oy",	/* 0xFF9A 	 XK_KP_Prior */
+   "\003\033Os",	/* 0xFF9B 	 XK_KP_Next */
+   "\003\033Oq",	/* 0xFF9C 	 XK_KP_End */
+   "\003\033Ou",	/* 0xFF9D 	 XK_KP_Begin */
+   "\003\033Op",	/* 0xFF9E 	 XK_KP_Insert */
+   "\003\033On",	/* 0xFF9F 	 XK_KP_Delete */
    "",			/* 0xFFA0 */
    "",			/* 0xFFA1 */
    "",			/* 0xFFA2 */

jed-info.patch:

--- NEW FILE jed-info.patch ---
--- jed/info/jed.info.entry	Sat Feb  5 11:10:19 2000
+++ jed/info/jed.info	Sat Feb  5 11:11:11 2000
@@ -1,6 +1,10 @@
 This is Info file jed.info, produced by Makeinfo-1.55 from the input
 file jed.ti.
 
+START-INFO-DIR-ENTRY
+* JED: (jed).         The JED editor
+END-INFO-DIR-ENTRY
+
 
 Indirect:
 jed.1in: 83

jed-multilib.patch:

--- NEW FILE jed-multilib.patch ---
--- jed-B0.99-15/autoconf/aclocal.m4.sopwith	2003-01-10 15:20:04.000000000 -0500
+++ jed-B0.99-15/autoconf/aclocal.m4	2003-01-10 15:21:24.000000000 -0500
@@ -158,6 +158,7 @@
                 $JD_Above_Dir/$1/libsrc,$JD_Above_Dir/$1/libsrc/"$ARCH"objs \
 		$JD_Above_Dir2/$1/src,$JD_Above_Dir2/$1/src/"$ARCH"objs \
                 $JD_Above_Dir/$1/src,$JD_Above_Dir/$1/src/"$ARCH"objs \
+		$HOME/include,$HOME/lib64 \
 		$HOME/include,$HOME/lib"
 
 if test -n "$ARCH"
@@ -174,6 +175,7 @@
 test "x$exec_prefix" = "xNONE" && exec_prefix="$prefix"
 JD_Search_Dirs="$JD_Search_Dirs \
                 $includedir,$libdir \
+                $includedir/$1,$libdir \
                 /usr/local/include,/usr/local/lib \
 		/usr/include,/usr/lib \
 		/usr/include/$1,/usr/lib \

jed-selinux.patch:

--- NEW FILE jed-selinux.patch ---
--- jed-0.99-16/autoconf/configure.in.selinux	2004-09-25 01:33:25.000000000 -0400
+++ jed-0.99-16/autoconf/configure.in	2004-09-25 01:40:05.000000000 -0400
@@ -38,6 +38,8 @@
 
 AC_CHECK_LIB(util,openpty)
 
+AC_CHECK_LIB(selinux, is_selinux_enabled)
+
 AC_CHECK_FUNCS(\
 memset \
 memcpy \
--- jed-0.99-16/src/file.c.selinux	2002-10-20 02:55:31.000000000 -0400
+++ jed-0.99-16/src/file.c	2004-09-25 01:40:42.000000000 -0400
@@ -107,6 +107,11 @@
 # define O_BINARY	0
 #endif
 
+#ifdef HAVE_LIBSELINUX
+int copy_security_context(const char *from_file, const char *to_file);
+int set_default_security_context(const char *file);
+#endif
+
 /*}}}*/
 /*{{{ local inclue files */
 
@@ -1047,6 +1052,10 @@
    (void) utime (to, &ut);
 #endif
 
+#ifdef HAVE_LIBSELINUX
+   copy_security_context(from,to);
+#endif
+	
    return ret;
 }
 /*}}}*/
@@ -1192,6 +1201,9 @@
 #endif
 	  }
 	
+#ifdef HAVE_LIBSELINUX
+	set_default_security_context(dirfile);
+#endif
 	/* Since we wrote the buffer to the file, it is not modified. */
 	if (CBuf == find_file_buffer (dirfile))
 	  CBuf->flags &= ~FILE_MODIFIED;
@@ -1250,6 +1262,7 @@
 	     flush_message("autosaving..."); 
 	     (void) sys_delete_file(tmp);
 	     (void) write_file_internal (tmp, _JED_OPEN_CREATE_EXCL);
+	     copy_security_context(b->dirfile,tmp);
 	     message("autosaving...done");
 	  }
       }
--- /dev/null	2004-09-24 19:41:07.393180112 -0400
+++ jed-0.99-16/src/selinux.c	2004-09-25 01:40:32.000000000 -0400
@@ -0,0 +1,208 @@
+/*
+ * Example code to show how to copy the security context from one file to
+ * another.
+ */
+#include "config.h"
+#ifdef HAVE_LIBSELINUX
+#include <selinux/selinux.h>
+static int selinux_enabled = -1;
+#endif
+#include <string.h>
+#include "misc.h"
+#include <errno.h>
+
+int
+copy_security_context(const char *from_file, const char *to_file)
+{
+	int status = 0;
+#ifdef HAVE_LIBSELINUX
+	security_context_t from_context;
+	security_context_t to_context;
+
+	if (selinux_enabled == -1)
+		selinux_enabled = (is_selinux_enabled() > 0);
+
+	if (!selinux_enabled)
+		return 0;
+
+	if (getfilecon(from_file, &from_context) < 0) {
+		/*
+		 * If the filesystem doesn't support extended
+		 * attributes, the original had no special security
+		 * context and the target cannot have one either.
+		 */
+		if (errno == EOPNOTSUPP)
+			return 0;
+
+		jed_verror("Could not get security context for %s",
+		      from_file);
+		return 1;
+	}
+
+	if (getfilecon(to_file, &to_context) < 0) {
+		jed_verror("Could not get security context for %s",
+			   to_file);
+		freecon(from_context);
+		return 1;
+	}
+
+	if (strcmp(from_context, to_context) != 0) {
+		if (setfilecon(to_file, from_context) < 0) {
+			jed_verror("Could not set security context for %s",
+			      to_file);
+			status = 1;
+		}
+	}
+
+	freecon(to_context);
+	freecon(from_context);
+#endif
+	return status;
+}
+
+int
+set_default_security_context(const char *file)
+{
+	int status = 0;
+	
+#ifdef HAVE_LIBSELINUX
+	security_context_t scontext;
+
+	if (selinux_enabled == -1)
+		selinux_enabled = (is_selinux_enabled() > 0);
+
+	if (!selinux_enabled)
+		return 0;
+
+	set_matchpathcon_printf(jed_verror);
+	
+	if (matchpathcon(file,0,&scontext)) {
+		return 1;
+	}
+	
+	if (setfilecon(file, scontext) < 0) {
+		status = match_default_security_context(file);
+	}
+	freecon(scontext);
+#endif
+	return status;
+}
+	
+int
+match_default_security_context(const char *from_file)
+{
+#ifdef HAVE_LIBSELINUX
+	security_context_t scontext;
+
+	if (selinux_enabled == -1)
+		selinux_enabled = (is_selinux_enabled() > 0);
+
+	if (!selinux_enabled)
+		return 0;
+
+	if (getfilecon(from_file, &scontext) < 0) {
+		/*
+		 * If the filesystem doesn't support extended
+		 * attributes, the original had no special security
+		 * context and the target cannot have one either.
+		 */
+		if (errno == EOPNOTSUPP)
+			return 0;
+
+		jed_verror("Could not get security context for %s",
+		      from_file);
+		return 1;
+	}
+
+	if (setfscreatecon(scontext) < 0) {
+		jed_verror("Could not set default security context for %s",
+		      from_file);
+		freecon(scontext);
+		return 1;
+	}
+	freecon(scontext);
+#endif
+	return 0;
+}
+
+
+int
+reset_default_security_context()
+{
+#ifdef HAVE_LIBSELINUX
+	if (selinux_enabled == -1)
+		selinux_enabled = (is_selinux_enabled() > 0);
+
+	if (!selinux_enabled)
+		return 0;
+
+	if (setfscreatecon(0) < 0) {
+	        jed_verror("Could not reset default security context");
+		return 1;
+	}
+#endif
+	return 0;
+}
+
+
+int
+output_security_context(char *from_file)
+{
+#ifdef HAVE_LIBSELINUX
+	security_context_t scontext;
+
+	if (selinux_enabled == -1)
+		selinux_enabled = (is_selinux_enabled() > 0);
+	if (!selinux_enabled)
+		return 0;
+
+	if (getfilecon(from_file, &scontext) < 0) {
+		/*
+		 * If the filesystem doesn't support extended
+		 * attributes, the original had no special security
+		 * context and the target cannot have one either.
+		 */
+		if (errno == EOPNOTSUPP)
+			return 0;
+		
+	        jed_verror("Could not get security context for %s",
+		      from_file);
+		return 1;
+	}
+
+	jed_verror("%s Security Context %s", from_file, scontext);
+	freecon(scontext);
+#endif
+	return 0;
+}
+
+#if 0
+
+/*
+  Test program compile using the following command
+  cc -o t t.c -DHAVE_LIBSELINUX -DTEST -lselinux
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+main(int argc, char **argv)
+{
+
+	printf("%d: %s\n", argc, argv[1]);
+	if (argc == 3) {
+		copy_security_context(argv[1], argv[2]);
+		output_security_context(argv[2]);
+	}
+	if (argc == 2) {
+		FILE *fd;
+		char *temp;
+		match_default_security_context(argv[1]);
+		mkstemp(temp);
+		printf("temp=%s", temp);
+		fd = fopen(temp, "w");
+		fclose(fd);
+		output_security_context(temp);
+		reset_default_security_context();
+	}
+}
+#endif
--- jed-0.99-16/src/config.hin.selinux	2004-09-25 01:42:56.000000000 -0400
+++ jed-0.99-16/src/config.hin	2004-09-25 01:43:21.000000000 -0400
@@ -80,6 +80,8 @@
 /* Undefine this to disable floating point support. */
 #define FLOAT_TYPE
 
+#undef HAVE_LIBSELINUX
+
 #if defined(ultrix) && !defined(__GNUC__)
 # ifndef NO_PROTOTYPES
 #  define NO_PROTOTYPES
--- jed-0.99-16/src/modules.unx.foo	2004-09-25 01:51:55.000000000 -0400
+++ jed-0.99-16/src/modules.unx	2004-09-25 01:52:33.000000000 -0400
@@ -31,3 +31,4 @@
 version		vterm.h      
 hooks		window.h     
 colors
+selinux


--- NEW FILE jed.spec ---
Summary: A fast, compact editor based on the S-Lang screen library.
Name: jed
Version: 0.99.16
Release: 7
License: GPL
Group: Applications/Editors
Source0: ftp://space.mit.edu/pub/davis/jed/jed-0.99-16.tar.bz2
Patch1: jed-0.99.12-xkeys.patch
Patch2: jed-info.patch
Patch3: jed-multilib.patch
Patch4: jed-selinux.patch
Prereq: /sbin/install-info
Obsoletes: jed-common jed-xjed
BuildPrereq: slang-devel /usr/bin/autoconf-2.13
BuildRoot: /var/tmp/jed-root

%description
Jed is a fast, compact editor based on the S-lang screen library.  Jed
features include emulation of the Emacs, EDT, WordStar and Brief
editors; support for extensive customization with slang macros,
colors, keybindings; and a variety of programming modes with syntax
highlighting.

You should install jed if you've used it before and you like it, or if
you haven't used any text editors before and you're still deciding
what you'd like to use.  You'll also need to have jed-common
installed.

%prep
%setup -q -n jed-0.99-16
%patch1 -p1 -b .xkeys
%patch2 -p1
%patch3 -p1
%patch4 -p1 -b .selinux
autoconf-2.13 -l autoconf autoconf/configure.in > configure
chmod +x configure

%build
export JED_ROOT="%{_datadir}/jed" 
%configure
make

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/jed
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1

cp -r lib $RPM_BUILD_ROOT%{_datadir}/jed

cd src/objs
install -m 0755 -s jed $RPM_BUILD_ROOT%{_bindir}
JED_ROOT=$RPM_BUILD_ROOT%{_datadir}/jed $RPM_BUILD_ROOT%{_bindir}/jed -batch -n -l preparse.sl

cd ../../doc
install -m 644 manual/jed.1 $RPM_BUILD_ROOT%{_mandir}/man1

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc COPYING COPYRIGHT doc INSTALL INSTALL.unx README changes.txt
%{_bindir}/jed
%{_mandir}/man1/jed.*
%{_datadir}/jed

%changelog
* Sun Feb 27 2005 Florian La Roche <laroche at redhat.com>
- Copyright: -> License

* Sat Sep 25 2004 Bill Nottingham <notting at redhat.com> 0.99.16-6
- add SELinux support

* Tue Jun 15 2004 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Tue May  4 2004 Bill Nottingham <notting at redhat.com> 0.99.16-4
- remove info page (#115826)

* Fri Feb 13 2004 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Wed Jun 04 2003 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Thu May 22 2003 Bill Nottingham <notting at redhat.com> 0.99.16-1
- update to 0.99.16

* Wed Jan 22 2003 Tim Powers <timp at redhat.com>
- rebuilt

* Thu Dec 12 2002 Tim Powers <timp at redhat.com> 0.99.15-4
- rebuild on all arches

* Thu Jul 25 2002 Bill Nottingham <notting at redhat.com> 0.99.15-3
- obsolete xjed subpackage to help upgrades (ick)

* Wed Jul 24 2002 Bill Nottingham <notting at redhat.com> 0.99.15-2
- remove xjed subpackage, collapse -common into main package

* Mon Jun 24 2002 Bill Nottingham <notting at redhat.com> 0.99.15-1
- update to 0.99.15

* Fri Jun 21 2002 Tim Powers <timp at redhat.com>
- automated rebuild

* Fri Jun 14 2002 Bill Nottingham <notting at redhat.com> 0.99.14-5
- rebuild against new slang

* Thu May 23 2002 Tim Powers <timp at redhat.com>
- automated rebuild

* Wed Jan 09 2002 Tim Powers <timp at redhat.com>
- automated rebuild

* Fri Jul 20 2001 Bill Nottingham <notting at redhat.com>
- add buildprereq (#49505)

* Thu Jun 21 2001 Bill Nottingham <notting at redhat.com>
- update to 0.99.14

* Mon May 14 2001 Preston Brown <pbrown at redhat.com>
- rgrep is obsolete, package removed.

* Thu Dec 28 2000 Bill Nottingham <notting at redhat.com>
- do the long-needed update to 0.99 series

* Thu Jul 13 2000 Prospector <bugzilla at redhat.com>
- automatic rebuild

* Sat Jun 10 2000 Bill Nottingham <notting at redhat.com>
- rebuild, move the man pages, etc.

* Mon Feb 07 2000 Preston Brown <pbrown at redhat.com>
- wmconfig -> desktop

* Sat Feb 05 2000 Cristian Gafton <gafton at redhat.com>
- add info entry

* Thu Feb  3 2000 Bill Nottingham <notting at redhat.com>
- handle compressed man pages
- add install-info scripts

* Sun Mar 21 1999 Cristian Gafton <gafton at redhat.com> 
- auto rebuild in the new build environment (release 2)

* Thu Oct 29 1998 Bill Nottingham <notting at redhat.com>
- update to 0.98.7 for Raw Hide
- split off lib stuff into jed-common

* Mon Oct  5 1998 Jeff Johnson <jbj at redhat.com>
- change rgep group tag, same as grep.

* Sat Aug 15 1998 Jeff Johnson <jbj at redhat.com>
- build root

* Thu May 07 1998 Prospector System <bugs at redhat.com>
- translations modified for de, fr, tr

* Wed Apr 15 1998 Erik Troan <ewt at redhat.com>
- built against new ncurses

* Mon Nov  3 1997 Michael Fulbright <msf at redhat.com>
- added wmconfig entry for xjed

* Tue Oct 21 1997 Michael Fulbright <msf at redhat.com>
- updated to 0.98.4
- included man pages in file lists

* Thu Jul 10 1997 Erik Troan <ewt at redhat.com>
- built against glibc


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/jed/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	4 Mar 2005 22:37:20 -0000	1.1
+++ .cvsignore	4 Mar 2005 22:37:55 -0000	1.2
@@ -0,0 +1 @@
+jed-0.99-16.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/jed/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	4 Mar 2005 22:37:20 -0000	1.1
+++ sources	4 Mar 2005 22:37:55 -0000	1.2
@@ -0,0 +1 @@
+c2bcd89c92a120559865a539c2705999  jed-0.99-16.tar.bz2




More information about the scm-commits mailing list