kmod-25_lzip-0.diff 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514
  1. diff -urdN kmod-25.orig/Makefile.am kmod-25/Makefile.am
  2. --- kmod-25.orig/Makefile.am 2018-01-08 22:51:26.000000000 +0100
  3. +++ kmod-25/Makefile.am 2018-04-17 23:55:35.000000000 +0200
  4. @@ -19,7 +19,7 @@
  5. -include $(top_builddir)/config.h \
  6. -I$(top_srcdir) \
  7. -DSYSCONFDIR=\""$(sysconfdir)"\" \
  8. - ${zlib_CFLAGS}
  9. + ${lzlib_CFLAGS} ${zlib_CFLAGS}
  10. AM_CFLAGS = $(OUR_CFLAGS)
  11. AM_LDFLAGS = $(OUR_LDFLAGS)
  12. @@ -33,6 +33,8 @@
  13. -e 's,@includedir\@,$(includedir),g' \
  14. -e 's,@liblzma_CFLAGS\@,${liblzma_CFLAGS},g' \
  15. -e 's,@liblzma_LIBS\@,${liblzma_LIBS},g' \
  16. + -e 's,@lzlib_CFLAGS\@,${lzlib_CFLAGS},g' \
  17. + -e 's,@lzlib_LIBS\@,${lzlib_LIBS},g' \
  18. -e 's,@zlib_CFLAGS\@,${zlib_CFLAGS},g' \
  19. -e 's,@zlib_LIBS\@,${zlib_LIBS},g' \
  20. < $< > $@ || rm $@
  21. @@ -87,7 +89,7 @@
  22. ${top_srcdir}/libkmod/libkmod.sym
  23. libkmod_libkmod_la_LIBADD = \
  24. shared/libshared.la \
  25. - ${liblzma_LIBS} ${zlib_LIBS}
  26. + ${liblzma_LIBS} ${lzlib_LIBS} ${zlib_LIBS}
  27. noinst_LTLIBRARIES += libkmod/libkmod-internal.la
  28. libkmod_libkmod_internal_la_SOURCES = $(libkmod_libkmod_la_SOURCES)
  29. diff -urdN kmod-25.orig/Makefile.in kmod-25/Makefile.in
  30. --- kmod-25.orig/Makefile.in 2018-01-09 02:26:05.000000000 +0100
  31. +++ kmod-25/Makefile.in 2018-04-17 23:55:35.000000000 +0200
  32. @@ -884,6 +884,8 @@
  33. top_build_prefix = @top_build_prefix@
  34. top_builddir = @top_builddir@
  35. top_srcdir = @top_srcdir@
  36. +lzlib_CFLAGS = @lzlib_CFLAGS@
  37. +lzlib_LIBS = @lzlib_LIBS@
  38. zlib_CFLAGS = @zlib_CFLAGS@
  39. zlib_LIBS = @zlib_LIBS@
  40. SUBDIRS = . libkmod/docs $(am__append_1)
  41. @@ -933,7 +935,7 @@
  42. -include $(top_builddir)/config.h \
  43. -I$(top_srcdir) \
  44. -DSYSCONFDIR=\""$(sysconfdir)"\" \
  45. - ${zlib_CFLAGS}
  46. + ${lzlib_CFLAGS} ${zlib_CFLAGS}
  47. AM_CFLAGS = $(OUR_CFLAGS)
  48. AM_LDFLAGS = $(OUR_LDFLAGS)
  49. @@ -946,6 +948,8 @@
  50. -e 's,@includedir\@,$(includedir),g' \
  51. -e 's,@liblzma_CFLAGS\@,${liblzma_CFLAGS},g' \
  52. -e 's,@liblzma_LIBS\@,${liblzma_LIBS},g' \
  53. + -e 's,@lzlib_CFLAGS\@,${lzlib_CFLAGS},g' \
  54. + -e 's,@lzlib_LIBS\@,${lzlib_LIBS},g' \
  55. -e 's,@zlib_CFLAGS\@,${zlib_CFLAGS},g' \
  56. -e 's,@zlib_LIBS\@,${zlib_LIBS},g' \
  57. < $< > $@ || rm $@
  58. @@ -993,7 +997,7 @@
  59. libkmod_libkmod_la_LIBADD = \
  60. shared/libshared.la \
  61. - ${liblzma_LIBS} ${zlib_LIBS}
  62. + ${liblzma_LIBS} ${lzlib_LIBS} ${zlib_LIBS}
  63. libkmod_libkmod_internal_la_SOURCES = $(libkmod_libkmod_la_SOURCES)
  64. libkmod_libkmod_internal_la_LDFLAGS = $(AM_LDFLAGS) \
  65. diff -urdN kmod-25.orig/README kmod-25/README
  66. --- kmod-25.orig/README 2017-12-07 23:05:47.000000000 +0100
  67. +++ kmod-25/README 2018-04-17 23:55:35.000000000 +0200
  68. @@ -51,6 +51,7 @@
  69. Optional dependencies:
  70. - ZLIB library
  71. + - LZLIB library
  72. - LZMA library
  73. Typical configuration:
  74. diff -urdN kmod-25.orig/config.h.in kmod-25/config.h.in
  75. --- kmod-25.orig/config.h.in 2018-01-09 02:31:04.000000000 +0100
  76. +++ kmod-25/config.h.in 2018-04-17 23:55:35.000000000 +0200
  77. @@ -12,6 +12,9 @@
  78. /* Enable Xz for modules. */
  79. #undef ENABLE_XZ
  80. +/* Enable lzlib for modules. */
  81. +#undef ENABLE_LZLIB
  82. +
  83. /* Enable zlib for modules. */
  84. #undef ENABLE_ZLIB
  85. diff -urdN kmod-25.orig/configure kmod-25/configure
  86. --- kmod-25.orig/configure 2018-01-09 02:26:04.000000000 +0100
  87. +++ kmod-25/configure 2018-04-17 23:55:35.000000000 +0200
  88. @@ -688,6 +688,8 @@
  89. bashcompletiondir
  90. zlib_LIBS
  91. zlib_CFLAGS
  92. +lzlib_LIBS
  93. +lzlib_CFLAGS
  94. liblzma_LIBS
  95. liblzma_CFLAGS
  96. rootlibdir
  97. @@ -833,6 +835,7 @@
  98. enable_libtool_lock
  99. with_rootlibdir
  100. with_xz
  101. +with_lzlib
  102. with_zlib
  103. with_bashcompletiondir
  104. enable_experimental
  105. @@ -863,6 +866,8 @@
  106. PKG_CONFIG_LIBDIR
  107. liblzma_CFLAGS
  108. liblzma_LIBS
  109. +lzlib_CFLAGS
  110. +lzlib_LIBS
  111. zlib_CFLAGS
  112. zlib_LIBS
  113. PYTHON
  114. @@ -1532,6 +1537,7 @@
  115. compiler's sysroot if not specified).
  116. --with-rootlibdir=DIR rootfs directory to install shared libraries
  117. --with-xz handle Xz-compressed modules [default=disabled]
  118. + --with-lzlib handle lzipped modules [default=disabled]
  119. --with-zlib handle gzipped modules [default=disabled]
  120. --with-bashcompletiondir=DIR
  121. Bash completions directory
  122. @@ -1557,6 +1563,9 @@
  123. C compiler flags for liblzma, overriding pkg-config
  124. liblzma_LIBS
  125. linker flags for liblzma, overriding pkg-config
  126. + lzlib_CFLAGS
  127. + C compiler flags for lzlib, overriding pkg-config
  128. + lzlib_LIBS linker flags for lzlib, overriding pkg-config
  129. zlib_CFLAGS C compiler flags for zlib, overriding pkg-config
  130. zlib_LIBS linker flags for zlib, overriding pkg-config
  131. PYTHON the Python interpreter
  132. @@ -13751,6 +13760,142 @@
  133. +# Check whether --with-lzlib was given.
  134. +if test "${with_lzlib+set}" = set; then :
  135. + withval=$with_lzlib;
  136. +else
  137. + with_lzlib=no
  138. +fi
  139. +
  140. +if test "x$with_lzlib" != "xno"; then :
  141. +
  142. +
  143. +pkg_failed=no
  144. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzlib" >&5
  145. +$as_echo_n "checking for lzlib... " >&6; }
  146. +
  147. +if test -n "$lzlib_CFLAGS"; then
  148. + pkg_cv_lzlib_CFLAGS="$lzlib_CFLAGS"
  149. + elif test -n "$PKG_CONFIG"; then
  150. + if test -n "$PKG_CONFIG" && \
  151. + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lzlib\""; } >&5
  152. + ($PKG_CONFIG --exists --print-errors "lzlib") 2>&5
  153. + ac_status=$?
  154. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  155. + test $ac_status = 0; }; then
  156. + pkg_cv_lzlib_CFLAGS=`$PKG_CONFIG --cflags "lzlib" 2>/dev/null`
  157. + test "x$?" != "x0" && pkg_failed=yes
  158. +else
  159. + pkg_failed=yes
  160. +fi
  161. + else
  162. + pkg_failed=untried
  163. +fi
  164. +if test -n "$lzlib_LIBS"; then
  165. + pkg_cv_lzlib_LIBS="$lzlib_LIBS"
  166. + elif test -n "$PKG_CONFIG"; then
  167. + if test -n "$PKG_CONFIG" && \
  168. + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lzlib\""; } >&5
  169. + ($PKG_CONFIG --exists --print-errors "lzlib") 2>&5
  170. + ac_status=$?
  171. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  172. + test $ac_status = 0; }; then
  173. + pkg_cv_lzlib_LIBS=`$PKG_CONFIG --libs "lzlib" 2>/dev/null`
  174. + test "x$?" != "x0" && pkg_failed=yes
  175. +else
  176. + pkg_failed=yes
  177. +fi
  178. + else
  179. + pkg_failed=untried
  180. +fi
  181. +
  182. +
  183. +
  184. +if test $pkg_failed = yes; then
  185. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  186. +$as_echo "no" >&6; }
  187. +
  188. +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  189. + _pkg_short_errors_supported=yes
  190. +else
  191. + _pkg_short_errors_supported=no
  192. +fi
  193. + if test $_pkg_short_errors_supported = yes; then
  194. + lzlib_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lzlib" 2>&1`
  195. + else
  196. + lzlib_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lzlib" 2>&1`
  197. + fi
  198. + # Put the nasty error message in config.log where it belongs
  199. + echo "$lzlib_PKG_ERRORS" >&5
  200. +
  201. + as_fn_error $? "Package requirements (lzlib) were not met:
  202. +
  203. +$lzlib_PKG_ERRORS
  204. +
  205. +Consider adjusting the PKG_CONFIG_PATH environment variable if you
  206. +installed software in a non-standard prefix.
  207. +
  208. +Alternatively, you may set the environment variables lzlib_CFLAGS
  209. +and lzlib_LIBS to avoid the need to call pkg-config.
  210. +See the pkg-config man page for more details." "$LINENO" 5
  211. +elif test $pkg_failed = untried; then
  212. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  213. +$as_echo "no" >&6; }
  214. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  215. +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  216. +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
  217. +is in your PATH or set the PKG_CONFIG environment variable to the full
  218. +path to pkg-config.
  219. +
  220. +Alternatively, you may set the environment variables lzlib_CFLAGS
  221. +and lzlib_LIBS to avoid the need to call pkg-config.
  222. +See the pkg-config man page for more details.
  223. +
  224. +To get pkg-config, see <http://pkg-config.freedesktop.org/>.
  225. +See \`config.log' for more details" "$LINENO" 5; }
  226. +else
  227. + lzlib_CFLAGS=$pkg_cv_lzlib_CFLAGS
  228. + lzlib_LIBS=$pkg_cv_lzlib_LIBS
  229. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  230. +$as_echo "yes" >&6; }
  231. +
  232. +fi
  233. +
  234. +$as_echo "#define ENABLE_LZLIB 1" >>confdefs.h
  235. +
  236. +
  237. +else
  238. +
  239. + { $as_echo "$as_me:${as_lineno-$LINENO}: lzlib support not requested" >&5
  240. +$as_echo "$as_me: lzlib support not requested" >&6;}
  241. +
  242. +fi
  243. +
  244. +
  245. + case " $with_features " in #(
  246. + *" LZLIB "*) :
  247. + { { $as_echo "$as_me:${as_lineno-$LINENO}: : with_features already contains LZLIB"; } >&5
  248. + (: with_features already contains LZLIB) 2>&5
  249. + ac_status=$?
  250. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  251. + test $ac_status = 0; } ;; #(
  252. + *) :
  253. +
  254. + if test "x$with_features" != "x"; then :
  255. + as_fn_append with_features " "
  256. +fi
  257. + if test "x$with_lzlib" = "xyes"; then :
  258. + as_fn_append with_features "+LZLIB"
  259. +else
  260. + as_fn_append with_features "-LZLIB"
  261. +fi
  262. +
  263. + ;;
  264. +esac
  265. +
  266. +
  267. +
  268. +
  269. # Check whether --with-zlib was given.
  270. if test "${with_zlib+set}" = set; then :
  271. withval=$with_zlib;
  272. @@ -17499,7 +17644,7 @@
  273. tools: ${enable_tools}
  274. python bindings: ${enable_python}
  275. logging: ${enable_logging}
  276. - compression: xz=${with_xz} zlib=${with_zlib}
  277. + compression: xz=${with_xz} lzlib=${with_lzlib} zlib=${with_zlib}
  278. debug: ${enable_debug}
  279. coverage: ${enable_coverage}
  280. doc: ${enable_gtk_doc}
  281. @@ -17528,7 +17673,7 @@
  282. tools: ${enable_tools}
  283. python bindings: ${enable_python}
  284. logging: ${enable_logging}
  285. - compression: xz=${with_xz} zlib=${with_zlib}
  286. + compression: xz=${with_xz} lzlib=${with_lzlib} zlib=${with_zlib}
  287. debug: ${enable_debug}
  288. coverage: ${enable_coverage}
  289. doc: ${enable_gtk_doc}
  290. diff -urdN kmod-25.orig/configure.ac kmod-25/configure.ac
  291. --- kmod-25.orig/configure.ac 2018-01-08 22:51:04.000000000 +0100
  292. +++ kmod-25/configure.ac 2018-04-17 23:55:35.000000000 +0200
  293. @@ -95,6 +95,17 @@
  294. ])
  295. CC_FEATURE_APPEND([with_features], [with_xz], [XZ])
  296. +AC_ARG_WITH([lzlib],
  297. + AS_HELP_STRING([--with-lzlib], [handle lzipped modules @<:@default=disabled@:>@]),
  298. + [], [with_lzlib=no])
  299. +AS_IF([test "x$with_lzlib" != "xno"], [
  300. + PKG_CHECK_MODULES([lzlib], [lzlib])
  301. + AC_DEFINE([ENABLE_LZLIB], [1], [Enable lzlib for modules.])
  302. +], [
  303. + AC_MSG_NOTICE([lzlib support not requested])
  304. +])
  305. +CC_FEATURE_APPEND([with_features], [with_lzlib], [LZLIB])
  306. +
  307. AC_ARG_WITH([zlib],
  308. AS_HELP_STRING([--with-zlib], [handle gzipped modules @<:@default=disabled@:>@]),
  309. [], [with_zlib=no])
  310. @@ -297,7 +308,7 @@
  311. tools: ${enable_tools}
  312. python bindings: ${enable_python}
  313. logging: ${enable_logging}
  314. - compression: xz=${with_xz} zlib=${with_zlib}
  315. + compression: xz=${with_xz} lzlib=${with_lzlib} zlib=${with_zlib}
  316. debug: ${enable_debug}
  317. coverage: ${enable_coverage}
  318. doc: ${enable_gtk_doc}
  319. diff -urdN kmod-25.orig/libkmod/docs/Makefile.in kmod-25/libkmod/docs/Makefile.in
  320. --- kmod-25.orig/libkmod/docs/Makefile.in 2018-01-09 02:26:05.000000000 +0100
  321. +++ kmod-25/libkmod/docs/Makefile.in 2018-04-18 22:57:17.000000000 +0200
  322. @@ -304,6 +304,8 @@
  323. top_build_prefix = @top_build_prefix@
  324. top_builddir = @top_builddir@
  325. top_srcdir = @top_srcdir@
  326. +lzlib_CFLAGS = @lzlib_CFLAGS@
  327. +lzlib_LIBS = @lzlib_LIBS@
  328. zlib_CFLAGS = @zlib_CFLAGS@
  329. zlib_LIBS = @zlib_LIBS@
  330. AUTOMAKE_OPTIONS = 1.11
  331. diff -urdN kmod-25.orig/libkmod/libkmod-file.c kmod-25/libkmod/libkmod-file.c
  332. --- kmod-25.orig/libkmod/libkmod-file.c 2017-12-07 23:05:47.000000000 +0100
  333. +++ kmod-25/libkmod/libkmod-file.c 2018-04-18 23:14:10.000000000 +0200
  334. @@ -34,6 +34,9 @@
  335. #endif
  336. #include <shared/util.h>
  337. +#ifdef ENABLE_LZLIB
  338. +#include <lzlib.h>
  339. +#endif
  340. #include "libkmod.h"
  341. #include "libkmod-internal.h"
  342. @@ -48,6 +51,9 @@
  343. #ifdef ENABLE_XZ
  344. bool xz_used;
  345. #endif
  346. +#ifdef ENABLE_LZLIB
  347. + bool lz_used;
  348. +#endif
  349. #ifdef ENABLE_ZLIB
  350. gzFile gzf;
  351. #endif
  352. @@ -169,6 +175,88 @@
  353. static const char magic_xz[] = {0xfd, '7', 'z', 'X', 'Z', 0};
  354. #endif
  355. +#ifdef ENABLE_LZLIB
  356. +#ifndef min
  357. + #define min(x,y) ((x) <= (y) ? (x) : (y))
  358. +#endif
  359. +
  360. +static int load_lzlib(struct kmod_file *file)
  361. +{
  362. + uint8_t in_buf[16384];
  363. + int err = 0;
  364. + off_t did = 0, total = 0;
  365. + _cleanup_free_ unsigned char *p = NULL;
  366. +
  367. + struct LZ_Decoder *lzd = LZ_decompress_open();
  368. + if (!lzd || LZ_decompress_errno( lzd ) != LZ_ok)
  369. + { LZ_decompress_close(lzd); return -ENOMEM; }
  370. +
  371. + for (;;) {
  372. + int rd;
  373. + const int size = min(LZ_decompress_write_size(lzd),
  374. + (int)sizeof in_buf);
  375. +
  376. + if (did == total) {
  377. + const int realloc_step = 4 * 1024 * 1024;
  378. + void *tmp = realloc(p, total + realloc_step);
  379. + if (tmp == NULL) {
  380. + err = -ENOMEM;
  381. + goto error;
  382. + }
  383. + total += realloc_step;
  384. + p = tmp;
  385. + }
  386. +
  387. + if (size > 0) {
  388. + rd = read(file->fd, in_buf, size);
  389. + if (rd < 0) {
  390. + err = -errno;
  391. + goto error;
  392. + }
  393. + if (rd == 0)
  394. + LZ_decompress_finish(lzd);
  395. + else if (LZ_decompress_write(lzd, in_buf, rd) != rd) {
  396. + err = -EINVAL;
  397. + goto error;
  398. + }
  399. + }
  400. + rd = LZ_decompress_read(lzd, p + did, total - did);
  401. + if (rd < 0) {
  402. + const char *lz_errmsg =
  403. + LZ_strerror(LZ_decompress_errno(lzd));
  404. +
  405. + ERR(file->ctx, "lzip: %s\n", lz_errmsg);
  406. + err = -EINVAL;
  407. + goto error;
  408. + }
  409. + did += rd;
  410. + if (LZ_decompress_finished(lzd) == 1)
  411. + break;
  412. + }
  413. +
  414. + if (LZ_decompress_close(lzd) < 0)
  415. + return -EINVAL;
  416. + file->lz_used = true;
  417. + file->memory = p;
  418. + file->size = did;
  419. + p = NULL;
  420. + return 0;
  421. +
  422. +error:
  423. + LZ_decompress_close(lzd);
  424. + return err;
  425. +}
  426. +
  427. +static void unload_lzlib(struct kmod_file *file)
  428. +{
  429. + if (!file->lz_used)
  430. + return;
  431. + free(file->memory);
  432. +}
  433. +
  434. +static const char magic_lzlib[] = { 0x4C, 0x5A, 0x49, 0x50 }; /* "LZIP" */
  435. +#endif
  436. +
  437. #ifdef ENABLE_ZLIB
  438. #define READ_STEP (4 * 1024 * 1024)
  439. static int load_zlib(struct kmod_file *file)
  440. @@ -241,6 +329,9 @@
  441. #ifdef ENABLE_XZ
  442. {sizeof(magic_xz), magic_xz, {load_xz, unload_xz}},
  443. #endif
  444. +#ifdef ENABLE_LZLIB
  445. + {sizeof(magic_lzlib), magic_lzlib, {load_lzlib, unload_lzlib}},
  446. +#endif
  447. #ifdef ENABLE_ZLIB
  448. {sizeof(magic_zlib), magic_zlib, {load_zlib, unload_zlib}},
  449. #endif
  450. diff -urdN kmod-25.orig/libkmod/libkmod.pc.in kmod-25/libkmod/libkmod.pc.in
  451. --- kmod-25.orig/libkmod/libkmod.pc.in 2013-04-24 22:02:37.000000000 +0200
  452. +++ kmod-25/libkmod/libkmod.pc.in 2018-04-18 22:57:17.000000000 +0200
  453. @@ -7,5 +7,5 @@
  454. Description: Library to deal with kernel modules
  455. Version: @VERSION@
  456. Libs: -L${libdir} -lkmod
  457. -Libs.private: @liblzma_LIBS@ @zlib_LIBS@
  458. +Libs.private: @liblzma_LIBS@ @lzlib_LIBS@ @zlib_LIBS@
  459. Cflags: -I${includedir}
  460. diff -urdN kmod-25.orig/man/Makefile.in kmod-25/man/Makefile.in
  461. --- kmod-25.orig/man/Makefile.in 2018-01-09 02:26:05.000000000 +0100
  462. +++ kmod-25/man/Makefile.in 2018-04-18 22:57:17.000000000 +0200
  463. @@ -307,6 +307,8 @@
  464. top_build_prefix = @top_build_prefix@
  465. top_builddir = @top_builddir@
  466. top_srcdir = @top_srcdir@
  467. +lzlib_CFLAGS = @lzlib_CFLAGS@
  468. +lzlib_LIBS = @lzlib_LIBS@
  469. zlib_CFLAGS = @zlib_CFLAGS@
  470. zlib_LIBS = @zlib_LIBS@
  471. MAN5 = depmod.d.5 modprobe.d.5 modules.dep.5
  472. diff -urdN kmod-25.orig/shared/util.c kmod-25/shared/util.c
  473. --- kmod-25.orig/shared/util.c 2017-12-07 23:05:47.000000000 +0100
  474. +++ kmod-25/shared/util.c 2018-04-18 22:57:17.000000000 +0200
  475. @@ -43,6 +43,9 @@
  476. #ifdef ENABLE_ZLIB
  477. {".ko.gz", sizeof(".ko.gz") - 1},
  478. #endif
  479. +#ifdef ENABLE_LZLIB
  480. + {".ko.lz", sizeof(".ko.lz") - 1},
  481. +#endif
  482. #ifdef ENABLE_XZ
  483. {".ko.xz", sizeof(".ko.xz") - 1},
  484. #endif
  485. diff -urdN kmod-25.orig/testsuite/test-util.c kmod-25/testsuite/test-util.c
  486. --- kmod-25.orig/testsuite/test-util.c 2017-12-07 23:05:47.000000000 +0100
  487. +++ kmod-25/testsuite/test-util.c 2018-04-18 22:57:17.000000000 +0200
  488. @@ -154,6 +154,9 @@
  489. #ifdef ENABLE_ZLIB
  490. { "/bla.ko.gz", true },
  491. #endif
  492. +#ifdef ENABLE_LZLIB
  493. + { "/bla.ko.lz", true },
  494. +#endif
  495. #ifdef ENABLE_XZ
  496. { "/bla.ko.xz", true },
  497. #endif