public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/icecream] epel9: - Fix the create-env script not to crash on relative paths in ld.so.conf.
@ 2026-07-30 15:34 Michal Schmidt
0 siblings, 0 replies; only message in thread
From: Michal Schmidt @ 2026-07-30 15:34 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/icecream
Branch : epel9
Commit : 0acd02d7c7f66638b23e91c11377fe03d047b0a3
Author : Michal Schmidt <michich@fedoraproject.org>
Date : 2009-01-28T22:50:07+00:00
Stats : +86/-5 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/icecream/c/0acd02d7c7f66638b23e91c11377fe03d047b0a3?branch=epel9
Log:
- Fix the create-env script not to crash on relative paths in ld.so.conf.
- No need to build the native environment as root anymore.
- Disable the SELinux policy for now, it needs more work.
---
diff --git a/icecream-0.9.2-create-env-handle-relative-paths-in-ld.so.conf.patch b/icecream-0.9.2-create-env-handle-relative-paths-in-ld.so.conf.patch
new file mode 100644
index 0000000..1a8974d
--- /dev/null
+++ b/icecream-0.9.2-create-env-handle-relative-paths-in-ld.so.conf.patch
@@ -0,0 +1,43 @@
+From 126bacee1c6f9b85ffca02fd3473fd1165f1c5c2 Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt@redhat.com>
+Date: Wed, 28 Jan 2009 23:39:51 +0100
+Subject: [PATCH] icecc-create-env: handle relative paths in ld.so.conf includes
+
+In Fedora ld.so.conf contains an include directive with a relative path.
+ldconfig does not accept relative include paths when using -r.
+Rewrite includes in ld.so.conf to absolute paths.
+---
+ client/icecc-create-env | 13 ++++++++++++-
+ 1 files changed, 12 insertions(+), 1 deletions(-)
+
+diff --git a/client/icecc-create-env b/client/icecc-create-env
+index 860b10c..a605c0e 100755
+--- a/client/icecc-create-env
++++ b/client/icecc-create-env
+@@ -117,7 +117,17 @@ specfile=`$added_gcc -print-file-name=specs`
+ if test -n "$specfile" && test "$specfile" != "specs" && test -e "$specfile"; then
+ add_file "$specfile"
+ fi
+-add_file /etc/ld.so.conf
++
++# for ldconfig -r to work, ld.so.conf must not contain relative paths
++# in include directives. Make them absolute.
++tmp_ld_so_conf=`mktemp /tmp/icecc_ld_so_confXXXXXX`
++while read directive path; do
++ if [ "$directive" = "include" -a "${path:0:1}" != "/" ]; then
++ path="/etc/$path"
++ fi
++ echo "$directive $path"
++done </etc/ld.so.conf >$tmp_ld_so_conf
++add_file $tmp_ld_so_conf /etc/ld.so.conf
+
+ tempdir=`mktemp -d /tmp/iceccenvXXXXXX`
+ # special case for weird multilib setups
+@@ -175,3 +185,4 @@ tar -czhf "$mydir/$md5".tar.gz $target_files || {
+ }
+ cd ..
+ rm -rf $tempdir
++rm -f $tmp_ld_so_conf
+--
+1.6.0.6
+
diff --git a/icecream-0.9.2-create-env-improve-check-for-specs.patch b/icecream-0.9.2-create-env-improve-check-for-specs.patch
new file mode 100644
index 0000000..e924c81
--- /dev/null
+++ b/icecream-0.9.2-create-env-improve-check-for-specs.patch
@@ -0,0 +1,31 @@
+From d82c9a328c11799cfa87f53fd008e27f0cc0ae9b Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt@redhat.com>
+Date: Wed, 28 Jan 2009 23:34:22 +0100
+Subject: [PATCH] icecc-create-env: improve check for "specs"
+
+The check for "specs" would get confused if there was a file
+called "specs" in the current directory.
+Notice:
+ $ gcc -print-file-name=asdfghjkl
+ asdfghjkl
+i.e. if it does not find anything, it repeats the input name.
+---
+ client/icecc-create-env | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/client/icecc-create-env b/client/icecc-create-env
+index fb8afeb..860b10c 100755
+--- a/client/icecc-create-env
++++ b/client/icecc-create-env
+@@ -114,7 +114,7 @@ fi
+ add_file `$added_gcc -print-prog-name=cc1` /usr/bin/cc1
+ add_file `$added_gxx -print-prog-name=cc1plus` /usr/bin/cc1plus
+ specfile=`$added_gcc -print-file-name=specs`
+-if test -n "$specfile" && test -e "$specfile"; then
++if test -n "$specfile" && test "$specfile" != "specs" && test -e "$specfile"; then
+ add_file "$specfile"
+ fi
+ add_file /etc/ld.so.conf
+--
+1.6.0.6
+
diff --git a/icecream.spec b/icecream.spec
index 3abf5af..f4523d9 100644
--- a/icecream.spec
+++ b/icecream.spec
@@ -1,6 +1,6 @@
%if 0%{?fedora}
%bcond_without fedora
-%bcond_without selinux
+%bcond_with selinux
%else
%bcond_with fedora
# I'd need to modify the policy a bit to make it work on RHEL,
@@ -11,7 +11,7 @@
Name: icecream
Version: 0.9.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Distributed compiler
Group: Development/Tools
@@ -27,9 +27,10 @@ Source6: initscript-iceccd
Source7: initscript-scheduler
# manpages from http://ftp5.gwdg.de/pub/opensuse/repositories/home:/coolo/openSUSE_11.0/src/icecream-0.9.2-2.1.src.rpm
Source8: %{name}-manpages.tar.bz2
-Patch0: icecream-rename-scheduler.patch
-Patch1: icecream-cleanup-conffile.patch
-Patch2: icecream-build-env-as-root.patch
+Patch0: %{name}-rename-scheduler.patch
+Patch1: %{name}-cleanup-conffile.patch
+Patch2: %{name}-0.9.2-create-env-improve-check-for-specs.patch
+Patch3: %{name}-0.9.2-create-env-handle-relative-paths-in-ld.so.conf.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -78,6 +79,7 @@ This package contains development files for %{name}.
%patch0 -p0
%patch1 -p0
%patch2 -p1
+%patch3 -p1
sed -e 's|@LIBDIR@|%{_libdir}|g' %{SOURCE1} > icecream.sh
sed -e 's|@LIBDIR@|%{_libdir}|g' %{SOURCE2} > icecream.csh
mkdir SELinux
@@ -233,6 +235,11 @@ rm -rf %{buildroot}
%{_libdir}/pkgconfig/icecc.pc
%changelog
+* Wed Jan 28 2009 Michal Schmidt <mschmidt@redhat.com> - 0.9.2-2
+- Fix the create-env script not to crash on relative paths in ld.so.conf.
+- No need to build the native environment as root anymore.
+- Disable the SELinux policy for now, it needs more work.
+
* Thu Nov 13 2008 Michal Schmidt <mschmidt@redhat.com> - 0.9.2-1
- Update to upstream release 0.9.2.
- The license is GPLv2+.
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-30 15:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-30 15:34 [rpms/icecream] epel9: - Fix the create-env script not to crash on relative paths in ld.so.conf Michal Schmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox