Details
-
Task
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
Description
If you run the debian/autobake-deb.sh multiple times on the same source directory it will fail with the error:
dh: error: debian/control has a duplicate entry for mariadb-plugin-columnstore
|
This happens because the columnstore section of the autobake-deb.sh script has a simple `cat` statement to add the mariadb-plugin-columnstore package config and it doesn't check if the config has already been added to debian/control, it just blindly adds an additional package config block to the end of debian/control every time it is run.
This won't ever show up in buildbot because we're always running debian/autobake-deb.sh on a fresh directory. But it becomes a pain when trying to debug package builds locally because you have to remember to remove the columnstore package config from the end of debian/control prior to re-running the script.
Running the script should be idempotent, meaning back-to-back runs should have the same result assuming no changes have been made to the source tree. The way to fix would be to either:
- Add a check to the columnstore section of the script to not run the cat command unless the mariadb-plugin-columnstore package config is missing from debian/control
...or... - Add the mariadb-plugin-columnstore package config to debian/control so that it doesn't have to be added at compile time
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Assignee | Daniel Black [ danblack ] |
Comment |
[ {root@4405d53ce3e1:/source# ls -la debian/mariadb-plugin-columnstore.install
ls: cannot access 'debian/mariadb-plugin-columnstore.install': No such file or directory root@4405d53ce3e1:/source# AUTOBAKE_PREP_CONTROL_RULES_ONLY=1 bash -x debian/autobake-deb.sh + set -e + export 'DEB_BUILD_OPTIONS=nocheck ' + DEB_BUILD_OPTIONS='nocheck ' + source ./VERSION ++ MYSQL_VERSION_MAJOR=10 ++ MYSQL_VERSION_MINOR=5 ++ MYSQL_VERSION_PATCH=16 ++ SERVER_MATURITY=stable + [[ -n '' ]] + '[' -d storage/columnstore/columnstore/debian ']' + sed /-DPLUGIN_COLUMNSTORE=NO/d -i debian/rules + '[' '!' -f debian/mariadb-plugin-columnstore.install ']' + cp -v storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.install storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.postinst storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.postrm storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.prerm storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.triggers debian/ 'storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.install' -> 'debian/mariadb-plugin-columnstore.install' 'storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.postinst' -> 'debian/mariadb-plugin-columnstore.postinst' 'storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.postrm' -> 'debian/mariadb-plugin-columnstore.postrm' 'storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.prerm' -> 'debian/mariadb-plugin-columnstore.prerm' 'storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.triggers' -> 'debian/mariadb-plugin-columnstore.triggers' + echo + cat storage/columnstore/columnstore/debian/control ++ dpkg-architecture -q DEB_BUILD_ARCH + architecture=amd64 ++ lsb_release -sc + CODENAME=sid + case "${CODENAME}" in + '[' -n 1 ']' + exit 0 {noformat} {noformat} diff --git a/debian/control b/debian/control index 5352e9902ed..560cd409611 100644 --- a/debian/control +++ b/debian/control @@ -861,3 +861,24 @@ Description: MariaDB database regression test suite - data files ease of use. . This package has the architecture independent data files for the test suite. + +Package: mariadb-plugin-columnstore +Architecture: amd64 +Depends: binutils, + libjemalloc1 | libjemalloc2, + libsnappy1 | libsnappy1v5, + mariadb-server-10.5 (= ${server:Version}), + net-tools, + python3, + ${misc:Depends}, + ${shlibs:Depends} +Breaks: libthrift-dev, + mariadb-columnstore-libs, + mariadb-columnstore-platform +Replaces: libthrift-dev, + mariadb-columnstore-libs, + mariadb-columnstore-platform +Description: MariaDB ColumnStore storage engine + The MariaDB ColumnStore storage engine is a high-performance columnar + analytical engine, aimed at rapid processing of analytical queries on very + large amounts of data. diff --git a/debian/rules b/debian/rules index 57636eb028a..713970bb9d7 100755 --- a/debian/rules +++ b/debian/rules @@ -45,7 +45,6 @@ endif # ColumnStore can build only on amd64 and arm64 ifneq (,$(filter $(DEB_HOST_ARCH_CPU),amd64 arm64)) - CMAKEFLAGS += -DPLUGIN_COLUMNSTORE=NO endif ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) @@ -100,7 +99,6 @@ endif -DPLUGIN_TOKUDB=NO \ -DPLUGIN_CASSANDRA=NO \ -DPLUGIN_AWS_KEY_MANAGEMENT=NO \ - -DPLUGIN_COLUMNSTORE=NO \ -DDEB=$(DEB_VENDOR) # This is needed, otherwise 'make test' will run before binaries have been built {noformat} {noformat} root@4405d53ce3e1:/source# AUTOBAKE_PREP_CONTROL_RULES_ONLY=1 bash -x debian/autobake-deb.sh + set -e + export 'DEB_BUILD_OPTIONS=nocheck ' + DEB_BUILD_OPTIONS='nocheck ' + source ./VERSION ++ MYSQL_VERSION_MAJOR=10 ++ MYSQL_VERSION_MINOR=5 ++ MYSQL_VERSION_PATCH=16 ++ SERVER_MATURITY=stable + [[ -n '' ]] + '[' -d storage/columnstore/columnstore/debian ']' + sed /-DPLUGIN_COLUMNSTORE=NO/d -i debian/rules + '[' '!' -f debian/mariadb-plugin-columnstore.install ']' ++ dpkg-architecture -q DEB_BUILD_ARCH + architecture=amd64 ++ lsb_release -sc + CODENAME=sid + case "${CODENAME}" in + '[' -n 1 ']' + exit 0 {noformat} ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Assignee | Daniel Black [ danblack ] | Daniel Bartholomew [ dbart ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Daniel Bartholomew [ dbart ] | Vicențiu Ciorbaru [ cvicentiu ] |
Fix Version/s | 10.7 [ 24805 ] |
Fix Version/s | 10.8 [ 26121 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Fix Version/s | 10.6.18 [ 29627 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Assignee | Vicențiu Ciorbaru [ cvicentiu ] | Daniel Black [ danblack ] |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
The idempotent is provided by + '[' '!' -f debian/mariadb-plugin-columnstore.install ']'. Is that not being picked up? I guess that git checkout . is still leaving the file around. I'll look at doing something better still.
root@4405d53ce3e1:/source# ls -la debian/mariadb-plugin-columnstore.install
ls: cannot access 'debian/mariadb-plugin-columnstore.install': No such file or directory
root@4405d53ce3e1:/source# AUTOBAKE_PREP_CONTROL_RULES_ONLY=1 bash -x debian/autobake-deb.sh
+ set -e
+ export 'DEB_BUILD_OPTIONS=nocheck '
+ DEB_BUILD_OPTIONS='nocheck '
+ source ./VERSION
++ MYSQL_VERSION_MAJOR=10
++ MYSQL_VERSION_MINOR=5
++ MYSQL_VERSION_PATCH=16
++ SERVER_MATURITY=stable
+ [[ -n '' ]]
+ '[' -d storage/columnstore/columnstore/debian ']'
+ sed /-DPLUGIN_COLUMNSTORE=NO/d -i debian/rules
+ '[' '!' -f debian/mariadb-plugin-columnstore.install ']'
+ cp -v storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.install storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.postinst storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.postrm storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.prerm storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.triggers debian/
'storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.install' -> 'debian/mariadb-plugin-columnstore.install'
'storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.postinst' -> 'debian/mariadb-plugin-columnstore.postinst'
'storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.postrm' -> 'debian/mariadb-plugin-columnstore.postrm'
'storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.prerm' -> 'debian/mariadb-plugin-columnstore.prerm'
'storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.triggers' -> 'debian/mariadb-plugin-columnstore.triggers'
+ echo
+ cat storage/columnstore/columnstore/debian/control
++ dpkg-architecture -q DEB_BUILD_ARCH
+ architecture=amd64
++ lsb_release -sc
+ CODENAME=sid
+ case "${CODENAME}" in
+ '[' -n 1 ']'
+ exit 0
diff --git a/debian/control b/debian/control
index 5352e9902ed..560cd409611 100644
--- a/debian/control
+++ b/debian/control
@@ -861,3 +861,24 @@ Description: MariaDB database regression test suite - data files
ease of use.
.
This package has the architecture independent data files for the test suite.
+
+Package: mariadb-plugin-columnstore
+Architecture: amd64
+Depends: binutils,
+ libjemalloc1 | libjemalloc2,
+ libsnappy1 | libsnappy1v5,
+ mariadb-server-10.5 (= ${server:Version}),
+ net-tools,
+ python3,
+ ${misc:Depends},
+ ${shlibs:Depends}
+Breaks: libthrift-dev,
+ mariadb-columnstore-libs,
+ mariadb-columnstore-platform
+Replaces: libthrift-dev,
+ mariadb-columnstore-libs,
+ mariadb-columnstore-platform
+Description: MariaDB ColumnStore storage engine
+ The MariaDB ColumnStore storage engine is a high-performance columnar
+ analytical engine, aimed at rapid processing of analytical queries on very
+ large amounts of data.
diff --git a/debian/rules b/debian/rules
index 57636eb028a..713970bb9d7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -45,7 +45,6 @@ endif
# ColumnStore can build only on amd64 and arm64
ifneq (,$(filter $(DEB_HOST_ARCH_CPU),amd64 arm64))
- CMAKEFLAGS += -DPLUGIN_COLUMNSTORE=NO
endif
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
@@ -100,7 +99,6 @@ endif
-DPLUGIN_TOKUDB=NO \
-DPLUGIN_CASSANDRA=NO \
-DPLUGIN_AWS_KEY_MANAGEMENT=NO \
- -DPLUGIN_COLUMNSTORE=NO \
-DDEB=$(DEB_VENDOR)
# This is needed, otherwise 'make test' will run before binaries have been built
root@4405d53ce3e1:/source# AUTOBAKE_PREP_CONTROL_RULES_ONLY=1 bash -x debian/autobake-deb.sh
+ set -e
+ export 'DEB_BUILD_OPTIONS=nocheck '
+ DEB_BUILD_OPTIONS='nocheck '
+ source ./VERSION
++ MYSQL_VERSION_MAJOR=10
++ MYSQL_VERSION_MINOR=5
++ MYSQL_VERSION_PATCH=16
++ SERVER_MATURITY=stable
+ [[ -n '' ]]
+ '[' -d storage/columnstore/columnstore/debian ']'
+ sed /-DPLUGIN_COLUMNSTORE=NO/d -i debian/rules
+ '[' '!' -f debian/mariadb-plugin-columnstore.install ']'
++ dpkg-architecture -q DEB_BUILD_ARCH
+ architecture=amd64
++ lsb_release -sc
+ CODENAME=sid
+ case "${CODENAME}" in
+ '[' -n 1 ']'
+ exit 0
~/repos/mariadb-server-10.5 10.5
$ git diff
diff --git a/debian/control b/debian/control
index 5352e9902ed..560cd409611 100644
--- a/debian/control
+++ b/debian/control
@@ -861,3 +861,24 @@ Description: MariaDB database regression test suite - data files
ease of use.
.
This package has the architecture independent data files for the test suite.
+
+Package: mariadb-plugin-columnstore
+Architecture: amd64
+Depends: binutils,
+ libjemalloc1 | libjemalloc2,
+ libsnappy1 | libsnappy1v5,
+ mariadb-server-10.5 (= ${server:Version}),
+ net-tools,
+ python3,
+ ${misc:Depends},
+ ${shlibs:Depends}
+Breaks: libthrift-dev,
+ mariadb-columnstore-libs,
+ mariadb-columnstore-platform
+Replaces: libthrift-dev,
+ mariadb-columnstore-libs,
+ mariadb-columnstore-platform
+Description: MariaDB ColumnStore storage engine
+ The MariaDB ColumnStore storage engine is a high-performance columnar
+ analytical engine, aimed at rapid processing of analytical queries on very
+ large amounts of data.
diff --git a/debian/rules b/debian/rules
index 57636eb028a..713970bb9d7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -45,7 +45,6 @@ endif
# ColumnStore can build only on amd64 and arm64
ifneq (,$(filter $(DEB_HOST_ARCH_CPU),amd64 arm64))
- CMAKEFLAGS += -DPLUGIN_COLUMNSTORE=NO
endif
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
@@ -100,7 +99,6 @@ endif
-DPLUGIN_TOKUDB=NO \
-DPLUGIN_CASSANDRA=NO \
-DPLUGIN_AWS_KEY_MANAGEMENT=NO \
- -DPLUGIN_COLUMNSTORE=NO \
-DDEB=$(DEB_VENDOR)
# This is needed, otherwise 'make test' will run before binaries have been built