Commit 2c39ad3e authored by Duncan Bellamy's avatar Duncan Bellamy Committed by Leo
Browse files

testing/dovecot-ceph-plugin: new aport

parent b9944597
Pipeline #86415 passed with stages
in 4 minutes and 16 seconds
submitted as: https://github.com/ceph-dovecot/dovecot-ceph-plugin/pull/272
commit cbccc030421472d2455bf0c584ea1490bf03dd16
Author: root <root@test2.local>
Date: Mon Aug 24 13:28:24 2020 +0000
some compiling fixes
diff --git a/src/storage-rbox/ostream-bufferlist.cpp b/src/storage-rbox/ostream-bufferlist.cpp
index 83f4880..2c3f0b6 100644
--- a/src/storage-rbox/ostream-bufferlist.cpp
+++ b/src/storage-rbox/ostream-bufferlist.cpp
@@ -63,7 +63,7 @@ static ssize_t o_stream_buffer_sendv(struct ostream_private *stream, const struc
}
for (i = 0; i < iov_count; i++) {
// use unsigned char* for binary data!
- bstream->buf->append(reinterpret_cast<const unsigned char *>(iov[i].iov_base), iov[i].iov_len);
+ bstream->buf->append(reinterpret_cast<const char *>(iov[i].iov_base), iov[i].iov_len);
stream->ostream.offset += iov[i].iov_len;
ret += iov[i].iov_len;
}
submitted as: https://github.com/ceph-dovecot/dovecot-ceph-plugin/pull/272
commit 31f755997e648e813a4eb49d86c301d6e5b1121d
Author: None None <none@f1-outsourcing.eu>
Date: Mon Aug 24 12:02:24 2020 +0000
some compiling fixes
diff --git a/src/storage-rbox/typeof-def.h b/src/storage-rbox/typeof-def.h
index 4badd34..3ed0b71 100644
--- a/src/storage-rbox/typeof-def.h
+++ b/src/storage-rbox/typeof-def.h
@@ -23,7 +23,7 @@
/* replacement for MODULE_CONTEXT (v 2.3, assigned void or long int, this is not allowed with c++) */
#define RBOX_MODULE_CONTEXT(obj, id_ctx) \
(module_get_context_id(&(id_ctx).id) < array_count(&(obj)->module_contexts) \
- ? (*((void **)array_idx_modifiable(&(obj)->module_contexts, module_get_context_id(&(id_ctx).id)) + \
+ ? (*((index_mailbox_context **)array_idx_modifiable(&(obj)->module_contexts, module_get_context_id(&(id_ctx).id)) + \
OBJ_REGISTER_COMPATIBLE(obj, id_ctx))) \
: NULL)
submitted as: https://github.com/ceph-dovecot/dovecot-ceph-plugin/pull/272
commit 4a159760a514b60b1343764bd93d6aee78cb63a1
Author: None None <none@f1-outsourcing.eu>
Date: Mon Aug 24 10:42:44 2020 +0000
some compiling fixes
diff --git a/src/storage-rbox/rbox-mail.cpp b/src/storage-rbox/rbox-mail.cpp
index bd15d82..8d0b8a3 100644
--- a/src/storage-rbox/rbox-mail.cpp
+++ b/src/storage-rbox/rbox-mail.cpp
@@ -496,7 +496,7 @@ int rbox_get_guid_metadata(struct rbox_mail *mail, const char **value_r) {
}
// lost for some reason, use fallback
// index is empty. we have to check the object attributes do we have to tell someone that the index is broken?
- if (rbox_mail_metadata_get(mail, rbox_metadata_key::RBOX_METADATA_GUID, value_r) < 0) {
+ if (rbox_mail_metadata_get(mail, rbox_metadata_key::RBOX_METADATA_GUID, const_cast<char**>(value_r)) < 0) {
return -1;
}
diff --git a/src/storage-rbox/rbox-save.cpp b/src/storage-rbox/rbox-save.cpp
index bc11406..7b607ed 100644
--- a/src/storage-rbox/rbox-save.cpp
+++ b/src/storage-rbox/rbox-save.cpp
@@ -192,7 +192,7 @@ void init_output_stream(mail_save_context *_ctx) {
// create buffer ( delete is in wait_for_write_operations)
r_ctx->rados_mail->set_mail_buffer(new librados::bufferlist());
r_ctx->output_stream =
- o_stream_create_bufferlist(r_ctx->rados_mail, &r_ctx->rados_storage, rbox->storage->config->is_write_chunks());
+ o_stream_create_bufferlist(r_ctx->rados_mail, const_cast<librmb::RadosStorage*>(&r_ctx->rados_storage), rbox->storage->config->is_write_chunks());
o_stream_cork(r_ctx->output_stream);
_ctx->data.output = r_ctx->output_stream;
commit d467b855dfe250a259281e61b73959684895904e
Author: Jan Radon <j.radon@tallence.com>
Date: Thu Feb 13 00:01:17 2020 +0100
librados nautilus latests
diff --git a/src/librmb/rados-storage-impl.cpp b/src/librmb/rados-storage-impl.cpp
index fb60e41..375ca4f 100644
--- a/src/librmb/rados-storage-impl.cpp
+++ b/src/librmb/rados-storage-impl.cpp
@@ -278,7 +278,7 @@ int RadosStorageImpl::move(std::string &src_oid, const char *src_ns, std::string
src_io_ctx.dup(dest_io_ctx);
src_io_ctx.set_namespace(src_ns);
dest_io_ctx.set_namespace(dest_ns);
- write_op.copy_from(src_oid, src_io_ctx, 0);
+ write_op.copy_from(src_oid, src_io_ctx, 0,0);
} else {
src_io_ctx = dest_io_ctx;
@@ -335,7 +335,7 @@ int RadosStorageImpl::copy(std::string &src_oid, const char *src_ns, std::string
} else {
src_io_ctx = dest_io_ctx;
}
- write_op.copy_from(src_oid, src_io_ctx, 0);
+ write_op.copy_from(src_oid, src_io_ctx, 0, 0);
// because we create a copy, save date needs to be updated
// as an alternative we could use &ctx->data.save_date here if we save it to xattribute in write_metadata
diff --git a/src/tests/sync-rbox/it_test_sync_rbox_2.cpp b/src/tests/sync-rbox/it_test_sync_rbox_2.cpp
index a91dbba..719783f 100644
--- a/src/tests/sync-rbox/it_test_sync_rbox_2.cpp
+++ b/src/tests/sync-rbox/it_test_sync_rbox_2.cpp
@@ -73,7 +73,7 @@ static void copy_object(struct mail_namespace *_ns, struct mailbox *box) {
i_debug("Last Version = %lu for obj: %s , stat =%d, %ld", r_storage->s->get_io_ctx().get_last_version(), oid.c_str(),
stat_ret, size);
- write_op.copy_from(oid, r_storage->s->get_io_ctx(), r_storage->s->get_io_ctx().get_last_version());
+ write_op.copy_from(oid, r_storage->s->get_io_ctx(), r_storage->s->get_io_ctx().get_last_version(),0);
int ret = r_storage->s->get_io_ctx().operate(test_oid, &write_op);
i_debug("copy operate: %d for %s", ret, test_oid.c_str());
diff --git a/src/tests/sync-rbox/it_test_sync_rbox_alt.cpp b/src/tests/sync-rbox/it_test_sync_rbox_alt.cpp
index 2904c90..dee5978 100644
--- a/src/tests/sync-rbox/it_test_sync_rbox_alt.cpp
+++ b/src/tests/sync-rbox/it_test_sync_rbox_alt.cpp
@@ -73,7 +73,7 @@ static void copy_object(struct mail_namespace *_ns, struct mailbox *box) {
i_debug("Last Version = %lu for obj: %s , stat =%d, %ld", r_storage->s->get_io_ctx().get_last_version(), oid.c_str(),
stat_ret, size);
- write_op.copy_from(oid, r_storage->s->get_io_ctx(), r_storage->s->get_io_ctx().get_last_version());
+ write_op.copy_from(oid, r_storage->s->get_io_ctx(), r_storage->s->get_io_ctx().get_last_version(),0);
int ret = r_storage->s->get_io_ctx().operate(test_oid, &write_op);
i_debug("copy operate: %d for %s", ret, test_oid.c_str());
diff --git a/src/tests/sync-rbox/it_test_sync_rbox_duplicate_uid.cpp b/src/tests/sync-rbox/it_test_sync_rbox_duplicate_uid.cpp
index b7253c7..e41f184 100644
--- a/src/tests/sync-rbox/it_test_sync_rbox_duplicate_uid.cpp
+++ b/src/tests/sync-rbox/it_test_sync_rbox_duplicate_uid.cpp
@@ -73,7 +73,7 @@ static void copy_object(struct mail_namespace *_ns, struct mailbox *box) {
i_debug("Last Version = %lu for obj: %s , stat =%d, %ld", r_storage->s->get_io_ctx().get_last_version(), oid.c_str(),
stat_ret, size);
- write_op.copy_from(oid, r_storage->s->get_io_ctx(), r_storage->s->get_io_ctx().get_last_version());
+ write_op.copy_from(oid, r_storage->s->get_io_ctx(), r_storage->s->get_io_ctx().get_last_version(),0);
int ret = r_storage->s->get_io_ctx().operate(test_oid, &write_op);
i_debug("copy operate: %d for %s", ret, test_oid.c_str());
--- a/src/storage-rbox/rbox-mail.cpp
+++ b/src/storage-rbox/rbox-mail.cpp
@@ -87,8 +87,7 @@
mail = p_new(pool, struct rbox_mail, 1);
i_zero(mail);
- mail->imail.mail.pool = pool;
- index_mail_init(&mail->imail, t, wanted_fields, wanted_headers);
+ index_mail_init(&mail->imail, t, wanted_fields, wanted_headers, pool, NULL);
FUNC_END();
return &mail->imail.mail.mail;
submitted as:
https://github.com/ceph-dovecot/dovecot-ceph-plugin/pull/275
--- a/src/librmb/rados-metadata.h
+++ b/src/librmb/rados-metadata.h
@@ -31,9 +31,9 @@
RadosMetadata(enum rbox_metadata_key _key, const char* val) { convert(_key, val); }
- RadosMetadata(enum rbox_metadata_key _key, const uint& val) { convert(_key, val); }
+ RadosMetadata(enum rbox_metadata_key _key, const uint32_t& val) { convert(_key, val); }
- RadosMetadata(enum rbox_metadata_key _key, const size_t& val) { convert(_key, val); }
+ RadosMetadata(enum rbox_metadata_key _key, const uint64_t& val) { convert(_key, val); }
RadosMetadata(enum rbox_metadata_key _key, const int val) { convert(_key, val); }
~RadosMetadata() {}
@@ -91,17 +91,17 @@
bl.append(str.c_str(), str.length() + 1);
}
- void convert(enum rbox_metadata_key _key, const uint& value) {
+ void convert(enum rbox_metadata_key _key, const uint32_t& value) {
bl.clear();
key = librmb::rbox_metadata_key_to_char(_key);
std::string val = std::to_string(value);
bl.append(val.c_str(), val.length() + 1);
}
- void convert(enum rbox_metadata_key _key, const size_t& value) {
+ void convert(enum rbox_metadata_key _key, const uint64_t& value) {
bl.clear();
key = librmb::rbox_metadata_key_to_char(_key);
- std::string val = std::to_string(static_cast<int>(value));
+ std::string val = std::to_string(static_cast<uint64_t>(value));
bl.append(val.c_str(), val.length() + 1);
}
void convert(enum rbox_metadata_key _key, const int value) {
submitted as:
https://github.com/ceph-dovecot/dovecot-ceph-plugin/pull/276
--- a/src/storage-rbox/rbox-mailbox-list-fs.cpp
+++ b/src/storage-rbox/rbox-mailbox-list-fs.cpp
@@ -101,7 +101,7 @@
}
/* we have at least one directory. see if this mailbox is selectable */
- maildir_path = t_strconcat(path, "/", list->set.maildir_name, NULL);
+ maildir_path = t_strconcat(path, "/", list->set.maildir_name, static_cast<const char*>(NULL));
if (stat(maildir_path, &st2) < 0)
*flags_r |= MAILBOX_NOSELECT | MAILBOX_CHILDREN;
else if (!S_ISDIR(st2.st_mode)) {
@@ -205,7 +205,7 @@
}
/* we've done all filtering we can before stat()ing */
- path = t_strconcat(dir, "/", fname, NULL);
+ path = t_strconcat(dir, "/", fname, static_cast<const char*>(NULL));
if (stat(path, &st) < 0) {
if (ENOTFOUND(errno)) {
*flags_r |= MAILBOX_NONEXISTENT;
--- a/src/storage-rbox/rbox-storage.cpp
+++ b/src/storage-rbox/rbox-storage.cpp
@@ -106,7 +106,7 @@
const char *home;
if (ns->owner != NULL && mail_user_get_home(ns->owner, &home) > 0) {
- const char *path = t_strconcat(home, "/rbox", NULL);
+ const char *path = t_strconcat(home, "/rbox", static_cast<const char*>(NULL));
if (access(path, R_OK | W_OK | X_OK) == 0) {
#ifdef DEBUG
i_debug("rbox: root exists (%s)", path);
@@ -142,7 +142,7 @@
}
}
- path = t_strconcat(root_dir, "/" RBOX_MAILBOX_DIR_NAME, NULL);
+ path = t_strconcat(root_dir, "/" RBOX_MAILBOX_DIR_NAME, static_cast<const char*>(NULL));
if (stat(path, &st) < 0) {
#ifdef DEBUG
i_debug("rbox autodetect: stat(%s) failed: %m", path);
@@ -343,7 +343,7 @@
if (mailbox_get_path_to(box, MAILBOX_LIST_PATH_TYPE_INDEX, &box_path) < 0)
return -1;
i_assert(box_path != NULL);
- box_path = t_strconcat(box_path, "/", box->index_prefix, ".log", NULL);
+ box_path = t_strconcat(box_path, "/", box->index_prefix, ".log", static_cast<const char*>(NULL));
ret = stat(box_path, &st);
}
#endif
@@ -566,7 +566,7 @@
const char *path;
path = mailbox_list_get_root_forced(list, MAILBOX_LIST_PATH_TYPE_CONTROL);
- path = t_strconcat(path, "/" RBOX_UIDVALIDITY_FILE_NAME, NULL);
+ path = t_strconcat(path, "/" RBOX_UIDVALIDITY_FILE_NAME, static_cast<const char*>(NULL));
FUNC_END();
return mailbox_uidvalidity_next(list, path);
# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=dovecot-ceph-plugin
pkgver=0.0.22
pkgrel=0
_gtestver=1.11.0
pkgdesc="Dovecot plugin for storing mails in a Ceph cluster"
url="https://github.com/ceph-dovecot/dovecot-ceph-plugin"
arch="all"
license="LGPL-2.1-or-later"
depends="dovecot"
makedepends="
automake
autoconf
ceph-dev
dovecot-dev
jansson-dev
libexecinfo-dev
libtool
linux-headers
"
subpackages="librmb:_librmb librmb-dev:_librmb_dev librmb-doc:_librmb_doc librmb-utils:_librmb_utils"
source="$pkgname-$pkgver.tar.gz::https://github.com/ceph-dovecot/dovecot-ceph-plugin/archive/refs/tags/$pkgver.tar.gz
https://github.com/google/googletest/archive/refs/tags/release-$_gtestver.tar.gz
1-fixes.patch
2-fixes.patch
3-fixes.patch
4-upstream.patch
5-dovecot3.15.patch
6-32bit.patch
7-sentinel.patch
"
prepare() {
default_prepare
ln -s "$srcdir"/googletest-release-"$_gtestver"/googletest \
src/tests/googletest/googletest
ln -s "$srcdir"/googletest-release-"$_gtestver"/googlemock \
src/tests/googletest/googlemock
autoreconf -vif
}
build() {
export CFLAGS="$CFLAGS -fPIC"
export CXXFLAGS="$CXXFLAGS -fPIC"
export LIBS="$LIBS -lexecinfo"
./configure --prefix=/usr --with-dovecot=/usr/lib/dovecot
make
}
check() {
make check
}
package() {
make DESTDIR="$pkgdir" install
}
_librmb() {
pkgdesc="RADOS mailbox library"
amove usr/lib/librmb.so.*
}
_librmb_dev() {
pkgdesc="RADOS mailbox headers"
default_dev
}
_librmb_doc() {
default_doc
}
_librmb_utils() {
pkgdesc="RADOS mailbox tools"
amove usr/bin/rmb
}
sha512sums="
b2443ab4541775e4b6141c9e883312242ed1b2bc03a050be59d657ef87e14f3b96b206f0b025264f8043f1dab756570b6d4123ea178771e40749310868769341 dovecot-ceph-plugin-0.0.22.tar.gz
6fcc7827e4c4d95e3ae643dd65e6c4fc0e3d04e1778b84f6e06e390410fe3d18026c131d828d949d2f20dde6327d30ecee24dcd3ef919e21c91e010d149f3a28 release-1.11.0.tar.gz
d6b25ee5a9b990e3f196292b3d160210c39d1cbec1abc71a938733aed0508c991dcb14f78b84c5cc4dece35cdc1af35517dec695eb019d1c62bb55cc6acd2e79 1-fixes.patch
0c2267140dfd532dd191e8c0cc0cd54a47c57222879664c24c724d6846cff7d435aacfae077439c882156c982e004917f428415e7497fe40d6f3f1f680b5da6e 2-fixes.patch
585ef94845d03ff49fd8a02db2ff8075c4a0eba545d98b22558b23f587bb475f4682d5b6cfd7f33f8617ffbec00f190a26521433c4f1ba1d3a2e78e9940ddc37 3-fixes.patch
dd6f318225682eb9a2e116d46c497104a6e411342a5090210ab40d0dd964877d9157b340a018f79deb5b88e78684dc2208adbb2c3da9273b5f2f734cba582def 4-upstream.patch
887d621d410920886e14384581e5c4491405814077b64d865d87d01323ad55f0b2a25ed0b0b9cf8b3e6379e7b89066d545f0f835dcdd28a0e77cd038ce04159b 5-dovecot3.15.patch
a71e6b2236c29f3b65ed043ba5548c3494bedc40d5db2eabad54158eccc0b7c4dda328d878064031fb0b8088fb3a38c8d41ae4049a8f0fd57f89b16cc92267f5 6-32bit.patch
df836f24d8133228537b003dbdc4f917892f50dbe3dc7c374d6e242890e879a31ed1f8259ceb88df43dcea281b1be612171714417407b57db38827f834f1fcdd 7-sentinel.patch
"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment