From eac5ac0edccd512da255e22c3d1dc58ca7fb3302 Mon Sep 17 00:00:00 2001 From: Vratislav Podzimek Date: Wed, 23 Sep 2015 15:23:42 +0200 Subject: [PATCH] New version - Merge pull request #40 from vpodzime/master-config_support (vpodzime) - Add tests for configuration support (vpodzime) - Add a function for getting the loaded soname for a plugin (vpodzime) - Add the default configuration (vpodzime) - Load and respect configuration files when loading plugins (vpodzime) - Add functions for finding and processing configuration files (vpodzime) - Merge pull request #38 from vpodzime/master-md_superblock_size (vpodzime) - Better document how MD RAID superblock size should be calculated (vpodzime) - Merge pull request #36 from phatina/master (vpodzime) - BTRFS: allow an arbitrary label to be set for a btrfs volume (phatina) - Merge pull request #32 from phatina/master (vpodzime) - BTRFS: fix parsing empty partition label (phatina) - Merge pull request #35 from vpodzime/master (vpodzime) - Define env variables for sudo via the env utility (vpodzime) - Merge pull request #34 from dashea/python3-tests (vpodzime) - Use unittest.addCleanup to simplify crypto_test. (dshea) - Run tests with both python2 and python3 in the ci target. (dshea) - Fix python3 issues in the unittests. (dshea) - Do not run all tests in the 'ci' target (vpodzime) - Merge pull request #33 from clumens/master (vpodzime) - Add a new makefile target that does everything needed for jenkins. (clumens) - Synchronize the .spec file with downstream (vpodzime) --- .gitignore | 1 + explicit_type_cert_data_1246096.patch | 50 --------------------------- libblockdev.spec | 35 ++++++++++++++++--- sources | 2 +- 4 files changed, 33 insertions(+), 55 deletions(-) delete mode 100644 explicit_type_cert_data_1246096.patch diff --git a/.gitignore b/.gitignore index 474533c..35e18ae 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /libblockdev-0.13.tar.gz /libblockdev-1.0.tar.gz /libblockdev-1.1.tar.gz +/libblockdev-1.2.tar.gz diff --git a/explicit_type_cert_data_1246096.patch b/explicit_type_cert_data_1246096.patch deleted file mode 100644 index 328bf34..0000000 --- a/explicit_type_cert_data_1246096.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 2c1af1f8d6afe69753de9beb6949922acd25a4fd Mon Sep 17 00:00:00 2001 -From: Vratislav Podzimek -Date: Fri, 24 Jul 2015 12:33:17 +0200 -Subject: [PATCH] Explicitly specify the type of the cert_data parameter - (#1246096) - -GObject introspection translates 'gchar*' into 'utf8', but the cert_data -parameter holds binary data which are not UTF-8 encoded and which are usually -passed from the outside (like in Python as described in the bug) as binary data -and not as a string. On the other hand NSS expects certificate data as a -character buffer so we need to just take a character buffer from the caller -(instead of doing some transformation magic). Thus we need to specify the type -explicitly to a zero-terminated array of chars which resolves the issue on the -caller interface and keeps everything okay for NSS. - -Signed-off-by: Vratislav Podzimek ---- - src/lib/plugin_apis/crypto.api | 2 +- - src/plugins/crypto.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/lib/plugin_apis/crypto.api b/src/lib/plugin_apis/crypto.api -index d58fc09..fddb806 100644 ---- a/src/lib/plugin_apis/crypto.api -+++ b/src/lib/plugin_apis/crypto.api -@@ -161,7 +161,7 @@ gboolean bd_crypto_luks_resize (const gchar *luks_device, guint64 size, GError * - * bd_crypto_escrow_device: - * @device: path of the device to create escrow data for - * @passphrase: passphrase used for the device -- * @cert_data: certificate data to use for escrow -+ * @cert_data: (array zero-terminated=1) (element-type gchar): certificate data to use for escrow - * @directory: directory to put escrow data into - * @backup_passphrase: (allow-none): backup passphrase for the device or %NULL - * @error: (out): place to store error (if any) -diff --git a/src/plugins/crypto.c b/src/plugins/crypto.c -index 5cf311a..28c9c63 100644 ---- a/src/plugins/crypto.c -+++ b/src/plugins/crypto.c -@@ -697,7 +697,7 @@ static gboolean write_escrow_data_file (struct libvk_volume *volume, struct libv - * bd_crypto_escrow_device: - * @device: path of the device to create escrow data for - * @passphrase: passphrase used for the device -- * @cert_data: certificate data to use for escrow -+ * @cert_data: (array zero-terminated=1) (element-type gchar): certificate data to use for escrow - * @directory: directory to put escrow data into - * @backup_passphrase: (allow-none): backup passphrase for the device or %NULL - * @error: (out): place to store error (if any) --- -2.1.0 - diff --git a/libblockdev.spec b/libblockdev.spec index 3a65c8a..d6f8d75 100644 --- a/libblockdev.spec +++ b/libblockdev.spec @@ -1,11 +1,10 @@ Name: libblockdev -Version: 1.1 -Release: 2%{?dist} +Version: 1.2 +Release: 1%{?dist} Summary: A library for low-level manipulation with block devices License: LGPLv2+ URL: https://github.com/vpodzime/libblockdev Source0: https://github.com/vpodzime/libblockdev/archive/%{name}-%{version}.tar.gz -Patch0: explicit_type_cert_data_1246096.patch BuildRequires: scons BuildRequires: glib2-devel @@ -26,6 +25,10 @@ BuildRequires: kmod-devel # BuildRequires: volume_key # BuildRequires: nss-tools +# Needed for python 2 vs. 3 compatibility in the tests, but not used to build +# BuildRequires: python-six +# BuildRequires: python3-six + %ifarch s390 s390x BuildRequires: s390utils-devel %endif @@ -297,7 +300,6 @@ A meta-package that pulls all the libblockdev plugins as dependencies. %prep %setup -q -n %{name}-%{version} -%patch0 -p1 %build %configure @@ -337,6 +339,7 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %license LICENSE %{_libdir}/libblockdev.so.* %{_libdir}/girepository*/BlockDev*.typelib +%config %{_sysconfdir}/libblockdev/conf.d/00-default.cfg %{python2_sitearch}/gi/overrides/* %{python3_sitearch}/gi/overrides/BlockDev* %{python3_sitearch}/gi/overrides/__pycache__/BlockDev* @@ -456,6 +459,30 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %files plugins-all %changelog +* Wed Sep 23 2015 Vratislav Podzimek - 1.2-1 +- Merge pull request #40 from vpodzime/master-config_support (vpodzime) +- Add tests for configuration support (vpodzime) +- Add a function for getting the loaded soname for a plugin (vpodzime) +- Add the default configuration (vpodzime) +- Load and respect configuration files when loading plugins (vpodzime) +- Add functions for finding and processing configuration files (vpodzime) +- Merge pull request #38 from vpodzime/master-md_superblock_size (vpodzime) +- Better document how MD RAID superblock size should be calculated (vpodzime) +- Merge pull request #36 from phatina/master (vpodzime) +- BTRFS: allow an arbitrary label to be set for a btrfs volume (phatina) +- Merge pull request #32 from phatina/master (vpodzime) +- BTRFS: fix parsing empty partition label (phatina) +- Merge pull request #35 from vpodzime/master (vpodzime) +- Define env variables for sudo via the env utility (vpodzime) +- Merge pull request #34 from dashea/python3-tests (vpodzime) +- Use unittest.addCleanup to simplify crypto_test. (dshea) +- Run tests with both python2 and python3 in the ci target. (dshea) +- Fix python3 issues in the unittests. (dshea) +- Do not run all tests in the 'ci' target (vpodzime) +- Merge pull request #33 from clumens/master (vpodzime) +- Add a new makefile target that does everything needed for jenkins. (clumens) +- Synchronize the .spec file with downstream (vpodzime) + * Fri Jul 24 2015 Vratislav Podzimek - 1.1-2 - Explicitly specify the type of the cert_data parameter (#1246096) (vpodzime) diff --git a/sources b/sources index 6d484e1..6961494 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e575bc6f3cf952cbd888b9cdb189ddf3 libblockdev-1.1.tar.gz +2554e88c3c3198a566f8e375eb5c4bc4 libblockdev-1.2.tar.gz