diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2019-12-12 19:14:24 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-16 23:25:49 +0000 |
commit | 634264a924288d5c48c4f26af0dfdf017a7b0f62 (patch) | |
tree | af615fe754b407e602aceeba60cc1aa9629c0697 /meta/recipes-extended | |
parent | d62895e112e25f72308cb31f70aeb16d7eefb008 (diff) | |
download | poky-634264a924288d5c48c4f26af0dfdf017a7b0f62.tar.gz |
parted: update 3.2->3.3
0001-Unset-need_charset_alias-when-building-for-musl.patch is no longer
necessary as upstream has removed the code.
dm_check.patch is replaced with 0002-tests-use-skip_-rather-than-skip_test_-which-is-unde.patch
Rework ptests, in particular remove the generated Makefile
from the layer, and use the upstream Makefile.
Ptest pass rate is 100%.
(From OE-Core rev: 5dc6529d0b5b8b1bef12b90008f0a25612bd453e)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
12 files changed, 117 insertions, 737 deletions
diff --git a/meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch b/meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch deleted file mode 100644 index 4070127d34..0000000000 --- a/meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
3 | |||
4 | From a3877115f1956949096d77aca5a703a47ed68397 Mon Sep 17 00:00:00 2001 | ||
5 | From: Felix Janda <felix.janda@posteo.de> | ||
6 | Date: Sun, 3 May 2015 10:33:31 +0200 | ||
7 | Subject: [PATCH] libparted/fs/xfs/platform_defs.h: Include <fcntl.h> for | ||
8 | loff_t | ||
9 | |||
10 | This is needed for compilation with musl libc | ||
11 | |||
12 | Suggested-by: Travis Tilley <ttilley@gmail.com> | ||
13 | |||
14 | Signed-off-by: Brian C. Lane <bcl@redhat.com> | ||
15 | --- | ||
16 | libparted/fs/xfs/platform_defs.h | 1 + | ||
17 | 1 file changed, 1 insertion(+) | ||
18 | |||
19 | diff --git a/libparted/fs/xfs/platform_defs.h b/libparted/fs/xfs/platform_defs.h | ||
20 | index 2b55752..a6ec8fb 100644 | ||
21 | --- a/libparted/fs/xfs/platform_defs.h | ||
22 | +++ b/libparted/fs/xfs/platform_defs.h | ||
23 | @@ -38,6 +38,7 @@ | ||
24 | #include <stdarg.h> | ||
25 | #include <assert.h> | ||
26 | #include <endian.h> | ||
27 | +#include <fcntl.h> | ||
28 | #include <stddef.h> | ||
29 | #include <stdlib.h> | ||
30 | #include <string.h> | ||
31 | -- | ||
32 | 2.11.0 | ||
33 | |||
diff --git a/meta/recipes-extended/parted/files/0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch b/meta/recipes-extended/parted/files/0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch index 428b14ed5e..829c0c8b78 100644 --- a/meta/recipes-extended/parted/files/0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch +++ b/meta/recipes-extended/parted/files/0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch | |||
@@ -1,17 +1,18 @@ | |||
1 | From 6e82af54714392dcdf74a8aedaae7de7d0af1080 Mon Sep 17 00:00:00 2001 | 1 | From ddbefd80d74c3baaae328332458db447e1666240 Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Thu, 27 Apr 2017 16:37:24 +0300 | 3 | Date: Thu, 27 Apr 2017 16:37:24 +0300 |
4 | Subject: [PATCH] Move python helper scripts (used only in tests) to Python 3 | 4 | Subject: [PATCH] Move python helper scripts (used only in tests) to Python 3 |
5 | 5 | ||
6 | Upstream-Status: Pending | 6 | Upstream-Status: Pending |
7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | 7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
8 | |||
8 | --- | 9 | --- |
9 | tests/gpt-header-move | 2 +- | 10 | tests/gpt-header-move | 2 +- |
10 | tests/msdos-overlap | 4 ++-- | 11 | tests/msdos-overlap | 2 +- |
11 | 2 files changed, 3 insertions(+), 3 deletions(-) | 12 | 2 files changed, 2 insertions(+), 2 deletions(-) |
12 | 13 | ||
13 | diff --git a/tests/gpt-header-move b/tests/gpt-header-move | 14 | diff --git a/tests/gpt-header-move b/tests/gpt-header-move |
14 | index 05cdc65..3cbcb7e 100755 | 15 | index 3dda5cb..a2b9508 100755 |
15 | --- a/tests/gpt-header-move | 16 | --- a/tests/gpt-header-move |
16 | +++ b/tests/gpt-header-move | 17 | +++ b/tests/gpt-header-move |
17 | @@ -1,4 +1,4 @@ | 18 | @@ -1,4 +1,4 @@ |
@@ -21,7 +22,7 @@ index 05cdc65..3cbcb7e 100755 | |||
21 | # open img file, subtract 33 from altlba address, and move the last 33 sectors | 22 | # open img file, subtract 33 from altlba address, and move the last 33 sectors |
22 | # back by 33 sectors | 23 | # back by 33 sectors |
23 | diff --git a/tests/msdos-overlap b/tests/msdos-overlap | 24 | diff --git a/tests/msdos-overlap b/tests/msdos-overlap |
24 | index 5bddfb0..3de7d2e 100755 | 25 | index d6ae8d6..2c6747b 100755 |
25 | --- a/tests/msdos-overlap | 26 | --- a/tests/msdos-overlap |
26 | +++ b/tests/msdos-overlap | 27 | +++ b/tests/msdos-overlap |
27 | @@ -1,4 +1,4 @@ | 28 | @@ -1,4 +1,4 @@ |
@@ -30,15 +31,3 @@ index 5bddfb0..3de7d2e 100755 | |||
30 | """ | 31 | """ |
31 | Write an overlapping partition to a msdos disk | 32 | Write an overlapping partition to a msdos disk |
32 | 33 | ||
33 | @@ -14,7 +14,7 @@ BAD_ENTRY = (0x72, 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
34 | OFFSET = 0x1b8 | ||
35 | |||
36 | if len(sys.argv) < 2: | ||
37 | - print "%s: <image or device>" | ||
38 | + print("%s: <image or device>") | ||
39 | sys.exit(1) | ||
40 | |||
41 | data = "".join(chr(c) for c in BAD_ENTRY) | ||
42 | -- | ||
43 | 2.11.0 | ||
44 | |||
diff --git a/meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch deleted file mode 100644 index ba1a4bab4c..0000000000 --- a/meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 13 Apr 2015 17:02:13 -0700 | ||
4 | Subject: [PATCH] Unset need_charset_alias when building for musl | ||
5 | |||
6 | localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 | ||
7 | which actually shoudl be fixed in gnulib and then all downstream | ||
8 | projects will get it eventually. For now we apply the fix to | ||
9 | coreutils | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | lib/gnulib.mk | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/lib/gnulib.mk b/lib/gnulib.mk | ||
19 | index e1d74db..c0e92dd 100644 | ||
20 | --- a/lib/gnulib.mk | ||
21 | +++ b/lib/gnulib.mk | ||
22 | @@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local | ||
23 | case '$(host_os)' in \ | ||
24 | darwin[56]*) \ | ||
25 | need_charset_alias=true ;; \ | ||
26 | - darwin* | cygwin* | mingw* | pw32* | cegcc*) \ | ||
27 | + darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ | ||
28 | need_charset_alias=false ;; \ | ||
29 | *) \ | ||
30 | need_charset_alias=true ;; \ | ||
31 | -- | ||
32 | 2.1.4 | ||
33 | |||
diff --git a/meta/recipes-extended/parted/files/0001-libparted-Use-read-only-when-probing-devices-on-linu.patch b/meta/recipes-extended/parted/files/0001-libparted-Use-read-only-when-probing-devices-on-linu.patch deleted file mode 100644 index 39107620d5..0000000000 --- a/meta/recipes-extended/parted/files/0001-libparted-Use-read-only-when-probing-devices-on-linu.patch +++ /dev/null | |||
@@ -1,222 +0,0 @@ | |||
1 | From 843225aa9d5077bebdb08bbf9699c02aec0b83eb Mon Sep 17 00:00:00 2001 | ||
2 | From: "Brian C. Lane" <bcl@redhat.com> | ||
3 | Date: Tue, 26 Sep 2017 08:04:58 +0000 | ||
4 | Subject: [PATCH] libparted: Use read only when probing devices on linux | ||
5 | |||
6 | (#1245144) | ||
7 | |||
8 | When a device is opened for RW closing it can trigger other actions, | ||
9 | like udev scanning it for partition changes. Use read only for the | ||
10 | init_* methods and RW for actual changes to the device. | ||
11 | |||
12 | This adds _device_open which takes mode flags as an argument and turns | ||
13 | linux_open into a wrapper for it with RW_MODE. | ||
14 | |||
15 | _device_open_ro is added to open the device with RD_MODE and increment | ||
16 | the open_counter. This is used in the init_* functions. | ||
17 | |||
18 | _device_close is a wrapper around linux_close that decrements the | ||
19 | open_counter and is used in the init_* functions. | ||
20 | |||
21 | All of these changes are self-contained with no external API changes. | ||
22 | The only visible change in behavior is that when a new PedDevice is | ||
23 | created the device is opened in RO_MODE instead of RW_MODE. | ||
24 | |||
25 | Resolves: rhbz#1245144 | ||
26 | |||
27 | Upstream-Status: Backport | ||
28 | |||
29 | Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> | ||
30 | |||
31 | --- | ||
32 | libparted/arch/linux.c | 62 +++++++++++++++++++++++++++++++++++--------------- | ||
33 | 1 file changed, 44 insertions(+), 18 deletions(-) | ||
34 | |||
35 | diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c | ||
36 | index 7f12f58..4ddea58 100644 | ||
37 | --- a/libparted/arch/linux.c | ||
38 | +++ b/libparted/arch/linux.c | ||
39 | @@ -292,7 +292,9 @@ struct blkdev_ioctl_param { | ||
40 | static char* _device_get_part_path (PedDevice const *dev, int num); | ||
41 | static int _partition_is_mounted_by_path (const char* path); | ||
42 | static unsigned int _device_get_partition_range(PedDevice const* dev); | ||
43 | - | ||
44 | +static int _device_open (PedDevice* dev, int flags); | ||
45 | +static int _device_open_ro (PedDevice* dev); | ||
46 | +static int _device_close (PedDevice* dev); | ||
47 | |||
48 | static int | ||
49 | _read_fd (int fd, char **buf) | ||
50 | @@ -911,7 +913,7 @@ init_ide (PedDevice* dev) | ||
51 | if (!_device_stat (dev, &dev_stat)) | ||
52 | goto error; | ||
53 | |||
54 | - if (!ped_device_open (dev)) | ||
55 | + if (!_device_open_ro (dev)) | ||
56 | goto error; | ||
57 | |||
58 | if (ioctl (arch_specific->fd, HDIO_GET_IDENTITY, &hdi)) { | ||
59 | @@ -980,11 +982,11 @@ init_ide (PedDevice* dev) | ||
60 | if (!_device_probe_geometry (dev)) | ||
61 | goto error_close_dev; | ||
62 | |||
63 | - ped_device_close (dev); | ||
64 | + _device_close (dev); | ||
65 | return 1; | ||
66 | |||
67 | error_close_dev: | ||
68 | - ped_device_close (dev); | ||
69 | + _device_close (dev); | ||
70 | error: | ||
71 | return 0; | ||
72 | } | ||
73 | @@ -1117,7 +1119,7 @@ init_scsi (PedDevice* dev) | ||
74 | char* vendor; | ||
75 | char* product; | ||
76 | |||
77 | - if (!ped_device_open (dev)) | ||
78 | + if (!_device_open_ro (dev)) | ||
79 | goto error; | ||
80 | |||
81 | if (ioctl (arch_specific->fd, SCSI_IOCTL_GET_IDLUN, &idlun) < 0) { | ||
82 | @@ -1131,7 +1133,7 @@ init_scsi (PedDevice* dev) | ||
83 | goto error_close_dev; | ||
84 | if (!_device_probe_geometry (dev)) | ||
85 | goto error_close_dev; | ||
86 | - ped_device_close (dev); | ||
87 | + _device_close (dev); | ||
88 | return 1; | ||
89 | } | ||
90 | |||
91 | @@ -1153,11 +1155,11 @@ init_scsi (PedDevice* dev) | ||
92 | if (!_device_probe_geometry (dev)) | ||
93 | goto error_close_dev; | ||
94 | |||
95 | - ped_device_close (dev); | ||
96 | + _device_close (dev); | ||
97 | return 1; | ||
98 | |||
99 | error_close_dev: | ||
100 | - ped_device_close (dev); | ||
101 | + _device_close (dev); | ||
102 | error: | ||
103 | return 0; | ||
104 | } | ||
105 | @@ -1169,7 +1171,7 @@ init_file (PedDevice* dev) | ||
106 | |||
107 | if (!_device_stat (dev, &dev_stat)) | ||
108 | goto error; | ||
109 | - if (!ped_device_open (dev)) | ||
110 | + if (!_device_open_ro (dev)) | ||
111 | goto error; | ||
112 | |||
113 | dev->sector_size = PED_SECTOR_SIZE_DEFAULT; | ||
114 | @@ -1196,7 +1198,7 @@ init_file (PedDevice* dev) | ||
115 | goto error_close_dev; | ||
116 | } | ||
117 | |||
118 | - ped_device_close (dev); | ||
119 | + _device_close (dev); | ||
120 | |||
121 | dev->bios_geom.cylinders = dev->length / 4 / 32; | ||
122 | dev->bios_geom.heads = 4; | ||
123 | @@ -1207,7 +1209,7 @@ init_file (PedDevice* dev) | ||
124 | return 1; | ||
125 | |||
126 | error_close_dev: | ||
127 | - ped_device_close (dev); | ||
128 | + _device_close (dev); | ||
129 | error: | ||
130 | return 0; | ||
131 | } | ||
132 | @@ -1223,7 +1225,7 @@ init_dasd (PedDevice* dev, const char* model_name) | ||
133 | if (!_device_stat (dev, &dev_stat)) | ||
134 | goto error; | ||
135 | |||
136 | - if (!ped_device_open (dev)) | ||
137 | + if (!_device_open_ro (dev)) | ||
138 | goto error; | ||
139 | |||
140 | LinuxSpecific* arch_specific = LINUX_SPECIFIC (dev); | ||
141 | @@ -1263,11 +1265,11 @@ init_dasd (PedDevice* dev, const char* model_name) | ||
142 | |||
143 | dev->model = strdup (model_name); | ||
144 | |||
145 | - ped_device_close (dev); | ||
146 | + _device_close (dev); | ||
147 | return 1; | ||
148 | |||
149 | error_close_dev: | ||
150 | - ped_device_close (dev); | ||
151 | + _device_close (dev); | ||
152 | error: | ||
153 | return 0; | ||
154 | } | ||
155 | @@ -1282,7 +1284,7 @@ init_generic (PedDevice* dev, const char* model_name) | ||
156 | if (!_device_stat (dev, &dev_stat)) | ||
157 | goto error; | ||
158 | |||
159 | - if (!ped_device_open (dev)) | ||
160 | + if (!_device_open_ro (dev)) | ||
161 | goto error; | ||
162 | |||
163 | ped_exception_fetch_all (); | ||
164 | @@ -1330,11 +1332,11 @@ init_generic (PedDevice* dev, const char* model_name) | ||
165 | |||
166 | dev->model = strdup (model_name); | ||
167 | |||
168 | - ped_device_close (dev); | ||
169 | + _device_close (dev); | ||
170 | return 1; | ||
171 | |||
172 | error_close_dev: | ||
173 | - ped_device_close (dev); | ||
174 | + _device_close (dev); | ||
175 | error: | ||
176 | return 0; | ||
177 | } | ||
178 | @@ -1621,12 +1623,27 @@ retry: | ||
179 | } | ||
180 | |||
181 | static int | ||
182 | +_device_open_ro (PedDevice* dev) | ||
183 | +{ | ||
184 | + int rc = _device_open (dev, RD_MODE); | ||
185 | + if (rc) | ||
186 | + dev->open_count++; | ||
187 | + return rc; | ||
188 | +} | ||
189 | + | ||
190 | +static int | ||
191 | linux_open (PedDevice* dev) | ||
192 | { | ||
193 | + return _device_open (dev, RW_MODE); | ||
194 | +} | ||
195 | + | ||
196 | +static int | ||
197 | +_device_open (PedDevice* dev, int flags) | ||
198 | +{ | ||
199 | LinuxSpecific* arch_specific = LINUX_SPECIFIC (dev); | ||
200 | |||
201 | retry: | ||
202 | - arch_specific->fd = open (dev->path, RW_MODE); | ||
203 | + arch_specific->fd = open (dev->path, flags); | ||
204 | |||
205 | if (arch_specific->fd == -1) { | ||
206 | char* rw_error_msg = strerror (errno); | ||
207 | @@ -1695,6 +1712,15 @@ linux_refresh_close (PedDevice* dev) | ||
208 | return 1; | ||
209 | } | ||
210 | |||
211 | +static int | ||
212 | +_device_close (PedDevice* dev) | ||
213 | +{ | ||
214 | + int rc = linux_close (dev); | ||
215 | + if (dev->open_count > 0) | ||
216 | + dev->open_count--; | ||
217 | + return rc; | ||
218 | +} | ||
219 | + | ||
220 | #if SIZEOF_OFF_T < 8 | ||
221 | |||
222 | static _syscall5(int,_llseek, | ||
diff --git a/meta/recipes-extended/parted/files/0001-libparted-fs-add-sourcedir-lib-to-include-paths.patch b/meta/recipes-extended/parted/files/0001-libparted-fs-add-sourcedir-lib-to-include-paths.patch new file mode 100644 index 0000000000..4dc2ab259d --- /dev/null +++ b/meta/recipes-extended/parted/files/0001-libparted-fs-add-sourcedir-lib-to-include-paths.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From d60a8a86f6593738b5324ccd8fe3e6d84a1fe7bc Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Wed, 11 Dec 2019 14:18:36 +0100 | ||
4 | Subject: [PATCH] libparted/fs: add $sourcedir/lib to include paths | ||
5 | |||
6 | Otherwise, getopt-pfx-core.h won't be found. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
10 | --- | ||
11 | libparted/fs/Makefile.am | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/libparted/fs/Makefile.am b/libparted/fs/Makefile.am | ||
15 | index 286bff6..65f45d3 100644 | ||
16 | --- a/libparted/fs/Makefile.am | ||
17 | +++ b/libparted/fs/Makefile.am | ||
18 | @@ -3,7 +3,7 @@ | ||
19 | # | ||
20 | # This file may be modified and/or distributed without restriction. | ||
21 | |||
22 | -partedincludedir = -I$(top_builddir)/include -I$(top_srcdir)/include | ||
23 | +partedincludedir = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/lib | ||
24 | |||
25 | AM_CFLAGS = $(WARN_CFLAGS) | ||
26 | |||
diff --git a/meta/recipes-extended/parted/files/0001-linux-Include-sys-sysmacros.h-for-major-macro.patch b/meta/recipes-extended/parted/files/0001-linux-Include-sys-sysmacros.h-for-major-macro.patch deleted file mode 100644 index 01262e5452..0000000000 --- a/meta/recipes-extended/parted/files/0001-linux-Include-sys-sysmacros.h-for-major-macro.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
3 | |||
4 | From 0b72b8eb41438b62eeb9e3548b0b8f3094a78681 Mon Sep 17 00:00:00 2001 | ||
5 | From: "Richard W.M. Jones" <rjones@redhat.com> | ||
6 | Date: Sat, 24 Mar 2018 17:37:02 +0000 | ||
7 | Subject: [PATCH] linux: Include <sys/sysmacros.h> for major() macro. | ||
8 | |||
9 | Since glibc 2.27 this header is required. | ||
10 | --- | ||
11 | libparted/arch/linux.c | 1 + | ||
12 | 1 file changed, 1 insertion(+) | ||
13 | |||
14 | diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c | ||
15 | index 0f18904..a15854f 100644 | ||
16 | --- a/libparted/arch/linux.c | ||
17 | +++ b/libparted/arch/linux.c | ||
18 | @@ -41,6 +41,7 @@ | ||
19 | #include <sys/utsname.h> /* for uname() */ | ||
20 | #include <scsi/scsi.h> | ||
21 | #include <assert.h> | ||
22 | +#include <sys/sysmacros.h> | ||
23 | #ifdef ENABLE_DEVICE_MAPPER | ||
24 | #include <libdevmapper.h> | ||
25 | #endif | ||
26 | -- | ||
27 | 2.11.0 | ||
28 | |||
diff --git a/meta/recipes-extended/parted/files/0002-tests-use-skip_-rather-than-skip_test_-which-is-unde.patch b/meta/recipes-extended/parted/files/0002-tests-use-skip_-rather-than-skip_test_-which-is-unde.patch new file mode 100644 index 0000000000..9524adf7b8 --- /dev/null +++ b/meta/recipes-extended/parted/files/0002-tests-use-skip_-rather-than-skip_test_-which-is-unde.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | From 9f844484cedb39e301b016e9da7852c1a0fb6eea Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Wed, 11 Dec 2019 16:27:48 +0100 | ||
4 | Subject: [PATCH] tests: use skip_ rather than skip_test_ (which is undefined) | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
8 | --- | ||
9 | tests/t6001-psep.sh | 2 +- | ||
10 | tests/t6004-dm-many-partitions.sh | 2 +- | ||
11 | tests/t6005-dm-uuid.sh | 2 +- | ||
12 | tests/t6006-dm-512b-sectors.sh | 2 +- | ||
13 | 4 files changed, 4 insertions(+), 4 deletions(-) | ||
14 | |||
15 | diff --git a/tests/t6001-psep.sh b/tests/t6001-psep.sh | ||
16 | index e350bd2..67014a0 100644 | ||
17 | --- a/tests/t6001-psep.sh | ||
18 | +++ b/tests/t6001-psep.sh | ||
19 | @@ -21,7 +21,7 @@ | ||
20 | require_root_ | ||
21 | require_udevadm_settle_ | ||
22 | |||
23 | -(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" | ||
24 | +(dmsetup --help) > /dev/null 2>&1 || skip_ "No dmsetup installed" | ||
25 | |||
26 | # Device maps names - should be random to not conflict with existing ones on | ||
27 | # the system | ||
28 | diff --git a/tests/t6004-dm-many-partitions.sh b/tests/t6004-dm-many-partitions.sh | ||
29 | index b4be975..7214f60 100755 | ||
30 | --- a/tests/t6004-dm-many-partitions.sh | ||
31 | +++ b/tests/t6004-dm-many-partitions.sh | ||
32 | @@ -21,7 +21,7 @@ | ||
33 | |||
34 | require_root_ | ||
35 | require_udevadm_settle_ | ||
36 | -(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" | ||
37 | +(dmsetup --help) > /dev/null 2>&1 || skip_ "No dmsetup installed" | ||
38 | |||
39 | ss=$sector_size_ | ||
40 | ns=300 | ||
41 | diff --git a/tests/t6005-dm-uuid.sh b/tests/t6005-dm-uuid.sh | ||
42 | index 4266747..4790a8b 100755 | ||
43 | --- a/tests/t6005-dm-uuid.sh | ||
44 | +++ b/tests/t6005-dm-uuid.sh | ||
45 | @@ -21,7 +21,7 @@ | ||
46 | |||
47 | require_root_ | ||
48 | require_udevadm_settle_ | ||
49 | -(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" | ||
50 | +(dmsetup --help) > /dev/null 2>&1 || skip_ "No dmsetup installed" | ||
51 | |||
52 | ss=$sector_size_ | ||
53 | ns=300 | ||
54 | diff --git a/tests/t6006-dm-512b-sectors.sh b/tests/t6006-dm-512b-sectors.sh | ||
55 | index bf32135..b679adb 100644 | ||
56 | --- a/tests/t6006-dm-512b-sectors.sh | ||
57 | +++ b/tests/t6006-dm-512b-sectors.sh | ||
58 | @@ -25,7 +25,7 @@ require_scsi_debug_module_ | ||
59 | grep '^#define USE_BLKID 1' "$CONFIG_HEADER" > /dev/null || | ||
60 | skip_ 'this system lacks a new-enough libblkid' | ||
61 | |||
62 | -(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" | ||
63 | +(dmsetup --help) > /dev/null 2>&1 || skip_ "No dmsetup installed" | ||
64 | |||
65 | # Device maps names - should be random to not conflict with existing ones on | ||
66 | # the system | ||
diff --git a/meta/recipes-extended/parted/files/Makefile b/meta/recipes-extended/parted/files/Makefile deleted file mode 100644 index ee90be0814..0000000000 --- a/meta/recipes-extended/parted/files/Makefile +++ /dev/null | |||
@@ -1,285 +0,0 @@ | |||
1 | am__tty_colors_dummy = \ | ||
2 | mgn= red= grn= lgn= blu= brg= std=; \ | ||
3 | am__color_tests=no | ||
4 | |||
5 | am__tty_colors = \ | ||
6 | $(am__tty_colors_dummy); \ | ||
7 | test "X$(AM_COLOR_TESTS)" != Xno \ | ||
8 | && test "X$$TERM" != Xdumb \ | ||
9 | && { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \ | ||
10 | && { \ | ||
11 | am__color_tests=yes; \ | ||
12 | red='[0;31m'; \ | ||
13 | grn='[0;32m'; \ | ||
14 | lgn='[1;32m'; \ | ||
15 | blu='[1;34m'; \ | ||
16 | mgn='[0;35m'; \ | ||
17 | brg='[1m'; \ | ||
18 | std='[m'; \ | ||
19 | } | ||
20 | |||
21 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
22 | am__vpath_adj = case $$p in \ | ||
23 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
24 | *) f=$$p;; \ | ||
25 | esac; | ||
26 | am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } | ||
27 | am__rst_section = { sed 'p;s/./=/g;' && echo; } | ||
28 | am__sh_e_setup = case $$- in *e*) set +e;; esac | ||
29 | |||
30 | am__common_driver_flags = \ | ||
31 | --color-tests "$$am__color_tests" \ | ||
32 | --enable-hard-errors "$$am__enable_hard_errors" \ | ||
33 | --expect-failure "$$am__expect_failure" | ||
34 | am__check_pre = \ | ||
35 | $(am__sh_e_setup); \ | ||
36 | $(am__vpath_adj_setup) $(am__vpath_adj) \ | ||
37 | $(am__tty_colors); \ | ||
38 | srcdir=$(srcdir); export srcdir; \ | ||
39 | am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \ | ||
40 | test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \ | ||
41 | if test -f "./$$f"; then dir=./; \ | ||
42 | elif test -f "$$f"; then dir=; \ | ||
43 | else dir="$(srcdir)/"; fi; \ | ||
44 | tst=$$dir$$f; log='$@'; \ | ||
45 | if test -n '$(DISABLE_HARD_ERRORS)'; then \ | ||
46 | am__enable_hard_errors=no; \ | ||
47 | else \ | ||
48 | am__enable_hard_errors=yes; \ | ||
49 | fi; \ | ||
50 | $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) | ||
51 | |||
52 | am__set_TESTS_bases = \ | ||
53 | bases='$(TEST_LOGS)'; \ | ||
54 | bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ | ||
55 | bases=`echo $$bases` | ||
56 | |||
57 | RECHECK_LOGS = $(TEST_LOGS) | ||
58 | TEST_SUITE_LOG = test-suite.log | ||
59 | am__test_logs1 = $(TESTS:=.log) | ||
60 | am__test_logs2 = $(am__test_logs1:.log=.log) | ||
61 | TEST_LOGS = $(am__test_logs2:.sh.log=.log) | ||
62 | SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver | ||
63 | SH_LOG_COMPILE = $(SH_LOG_COMPILER) | ||
64 | |||
65 | am__set_b = \ | ||
66 | case '$@' in \ | ||
67 | */*) \ | ||
68 | case '$*' in \ | ||
69 | */*) b='$*';; \ | ||
70 | *) b=`echo '$@' | sed 's/\.log$$//'`; \ | ||
71 | esac;; \ | ||
72 | *) \ | ||
73 | b='$*';; \ | ||
74 | esac | ||
75 | |||
76 | MKDIR_P = /bin/mkdir -p | ||
77 | SHELL = /bin/bash | ||
78 | VERSION = 3.1 | ||
79 | PACKAGE_STRING = GNU parted 3.1 | ||
80 | PACKAGE_BUGREPORT = bug-parted@gnu.org | ||
81 | abs_srcdir = $(PWD) | ||
82 | abs_top_builddir = $(PWD)/.. | ||
83 | abs_top_srcdir = $(PWD)/.. | ||
84 | srcdir = . | ||
85 | top_srcdir = .. | ||
86 | subdir = tests | ||
87 | SH_LOG_COMPILER = $(SHELL) | ||
88 | |||
89 | TESTS = \ | ||
90 | help-version.sh \ | ||
91 | t0000-basic.sh \ | ||
92 | t0001-tiny.sh \ | ||
93 | t0010-script-no-ctrl-chars.sh \ | ||
94 | t0100-print.sh \ | ||
95 | t0101-print-empty.sh \ | ||
96 | t0200-gpt.sh \ | ||
97 | t0201-gpt.sh \ | ||
98 | t0202-gpt-pmbr.sh \ | ||
99 | t0203-gpt-tiny-device-abort.sh \ | ||
100 | t0203-gpt-shortened-device-primary-valid.sh \ | ||
101 | t0205-gpt-list-clobbers-pmbr.sh \ | ||
102 | t0206-gpt-print-with-corrupt-primary-clobbers-pmbr.sh \ | ||
103 | t0207-IEC-binary-notation.sh \ | ||
104 | t0208-mkpart-end-in-IEC.sh \ | ||
105 | t0209-gpt-pmbr_boot.sh \ | ||
106 | t0210-gpt-resized-partition-entry-array.sh \ | ||
107 | t0211-gpt-rewrite-header.sh \ | ||
108 | t0212-gpt-many-partitions.sh \ | ||
109 | t0220-gpt-msftres.sh \ | ||
110 | t0250-gpt.sh \ | ||
111 | t0280-gpt-corrupt.sh \ | ||
112 | t0300-dos-on-gpt.sh \ | ||
113 | t0400-loop-clobber-infloop.sh \ | ||
114 | t0500-dup-clobber.sh \ | ||
115 | t0501-duplicate.sh \ | ||
116 | t1100-busy-label.sh \ | ||
117 | t1101-busy-partition.sh \ | ||
118 | t1700-probe-fs.sh \ | ||
119 | t2200-dos-label-recog.sh \ | ||
120 | t2201-pc98-label-recog.sh \ | ||
121 | t2300-dos-label-extended-bootcode.sh \ | ||
122 | t2310-dos-extended-2-sector-min-offset.sh \ | ||
123 | t2400-dos-hfs-partition-type.sh \ | ||
124 | t2500-probe-corrupt-hfs.sh \ | ||
125 | t3000-resize-fs.sh \ | ||
126 | t3200-type-change.sh \ | ||
127 | t3300-palo-prep.sh \ | ||
128 | t3310-flags.sh \ | ||
129 | t3400-whole-disk-FAT-partition.sh \ | ||
130 | t4000-sun-raid-type.sh \ | ||
131 | t4001-sun-vtoc.sh \ | ||
132 | t4100-msdos-partition-limits.sh \ | ||
133 | t4100-dvh-partition-limits.sh \ | ||
134 | t4100-msdos-starting-sector.sh \ | ||
135 | t4200-partprobe.sh \ | ||
136 | t4300-nilfs2-tiny.sh \ | ||
137 | t5000-tags.sh \ | ||
138 | t6000-dm.sh \ | ||
139 | t6001-psep.sh \ | ||
140 | t6100-mdraid-partitions.sh \ | ||
141 | t7000-scripting.sh \ | ||
142 | t8000-loop.sh \ | ||
143 | t8001-loop-blkpg.sh \ | ||
144 | t9010-big-sector.sh \ | ||
145 | t9020-alignment.sh \ | ||
146 | t9021-maxima.sh \ | ||
147 | t9022-one-unit-snap.sh \ | ||
148 | t9023-value-lt-one.sh \ | ||
149 | t9030-align-check.sh \ | ||
150 | t9040-many-partitions.sh \ | ||
151 | t9041-undetected-in-use-16th-partition.sh \ | ||
152 | t9042-dos-partition-limit.sh \ | ||
153 | t9050-partition-table-types.sh | ||
154 | |||
155 | TESTS_ENVIRONMENT = \ | ||
156 | export \ | ||
157 | abs_top_builddir='$(abs_top_builddir)' \ | ||
158 | abs_top_srcdir='$(abs_top_srcdir)' \ | ||
159 | abs_srcdir='$(abs_srcdir)' \ | ||
160 | built_programs=parted \ | ||
161 | srcdir='$(srcdir)' \ | ||
162 | top_srcdir='$(top_srcdir)' \ | ||
163 | VERSION=$(VERSION) \ | ||
164 | ; 9>&2 | ||
165 | |||
166 | .SUFFIXES: .log | ||
167 | |||
168 | $(TEST_SUITE_LOG): $(TEST_LOGS) | ||
169 | @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ | ||
170 | ws='[ ]'; \ | ||
171 | results=`for b in $$bases; do echo $$b.trs; done`; \ | ||
172 | test -n "$$results" || results=/dev/null; \ | ||
173 | all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ | ||
174 | pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ | ||
175 | fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ | ||
176 | skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ | ||
177 | xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ | ||
178 | xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ | ||
179 | error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ | ||
180 | if test `expr $$fail + $$xpass + $$error` -eq 0; then \ | ||
181 | success=true; \ | ||
182 | else \ | ||
183 | success=false; \ | ||
184 | fi; \ | ||
185 | br='==================='; br=$$br$$br$$br$$br; \ | ||
186 | result_count () \ | ||
187 | { \ | ||
188 | if test x"$$1" = x"--maybe-color"; then \ | ||
189 | maybe_colorize=yes; \ | ||
190 | elif test x"$$1" = x"--no-color"; then \ | ||
191 | maybe_colorize=no; \ | ||
192 | else \ | ||
193 | echo "$@: invalid 'result_count' usage" >&2; exit 4; \ | ||
194 | fi; \ | ||
195 | shift; \ | ||
196 | desc=$$1 count=$$2; \ | ||
197 | if test $$maybe_colorize = yes && test $$count -gt 0; then \ | ||
198 | color_start=$$3 color_end=$$std; \ | ||
199 | else \ | ||
200 | color_start= color_end=; \ | ||
201 | fi; \ | ||
202 | echo "$${color_start}# $$desc $$count$${color_end}"; \ | ||
203 | }; \ | ||
204 | create_testsuite_report () \ | ||
205 | { \ | ||
206 | result_count $$1 "TOTAL:" $$all "$$brg"; \ | ||
207 | result_count $$1 "PASS: " $$pass "$$grn"; \ | ||
208 | result_count $$1 "SKIP: " $$skip "$$blu"; \ | ||
209 | result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ | ||
210 | result_count $$1 "FAIL: " $$fail "$$red"; \ | ||
211 | result_count $$1 "XPASS:" $$xpass "$$red"; \ | ||
212 | result_count $$1 "ERROR:" $$error "$$mgn"; \ | ||
213 | }; \ | ||
214 | { \ | ||
215 | echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ | ||
216 | $(am__rst_title); \ | ||
217 | create_testsuite_report --no-color; \ | ||
218 | echo; \ | ||
219 | echo ".. contents:: :depth: 2"; \ | ||
220 | echo; \ | ||
221 | for i in $$bases; do \ | ||
222 | if grep "^$$ws*:copy-in-global-log:$$ws*no$$ws*$$" $$i.trs \ | ||
223 | >/dev/null; then continue; \ | ||
224 | fi; \ | ||
225 | glob_res=`sed -n -e "s/$$ws*$$//" \ | ||
226 | -e "s/^$$ws*:global-test-result:$$ws*//p" \ | ||
227 | $$i.trs`; \ | ||
228 | test -n "$$glob_res" || glob_res=RUN; \ | ||
229 | echo "$$glob_res: $$i" | $(am__rst_section); \ | ||
230 | if test ! -r $$i.log; then \ | ||
231 | echo "fatal: making $@: $$i.log is unreadable" >&2; \ | ||
232 | exit 1; \ | ||
233 | fi; \ | ||
234 | cat $$i.log; echo; \ | ||
235 | done; \ | ||
236 | } >$(TEST_SUITE_LOG).tmp; \ | ||
237 | mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ | ||
238 | if $$success; then \ | ||
239 | col="$$grn"; \ | ||
240 | else \ | ||
241 | col="$$red"; \ | ||
242 | test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ | ||
243 | fi; \ | ||
244 | echo "$${col}$$br$${std}"; \ | ||
245 | echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ | ||
246 | echo "$${col}$$br$${std}"; \ | ||
247 | create_testsuite_report --maybe-color; \ | ||
248 | echo "$$col$$br$$std"; \ | ||
249 | if $$success; then :; else \ | ||
250 | echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ | ||
251 | if test -n "$(PACKAGE_BUGREPORT)"; then \ | ||
252 | echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ | ||
253 | fi; \ | ||
254 | echo "$$col$$br$$std"; \ | ||
255 | fi; \ | ||
256 | $$success || exit 1 | ||
257 | |||
258 | check-TESTS: | ||
259 | @if test $@ != recheck; then \ | ||
260 | list='$(RECHECK_LOGS)'; \ | ||
261 | test -z "$$list" || rm -f $$list; \ | ||
262 | fi | ||
263 | @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) | ||
264 | @ws='[ ]'; \ | ||
265 | log_list='' trs_list=''; $(am__set_TESTS_bases); \ | ||
266 | for i in $$bases; do \ | ||
267 | if test -z "$$log_list"; then \ | ||
268 | log_list="$$i.log"; \ | ||
269 | else \ | ||
270 | log_list="$$log_list $$i.log"; \ | ||
271 | fi; \ | ||
272 | if test -z "$$trs_list"; then \ | ||
273 | trs_list="$$i.trs"; \ | ||
274 | else \ | ||
275 | trs_list="$$trs_list $$i.trs"; \ | ||
276 | fi; \ | ||
277 | done; \ | ||
278 | $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list" | ||
279 | |||
280 | .sh.log: | ||
281 | @p='$<'; \ | ||
282 | $(am__set_b); \ | ||
283 | $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ | ||
284 | --log-file $$b.log --trs-file $$b.trs \ | ||
285 | $(am__common_driver_flags) -- $(SH_LOG_COMPILE) "$$tst" | ||
diff --git a/meta/recipes-extended/parted/files/dm_check.patch b/meta/recipes-extended/parted/files/dm_check.patch deleted file mode 100644 index 5f3c4ddae8..0000000000 --- a/meta/recipes-extended/parted/files/dm_check.patch +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | parted: change check for device-manager | ||
2 | |||
3 | Other ptests use this method. | ||
4 | |||
5 | Upstream-Status: Submitted [bug-parted@gnu.org] | ||
6 | |||
7 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | ||
8 | |||
9 | |||
10 | --- a/tests/t6001-psep.sh | ||
11 | +++ b/tests/t6001-psep.sh | ||
12 | @@ -19,7 +19,9 @@ | ||
13 | . "${srcdir=.}/init.sh"; path_prepend_ ../parted | ||
14 | |||
15 | require_root_ | ||
16 | -(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" | ||
17 | + | ||
18 | +test "x$ENABLE_DEVICE_MAPPER" = xyes \ | ||
19 | + || skip_ "no device-mapper support" | ||
20 | |||
21 | # Device maps names - should be random to not conflict with existing ones on | ||
22 | # the system | ||
diff --git a/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch b/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch deleted file mode 100644 index 8c4d2ae66d..0000000000 --- a/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
3 | |||
4 | From da3f129710929abe9a403901fa7d168355b0e95a Mon Sep 17 00:00:00 2001 | ||
5 | From: Felix Janda <felix.janda@posteo.de> | ||
6 | Date: Sun, 3 May 2015 10:33:15 +0200 | ||
7 | Subject: [PATCH] libparted/arch/linux.c: Compile without ENABLE_DEVICE_MAPPER | ||
8 | |||
9 | Signed-off-by: Brian C. Lane <bcl@redhat.com> | ||
10 | --- | ||
11 | libparted/arch/linux.c | 21 +++++++++++++++++---- | ||
12 | 1 file changed, 17 insertions(+), 4 deletions(-) | ||
13 | |||
14 | diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c | ||
15 | index a15854f..7f12f58 100644 | ||
16 | --- a/libparted/arch/linux.c | ||
17 | +++ b/libparted/arch/linux.c | ||
18 | @@ -2305,6 +2305,7 @@ zasprintf (const char *format, ...) | ||
19 | return r < 0 ? NULL : resultp; | ||
20 | } | ||
21 | |||
22 | +#ifdef ENABLE_DEVICE_MAPPER | ||
23 | static char * | ||
24 | dm_canonical_path (PedDevice const *dev) | ||
25 | { | ||
26 | @@ -2327,14 +2328,21 @@ dm_canonical_path (PedDevice const *dev) | ||
27 | err: | ||
28 | return NULL; | ||
29 | } | ||
30 | +#endif | ||
31 | |||
32 | static char* | ||
33 | _device_get_part_path (PedDevice const *dev, int num) | ||
34 | { | ||
35 | - char *devpath = (dev->type == PED_DEVICE_DM | ||
36 | - ? dm_canonical_path (dev) : dev->path); | ||
37 | - size_t path_len = strlen (devpath); | ||
38 | + char *devpath; | ||
39 | + size_t path_len; | ||
40 | char *result; | ||
41 | +#ifdef ENABLE_DEVICE_MAPPER | ||
42 | + devpath = (dev->type == PED_DEVICE_DM | ||
43 | + ? dm_canonical_path (dev) : dev->path); | ||
44 | +#else | ||
45 | + devpath = dev->path; | ||
46 | +#endif | ||
47 | + path_len = strlen (devpath); | ||
48 | /* Check for devfs-style /disc => /partN transformation | ||
49 | unconditionally; the system might be using udev with devfs rules, | ||
50 | and if not the test is harmless. */ | ||
51 | @@ -2350,8 +2358,10 @@ _device_get_part_path (PedDevice const *dev, int num) | ||
52 | ? "p" : ""); | ||
53 | result = zasprintf ("%s%s%d", devpath, p, num); | ||
54 | } | ||
55 | +#ifdef ENABLE_DEVICE_MAPPER | ||
56 | if (dev->type == PED_DEVICE_DM) | ||
57 | free (devpath); | ||
58 | +#endif | ||
59 | return result; | ||
60 | } | ||
61 | |||
62 | @@ -2946,12 +2956,15 @@ _disk_sync_part_table (PedDisk* disk) | ||
63 | unsigned long long *length); | ||
64 | |||
65 | |||
66 | +#ifdef ENABLE_DEVICE_MAPPER | ||
67 | if (disk->dev->type == PED_DEVICE_DM) { | ||
68 | add_partition = _dm_add_partition; | ||
69 | remove_partition = _dm_remove_partition; | ||
70 | resize_partition = _dm_resize_partition; | ||
71 | get_partition_start_and_length = _dm_get_partition_start_and_length; | ||
72 | - } else { | ||
73 | + } else | ||
74 | +#endif | ||
75 | + { | ||
76 | add_partition = _blkpg_add_partition; | ||
77 | remove_partition = _blkpg_remove_partition; | ||
78 | #ifdef BLKPG_RESIZE_PARTITION | ||
79 | -- | ||
80 | 2.11.0 | ||
81 | |||
diff --git a/meta/recipes-extended/parted/files/run-ptest b/meta/recipes-extended/parted/files/run-ptest index 695c5e8a7b..b57c29400a 100644 --- a/meta/recipes-extended/parted/files/run-ptest +++ b/meta/recipes-extended/parted/files/run-ptest | |||
@@ -1,3 +1,3 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | make -C tests check-TESTS | 3 | make -C tests test-suite.log |
diff --git a/meta/recipes-extended/parted/parted_3.2.bb b/meta/recipes-extended/parted/parted_3.3.bb index 21a815345a..1cfd9ec264 100644 --- a/meta/recipes-extended/parted/parted_3.2.bb +++ b/meta/recipes-extended/parted/parted_3.3.bb | |||
@@ -4,25 +4,19 @@ LICENSE = "GPLv3+" | |||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c" |
5 | SECTION = "console/tools" | 5 | SECTION = "console/tools" |
6 | DEPENDS = "ncurses readline util-linux virtual/libiconv" | 6 | DEPENDS = "ncurses readline util-linux virtual/libiconv" |
7 | PR = "r1" | ||
8 | 7 | ||
9 | SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \ | 8 | SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \ |
10 | file://no_check.patch \ | 9 | file://no_check.patch \ |
11 | file://fix-doc-mandir.patch \ | 10 | file://fix-doc-mandir.patch \ |
12 | file://fix-compile-failure-while-dis.patch \ | ||
13 | file://0001-Include-fcntl.h-in-platform_defs.h.patch \ | ||
14 | file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ | ||
15 | file://0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch \ | 11 | file://0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch \ |
16 | file://0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch \ | 12 | file://0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch \ |
17 | file://0001-linux-Include-sys-sysmacros.h-for-major-macro.patch \ | ||
18 | file://run-ptest \ | 13 | file://run-ptest \ |
19 | file://Makefile \ | 14 | file://0001-libparted-fs-add-sourcedir-lib-to-include-paths.patch \ |
20 | file://0001-libparted-Use-read-only-when-probing-devices-on-linu.patch \ | 15 | file://0002-tests-use-skip_-rather-than-skip_test_-which-is-unde.patch \ |
21 | file://dm_check.patch \ | 16 | " |
22 | " | ||
23 | 17 | ||
24 | SRC_URI[md5sum] = "0247b6a7b314f8edeb618159fa95f9cb" | 18 | SRC_URI[md5sum] = "090655d05f3c471aa8e15a27536889ec" |
25 | SRC_URI[sha256sum] = "858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4" | 19 | SRC_URI[sha256sum] = "57e2b4bd87018625c515421d4524f6e3b55175b472302056391c5f7eccb83d44" |
26 | 20 | ||
27 | EXTRA_OECONF = "--disable-device-mapper" | 21 | EXTRA_OECONF = "--disable-device-mapper" |
28 | 22 | ||
@@ -31,7 +25,7 @@ inherit autotools pkgconfig gettext texinfo ptest | |||
31 | BBCLASSEXTEND = "native" | 25 | BBCLASSEXTEND = "native" |
32 | 26 | ||
33 | do_compile_ptest() { | 27 | do_compile_ptest() { |
34 | oe_runmake -C tests print-align print-max dup-clobber duplicate fs-resize | 28 | oe_runmake -C tests print-align print-max dup-clobber duplicate fs-resize print-flags |
35 | } | 29 | } |
36 | 30 | ||
37 | do_install_ptest() { | 31 | do_install_ptest() { |
@@ -39,15 +33,24 @@ do_install_ptest() { | |||
39 | mkdir $t/build-aux | 33 | mkdir $t/build-aux |
40 | cp ${S}/build-aux/test-driver $t/build-aux/ | 34 | cp ${S}/build-aux/test-driver $t/build-aux/ |
41 | cp -r ${S}/tests $t | 35 | cp -r ${S}/tests $t |
42 | cp ${WORKDIR}/Makefile $t/tests/ | 36 | cp ${B}/tests/Makefile $t/tests/ |
43 | sed -i "s|^VERSION.*|VERSION = ${PV}|g" $t/tests/Makefile | 37 | sed -i "s|^VERSION.*|VERSION = ${PV}|g" $t/tests/Makefile |
44 | for i in print-align print-max dup-clobber duplicate fs-resize; \ | 38 | sed -i "s|^srcdir =.*|srcdir = \.|g" $t/tests/Makefile |
39 | sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" $t/tests/Makefile | ||
40 | sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = \.\.|g" $t/tests/Makefile | ||
41 | sed -i "s|^Makefile:.*|Makefile:|g" $t/tests/Makefile | ||
42 | for i in print-align print-max print-flags dup-clobber duplicate fs-resize; \ | ||
45 | do cp ${B}/tests/.libs/$i $t/tests/; \ | 43 | do cp ${B}/tests/.libs/$i $t/tests/; \ |
46 | done | 44 | done |
47 | sed -e 's| ../parted||' -i $t/tests/*.sh | 45 | sed -e 's| ../parted||' -i $t/tests/*.sh |
48 | } | 46 | } |
49 | 47 | ||
50 | RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python3 make" | 48 | RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python3 make gawk e2fsprogs-mke2fs" |
49 | |||
50 | RDEPENDS_${PN}-ptest_append_libc-glibc = "\ | ||
51 | glibc-utils \ | ||
52 | locale-base-en-us \ | ||
53 | " | ||
51 | 54 | ||
52 | inherit update-alternatives | 55 | inherit update-alternatives |
53 | 56 | ||