diff options
Diffstat (limited to 'poky/meta/recipes-extended/parted')
13 files changed, 886 insertions, 0 deletions
diff --git a/poky/meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch b/poky/meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch new file mode 100644 index 000000000..b0376cefc --- /dev/null +++ b/poky/meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch @@ -0,0 +1,29 @@ +From d78dd087c4ec4715aab5fe115668e726046ecd76 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 13 Apr 2015 18:16:05 -0700 +Subject: [PATCH] Include fcntl.h in /platform_defs.h + +exposed when compiling using musl + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + libparted/fs/xfs/platform_defs.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libparted/fs/xfs/platform_defs.h b/libparted/fs/xfs/platform_defs.h +index 2b55752..32bd3d3 100644 +--- a/libparted/fs/xfs/platform_defs.h ++++ b/libparted/fs/xfs/platform_defs.h +@@ -42,6 +42,7 @@ + #include <stdlib.h> + #include <string.h> + #include <unistd.h> ++#include <fcntl.h> + #include <sys/param.h> + #include <sys/types.h> + +-- +2.1.4 + diff --git a/poky/meta/recipes-extended/parted/files/0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch b/poky/meta/recipes-extended/parted/files/0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch new file mode 100644 index 000000000..428b14ed5 --- /dev/null +++ b/poky/meta/recipes-extended/parted/files/0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch @@ -0,0 +1,44 @@ +From 6e82af54714392dcdf74a8aedaae7de7d0af1080 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Thu, 27 Apr 2017 16:37:24 +0300 +Subject: [PATCH] Move python helper scripts (used only in tests) to Python 3 + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + tests/gpt-header-move | 2 +- + tests/msdos-overlap | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tests/gpt-header-move b/tests/gpt-header-move +index 05cdc65..3cbcb7e 100755 +--- a/tests/gpt-header-move ++++ b/tests/gpt-header-move +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/env python3 + + # open img file, subtract 33 from altlba address, and move the last 33 sectors + # back by 33 sectors +diff --git a/tests/msdos-overlap b/tests/msdos-overlap +index 5bddfb0..3de7d2e 100755 +--- a/tests/msdos-overlap ++++ b/tests/msdos-overlap +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/env python3 + """ + Write an overlapping partition to a msdos disk + +@@ -14,7 +14,7 @@ BAD_ENTRY = (0x72, 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + OFFSET = 0x1b8 + + if len(sys.argv) < 2: +- print "%s: <image or device>" ++ print("%s: <image or device>") + sys.exit(1) + + data = "".join(chr(c) for c in BAD_ENTRY) +-- +2.11.0 + diff --git a/poky/meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch b/poky/meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch new file mode 100644 index 000000000..ba1a4bab4 --- /dev/null +++ b/poky/meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch @@ -0,0 +1,33 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/gnulib.mk b/lib/gnulib.mk +index e1d74db..c0e92dd 100644 +--- a/lib/gnulib.mk ++++ b/lib/gnulib.mk +@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \ +-- +2.1.4 + diff --git a/poky/meta/recipes-extended/parted/files/0001-libparted-Use-read-only-when-probing-devices-on-linu.patch b/poky/meta/recipes-extended/parted/files/0001-libparted-Use-read-only-when-probing-devices-on-linu.patch new file mode 100644 index 000000000..e522e1c6e --- /dev/null +++ b/poky/meta/recipes-extended/parted/files/0001-libparted-Use-read-only-when-probing-devices-on-linu.patch @@ -0,0 +1,224 @@ +From d6e15a60e84c1511523aa81272b7db7a6ec441d0 Mon Sep 17 00:00:00 2001 +From: Ovidiu Panait <ovidiu.panait@windriver.com> +Date: Tue, 26 Sep 2017 08:04:58 +0000 +Subject: [PATCH] libparted: Use read only when probing devices on linux + (#1245144) + +When a device is opened for RW closing it can trigger other actions, +like udev scanning it for partition changes. Use read only for the +init_* methods and RW for actual changes to the device. + +This adds _device_open which takes mode flags as an argument and turns +linux_open into a wrapper for it with RW_MODE. + +_device_open_ro is added to open the device with RD_MODE and increment +the open_counter. This is used in the init_* functions. + +_device_close is a wrapper around linux_close that decrements the +open_counter and is used in the init_* functions. + +All of these changes are self-contained with no external API changes. +The only visible change in behavior is that when a new PedDevice is +created the device is opened in RO_MODE instead of RW_MODE. + +Resolves: rhbz#1245144 + +Upstream-Status: Backport + +Author: Brian C. Lane <bcl@redhat.com> +Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> +--- + libparted/arch/linux.c | 62 +++++++++++++++++++++++++++++++++++--------------- + 1 file changed, 44 insertions(+), 18 deletions(-) + +diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c +index f612617..0a06a54 100644 +--- a/libparted/arch/linux.c ++++ b/libparted/arch/linux.c +@@ -294,7 +294,9 @@ struct blkdev_ioctl_param { + static char* _device_get_part_path (PedDevice const *dev, int num); + static int _partition_is_mounted_by_path (const char* path); + static unsigned int _device_get_partition_range(PedDevice const* dev); +- ++static int _device_open (PedDevice* dev, int flags); ++static int _device_open_ro (PedDevice* dev); ++static int _device_close (PedDevice* dev); + + static int + _read_fd (int fd, char **buf) +@@ -913,7 +915,7 @@ init_ide (PedDevice* dev) + if (!_device_stat (dev, &dev_stat)) + goto error; + +- if (!ped_device_open (dev)) ++ if (!_device_open_ro (dev)) + goto error; + + if (ioctl (arch_specific->fd, HDIO_GET_IDENTITY, &hdi)) { +@@ -982,11 +984,11 @@ init_ide (PedDevice* dev) + if (!_device_probe_geometry (dev)) + goto error_close_dev; + +- ped_device_close (dev); ++ _device_close (dev); + return 1; + + error_close_dev: +- ped_device_close (dev); ++ _device_close (dev); + error: + return 0; + } +@@ -1119,7 +1121,7 @@ init_scsi (PedDevice* dev) + char* vendor; + char* product; + +- if (!ped_device_open (dev)) ++ if (!_device_open_ro (dev)) + goto error; + + if (ioctl (arch_specific->fd, SCSI_IOCTL_GET_IDLUN, &idlun) < 0) { +@@ -1133,7 +1135,7 @@ init_scsi (PedDevice* dev) + goto error_close_dev; + if (!_device_probe_geometry (dev)) + goto error_close_dev; +- ped_device_close (dev); ++ _device_close (dev); + return 1; + } + +@@ -1155,11 +1157,11 @@ init_scsi (PedDevice* dev) + if (!_device_probe_geometry (dev)) + goto error_close_dev; + +- ped_device_close (dev); ++ _device_close (dev); + return 1; + + error_close_dev: +- ped_device_close (dev); ++ _device_close (dev); + error: + return 0; + } +@@ -1171,7 +1173,7 @@ init_file (PedDevice* dev) + + if (!_device_stat (dev, &dev_stat)) + goto error; +- if (!ped_device_open (dev)) ++ if (!_device_open_ro (dev)) + goto error; + + dev->sector_size = PED_SECTOR_SIZE_DEFAULT; +@@ -1198,7 +1200,7 @@ init_file (PedDevice* dev) + goto error_close_dev; + } + +- ped_device_close (dev); ++ _device_close (dev); + + dev->bios_geom.cylinders = dev->length / 4 / 32; + dev->bios_geom.heads = 4; +@@ -1209,7 +1211,7 @@ init_file (PedDevice* dev) + return 1; + + error_close_dev: +- ped_device_close (dev); ++ _device_close (dev); + error: + return 0; + } +@@ -1225,7 +1227,7 @@ init_dasd (PedDevice* dev, const char* model_name) + if (!_device_stat (dev, &dev_stat)) + goto error; + +- if (!ped_device_open (dev)) ++ if (!_device_open_ro (dev)) + goto error; + + LinuxSpecific* arch_specific = LINUX_SPECIFIC (dev); +@@ -1265,11 +1267,11 @@ init_dasd (PedDevice* dev, const char* model_name) + + dev->model = strdup (model_name); + +- ped_device_close (dev); ++ _device_close (dev); + return 1; + + error_close_dev: +- ped_device_close (dev); ++ _device_close (dev); + error: + return 0; + } +@@ -1284,7 +1286,7 @@ init_generic (PedDevice* dev, const char* model_name) + if (!_device_stat (dev, &dev_stat)) + goto error; + +- if (!ped_device_open (dev)) ++ if (!_device_open_ro (dev)) + goto error; + + ped_exception_fetch_all (); +@@ -1332,11 +1334,11 @@ init_generic (PedDevice* dev, const char* model_name) + + dev->model = strdup (model_name); + +- ped_device_close (dev); ++ _device_close (dev); + return 1; + + error_close_dev: +- ped_device_close (dev); ++ _device_close (dev); + error: + return 0; + } +@@ -1623,12 +1625,27 @@ retry: + } + + static int ++_device_open_ro (PedDevice* dev) ++{ ++ int rc = _device_open (dev, RD_MODE); ++ if (rc) ++ dev->open_count++; ++ return rc; ++} ++ ++static int + linux_open (PedDevice* dev) + { ++ return _device_open (dev, RW_MODE); ++} ++ ++static int ++_device_open (PedDevice* dev, int flags) ++{ + LinuxSpecific* arch_specific = LINUX_SPECIFIC (dev); + + retry: +- arch_specific->fd = open (dev->path, RW_MODE); ++ arch_specific->fd = open (dev->path, flags); + + if (arch_specific->fd == -1) { + char* rw_error_msg = strerror (errno); +@@ -1697,6 +1714,15 @@ linux_refresh_close (PedDevice* dev) + return 1; + } + ++static int ++_device_close (PedDevice* dev) ++{ ++ int rc = linux_close (dev); ++ if (dev->open_count > 0) ++ dev->open_count--; ++ return rc; ++} ++ + #if SIZEOF_OFF_T < 8 + + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) +-- +2.11.0 + diff --git a/poky/meta/recipes-extended/parted/files/0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch b/poky/meta/recipes-extended/parted/files/0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch new file mode 100644 index 000000000..bd2b5c55b --- /dev/null +++ b/poky/meta/recipes-extended/parted/files/0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch @@ -0,0 +1,34 @@ +From 5c99d7e4c2b5e7a957dc922aff03debfebbd6154 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> +Date: Fri, 3 Mar 2017 21:49:15 +0100 +Subject: [PATCH] libparted_fs_resize: link against libuuid explicitly to + unbreak gold linking on test +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +| ../libparted/fs/.libs/libparted-fs-resize.so: error: undefined reference to 'uuid_generate' + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> +--- + libparted/fs/Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libparted/fs/Makefile.am b/libparted/fs/Makefile.am +index d3cc8bc..c301b0b 100644 +--- a/libparted/fs/Makefile.am ++++ b/libparted/fs/Makefile.am +@@ -113,6 +113,8 @@ libparted_fs_resize_la_SOURCES = \ + r/hfs/reloc_plus.c \ + r/hfs/reloc_plus.h + ++libparted_fs_resize_la_LIBADD = $(UUID_LIBS) ++ + AM_CPPFLAGS = \ + -I$(top_srcdir)/libparted/labels \ + $(partedincludedir) \ +-- +2.9.3 + diff --git a/poky/meta/recipes-extended/parted/files/Makefile b/poky/meta/recipes-extended/parted/files/Makefile new file mode 100644 index 000000000..ee90be081 --- /dev/null +++ b/poky/meta/recipes-extended/parted/files/Makefile @@ -0,0 +1,285 @@ +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no + +am__tty_colors = \ +$(am__tty_colors_dummy); \ +test "X$(AM_COLOR_TESTS)" != Xno \ +&& test "X$$TERM" != Xdumb \ +&& { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \ +&& { \ + am__color_tests=yes; \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ +} + +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +am__rst_section = { sed 'p;s/./=/g;' && echo; } +am__sh_e_setup = case $$- in *e*) set +e;; esac + +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \ +test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) + +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` + +RECHECK_LOGS = $(TEST_LOGS) +TEST_SUITE_LOG = test-suite.log +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:.log=.log) +TEST_LOGS = $(am__test_logs2:.sh.log=.log) +SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +SH_LOG_COMPILE = $(SH_LOG_COMPILER) + +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac + +MKDIR_P = /bin/mkdir -p +SHELL = /bin/bash +VERSION = 3.1 +PACKAGE_STRING = GNU parted 3.1 +PACKAGE_BUGREPORT = bug-parted@gnu.org +abs_srcdir = $(PWD) +abs_top_builddir = $(PWD)/.. +abs_top_srcdir = $(PWD)/.. +srcdir = . +top_srcdir = .. +subdir = tests +SH_LOG_COMPILER = $(SHELL) + +TESTS = \ + help-version.sh \ + t0000-basic.sh \ + t0001-tiny.sh \ + t0010-script-no-ctrl-chars.sh \ + t0100-print.sh \ + t0101-print-empty.sh \ + t0200-gpt.sh \ + t0201-gpt.sh \ + t0202-gpt-pmbr.sh \ + t0203-gpt-tiny-device-abort.sh \ + t0203-gpt-shortened-device-primary-valid.sh \ + t0205-gpt-list-clobbers-pmbr.sh \ + t0206-gpt-print-with-corrupt-primary-clobbers-pmbr.sh \ + t0207-IEC-binary-notation.sh \ + t0208-mkpart-end-in-IEC.sh \ + t0209-gpt-pmbr_boot.sh \ + t0210-gpt-resized-partition-entry-array.sh \ + t0211-gpt-rewrite-header.sh \ + t0212-gpt-many-partitions.sh \ + t0220-gpt-msftres.sh \ + t0250-gpt.sh \ + t0280-gpt-corrupt.sh \ + t0300-dos-on-gpt.sh \ + t0400-loop-clobber-infloop.sh \ + t0500-dup-clobber.sh \ + t0501-duplicate.sh \ + t1100-busy-label.sh \ + t1101-busy-partition.sh \ + t1700-probe-fs.sh \ + t2200-dos-label-recog.sh \ + t2201-pc98-label-recog.sh \ + t2300-dos-label-extended-bootcode.sh \ + t2310-dos-extended-2-sector-min-offset.sh \ + t2400-dos-hfs-partition-type.sh \ + t2500-probe-corrupt-hfs.sh \ + t3000-resize-fs.sh \ + t3200-type-change.sh \ + t3300-palo-prep.sh \ + t3310-flags.sh \ + t3400-whole-disk-FAT-partition.sh \ + t4000-sun-raid-type.sh \ + t4001-sun-vtoc.sh \ + t4100-msdos-partition-limits.sh \ + t4100-dvh-partition-limits.sh \ + t4100-msdos-starting-sector.sh \ + t4200-partprobe.sh \ + t4300-nilfs2-tiny.sh \ + t5000-tags.sh \ + t6000-dm.sh \ + t6001-psep.sh \ + t6100-mdraid-partitions.sh \ + t7000-scripting.sh \ + t8000-loop.sh \ + t8001-loop-blkpg.sh \ + t9010-big-sector.sh \ + t9020-alignment.sh \ + t9021-maxima.sh \ + t9022-one-unit-snap.sh \ + t9023-value-lt-one.sh \ + t9030-align-check.sh \ + t9040-many-partitions.sh \ + t9041-undetected-in-use-16th-partition.sh \ + t9042-dos-partition-limit.sh \ + t9050-partition-table-types.sh + +TESTS_ENVIRONMENT = \ + export \ + abs_top_builddir='$(abs_top_builddir)' \ + abs_top_srcdir='$(abs_top_srcdir)' \ + abs_srcdir='$(abs_srcdir)' \ + built_programs=parted \ + srcdir='$(srcdir)' \ + top_srcdir='$(top_srcdir)' \ + VERSION=$(VERSION) \ + ; 9>&2 + +.SUFFIXES: .log + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for i in $$bases; do \ + if grep "^$$ws*:copy-in-global-log:$$ws*no$$ws*$$" $$i.trs \ + >/dev/null; then continue; \ + fi; \ + glob_res=`sed -n -e "s/$$ws*$$//" \ + -e "s/^$$ws*:global-test-result:$$ws*//p" \ + $$i.trs`; \ + test -n "$$glob_res" || glob_res=RUN; \ + echo "$$glob_res: $$i" | $(am__rst_section); \ + if test ! -r $$i.log; then \ + echo "fatal: making $@: $$i.log is unreadable" >&2; \ + exit 1; \ + fi; \ + cat $$i.log; echo; \ + done; \ + } >$(TEST_SUITE_LOG).tmp; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @if test $@ != recheck; then \ + list='$(RECHECK_LOGS)'; \ + test -z "$$list" || rm -f $$list; \ + fi + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @ws='[ ]'; \ + log_list='' trs_list=''; $(am__set_TESTS_bases); \ + for i in $$bases; do \ + if test -z "$$log_list"; then \ + log_list="$$i.log"; \ + else \ + log_list="$$log_list $$i.log"; \ + fi; \ + if test -z "$$trs_list"; then \ + trs_list="$$i.trs"; \ + else \ + trs_list="$$trs_list $$i.trs"; \ + fi; \ + done; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list" + +.sh.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) -- $(SH_LOG_COMPILE) "$$tst" diff --git a/poky/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch b/poky/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch new file mode 100644 index 000000000..68ab715f3 --- /dev/null +++ b/poky/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch @@ -0,0 +1,57 @@ +From 060e74354774d36d2c11ef08e3e7ea9b9b6e23fb Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Thu, 13 Nov 2014 11:29:33 +0800 +Subject: [PATCH] libparted/arch/linux.c: fix compile failure while + --disable-device-mapper + +While --disable-device-mapper, the MACRO ENABLE_DEVICE_MAPPER is +undef, but it missed to scope some device mapper functions. + +Upstream-Status: Pending + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + libparted/arch/linux.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c +index 6fd73c5..2afa479 100644 +--- a/libparted/arch/linux.c ++++ b/libparted/arch/linux.c +@@ -2320,6 +2320,7 @@ zasprintf (const char *format, ...) + static char * + dm_canonical_path (PedDevice const *dev) + { ++#ifdef ENABLE_DEVICE_MAPPER + LinuxSpecific const *arch_specific = LINUX_SPECIFIC (dev); + + /* Get map name from devicemapper */ +@@ -2337,6 +2338,7 @@ dm_canonical_path (PedDevice const *dev) + dm_task_destroy (task); + return dev_name; + err: ++#endif + return NULL; + } + +@@ -2957,13 +2959,15 @@ _disk_sync_part_table (PedDisk* disk) + unsigned long long *start, + unsigned long long *length); + +- ++#ifdef ENABLE_DEVICE_MAPPER + if (disk->dev->type == PED_DEVICE_DM) { + add_partition = _dm_add_partition; + remove_partition = _dm_remove_partition; + resize_partition = _dm_resize_partition; + get_partition_start_and_length = _dm_get_partition_start_and_length; +- } else { ++ } else ++#endif ++ { + add_partition = _blkpg_add_partition; + remove_partition = _blkpg_remove_partition; + #ifdef BLKPG_RESIZE_PARTITION +-- +1.9.1 + diff --git a/poky/meta/recipes-extended/parted/files/fix-doc-mandir.patch b/poky/meta/recipes-extended/parted/files/fix-doc-mandir.patch new file mode 100644 index 000000000..0711d4e29 --- /dev/null +++ b/poky/meta/recipes-extended/parted/files/fix-doc-mandir.patch @@ -0,0 +1,20 @@ +Upstream-Status: Submitted [bug-parted@gnu.org] + +| for po in `ls -1 ./*.pt_BR.po 2>/dev/null`; do \ +| make $(basename ${po%.pt_BR.po}); \ +| done +| Makefile:904: *** Recursive variable `mandir' references itself (eventually). Stop. + +Signed-off-by: Andreas Oberritter <obi@opendreambox.org> + +--- parted-3.1/doc/po4a.mk.orig 2012-03-15 14:09:11.555831872 +0100 ++++ parted-3.1/doc/po4a.mk 2012-03-15 14:10:44.243830985 +0100 +@@ -23,7 +23,7 @@ + # threshold is 80%), it won't be distributed, and the build won't fail. + # + +-mandir = $(mandir)/$(lang) ++mandir := $(mandir)/$(lang) + + # Inform automake that we want to install some man pages in section 1, 5 + # and 8. diff --git a/poky/meta/recipes-extended/parted/files/no_check.patch b/poky/meta/recipes-extended/parted/files/no_check.patch new file mode 100644 index 000000000..e6a26d11a --- /dev/null +++ b/poky/meta/recipes-extended/parted/files/no_check.patch @@ -0,0 +1,20 @@ +Upstream-Status: Inappropriate [configuration] + +If check is detected, it makes the builds non-determinstic so just force +it to be disabled. + +RP - 4/11/08 + +Index: parted-3.2/configure.ac +=================================================================== +--- parted-3.2.orig/configure.ac ++++ parted-3.2/configure.ac +@@ -555,7 +555,7 @@ AC_CHECK_HEADER([execinfo.h], [ + AM_CONDITIONAL([COMPILE_FOR_S390], [test "$host_cpu" = s390 || test "$host_cpu" = s390x]) + + dnl check for "check", unit testing library/header +-PKG_CHECK_MODULES([CHECK], [check >= 0.9.3], have_check=yes, have_check=no) ++have_check=no + if test "$have_check" != "yes"; then + AC_MSG_RESULT([Unable to locate check version 0.9.3 or higher: not building]) + fi diff --git a/poky/meta/recipes-extended/parted/files/run-ptest b/poky/meta/recipes-extended/parted/files/run-ptest new file mode 100644 index 000000000..695c5e8a7 --- /dev/null +++ b/poky/meta/recipes-extended/parted/files/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +make -C tests check-TESTS diff --git a/poky/meta/recipes-extended/parted/files/syscalls.patch b/poky/meta/recipes-extended/parted/files/syscalls.patch new file mode 100644 index 000000000..93205a0a8 --- /dev/null +++ b/poky/meta/recipes-extended/parted/files/syscalls.patch @@ -0,0 +1,55 @@ +Upstream-Status: Pending + +--- + libparted/arch/linux.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +Index: parted-3.2/libparted/arch/linux.c +=================================================================== +--- parted-3.2.orig/libparted/arch/linux.c ++++ parted-3.2/libparted/arch/linux.c +@@ -17,6 +17,8 @@ + + #define PROC_DEVICES_BUFSIZ 16384 + ++#include <linux/version.h> ++ + #include <config.h> + #include <arch/linux.h> + #include <linux/blkpg.h> +@@ -1696,12 +1698,14 @@ linux_refresh_close (PedDevice* dev) + + #if SIZEOF_OFF_T < 8 + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) + static _syscall5(int,_llseek, + unsigned int, fd, + unsigned long, offset_high, + unsigned long, offset_low, + loff_t*, result, + unsigned int, origin) ++#endif + + loff_t + llseek (unsigned int fd, loff_t offset, unsigned int whence) +@@ -1709,11 +1713,20 @@ llseek (unsigned int fd, loff_t offset, + loff_t result; + int retval; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) + retval = _llseek(fd, + ((unsigned long long)offset) >> 32, + ((unsigned long long)offset) & 0xffffffff, + &result, + whence); ++#else ++ retval = syscall(__NR__llseek, fd, ++ ((unsigned long long)offset) >> 32, ++ ((unsigned long long)offset) & 0xffffffff, ++ &result, ++ whence); ++#endif ++ + return (retval==-1 ? (loff_t) retval : result); + } + diff --git a/poky/meta/recipes-extended/parted/parted/parted-3.2-sysmacros.patch b/poky/meta/recipes-extended/parted/parted/parted-3.2-sysmacros.patch new file mode 100644 index 000000000..211e6c734 --- /dev/null +++ b/poky/meta/recipes-extended/parted/parted/parted-3.2-sysmacros.patch @@ -0,0 +1,32 @@ +https://bugs.gentoo.org/580022 + +From dec8995fe80508374beba6356f6ecbba8ef6b18b Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Tue, 21 Jun 2016 15:01:08 -0400 +Subject: [PATCH] include sysmacros.h for major/minor/makedev + +Linux C libs are moving away from including this header implicitly via +sys/types.h, so include it explicitly. + +Upstream-Status: Pending +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> + +--- + libparted/arch/linux.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c +index 326b95619d31..e5c168be3c68 100644 +--- a/libparted/arch/linux.c ++++ b/libparted/arch/linux.c +@@ -37,6 +37,7 @@ + #include <dirent.h> + #include <sys/ioctl.h> + #include <sys/stat.h> ++#include <sys/sysmacros.h> + #include <sys/types.h> + #include <sys/utsname.h> /* for uname() */ + #include <scsi/scsi.h> +-- +2.8.2 + diff --git a/poky/meta/recipes-extended/parted/parted_3.2.bb b/poky/meta/recipes-extended/parted/parted_3.2.bb new file mode 100644 index 000000000..ab30108bf --- /dev/null +++ b/poky/meta/recipes-extended/parted/parted_3.2.bb @@ -0,0 +1,50 @@ +SUMMARY = "Disk partition editing/resizing utility" +HOMEPAGE = "http://www.gnu.org/software/parted/parted.html" +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c" +SECTION = "console/tools" +DEPENDS = "ncurses readline util-linux virtual/libiconv" +PR = "r1" + +SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \ + file://no_check.patch \ + file://syscalls.patch \ + file://fix-doc-mandir.patch \ + file://fix-compile-failure-while-dis.patch \ + file://0001-Include-fcntl.h-in-platform_defs.h.patch \ + file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ + file://0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch \ + file://0001-Move-python-helper-scripts-used-only-in-tests-to-Pyt.patch \ + file://parted-3.2-sysmacros.patch \ + file://run-ptest \ + file://Makefile \ + file://0001-libparted-Use-read-only-when-probing-devices-on-linu.patch \ +" + +SRC_URI[md5sum] = "0247b6a7b314f8edeb618159fa95f9cb" +SRC_URI[sha256sum] = "858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4" + +EXTRA_OECONF = "--disable-device-mapper" + +inherit autotools pkgconfig gettext texinfo ptest + +BBCLASSEXTEND = "native" + +do_compile_ptest() { + oe_runmake -C tests print-align print-max dup-clobber duplicate fs-resize +} + +do_install_ptest() { + t=${D}${PTEST_PATH} + mkdir $t/build-aux + cp ${S}/build-aux/test-driver $t/build-aux/ + cp -r ${S}/tests $t + cp ${WORKDIR}/Makefile $t/tests/ + sed -i "s|^VERSION.*|VERSION = ${PV}|g" $t/tests/Makefile + for i in print-align print-max dup-clobber duplicate fs-resize; \ + do cp ${B}/tests/.libs/$i $t/tests/; \ + done + sed -e 's| ../parted||' -i $t/tests/*.sh +} + +RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python3" |