rpms/emacs/F-7 files-el.patch, NONE, 1.1 emacs.spec, 1.98, 1.99 rpm-spec-mode.el, 1.7, 1.8 rpm-spec-mode.el-0.14-xemacs-compat.patch, 1.1, NONE
Charles Coldwell (coldwell)
fedora-extras-commits at redhat.com
Tue Nov 6 18:13:55 UTC 2007
Author: coldwell
Update of /cvs/pkgs/rpms/emacs/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5289
Modified Files:
emacs.spec rpm-spec-mode.el
Added Files:
files-el.patch
Removed Files:
rpm-spec-mode.el-0.14-xemacs-compat.patch
Log Message:
* Tue Nov 6 2007 Chip Coldwell <coldwell at redhat.com> - 22.1-5
- fix insufficient safe-mode checks (Resolves: bz367581)
- Update rpm-spec-mode to the current upstream, drop compat patch (bz306841)
files-el.patch:
--- NEW FILE files-el.patch ---
description:
;;; files.el --- file input and output commands for Emacs
----------------------------
revision 1.938
date: 2007-11-02 11:03:42 +0000; author: rfrancoise; state: Exp; lines: +2 -2; commitid: wgxFxIhiWr3NtZDs;
2007-11-02 Drake Wilson <drake at begriffli.ch> (tiny change)
* files.el (hack-local-variables): Fix membership tests to avoid
treating all variables as safe if `enable-local-variables' is
set to :safe.
=============================================================================
Index: lisp/files.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/files.el,v
retrieving revision 1.937
retrieving revision 1.938
diff -u -r1.937 -r1.938
--- lisp/files.el 26 Oct 2007 14:25:17 -0000 1.937
+++ lisp/files.el 2 Nov 2007 11:03:42 -0000 1.938
@@ -2821,8 +2821,8 @@
;; If caller wants only the safe variables,
;; install only them.
(dolist (elt result)
- (unless (or (memq (car elt) unsafe-vars)
- (memq (car elt) risky-vars))
+ (unless (or (member elt unsafe-vars)
+ (member elt risky-vars))
(hack-one-local-variable (car elt) (cdr elt))))
;; Query, except in the case where all are known safe
;; if the user wants no quuery in that case.
Index: emacs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/emacs/F-7/emacs.spec,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -r1.98 -r1.99
--- emacs.spec 18 Sep 2007 17:14:37 -0000 1.98
+++ emacs.spec 6 Nov 2007 18:13:22 -0000 1.99
@@ -3,7 +3,7 @@
Summary: GNU Emacs text editor
Name: emacs
Version: 22.1
-Release: 4%{?dist}
+Release: 5%{?dist}
License: GPL
URL: http://www.gnu.org/software/emacs/
Group: Applications/Editors
@@ -17,7 +17,6 @@
Source8: php-mode-init.el
Source9: ssl.el
Source11: rpm-spec-mode-init.el
-Source12: rpm-spec-mode.el-0.14-xemacs-compat.patch
Source13: focus-init.el
Source14: po-mode.el
Source15: po-mode-init.el
@@ -26,6 +25,7 @@
Source19: wrapper
Source20: igrep.el
Source21: igrep-init.el
+Patch1: files-el.patch
Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: atk-devel, cairo-devel, freetype-devel, fontconfig-devel, giflib-devel, glibc-devel, gtk2-devel, libpng-devel
BuildRequires: libjpeg-devel, libtiff-devel, libX11-devel, libXau-devel, libXdmcp-devel, libXrender-devel, libXt-devel
@@ -98,13 +98,12 @@
%prep
%setup -q
+%patch1 -p0 -b .files-el
# install rest of site-lisp files
( cd site-lisp
cp %SOURCE6 %SOURCE9 %SOURCE14 %SOURCE20 .
tar xfz %SOURCE7 # php-mode
- # xemacs compat patch for rpm-spec-mode
- patch < %SOURCE12
# fix po-auto-replace-revision-date nil
patch < %SOURCE16 )
@@ -297,6 +296,10 @@
%dir %{_datadir}/emacs/%{version}
%changelog
+* Tue Nov 6 2007 Chip Coldwell <coldwell at redhat.com> - 22.1-5
+- fix insufficient safe-mode checks (Resolves: bz367581)
+- Update rpm-spec-mode to the current upstream, drop compat patch (bz306841)
+
* Wed Sep 12 2007 Chip Coldwell <coldwell at redhat.com> - 22.1-4
- require xorg-x11-fonts-ISO8859-1-100dpi instead of 75dpi (Resolves: bz281861)
- drop broken python mode (Resolves: bz262801)
Index: rpm-spec-mode.el
===================================================================
RCS file: /cvs/pkgs/rpms/emacs/F-7/rpm-spec-mode.el,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- rpm-spec-mode.el 14 Jul 2005 08:34:35 -0000 1.7
+++ rpm-spec-mode.el 6 Nov 2007 18:13:22 -0000 1.8
@@ -4,7 +4,7 @@
;; Author: Stig Bjørlykke, <stigb at tihlde.org>
;; Keywords: unix, languages, rpm
-;; Version: 0.12
+;; Version: 0.12x
;; This file is part of XEmacs.
@@ -20,8 +20,8 @@
;; You should have received a copy of the GNU General Public License
;; along with XEmacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-;; MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301 USA.
;;; Synched up with: not in GNU Emacs.
@@ -39,7 +39,7 @@
;; - rewrite function names.
;; - autofill changelog entries.
-;; - customize rpm-tags-list and rpm-group-tags-list.
+;; - customize rpm-tags-list, rpm-obsolete-tags-list and rpm-group-tags-list.
;; - get values from `rpm --showrc'.
;; - ssh/rsh for compile.
;; - finish integrating the new navigation functions in with existing stuff.
@@ -63,7 +63,7 @@
;;; Code:
-(defconst rpm-spec-mode-version "0.12" "Version of `rpm-spec-mode'.")
+(defconst rpm-spec-mode-version "0.12x" "Version of `rpm-spec-mode'.")
(defgroup rpm-spec nil
"RPM spec mode with Emacs/XEmacs enhancements."
@@ -244,18 +244,19 @@
"Partial list of section names.")
(defconst rpm-scripts
'("pre" "post" "preun" "postun"
- "trigger" "triggerin" "triggerun" "triggerpostun")
+ "trigger" "triggerin" "triggerprein" "triggerun" "triggerpostun"
+ "pretrans" "posttrans")
"List of rpm scripts.")
(defconst rpm-section-seperate "^%\\(\\w+\\)\\s-")
(defconst rpm-section-regexp
(eval-when-compile
(concat "^%"
(regexp-opt
- ;; From RPM 4.4.1 sources, file build/parseSpec.c: partList[].
+ ;; From RPM 4.4.9 sources, file build/parseSpec.c: partList[].
'("build" "changelog" "check" "clean" "description" "files"
"install" "package" "post" "postun" "pretrans" "posttrans"
"pre" "prep" "preun" "trigger" "triggerin" "triggerpostun"
- "triggerun" "verifyscript") t)
+ "triggerprein" "triggerun" "verifyscript") t)
"\\b"))
"Regular expression to match beginning of a section.")
@@ -267,6 +268,11 @@
"*Face for tags."
:group 'rpm-spec-faces)
+(defface rpm-spec-obsolete-tag-face
+ '(( ((class color)) (:foreground "white" :background "red") ))
+ "*Face for obsolete tags."
+ :group 'rpm-spec-faces)
+
(defface rpm-spec-macro-face
'(( ((class color) (background light)) (:foreground "purple") )
( ((class color) (background dark)) (:foreground "yellow") ))
@@ -316,6 +322,8 @@
'rpm-spec-var-face "*Face for environment variables.")
(defvar rpm-spec-tag-face
'rpm-spec-tag-face "*Face for tags.")
+(defvar rpm-spec-obsolete-tag-face
+ 'rpm-spec-tag-face "*Face for obsolete tags.")
(defvar rpm-spec-package-face
'rpm-spec-package-face "*Face for package tag.")
(defvar rpm-spec-dir-face
@@ -340,7 +348,7 @@
(defvar rpm-spec-nobuild-option "--nobuild" "Option for no build.")
(defvar rpm-tags-list
- ;; From RPM 4.4.1 sources, file build/parsePreamble.c: preambleList[], and
+ ;; From RPM 4.4.9 sources, file build/parsePreamble.c: preambleList[], and
;; a few macros that aren't tags, but useful here.
'(("AutoProv")
("AutoReq")
@@ -348,16 +356,20 @@
("BuildArch")
("BuildArchitectures")
("BuildConflicts")
+ ("BuildEnhances")
+ ("BuildPlatforms")
("BuildPreReq")
("BuildRequires")
("BuildRoot")
+ ("BuildSuggests")
("Conflicts")
- ("Copyright")
+ ("CVSId")
("%description")
("Distribution")
("DistTag")
("DistURL")
("DocDir")
+ ("Enhances")
("Epoch")
("ExcludeArch")
("ExcludeOS")
@@ -367,6 +379,8 @@
("Group")
("Icon")
("%ifarch")
+ ("Keyword")
+ ("Keywords")
("License")
("Name")
("NoPatch")
@@ -381,17 +395,40 @@
("Provides")
("Release")
("Requires")
- ("RHNPlatform")
- ("Serial")
+ ("RepoTag")
("Source")
+ ("Suggests")
("Summary")
+ ("SVNId")
("URL")
+ ("Variant")
+ ("Variants")
("Vendor")
- ("Version"))
+ ("Version")
+ ("XMajor")
+ ("XMinor")
+ )
"List of elements that are valid tags.")
+(defvar rpm-tags-regexp
+ (concat "\\(\\<" (regexp-opt (mapcar 'car rpm-tags-list))
+ "\\|\\(Patch\\|Source\\)[0-9]+\\>\\)")
+ "Regular expression for matching valid tags.")
+
+(defvar rpm-obsolete-tags-list
+ ;; From RPM sources, file build/parsePreamble.c: preambleList[].
+ '(("Copyright") ;; 4.4.2
+ ("RHNPlatform") ;; 4.4.2, 4.4.9
+ ("Serial") ;; 4.4.2, 4.4.9
+ )
+ "List of elements that are obsolete tags in some versions of rpm.")
+
+(defvar rpm-obsolete-tags-regexp
+ (regexp-opt (mapcar 'car rpm-obsolete-tags-list) 'words)
+ "Regular expression for matching obsolete tags.")
+
(defvar rpm-group-tags-list
- ;; From RPM 4.4.1 sources, file GROUPS.
+ ;; From RPM 4.4.9 sources, file GROUPS.
'(("Amusements/Games")
("Amusements/Graphics")
("Applications/Archiving")
@@ -553,11 +590,17 @@
(list
(cons rpm-section-regexp rpm-spec-section-face)
'("%[a-zA-Z0-9_]+" 0 rpm-spec-macro-face)
- '("^\\([a-zA-Z0-9]+\\)\\(\([a-zA-Z0-9,_]+\)\\):"
- (1 rpm-spec-tag-face)
- (2 rpm-spec-ghost-face))
- '("^\\([a-zA-Z0-9]+\\):" 1 rpm-spec-tag-face)
- '("%\\(de\\(fine\\|scription\\)\\|files\\|package\\)[ \t]+\\([^-][^ \t\n]*\\)"
+ (cons (concat "^" rpm-obsolete-tags-regexp "\\(\([a-zA-Z0-9,_]+\)\\)[ \t]*:")
+ '((1 'rpm-spec-obsolete-tag-face)
+ (2 'rpm-spec-ghost-face)))
+ (cons (concat "^" rpm-tags-regexp "\\(\([a-zA-Z0-9,_]+\)\\)[ \t]*:")
+ '((1 'rpm-spec-tag-face)
+ (3 'rpm-spec-ghost-face)))
+ (cons (concat "^" rpm-obsolete-tags-regexp "[ \t]*:")
+ '(1 'rpm-spec-obsolete-tag-face))
+ (cons (concat "^" rpm-tags-regexp "[ \t]*:")
+ '(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]*\\)"
(3 rpm-spec-package-face))
@@ -668,7 +711,7 @@
(interactive "sChange log entry: ")
(save-excursion
(rpm-goto-section "changelog")
- (let* ((address (or rpm-spec-user-mail-address (user-mail-address)))
+ (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) " "
@@ -798,7 +841,7 @@
(replace-match
(concat what ": " (read-from-minibuffer
(concat "New " what ": ") (match-string 1))))
- (message (concat what " tag not found...")))))))
+ (message "%s tag not found..." what))))))
(defun rpm-change-n (what &optional arg)
"Change given tag with possible number."
@@ -812,7 +855,7 @@
(concat what number ": "
(read-file-name (concat "New " what number " file: ")
"" "" nil (match-string 1)))))
- (message (concat what " number \"" number "\" not found..."))))))
+ (message "%s number \"%s\" not found..." what number)))))
(defun rpm-insert-group (group)
"Insert Group tag."
@@ -849,7 +892,7 @@
(interactive "p")
(beginning-of-line)
(insert "Packager: " (or rpm-spec-user-full-name (user-full-name))
- " <" (or rpm-spec-user-mail-address (user-mail-address)) ">\n"))
+ " <" (rpm-spec-user-mail-address) ">\n"))
(defun rpm-change-packager (&optional arg)
"Update Packager tag."
@@ -1001,8 +1044,8 @@
"Run a `rpmbuild -bp'."
(interactive "p")
(if rpm-spec-short-circuit
- (message (concat "Cannot run `" rpm-spec-build-command
- " -bp' with --short-circuit"))
+ (message "Cannot run `%s -bp' with --short-circuit"
+ rpm-spec-build-command)
(setq rpm-no-gpg t)
(rpm-build "-bp")))
@@ -1010,8 +1053,8 @@
"Run a `rpmbuild -bl'."
(interactive "p")
(if rpm-spec-short-circuit
- (message (concat "Cannot run `" rpm-spec-build-command
- " -bl' with --short-circuit"))
+ (message "Cannot run `%s -bl' with --short-circuit"
+ rpm-spec-build-command)
(setq rpm-no-gpg t)
(rpm-build "-bl")))
@@ -1031,8 +1074,8 @@
"Run a `rpmbuild -bb'."
(interactive "p")
(if rpm-spec-short-circuit
- (message (concat "Cannot run `" rpm-spec-build-command
- " -bb' with --short-circuit"))
+ (message "Cannot run `%s -bb' with --short-circuit"
+ rpm-spec-build-command)
(setq rpm-no-gpg nil)
(rpm-build "-bb")))
@@ -1040,8 +1083,8 @@
"Run a `rpmbuild -bs'."
(interactive "p")
(if rpm-spec-short-circuit
- (message (concat "Cannot run `" rpm-spec-build-command
- " -bs' with --short-circuit"))
+ (message "Cannot run `%s -bs' with --short-circuit"
+ rpm-spec-build-command)
(setq rpm-no-gpg nil)
(rpm-build "-bs")))
@@ -1049,8 +1092,8 @@
"Run a `rpmbuild -ba'."
(interactive "p")
(if rpm-spec-short-circuit
- (message (concat "Cannot run `" rpm-spec-build-command
- " -ba' with --short-circuit"))
+ (message "Cannot run `%s -ba' with --short-circuit"
+ rpm-spec-build-command)
(setq rpm-no-gpg nil)
(rpm-build "-ba")))
@@ -1189,12 +1232,13 @@
(interactive "p")
(save-excursion
(goto-char (point-min))
- (if (search-forward-regexp "^Release:[ \t]*\\([0-9]+\\)\\(.*\\)" nil t)
- (let ((release (1+ (string-to-int (match-string 1)))))
- (setq release (concat (int-to-string release) (match-string 2)))
- (replace-match (concat "Release: " release))
- (message (concat "Release tag changed to " release ".")))
- (if (search-forward-regexp "^Release:[ \t]*%{?\\([^}]*\\)}?$" nil t)
+ (if (search-forward-regexp
+ "^\\(Release[ \t]*:[ \t]*\\)\\([0-9]+\\)\\(.*\\)" nil t)
+ (let ((release (1+ (string-to-int (match-string 2)))))
+ (setq release (concat (int-to-string release) (match-string 3)))
+ (replace-match (concat (match-string 1) release))
+ (message "Release tag changed to %s." release))
+ (if (search-forward-regexp "^Release[ \t]*:[ \t]*%{?\\([^}]*\\)}?$" nil t)
(rpm-increase-release-with-macros)
(message "No Release tag found...")))))
@@ -1204,7 +1248,7 @@
"Get the value of FIELD, searching up to buffer position MAX.
See `search-forward-regexp'."
(save-excursion
- (ignore-errors
+ (condition-case nil
(let ((str
(progn
(goto-char (point-min))
@@ -1228,7 +1272,8 @@
(concat start-string end-string)
;; Leave as is.
str)))
- str)))))
+ str))
+ (error nil))))
(defun rpm-find-spec-version (&optional with-epoch)
"Get the version string.
@@ -1251,7 +1296,7 @@
(let ((str
(progn
(goto-char (point-min))
- (search-forward-regexp (concat "Release:[ \t]*\\(.+\\).*$") nil)
+ (search-forward-regexp (concat "Release[ \t]*:[ \t]*\\(.+\\).*$") nil)
(match-string 1))))
(let ((inrel
(if (string-match "%{?\\([^}]*\\)}?$" str)
@@ -1268,7 +1313,7 @@
str)))
(setq dinrel inrel)
(replace-match (concat "%define " dinrel))
- (message (concat "Release tag changed to " dinrel "."))))))
+ (message "Release tag changed to %s." dinrel)))))
;;------------------------------------------------------------
@@ -1338,6 +1383,18 @@
;;------------------------------------------------------------
+(defun rpm-spec-user-mail-address ()
+ "User mail address helper."
+ (cond
+ (rpm-spec-user-mail-address
+ rpm-spec-user-mail-address)
+ ((fboundp 'user-mail-address)
+ (user-mail-address))
+ (t
+ user-mail-address)))
+
+;;------------------------------------------------------------
+
(defun rpm-about-rpm-spec-mode (&optional arg)
"About `rpm-spec-mode'."
(interactive "p")
--- rpm-spec-mode.el-0.14-xemacs-compat.patch DELETED ---
More information about the fedora-extras-commits
mailing list