Skip to content

Commit 72d8c6b

Browse files
committed
[build] remove libuuid dependency (fixes #1056)
x-ref: "libuuid - non-portabile configure.in" https://redmine.lighttpd.net/issues/1056
1 parent 3dbe74c commit 72d8c6b

12 files changed

+25
-110
lines changed

.github/workflows/pr.yml

+10-11
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
libsasl2-dev libkrb5-dev libdbi-dev libpam-dev libldap-dev \
3030
libmariadb-dev libpq-dev \
3131
libmaxminddb-dev libunwind-dev liblua5.1-0-dev liblua5.4-dev \
32-
libxml2-dev uuid-dev libsqlite3-dev
32+
libxml2-dev libsqlite3-dev
3333
- name: Compile and Test
3434
run: |
3535
set -e
@@ -60,7 +60,7 @@ jobs:
6060
libsasl2-dev libkrb5-dev libdbi-dev libpam-dev libldap-dev \
6161
libmariadb-dev libpq-dev \
6262
libmaxminddb-dev libunwind-dev liblua5.1-0-dev liblua5.4-dev \
63-
libxml2-dev uuid-dev libsqlite3-dev
63+
libxml2-dev libsqlite3-dev
6464
- name: Compile and Test
6565
run: |
6666
set -e
@@ -81,7 +81,7 @@ jobs:
8181
mariadb-connector-c libpq \
8282
brotli libdeflate zlib zstd \
8383
libmaxminddb lua \
84-
libxml2 ossp-uuid sqlite
84+
libxml2 sqlite
8585
# autoconf automake libtool m4 cmake scons
8686
- name: Compile and Test
8787
run: |
@@ -120,7 +120,7 @@ jobs:
120120
mariadb1011-client postgresql16-client \
121121
brotli libdeflate zstd \
122122
libmaxminddb libunwind lua51 lua54 \
123-
e2fsprogs-libuuid libxml2 sqlite3
123+
libxml2 sqlite3
124124
run: |
125125
set -e
126126
cd "${{github.workspace}}" && scripts/ci-build.sh meson
@@ -142,7 +142,7 @@ jobs:
142142
mariadb-client postgresql16-client \
143143
brotli libdeflate zlib zstd \
144144
libmaxminddb libunwind lua51 lua54 \
145-
libuuid libxml2 sqlite3
145+
libxml2 sqlite3
146146
# autoconf automake gmake libtool m4 meson py311-scons
147147
run: |
148148
set -e
@@ -163,7 +163,7 @@ jobs:
163163
mariadb-client postgresql-client \
164164
brotli libdeflate zstd \
165165
libmaxminddb lua--%5.1 lua--%5.4 \
166-
e2fsprogs ossp-uuid libxml sqlite3
166+
libxml sqlite3
167167
# autoconf automake cmake gmake libtool m4 scons
168168
run: |
169169
set -e
@@ -210,7 +210,7 @@ jobs:
210210
libsasl2-devel libkrb5-devel libdbi-devel openldap-devel
211211
libmariadb-devel libpq-devel
212212
libmaxminddb-devel libunwind-devel lua-devel lua5.1-devel
213-
libxml2-devel libuuid-devel libsqlite3-devel
213+
libxml2-devel libsqlite3-devel
214214
libintl-devel
215215
- name: Update
216216
shell: powershell
@@ -263,7 +263,7 @@ jobs:
263263
with:
264264
msystem: ${{matrix.platform}}
265265
update: true
266-
install: git m4 libuuid-devel
266+
install: git m4
267267
pacboy: >-
268268
cc:p autotools:p libtool:p make:p pcre2:p pkgconf:p
269269
nettle:p gnutls:p mbedtls:p nss:p openssl:p
@@ -273,14 +273,13 @@ jobs:
273273
libmaxminddb:p libunwind:p lua51:p lua:p luajit:p
274274
libxml2:p sqlite3:p
275275
# heimdal-devel: available only on platform: msys (?)
276-
# libuuid-devel: available only on platform: msys (?) static lib.a
277276
- name: Compile and Test
278277
shell: msys2 {0}
279278
run: |
280279
set -e
281280
# NO_GNUTLS=1 gnutls/socket.h can not find <sys/socket.h>
282281
# NO_MYSQL=1 build not finding mysql_config
283-
export NO_DBI=1 NO_GNUTLS=1 NO_KRB5=1 NO_MYSQL=1 NO_PAM=1 NO_UNWIND=1 NO_UUID=1 NO_WOLFSSL=1
282+
export NO_DBI=1 NO_GNUTLS=1 NO_KRB5=1 NO_MYSQL=1 NO_PAM=1 NO_UNWIND=1 NO_WOLFSSL=1
284283
cd "${{github.workspace}}" && scripts/ci-build.sh autobuild
285284
286285
Linux-alpine-x86_64:
@@ -306,7 +305,7 @@ jobs:
306305
cyrus-sasl-dev krb5-dev libdbi-dev linux-pam-dev openldap-dev
307306
mariadb-connector-c-dev postgresql16-dev
308307
libmaxminddb-dev libunwind-dev lua5.1-dev lua5.4-dev
309-
libxml2-dev ossp-uuid-dev sqlite-dev
308+
libxml2-dev sqlite-dev
310309
zlib-static openssl-libs-static
311310
- name: Compile and Test
312311
shell: alpine.sh {0}

INSTALL

+1-3
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ optional packages for optional features ::
7878
libpq # Postgresql ./configure --with-pgsql
7979
libpq-devel
8080
libunwind-devel # libunwind ./configure --with-libunwind
81-
libuuid # libuuid ./configure --with-webdav-locks
82-
libuuid-devel
8381
libxml2 # libxml2 ./configure --with-webdav-props
8482
libxml2-devel
8583
libxml2-static
@@ -188,7 +186,7 @@ build using CMake and Xcode on Mac OS X with MacPorts
188186
$ xcodebuild --license
189187
$ xcode-select --install
190188
$ sudo port selfupdate
191-
$ sudo port install autoconf automake cmake libtool m4 pcre2 pkgconfig zlib zstd brotli openssl libxml sqlite3 openldap libunwind libunwind-headers mysql57 openldap ossp-uuid
189+
$ sudo port install autoconf automake cmake libtool m4 pcre2 pkgconfig zlib zstd brotli openssl libxml sqlite3 openldap libunwind libunwind-headers mysql57 openldap
192190
# Note: some of the above require more fiddling to configure with CMake...
193191

194192
# cmake and build

README.FreeBSD

+2-4
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@ FreeBSD dependencies:
2323
pkg install lua51 (or lua52 or lua53 or lua54)
2424
- LDAP (mod_auth feature)
2525
pkg install openldap-client
26-
- SQLite3 (required for most mod_webdav features)
26+
- SQLite3 (mod_webdav WebDAV properties and locking)
2727
pkg install sqlite3
28-
- XML (mod_webdav properties and locking)
28+
- XML (mod_webdav WebDAV properties and locking)
2929
pkg install libxml2
30-
- UUID library (mod_webdav locking)
31-
pkg install e2fsprogs-libuuid
3230

3331
Configure:
3432

SConstruct

+1-10
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ vars.AddVariables(
264264
PackageVariable('with_pgsql', 'enable pgsql support', 'no'),
265265
PackageVariable('with_sasl', 'enable SASL support', 'no'),
266266
BoolVariable('with_sqlite3', 'enable sqlite3 support (required for webdav props)', 'no'),
267-
BoolVariable('with_uuid', 'enable uuid support (required for webdav locks)', 'no'),
267+
BoolVariable('with_uuid', 'enable uuid support (obsolete flag; ignored)', 'no'),
268268
# with_valgrind not supported
269269
# with_xattr not supported
270270
PackageVariable('with_xml', 'enable xml support (required for webdav props)', 'no'),
@@ -355,7 +355,6 @@ if 1:
355355
LIBSQLITE3 = '',
356356
LIBSSL = '',
357357
LIBSSLCRYPTO = '',
358-
LIBUUID = '',
359358
LIBWOLFSSL = '',
360359
LIBX509 = '',
361360
LIBXML2 = '',
@@ -698,14 +697,6 @@ if 1:
698697
LIBSQLITE3 = 'sqlite3',
699698
)
700699

701-
if env['with_uuid']:
702-
if not autoconf.CheckLibWithHeader('uuid', 'uuid/uuid.h', 'C'):
703-
fail("Couldn't find uuid")
704-
autoconf.env.Append(
705-
CPPFLAGS = [ '-DHAVE_UUID_UUID_H', '-DHAVE_LIBUUID' ],
706-
LIBUUID = 'uuid',
707-
)
708-
709700
if env['with_xml']:
710701
xml2_config = autoconf.checkProgram('xml', 'xml2-config')
711702
if not autoconf.CheckParseConfigForLib('LIBXML2', xml2_config + ' --cflags --libs'):

configure.ac

+5-33
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ AC_CHECK_HEADERS([\
120120
sys/uio.h \
121121
sys/un.h \
122122
syslog.h \
123-
uuid/uuid.h \
124123
])
125124

126125
dnl Checks for typedefs, structures, and compiler characteristics.
@@ -1219,7 +1218,7 @@ if test "$WITH_WEBDAV_PROPS" != no; then
12191218
fi
12201219

12211220

1222-
dnl webdav locks (uuid)
1221+
dnl webdav locks (uuid) (obsolete flag; ignored in build)
12231222
AC_MSG_NOTICE([----------------------------------------])
12241223
AC_MSG_CHECKING([for locks in mod_webdav])
12251224
AC_ARG_WITH([webdav-locks],
@@ -1231,39 +1230,12 @@ AC_ARG_WITH([webdav-locks],
12311230
)
12321231
AC_MSG_RESULT([$WITH_WEBDAV_LOCKS])
12331232

1234-
if test "$WITH_WEBDAV_LOCKS" != no; then
1235-
if test "$WITH_WEBDAV_PROPS" = no; then
1233+
if test "$WITH_WEBDAV_PROPS" = no; then
1234+
if test "$WITH_WEBDAV_LOCKS" != no; then
12361235
AC_MSG_ERROR([--with-webdav-locks requires --with-webdav-props])
12371236
fi
1238-
1239-
AC_MSG_CHECKING([for libuuid])
1240-
AC_ARG_WITH([uuid],
1241-
[AS_HELP_STRING([--with-uuid], [uuid for locks in mod_webdav])],
1242-
[WITH_UUID=$withval],
1243-
[WITH_UUID=yes]
1244-
)
1245-
AC_MSG_RESULT([$WITH_UUID])
1246-
1247-
if test "$WITH_UUID" = no; then
1248-
AC_MSG_ERROR([--with-webdav-locks requires uuid])
1249-
fi
1250-
1251-
if test "$WITH_UUID" != yes; then
1252-
UUID_LIBS="-L$WITH_UUID -luuid"
1253-
CPPFLAGS="$CPPFLAGS -I$WITH_UUID"
1254-
else
1255-
AC_CHECK_LIB([uuid], [uuid_unparse],
1256-
[UUID_LIBS=-luuid],
1257-
[AC_MSG_ERROR([uuid lib not found, install it or build without --with-webdav-locks])]
1258-
)
1259-
AC_CHECK_HEADERS([uuid/uuid.h], [],
1260-
[AC_MSG_ERROR([uuid headers not found, install them or build without --with-webdav-locks])]
1261-
)
1262-
fi
1263-
1264-
AC_DEFINE([HAVE_LIBUUID], [1], [libuuid])
1265-
AC_DEFINE([HAVE_UUID_UUID_H], [1], [uuid/uuid.h is available])
1266-
AC_SUBST([UUID_LIBS])
1237+
else
1238+
WITH_WEBDAV_LOCKS="yes"
12671239
fi
12681240

12691241
dnl xxhash

meson_options.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ option('with_sasl',
117117
option('with_webdav_locks',
118118
type: 'feature',
119119
value: 'disabled',
120-
description: 'locks in webdav [default: off]',
120+
description: 'locks in webdav (obsolete flag; ignored) [default: off]',
121121
)
122122
option('with_webdav_props',
123123
type: 'feature',

scripts/ci-build.sh

-6
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ ${WITH_SASL:=true}
4040
${WITH_UNWIND:=true}
4141
[ -n "$NO_UNWIND" ] && unset WITH_UNWIND
4242

43-
${WITH_UUID:=true}
44-
[ -n "$NO_UUID" ] && unset WITH_UUID
45-
4643
sysname="$(uname -s)"
4744

4845
if [ "$sysname" = "FreeBSD" ]; then
@@ -85,7 +82,6 @@ case "${build}" in
8582
--with-nss \
8683
--with-openssl \
8784
${WITH_WOLFSSL:+--with-wolfssl} \
88-
${WITH_UUID:+--with-webdav-locks} \
8985
--with-webdav-props
9086
case "${build}" in
9187
"autobuild")
@@ -131,7 +127,6 @@ case "${build}" in
131127
-DWITH_NSS=ON \
132128
-DWITH_OPENSSL=ON \
133129
${WITH_WOLFSSL:+-DWITH_WOLFSSL=ON} \
134-
${WITH_UUID:+-DWITH_WEBDAV_LOCKS=ON} \
135130
-DWITH_WEBDAV_PROPS=ON \
136131
..
137132
make -j 4 VERBOSE=1
@@ -159,7 +154,6 @@ case "${build}" in
159154
-Dwith_pcre2=true \
160155
${WITH_PGSQL:+-Dwith_pgsql=enabled} \
161156
${WITH_SASL:+-Dwith_sasl=enabled} \
162-
${WITH_UUID:+-Dwith_webdav_locks=enabled} \
163157
-Dwith_webdav_props=enabled \
164158
${WITH_WOLFSSL:+-Dwith_wolfssl=true} \
165159
-Dwith_zlib=enabled \

src/CMakeLists.txt

+1-24
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ option(WITH_NETTLE "with Nettle-support [default: off]")
2828
option(WITH_PCRE2 "with regex support [default: on]" ON)
2929
option(WITH_PCRE "with regex support [default: off]")
3030
option(WITH_WEBDAV_PROPS "with property-support for mod_webdav [default: off]")
31-
option(WITH_WEBDAV_LOCKS "locks in webdav [default: off]")
31+
option(WITH_WEBDAV_LOCKS "locks in webdav (obsolete flag; ignored) [default: off]")
3232
option(WITH_BROTLI "with brotli-support for mod_deflate [default: off]")
3333
option(WITH_BZIP "with bzip2-support for mod_deflate [default: off]")
3434
option(WITH_ZLIB "with deflate-support for mod_deflate [default: on]" ON)
@@ -99,10 +99,6 @@ if(WITH_WEBDAV_PROPS)
9999
set(WITH_SQLITE3 1)
100100
endif()
101101

102-
if(WITH_WEBDAV_LOCKS)
103-
set(WITH_UUID 1)
104-
endif()
105-
106102
check_include_files(sys/inotify.h HAVE_SYS_INOTIFY_H)
107103
set(CMAKE_REQUIRED_FLAGS "-include sys/time.h")
108104
check_include_files(sys/loadavg.h HAVE_SYS_LOADAVG_H)
@@ -679,20 +675,6 @@ else()
679675
unset(HAVE_SQLITE3)
680676
endif()
681677

682-
if(WITH_UUID)
683-
check_include_files(uuid/uuid.h HAVE_UUID_UUID_H)
684-
check_library_exists(uuid uuid_generate "" NEED_LIBUUID)
685-
if(NOT NEED_LIBUUID)
686-
check_function_exists(uuid_generate HAVE_LIBUUID)
687-
else()
688-
set(HAVE_LIBUUID 1)
689-
endif()
690-
else()
691-
unset(HAVE_UUID_UUID_H)
692-
unset(NEED_LIBUUID)
693-
unset(HAVE_LIBUUID)
694-
endif()
695-
696678
if(WITH_XXHASH)
697679
check_include_files(xxhash.h HAVE_XXHASH_H)
698680
check_library_exists(xxhash XXH_versionNumber "" HAVE_XXHASH)
@@ -1074,11 +1056,6 @@ endif()
10741056
if(HAVE_LIBXML_H)
10751057
target_link_libraries(mod_webdav ${XML2_LDFLAGS})
10761058
endif()
1077-
if(HAVE_UUID_UUID_H)
1078-
if(NEED_LIBUUID)
1079-
set(L_MOD_WEBDAV ${L_MOD_WEBDAV} uuid)
1080-
endif()
1081-
endif()
10821059

10831060
target_link_libraries(mod_webdav ${L_MOD_WEBDAV})
10841061
if(BUILD_STATIC)

src/Makefile.am

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ lib_LTLIBRARIES += mod_webdav.la
138138
mod_webdav_la_SOURCES = mod_webdav.c
139139
mod_webdav_la_CFLAGS = $(AM_CFLAGS) $(XML_CFLAGS) $(SQLITE_CFLAGS)
140140
mod_webdav_la_LDFLAGS = $(common_module_ldflags)
141-
mod_webdav_la_LIBADD = $(common_libadd) $(XML_LIBS) $(SQLITE_LIBS) $(UUID_LIBS) $(ELFTC_LIB)
141+
mod_webdav_la_LIBADD = $(common_libadd) $(XML_LIBS) $(SQLITE_LIBS) $(ELFTC_LIB)
142142

143143
if BUILD_WITH_LUA
144144
lib_LTLIBRARIES += mod_magnet.la
@@ -420,7 +420,7 @@ lighttpd_CPPFLAGS = \
420420
lighttpd_LDADD = \
421421
$(common_libadd) \
422422
$(CRYPT_LIB) $(CRYPTO_LIB) $(XXHASH_LIBS) \
423-
$(XML_LIBS) $(SQLITE_LIBS) $(UUID_LIBS) $(ELFTC_LIB) \
423+
$(XML_LIBS) $(SQLITE_LIBS) $(ELFTC_LIB) \
424424
$(PCRE_LIB) $(Z_LIB) $(ZSTD_LIB) $(BZ_LIB) $(BROTLI_LIBS) $(DEFLATE_LIBS) \
425425
$(DL_LIB) $(SENDFILE_LIB) $(ATTR_LIB) \
426426
$(FAM_LIBS) $(LIBEV_LIBS) $(LIBUNWIND_LIBS)

src/SConscript

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ modules = {
125125
'mod_status' : { 'src' : [ 'mod_status.c' ] },
126126
'mod_userdir' : { 'src' : [ 'mod_userdir.c' ] },
127127
'mod_vhostdb' : { 'src' : [ 'mod_vhostdb.c', 'mod_vhostdb_api.c' ] },
128-
'mod_webdav' : { 'src' : [ 'mod_webdav.c' ], 'lib' : [ env['LIBXML2'], env['LIBSQLITE3'], env['LIBUUID'] ] },
128+
'mod_webdav' : { 'src' : [ 'mod_webdav.c' ], 'lib' : [ env['LIBXML2'], env['LIBSQLITE3'] ] },
129129
'mod_wstunnel' : { 'src' : [ 'mod_wstunnel.c' ], 'lib' : [ env['LIBCRYPTO'] ] },
130130
}
131131

src/config.h.cmake

-4
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,6 @@
131131
/* sqlite3 */
132132
#cmakedefine HAVE_SQLITE3_H
133133

134-
/* UUID */
135-
#cmakedefine HAVE_UUID_UUID_H
136-
#cmakedefine HAVE_LIBUUID
137-
138134
/* ZLIB */
139135
#cmakedefine HAVE_ZLIB_H
140136
#cmakedefine HAVE_LIBZ

src/meson.build

+1-11
Original file line numberDiff line numberDiff line change
@@ -443,16 +443,6 @@ conf_data.set('HAVE_SASL', libsasl.found())
443443
#if get_option('with_valgrind')
444444
#endif
445445

446-
uuid = compiler.has_function('uuid_generate', args: defs, prefix: '#include <uuid/uuid.h>')
447-
if uuid
448-
libuuid = dependency('', required: false)
449-
else
450-
libuuid = dependency('uuid', required: get_option('with_webdav_locks'))
451-
endif
452-
453-
conf_data.set('HAVE_LIBUUID', uuid)
454-
conf_data.set('HAVE_UUID_UUID_H', uuid)
455-
456446
libxml2 = dependency('libxml-2.0', required: get_option('with_webdav_props'))
457447
libsqlite3 = dependency('sqlite3', required: get_option('with_webdav_props'))
458448
conf_data.set('HAVE_LIBXML2', libxml2.found())
@@ -785,7 +775,7 @@ modules = [
785775
[ 'mod_status', [ 'mod_status.c' ] ],
786776
[ 'mod_userdir', [ 'mod_userdir.c' ] ],
787777
[ 'mod_vhostdb', [ 'mod_vhostdb.c', 'mod_vhostdb_api.c' ] ],
788-
[ 'mod_webdav', [ 'mod_webdav.c' ], [ libsqlite3, libuuid, libxml2, libelftc ] ],
778+
[ 'mod_webdav', [ 'mod_webdav.c' ], [ libsqlite3, libxml2, libelftc ] ],
789779
[ 'mod_wstunnel', [ 'mod_wstunnel.c' ], libcrypto ],
790780
]
791781
endif

0 commit comments

Comments
 (0)