diff --git a/common/shlibs b/common/shlibs index dc7f915f7f2..495fb05c188 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1030,6 +1030,8 @@ libcryptsetup.so.12 libcryptsetup-2.0.0_1 libgusb.so.2 libgusb-0.1.3_1 libmash-0.2.so.0 mash-0.2.0_4 libbytesize.so.1 libbytesize-1.2_1 +libblockdev.so.2 libblockdev-2.16_1 +libbd_utils.so.2 libblockdev-2.16_1 libudisks2.so.0 udisks2-1.93.0_1 libgcr-base-3.so.1 gcr-3.3.92_1 libgck-1.so.0 gcr-3.8.0_1 diff --git a/srcpkgs/libblockdev-devel b/srcpkgs/libblockdev-devel new file mode 120000 index 00000000000..f197697d1dc --- /dev/null +++ b/srcpkgs/libblockdev-devel @@ -0,0 +1 @@ +libblockdev \ No newline at end of file diff --git a/srcpkgs/libblockdev/patches/fix-musl.patch b/srcpkgs/libblockdev/patches/fix-musl.patch new file mode 100644 index 00000000000..7000fabc235 --- /dev/null +++ b/srcpkgs/libblockdev/patches/fix-musl.patch @@ -0,0 +1,34 @@ +Source: upstream +Reason: Fixes compilation in musl libc + +--- src/plugins/crypto.c ++++ src/plugins/crypto.c +@@ -22,7 +22,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +--- src/plugins/part.c ++++ src/plugins/part.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -1354,7 +1355,7 @@ static gboolean set_gpt_flags (const gchar *device, int part_num, guint64 flags, + real_flags |= 0x4000000000000000; /* 1 << 62 */ + if (flags & BD_PART_FLAG_GPT_NO_AUTOMOUNT) + real_flags |= 0x8000000000000000; /* 1 << 63 */ +- mask_str = g_strdup_printf ("%.16"__PRI64_PREFIX"x", real_flags); ++ mask_str = g_strdup_printf ("%.16"PRIx64, real_flags); + + args[2] = g_strdup_printf ("%d:=:%s", part_num, mask_str); + g_free (mask_str); + diff --git a/srcpkgs/libblockdev/template b/srcpkgs/libblockdev/template new file mode 100644 index 00000000000..85108dbde82 --- /dev/null +++ b/srcpkgs/libblockdev/template @@ -0,0 +1,26 @@ +# Template file for 'libblockdev' +pkgname=libblockdev +version=2.16 +revision=1 +build_style=gnu-configure +hostmakedepends="pkg-config python3" +makedepends="cryptsetup-devel device-mapper-devel dmraid-devel libbytesize-devel + libglib-devel libkmod-devel libparted-devel nss-devel volume_key-devel" +short_desc="A library for manipulating block devices" +maintainer="maxice8 " +license="LGPL-2.1-or-later" +homepage="https://github.com/storaged-project/libblockdev" +distfiles="https://github.com/storaged-project/libblockdev/releases/download/${version}-1/libblockdev-${version}.tar.gz" +checksum=d841ae446cf6dc545e4f7386e13dfd8c3e07c4b6a962536b7c0fcd20e3a4d9e4 +conf_files="/etc/libblockdev/conf.d/10-lvm-dbus.cfg + /etc/libblockdev/conf.d/00-default.cfg" + +libblockdev-devel_package() { + depends="libblockdev-${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.so" + } +} diff --git a/srcpkgs/libblockdev/update b/srcpkgs/libblockdev/update new file mode 100644 index 00000000000..9e560e5c796 --- /dev/null +++ b/srcpkgs/libblockdev/update @@ -0,0 +1 @@ +pattern="\K[\d\.]*(?=-1\.tar\.gz)"