Compare commits

...

19 Commits
rawhide ... f11

Author SHA1 Message Date
Fedora Release Engineering
a0a0b3f38d dist-git conversion 2010-07-28 13:44:02 +00:00
Jonathan G. Underwood
3ee68dde82 - Really apply the movemail patch! 2010-04-01 13:42:43 +00:00
Jonathan G. Underwood
310d06284d - Add patch to fix RHBZ #578272 - security vulnerability with movemail
(CVE-2010-0825)
2010-04-01 13:37:59 +00:00
Jonathan G. Underwood
3d1926b5ff - Backout unneeded gtk patch 2010-03-30 22:31:27 +00:00
Jonathan G. Underwood
9888f7388d - Update rpm-spec-mode.el and friends 2010-03-30 22:08:30 +00:00
Jonathan G. Underwood
b9972d7223 - Add fix for BZ 53346
- Backport of bugfixes from F-12 branch (spec file changelog entries
    follow)
- Backport fixes for bugs 516391, 484830, 474958 from F-13 branch (Jonathan
    G. Underwood)
- Add cwd to load-path in byte-compile macro for add-on packaging (Jonathan
    G. Underwood)
- Add some commentary to spec file (Jonathan G. Underwood)
- Add patch to fix rhbz#547566 from Juanma Barranquero (Jonathan G.
    Underwood)
- Simpler fix for rhbz#517272 (Karel Klic)
- Fixed rhbz#545398 - ETags messes up filenames (Karel Klic)
- fix #543046 - Using scroll bar in emacs highlights/selects text (Daniel
    Novotny)
2010-03-30 22:04:38 +00:00
Jonathan G. Underwood
bf7dd052f0 - Add patch to fix rhbz#547566 (from Juanma Barranquero) 2010-01-14 12:19:50 +00:00
Daniel Novotny
8633619510 - fix #542657 - emacs does not display indic text 2009-12-03 13:13:40 +00:00
Bill Nottingham
ccd2b4f597 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:23:33 +00:00
Jonathan G. Underwood
d2c1a04f6c - Update macros.xemacs to treat epoch correctly and be consistent with
xemacs package
- Use site_start_d macro consistently
23.1-5
- emacs contains nxml-mode (#516391)
2009-10-13 23:42:16 +00:00
Daniel Novotny
8c1b29cd80 fix #516391 2009-09-29 11:04:59 +00:00
Daniel Novotny
16ac640378 fix #510750 2009-09-22 11:22:45 +00:00
Daniel Novotny
c7c857c993 fix #519151 2009-08-26 10:53:58 +00:00
Daniel Novotny
29cc9564db adding alsa-lib-devel to BuildRequires 2009-08-24 12:56:11 +00:00
Daniel Novotny
fda42c76c3 new upstream version 23.1 2009-08-03 08:48:09 +00:00
Daniel Novotny
93c25c9573 fix #508033 2009-07-02 11:47:23 +00:00
Daniel Novotny
bb151684cb fix #469220 2009-06-24 12:06:11 +00:00
Daniel Novotny
7b0b6c95b4 fix bz#505083 2009-06-11 11:04:13 +00:00
Jesse Keating
e4630aed68 Initialize branch F-11 for emacs 2009-04-15 05:29:03 +00:00
18 changed files with 564 additions and 75 deletions

View File

@ -1 +0,0 @@
emacs-22.3.tar.gz

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
emacs-23.1.tar.gz

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: emacs
# $Id: Makefile,v 1.1 2004/09/09 04:30:11 cvsdist Exp $
NAME := emacs
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -4,5 +4,3 @@
;;; prevents loading of this file. Also the "-q" option to emacs
;;; prevents both "~/.emacs" and this file from being loaded at startup.
; bz#443549
(setq ispell-program-name "hunspell")

21
emacs-23.1-cpp.patch Normal file
View File

@ -0,0 +1,21 @@
diff -up emacs-23.1/configure.in.cpp emacs-23.1/configure.in
--- emacs-23.1/configure.in.cpp 2009-11-30 13:24:53.000000000 +0100
+++ emacs-23.1/configure.in 2009-11-30 13:25:45.000000000 +0100
@@ -2983,7 +2983,7 @@ echo creating lib-src/Makefile
sed -e '1,/start of cpp stuff/d'\
-e 's,/\*\*/#\(.*\)$,/* \1 */,' \
< Makefile.c > junk.c
- $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
+ $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c
cat junk1.c junk2.c > Makefile.new
rm -f junk.c junk1.c junk2.c
@@ -2999,7 +2999,7 @@ echo creating src/Makefile
sed -e '1,/start of cpp stuff/d'\
-e 's,/\*\*/#\(.*\)$,/* \1 */,' \
< Makefile.c > junk.c
- $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
+ $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c
cat junk1.c junk2.c > Makefile.new
rm -f junk.c junk1.c junk2.c

45
emacs-23.1-fontdpi.patch Normal file
View File

@ -0,0 +1,45 @@
diff -up emacs-23.1/src/xterm.c.fontdpi emacs-23.1/src/xterm.c
--- emacs-23.1/src/xterm.c.fontdpi 2010-01-04 09:11:45.000000000 +0100
+++ emacs-23.1/src/xterm.c 2010-01-04 11:50:19.627777180 +0100
@@ -10380,17 +10380,31 @@ x_term_init (display_name, xrm_option, r
dpyinfo->visual, AllocNone);
{
- int screen_number = XScreenNumberOfScreen (dpyinfo->screen);
- double pixels = DisplayHeight (dpyinfo->display, screen_number);
- double mm = DisplayHeightMM (dpyinfo->display, screen_number);
- /* Mac OS X 10.3's Xserver sometimes reports 0.0mm. */
- dpyinfo->resy = (mm < 1) ? 100 : pixels * 25.4 / mm;
- pixels = DisplayWidth (dpyinfo->display, screen_number);
- mm = DisplayWidthMM (dpyinfo->display, screen_number);
- /* Mac OS X 10.3's Xserver sometimes reports 0.0mm. */
- dpyinfo->resx = (mm < 1) ? 100 : pixels * 25.4 / mm;
+ /* If we are using Xft, check dpi value in X resources.
+ It is better we use it as well, since Xft will use it, as will all
+ Gnome applications. If our real DPI is smaller or larger than the
+ one Xft uses, our font will look smaller or larger than other
+ for other applications, even if it is the same font name (monospace-10
+ for example). */
+ char *v = XGetDefault (dpyinfo->display, "Xft", "dpi");
+ double d;
+ if (v != NULL && sscanf (v, "%lf", &d) == 1)
+ dpyinfo->resy = dpyinfo->resx = d;
}
+ if (dpyinfo->resy < 1)
+ {
+ int screen_number = XScreenNumberOfScreen (dpyinfo->screen);
+ double pixels = DisplayHeight (dpyinfo->display, screen_number);
+ double mm = DisplayHeightMM (dpyinfo->display, screen_number);
+ /* Mac OS X 10.3's Xserver sometimes reports 0.0mm. */
+ dpyinfo->resy = (mm < 1) ? 100 : pixels * 25.4 / mm;
+ pixels = DisplayWidth (dpyinfo->display, screen_number);
+ mm = DisplayWidthMM (dpyinfo->display, screen_number);
+ /* Mac OS X 10.3's Xserver sometimes reports 0.0mm. */
+ dpyinfo->resx = (mm < 1) ? 100 : pixels * 25.4 / mm;
+ }
+
dpyinfo->Xatom_wm_protocols
= XInternAtom (dpyinfo->display, "WM_PROTOCOLS", False);
dpyinfo->Xatom_wm_take_focus

View File

@ -0,0 +1,12 @@
=== modified file 'lisp/hexl.el'
--- lisp/hexl.el 2010-01-13 08:35:10 +0000
+++ lisp/hexl.el 2010-01-14 00:38:04 +0000
@@ -779,7 +779,7 @@
(defun hexl-printable-character (ch)
"Return a displayable string for character CH."
- (format "%c" (if hexl-iso
+ (format "%c" (if (not (equal hexl-iso ""))
(if (or (< ch 32) (and (>= ch 127) (< ch 160)))
46
ch)

23
emacs-23.1-indian.patch Normal file
View File

@ -0,0 +1,23 @@
diff -up emacs-23.1/lisp/language/indian.el.indian emacs-23.1/lisp/language/indian.el
--- emacs-23.1/lisp/language/indian.el.indian 2009-12-03 13:03:04.000000000 +0100
+++ emacs-23.1/lisp/language/indian.el 2009-12-03 13:05:53.000000000 +0100
@@ -165,15 +165,15 @@ South Indian language Malayalam is suppo
"Regexp matching a composable sequence of Malayalam characters.")
(let ((script-regexp-alist
- `((devanagari . ,devanagari-composable-pattern)
+ `((devanagari . "[\x900-\x97F\x200C\x200D]+")
(bengali . "[\x980-\x9FF\x200C\x200D]+")
(gurmukhi . "[\xA00-\xA7F\x200C\x200D]+")
(gujarati . "[\xA80-\xAFF\x200C\x200D]+")
(oriya . "[\xB00-\xB7F\x200C\x200D]+")
- (tamil . ,tamil-composable-pattern)
+ (tamil . "[\xB80-\xBFF\x200C\x200D]+")
(telugu . "[\xC00-\xC7F\x200C\x200D]+")
- (kannada . ,kannada-composable-pattern)
- (malayalam . ,malayalam-composable-pattern))))
+ (kannada . "[\xC80-\xCFF\x200C\x200D]+")
+ (malayalam . "[\xD00-\xD7F\x200C\x200D]+"))))
(map-char-table
#'(lambda (key val)
(let ((slot (assq val script-regexp-alist)))

19
emacs-23.1-memmove.patch Normal file
View File

@ -0,0 +1,19 @@
diff -up emacs-23.1/lib-src/etags.c.memmove emacs-23.1/lib-src/etags.c
--- emacs-23.1/lib-src/etags.c.memmove 2009-06-21 06:37:34.000000000 +0200
+++ emacs-23.1/lib-src/etags.c 2009-12-08 17:55:41.442792036 +0100
@@ -6695,13 +6695,13 @@ absolute_filename (file, dir)
else if (cp[0] != '/')
cp = slashp;
#endif
- strcpy (cp, slashp + 3);
+ memmove (cp, slashp + 3, strlen(slashp + 2));
slashp = cp;
continue;
}
else if (slashp[2] == '/' || slashp[2] == '\0')
{
- strcpy (slashp, slashp + 2);
+ memmove (slashp, slashp + 2, strlen(slashp + 1));
continue;
}
}

100
emacs-23.1-movemail.patch Normal file
View File

@ -0,0 +1,100 @@
diff -up emacs-23.1/lib-src/movemail.c.movemail emacs-23.1/lib-src/movemail.c
--- emacs-23.1/lib-src/movemail.c.movemail 2010-03-31 19:18:05.611899443 +0200
+++ emacs-23.1/lib-src/movemail.c 2010-03-31 19:24:29.738754553 +0200
@@ -176,7 +176,9 @@ main (argc, argv)
int nread;
int status;
int c, preserve_mail = 0;
-
+ uid_t real_gid, priv_gid;
+ real_gid = getgid();
+ priv_gid = getegid();
#ifndef MAIL_USE_SYSTEM_LOCK
struct stat st;
long now;
@@ -247,25 +249,6 @@ main (argc, argv)
if (*outname == 0)
fatal ("Destination file name is empty", 0, 0);
- /* Check access to output file. */
- if (access (outname, F_OK) == 0 && access (outname, W_OK) != 0)
- pfatal_with_name (outname);
-
- /* Also check that outname's directory is writable to the real uid. */
- {
- char *buf = (char *) xmalloc (strlen (outname) + 1);
- char *p;
- strcpy (buf, outname);
- p = buf + strlen (buf);
- while (p > buf && !IS_DIRECTORY_SEP (p[-1]))
- *--p = 0;
- if (p == buf)
- *p++ = '.';
- if (access (buf, W_OK) != 0)
- pfatal_with_name (buf);
- free (buf);
- }
-
#ifdef MAIL_USE_POP
if (!strncmp (inname, "po:", 3))
{
@@ -277,15 +260,11 @@ main (argc, argv)
exit (status);
}
- setuid (getuid ());
+ if (setuid (getuid ()) < 0)
+ fatal ("Failed to drop privileges", 0, 0);
#endif /* MAIL_USE_POP */
#ifndef DISABLE_DIRECT_ACCESS
-
- /* Check access to input file. */
- if (access (inname, R_OK | W_OK) != 0)
- pfatal_with_name (inname);
-
#ifndef MAIL_USE_MMDF
#ifndef MAIL_USE_SYSTEM_LOCK
#ifdef MAIL_USE_MAILLOCK
@@ -379,7 +358,8 @@ main (argc, argv)
time_t touched_lock, now;
#endif
- setuid (getuid ());
+ if (setuid (getuid ()) < 0 || setegid (real_gid) < 0)
+ fatal("Failed to drop privileges", 0, 0);
#ifndef MAIL_USE_MMDF
#ifdef MAIL_USE_SYSTEM_LOCK
@@ -405,6 +385,9 @@ main (argc, argv)
if (outdesc < 0)
pfatal_with_name (outname);
+ if (setegid (priv_gid) < 0)
+ fatal("Failed to regain privileges", 0, 0);
+
/* This label exists so we can retry locking
after a delay, if it got EAGAIN or EBUSY. */
retry_lock:
@@ -502,6 +485,10 @@ main (argc, argv)
if (close (outdesc) != 0)
pfatal_and_delete (outname);
+ /* Prevent symlink attacks truncating other users' mailboxes */
+ if (setegid (real_gid) < 0)
+ fatal("Failed to drop privileges", 0, 0);
+
#ifdef MAIL_USE_SYSTEM_LOCK
if (! preserve_mail)
{
@@ -529,6 +516,10 @@ main (argc, argv)
}
#endif /* not MAIL_USE_SYSTEM_LOCK */
+ /* End of mailbox truncation */
+ if (setegid (priv_gid) < 0)
+ fatal("Failed to regain privileges", 0, 0);
+
#ifdef MAIL_USE_MAILLOCK
/* This has to occur in the child, i.e., in the process that
acquired the lock! */

45
emacs-23.1-nxml.patch Normal file
View File

@ -0,0 +1,45 @@
=== modified file 'lisp/nxml/nxml-mode.el'
--- lisp/nxml/nxml-mode.el 2009-09-24 23:22:17 +0000
+++ lisp/nxml/nxml-mode.el 2009-10-24 21:32:19 +0000
@@ -1254,29 +1254,31 @@
(defun nxml-balanced-close-start-tag (block-or-inline)
(let ((token-end (nxml-token-before))
- (pos (1+ (point))))
+ (pos (1+ (point)))
+ (token-start xmltok-start))
(unless (or (eq xmltok-type 'partial-start-tag)
(and (memq xmltok-type '(start-tag
empty-element
partial-empty-element))
(>= token-end pos)))
(error "Not in a start-tag"))
+ ;; Note that this insertion changes xmltok-start.
(insert "></"
(buffer-substring-no-properties (+ xmltok-start 1)
(min xmltok-name-end (point)))
">")
(if (eq block-or-inline 'inline)
(goto-char pos)
- (goto-char xmltok-start)
+ (goto-char token-start)
(back-to-indentation)
- (if (= (point) xmltok-start)
+ (if (= (point) token-start)
(let ((indent (current-column)))
- (goto-char pos)
- (insert "\n")
- (indent-line-to indent)
- (goto-char pos)
- (insert "\n")
- (indent-line-to (+ nxml-child-indent indent)))
+ (goto-char pos)
+ (insert "\n")
+ (indent-line-to indent)
+ (goto-char pos)
+ (insert "\n")
+ (indent-line-to (+ nxml-child-indent indent)))
(goto-char pos)))))
(defun nxml-finish-element ()

82
emacs-23.1-scroll.patch Normal file
View File

@ -0,0 +1,82 @@
diff -up emacs-23.1/src/gtkutil.c.scroll emacs-23.1/src/gtkutil.c
--- emacs-23.1/src/gtkutil.c.scroll 2009-06-21 06:38:15.000000000 +0200
+++ emacs-23.1/src/gtkutil.c 2009-12-02 17:10:08.000000000 +0100
@@ -3401,6 +3401,38 @@ xg_set_toolkit_scroll_bar_thumb (bar, po
}
}
+/* Return non-zero if EVENT is for a scroll bar in frame F.
+ When the same X window is used for several Gtk+ widgets, we cannot
+ say for sure based on the X window alone if an event is for the
+ frame. This function does additional checks.
+
+ Return non-zero if the event is for a scroll bar, zero otherwise. */
+
+int
+xg_event_is_for_scrollbar (f, event)
+ FRAME_PTR f;
+ XEvent *event;
+{
+ int retval = 0;
+
+ if (f && event->type == ButtonPress)
+ {
+ /* Check if press occurred outside the edit widget. */
+ GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f));
+ retval = gdk_display_get_window_at_pointer (gdpy, NULL, NULL)
+ != f->output_data.x->edit_widget->window;
+ }
+ else if (f && (event->type != ButtonRelease || event->type != MotionNotify))
+ {
+ /* If we are releasing or moving the scroll bar, it has the grab. */
+ retval = gtk_grab_get_current () != 0
+ && gtk_grab_get_current () != f->output_data.x->edit_widget;
+ }
+
+ return retval;
+}
+
+
/***********************************************************************
Tool bar functions
diff -up emacs-23.1/src/gtkutil.h.scroll emacs-23.1/src/gtkutil.h
--- emacs-23.1/src/gtkutil.h.scroll 2009-06-21 06:38:15.000000000 +0200
+++ emacs-23.1/src/gtkutil.h 2009-12-02 17:10:08.000000000 +0100
@@ -180,6 +180,8 @@ extern void xg_set_toolkit_scroll_bar_th
int position,
int whole));
+extern int xg_event_is_for_scrollbar P_ ((FRAME_PTR f, XEvent *event));
+
extern void update_frame_tool_bar P_ ((FRAME_PTR f));
extern void free_frame_tool_bar P_ ((FRAME_PTR f));
diff -up emacs-23.1/src/xterm.c.scroll emacs-23.1/src/xterm.c
--- emacs-23.1/src/xterm.c.scroll 2009-06-21 06:38:20.000000000 +0200
+++ emacs-23.1/src/xterm.c 2009-12-02 17:13:24.000000000 +0100
@@ -6743,6 +6743,12 @@ handle_one_xevent (dpyinfo, eventp, fini
clear_mouse_face (dpyinfo);
}
+
+#ifdef USE_GTK
+ if (f && xg_event_is_for_scrollbar (f, &event))
+ f = 0;
+#endif
+
if (f)
{
@@ -6899,6 +6905,11 @@ handle_one_xevent (dpyinfo, eventp, fini
else
f = x_window_to_frame (dpyinfo, event.xbutton.window);
+#ifdef USE_GTK
+ if (f && xg_event_is_for_scrollbar (f, &event))
+ f = 0;
+#endif
+
if (f)
{
/* Is this in the tool-bar? */

44
emacs-23.1-xdg.patch Normal file
View File

@ -0,0 +1,44 @@
diff -up emacs-23.1/lisp/net/browse-url.el.xdg emacs-23.1/lisp/net/browse-url.el
--- emacs-23.1/lisp/net/browse-url.el.xdg 2009-09-18 15:10:03.000000000 -0400
+++ emacs-23.1/lisp/net/browse-url.el 2009-09-18 15:18:51.000000000 -0400
@@ -234,6 +234,7 @@ associated with the first REGEXP which m
function is passed the URL and any other args of `browse-url'. The last
regexp should probably be \".\" to specify a default browser."
:type '(choice
+ (function-item :tag "Default freedesktop.org browser" :value browse-url-default-xdg-browser)
(function-item :tag "Emacs W3" :value browse-url-w3)
(function-item :tag "W3 in another Emacs via `gnudoit'"
:value browse-url-w3-gnudoit)
@@ -266,6 +267,23 @@ regexp should probably be \".\" to speci
:version "21.1"
:group 'browse-url)
+;;;###autoload
+(defcustom browse-url-xdg-open-program "xdg-open"
+ "*The name by which to invoke xdg-open."
+ :type 'string
+ :group 'browse-url)
+
+
+;;;###autoload
+(defun browse-url-default-xdg-browser (url &optional new-window)
+ (interactive (browse-url-interactive-arg "URL: "))
+ (let ((process-environment (browse-url-process-environment))
+ (process-connection-type nil))
+ (start-process (concat browse-url-xdg-open-program " " url) nil
+ browse-url-xdg-open-program url)))
+
+
+
(defcustom browse-url-netscape-program "netscape"
;; Info about netscape-remote from Karl Berry.
"The name by which to invoke Netscape.
@@ -876,6 +894,8 @@ The order attempted is gnome-moz-remote,
Galeon, Konqueror, Netscape, Mosaic, Lynx in an xterm, and then W3."
(apply
(cond
+ ((executable-find browse-url-xdg-open-program)
+ 'browse-url-default-xdg-browser)
((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz)
((executable-find browse-url-mozilla-program) 'browse-url-mozilla)
((executable-find browse-url-firefox-program) 'browse-url-firefox)

View File

@ -3,12 +3,12 @@
Summary: GNU Emacs text editor
Name: emacs
Epoch: 1
Version: 22.3
Release: 11%{?dist}
Version: 23.1
Release: 13%{?dist}
License: GPLv3+
URL: http://www.gnu.org/software/emacs/
Group: Applications/Editors
Source0: ftp://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.gz
Source0: ftp://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.bz2
Source1: emacs.desktop
Source3: dotemacs.el
Source4: site-start.el
@ -16,36 +16,68 @@ Source7: http://php-mode.svn.sourceforge.net/svnroot/php-mode/tags/php-mode-1.4.
Source8: php-mode-init.el
Source9: ssl.el
# rpm-spec-mode from XEmacs
Source10: http://cvs.xemacs.org/viewcvs.cgi/*checkout*/XEmacs/packages/xemacs-packages/prog-modes/rpm-spec-mode.el
Source10: rpm-spec-mode.el
Source11: rpm-spec-mode-init.el
Source13: focus-init.el
Source14: po-mode.el
Source15: po-mode-init.el
Source18: default.el
Source20: igrep.el
Source21: igrep-init.el
Patch0: glibc-open-macro.patch
Patch1: rpm-spec-mode.patch
Patch2: po-mode-auto-replace-date-71264.patch
Patch3: rpm-spec-mode-utc.patch
Patch4: emacsclient.patch
Patch5: emacs-23.1-xdg.patch
# Fixed in upstream CVS.
Patch6: emacs-23.1-cpp.patch
Patch7: emacs-23.1-scroll.patch
Patch8: emacs-23.1-indian.patch
# Fixed in upstream CVS
Patch9: emacs-23.1-memmove.patch
# Taken from upstream GIT repository
# http://git.savannah.gnu.org/cgit/emacs.git/diff/src/xsettings.c?id=b3a25b88e82569f916712c635207c8bdd590e13b
# rhbz#517272
Patch10: emacs-23.1-fontdpi.patch
# Fix https://bugzilla.redhat.com/show_bug.cgi?id=547566
# Reported upstream: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5313
Patch11: emacs-23.1-hexl-mode.patch
# Fix https://bugzilla.redhat.com/show_bug.cgi?id=553346
# Upstream: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=2840
# Backported fix from upstream:
# http://bazaar.launchpad.net/~vcs-imports/emacs/trunk/revision/98299
Patch12: emacs-23.1-nxml.patch
# Fix https://bugzilla.redhat.com/show_bug.cgi?id=578272
# CVE-2010-0825
Patch13: emacs-23.1-movemail.patch
Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: atk-devel, cairo-devel, freetype-devel, fontconfig-devel, giflib-devel, glibc-devel, gtk2-devel, libpng-devel
BuildRequires: atk-devel, cairo-devel, desktop-file-utils, freetype-devel, fontconfig-devel, dbus-devel, giflib-devel, glibc-devel, gtk2-devel, libpng-devel
BuildRequires: libjpeg-devel, libtiff-devel, libX11-devel, libXau-devel, libXdmcp-devel, libXrender-devel, libXt-devel
BuildRequires: libXpm-devel, ncurses-devel, xorg-x11-proto-devel, zlib-devel
BuildRequires: autoconf, automake, bzip2, cairo, texinfo
BuildRequires: autoconf, automake, bzip2, cairo, texinfo, gzip
%ifarch %{ix86}
BuildRequires: setarch
%endif
Requires: xorg-x11-fonts-ISO8859-1-100dpi
#Requires: xorg-x11-fonts-ISO8859-1-100dpi, xorg-x11-fonts-misc
Requires: emacs-common = %{epoch}:%{version}-%{release}
Requires: hicolor-icon-theme
Requires: hunspell
#Requires: hicolor-icon-theme
# bz#443549, bz#508033
Requires: hunspell, aspell
# bz#507852
BuildRequires: librsvg2-devel, m17n-lib-devel, libotf-devel
BuildRequires: alsa-lib-devel
Requires: librsvg2
# Desktop integration
BuildRequires: desktop-file-utils
Requires: desktop-file-utils
Conflicts: gettext < 0.10.40
Provides: emacs(bin)
# #516391
Obsoletes: emacs-nxml-mode < 0.20041004-10
Provides: emacs-nxml-mode = 0.20041004-10
# C and build patches
@ -85,7 +117,9 @@ on a terminal.
%package common
Summary: Emacs common files
Group: Applications/Editors
PreReq: /sbin/install-info, dev, %{_sbindir}/alternatives
Requires(preun): %{_sbindir}/alternatives, /sbin/install-info, dev
Requires(posttrans): %{_sbindir}/alternatives
Requires(post): /sbin/install-info, dev
Obsoletes: emacs-leim
%description common
@ -112,11 +146,19 @@ Emacs packages or see some elisp examples.
%prep
%setup -q
%patch0 -p1 -b .glibc-open-macro
%patch4 -p1
%patch5 -p1 -b .xdg
%patch6 -p1
%patch7 -p1 -b .scroll
%patch8 -p1
%patch9 -p1 -b .memmove
%patch10 -p1 -b .fontdpi
%patch11 -p0
%patch12 -p0
%patch13 -p1
# install rest of site-lisp files
( cd site-lisp
cp %SOURCE7 %SOURCE9 %SOURCE10 %SOURCE14 %SOURCE20 .
cp %SOURCE7 %SOURCE9 %SOURCE10 %SOURCE14 .
# rpm-spec-mode can use compilation-mode
patch < %PATCH1
# fix po-auto-replace-revision-date nil
@ -128,6 +170,9 @@ Emacs packages or see some elisp examples.
# we prefer our emacs.desktop file
cp %SOURCE1 etc/emacs.desktop
grep -v "tetris.elc" lisp/Makefile.in > lisp/Makefile.in.new \
&& mv lisp/Makefile.in.new lisp/Makefile.in
# avoid trademark issues
%if %{paranoid}
rm -f lisp/play/tetris.el lisp/play/tetris.elc
@ -137,6 +182,13 @@ rm -f lisp/play/tetris.el lisp/play/tetris.elc
rm -f etc/sex.6 etc/condom.1 etc/celibacy.1 etc/COOKIES etc/future-bug etc/JOKES
%endif
%define info_files ada-mode auth autotype calc ccmode cl dbus dired-x ebrowse ediff efaq eintr elisp emacs emacs-mime epa erc eshell eudc flymake forms gnus idlwave info mairix-el message mh-e newsticker nxml-mode org pcl-cvs pgg rcirc reftex remember sasl sc ses sieve smtpmail speedbar tramp url vip viper widget woman
if test "$(perl -e 'while (<>) { if (/^INFO_FILES/) { s/.*=//; while (s/\\$//) { s/\\//; $_ .= <>; }; s/\s+/ /g; s/^ //; s/ $//; print; exit; } }' Makefile.in)" != "%info_files"; then
echo Please update info_files >&2
exit 1
fi
%ifarch %{ix86}
%define setarch setarch %{_arch} -R
%else
@ -146,7 +198,10 @@ rm -f etc/sex.6 etc/condom.1 etc/celibacy.1 etc/COOKIES etc/future-bug etc/JOKES
%build
export CFLAGS="-DMAIL_USE_LOCKF $RPM_OPT_FLAGS"
%configure --with-x-toolkit=gtk
#we patch configure.in so we have to do this
autoconf
%configure --with-dbus --with-gif --with-jpeg --with-png --with-rsvg \
--with-tiff --with-xft --with-xpm --with-x-toolkit=gtk
%__make bootstrap
%{setarch} %__make %{?_smp_mflags}
@ -163,7 +218,7 @@ ${TOPDIR}/src/emacs %{bytecompargs} site-lisp/*.el
# Create pkgconfig file
cat > emacs.pc << EOF
sitepkglispdir=%{site_lisp}
sitestartdir=%{site_lisp}/site-start.d
sitestartdir=%{site_start_d}
Name: emacs
Description: GNU Emacs text editor
@ -173,20 +228,25 @@ EOF
# Create macros.emacs RPM macro file
cat > macros.emacs << EOF
%%_emacs_version %{version}
%%_emacs_epoch %{epoch}
%%_emacs_ev %{?epoch:%{epoch}:}%{version}
%%_emacs_evr %{?epoch:%{epoch}:}%{version}-%{release}
%%_emacs_sitelispdir %{site_lisp}
%%_emacs_sitestartdir %{site_start_d}
%%_emacs_bytecompile /usr/bin/emacs %bytecompargs
%%_emacs_bytecompile /usr/bin/emacs -batch --no-init-file --no-site-file --eval '(progn (setq load-path (cons "." load-path)))' -f batch-byte-compile
EOF
%install
rm -rf %{buildroot}
%makeinstall
make install INSTALL="%{__install} -p" DESTDIR=%{buildroot}
# let alternatives manage the symlink
rm %{buildroot}%{_bindir}/emacs
# do not compress the files which implement compression itself (#484830)
gunzip %{buildroot}%{_datadir}/emacs/%{version}/lisp/jka-compr.el.gz
gunzip %{buildroot}%{_datadir}/emacs/%{version}/lisp/jka-cmpr-hook.el.gz
# rebuild without X support
# remove the versioned binary with X support so that we end up with .1 suffix for emacs-nox too
rm src/emacs-%{version}.*
@ -194,14 +254,19 @@ rm src/emacs-%{version}.*
%__make %{?_smp_mflags}
# install the emacs without X
install -m 0755 src/emacs-%{version}.1 %{buildroot}%{_bindir}/emacs-%{version}-nox
install -p -m 0755 src/emacs-%{version}.1 %{buildroot}%{_bindir}/emacs-%{version}-nox
# make sure movemail isn't setgid
chmod 755 %{buildroot}%{emacs_libexecdir}/movemail
mkdir -p %{buildroot}%{site_lisp}
install -m 0644 %SOURCE4 %{buildroot}%{site_lisp}/site-start.el
install -m 0644 %SOURCE18 %{buildroot}%{site_lisp}
install -p -m 0644 %SOURCE4 %{buildroot}%{site_lisp}/site-start.el
install -p -m 0644 %SOURCE18 %{buildroot}%{site_lisp}
#this solves bz#474958, "update-directory-autoloads" now finally works
#the path is different each version, so we'll generate it here
echo "(setq source-directory \"%{_datadir}/emacs/%{version}/\")" \
>> %{buildroot}%{site_lisp}/site-start.el
mv %{buildroot}%{_bindir}/{etags,etags.emacs}
mv %{buildroot}%{_mandir}/man1/{ctags.1,gctags.1}
@ -209,37 +274,32 @@ mv %{buildroot}%{_mandir}/man1/{etags.1,etags.emacs.1}
mv %{buildroot}%{_bindir}/{ctags,gctags}
# install site-lisp files
install -m 0644 site-lisp/*.el{,c} %{buildroot}%{site_lisp}
install -p -m 0644 site-lisp/*.el{,c} %{buildroot}%{site_lisp}
mkdir -p %{buildroot}%{site_lisp}/site-start.d
install -m 0644 $RPM_SOURCE_DIR/*-init.el %{buildroot}%{site_lisp}/site-start.d
install -p -m 0644 %SOURCE8 %SOURCE11 %SOURCE13 %SOURCE15 %{buildroot}%{site_lisp}/site-start.d
# default initialization file
mkdir -p %{buildroot}%{_sysconfdir}/skel
install -m 0644 %SOURCE3 %{buildroot}%{_sysconfdir}/skel/.emacs
install -p -m 0644 %SOURCE3 %{buildroot}%{_sysconfdir}/skel/.emacs
# install pkgconfig file
mkdir -p %{buildroot}/%{pkgconfig}
install -m 0644 emacs.pc %{buildroot}/%{pkgconfig}
install -p -m 0644 emacs.pc %{buildroot}/%{pkgconfig}
# install rpm macro definition file
mkdir -p %{buildroot}%{_sysconfdir}/rpm
install -m 0644 macros.emacs %{buildroot}%{_sysconfdir}/rpm/
install -p -m 0644 macros.emacs %{buildroot}%{_sysconfdir}/rpm/
# after everything is installed, remove info dir
rm -f %{buildroot}%{_infodir}/dir
rm %{buildroot}%{_localstatedir}/games/emacs/*
# install desktop file
mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-install --dir=%{buildroot}%{_datadir}/applications \
%SOURCE1
# put the icons where they belong
for i in 16 24 32 48 ; do
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps
cp %{buildroot}%{_datadir}/emacs/%{version}/etc/images/icons/emacs_${i}.png \
%{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/emacs.png
done
#
# create file lists
@ -263,8 +323,6 @@ cat el-*-files common-lisp-dir-files > el-filelist
%clean
rm -rf %{buildroot}
%define info_files ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq eintr elisp0 elisp1 elisp emacs emacs-mime emacs-xtra erc eshell eudc flymake forms gnus idlwave info message mh-e newsticker org pcl-cvs pgg rcirc reftex sc ses sieve smtpmail speedbar tramp url viper vip widget woman
%post
update-desktop-database &> /dev/null || :
touch --no-create %{_datadir}/icons/hicolor
@ -309,14 +367,14 @@ alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-%{version}-nox 70
%post common
for f in %{info_files}; do
/sbin/install-info %{_infodir}/$f.gz %{_infodir}/dir 2> /dev/null || :
/sbin/install-info %{_infodir}/$f %{_infodir}/dir 2> /dev/null || :
done
%preun common
alternatives --remove emacs.etags %{_bindir}/etags.emacs || :
if [ "$1" = 0 ]; then
for f in %{info_files}; do
/sbin/install-info --delete %{_infodir}/$f.gz %{_infodir}/dir 2> /dev/null || :
/sbin/install-info --delete %{_infodir}/$f %{_infodir}/dir 2> /dev/null || :
done
fi
@ -332,6 +390,9 @@ alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \
%dir %{emacs_libexecdir}
%{_datadir}/applications/emacs.desktop
%{_datadir}/icons/hicolor/*/apps/emacs.png
%{_datadir}/icons/hicolor/*/apps/emacs22.png
%{_datadir}/icons/hicolor/scalable/apps/emacs.svg
%{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document.svg
%files nox
%defattr(-,root,root)
@ -364,6 +425,65 @@ alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \
%dir %{_datadir}/emacs/%{version}
%changelog
* Thu Apr 1 2010 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1:23.1-13
- Really apply the movemail patch!
* Thu Apr 1 2010 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1:23.1-12
- Add patch to fix RHBZ #578272 - security vulnerability with movemail
(CVE-2010-0825)
* Tue Mar 30 2010 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1:23.1-11
- Backout unneeded gtk patch
* Tue Mar 30 2010 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1:23.1-10
- Update rpm-spec-mode.el and friends
* Tue Mar 30 2010 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1:23.1-9
- Add fix for BZ 53346
- Backport of bugfixes from F-12 branch (spec file changelog entries follow)
- Backport fixes for bugs 516391, 484830, 474958 from F-13 branch (Jonathan G. Underwood)
- Add cwd to load-path in byte-compile macro for add-on packaging (Jonathan G. Underwood)
- Add some commentary to spec file (Jonathan G. Underwood)
- Add patch to fix rhbz#547566 from Juanma Barranquero (Jonathan G. Underwood)
- Simpler fix for rhbz#517272 (Karel Klic)
- Fixed rhbz#545398 - ETags messes up filenames (Karel Klic)
- fix #543046 - Using scroll bar in emacs highlights/selects text (Daniel Novotny)
* Thu Jan 14 2010 Jonathan G. Underwood <jonathan.underwood@gmail.com> 1:23.1-8
- Add patch to fix rhbz#547566 (from Juanma Barranquero)
* Thu Dec 03 2009 Daniel Novotny <dnovotny@redhat.com> 1:23.1-7
- fix #542657 - emacs does not display indic text
* Wed Oct 14 2009 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1:23.1-6
- Update macros.xemacs to treat epoch correctly and be consistent with xemacs package
- Use site_start_d macro consistently
* Tue Sep 29 2009 Daniel Novotny <dnovotny@redhat.com> 1:23.1-5
- emacs contains nxml-mode (#516391)
* Tue Sep 22 2009 Daniel Novotny <dnovotny@redhat.com> 1:23.1-4
- update %%info_files (#510750)
* Wed Aug 26 2009 Daniel Novotny <dnovotny@redhat.com> 1:23.1-3
- correct BuildRequires for libotf (#519151)
* Mon Aug 24 2009 Daniel Novotny <dnovotny@redhat.com> 1:23.1-2
- added alsa to BuildRequires (#518659), also libotf
* Mon Aug 03 2009 Daniel Novotny <dnovotny@redhat.com> 1:23.1-1
- new upstream version 23.1
* Thu Jul 02 2009 Daniel Novotny <dnovotny@redhat.com> 1:22.3-14
- revoked default.el change (#508033)
- added dependency: aspell (#443549)
* Wed Jun 24 2009 Daniel Novotny <dnovotny@redhat.com> 1:22.3-13
- added xorg-x11-fonts-misc to dependencies (#469220)
* Thu Jun 11 2009 Daniel Novotny <dnovotny@redhat.com> 1:22.3-12
- fix bz#505083 - rpm-add-change-log-entry date format rejected by rpmbuild
* Fri Apr 10 2009 Daniel Novotny <dnovotny@redhat.com> 1:22.3-11
- fix bz#443549 - spell-buffer, flyspell-mode do not work

View File

@ -1,6 +1,6 @@
--- rpm-spec-mode.el.~1~
+++ rpm-spec-mode.el
@@ -708,6 +708,17 @@ with no args, if that value is non-nil."
--- rpm-spec-mode.el~ 2009-06-11 11:01:53.000000000 +0200
+++ rpm-spec-mode.el 2009-06-11 11:05:24.000000000 +0200
@@ -708,6 +708,17 @@
;;------------------------------------------------------------
@ -18,12 +18,13 @@
(defun rpm-add-change-log-entry (&optional change-log-entry)
"Find change log and add an entry for today."
(interactive "sChange log entry: ")
@@ -715,8 +726,7 @@ with no args, if that value is non-nil."
@@ -715,8 +726,8 @@
(rpm-goto-section "changelog")
(let* ((address (rpm-spec-user-mail-address))
(fullname (or rpm-spec-user-full-name (user-full-name)))
- (string (concat "* " (substring (current-time-string) 0 11)
- (substring (current-time-string) -4) " "
+ (system-time-locale "C")
+ (string (concat "* " (rpm-change-log-date-string) " "
fullname " <" address ">"
(and rpm-spec-insert-changelog-version

View File

@ -63,7 +63,7 @@
;;; Code:
(defconst rpm-spec-mode-version "0.12.1x" "Version of `rpm-spec-mode'.")
(defconst rpm-spec-mode-version "0.12.3x" "Version of `rpm-spec-mode'.")
(defgroup rpm-spec nil
"RPM spec mode with Emacs/XEmacs enhancements."
@ -252,7 +252,7 @@ value returned by function `user-mail-address'."
(eval-when-compile
(concat "^%"
(regexp-opt
;; From RPM 4.4.9 sources, file build/parseSpec.c: partList[].
;; From RPM 4.6.0 sources, file build/parseSpec.c: partList[].
'("build" "changelog" "check" "clean" "description" "files"
"install" "package" "post" "postun" "pretrans" "posttrans"
"pre" "prep" "preun" "trigger" "triggerin" "triggerpostun"
@ -602,7 +602,7 @@ value returned by function `user-mail-address'."
'(1 'rpm-spec-tag-face))
'("%\\(de\\(fine\\|scription\\)\\|files\\|global\\|package\\)[ \t]+\\([^-][^ \t\n]*\\)"
(3 rpm-spec-package-face))
'("%p\\(ost\\|re\\)\\(un\\)?[ \t]+\\([^-][^ \t\n]*\\)"
'("%p\\(ost\\|re\\)\\(un\\|trans\\)?[ \t]+\\([^-][^ \t\n]*\\)"
(3 rpm-spec-package-face))
'("%configure " 0 rpm-spec-macro-face)
'("%dir[ \t]+\\([^ \t\n]+\\)[ \t]*" 1 rpm-spec-dir-face)
@ -1255,8 +1255,8 @@ See `search-forward-regexp'."
(let ((str
(progn
(goto-char (point-min))
(search-forward-regexp (concat "^"
field ":[ \t]*\\(.*?\\)[ \t]*$") max)
(search-forward-regexp
(concat "^" field ":[ \t]*\\(.*?\\)[ \t]*$") max)
(match-string 1))))
;; Try to expand macros
(if (string-match "\\(%{?\\(\\?\\)?\\)\\([a-zA-Z0-9_]*\\)\\(}?\\)" str)
@ -1299,7 +1299,7 @@ if one is present in the file."
(let ((str
(progn
(goto-char (point-min))
(search-forward-regexp (concat "Release[ \t]*:[ \t]*\\(.+\\).*$") nil)
(search-forward-regexp "^Release[ \t]*:[ \t]*\\(.+\\).*$" nil)
(match-string 1))))
(let ((inrel
(if (string-match "%{?\\([^}]*\\)}?$" str)

View File

@ -4,10 +4,10 @@
;;; Code:
-(defconst rpm-spec-mode-version "0.12.1x" "Version of `rpm-spec-mode'.")
-(defconst rpm-spec-mode-version "0.12.3x" "Version of `rpm-spec-mode'.")
+(require 'compile)
+
+(defconst rpm-spec-mode-version "0.12.1x.rh1" "Version of `rpm-spec-mode'.")
+(defconst rpm-spec-mode-version "0.12.3x.rh1" "Version of `rpm-spec-mode'.")
(defgroup rpm-spec nil
"RPM spec mode with Emacs/XEmacs enhancements."

View File

@ -1 +1 @@
aa8ba34f548cd78b35914ae5a7bb87eb emacs-22.3.tar.gz
17f7f0ba68a0432d58fa69d05a2225be emacs-23.1.tar.bz2