[packages/libldm] - up to 0.2.4
arekm
arekm at pld-linux.org
Sat Oct 19 23:54:03 CEST 2019
commit 04d55bb1e28a02eedff5bbe0d24aad99b9306823
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sat Oct 19 23:53:56 2019 +0200
- up to 0.2.4
libldm-gtype.patch | 12 ---
libldm-warnings.patch | 209 --------------------------------------------------
libldm.spec | 16 ++--
3 files changed, 7 insertions(+), 230 deletions(-)
---
diff --git a/libldm.spec b/libldm.spec
index 3b86abb..b1d9d69 100644
--- a/libldm.spec
+++ b/libldm.spec
@@ -6,14 +6,12 @@
Summary: A tool to manage Windows dynamic disks
Summary(pl.UTF-8): Narzędzie do zarządzania dynamicznymi dyskami Windows
Name: libldm
-Version: 0.2.3
-Release: 4
+Version: 0.2.4
+Release: 1
License: LGPL v3+ (libldm), GPL v3+ (ldmtool)
Group: Libraries
-Source0: https://github.com/mdbooth/libldm/downloads/%{name}-%{version}.tar.gz
-# Source0-md5: a7771c0a0f84dab6d7ce6a565ede4229
-Patch0: %{name}-warnings.patch
-Patch1: %{name}-gtype.patch
+Source0: https://github.com/mdbooth/libldm/archive/%{name}-%{version}.tar.gz
+# Source0-md5: e3fd10e378bc5334708544dcf58138da
URL: https://github.com/mdbooth/libldm/
BuildRequires: autoconf >= 2.68
BuildRequires: automake >= 1.6
@@ -91,11 +89,11 @@ API documentation for libldm library.
Dokumentacja API biblioteki libldm.
%prep
-%setup -q
-%patch0 -p1
-%patch1 -p1
+%setup -q -n %{name}-%{name}-%{version}
%build
+sed -i -e 's/-Werror //' src/Makefile.*
+%{__gtkdocize}
%{__libtoolize}
%{__aclocal} -I m4
%{__autoconf}
diff --git a/libldm-gtype.patch b/libldm-gtype.patch
deleted file mode 100644
index a378d26..0000000
--- a/libldm-gtype.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- libldm-0.2.3/src/ldmtool.c.orig 2013-08-04 11:41:00.357706797 +0100
-+++ libldm-0.2.3/src/ldmtool.c 2013-08-04 11:41:58.605069312 +0100
-@@ -777,7 +777,9 @@
- }
- g_option_context_free(context);
-
-+#if (GLIB_MAJOR_VERSION <= 2 && GLIB_MINOR_VERSION <= 35 && GLIB_MICRO_VERSION <= 0)
- g_type_init();
-+#endif
-
- LDM * const ldm = ldm_new(&err);
-
diff --git a/libldm-warnings.patch b/libldm-warnings.patch
deleted file mode 100644
index 92b7b16..0000000
--- a/libldm-warnings.patch
+++ /dev/null
@@ -1,209 +0,0 @@
---- libldm-0.2.3/src/Makefile.am.orig 2012-09-20 12:31:03.000000000 +0200
-+++ libldm-0.2.3/src/Makefile.am 2013-01-07 19:20:40.782494058 +0100
-@@ -15,7 +15,7 @@
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- AM_CFLAGS = -Wall -Werror -Wshadow -Wextra \
-- -Wno-unused-local-typedefs \
-+ -Wno-missing-field-initializers \
- -Wno-unused-parameter
-
- libname = libldm-1.0.la
---- libldm-0.2.3/src/mbr.c.orig 2012-07-23 17:47:49.000000000 +0200
-+++ libldm-0.2.3/src/mbr.c 2013-01-07 19:20:16.992494554 +0100
-@@ -47,13 +47,13 @@
- {
- struct _mbr _mbr;
-
-- size_t read = 0;
-- while (read < sizeof(_mbr)) {
-- ssize_t in = pread(fd, &_mbr + read, sizeof(struct _mbr) - read, read);
-+ size_t nread = 0;
-+ while (nread < sizeof(_mbr)) {
-+ ssize_t in = pread(fd, &_mbr + nread, sizeof(struct _mbr) - nread, nread);
- if (in == 0) return -MBR_ERROR_INVALID;
- if (in == -1) return -MBR_ERROR_READ;
-
-- read += in;
-+ nread += in;
- }
-
- if (_mbr.magic[0] != 0x55 || _mbr.magic[1] != 0xAA)
---- libldm-0.2.3/src/gpt.c.orig 2012-09-20 12:31:03.000000000 +0200
-+++ libldm-0.2.3/src/gpt.c 2013-01-07 19:29:04.812483553 +0100
-@@ -82,14 +82,14 @@
- const off_t gpt_start = secsize;
-
- struct _gpt_head head;
-- size_t read = 0;
-- while (read < sizeof(head)) {
-- ssize_t in = pread(fd, &head + read, sizeof(head) - read,
-- read + gpt_start);
-+ size_t nread = 0;
-+ while (nread < sizeof(head)) {
-+ ssize_t in = pread(fd, &head + nread, sizeof(head) - nread,
-+ nread + gpt_start);
- if (in == 0) return -GPT_ERROR_INVALID;
- if (in == -1) return -GPT_ERROR_READ;
-
-- read += in;
-+ nread += in;
- }
-
- if (memcmp(head.magic, "EFI PART", 8) != 0) return -GPT_ERROR_INVALID;
-@@ -111,9 +111,9 @@
-
- struct _gpt *_gpt = (*h)->gpt;
- memcpy(_gpt, &head, sizeof(head));
-- while (read < le32toh(head.size)) {
-- ssize_t in = pread(fd, (char *)(_gpt) + read, le32toh(head.size) - read,
-- read + gpt_start);
-+ while (nread < le32toh(head.size)) {
-+ ssize_t in = pread(fd, (char *)(_gpt) + nread, le32toh(head.size) - nread,
-+ nread + gpt_start);
- if (in == 0) {
- err = -GPT_ERROR_INVALID;
- goto error;
-@@ -123,7 +123,7 @@
- goto error;
- }
-
-- read += in;
-+ nread += in;
- }
-
- uint32_t header_crc = _gpt->header_crc;
-@@ -151,10 +151,10 @@
- if ((*h)->pte_array == NULL) abort();
-
- const off_t pte_array_start = _gpt->pte_array_start_lba * secsize;
-- read = 0;
-- while (read < pte_array_size) {
-- ssize_t in = pread(fd, (*h)->pte_array + read, pte_array_size - read,
-- read + pte_array_start);
-+ nread = 0;
-+ while (nread < pte_array_size) {
-+ ssize_t in = pread(fd, (*h)->pte_array + nread, pte_array_size - nread,
-+ nread + pte_array_start);
- if (in == 0) {
- err = -GPT_ERROR_INVALID;
- goto error;
-@@ -164,7 +164,7 @@
- goto error;
- }
-
-- read += in;
-+ nread += in;
- }
-
- crc = crc32(0L, Z_NULL, 0);
---- libldm-0.2.3/src/ldm.c.orig 2012-09-21 12:21:17.000000000 +0200
-+++ libldm-0.2.3/src/ldm.c 2013-01-07 19:31:35.259147085 +0100
-@@ -1170,15 +1170,15 @@
- void ** const config, GError ** const err)
- {
- /* Sanity check ldm_config_start and ldm_config_size */
-- struct stat stat;
-- if (fstat(fd, &stat) == -1) {
-+ struct stat sstat;
-+ if (fstat(fd, &sstat) == -1) {
- g_set_error(err, LDM_ERROR, LDM_ERROR_IO,
- "Unable to stat %s: %m", path);
- return FALSE;
- }
-
-- uint64_t size = stat.st_size;
-- if (S_ISBLK(stat.st_mode)) {
-+ uint64_t size = sstat.st_size;
-+ if (S_ISBLK(sstat.st_mode)) {
- if (ioctl(fd, BLKGETSIZE64, &size) == -1) {
- g_set_error(err, LDM_ERROR, LDM_ERROR_IO,
- "Unable to get block device size for %s: %m", path);
-@@ -1205,10 +1205,10 @@
- }
-
- *config = g_malloc(config_size);
-- size_t read = 0;
-- while (read < config_size) {
-- ssize_t in = pread(fd, *config + read, config_size - read,
-- config_start + read);
-+ size_t nread = 0;
-+ while (nread < config_size) {
-+ ssize_t in = pread(fd, *config + nread, config_size - nread,
-+ config_start + nread);
- if (in == 0) {
- g_set_error(err, LDM_ERROR, LDM_ERROR_INVALID,
- "%s contains invalid LDM metadata", path);
-@@ -1221,7 +1221,7 @@
- goto error;
- }
-
-- read += in;
-+ nread += in;
- }
-
- return TRUE;
-@@ -1236,11 +1236,11 @@
- const uint64_t ph_start,
- struct _privhead * const privhead, GError **err)
- {
-- size_t read = 0;
-- while (read < sizeof(*privhead)) {
-- ssize_t in = pread(fd, (char *) privhead + read,
-- sizeof(*privhead) - read,
-- ph_start + read);
-+ size_t nread = 0;
-+ while (nread < sizeof(*privhead)) {
-+ ssize_t in = pread(fd, (char *) privhead + nread,
-+ sizeof(*privhead) - nread,
-+ ph_start + nread);
- if (in == 0) {
- g_set_error(err, LDM_ERROR, LDM_ERROR_INVALID,
- "%s contains invalid LDM metadata", path);
-@@ -1253,7 +1253,7 @@
- return FALSE;
- }
-
-- read += in;
-+ nread += in;
- }
-
- if (memcmp(privhead->magic, "PRIVHEAD", 8) != 0) {
---- libldm-0.2.3/src/ldm.c.orig 2013-01-07 19:44:31.767064210 +0100
-+++ libldm-0.2.3/src/ldm.c 2013-01-07 19:50:07.909184339 +0100
-@@ -2759,7 +2759,7 @@
- GString * chunk = _dm_create_part(part, cookie, err);
- if (chunk == NULL) {
- if (err && (*err)->code == LDM_ERROR_MISSING_DISK) {
-- g_warning((*err)->message);
-+ g_warning("%s", (*err)->message);
- g_error_free(*err); *err = NULL;
- g_string_append(target.params, " - -");
- continue;
-@@ -2804,7 +2804,7 @@
- for (int i = devices->len; i > 0; i--) {
- GString *device = g_array_index(devices, GString *, i - 1);
- if (!_dm_remove(device->str, 0, &cleanup_err)) {
-- g_warning(cleanup_err->message);
-+ g_warning("%s", cleanup_err->message);
- g_error_free(cleanup_err); cleanup_err = NULL;
- }
- }
-@@ -2847,7 +2847,7 @@
- GString * chunk = _dm_create_part(part, cookie, err);
- if (chunk == NULL) {
- if (err && (*err)->code == LDM_ERROR_MISSING_DISK) {
-- g_warning((*err)->message);
-+ g_warning("%s", (*err)->message);
- g_error_free(*err); *err = NULL;
- g_string_append(target.params, " - -");
- continue;
-@@ -2892,7 +2892,7 @@
- for (int i = devices->len; i > 0; i--) {
- GString *device = g_array_index(devices, GString *, i - 1);
- if (!_dm_remove(device->str, 0, &cleanup_err)) {
-- g_warning(cleanup_err->message);
-+ g_warning("%s", cleanup_err->message);
- g_error_free(cleanup_err); cleanup_err = NULL;
- }
- }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libldm.git/commitdiff/04d55bb1e28a02eedff5bbe0d24aad99b9306823
More information about the pld-cvs-commit
mailing list