Skip to content

Commit 9a02e6b

Browse files
committed
Build: make diskquota installation opt-in
diskquota is currently built and installed by default from gpcontrib, which makes it available in all standard builds without an explicit decision to enable it. Change diskquota to an opt-in installation model by adding a dedicated `--with-diskquota` configure option that defaults to `no`. Only build, install, and run installcheck for diskquota when that option is explicitly enabled. This makes diskquota adoption an explicit choice and avoids shipping the extension by default.
1 parent da9a5ae commit 9a02e6b

File tree

5 files changed

+48
-5
lines changed

5 files changed

+48
-5
lines changed

configure

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,7 @@ with_libcurl
723723
with_rt
724724
PROTOC
725725
with_gp_stats_collector
726+
with_diskquota
726727
with_zstd
727728
with_libbz2
728729
LZ4_LIBS
@@ -944,6 +945,7 @@ with_zlib
944945
with_lz4
945946
with_libbz2
946947
with_zstd
948+
with_diskquota
947949
with_gp_stats_collector
948950
with_rt
949951
with_libcurl
@@ -1694,6 +1696,7 @@ Optional Packages:
16941696
--with-lz4 build with LZ4 support
16951697
--without-libbz2 do not use bzip2
16961698
--without-zstd do not build with Zstandard
1699+
--with-diskquota build with diskquota extension
16971700
--with-gp_stats_collector
16981701
build with stats collector extension
16991702
--without-rt do not use Realtime Library
@@ -11062,6 +11065,35 @@ fi
1106211065
$as_echo "$with_zstd" >&6; }
1106311066

1106411067

11068+
#
11069+
# diskquota
11070+
#
11071+
11072+
11073+
11074+
# Check whether --with-diskquota was given.
11075+
if test "${with_diskquota+set}" = set; then :
11076+
withval=$with_diskquota;
11077+
case $withval in
11078+
yes)
11079+
:
11080+
;;
11081+
no)
11082+
:
11083+
;;
11084+
*)
11085+
as_fn_error $? "no argument expected for --with-diskquota option" "$LINENO" 5
11086+
;;
11087+
esac
11088+
11089+
else
11090+
with_diskquota=no
11091+
11092+
fi
11093+
11094+
11095+
11096+
1106511097
#
1106611098
# gp_stats_collector
1106711099
#

configure.ac

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,6 +1365,13 @@ PGAC_ARG_BOOL(with, zstd, yes, [do not build with Zstandard],
13651365
AC_MSG_RESULT([$with_zstd])
13661366
AC_SUBST(with_zstd)
13671367

1368+
#
1369+
# diskquota
1370+
#
1371+
PGAC_ARG_BOOL(with, diskquota, no,
1372+
[build with diskquota extension])
1373+
AC_SUBST(with_diskquota)
1374+
13681375
#
13691376
# gp_stats_collector
13701377
#

devops/build/automation/cloudberry/scripts/configure-cloudberry.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ execute_cmd ./configure --prefix=${BUILD_DESTINATION} \
162162
--disable-pxf \
163163
--enable-tap-tests \
164164
${CONFIGURE_DEBUG_OPTS} \
165+
--with-diskquota \
165166
--with-gp-stats-collector \
166167
--with-gssapi \
167168
--with-ldap \

gpcontrib/Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,19 @@ ifeq "$(enable_debug_extensions)" "yes"
2222
gp_legacy_string_agg \
2323
gp_replica_check \
2424
gp_toolkit \
25-
pg_hint_plan \
26-
diskquota
25+
pg_hint_plan
2726
else
2827
recurse_targets = gp_sparse_vector \
2928
gp_distribution_policy \
3029
gp_internal_tools \
3130
gp_legacy_string_agg \
3231
gp_exttable_fdw \
3332
gp_toolkit \
34-
pg_hint_plan \
35-
diskquota
33+
pg_hint_plan
34+
endif
35+
36+
ifeq "$(with_diskquota)" "yes"
37+
recurse_targets += diskquota
3638
endif
3739

3840
ifeq "$(with_gp_stats_collector)" "yes"
@@ -102,4 +104,4 @@ installcheck:
102104
$(MAKE) -C gp_sparse_vector installcheck
103105
$(MAKE) -C gp_toolkit installcheck
104106
$(MAKE) -C gp_exttable_fdw installcheck
105-
$(MAKE) -C diskquota installcheck
107+
if [ "$(with_diskquota)" = "yes" ]; then $(MAKE) -C diskquota installcheck; fi

src/Makefile.global.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ with_zstd = @with_zstd@
271271
ZSTD_CFLAGS = @ZSTD_CFLAGS@
272272
ZSTD_LIBS = @ZSTD_LIBS@
273273
EVENT_LIBS = @EVENT_LIBS@
274+
with_diskquota = @with_diskquota@
274275
with_gp_stats_collector = @with_gp_stats_collector@
275276

276277
##########################################################################

0 commit comments

Comments
 (0)