parted/0088-build-Remove-unused-traces-of-dynamic-loading.patch
Brian C. Lane d6652ea632 - Use python3 in buildroot
- Add make to BuildRequires
- Switch gpt-header-move and msdos-overlap to python3 (bcl)
- Modify gpt-header-move and msdos-overlap to work with py2 or py3 (bcl)
- Fix atari label false positives (psusi)
- Lift 512 byte restriction on fat resize (psusi)
- build: Remove unused traces of dynamic loading (cjwatson)
- Fix resizepart iec unit end sector (psusi)
- mkpart: Allow negative start value when FS-TYPE is not given (mail)
- Fix set and disk_set to not crash when no flags are supported (psusi)
- tests: fix t6100-mdraid-partitions (psusi)
- Fix make check (psusi)
- linux: Include <sys/sysmacros.h> for major() macro. (rjones)
2018-06-27 14:44:42 -07:00

239 lines
7.4 KiB
Diff

From b49388018931cab220b9dd50f3a2bd51401e48af Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Mon, 21 Sep 2015 12:10:02 +0100
Subject: [PATCH 88/92] build: Remove unused traces of dynamic loading
Now that file system operations have been removed from libparted,
libreiserfs is no longer used. Remove references to it, along with the
dynamic loading build infrastructure which was only used for
libreiserfs.
Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
---
README | 9 ++----
configure.ac | 49 --------------------------------
doc/parted.texi | 15 ----------
libparted/Makefile.am | 1 -
libparted/fs/reiserfs/reiserfs.c | 16 +----------
libparted/tests/Makefile.am | 1 -
libparted/tests/t2100-zerolen.sh | 3 --
parted.spec.in | 3 +-
8 files changed, 4 insertions(+), 93 deletions(-)
diff --git a/README b/README
index 3d1fee9..de91d4c 100644
--- a/README
+++ b/README
@@ -56,10 +56,5 @@ dangerous bugs before they would have done damage, so we think it's worth
it. Also, it means we get more bug reports ;)
-(2) When doing dependencies, remember that libreiserfs is a *soft* dependency,
-so I guess that means Debian-look-alikes should do a "suggests", but
-not a "requires".
-
-
-(3) When space is important, we suggest --without-readline, --disable-shared,
-and possibly --disable-nls and --disable-dynamic-loading.
+(2) When space is important, we suggest --without-readline, --disable-shared,
+and possibly --disable-nls.
diff --git a/configure.ac b/configure.ac
index 056478f..8413e06 100644
--- a/configure.ac
+++ b/configure.ac
@@ -103,20 +103,6 @@ if test "$enable_discover_only" = yes; then
fi
PARTED_LIBS=""
-AC_ARG_ENABLE([dynamic-loading],
-[ --enable-dynamic-loading support dynamic fs libraries [default=yes]], ,
- if test "$enable_discover_only" = yes; then
- enable_dynamic_loading=no
- else
- enable_dynamic_loading=yes
- fi
-)
-if test "$enable_discover_only" = yes \
- && test "$enable_dynamic_loading" = yes; then
- AC_MSG_ERROR(
-[You can't use --enable-dynamic-loading and --disable-discover-only together]
- )
-fi
AC_ARG_ENABLE([debug],
[ --enable-debug compile in assertions [default=yes]], ,
@@ -303,23 +289,6 @@ Or install gettext. GNU gettext is available from
])
fi
-dnl Check for libdl, if we are doing dynamic loading
-DL_LIBS=""
-AC_SUBST([DYNAMIC_LOADING])
-DYNAMIC_LOADING=no
-if test "$enable_dynamic_loading" = yes; then
- AC_CHECK_LIB([dl], [dlopen],
- DL_LIBS="-ldl"
- PARTED_LIBS="$PARTED_LIBS -ldl"
- DYNAMIC_LOADING=yes
- AC_DEFINE([DYNAMIC_LOADING], [1], [Lazy linking to fs libs]),
- AC_MSG_ERROR(
- [-ldl not found! Try using --disable-dynamic-loading]
- )
- )
-fi
-AC_SUBST([DL_LIBS])
-
dnl Check for libuuid
UUID_LIBS=""
AC_CHECK_LIB([uuid], [uuid_generate], [UUID_LIBS="-luuid"],
@@ -357,24 +326,6 @@ if test "$enable_selinux" = yes; then
fi
AC_SUBST([SELINUX_LIBS])
-dnl Check for libreiserfs
-REISER_LIBS=""
-if test "$enable_dynamic_loading" = no && test "$enable_discover_only" = no; then
- OLD_LIBS="$LIBS"
- AC_CHECK_LIB([dal], [dal_equals],
- LIBS="-ldal"
- AC_CHECK_LIB([reiserfs], [reiserfs_fs_probe],
- REISER_LIBS="-ldal -lreiserfs"
- AC_DEFINE([HAVE_LIBREISERFS], [1], [Have libreiserfs])
- )
- AC_CHECK_LIB([reiserfs], [reiserfs_fs_check],
- AC_DEFINE([HAVE_REISERFS_FS_CHECK], [1], [Have reiserfs_fs_check()])
- )
- )
- LIBS="$OLD_LIBS"
-fi
-AC_SUBST([REISER_LIBS])
-
dnl Check for termcap
if test "$with_readline" = yes; then
OLD_LIBS="$LIBS"
diff --git a/doc/parted.texi b/doc/parted.texi
index ac23ef6..c08cdc7 100644
--- a/doc/parted.texi
+++ b/doc/parted.texi
@@ -178,13 +178,6 @@ internationalisation support is desired.
@uref{ftp://ftp.gnu.org/gnu/gettext}
-@item libreiserfs, if you want reiserfs support:
-
- @uref{http://reiserfs.osdn.org.ua}
-
-Note that parted will automatically detect libreiserfs at runtime, and enable
-reiserfs support. libreiserfs is new, and hasn't been widely tested yet.
-
@end itemize
@node Supported Platforms
@@ -242,14 +235,6 @@ etc., where few libraries are available.
@item --disable-debug
don't include assertions
-@item --disable-dynamic-loading
-disables dynamic loading of some libraries (only libreiserfs for now,
-although we hope to expand this). Dynamic loading is useful because it
-allows you to reuse libparted shared libraries even when you don't know
-if some libraries will be available. It has a small overhead (mainly
-linking with libdl), so it may be useful to disable it on bootdisks if
-you don't need the flexibility.
-
@item --disable-nls
turns off native language support. This is useful for use with old
versions of glibc, or a trimmed down version of glibc suitable for
diff --git a/libparted/Makefile.am b/libparted/Makefile.am
index cb58648..e4a8049 100644
--- a/libparted/Makefile.am
+++ b/libparted/Makefile.am
@@ -54,7 +54,6 @@ libparted_la_LIBADD = \
labels/liblabels.la \
$(top_builddir)/lib/libgnulib.la \
$(OS_LIBS) \
- $(DL_LIBS) \
$(DM_LIBS) \
$(SELINUX_LIBS) \
$(LIB_BLKID) \
diff --git a/libparted/fs/reiserfs/reiserfs.c b/libparted/fs/reiserfs/reiserfs.c
index 2efcdf3..ef809cd 100644
--- a/libparted/fs/reiserfs/reiserfs.c
+++ b/libparted/fs/reiserfs/reiserfs.c
@@ -1,5 +1,5 @@
/*
- reiserfs.c -- libparted / libreiserfs glue
+ reiserfs.c -- ReiserFS detection
Copyright (C) 2001-2002, 2007, 2009-2014 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -14,17 +14,6 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- This is all rather complicated. There are a few combinations:
- * shared libraries full support
- * dynamic libraries present full support (via dlopen)
- * dynamic libraries absent (full support disabled) (via dlopen)
- * discover only
-
- We'd love to hear comments...
-
- So far, we've opted for maximum flexibility for the user. Is it
- all worth it?
*/
#include <config.h>
@@ -49,9 +38,6 @@
static PedSector reiserfs_super_offset[] = { 128, 16, -1 };
static PedFileSystemType* reiserfs_type;
-#define FPTR
-#define FCLASS extern
-
static PedGeometry *reiserfs_probe(PedGeometry *geom)
{
int i;
diff --git a/libparted/tests/Makefile.am b/libparted/tests/Makefile.am
index 9689fb3..7954e91 100644
--- a/libparted/tests/Makefile.am
+++ b/libparted/tests/Makefile.am
@@ -35,5 +35,4 @@ $(TEST_LOGS): prereq
TESTS_ENVIRONMENT = \
top_srcdir='$(top_srcdir)' \
abs_top_srcdir='$(abs_top_srcdir)' \
- DYNAMIC_LOADING=$(DYNAMIC_LOADING) \
ENABLE_DEVICE_MAPPER=$(ENABLE_DEVICE_MAPPER)
diff --git a/libparted/tests/t2100-zerolen.sh b/libparted/tests/t2100-zerolen.sh
index ecd579c..e0e521e 100755
--- a/libparted/tests/t2100-zerolen.sh
+++ b/libparted/tests/t2100-zerolen.sh
@@ -28,9 +28,6 @@ init_root_dir_
test "$(uname -s)" = Linux \
|| skip_ "not on Linux"
-test "x$DYNAMIC_LOADING" = xyes \
- || skip_ "no dynamic loading support"
-
test "x$ENABLE_DEVICE_MAPPER" = xyes \
|| skip_ "no device-mapper support"
diff --git a/parted.spec.in b/parted.spec.in
index cd5a99a..bdbe218 100644
--- a/parted.spec.in
+++ b/parted.spec.in
@@ -60,8 +60,7 @@ Parted library, you need to install this package.
%endif
--enable-part-static \
--enable-pc98=no \
- --enable-Werror=no \
- --disable-dynamic-loading
+ --enable-Werror=no
%{__make} %{?_smp_mflags}
%install
--
2.17.1