Notes on creating an emacs package

16 Sep 2018

The plan is to grab a new version of emacs and package it for rhel7

Not sure if emacs 25 is possible.

I found the location of the emacs mirror [1]. I then found the location of the packaging folder where I was working [2].

I remember there were problems compiling emacs 26, because in one of the updates, the minimum version of autoconf had to be higher autoconf available on rhel7. I skimmed through the “news” [3] of the releases and could not find a mention.

Next: download emacs 25.3 to try compiling it.

Diversion into autoconf version

I found a method to chroot into the buildroot for epel to enquire the version of autoconf used.

mock -r epel-7-x86_64 –shell rpm -qa | grep autoconf

The result was that I am using autoconf 2.69

Baring spec

I am removing all the patches and additional source files to get a “clean” rpm that reflects emacs sources.

I would like to compare the spec file to the spec file used in fedora. What was the dnf command to obtain the source rpm?

Even better, one could get the git repo from the fedora equivalent of git.centos.org using fedpkg.

As I write this piece there are problems using fedpkg to clone “emacs” unless done anonymously. I found this thanks to a message to the fedora developers list from user Martin Gansser [4]. He reported the error I saw, that even though I can connect to fedorapeople.org using an ssh-key, the cloning using fedpkg fails with a message “Permission denied”.

Pavel Zhukov diagnosed the problem as something to do with the versions of the ssh server and the client and pointed to a bug report in the archlinux domain [5]. It seems that my ssh client is too new on this fedora 28 workstation. I am using version 7.8p1-2. There are also two related bug reports in bugzilla [6] , [7].

Mock build

The build in mock failed because I failed to include the packaged files in the %files section of the spec file.

After adding the several thousand(!) files in the build, the creation of the rpm worked okay.

I thought it was an odd thing in the rpm generated that the description would be followed by the list of files, but it turns out that the query command I typed on the generated rpm included the “-l” switch.:

rpm -qipl /var/lib/mock/epel-7-x86_64/result/emacs-25.3-1.el7.x86_64.rpm

Now I have to test this on a rhel7 system.

References