Permalink
Browse files

Build statically linked binaries

We were incorrectly linking against the shared libraries from
e2fsprogs-libs.  This is bad because ldiskfsprogs updates to library
components would not appear in the installed binaries.  To work around
this issue we build statically.  A better fix would be to build a
ldiskfsprogs-libs pakcage to dynamically link against.  This will take
more work than the current fix, so we'll live with this for now so we
can move forward with testing.

Also, disable Obsolets and Provides statements in the spec file when
building with --with-ldiskfsprogs for those statements which are only
applicable to e2fsprogs.

Closes #1.
  • Loading branch information...
1 parent e7de7d4 commit 8550e3fba9d277dadb241ceb99f35aa35d1c3163 @nedbass committed Apr 5, 2011
Showing with 12 additions and 5 deletions.
  1. +4 −0 configure
  2. +3 −0 configure.in
  3. +5 −5 e2fsprogs.spec.in
View
@@ -649,6 +649,7 @@ root_libdir
root_sbindir
root_bindir
root_prefix
+E2FSPROGS_CMT
LDISKFSPROGS_CMT
RESIZEFSPROG
IMAGEPROG
@@ -18515,6 +18516,7 @@ _ACEOF
IMAGEPROG="image.ldiskfs"
RESIZEFSPROG="resizefs.ldiskfs"
LDISKFSPROGS_CMT=""
+ E2FSPROGS_CMT=#
{ $as_echo "$as_me:$LINENO: result: enabled" >&5
$as_echo "enabled" >&6; }
else
@@ -18530,6 +18532,7 @@ else
IMAGEPROG="e2image"
RESIZEFSPROG="resize2fs"
LDISKFSPROGS_CMT=#
+ E2FSPROGS_CMT=""
{ $as_echo "$as_me:$LINENO: result: disabled" >&5
$as_echo "disabled" >&6; }
fi
@@ -18600,6 +18603,7 @@ _ACEOF
+
case "$host_os" in
linux* | gnu* | k*bsd*-gnu)
if test "$prefix" = NONE -a "$root_prefix" = NONE ; then
View
@@ -1109,6 +1109,7 @@ if test x"$with_ldiskfsprogs" = xyes; then
IMAGEPROG="image.ldiskfs"
RESIZEFSPROG="resizefs.ldiskfs"
LDISKFSPROGS_CMT=""
+ E2FSPROGS_CMT=#
AC_MSG_RESULT([enabled])
else
E2FSPROGS="e2fsprogs"
@@ -1123,6 +1124,7 @@ else
IMAGEPROG="e2image"
RESIZEFSPROG="resize2fs"
LDISKFSPROGS_CMT=#
+ E2FSPROGS_CMT=""
AC_MSG_RESULT([disabled])
fi
AC_DEFINE_UNQUOTED(E2FSPROGS, "$E2FSPROGS", [name of e2fsprogs package])
@@ -1148,6 +1150,7 @@ AC_SUBST(PFSCKPROG)
AC_SUBST(IMAGEPROG)
AC_SUBST(RESIZEFSPROG)
AC_SUBST(LDISKFSPROGS_CMT)
+AC_SUBST(E2FSPROGS_CMT)
dnl
dnl Linux and Hurd places root files in the / by default
dnl
View
@@ -18,14 +18,14 @@ BuildRequires: autoconf texinfo
Group: System/Filesystems
@LFSCK_CMT@BuildRequires: db-devel >= 4.1
@LFSCK_CMT@Requires: db >= @DB4VERSION@
-Provides: e2fsbn ext2fs libcom_err = %{version} ldiskfsprogs = %{version}
-Obsoletes: ext2fs libcom_err < %{version}
+@E2FSPROGS_CMT@Provides: e2fsbn ext2fs libcom_err = %{version} ldiskfsprogs = %{version}
+@E2FSPROGS_CMT@Obsoletes: ext2fs libcom_err < %{version}
%else
Group: System Environment/Base
@LFSCK_CMT@BuildRequires: db4-devel >= 4.1
@LFSCK_CMT@Requires: db4 >= @DB4VERSION@
-Provides: ldiskfsprogs = %{version}
-Obsoletes: e4fsprogs e2fsprogs-libs < %{version}
+@E2FSPROGS_CMT@Provides: ldiskfsprogs = %{version}
+@E2FSPROGS_CMT@Obsoletes: e4fsprogs e2fsprogs-libs < %{version}
%endif
%if %{name} == "e2fsprogs"
Provides: e2fsprogs-libs = %{version}
@@ -82,7 +82,7 @@ SMP systems.
%configure --enable-elf-shlibs --enable-nls --enable-maintainer-mode \
%{?extra_config_flags:%extra_config_flags} \
@LFSCK_CMT@ --enable-lfsck \
- @LDISKFSPROGS_CMT@ --with-ldiskfsprogs
+ @LDISKFSPROGS_CMT@ --with-ldiskfsprogs --disable-elf-shlibs
make
%install

0 comments on commit 8550e3f

Please sign in to comment.