#4 Update to Emacs 27.1
Opened a month ago by bhavin192. Modified 2 days ago
rpms/ bhavin192/emacs src-fp-o  into  master

file modified
+26 -6

@@ -4,8 +4,8 @@ 

  Summary:       GNU Emacs text editor

  Name:          emacs

  Epoch:         1

- Version:       26.3

- Release:       4%{?dist}

+ Version:       27.1

+ Release:       1%{?dist}

  License:       GPLv3+ and CC0-1.0

  URL:           http://www.gnu.org/software/emacs/

  Source0:       https://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.xz

@@ -53,7 +53,6 @@ 

  BuildRequires: librsvg2-devel

  BuildRequires: m17n-lib-devel

  BuildRequires: libotf-devel

- BuildRequires: ImageMagick-devel

  BuildRequires: libselinux-devel

  BuildRequires: alsa-lib-devel

  BuildRequires: gpm-devel

@@ -66,6 +65,9 @@ 

  BuildRequires: gzip

  BuildRequires: desktop-file-utils

  BuildRequires: libacl-devel

+ BuildRequires: harfbuzz-devel

+ BuildRequires: jansson-devel

+ BuildRequires: systemd-devel

  

  BuildRequires: gtk3-devel

  BuildRequires: webkit2gtk3-devel

@@ -240,7 +242,7 @@ 

  

  %configure --with-dbus --with-gif --with-jpeg --with-png --with-rsvg \

             --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3 --with-gpm=no \

-            --with-xwidgets --with-modules

+            --with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json

  make bootstrap

  %{setarch} %make_build

  cd ..

@@ -253,7 +255,7 @@ 

  

  %configure --with-dbus --with-gif --with-jpeg --with-png --with-rsvg \

             --with-tiff --with-xft --with-xpm --with-x-toolkit=lucid --with-gpm=no \

-            --with-modules

+            --with-modules --with-harfbuzz --with-cairo --with-json

  make bootstrap

  %{setarch} %make_build

  cd ..

@@ -261,7 +263,7 @@ 

  # Build binary without X support

  mkdir build-nox && cd build-nox

  ln -s ../configure .

- %configure --with-x=no --with-modules

+ %configure --with-x=no --with-modules --with-json

  %{setarch} %make_build

  cd ..

  

@@ -297,15 +299,23 @@ 

  rm %{buildroot}%{_bindir}/emacs

  touch %{buildroot}%{_bindir}/emacs

  

+ # Remove emacs.pdmp from common

+ rm %{buildroot}%{emacs_libexecdir}/emacs.pdmp

+ 

  # Do not compress the files which implement compression itself (#484830)

  gunzip %{buildroot}%{_datadir}/emacs/%{version}/lisp/jka-compr.el.gz

  gunzip %{buildroot}%{_datadir}/emacs/%{version}/lisp/jka-cmpr-hook.el.gz

  

+ # Install emacs.pdmp of the emacs with GTK+

+ install -p -m 0644 build-gtk/src/emacs.pdmp %{buildroot}%{_bindir}/emacs-%{version}.pdmp

+ 

  # Install the emacs with LUCID toolkit

  install -p -m 0755 build-lucid/src/emacs %{buildroot}%{_bindir}/emacs-%{version}-lucid

+ install -p -m 0644 build-lucid/src/emacs.pdmp %{buildroot}%{_bindir}/emacs-%{version}-lucid.pdmp

  

  # Install the emacs without X

  install -p -m 0755 build-nox/src/emacs %{buildroot}%{_bindir}/emacs-%{version}-nox

+ install -p -m 0644 build-nox/src/emacs.pdmp %{buildroot}%{_bindir}/emacs-%{version}-nox.pdmp

  

  # Make sure movemail isn't setgid

  chmod 755 %{buildroot}%{emacs_libexecdir}/movemail

@@ -418,20 +428,24 @@ 

  

  %files

  %{_bindir}/emacs-%{version}

+ %{_bindir}/emacs-%{version}.pdmp

  %attr(0755,-,-) %ghost %{_bindir}/emacs

  %{_datadir}/applications/emacs.desktop

  %{_datadir}/appdata/%{name}.appdata.xml

  %{_datadir}/icons/hicolor/*/apps/emacs.png

  %{_datadir}/icons/hicolor/scalable/apps/emacs.svg

+ %{_datadir}/icons/hicolor/scalable/apps/emacs.ico

  %{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document.svg

  

  %files lucid

  %{_bindir}/emacs-%{version}-lucid

+ %{_bindir}/emacs-%{version}-lucid.pdmp

  %attr(0755,-,-) %ghost %{_bindir}/emacs

  %attr(0755,-,-) %ghost %{_bindir}/emacs-lucid

  

  %files nox

  %{_bindir}/emacs-%{version}-nox

+ %{_bindir}/emacs-%{version}-nox.pdmp

  %attr(0755,-,-) %ghost %{_bindir}/emacs

  %attr(0755,-,-) %ghost %{_bindir}/emacs-nox

  

@@ -468,6 +482,12 @@ 

  %{_includedir}/emacs-module.h

  

  %changelog

+ * Tue Aug 11 2020 Bhavin Gandhi <bhavin7392@gmail.com> - 1:27.1-1

+ - emacs-27.1 is available (#1867841)

+ - Add systemd-devel to support Type=notify in unit file

+ - Build with Cairo and Jansson support

+ - Remove ImageMagick dependency as it's no longer used

+ 

  * Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:26.3-4

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

  

file modified
+2 -2

@@ -1,2 +1,2 @@ 

- SHA512 (emacs-26.3.tar.xz) = 4d5a4319253afb081e105a3697eb6eeb8d8a0da18cd41346e376ca5af1e180a26e641f76c64fad1b0253168f14a511f0a4d9d4141524fb1cf4d04f25b05a76e9

- SHA512 (emacs-26.3.tar.xz.sig) = c7cd4ae7dc2c14f705c48ae120dc85f32cb254b99dc192aa55c08af7f71bed31836ca8e8522731a46b6e16cca684b9823b4b90ae3a358dc2f8bcac7c5741847e

+ SHA512 (emacs-27.1.tar.xz) = dfb26531d2c19cf9fb56505f03d799654b45e5f9528e777900e8280ed2c1d21e04c52f510528e31e015977c471ae63164cedee6174b7439ebcf479a21fc18064

+ SHA512 (emacs-27.1.tar.xz.sig) = 8873c9f7a812db4d44625eb5d4de1a3e1abb458584a70e5e68dd97b79361ce729f9007cb41d89ba9d9a5730fa024913690bdfa71f7482554aaf45cd635c30355

I have created a Copr repository to maintain builds of pretest versions of GNU Emacs: https://copr.fedorainfracloud.org/coprs/bhavin192/emacs-pretest/

Why am I creating this pull request?

While I did few changes to make the recipe work with 27.0.91, these changes can be used when stable release is available. It will also help me to get feedback from maintainers of this package.

PS: the sources file is manually updated.

Changes

  • Build with Cairo and Jansson support
  • Remove ImageMagick as it's no longer used
  • Keep the emacs.pdmp as executable_name.pdmp in _bindir

These are the things/questions I have in my mind.

  • Where should I write the BuildRequires: jansson-devel, are the packages sorted alphabetically?
  • Should we remove the --with-modules flags as the modules support is on by default.
  • Should we add --with-json flag explicitly (it's enabled automatically if jansson-devel package is available).
  • Is it good idea to keep other files like emacs-27.0.91.pdmp in %{_bindir}?

The make install command adds emacs.pdmp (generated during build process) as %{emacs_libexecdir}/emacs.pdmp. Due to that this file gets added in the emacs-common package causing other binaries fail while starting with below error,

$ emacs
desired fingerprint: 589372113bef06941a0bea77b27a845c8cf107f6b510f77464937562352306ed
found fingerprint: e2b481d51f83a51b6e54f8d17f8338a141800b5043a03e6bc7e888a46d51dfb8
emacs: could not load dump file "/usr/libexec/emacs/27.0.91/x86_64-redhat-linux-gnu/emacs.pdmp": not built for this Emacs executable

It is because this file is different for each binary we generate (i.e. emacs-lucid, emacs-nox). The workaround I found is to have the .pdmp file which has same name as of the binary and keep it along with the binary itself (again I'm not sure if that's a good idea).

I will keep this pull request updated so that we can merge it when the stable release i.e. 27.1 is available :)


Old title: [discussion] pretest version - 27.0.91

I am testing the copr build and it works fine. I have a question, according to https://docs.fedoraproject.org/en-US/packaging-guidelines/AppData/, instead of installing the appdata to %{buildroot}/%{_datadir}/appdata, shouldn't it be %{_metainfodir} instead?

These are the things/questions I have in my mind.

  • Where should I write the BuildRequires: jansson-devel, are the packages sorted alphabetically?

No, it's fine to put it end the end of the list.

  • Should we remove the --with-modules flags as the modules support is on by default.

No, explicit is better.

  • Should we add --with-json flag explicitly (it's enabled automatically if jansson-devel package is available).

Yes, I would add it. See above.

  • Is it good idea to keep other files like emacs-27.0.91.pdmp in %{_bindir}?

What are .pdmp files and why do we want them?

Sure thanks, I realized that I should add the flags explicitly.

What are .pdmp files and why do we want them?

As far as I have understood it. It's the way to dump memory state of loaded Elisp code to a file. That way the initial load time is very less. This is replacement of the old method unexec, which started having issues.

https://lwn.net/Articles/707615/

portable dumper
- Scripts from an older talk, there you can see/learn what the dumper actually is: https://dancol.org/pdumperpres.pdf
- Pre-loading some essential elisp code at build-time by taking a memory snapshot

https://media.emacsconf.org/2019/pad.html

From the NEWS file,

This improves compatibility with memory allocation on modern systems,
and in particular better supports the Address Space Layout
Randomization (ASLR) feature, a security technique used by most modern
operating systems.

So I think we should include them.

rebased onto ac07724

2 days ago