[RFC 2/4] erofs-utils: introduce build support for libcurl, openssl and libxml2 library

Gao Xiang hsiangkao at linux.alibaba.com
Thu Jul 31 13:33:27 AEST 2025


Hi Yifan,

On 2025/7/29 19:06, Yifan Zhao wrote:
> From: zhaoyifan <zhaoyifan28 at huawei.com>
> 
> This patch adds additional dependencies on libcurl, openssl and libxml2 library
> for the upcoming S3 data source support, with libcurl to interact with S3 API,
> openssl to generate S3 auth signature and libxml2 to parse response body.
> 
> The newly introduced dependencies are optional, controlled by the `--enable-s3`
> configure option.
> 
> Signed-off-by: Yifan Zhao <zhaoyifan28 at huawei.com>
> ---
>   configure.ac       | 41 +++++++++++++++++++++++++++++++++++++++++
>   include/erofs/s3.h | 10 ++++++++++

Just some source organization suggestion in advance in case
that you have time to address them.

In the future `include/erofs/` will only keep liberofs-exported
structures and functions (and I will clean up the old headers),
so if some s3 private structures are only for internal uses,
it would be better to move the header into `lib/` and rename as
`lib/liberofs_xxxxxx.h` instead.

>   lib/Makefile.am    |  5 +++++
>   lib/s3.c           |  7 +++++++

Also since we will add more remote storage (I think oci storage
too), so it would be better to move lib/s3.c to lib/remotes/s3.c

>   mkfs/Makefile.am   |  3 ++-
>   5 files changed, 65 insertions(+), 1 deletion(-)
>   create mode 100644 include/erofs/s3.h
>   create mode 100644 lib/s3.c
> 

...

> diff --git a/include/erofs/s3.h b/include/erofs/s3.h
> new file mode 100644
> index 0000000..e29bde2
> --- /dev/null
> +++ b/include/erofs/s3.h
> @@ -0,0 +1,10 @@
> +/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
> +/*
> + * Copyright (C) 2025 HUAWEI, Inc.
> + *             http://www.huawei.com/
> + * Created by Yifan Zhao <zhaoyifan28 at huawei.com>
> + */
> +#ifndef __EROFS_S3_H
> +#define __EROFS_S3_H
> +
> +#endif

This file is empty in this patch, so it would be better
to add in the following patch.

Thanks,
Gao Xiang


More information about the Linux-erofs mailing list