From df50ad7084fa0b152279b6d4bdb8c3e6ba2bd5bf Mon Sep 17 00:00:00 2001 From: Jacek Migacz Date: Wed, 21 Aug 2024 19:39:36 +0200 Subject: [PATCH] Disable Native-Compilation feature Resolves: RHEL-55467 Related: RHEL-33495 --- emacs.spec | 62 +++++++++++------------------------------------------- 1 file changed, 12 insertions(+), 50 deletions(-) diff --git a/emacs.spec b/emacs.spec index 27d30f0..355606e 100644 --- a/emacs.spec +++ b/emacs.spec @@ -111,7 +111,6 @@ Supplements: (libwayland-server and emacs-common) %define site_start_d %{site_lisp}/site-start.d %define pkgconfig %{_datadir}/pkgconfig %define emacs_libexecdir %{_libexecdir}/emacs/%{version}/%{_host} -%define native_lisp %{_libdir}/emacs/%{version}/native-lisp %global desc %{expand:Emacs is a powerful, customizable, self-documenting, modeless text editor. Emacs contains special code editing features, a scripting @@ -270,7 +269,7 @@ LDFLAGS=-Wl,-z,relro; export LDFLAGS; --with-jpeg \ --with-json \ --with-modules \ - --with-native-compilation=aot \ + --with-native-compilation=no \ --with-png \ --with-rsvg \ --with-sqlite3 \ @@ -290,7 +289,7 @@ mkdir build-nw && cd build-nw ln -s ../configure . %configure --with-json \ --with-modules \ - --with-native-compilation=aot \ + --with-native-compilation=no \ --with-sqlite3 \ --with-tree-sitter \ %if %{without gpm} @@ -315,7 +314,7 @@ LDFLAGS=-Wl,-z,relro; export LDFLAGS; --with-jpeg \ --with-json \ --with-modules \ - --with-native-compilation=aot \ + --with-native-compilation=no \ --with-png \ --with-rsvg \ --with-sqlite3 \ @@ -344,7 +343,7 @@ LDFLAGS=-Wl,-z,relro; export LDFLAGS; --with-jpeg \ --with-json \ --with-modules \ - --with-native-compilation=aot \ + --with-native-compilation=no \ --with-pgtk \ --with-png \ --with-rsvg \ @@ -501,47 +500,10 @@ install -p -m 0644 build-lucid/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${ nw_pdmp="emacs-$(./build-nw/src/emacs --fingerprint 2>&1 | sed 's/.* //').pdmp" install -p -m 0644 build-nw/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${nw_pdmp} -# Install native compiled Lisp of all builds -pgtk_comp_native_ver=$(ls -1 build-pgtk/native-lisp) -gtkx11_comp_native_ver=$(ls -1 build-gtk+x11/native-lisp) -lucid_comp_native_ver=$(ls -1 build-lucid/native-lisp) -nw_comp_native_ver=$(ls -1 build-nw/native-lisp) -cp -ar build-pgtk/native-lisp/${pgtk_comp_native_ver} %{buildroot}%{native_lisp} -cp -ar build-gtk+x11/native-lisp/${gtkx11_comp_native_ver} %{buildroot}%{native_lisp} -cp -ar build-lucid/native-lisp/${lucid_comp_native_ver} %{buildroot}%{native_lisp} -cp -ar build-nw/native-lisp/${nw_comp_native_ver} %{buildroot}%{native_lisp} - -(TOPDIR=${PWD} - cd %{buildroot} - find .%{native_lisp}/${gtkx11_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/gtk+x11-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/gtk+x11-dirs "%%%%dir %%p\n" \) -) -(TOPDIR=${PWD} - cd %{buildroot} - find .%{native_lisp}/${pgtk_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/pgtk-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/pgtk-dirs "%%%%dir %%p\n" \) -) -(TOPDIR=${PWD} - cd %{buildroot} - find .%{native_lisp}/${lucid_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/lucid-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/lucid-dirs "%%%%dir %%p\n" \) -) -(TOPDIR=${PWD} - cd %{buildroot} - find .%{native_lisp}/${nw_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/nw-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/nw-dirs "%%%%dir %%p\n" \) -) -echo %{emacs_libexecdir}/${pgtk_pdmp} >> pgtk-eln-filelist -echo %{emacs_libexecdir}/${gtkx11_pdmp} >> gtk+x11-eln-filelist -echo %{emacs_libexecdir}/${lucid_pdmp} >> lucid-eln-filelist -echo %{emacs_libexecdir}/${nw_pdmp} >> nw-eln-filelist - -# remove leading . from filelists -sed -i -e "s|\.%{native_lisp}|%{native_lisp}|" *-eln-filelist *-dirs - -# remove exec permissions from eln files to prevent the debuginfo extractor from -# trying to extract debuginfo from them -find %{buildroot}%{_libdir}/ -name '*eln' -type f | xargs chmod -x - -# ensure native files are newer than byte-code files -# see: https://bugzilla.redhat.com/show_bug.cgi?id=2157979#c11 -find %{buildroot}%{_libdir}/ -name '*eln' -type f | xargs touch +echo %{emacs_libexecdir}/${pgtk_pdmp} >> pgtk-filelist +echo %{emacs_libexecdir}/${gtkx11_pdmp} >> gtk+x11-filelist +echo %{emacs_libexecdir}/${lucid_pdmp} >> lucid-filelist +echo %{emacs_libexecdir}/${nw_pdmp} >> nw-filelist %check appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/*.metainfo.xml @@ -584,22 +546,22 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop /usr/sbin/alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \ --slave %{_mandir}/man1/etags.1.gz emacs.etags.man %{_mandir}/man1/etags.emacs.1.gz || : -%files -f pgtk-eln-filelist -f pgtk-dirs +%files -f pgtk-filelist %{_bindir}/emacs-%{version} %attr(0755,-,-) %ghost %{_bindir}/emacs %{_datadir}/glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml -%files gtk+x11 -f gtk+x11-eln-filelist -f gtk+x11-dirs +%files gtk+x11 -f gtk+x11-filelist %{_bindir}/emacs-%{version}-gtk+x11 %attr(0755,-,-) %ghost %{_bindir}/emacs %attr(0755,-,-) %ghost %{_bindir}/emacs-gtk+x11 -%files lucid -f lucid-eln-filelist -f lucid-dirs +%files lucid -f lucid-filelist %{_bindir}/emacs-%{version}-lucid %attr(0755,-,-) %ghost %{_bindir}/emacs %attr(0755,-,-) %ghost %{_bindir}/emacs-lucid -%files nw -f nw-eln-filelist -f nw-dirs +%files nw -f nw-filelist %{_bindir}/emacs-%{version}-nox %{_bindir}/emacs-%{version}-nw %{_bindir}/emacs-nox