From 774db2a9f167303b85bdde70e9b92bf043fe7088 Mon Sep 17 00:00:00 2001 From: Alan Dunn Date: Sep 10 2008 17:13:04 +0000 Subject: Fix prelink issues that cause binaries to stop working and implement execstack fix. --- diff --git a/coq.spec b/coq.spec index 6b53929..04b699f 100644 --- a/coq.spec +++ b/coq.spec @@ -25,7 +25,7 @@ Name: coq Version: 8.1pl3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Coq proof management system Group: Applications/Engineering @@ -49,11 +49,12 @@ Patch3: check.patch Patch4: makefile-parser.patch Patch5: parser-man.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: ocaml >= 3.08, ocaml-camlp5-devel, gtk2-devel, ocaml-lablgtk-devel, desktop-file-utils, emacs +BuildRequires: ocaml >= 3.08, ocaml-camlp5-devel, gtk2-devel, ocaml-lablgtk-devel, desktop-file-utils, emacs, prelink %if 0%{?fedora} < 9 BuildRequires: tetex, tetex-latex # There's no ocaml-camlp5-devel for ppc64 in Fedora <= 8 +# bz# 458467 ExcludeArch: ppc64 %else BuildRequires: texlive-latex, texlive-texmf @@ -215,6 +216,11 @@ make world # Fix permissions in the documentation chmod -R a+rX refman stdlib +# Clear any execstack permissions that ELF binaries may have +for f in bin/*; do +file $f | grep "ELF" && execstack -c $f +done + %install rm -rf %{buildroot} @@ -242,6 +248,21 @@ mkdir -p %{buildroot}%{tutorialcodedir} %endif mv RecTutorial.v %{buildroot}%{tutorialcodedir} +# Make sure that prelink does not foul up our bytecode executables by +# stripping them with a cron job. This is done in install to ensure +# that exactly the files that are eventually installed are in the +# list, not all of the files in the bin directory of the build + +%define prelinkfilename %{name}-prelink.conf +cd %{buildroot}%{_bindir} +for f in *; do +file $f | grep "not stripped" | sed -e 's/:.*//' -e 's!^!-b %{_bindir}/!' >> %{prelinkfilename} +done + +%define prelinkconfdir %{_sysconfdir}/prelink.conf.d +mkdir -p %{buildroot}%{prelinkconfdir} +mv %{prelinkfilename} %{buildroot}%{prelinkconfdir} + %clean rm -rf %{buildroot} @@ -256,10 +277,10 @@ rm -rf %{buildroot} %{_datadir}/coq %{_bindir}/coq* %{_bindir}/gallina -%{_bindir}/coq-parser -%if %{opt} -%{_bindir}/coq-parser.opt -%endif +# %%{_bindir}/coq-parser +# %%if %%{opt} +# %%{_bindir}/coq-parser.opt +# %%endif # Exclude ide files to put in a separate package %exclude %{_bindir}/coqide* %exclude %{_datadir}/coq/ide @@ -267,6 +288,10 @@ rm -rf %{buildroot} %exclude %{_datadir}/coq/*.cmxa %endif %{tex_dir}/coq* +# We DO want to replace any such file with this name - it will only be +# for Coq, and we want to correctly reflect the set of files that +# needs to be blacklisted from prelink with this new install +%config %{prelinkconfdir}/%{prelinkfilename} %files coqide %defattr(-,root,root,-) @@ -300,6 +325,9 @@ rm -rf %{buildroot} %doc README.coq-emacs %changelog +* Tue Sep 09 2008 Alan Dunn 8.1pl3-4 +- Added creation of prelink blacklist for any bytecode files. +- Fixed execstack status for binaries. * Tue Aug 05 2008 Alan Dunn 8.1pl3-3 - Changed parser to coq-parser to avoid name conflict with coda-client. diff --git a/import.log b/import.log index 4aac32d..7675358 100644 --- a/import.log +++ b/import.log @@ -1,3 +1,4 @@ coq-8_1pl3-1_fc9:HEAD:coq-8.1pl3-1.fc9.src.rpm:1216233878 coq-8_1pl3-2_fc10:HEAD:coq-8.1pl3-2.fc10.src.rpm:1216546261 coq-8_1pl3-3_fc9:HEAD:coq-8.1pl3-3.fc9.src.rpm:1217962473 +coq-8_1pl3-4_fc9:HEAD:coq-8.1pl3-4.fc9.src.rpm:1221066400