From 526bebd459e61537fbb466f062719d53f63eff3a Mon Sep 17 00:00:00 2001 From: Jan Fabian Radon Date: Wed, 2 Mar 2022 23:58:11 +0100 Subject: [PATCH] Develop (#294) * 217: fix unused code. * 217: unused code and warning * disabled man pages for rmb * Bugfix/283 virtual mailbox fetch metadata (#284) * Develop (#282) * 217: fix unused code. * 217: unused code and warning * disabled man pages for rmb * #283: fetch metadata for mails in virtual mailbox * #283: fix metadata date.saved. date.received virtual mailbox * #283: version * Feature/286 use guid from UUID string (#287) * #256: use guid_128_from_uuid_string instead of guid_128_from_string, to support older uuid formats like RECORD or MICROSOFT, always use compact for printing * version 0.0.25 preparations * #286: build issue * merge * version * #286: prefere cached mail guid. * #286: determine if uuid has - hyphon, if true preseve it. * fix non void return * Feature/289 GitHub actions (#290) * #289: build * #289: build plugin. * #289: submodules * submodules * upgrade git * clean outdated repos * Bugfix/UUID record format (#293) * bugfix initialisaction rados_mail->deprecated_uid * rados_mail creation and default value check --- .github/workflows/build.yml | 37 +++++++++++++++++++ CHANGELOG.md | 4 ++ configure.ac | 2 +- rpm/dovecot-ceph-plugin.spec | 2 +- src/librmb/rados-mail.cpp | 3 +- .../test_storage_mock_rbox.cpp | 12 ++++++ 6 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..866044a3 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +name: container build + +on: + push: + branches: + - '**' + +jobs: + container-job: + + runs-on: ubuntu-latest + container: cephdovecot/travis-build-master-2.3:latest + + steps: + - name: clean outdated repos + run: rm /etc/apt/sources.list.d/* + - name: add git + run: add-apt-repository ppa:git-core/ppa -y + - name: update + run: (DEBIAN_FRONTEND=noninteractive apt update & apt-get install -qq -y flex bison git) + - uses: actions/checkout@v2 + with: + submodules: 'true' + - name: update dovecot + run: (cd /usr/local/src/dovecot; git fetch origin) + - name: update dovecot branch + run: (cd /usr/local/src/dovecot; git checkout 2.3.15) + - name: install missing packages apt-get + run: (DEBIAN_FRONTEND=noninteractive apt-get install -qq -y flex bison) + - name: autogen dovecot + run: (cd /usr/local/src/dovecot; ./autogen.sh && ./configure --enable-maintainer-mode --enable-devel-checks --with-zlib) + - name: build dovecot + run: (cd /usr/local/src/dovecot; make install) + - name: configure + run: ./autogen.sh && ./configure --with-dovecot=/usr/local/lib/dovecot --enable-maintainer-mode --enable-debug --with-integration-tests --enable-valgrind --enable-debug + - name: build + run: make clean install \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cd1557f..92fb781c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Change Log +## [0.0.27](https://github.com/ceph-dovecot/dovecot-ceph-plugin/tree/0.0.25) (2022-02-28) + +- bugfix initialisation rados_mail->deprecated_uid + ## [0.0.26](https://github.com/ceph-dovecot/dovecot-ceph-plugin/tree/0.0.25) (2022-02-28) - support deprecated uuid format RECORD and MICROSOFT diff --git a/configure.ac b/configure.ac index e470d435..a382b36a 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,7 @@ AC_PREREQ([2.59]) -AC_INIT([dovecot-ceph-plugin], [0.0.26], [https://github.com/ceph-dovecot/dovecot-ceph-plugin/issues/new], ,[https://github.com/ceph-dovecot/dovecot-ceph-plugin]) +AC_INIT([dovecot-ceph-plugin], [0.0.27], [https://github.com/ceph-dovecot/dovecot-ceph-plugin/issues/new], ,[https://github.com/ceph-dovecot/dovecot-ceph-plugin]) AC_CONFIG_AUX_DIR([.]) AC_CONFIG_SRCDIR([src]) diff --git a/rpm/dovecot-ceph-plugin.spec b/rpm/dovecot-ceph-plugin.spec index 036122e1..b7f7459d 100644 --- a/rpm/dovecot-ceph-plugin.spec +++ b/rpm/dovecot-ceph-plugin.spec @@ -13,7 +13,7 @@ Name: dovecot-ceph-plugin Summary: Dovecot Ceph RADOS plugins -Version: 0.0.26 +Version: 0.0.27 Release: 0%{?dist} URL: https://github.com/ceph-dovecot/dovecot-ceph-plugin diff --git a/src/librmb/rados-mail.cpp b/src/librmb/rados-mail.cpp index bef825dd..43778889 100644 --- a/src/librmb/rados-mail.cpp +++ b/src/librmb/rados-mail.cpp @@ -30,7 +30,8 @@ RadosMail::RadosMail() mail_buffer(nullptr), save_date_rados(-1), valid(true), - index_ref(false) {} + index_ref(false), + deprecated_uid(false) {} RadosMail::~RadosMail() {} diff --git a/src/tests/storage-mock-rbox/test_storage_mock_rbox.cpp b/src/tests/storage-mock-rbox/test_storage_mock_rbox.cpp index 6d294bca..abfc026a 100644 --- a/src/tests/storage-mock-rbox/test_storage_mock_rbox.cpp +++ b/src/tests/storage-mock-rbox/test_storage_mock_rbox.cpp @@ -61,6 +61,18 @@ using ::testing::ReturnRef; #endif TEST_F(StorageTest, init) {} + +/** + * make sure is deprecated uid is always false initialy + **/ +TEST_F(StorageTest, create_rados_mail) { + + for(int i = 0 ; i < 10000 ;i++) { + librmb::RadosMail *mail = new librmb::RadosMail(); + ASSERT_EQ(false, mail->is_deprecated_uid()); + delete mail; + } +} /** * Error test: * - open_connection to rados will fail with -1 .