Bug 194624 - patches to update editors/emacs to version 24.4
Summary: patches to update editors/emacs to version 24.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Ashish SHUKLA
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-27 08:03 UTC by Joseph Mingrone
Modified: 2014-12-28 17:04 UTC (History)
1 user (show)

See Also:
jrm: maintainer-feedback? (ashish)


Attachments
svn diff (241.75 KB, patch)
2014-10-27 08:03 UTC, Joseph Mingrone
no flags Details | Diff
an upstream patch to fix a tramp bug on FreeBSD (1.18 KB, patch)
2014-10-28 19:12 UTC, Joseph Mingrone
no flags Details | Diff
editors/emacs diff (also includes diff for tramp bug) (245.72 KB, patch)
2014-11-02 12:15 UTC, Ashish SHUKLA
no flags Details | Diff
Updated editors/emacs diff (also includes diff for tramp bug) (244.62 KB, patch)
2014-11-03 01:05 UTC, Ashish SHUKLA
no flags Details | Diff
patch pkg-install to create directory /var/games/emacs if it doesn't already exist (333 bytes, patch)
2014-11-06 06:41 UTC, Joseph Mingrone
jrm: maintainer-approval+
Details | Diff
Fix for pkg-install issue (989 bytes, patch)
2014-11-06 14:34 UTC, Ashish SHUKLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Mingrone freebsd_committer freebsd_triage 2014-10-27 08:03:17 UTC
Created attachment 148692 [details]
svn diff

I removed most of the patches and made the plist static since the porter's handbook says "maintainers should use static package lists wherever possibles."
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-10-27 08:03:17 UTC
Auto-assigned to maintainer ashish@FreeBSD.org
Comment 2 Ashish SHUKLA freebsd_committer freebsd_triage 2014-10-27 08:48:24 UTC
Hi Joseph,

Thanks for working on it. I didn't realize Emacs 24.4 is out, yay!! :)

There are couple of issues with your diff, the ones which I could find in first glance without compiling:

- PORTREVISION, PORTEPOCH 
- CANNA patchset
- /var/games/emacs

Since your patch is quite big, I'll work on it during weekend, and hopefully commit it (with changes).

Thanks
Ashish
Comment 3 Joseph Mingrone freebsd_committer freebsd_triage 2014-10-27 16:26:13 UTC
Since PORTVERSION is increasing, I'm assuming PORTREVISION and PORTEPOCH can be left out?

Since I know next to nothing about CANNA I can't be of much help here.  Sorry, I intended to mention that CANNA needed to be dealt with, but forgot.  Users that depend on it wouldn't be pleased to see it missing.

How about the line below, which will put the game scores in /usr/local/var/games/emacs/.

CONFIGURE_ARGS=	--localstatedir=${PREFIX}/var --without-compress-install

If you are OK with this change, then two lines in pkg-list need updating.

var/games/emacs/snake-scores
var/games/emacs/tetris-scores

Thanks,

Joseph
Comment 4 Joseph Mingrone freebsd_committer freebsd_triage 2014-10-28 19:12:30 UTC
Created attachment 148746 [details]
an upstream patch to fix a tramp bug on FreeBSD

Attached is a patch for a tramp bug on FreeBSD.  See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18858.  I've tested it and it fixes the problem.
Comment 5 Ashish SHUKLA freebsd_committer freebsd_triage 2014-11-02 12:15:51 UTC
Created attachment 148925 [details]
editors/emacs diff (also includes diff for tramp bug)

Hi Joseph,

Thanks for your diff. Majority of it's correct, although I've made couple of changes.  Also thanks for fixing the portlint warnings, your changes to text read much better than what I wrote. :)

The emacs update involves updating Mk/bsd.emacs.mk, editors/emacs-nox11, and bumping PORTREVISION for N other ports, dependent on editors/emacs. I'll prepare a diff, and try to commit it this evening or tomorrow, hopefully.

If you notice any issues with this one, please let me know.

Thanks,
Ashish
Comment 6 Joseph Mingrone freebsd_committer freebsd_triage 2014-11-02 23:48:27 UTC
Hi Ashish,

I'm looking at the diff and your changes make sense to me.  I'm wondering about CONFIGURE_ARGS=	--localstatedir=/var versus 
CONFIGURE_ARGS= --localstatedir=${PREFIX}/var.  You mentioned earlier that /var/games/emacs was a problem.  Are two game scores a good reason to install files outside of ${PREFIX}?  If you're OK with them going in /usr/local/var/games/emacs then you can omit the --localstatedir=${PREFIX}/var and simply use

CONFIGURE_ARGS=	--without-compress-install

The relevant lines in pkg-plist then change to

var/games/emacs/snake-scores
var/games/emacs/tetris-scores
@dir var/games/emacs

Thanks,

Joseph
Comment 7 Ashish SHUKLA freebsd_committer freebsd_triage 2014-11-03 01:04:34 UTC
Hi Joseph,

(In reply to Joseph Mingrone from comment #6)
> Hi Ashish,
> 
> I'm looking at the diff and your changes make sense to me.  I'm wondering
> about CONFIGURE_ARGS=	--localstatedir=/var versus 
> CONFIGURE_ARGS= --localstatedir=${PREFIX}/var.  You mentioned earlier that
> /var/games/emacs was a problem.  Are two game scores a good reason to
> install files outside of ${PREFIX}?

Well, they're like datafiles (like mysql, ejabberd et al.), and are always installed in /var/games/emacs, and because in pkg-plist can't really track ownership/mode, I used pkg-{de,}install scripts to manage them. In my previous diff, I purged those files, not being careful. Thanks for bringing this to my attention. I've brought them back, and reverted corresponding sections in Makefile, and pkg-plist accordingly.

Thanks,
Ashish
Comment 8 Ashish SHUKLA freebsd_committer freebsd_triage 2014-11-03 01:05:29 UTC
Created attachment 148970 [details]
Updated editors/emacs diff (also includes diff for tramp bug)
Comment 9 Joseph Mingrone freebsd_committer freebsd_triage 2014-11-03 01:28:19 UTC
Sounds good.  I did some basic testing (those simple tests listed in the Quick Porting of the porter's handbook) with a fixed set of options and everything was as expected.  I did notice that pkg info -l doesn't list those files in /var/games/emacs.  Is that a problem?
Comment 10 Joseph Mingrone freebsd_committer freebsd_triage 2014-11-03 01:33:25 UTC
What about having the port install those files and have them in the pkg-plist, then have your pkg-install script just include what's below?

#!/bin/sh

# $FreeBSD$

GAMESROOT=/var/games/emacs

if [ "$2" = "POST-INSTALL" ]; then
    umask 022
    chown games $GAMESROOT
    chmod 775 $GAMESROOT
fi

exit 0
Comment 11 Joseph Mingrone freebsd_committer freebsd_triage 2014-11-03 01:38:40 UTC
Sorry.. You'd have to chmod the two files as well.
Comment 12 Ashish SHUKLA freebsd_committer freebsd_triage 2014-11-03 03:07:26 UTC
Hi,

(In reply to Joseph Mingrone from comment #9)
> Sounds good.  I did some basic testing (those simple tests listed in the
> Quick Porting of the porter's handbook) with a fixed set of options and
> everything was as expected.  I did notice that pkg info -l doesn't list
> those files in /var/games/emacs.  Is that a problem?

I don't think that's a problem As I mentioned, they're datafiles, analogous to mysql's db, i.e. `pkg info -l' will not output mysql data files when queried for mysql server package(s).

(In reply to Joseph Mingrone from comment #10)
> What about having the port install those files and have them in the
> pkg-plist, then have your pkg-install script just include what's below?

As mentioned before those are the data files, which one would like to retain after deinstall, if they're non-empty, which AFAIK is not possible with pkg-plist mechanism.

Similarly, if you upgrade the port, which will result in deinstall and install new version, assuming those files are present in pkg-plist, they'll be re-created post upgrade, which is completely unacceptable, if those were empty prior to upgrade.

Hope this makes sense.

Thanks,
Ashish
Comment 13 Joseph Mingrone freebsd_committer freebsd_triage 2014-11-03 03:09:20 UTC
Makes sense.  Thanks for humouring me. :-)
Comment 14 commit-hook freebsd_committer freebsd_triage 2014-11-05 13:20:32 UTC
A commit references this bug:

Author: ashish
Date: Wed Nov  5 13:19:51 UTC 2014
New revision: 372191
URL: https://svnweb.freebsd.org/changeset/ports/372191

Log:
  - Chase GNU Emacs updates

  PR:		194624

Changes:
  head/audio/emms/Makefile
  head/cad/dinotrace/Makefile
  head/cad/verilog-mode.el/Makefile
  head/databases/bbdb/Makefile
  head/deskutils/etask/Makefile
  head/deskutils/howm/Makefile
  head/devel/cask/Makefile
  head/devel/cedet/Makefile
  head/devel/clojure-cider/Makefile
  head/devel/dash.el/Makefile
  head/devel/distel/Makefile
  head/devel/ecb/Makefile
  head/devel/epl.el/Makefile
  head/devel/git-modes/Makefile
  head/devel/magit/Makefile
  head/devel/p5-Sepia/Makefile
  head/devel/pkg-info.el/Makefile
  head/devel/psvn/Makefile
  head/devel/pymacs/Makefile
  head/devel/xtla/Makefile
  head/editors/apel/Makefile
  head/editors/flim/Makefile
  head/editors/paredit-mode.el/Makefile
  head/editors/semi/Makefile
  head/editors/slime/Makefile
  head/editors/tamago/Makefile
  head/editors/tree-widget/Makefile
  head/editors/yasnippet/Makefile
  head/graphics/xface.el/Makefile
  head/irc/riece/Makefile
  head/japanese/ddskk/Makefile
  head/japanese/egg-canna/Makefile
  head/japanese/lookup/Makefile
  head/japanese/migemo.el/Makefile
  head/japanese/navi2ch/Makefile
  head/japanese/yc.el/Makefile
  head/lang/bigloo/Makefile
  head/lang/clojure-mode.el/Makefile
  head/lang/csharp-mode.el/Makefile
  head/lang/gcl/Makefile
  head/lang/tuareg-mode.el/Makefile
  head/mail/c-sig/Makefile
  head/mail/mew/Makefile
  head/mail/wanderlust/Makefile
  head/mail/wanderlust-devel/Makefile
  head/mail/x-face-e21/Makefile
  head/mail/xcite/Makefile
  head/math/proofgeneral/Makefile
  head/misc/elscreen/Makefile
  head/net/tramp/Makefile
  head/net-im/jabber.el/Makefile
  head/print/auctex/Makefile
  head/print/hyperlatex/Makefile
  head/security/easypg/Makefile
  head/security/starttls/Makefile
  head/sysutils/puppet-mode.el/Makefile
  head/textproc/dictem/Makefile
  head/textproc/dictionary/Makefile
  head/textproc/doc-mode.el/Makefile
  head/textproc/emacs-wiki/Makefile
  head/textproc/htmlize.el/Makefile
  head/textproc/ibus-el/Makefile
  head/textproc/markdown-mode.el/Makefile
  head/textproc/muse/Makefile
  head/textproc/uim-el/Makefile
  head/textproc/xml-lite.el/Makefile
  head/textproc/xml-parse.el/Makefile
  head/textproc/yaml-mode.el/Makefile
  head/www/emacs-w3m/Makefile
Comment 15 Ashish SHUKLA freebsd_committer freebsd_triage 2014-11-05 13:26:12 UTC
Committed with some modifications in r372190[1].

[1] http://svnweb.freebsd.org/ports?view=revision&revision=372190

Thanks,
Ashish
Comment 16 Joseph Mingrone freebsd_committer freebsd_triage 2014-11-06 06:41:54 UTC
Created attachment 149121 [details]
patch pkg-install to create directory /var/games/emacs if it doesn't already exist

Small issue:

# pkg install emacs24-24.4,3 
Updating trp repository catalogue...
trp repository is up-to-date.
All repositories are up-to-date.
The following 1 packages will be affected (of 0 checked):

New packages to be INSTALLED:
        emacs24: 24.4,3

The process will require 159 MB more space.
30 MB to be downloaded.

Proceed with this action? [y/N]: y
Fetching emacs24-24.4,3.txz: 100%   30 MB   6.3M/s    00:05    
Checking integrity... done (0 conflicting)
[1/1] Installing emacs24-24.4,3: 100%
touch: /var/games/emacs/snake-scores: No such file or directory
touch: /var/games/emacs/tetris-scores: No such file or directory
Comment 17 Ashish SHUKLA freebsd_committer freebsd_triage 2014-11-06 14:34:38 UTC
Created attachment 149129 [details]
Fix for pkg-install issue

Hi Joseph,

Thanks for the report.

The attached diff seems like the right fix. I've also functionally tested it with Emacs, and seems to work alright.

I'll commit it by tomorrow hopefully.

Thanks,
Ashish
Comment 18 Ashish SHUKLA freebsd_committer freebsd_triage 2014-11-07 12:58:30 UTC
(In reply to Ashish SHUKLA from comment #17)
> Created attachment 149129 [details]
> Fix for pkg-install issue
> 
> Hi Joseph,
> 
> Thanks for the report.
> 
> The attached diff seems like the right fix. I've also functionally tested it
> with Emacs, and seems to work alright.
> 
> I'll commit it by tomorrow hopefully.
> 
> Thanks,
> Ashish

Fix committed in r372258[1], and r372259[2].

[1] http://svnweb.freebsd.org/ports?view=revision&revision=372258
[2] http://svnweb.freebsd.org/ports?view=revision&revision=372259

HTH
Comment 19 Ashish SHUKLA freebsd_committer freebsd_triage 2014-12-28 17:04:49 UTC
Fixed sometime ago.