Upstream pre-release

This commit is contained in:
Karel Klic 2012-01-20 16:35:22 +01:00
parent 198f28a4fa
commit 2d7f921087
9 changed files with 396 additions and 846 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/emacs-23.3a.tar.bz2
/php-mode.el
/emacs-24.0.92.tar.gz

View File

@ -1,69 +0,0 @@
=== modified file 'lisp/vc-svn.el'
--- lisp/vc-svn.el 2011-01-26 08:36:39 +0000
+++ lisp/vc-svn.el 2011-02-12 01:12:53 +0000
@@ -117,17 +117,13 @@
;;;###autoload (getenv "SVN_ASP_DOT_NET_HACK"))
;;;###autoload "_svn")
;;;###autoload (t ".svn"))))
-;;;###autoload (when (file-readable-p (expand-file-name
-;;;###autoload (concat admin-dir "/entries")
-;;;###autoload (file-name-directory f)))
+;;;###autoload (when (vc-find-root f admin-dir)
;;;###autoload (load "vc-svn")
;;;###autoload (vc-svn-registered f))))
(defun vc-svn-registered (file)
"Check if FILE is SVN registered."
- (when (file-readable-p (expand-file-name (concat vc-svn-admin-directory
- "/entries")
- (file-name-directory file)))
+ (when (vc-svn-root file)
(with-temp-buffer
(cd (file-name-directory file))
(let* (process-file-side-effects
@@ -275,14 +271,12 @@
to the SVN command."
(apply 'vc-svn-command nil 0 files "add" (vc-switches 'SVN 'register)))
-(defun vc-svn-responsible-p (file)
- "Return non-nil if SVN thinks it is responsible for FILE."
- (file-directory-p (expand-file-name vc-svn-admin-directory
- (if (file-directory-p file)
- file
- (file-name-directory file)))))
-
-(defalias 'vc-svn-could-register 'vc-svn-responsible-p
+(defun vc-svn-root (file)
+ (vc-find-root file vc-svn-admin-directory))
+
+(defalias 'vc-svn-responsible-p 'vc-svn-root)
+
+(defalias 'vc-svn-could-register 'vc-svn-root
"Return non-nil if FILE could be registered in SVN.
This is only possible if SVN is responsible for FILE's directory.")
@@ -594,20 +588,10 @@
(defun vc-svn-repository-hostname (dirname)
(with-temp-buffer
- (let ((coding-system-for-read
- (or file-name-coding-system
- default-file-name-coding-system)))
- (vc-insert-file (expand-file-name (concat vc-svn-admin-directory
- "/entries")
- dirname)))
+ (let (process-file-side-effects)
+ (vc-svn-command t t dirname "info" "--xml"))
(goto-char (point-min))
- (when (re-search-forward
- ;; Old `svn' used name="svn:this_dir", newer use just name="".
- (concat "name=\"\\(?:svn:this_dir\\)?\"[\n\t ]*"
- "\\(?:[-a-z]+=\"[^\"]*\"[\n\t ]*\\)*?"
- "url=\"\\(?1:[^\"]+\\)\""
- ;; Yet newer ones don't use XML any more.
- "\\|^\ndir\n[0-9]+\n\\(?1:.*\\)") nil t)
+ (when (re-search-forward "<url>\\(.*\\)</url>" nil t)
;; This is not a hostname but a URL. This may actually be considered
;; as a feature since it allows vc-svn-stay-local to specify different
;; behavior for different modules on the same server.

View File

@ -1,49 +0,0 @@
diff -u emacs-23.2/lisp/net/browse-url.el.xdg emacs-23.2/lisp/net/browse-url.el
--- emacs-23.2/lisp/net/browse-url.el.xdg 2010-04-04 08:26:06.000000000 +1000
+++ emacs-23.2/lisp/net/browse-url.el 2010-08-16 16:49:33.000000000 +1000
@@ -234,6 +234,7 @@
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 @@
: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.
@@ -885,10 +903,12 @@
When called non-interactively, optional second argument NEW-WINDOW is
used instead of `browse-url-new-window-flag'.
-The order attempted is gnome-moz-remote, Mozilla, Firefox,
+The order attempted is xdg-open, gnome-moz-remote, Mozilla, Firefox,
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

@ -1,17 +0,0 @@
--- lisp/progmodes/hideshow.el.orig 2010-05-12 18:28:06.543936429 +0200
+++ lisp/progmodes/hideshow.el 2010-05-12 18:27:40.212936751 +0200
@@ -691,9 +691,11 @@ Return point, or nil if original point w
;; look backward for the start of a block that contains the cursor
(while (and (re-search-backward hs-block-start-regexp nil t)
(not (setq done
- (< here (save-excursion
- (hs-forward-sexp (match-data t) 1)
- (point)))))))
+ (and (< here
+ (save-excursion
+ (hs-forward-sexp (match-data t) 1)
+ (point)))
+ (eq (hs-inside-comment-p) nil))))))
(if done
(point)
(goto-char here)

View File

@ -1,483 +1,379 @@
diff -r -c emacs-23.3-old/lisp/cedet/ede/auto.el emacs-23.3/lisp/cedet/ede/auto.el
*** emacs-23.3-old/lisp/cedet/ede/auto.el 2011-01-09 01:45:14.000000000 +0800
--- emacs-23.3/lisp/cedet/ede/auto.el 2012-01-09 13:20:12.410502713 +0800
***************
*** 58,63 ****
--- 58,70 ----
:initform t
:documentation
"Non-nil if this is an option when a user creates a project.")
+ (safe-p :initarg :safe-p
+ :initform t
+ :documentation
+ "Non-nil if the project load files are \"safe\".
+ An unsafe project is one that loads project variables via Emacs
+ Lisp code. A safe project is one that loads project variables by
+ scanning files without loading Lisp code from them.")
)
"Class representing minimal knowledge set to run preliminary EDE functions.
When more advanced functionality is needed from a project type, that projects
***************
*** 69,81 ****
:name "Make" :file 'ede/proj
:proj-file "Project.ede"
:load-type 'ede-proj-load
! :class-sym 'ede-proj-project)
(ede-project-autoload "edeproject-automake"
:name "Automake" :file 'ede/proj
:proj-file "Project.ede"
:initializers '(:makefile-type Makefile.am)
:load-type 'ede-proj-load
! :class-sym 'ede-proj-project)
(ede-project-autoload "automake"
:name "automake" :file 'ede/project-am
:proj-file "Makefile.am"
--- 76,90 ----
:name "Make" :file 'ede/proj
:proj-file "Project.ede"
:load-type 'ede-proj-load
! :class-sym 'ede-proj-project
! :safe-p nil)
(ede-project-autoload "edeproject-automake"
:name "Automake" :file 'ede/proj
:proj-file "Project.ede"
:initializers '(:makefile-type Makefile.am)
:load-type 'ede-proj-load
! :class-sym 'ede-proj-project
! :safe-p nil)
(ede-project-autoload "automake"
:name "automake" :file 'ede/project-am
:proj-file "Makefile.am"
***************
*** 84,89 ****
--- 93,100 ----
:new-p nil))
"List of vectors defining how to determine what type of projects exist.")
+ (put 'ede-project-class-files 'risky-local-variable t)
+
;;; EDE project-autoload methods
;;
(defmethod ede-project-root ((this ede-project-autoload))
***************
*** 122,127 ****
--- 133,151 ----
(when (and f (file-exists-p f))
f)))
+ (defmethod ede-auto-load-project ((this ede-project-autoload) dir)
+ "Load in the project associated with THIS project autoload description.
+ THIS project description should be valid for DIR, where the project will
+ be loaded."
+ ;; Last line of defense: don't load unsafe projects.
+ (when (not (or (oref this :safe-p)
+ (ede-directory-safe-p dir)))
+ (error "Attempt to load an unsafe project (bug elsewhere in EDE)"))
+ ;; Things are good - so load the project.
+ (let ((o (funcall (oref this load-type) dir)))
+ (when (not o)
+ (error "Project type error: :load-type failed to create a project"))
+ (ede-add-project-to-global-list o)))
(provide 'ede/auto)
diff -r -c emacs-23.3-old/lisp/cedet/ede/simple.el emacs-23.3/lisp/cedet/ede/simple.el
*** emacs-23.3-old/lisp/cedet/ede/simple.el 2011-01-09 01:45:14.000000000 +0800
--- emacs-23.3/lisp/cedet/ede/simple.el 2012-01-09 13:17:20.010502312 +0800
***************
*** 50,56 ****
:name "Simple" :file 'ede/simple
:proj-file 'ede-simple-projectfile-for-dir
:load-type 'ede-simple-load
! :class-sym 'ede-simple-project)
t)
(defcustom ede-simple-save-directory "~/.ede"
--- 50,57 ----
:name "Simple" :file 'ede/simple
:proj-file 'ede-simple-projectfile-for-dir
:load-type 'ede-simple-load
! :class-sym 'ede-simple-project
! :safe-p nil)
t)
(defcustom ede-simple-save-directory "~/.ede"
diff -r -c emacs-23.3-old/lisp/cedet/ede.el emacs-23.3/lisp/cedet/ede.el
*** emacs-23.3-old/lisp/cedet/ede.el 2011-01-09 01:45:14.000000000 +0800
--- emacs-23.3/lisp/cedet/ede.el 2012-01-09 13:24:44.854503349 +0800
***************
*** 94,99 ****
--- 94,135 ----
:group 'ede
:type 'sexp) ; make this be a list of options some day
+ (defcustom ede-project-directories nil
+ "Directories in which EDE may search for project files.
+ If the value is t, EDE may search in any directory.
+
+ If the value is a function, EDE calls that function with one
+ argument, the directory name; the function should return t iff
+ EDE should look for project files in the directory.
+
+ Otherwise, the value should be a list of fully-expanded directory
+ names. EDE searches for project files only in those directories.
+ If you invoke the commands \\[ede] or \\[ede-new] on a directory
+ that is not listed, Emacs will offer to add it to the list.
+
+ Any other value disables searching for EDE project files."
+ :group 'ede
+ :type '(choice (const :tag "Any directory" t)
+ (repeat :tag "List of directories"
+ (directory))
+ (function :tag "Predicate"))
+ :version "23.4"
+ :risky t)
+
+ (defun ede-directory-safe-p (dir)
+ "Return non-nil if DIR is a safe directory to load projects from.
+ Projects that do not load a project definition as Emacs Lisp code
+ are safe, and can be loaded automatically. Other project types,
+ such as those created with Project.ede files, are safe only if
+ specified by `ede-project-directories'."
+ (setq dir (directory-file-name (expand-file-name dir)))
+ ;; Load only if allowed by `ede-project-directories'.
+ (or (eq ede-project-directories t)
+ (and (functionp ede-project-directories)
+ (funcall ede-project-directories dir))
+ (and (listp ede-project-directories)
+ (member dir ede-project-directories))))
+
;;; Management variables
***************
*** 419,442 ****
Sets buffer local variables for EDE."
(let* ((ROOT nil)
(proj (ede-directory-get-open-project default-directory
! 'ROOT)))
(when (or proj ROOT
! (ede-directory-project-p default-directory t))
! (when (not proj)
! ;; @todo - this could be wasteful.
! (setq proj (ede-load-project-file default-directory 'ROOT)))
! (setq ede-object (ede-buffer-object (current-buffer)
'ede-object-project))
! (setq ede-object-root-project
! (or ROOT (ede-project-root ede-object-project)))
! (if (and (not ede-object) ede-object-project)
! (ede-auto-add-to-target))
! (ede-apply-target-options))))
(defun ede-reset-all-buffers (onoff)
"Reset all the buffers due to change in EDE.
--- 455,496 ----
Sets buffer local variables for EDE."
(let* ((ROOT nil)
(proj (ede-directory-get-open-project default-directory
! 'ROOT))
! (projauto nil))
!
(when (or proj ROOT
! ;; If there is no open project, look up the project
! ;; autoloader to see if we should initialize.
! (setq projauto (ede-directory-project-p default-directory t)))
!
! (when (and (not proj) projauto)
!
! ;; No project was loaded, but we have a project description
! ;; object. This means that we can check if it is a safe
! ;; project to load before requesting it to be loaded.
!
! (when (or (oref projauto safe-p)
! ;; The project style is not safe, so check if it is
! ;; in `ede-project-directories'.
! (let ((top (ede-toplevel-project default-directory)))
! (ede-directory-safe-p top)))
! ;; The project is safe, so load it in.
! (setq proj (ede-load-project-file default-directory 'ROOT))))
! ;; Only initialize EDE state in this buffer if we found a project.
! (when proj
!
! (setq ede-object (ede-buffer-object (current-buffer)
'ede-object-project))
! (setq ede-object-root-project
! (or ROOT (ede-project-root ede-object-project)))
! (if (and (not ede-object) ede-object-project)
! (ede-auto-add-to-target))
! (ede-apply-target-options)))))
(defun ede-reset-all-buffers (onoff)
"Reset all the buffers due to change in EDE.
***************
*** 555,567 ****
;;; Interactive method invocations
;;
! (defun ede (file)
! "Start up EDE on something.
! Argument FILE is the file or directory to load a project from."
! (interactive "fProject File: ")
! (if (not (file-exists-p file))
! (ede-new file)
! (ede-load-project-file (file-name-directory file))))
(defun ede-new (type &optional name)
"Create a new project starting of project type TYPE.
--- 609,681 ----
;;; Interactive method invocations
;;
! (defun ede (dir)
! "Start up EDE for directory DIR.
! If DIR has an existing project file, load it.
! Otherwise, create a new project for DIR."
! (interactive
! ;; When choosing a directory to turn on, and we see some directory here,
! ;; provide that as the default.
! (let* ((top (ede-toplevel-project default-directory))
! (promptdflt (or top default-directory)))
! (list (read-directory-name "Project directory: "
! promptdflt promptdflt t))))
! (unless (file-directory-p dir)
! (error "%s is not a directory" dir))
! (when (ede-directory-get-open-project dir)
! (error "%s already has an open project associated with it" dir))
!
! ;; Check if the directory has been added to the list of safe
! ;; directories. It can also add the directory to the safe list if
! ;; the user chooses.
! (if (ede-check-project-directory dir)
! (progn
! ;; If there is a project in DIR, load it, otherwise do
! ;; nothing.
! (ede-load-project-file dir)
!
! ;; Check if we loaded anything on the previous line.
! (if (ede-current-project dir)
!
! ;; We successfully opened an existing project. Some open
! ;; buffers may also be referring to this project.
! ;; Resetting all the buffers will get them to also point
! ;; at this new open project.
! (ede-reset-all-buffers 1)
!
! ;; ELSE
! ;; There was no project, so switch to `ede-new' which is how
! ;; a user can select a new kind of project to create.
! (let ((default-directory (expand-file-name dir)))
! (call-interactively 'ede-new))))
!
! ;; If the proposed directory isn't safe, then say so.
! (error "%s is not an allowed project directory in `ede-project-directories'"
! dir)))
!
! (defun ede-check-project-directory (dir)
! "Check if DIR should be in `ede-project-directories'.
! If it is not, try asking the user if it should be added; if so,
! add it and save `ede-project-directories' via Customize.
! Return nil iff DIR should not be in `ede-project-directories'."
! (setq dir (directory-file-name (expand-file-name dir))) ; strip trailing /
! (or (eq ede-project-directories t)
! (and (functionp ede-project-directories)
! (funcall ede-project-directories dir))
! ;; If `ede-project-directories' is a list, maybe add it.
! (when (listp ede-project-directories)
! (or (member dir ede-project-directories)
! (when (y-or-n-p (format "`%s' is not listed in `ede-project-directories'.
! Add it to the list of allowed project directories? "
! dir))
! (push dir ede-project-directories)
! ;; If possible, save `ede-project-directories'.
! (if (or custom-file user-init-file)
! (let ((coding-system-for-read nil))
! (customize-save-variable
! 'ede-project-directories
! ede-project-directories)))
! t)))))
(defun ede-new (type &optional name)
"Create a new project starting of project type TYPE.
***************
*** 596,601 ****
--- 710,720 ----
(error "Cannot create project in non-existent directory %s" default-directory))
(when (not (file-writable-p default-directory))
(error "No write permissions for %s" default-directory))
+ (unless (ede-check-project-directory default-directory)
+ (error "%s is not an allowed project directory in `ede-project-directories'"
+ default-directory))
+ ;; Make sure the project directory is loadable in the future.
+ (ede-check-project-directory default-directory)
;; Create the project
(let* ((obj (object-assoc type 'name ede-project-class-files))
(nobj (let ((f (oref obj file))
***************
*** 629,634 ****
--- 748,757 ----
(ede-add-subproject pp nobj)
(ede-commit-project pp)))
(ede-commit-project nobj))
+ ;; Once the project is created, load it again. This used to happen
+ ;; lazily, but with project loading occurring less often and with
+ ;; security in mind, this is now the safe time to reload.
+ (ede-load-project-file default-directory)
;; Have the menu appear
(setq ede-minor-mode t)
;; Allert the user
***************
*** 651,661 ****
(defun ede-rescan-toplevel ()
"Rescan all project files."
(interactive)
! (let ((toppath (ede-toplevel-project default-directory))
! (ede-deep-rescan t))
! (project-rescan (ede-load-project-file toppath))
! (ede-reset-all-buffers 1)
! ))
(defun ede-new-target (&rest args)
"Create a new target specific to this type of project file.
--- 774,789 ----
(defun ede-rescan-toplevel ()
"Rescan all project files."
(interactive)
! (if (not (ede-directory-get-open-project default-directory))
! ;; This directory isn't open. Can't rescan.
! (error "Attempt to rescan a project that isn't open")
!
! ;; Continue
! (let ((toppath (ede-toplevel-project default-directory))
! (ede-deep-rescan t))
!
! (project-rescan (ede-load-project-file toppath))
! (ede-reset-all-buffers 1))))
(defun ede-new-target (&rest args)
"Create a new target specific to this type of project file.
***************
*** 891,897 ****
;; Do the load
;;(message "EDE LOAD : %S" file)
(let* ((file dir)
! (path (expand-file-name (file-name-directory file)))
(pfc (ede-directory-project-p path))
(toppath nil)
(o nil))
--- 1019,1025 ----
;; Do the load
;;(message "EDE LOAD : %S" file)
(let* ((file dir)
! (path (file-name-as-directory (expand-file-name dir)))
(pfc (ede-directory-project-p path))
(toppath nil)
(o nil))
***************
*** 920,932 ****
;; See if it's been loaded before
(setq o (object-assoc (ede-dir-to-projectfile pfc toppath) 'file
ede-projects))
! (if (not o)
! ;; If not, get it now.
! (let ((ede-constructing pfc))
! (setq o (funcall (oref pfc load-type) toppath))
! (when (not o)
! (error "Project type error: :load-type failed to create a project"))
! (ede-add-project-to-global-list o)))
;; Return the found root project.
(when rootreturn (set rootreturn o))
--- 1048,1058 ----
;; See if it's been loaded before
(setq o (object-assoc (ede-dir-to-projectfile pfc toppath) 'file
ede-projects))
!
! ;; If not open yet, load it.
! (unless o
! (let ((ede-constructing pfc))
! (setq o (ede-auto-load-project pfc toppath))))
;; Return the found root project.
(when rootreturn (set rootreturn o))
***************
*** 980,992 ****
(and root
(ede-find-subproject-for-directory root updir))
;; Try the all structure based search.
! (ede-directory-get-open-project updir)
! ;; Load up the project file as a last resort.
! ;; Last resort since it uses file-truename, and other
! ;; slow features.
! (and (ede-directory-project-p updir)
! (ede-load-project-file
! (file-name-as-directory updir))))))))))
(defun ede-current-project (&optional dir)
"Return the current project file.
--- 1106,1112 ----
(and root
(ede-find-subproject-for-directory root updir))
;; Try the all structure based search.
! (ede-directory-get-open-project updir))))))))
(defun ede-current-project (&optional dir)
"Return the current project file.
***************
*** 1000,1010 ****
;; No current project.
(when (not ans)
(let* ((ldir (or dir default-directory)))
! (setq ans (ede-directory-get-open-project ldir))
! (or ans
! ;; No open project, if this dir pass project-p, then load.
! (when (ede-directory-project-p ldir)
! (setq ans (ede-load-project-file ldir))))))
;; Return what we found.
ans))
--- 1120,1126 ----
;; No current project.
(when (not ans)
(let* ((ldir (or dir default-directory)))
! (setq ans (ede-directory-get-open-project ldir))))
;; Return what we found.
ans))
***************
*** 1059,1070 ****
"Return the project which is the parent of TARGET.
It is recommended you track the project a different way as this function
could become slow in time."
! ;; @todo - use ede-object-project as a starting point.
! (let ((ans nil) (projs ede-projects))
! (while (and (not ans) projs)
! (setq ans (ede-target-in-project-p (car projs) target)
! projs (cdr projs)))
! ans))
(defmethod ede-find-target ((proj ede-project) buffer)
"Fetch the target in PROJ belonging to BUFFER or nil."
--- 1175,1187 ----
"Return the project which is the parent of TARGET.
It is recommended you track the project a different way as this function
could become slow in time."
! (or ede-object-project
! ;; If not cached, derive it from the current directory of the target.
! (let ((ans nil) (projs ede-projects))
! (while (and (not ans) projs)
! (setq ans (ede-target-in-project-p (car projs) target)
! projs (cdr projs)))
! ans)))
(defmethod ede-find-target ((proj ede-project) buffer)
"Fetch the target in PROJ belonging to BUFFER or nil."
diff -up emacs-24.0.92/lisp/cedet/ede/auto.el.ede-cve-2012-0035 emacs-24.0.92/lisp/cedet/ede/auto.el
--- emacs-24.0.92/lisp/cedet/ede/auto.el.ede-cve-2012-0035 2011-11-15 06:00:11.000000000 +0100
+++ emacs-24.0.92/lisp/cedet/ede/auto.el 2012-01-19 18:03:08.533397558 +0100
@@ -58,6 +58,13 @@ associated with a single object class, b
:initform t
:documentation
"Non-nil if this is an option when a user creates a project.")
+ (safe-p :initarg :safe-p
+ :initform t
+ :documentation
+ "Non-nil if the project load files are \"safe\".
+An unsafe project is one that loads project variables via Emacs
+Lisp code. A safe project is one that loads project variables by
+scanning files without loading Lisp code from them.")
)
"Class representing minimal knowledge set to run preliminary EDE functions.
When more advanced functionality is needed from a project type, that projects
@@ -69,13 +76,15 @@ type is required and the load function u
:name "Make" :file 'ede/proj
:proj-file "Project.ede"
:load-type 'ede-proj-load
- :class-sym 'ede-proj-project)
+ :class-sym 'ede-proj-project
+ :safe-p nil)
(ede-project-autoload "edeproject-automake"
:name "Automake" :file 'ede/proj
:proj-file "Project.ede"
:initializers '(:makefile-type Makefile.am)
:load-type 'ede-proj-load
- :class-sym 'ede-proj-project)
+ :class-sym 'ede-proj-project
+ :safe-p nil)
(ede-project-autoload "automake"
:name "automake" :file 'ede/project-am
:proj-file "Makefile.am"
@@ -84,6 +93,8 @@ type is required and the load function u
:new-p nil))
"List of vectors defining how to determine what type of projects exist.")
+(put 'ede-project-class-files 'risky-local-variable t)
+
;;; EDE project-autoload methods
;;
(defmethod ede-project-root ((this ede-project-autoload))
@@ -122,6 +133,19 @@ Return nil if the project file does not
(when (and f (file-exists-p f))
f)))
+(defmethod ede-auto-load-project ((this ede-project-autoload) dir)
+ "Load in the project associated with THIS project autoload description.
+THIS project description should be valid for DIR, where the project will
+be loaded."
+ ;; Last line of defense: don't load unsafe projects.
+ (when (not (or (oref this :safe-p)
+ (ede-directory-safe-p dir)))
+ (error "Attempt to load an unsafe project (bug elsewhere in EDE)"))
+ ;; Things are good - so load the project.
+ (let ((o (funcall (oref this load-type) dir)))
+ (when (not o)
+ (error "Project type error: :load-type failed to create a project"))
+ (ede-add-project-to-global-list o)))
(provide 'ede/auto)
diff -up emacs-24.0.92/lisp/cedet/ede.el.ede-cve-2012-0035 emacs-24.0.92/lisp/cedet/ede.el
--- emacs-24.0.92/lisp/cedet/ede.el.ede-cve-2012-0035 2011-11-20 07:34:43.000000000 +0100
+++ emacs-24.0.92/lisp/cedet/ede.el 2012-01-19 18:05:41.523484918 +0100
@@ -94,6 +94,42 @@ target willing to take the file. 'never
:group 'ede
:type 'sexp) ; make this be a list of options some day
+(defcustom ede-project-directories nil
+ "Directories in which EDE may search for project files.
+If the value is t, EDE may search in any directory.
+
+If the value is a function, EDE calls that function with one
+argument, the directory name; the function should return t iff
+EDE should look for project files in the directory.
+
+Otherwise, the value should be a list of fully-expanded directory
+names. EDE searches for project files only in those directories.
+If you invoke the commands \\[ede] or \\[ede-new] on a directory
+that is not listed, Emacs will offer to add it to the list.
+
+Any other value disables searching for EDE project files."
+ :group 'ede
+ :type '(choice (const :tag "Any directory" t)
+ (repeat :tag "List of directories"
+ (directory))
+ (function :tag "Predicate"))
+ :version "23.4"
+ :risky t)
+
+(defun ede-directory-safe-p (dir)
+ "Return non-nil if DIR is a safe directory to load projects from.
+Projects that do not load a project definition as Emacs Lisp code
+are safe, and can be loaded automatically. Other project types,
+such as those created with Project.ede files, are safe only if
+specified by `ede-project-directories'."
+ (setq dir (directory-file-name (expand-file-name dir)))
+ ;; Load only if allowed by `ede-project-directories'.
+ (or (eq ede-project-directories t)
+ (and (functionp ede-project-directories)
+ (funcall ede-project-directories dir))
+ (and (listp ede-project-directories)
+ (member dir ede-project-directories))))
+
;;; Management variables
@@ -420,24 +456,42 @@ provided `global-ede-mode' is enabled."
Sets buffer local variables for EDE."
(let* ((ROOT nil)
(proj (ede-directory-get-open-project default-directory
- 'ROOT)))
+ 'ROOT))
+ (projauto nil))
+
(when (or proj ROOT
- (ede-directory-project-p default-directory t))
+ ;; If there is no open project, look up the project
+ ;; autoloader to see if we should initialize.
+ (setq projauto (ede-directory-project-p default-directory t)))
+
+ (when (and (not proj) projauto)
+
+ ;; No project was loaded, but we have a project description
+ ;; object. This means that we can check if it is a safe
+ ;; project to load before requesting it to be loaded.
+
+ (when (or (oref projauto safe-p)
+ ;; The project style is not safe, so check if it is
+ ;; in `ede-project-directories'.
+ (let ((top (ede-toplevel-project default-directory)))
+ (ede-directory-safe-p top)))
- (when (not proj)
- ;; @todo - this could be wasteful.
- (setq proj (ede-load-project-file default-directory 'ROOT)))
+ ;; The project is safe, so load it in.
+ (setq proj (ede-load-project-file default-directory 'ROOT))))
- (setq ede-object (ede-buffer-object (current-buffer)
+ ;; Only initialize EDE state in this buffer if we found a project.
+ (when proj
+
+ (setq ede-object (ede-buffer-object (current-buffer)
'ede-object-project))
- (setq ede-object-root-project
- (or ROOT (ede-project-root ede-object-project)))
+ (setq ede-object-root-project
+ (or ROOT (ede-project-root ede-object-project)))
- (if (and (not ede-object) ede-object-project)
- (ede-auto-add-to-target))
+ (if (and (not ede-object) ede-object-project)
+ (ede-auto-add-to-target))
- (ede-apply-target-options))))
+ (ede-apply-target-options)))))
(defun ede-reset-all-buffers (onoff)
"Reset all the buffers due to change in EDE.
@@ -557,13 +611,73 @@ of objects with the `ede-want-file-p' me
;;; Interactive method invocations
;;
-(defun ede (file)
- "Start up EDE on something.
-Argument FILE is the file or directory to load a project from."
- (interactive "fProject File: ")
- (if (not (file-exists-p file))
- (ede-new file)
- (ede-load-project-file (file-name-directory file))))
+(defun ede (dir)
+ "Start up EDE for directory DIR.
+If DIR has an existing project file, load it.
+Otherwise, create a new project for DIR."
+ (interactive
+ ;; When choosing a directory to turn on, and we see some directory here,
+ ;; provide that as the default.
+ (let* ((top (ede-toplevel-project default-directory))
+ (promptdflt (or top default-directory)))
+ (list (read-directory-name "Project directory: "
+ promptdflt promptdflt t))))
+ (unless (file-directory-p dir)
+ (error "%s is not a directory" dir))
+ (when (ede-directory-get-open-project dir)
+ (error "%s already has an open project associated with it" dir))
+
+ ;; Check if the directory has been added to the list of safe
+ ;; directories. It can also add the directory to the safe list if
+ ;; the user chooses.
+ (if (ede-check-project-directory dir)
+ (progn
+ ;; If there is a project in DIR, load it, otherwise do
+ ;; nothing.
+ (ede-load-project-file dir)
+
+ ;; Check if we loaded anything on the previous line.
+ (if (ede-current-project dir)
+
+ ;; We successfully opened an existing project. Some open
+ ;; buffers may also be referring to this project.
+ ;; Resetting all the buffers will get them to also point
+ ;; at this new open project.
+ (ede-reset-all-buffers 1)
+
+ ;; ELSE
+ ;; There was no project, so switch to `ede-new' which is how
+ ;; a user can select a new kind of project to create.
+ (let ((default-directory (expand-file-name dir)))
+ (call-interactively 'ede-new))))
+
+ ;; If the proposed directory isn't safe, then say so.
+ (error "%s is not an allowed project directory in `ede-project-directories'"
+ dir)))
+
+(defun ede-check-project-directory (dir)
+ "Check if DIR should be in `ede-project-directories'.
+If it is not, try asking the user if it should be added; if so,
+add it and save `ede-project-directories' via Customize.
+Return nil iff DIR should not be in `ede-project-directories'."
+ (setq dir (directory-file-name (expand-file-name dir))) ; strip trailing /
+ (or (eq ede-project-directories t)
+ (and (functionp ede-project-directories)
+ (funcall ede-project-directories dir))
+ ;; If `ede-project-directories' is a list, maybe add it.
+ (when (listp ede-project-directories)
+ (or (member dir ede-project-directories)
+ (when (y-or-n-p (format "`%s' is not listed in `ede-project-directories'.
+Add it to the list of allowed project directories? "
+ dir))
+ (push dir ede-project-directories)
+ ;; If possible, save `ede-project-directories'.
+ (if (or custom-file user-init-file)
+ (let ((coding-system-for-read nil))
+ (customize-save-variable
+ 'ede-project-directories
+ ede-project-directories)))
+ t)))))
(defun ede-new (type &optional name)
"Create a new project starting from project type TYPE.
@@ -598,6 +712,11 @@ Optional argument NAME is the name to gi
(error "Cannot create project in non-existent directory %s" default-directory))
(when (not (file-writable-p default-directory))
(error "No write permissions for %s" default-directory))
+ (unless (ede-check-project-directory default-directory)
+ (error "%s is not an allowed project directory in `ede-project-directories'"
+ default-directory))
+ ;; Make sure the project directory is loadable in the future.
+ (ede-check-project-directory default-directory)
;; Create the project
(let* ((obj (object-assoc type 'name ede-project-class-files))
(nobj (let ((f (oref obj file))
@@ -631,6 +750,10 @@ Optional argument NAME is the name to gi
(ede-add-subproject pp nobj)
(ede-commit-project pp)))
(ede-commit-project nobj))
+ ;; Once the project is created, load it again. This used to happen
+ ;; lazily, but with project loading occurring less often and with
+ ;; security in mind, this is now the safe time to reload.
+ (ede-load-project-file default-directory)
;; Have the menu appear
(setq ede-minor-mode t)
;; Allert the user
@@ -653,11 +776,16 @@ ARGS are additional arguments to pass to
(defun ede-rescan-toplevel ()
"Rescan all project files."
(interactive)
- (let ((toppath (ede-toplevel-project default-directory))
- (ede-deep-rescan t))
- (project-rescan (ede-load-project-file toppath))
- (ede-reset-all-buffers 1)
- ))
+ (if (not (ede-directory-get-open-project default-directory))
+ ;; This directory isn't open. Can't rescan.
+ (error "Attempt to rescan a project that isn't open")
+
+ ;; Continue
+ (let ((toppath (ede-toplevel-project default-directory))
+ (ede-deep-rescan t))
+
+ (project-rescan (ede-load-project-file toppath))
+ (ede-reset-all-buffers 1))))
(defun ede-new-target (&rest args)
"Create a new target specific to this type of project file.
@@ -893,7 +1021,7 @@ Optional ROOTRETURN will return the root
;; Do the load
;;(message "EDE LOAD : %S" file)
(let* ((file dir)
- (path (expand-file-name (file-name-directory file)))
+ (path (file-name-as-directory (expand-file-name dir)))
(pfc (ede-directory-project-p path))
(toppath nil)
(o nil))
@@ -922,13 +1050,11 @@ Optional ROOTRETURN will return the root
;; See if it's been loaded before
(setq o (object-assoc (ede-dir-to-projectfile pfc toppath) 'file
ede-projects))
- (if (not o)
- ;; If not, get it now.
- (let ((ede-constructing pfc))
- (setq o (funcall (oref pfc load-type) toppath))
- (when (not o)
- (error "Project type error: :load-type failed to create a project"))
- (ede-add-project-to-global-list o)))
+
+ ;; If not open yet, load it.
+ (unless o
+ (let ((ede-constructing pfc))
+ (setq o (ede-auto-load-project pfc toppath))))
;; Return the found root project.
(when rootreturn (set rootreturn o))
@@ -982,13 +1108,7 @@ Optional argument OBJ is an object to fi
(and root
(ede-find-subproject-for-directory root updir))
;; Try the all structure based search.
- (ede-directory-get-open-project updir)
- ;; Load up the project file as a last resort.
- ;; Last resort since it uses file-truename, and other
- ;; slow features.
- (and (ede-directory-project-p updir)
- (ede-load-project-file
- (file-name-as-directory updir))))))))))
+ (ede-directory-get-open-project updir))))))))
(defun ede-current-project (&optional dir)
"Return the current project file.
@@ -1002,11 +1122,7 @@ If optional DIR is provided, get the pro
;; No current project.
(when (not ans)
(let* ((ldir (or dir default-directory)))
- (setq ans (ede-directory-get-open-project ldir))
- (or ans
- ;; No open project, if this dir pass project-p, then load.
- (when (ede-directory-project-p ldir)
- (setq ans (ede-load-project-file ldir))))))
+ (setq ans (ede-directory-get-open-project ldir))))
;; Return what we found.
ans))
@@ -1061,12 +1177,13 @@ If TARGET belongs to a subproject, retur
"Return the project which is the parent of TARGET.
It is recommended you track the project a different way as this function
could become slow in time."
- ;; @todo - use ede-object-project as a starting point.
- (let ((ans nil) (projs ede-projects))
- (while (and (not ans) projs)
- (setq ans (ede-target-in-project-p (car projs) target)
- projs (cdr projs)))
- ans))
+ (or ede-object-project
+ ;; If not cached, derive it from the current directory of the target.
+ (let ((ans nil) (projs ede-projects))
+ (while (and (not ans) projs)
+ (setq ans (ede-target-in-project-p (car projs) target)
+ projs (cdr projs)))
+ ans)))
(defmethod ede-find-target ((proj ede-project) buffer)
"Fetch the target in PROJ belonging to BUFFER or nil."
diff -up emacs-24.0.92/lisp/cedet/ede/simple.el.ede-cve-2012-0035 emacs-24.0.92/lisp/cedet/ede/simple.el
--- emacs-24.0.92/lisp/cedet/ede/simple.el.ede-cve-2012-0035 2011-10-14 02:40:36.000000000 +0200
+++ emacs-24.0.92/lisp/cedet/ede/simple.el 2012-01-19 18:03:08.533397558 +0100
@@ -50,7 +50,8 @@
:name "Simple" :file 'ede/simple
:proj-file 'ede-simple-projectfile-for-dir
:load-type 'ede-simple-load
- :class-sym 'ede-simple-project)
+ :class-sym 'ede-simple-project
+ :safe-p nil)
t)
(defcustom ede-simple-save-directory "~/.ede"

View File

@ -1,173 +0,0 @@
diff -U0 emacs-23.3/src/ChangeLog.wm-state-hidden emacs-23.3/src/ChangeLog
--- emacs-23.3/src/ChangeLog.wm-state-hidden 2011-03-07 06:08:03.000000000 +0100
+++ emacs-23.3/src/ChangeLog 2011-11-23 11:49:57.053019839 +0100
@@ -1,0 +2,13 @@
+2011-10-30 Jan Djärv <jan.h.d@swipnet.se>
+
+ * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
+
+ * xterm.c: Declare x_handle_net_wm_state to return int.
+ (handle_one_xevent): Check if we are iconified but don't have
+ _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
+ (get_current_wm_state): Return non-zero if not hidden,
+ check for _NET_WM_STATE_HIDDEN (Bug#9893).
+ (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
+ (x_handle_net_wm_state): Return what get_current_wm_state returns.
+ (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
+
diff -up emacs-23.3/src/xterm.c.wm-state-hidden emacs-23.3/src/xterm.c
--- emacs-23.3/src/xterm.c.wm-state-hidden 2011-02-12 01:27:01.000000000 +0100
+++ emacs-23.3/src/xterm.c 2011-11-23 11:55:10.867096378 +0100
@@ -375,7 +375,7 @@ static void x_scroll_bar_report_motion P
enum scroll_bar_part *,
Lisp_Object *, Lisp_Object *,
unsigned long *));
-static void x_handle_net_wm_state P_ ((struct frame *, XPropertyEvent *));
+static int x_handle_net_wm_state P_ ((struct frame *, XPropertyEvent *));
static void x_check_fullscreen P_ ((struct frame *));
static void x_check_expected_move P_ ((struct frame *, int, int));
static void x_sync_with_move P_ ((struct frame *, int, int, int));
@@ -6121,7 +6121,19 @@ handle_one_xevent (dpyinfo, eventp, fini
last_user_time = event.xproperty.time;
f = x_top_window_to_frame (dpyinfo, event.xproperty.window);
if (f && event.xproperty.atom == dpyinfo->Xatom_net_wm_state)
- x_handle_net_wm_state (f, &event.xproperty);
+ if (x_handle_net_wm_state (f, &event.xproperty) && f->iconified)
+ {
+ /* Gnome shell does not iconify us when C-z is pressed. It hides
+ the frame. So if our state says we aren't hidden anymore,
+ treat is as deiconfied. */
+ if (! f->async_iconified)
+ SET_FRAME_GARBAGED (f);
+ f->async_visible = 1;
+ f->async_iconified = 0;
+ f->output_data.x->has_been_visible = 1;
+ inev.ie.kind = DEICONIFY_EVENT;
+ XSETFRAME (inev.ie.frame_or_window, f);
+ }
x_handle_property_notify (&event.xproperty);
xft_settings_event (dpyinfo, &event);
@@ -8573,9 +8585,10 @@ x_set_sticky (f, new_value, old_value)
/* Return the current _NET_WM_STATE.
SIZE_STATE is set to one of the FULLSCREEN_* values.
- STICKY is set to 1 if the sticky state is set, 0 if not. */
+ STICKY is set to 1 if the sticky state is set, 0 if not.
+ Return non-zero if we are not hidden, zero if we are. */
-static void
+static int
get_current_vm_state (struct frame *f,
Window window,
int *size_state,
@@ -8583,7 +8596,7 @@ get_current_vm_state (struct frame *f,
{
Atom actual_type;
unsigned long actual_size, bytes_remaining;
- int i, rc, actual_format;
+ int i, rc, actual_format, is_hidden = 0;
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
long max_len = 65536;
Display *dpy = FRAME_X_DISPLAY (f);
@@ -8605,7 +8618,7 @@ get_current_vm_state (struct frame *f,
if (tmp_data) XFree (tmp_data);
x_uncatch_errors ();
UNBLOCK_INPUT;
- return;
+ return ! f->iconified;
}
x_uncatch_errors ();
@@ -8613,7 +8626,9 @@ get_current_vm_state (struct frame *f,
for (i = 0; i < actual_size; ++i)
{
Atom a = ((Atom*)tmp_data)[i];
- if (a == dpyinfo->Xatom_net_wm_state_maximized_horz)
+ if (a == dpyinfo->Xatom_net_wm_state_hidden)
+ is_hidden = 1;
+ else if (a == dpyinfo->Xatom_net_wm_state_maximized_horz)
{
if (*size_state == FULLSCREEN_HEIGHT)
*size_state = FULLSCREEN_MAXIMIZED;
@@ -8635,6 +8650,7 @@ get_current_vm_state (struct frame *f,
if (tmp_data) XFree (tmp_data);
UNBLOCK_INPUT;
+ return ! is_hidden;
}
/* Do fullscreen as specified in extended window manager hints */
@@ -8647,7 +8663,7 @@ do_ewmh_fullscreen (f)
Lisp_Object lval = get_frame_param (f, Qfullscreen);
int cur, dummy;
- get_current_vm_state (f, FRAME_OUTER_WINDOW (f), &cur, &dummy);
+ (void)get_current_vm_state (f, FRAME_OUTER_WINDOW (f), &cur, &dummy);
/* Some window managers don't say they support _NET_WM_STATE, but they do say
they support _NET_WM_STATE_FULLSCREEN. Try that also. */
@@ -8721,7 +8737,7 @@ XTfullscreen_hook (f)
}
-static void
+static int
x_handle_net_wm_state (f, event)
struct frame *f;
XPropertyEvent *event;
@@ -8729,10 +8745,10 @@ x_handle_net_wm_state (f, event)
int value = FULLSCREEN_NONE;
Lisp_Object lval;
int sticky = 0;
+ int not_hidden = get_current_vm_state (f, event->window, &value, &sticky);
- get_current_vm_state (f, event->window, &value, &sticky);
lval = Qnil;
- switch (value)
+ switch (value)
{
case FULLSCREEN_WIDTH:
lval = Qfullwidth;
@@ -8747,9 +8763,10 @@ x_handle_net_wm_state (f, event)
lval = Qmaximized;
break;
}
-
store_frame_param (f, Qfullscreen, lval);
store_frame_param (f, Qsticky, sticky ? Qt : Qnil);
+
+ return not_hidden;
}
/* Check if we need to resize the frame due to a fullscreen request.
@@ -9487,7 +9504,7 @@ x_iconify_frame (f)
if (!NILP (type))
x_bitmap_icon (f, type);
-#ifdef USE_GTK
+#if defined (USE_GTK)
if (FRAME_GTK_OUTER_WIDGET (f))
{
if (! FRAME_VISIBLE_P (f))
@@ -10518,6 +10535,8 @@ x_term_init (display_name, xrm_option, r
= XInternAtom (dpyinfo->display, "_NET_WM_STATE_MAXIMIZED_VERT", False);
dpyinfo->Xatom_net_wm_state_sticky
= XInternAtom (dpyinfo->display, "_NET_WM_STATE_STICKY", False);
+ dpyinfo->Xatom_net_wm_state_hidden
+ = XInternAtom (dpyinfo->display, "_NET_WM_STATE_HIDDEN", False);
dpyinfo->Xatom_net_window_type
= XInternAtom (dpyinfo->display, "_NET_WM_WINDOW_TYPE", False);
dpyinfo->Xatom_net_window_type_tooltip
diff -up emacs-23.3/src/xterm.h.wm-state-hidden emacs-23.3/src/xterm.h
--- emacs-23.3/src/xterm.h.wm-state-hidden 2011-01-08 18:45:14.000000000 +0100
+++ emacs-23.3/src/xterm.h 2011-11-23 11:56:01.219467181 +0100
@@ -365,7 +365,7 @@ struct x_display_info
/* Atoms dealing with EWMH (i.e. _NET_...) */
Atom Xatom_net_wm_state, Xatom_net_wm_state_fullscreen_atom,
Xatom_net_wm_state_maximized_horz, Xatom_net_wm_state_maximized_vert,
- Xatom_net_wm_state_sticky, Xatom_net_frame_extents;
+ Xatom_net_wm_state_sticky, Xatom_net_wm_state_hidden, Xatom_net_frame_extents;
/* XSettings atoms and windows. */
Atom Xatom_xsettings_sel, Xatom_xsettings_prop, Xatom_xsettings_mgr;

View File

@ -1,26 +0,0 @@
diff -up emacs-23.3/src/xgselect.c.xgselect emacs-23.3/src/xgselect.c
--- emacs-23.3/src/xgselect.c.xgselect 2011-11-25 14:05:03.963372281 +0100
+++ emacs-23.3/src/xgselect.c 2011-11-25 14:06:49.798049160 +0100
@@ -53,12 +53,17 @@ xg_select (max_fds, rfds, wfds, efds, ti
g_main_context_pending (context);
do {
- if (n_gfds > gfds_size)
+ if (n_gfds > gfds_size)
{
- while (n_gfds > gfds_size)
- gfds_size *= 2;
- xfree (gfds);
- gfds = xmalloc (sizeof (*gfds) * gfds_size);
+ if (gfds_size == 0)
+ xgselect_initialize ();
+ else
+ {
+ while (n_gfds > gfds_size)
+ gfds_size *= 2;
+ xfree (gfds);
+ gfds = xmalloc (sizeof (*gfds) * gfds_size);
+ }
}
n_gfds = g_main_context_query (context,

View File

@ -2,12 +2,13 @@
Summary: GNU Emacs text editor
Name: emacs
Epoch: 1
Version: 23.3
Release: 19%{?dist}
Version: 24.0.92
Release: 1%{?dist}
License: GPLv3+
URL: http://www.gnu.org/software/emacs/
Group: Applications/Editors
Source0: ftp://ftp.gnu.org/gnu/emacs/emacs-%{version}a.tar.bz2
#Source0: ftp://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.bz2
Source0: http://alpha.gnu.org/gnu/emacs/pretest/emacs-%{version}.tar.gz
Source1: emacs.desktop
Source2: emacsclient.desktop
Source3: dotemacs.el
@ -26,29 +27,17 @@ Patch0: glibc-open-macro.patch
Patch1: rpm-spec-mode.patch
Patch2: rpm-spec-mode-utc.patch
Patch3: rpm-spec-mode-changelog.patch
# Upstream implemented the change in revno. 101105
Patch4: emacs-23.1-xdg.patch
# Fix rhbz#595546
# Upstream: http://emacsbugs.donarmstrong.com/cgi/bugreport.cgi?bug=6158
Patch6: emacs-23.2-hideshow-comment.patch
# rhbz#713600
Patch7: emacs-spellchecker.patch
# rhbz#711739
# http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/106247
Patch8: emacs-wm-state-hidden.patch
# rhbz#751154
Patch9: emacs-xgselect.patch
# http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/103228
Patch10: 103228_103227.diff
# http://lists.gnu.org/archive/html/emacs-devel/2012-01/msg00387.html
Patch11: emacs-ede-cve-2012-0035.patch
BuildRequires: atk-devel, cairo-devel, 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: librsvg2-devel, m17n-lib-devel, libotf-devel
BuildRequires: libXpm-devel, ncurses-devel, xorg-x11-proto-devel, zlib-devel, gnutls-devel
BuildRequires: librsvg2-devel, m17n-lib-devel, libotf-devel, ImageMagick-devel, libselinux-devel
BuildRequires: GConf2-devel, alsa-lib-devel, gpm-devel, liblockfile-devel, libxml2-devel
BuildRequires: autoconf, automake, bzip2, cairo, texinfo, gzip
BuildRequires: GConf2-devel, alsa-lib-devel, gpm-devel, liblockfile-devel
# Desktop integration
BuildRequires: desktop-file-utils
# Buildrequire both python2 and python3 since below we turn off the
@ -162,12 +151,7 @@ packages that add functionality to Emacs.
%setup -q
%patch0 -p1 -b .glibc-open-macro
%patch4 -p1 -b .xdg
%patch6 -p0 -b .hideshow-comment
%patch7 -p1 -b .spellchecker
%patch8 -p1 -b .wm-state-hidden
%patch9 -p1 -b .xgselect
%patch10 -p0 -b .svn17
%patch11 -p1 -b .ede-cve-2012-0035
# Install site-lisp files
@ -193,7 +177,7 @@ 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 ede ediff edt eieio 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 semantic ses sieve smtpmail speedbar tramp url vip viper widget woman
%define info_files ada-mode auth autotype calc ccmode cl dbus dired-x ebrowse ede ediff edt eieio efaq eintr elisp emacs emacs-mime epa erc ert eshell eudc flymake forms gnus idlwave info mairix-el message mh-e newsticker nxml-mode org pcl-cvs pgg rcirc reftex remember sasl sc semantic 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
@ -221,7 +205,8 @@ mkdir build-gtk && cd build-gtk
ln -s ../configure .
%configure --with-dbus --with-gif --with-jpeg --with-png --with-rsvg \
--with-tiff --with-xft --with-xpm --with-x-toolkit=gtk --with-gpm=no
--with-tiff --with-xft --with-xpm --with-x-toolkit=gtk --with-gpm=no \
--with-wide-int
make bootstrap
%{setarch} make %{?_smp_mflags}
cd ..
@ -288,8 +273,8 @@ 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}
mv %{buildroot}%{_mandir}/man1/{etags.1,etags.emacs.1}
mv %{buildroot}%{_mandir}/man1/{ctags.1.gz,gctags.1.gz}
mv %{buildroot}%{_mandir}/man1/{etags.1.gz,etags.emacs.1.gz}
mv %{buildroot}%{_bindir}/{ctags,gctags}
# Install site-lisp files
@ -418,7 +403,6 @@ update-desktop-database &> /dev/null || :
%config(noreplace) %{_sysconfdir}/skel/.emacs
%config(noreplace) %{_sysconfdir}/rpm/macros.emacs
%doc doc/NEWS BUGS README doc/COPYING
%{_bindir}/b2m
%{_bindir}/ebrowse
%{_bindir}/emacsclient
%{_bindir}/etags.emacs
@ -449,6 +433,9 @@ update-desktop-database &> /dev/null || :
%dir %{_datadir}/emacs/site-lisp/site-start.d
%changelog
* Thu Jan 19 2012 Karel Klíč <kklic@redhat.com> - 1:24.0.92-1
- Upstream pre-release
* Thu Jan 12 2012 Karel Klíč <kklic@redhat.com> - 1:23.3-19
- Added patch to handle CVE-2012-0035: CEDET global-ede-mode file loading vulnerability (rhbz#773024)

View File

@ -1,2 +1,2 @@
f2cf8dc6f28f8ae59bc695b4ddda339c emacs-23.3a.tar.bz2
51f9c3b28f340a49042f103198aade96 emacs-24.0.92.tar.gz
d9a1e06bb579950c58fd3c1d8e813ce6 php-mode.el