New RPM-Spec-Mode

The rpm-spec-mode in Fedora’s emacs packages and previous Emacs 23 packages cannot interface correctly with rpmbuild. rpmbuild cannot write to its output Emacs buffer: Redhat Bugzilla #227418. In emacs-23.0.60-0.10.20080330cvs I switched the rpm-spec-mode lisp file to Chip Coldwell’s updated mode based on compilation-mode. This fixes the rpmbuild output buffer at the cost of breaking automatic RPM signatures. Of course rpm --resign or rpm --addsign still signs the produced RPMs.

Update: emacs-22.1-1.fc9 and emacs-23.0.60-0.13.20080424cvs both have this compilation-mode-derived rpm-spec-mode with working GPG signing.

One Response to “New RPM-Spec-Mode”

  1. Actually, the problem with signing rpms is now fixed in the patched rpm-spec-mode that comes with emacs-22.2-1. So functionally, it is exactly the same as the unpatched version, except that it uses a real compilation buffer that is read-only.

    Code here:

    (progn
    (defun list->string (lst)
    (if (cdr lst)
    (concat (car lst) ” ” (list->string (cdr lst)))
    (car lst)))
    (compilation-start (list->string (cons rpm-spec-build-command buildoptions)) ‘rpmbuild-mode))

    (if (and rpm-spec-sign-gpg (not rpm-no-gpg))
    (let ((build-proc (get-buffer-process
    (get-buffer
    (compilation-buffer-name “rpmbuild” nil nil))))
    (rpm-passwd-cache (read-passwd “GPG passphrase: “)))
    (process-send-string build-proc (concat rpm-passwd-cache “\n”)))))

Leave a Reply