]> git.pld-linux.org Git - packages/parted.git/blob - 0088-build-Remove-unused-traces-of-dynamic-loading.patch
- release 6 (by relup.sh)
[packages/parted.git] / 0088-build-Remove-unused-traces-of-dynamic-loading.patch
1 From b49388018931cab220b9dd50f3a2bd51401e48af Mon Sep 17 00:00:00 2001
2 From: Colin Watson <cjwatson@ubuntu.com>
3 Date: Mon, 21 Sep 2015 12:10:02 +0100
4 Subject: [PATCH 88/92] build: Remove unused traces of dynamic loading
5
6 Now that file system operations have been removed from libparted,
7 libreiserfs is no longer used.  Remove references to it, along with the
8 dynamic loading build infrastructure which was only used for
9 libreiserfs.
10
11 Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
12 ---
13  README                           |  9 ++----
14  configure.ac                     | 49 --------------------------------
15  doc/parted.texi                  | 15 ----------
16  libparted/Makefile.am            |  1 -
17  libparted/fs/reiserfs/reiserfs.c | 16 +----------
18  libparted/tests/Makefile.am      |  1 -
19  libparted/tests/t2100-zerolen.sh |  3 --
20  parted.spec.in                   |  3 +-
21  8 files changed, 4 insertions(+), 93 deletions(-)
22
23 diff --git a/README b/README
24 index 3d1fee9..de91d4c 100644
25 --- a/README
26 +++ b/README
27 @@ -56,10 +56,5 @@ dangerous bugs before they would have done damage, so we think it's worth
28  it.  Also, it means we get more bug reports ;)
29  
30  
31 -(2) When doing dependencies, remember that libreiserfs is a *soft* dependency,
32 -so I guess that means Debian-look-alikes should do a "suggests", but
33 -not a "requires".
34 -
35 -
36 -(3) When space is important, we suggest --without-readline, --disable-shared,
37 -and possibly --disable-nls and --disable-dynamic-loading.
38 +(2) When space is important, we suggest --without-readline, --disable-shared,
39 +and possibly --disable-nls.
40 diff --git a/configure.ac b/configure.ac
41 index 056478f..8413e06 100644
42 --- a/configure.ac
43 +++ b/configure.ac
44 @@ -103,20 +103,6 @@ if test "$enable_discover_only" = yes; then
45  fi
46  
47  PARTED_LIBS=""
48 -AC_ARG_ENABLE([dynamic-loading],
49 -[  --enable-dynamic-loading  support dynamic fs libraries [default=yes]], ,
50 -       if test "$enable_discover_only" = yes; then
51 -               enable_dynamic_loading=no
52 -       else
53 -               enable_dynamic_loading=yes
54 -       fi
55 -)
56 -if test "$enable_discover_only" = yes \
57 - && test "$enable_dynamic_loading" = yes; then
58 -       AC_MSG_ERROR(
59 -[You can't use --enable-dynamic-loading and --disable-discover-only together]
60 -       )
61 -fi
62  
63  AC_ARG_ENABLE([debug],
64         [  --enable-debug          compile in assertions [default=yes]], ,
65 @@ -303,23 +289,6 @@ Or install gettext.  GNU gettext is available from
66  ])
67  fi
68  
69 -dnl Check for libdl, if we are doing dynamic loading
70 -DL_LIBS=""
71 -AC_SUBST([DYNAMIC_LOADING])
72 -DYNAMIC_LOADING=no
73 -if test "$enable_dynamic_loading" = yes; then
74 -       AC_CHECK_LIB([dl], [dlopen],
75 -               DL_LIBS="-ldl"
76 -               PARTED_LIBS="$PARTED_LIBS -ldl"
77 -               DYNAMIC_LOADING=yes
78 -               AC_DEFINE([DYNAMIC_LOADING], [1], [Lazy linking to fs libs]),
79 -               AC_MSG_ERROR(
80 -                       [-ldl not found!  Try using --disable-dynamic-loading]
81 -               )
82 -       )
83 -fi
84 -AC_SUBST([DL_LIBS])
85 -
86  dnl Check for libuuid
87  UUID_LIBS=""
88  AC_CHECK_LIB([uuid], [uuid_generate], [UUID_LIBS="-luuid"],
89 @@ -357,24 +326,6 @@ if test "$enable_selinux" = yes; then
90  fi
91  AC_SUBST([SELINUX_LIBS])
92  
93 -dnl Check for libreiserfs
94 -REISER_LIBS=""
95 -if test "$enable_dynamic_loading" = no && test "$enable_discover_only" = no; then
96 -       OLD_LIBS="$LIBS"
97 -       AC_CHECK_LIB([dal], [dal_equals],
98 -               LIBS="-ldal"
99 -               AC_CHECK_LIB([reiserfs], [reiserfs_fs_probe],
100 -                       REISER_LIBS="-ldal -lreiserfs"
101 -                       AC_DEFINE([HAVE_LIBREISERFS], [1], [Have libreiserfs])
102 -               )
103 -               AC_CHECK_LIB([reiserfs], [reiserfs_fs_check],
104 -                       AC_DEFINE([HAVE_REISERFS_FS_CHECK], [1], [Have reiserfs_fs_check()])
105 -               )
106 -       )
107 -       LIBS="$OLD_LIBS"
108 -fi
109 -AC_SUBST([REISER_LIBS])
110 -
111  dnl Check for termcap
112  if test "$with_readline" = yes; then
113         OLD_LIBS="$LIBS"
114 diff --git a/doc/parted.texi b/doc/parted.texi
115 index ac23ef6..c08cdc7 100644
116 --- a/doc/parted.texi
117 +++ b/doc/parted.texi
118 @@ -178,13 +178,6 @@ internationalisation support is desired.
119  
120         @uref{ftp://ftp.gnu.org/gnu/gettext}
121  
122 -@item libreiserfs, if you want reiserfs support:
123 -
124 -       @uref{http://reiserfs.osdn.org.ua}
125 -
126 -Note that parted will automatically detect libreiserfs at runtime, and enable
127 -reiserfs support.  libreiserfs is new, and hasn't been widely tested yet.
128 -
129  @end itemize
130  
131  @node Supported Platforms
132 @@ -242,14 +235,6 @@ etc., where few libraries are available.
133  @item --disable-debug
134  don't include assertions
135  
136 -@item --disable-dynamic-loading
137 -disables dynamic loading of some libraries (only libreiserfs for now,
138 -although we hope to expand this).  Dynamic loading is useful because it
139 -allows you to reuse libparted shared libraries even when you don't know
140 -if some libraries will be available.  It has a small overhead (mainly
141 -linking with libdl), so it may be useful to disable it on bootdisks if
142 -you don't need the flexibility.
143 -
144  @item --disable-nls
145  turns off native language support.  This is useful for use with old
146  versions of glibc, or a trimmed down version of glibc suitable for
147 diff --git a/libparted/Makefile.am b/libparted/Makefile.am
148 index cb58648..e4a8049 100644
149 --- a/libparted/Makefile.am
150 +++ b/libparted/Makefile.am
151 @@ -54,7 +54,6 @@ libparted_la_LIBADD = \
152    labels/liblabels.la  \
153    $(top_builddir)/lib/libgnulib.la \
154    $(OS_LIBS)           \
155 -  $(DL_LIBS)           \
156    $(DM_LIBS)           \
157    $(SELINUX_LIBS)      \
158    $(LIB_BLKID)         \
159 diff --git a/libparted/fs/reiserfs/reiserfs.c b/libparted/fs/reiserfs/reiserfs.c
160 index 2efcdf3..ef809cd 100644
161 --- a/libparted/fs/reiserfs/reiserfs.c
162 +++ b/libparted/fs/reiserfs/reiserfs.c
163 @@ -1,5 +1,5 @@
164  /*
165 -    reiserfs.c -- libparted / libreiserfs glue
166 +    reiserfs.c -- ReiserFS detection
167      Copyright (C) 2001-2002, 2007, 2009-2014 Free Software Foundation, Inc.
168  
169      This program is free software; you can redistribute it and/or modify
170 @@ -14,17 +14,6 @@
171  
172      You should have received a copy of the GNU General Public License
173      along with this program.  If not, see <http://www.gnu.org/licenses/>.
174 -
175 -    This is all rather complicated.  There are a few combinations:
176 -       * shared libraries full support
177 -       * dynamic libraries present full support (via dlopen)
178 -       * dynamic libraries absent (full support disabled) (via dlopen)
179 -       * discover only
180 -
181 -    We'd love to hear comments...
182 -
183 -    So far, we've opted for maximum flexibility for the user.  Is it
184 -    all worth it?
185  */
186  
187  #include <config.h>
188 @@ -49,9 +38,6 @@
189  static PedSector reiserfs_super_offset[] = { 128, 16, -1 };
190  static PedFileSystemType* reiserfs_type;
191  
192 -#define FPTR
193 -#define FCLASS extern
194 -
195  static PedGeometry *reiserfs_probe(PedGeometry *geom)
196  {
197         int i;
198 diff --git a/libparted/tests/Makefile.am b/libparted/tests/Makefile.am
199 index 9689fb3..7954e91 100644
200 --- a/libparted/tests/Makefile.am
201 +++ b/libparted/tests/Makefile.am
202 @@ -35,5 +35,4 @@ $(TEST_LOGS): prereq
203  TESTS_ENVIRONMENT = \
204    top_srcdir='$(top_srcdir)' \
205    abs_top_srcdir='$(abs_top_srcdir)' \
206 -  DYNAMIC_LOADING=$(DYNAMIC_LOADING) \
207    ENABLE_DEVICE_MAPPER=$(ENABLE_DEVICE_MAPPER)
208 diff --git a/libparted/tests/t2100-zerolen.sh b/libparted/tests/t2100-zerolen.sh
209 index ecd579c..e0e521e 100755
210 --- a/libparted/tests/t2100-zerolen.sh
211 +++ b/libparted/tests/t2100-zerolen.sh
212 @@ -28,9 +28,6 @@ init_root_dir_
213  test "$(uname -s)" = Linux \
214    || skip_ "not on Linux"
215  
216 -test "x$DYNAMIC_LOADING" = xyes \
217 -  || skip_ "no dynamic loading support"
218 -
219  test "x$ENABLE_DEVICE_MAPPER" = xyes \
220    || skip_ "no device-mapper support"
221  
222 diff --git a/parted.spec.in b/parted.spec.in
223 index cd5a99a..bdbe218 100644
224 --- a/parted.spec.in
225 +++ b/parted.spec.in
226 @@ -60,8 +60,7 @@ Parted library, you need to install this package.
227  %endif
228     --enable-part-static \
229     --enable-pc98=no \
230 -   --enable-Werror=no \
231 -   --disable-dynamic-loading
232 +   --enable-Werror=no
233  %{__make} %{?_smp_mflags}
234  
235  %install
236 -- 
237 2.17.1
238
This page took 0.039586 seconds and 3 git commands to generate.