Skip to content

Commit e5a6173

Browse files
committed
curl/git: ensure curl is built with rpath entries so that git find necessary sub-dependencies when linking with libcurl.
1 parent 9095bff commit e5a6173

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ NOTE: Unlike `didbsng` - sgug-rse _must not_ use a "personal .rpmmacros" file -
1818

1919
(1) Download the artifacts for the latest version from the github releases tab (assuming they aren't too big).
2020

21-
You'll find three archives:
21+
You'll find three main archives - and there might be "fix" archives too that need to be extracted:
2222

2323
```
2424
sgug-rse-selfhoster-0.0.1alpha.tar.gz
2525
sgug-rse-srpms-0.0.1alpha.tar.gz
2626
sgug-rse-rpms-0.0.1alpha.tar.gz
27+
28+
sgug-rse-blahfix-0.0.Xalpha.tar.gz
2729
```
2830

2931
(2) Extract the selfhoster archive under /usr as root (important, sgug-rse _installation_ files are root owned and managed):
@@ -44,12 +46,16 @@ mkdir -p ~/rpmbuild/SRPMS
4446
mkdir -p ~/rpmbuild/RPMS
4547
```
4648

47-
(4) As your user extract the SRPMs and RPMs in the right place:
49+
(4) As your user extract the SRPMs and RPMs in the right place.
50+
51+
This should include any fixes:
4852

4953
```
5054
cd ~/rpmbuild
5155
gunzip -dc /path/to/sgug-rse-srpms-0.0.1alpha.tar.gz | tar xf -
5256
gunzip -dc /path/to/sgug-rse-rpms-0.0.1alpha.tar.gz | tar xf -
57+
# Optional
58+
gunzip -dc /path/to/sgug-rse-blahfix-0.0.Xalpha.tar.gz | tar xf -
5359
```
5460

5561
(5) You'll need to clone this repo (sgug-rse) -

packages/curl/SPECS/curl.spec

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ export SHELL="%{_bindir}/sh"
219219
export SHELL_PATH="$SHELL"
220220
export CONFIG_SHELL="$SHELL"
221221
export PERL="%{_bindir}/perl"
222+
export CFLAGS="-R%{_libdir} $CFLAGS"
223+
export LDFLAGS="-rpath %{_libdir} $LDFLAGS"
222224
mkdir build-{full,minimal}
223225
export common_configure_opts=" \
224226
--cache-file=../config.cache \
@@ -270,9 +272,9 @@ export common_configure_opts=" \
270272
)
271273

272274
# avoid using rpath
273-
sed -e 's/^runpath_var=.*/runpath_var=/' \
274-
-e 's/^hardcode_libdir_flag_spec=".*"$/hardcode_libdir_flag_spec=""/' \
275-
-i build-{full,minimal}/libtool
275+
#sed -e 's/^runpath_var=.*/runpath_var=/' \
276+
# -e 's/^hardcode_libdir_flag_spec=".*"$/hardcode_libdir_flag_spec=""/' \
277+
# -i build-{full,minimal}/libtool
276278

277279
make %{?_smp_mflags} V=1 -C build-minimal
278280
make %{?_smp_mflags} V=1 -C build-full
@@ -282,6 +284,8 @@ export SHELL="%{_bindir}/sh"
282284
export SHELL_PATH="$SHELL"
283285
export CONFIG_SHELL="$SHELL"
284286
export PERL="%{_bindir}/perl"
287+
export CFLAGS="-R%{_libdir} $CFLAGS"
288+
export LDFLAGS="-rpath %{_libdir} $LDFLAGS"
285289
# we have to override LD_LIBRARY_PATH because we eliminated rpath
286290
LD_LIBRARYN32_PATH="$RPM_BUILD_ROOT%{_libdir}:$LD_LIBRARYN32_PATH"
287291
export LD_LIBRARYN32_PATH
@@ -302,6 +306,8 @@ export SHELL="%{_bindir}/sh"
302306
export SHELL_PATH="$SHELL"
303307
export CONFIG_SHELL="$SHELL"
304308
export PERL="%{_bindir}/perl"
309+
export CFLAGS="-R%{_libdir} $CFLAGS"
310+
export LDFLAGS="-rpath %{_libdir} $LDFLAGS"
305311
# install and rename the library that will be packaged as libcurl-minimal
306312
make DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" install -C build-minimal/lib
307313
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.{la,so}

0 commit comments

Comments
 (0)