From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- sys-block/parted/Manifest | 21 +++ sys-block/parted/files/parted-2.4-no-gets.patch | 10 ++ sys-block/parted/files/parted-2.4-readline.patch | 11 ++ sys-block/parted/files/parted-3.1-readline.patch | 11 ++ sys-block/parted/files/parted-3.1-zfs.patch | 170 +++++++++++++++++++++ sys-block/parted/files/parted-3.2-devmapper.patch | 60 ++++++++ .../files/parted-3.2-fix-resizing-FAT16.patch | 64 ++++++++ .../parted/files/parted-3.2-po4a-mandir.patch | 11 ++ sys-block/parted/files/parted-3.2-sysmacros.patch | 28 ++++ sys-block/parted/metadata.xml | 20 +++ sys-block/parted/parted-2.4-r1.ebuild | 54 +++++++ sys-block/parted/parted-2.4.ebuild | 55 +++++++ sys-block/parted/parted-3.1-r1.ebuild | 81 ++++++++++ sys-block/parted/parted-3.1-r2.ebuild | 85 +++++++++++ sys-block/parted/parted-3.2-r1.ebuild | 60 ++++++++ sys-block/parted/parted-3.2-r2.ebuild | 63 ++++++++ sys-block/parted/parted-3.2.ebuild | 57 +++++++ 17 files changed, 861 insertions(+) create mode 100644 sys-block/parted/Manifest create mode 100644 sys-block/parted/files/parted-2.4-no-gets.patch create mode 100644 sys-block/parted/files/parted-2.4-readline.patch create mode 100644 sys-block/parted/files/parted-3.1-readline.patch create mode 100644 sys-block/parted/files/parted-3.1-zfs.patch create mode 100644 sys-block/parted/files/parted-3.2-devmapper.patch create mode 100644 sys-block/parted/files/parted-3.2-fix-resizing-FAT16.patch create mode 100644 sys-block/parted/files/parted-3.2-po4a-mandir.patch create mode 100644 sys-block/parted/files/parted-3.2-sysmacros.patch create mode 100644 sys-block/parted/metadata.xml create mode 100644 sys-block/parted/parted-2.4-r1.ebuild create mode 100644 sys-block/parted/parted-2.4.ebuild create mode 100644 sys-block/parted/parted-3.1-r1.ebuild create mode 100644 sys-block/parted/parted-3.1-r2.ebuild create mode 100644 sys-block/parted/parted-3.2-r1.ebuild create mode 100644 sys-block/parted/parted-3.2-r2.ebuild create mode 100644 sys-block/parted/parted-3.2.ebuild (limited to 'sys-block/parted') diff --git a/sys-block/parted/Manifest b/sys-block/parted/Manifest new file mode 100644 index 000000000000..95032cc73561 --- /dev/null +++ b/sys-block/parted/Manifest @@ -0,0 +1,21 @@ +AUX parted-2.4-no-gets.patch 343 SHA256 d9d984baa7b742e2201c34b36233dceeca5f97ce245fcfca50881a42f6479366 SHA512 9538ad4c6fcc26662395f1cc768c297db0e864b5912346819d71aa85affdede68e96e43d3d5c1249971d921c33595e8980b8298430510924b7bf6f6982dabf5c WHIRLPOOL b6f4b9e7b6a68a7a662345e56bcef560272db1e91eb328ac2f73fcadfeba084ffeab0c1576c59aa942461ee14ed17649ed708e68d9262888732afb7ebdb10e00 +AUX parted-2.4-readline.patch 340 SHA256 22ed598c1e56b0b11a8d238ca304e05d480a5eb25833098f617484909a4416bd SHA512 965a24fd7a9c21b65ce3b55618c127b102a6e0b3783b6ed020d032d3aa572d0323ff845b390e1cb6460ac089f308b7e18b875ada2aebb5e5e8726c4beb7a8da5 WHIRLPOOL 5077c7b9ef49661a4533845c66ad17295a1832cb3e7791cba8e762d592656a2614d3d794e4c89eda69e1f78810671e8c919b8af8bd85f00b3801a36608ec584c +AUX parted-3.1-readline.patch 340 SHA256 a6ee5fd919a2a035309b70decce60514587a27d1603f361a48dbaf2757b8a8cc SHA512 a32774fb51fee399a2d2248415efc3a9ebe948c342f42704b38b23abfa1067845e8dffd606cb24ed5f971ce7ec3e18b707f72c0d00cb20a4d0dc6350dbb12c29 WHIRLPOOL bd494816afd1c0310848538233509212397d0add3b60579264a4ca2b00babcd2144b708318c26b5e2791787e439df18921e6fc521f931298ec96476f0179260c +AUX parted-3.1-zfs.patch 4767 SHA256 86dda57387dda83ca0380264cd8536c21cb59f91e83def29194b67e3ab07770c SHA512 2970595d4d507b5fddc3506430c5fa5f4778c493733879289e1ae6314442a29930b97acf3cdf1b1b0ff26c3c5d3b5bf4b1300a3a4ba35daf2d654a8c0d75863d WHIRLPOOL 74585b9a4f5553a7c8b3b2b6eb3871f8353ec1566dafbaea2010c995a6895f89330ff9593b58ee4bc119b7bcc4ed4f155bb279a426767031cfef70e66cd723d6 +AUX parted-3.2-devmapper.patch 1972 SHA256 a72db7a487b891b19e6b859a6deaa4defe0c603842f1a91962de553e68acc96f SHA512 3baf2090ba86242df1633bb4b50deeb6e0226b0a56ad82466ddd76f028a859e29bd021f1f251047cd2a2a5ea1c77ed0129eca8be2e97ee48c21c1d186c07b8da WHIRLPOOL c0a16dce6f967b6d4d343bec9fe34c0803fdb231aa51abede4b94080db90af8be36d232f9d24246808a59be13be7635b520b0ec6c2cd82a99515c2ad0866f876 +AUX parted-3.2-fix-resizing-FAT16.patch 2383 SHA256 9c65dd09b11a6a64a642d3c71196636342beff2fad8935a6b21fd2af8115f9d9 SHA512 31a79f24de58fdbc77b50790372019083375acace66f9a9d3fc93c6ec22988b7198fda13c3790e00518f7a2878de1efb914658f517d275c6ecfd3e507bc4cd15 WHIRLPOOL 5fc70247606531a1dc09a82800d8d58ffe3860c68ddd0c47e7c22c1824f55b6e89f04834421732655c90d420155aac8939aa067644660e4e35cffedd7a08e3b1 +AUX parted-3.2-po4a-mandir.patch 275 SHA256 327ffc2ea942a58a63cf6dc21d041965ee76b3b7d4d01b36a0654dcb6b0a92ae SHA512 5ef686f56d8c3939da3f24fdb6196d8858c2f980805f1cb06020d6f6996158f62b8372a233ec3ec98aae30b41034046d615e415b3abf2648db7be88e3b45a872 WHIRLPOOL 643013b78ebd6dbd93a60e7fc46215851bcd9d3166f0df308fa9d1a3927772cf1d63d2ba0da737983b3fbb0ff125f946d27662808e6233f6c60bdf4f7425898d +AUX parted-3.2-sysmacros.patch 804 SHA256 bb3d1d964ee7a7bc61dfd5e62f31f0cbcf585fa5a61df1e3372f86b6b1dfb9dc SHA512 97c141d623bc52387b3726a164c5191c094cef1b2aa000dbd8e505aab418210d27ad07a59e0433faf001bf12ee1e3729838186fc2bae69ed7a66941364e3b468 WHIRLPOOL 36368508d17cbc853de467377cd187143775979d25f1c4a83bcf17af2ce283472685eed9eb2d75a9ad24f80184e66e8987a6924297e17cd441497f6c7d26bad1 +DIST parted-2.4.tar.xz 1516412 SHA256 508ff75591b9c8cc9d06f1e0b1db1a082a4b0c1b9d4efaac48b4ca46370d9073 SHA512 1f7ac11079981b176c1157bd6d858e67394bb4be9b622f91d4e78412a41c696809ed60912b8b94f3a2a924b2f43638dd5d6cb6f4c28e8dc63a2d421380cb5477 WHIRLPOOL 688a44c88ffd99523f17eb5c8722cf4ee09bd0af105ab45a7bd08050682345288182f90bbebf6fed8bdbb1a4deac965084a0f430ef6490d154671de58de50574 +DIST parted-3.1.tar.xz 1524344 SHA256 5e9cc1f91eaf016e5033d85b9b893fd6d3ffaca532a48de1082df9b94225ca15 SHA512 f29a67a16cf79f08abbfc5eeb6ad0480d834aa50e715378626dc89e3b12ce71f19202e9f38429e5521ebe877c4e74ff1e08f0b0ecbdbe79ba1c51fdcbef6e852 WHIRLPOOL 8e4c0b3f045405acbf5eab8d72d46450cb5c6adc50b9eba4ad4a9600da9ea203b412cf151d03782b045dc7f6232bd79ace85d01ce9d2faba458ee48b9df00de9 +DIST parted-3.2.tar.xz 1655244 SHA256 858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4 SHA512 4e37dbdd6f5032c9ebfec43704f6882379597d038167b9c4d04053efa083c68a705196713864451fa9e11d32777e16c68982877945c5efd9ea5f8252cb20e1c4 WHIRLPOOL af928177b893150ac6d5e0efcef542b6fa0df6b135f975078f7d8d5f7a4b109ef4c1f8eeaf6afc5c34448ff662ce4cbe5289e084f4ec05257666503a0cd3c93f +EBUILD parted-2.4-r1.ebuild 1276 SHA256 563b6ac318655c794e7ff35ea5e3e793be0163634e3a70baf8c2a142225f955f SHA512 8d9e927273fb73fe4dddafc862b0cd7db994c21f016b367b6ecd083496207adbde9ad75b0a5d1c9a2e73c5f6035bf69dc95d9e73051e6fb7e298a9ae31ce79bb WHIRLPOOL 5beb0413453a77bbbf9b52b505126b49d039521d58a88b697c1f351bab5f14f2d32aa17fdf413bbe66061d5682a238d3ef86206d1c122d1fda4627a3a2409dbc +EBUILD parted-2.4.ebuild 1287 SHA256 0d8cc6944f5cc118b99c324f9334c8c6c2aeb4fade8ceb8b7c2d5f34bfeeb646 SHA512 71e30ebc780d6a2e5f15cdf61dfe600abbe832641a90690e5fe21ff12ea96e479f2c04a0930dcb869aa9b4f720d0efabca6ee88f3da9567f2e7630e0e7bc145a WHIRLPOOL 4ffee62b735f72ee125dcb75d22eaa738e2623a80392dca0bb0246a9136832471ba16cfa04a63f5ad32a25fa75963bfdc30c558cd8d34d6ecf0420e2132c6ee2 +EBUILD parted-3.1-r1.ebuild 2098 SHA256 491a83c2ba6885b9b831509141219a73c3e2b09fd7e0cb21d943e73162a9a6d3 SHA512 f221964e4983f772915bc1b8ee89627ebcd6cc2e01c019c6dc446f00a2d3f2cbe06875037cee6a926418ac48e29c2fc48f14de45756482139c3c5534c675b434 WHIRLPOOL 3d3af5483181f5deb1a23ae3a1296e040b9e45dbf3d55a876ead0ad80fa306e56deae3e8a53533f59efcbe09ad10cfbae2b375457417acadd63f4679bb30f994 +EBUILD parted-3.1-r2.ebuild 2065 SHA256 d68504b4831db6bec8911cd31dbd5e006fce37796fe060391050a7a38d6f0c62 SHA512 d8e0e54bdc69d0879be4bfb5835b62039037b04f788c10d53c313ffee7265216fbe483d0f55ffc5acdc1f1aeead35ec8f169b046ab4ec8e372bf2914b065b3d5 WHIRLPOOL a386446d35b10a4c803a645135161a934b4d46012c2dba26411f728262dd055d3d3239490175664d563ec46bfd1e54f70dca48d53c6892e1ba70df53c5264966 +EBUILD parted-3.2-r1.ebuild 1505 SHA256 8467dab19f283c4bed7eb00aca806a176e6ae27b7118c0b32015772f711d5f02 SHA512 2a2225cf5141681a8dfc7b601b04b762db458ee30f67b899168a8f34b8c1fe15f47edd551d0585b3021a20f9db0e12f941ff4edfd4a9e425c890fb3b291b7543 WHIRLPOOL 9de64368753760eb7937b6e1b042380f39683bc37c4dcbc5b1165090df47bd28b14b8d9966a52ab34572e72f5693cefb5a0de17d971fb7fa305317f8fb146338 +EBUILD parted-3.2-r2.ebuild 1514 SHA256 1c2d65999e0fdb1cafc3d7288a378b93e30cefafe509a7c2a5e20d96a899d057 SHA512 cf2898a4c373c4597cbb99cc511527af7382f548a0b7c8b8f3bc3cd6afea6ab3344cf58c37312d5d5eeacdcb937430f27bf20627aeb9e441950c055f0266eabd WHIRLPOOL e7b1aab48486714c097ddc7ae81567b90c664a6c9804fd306fa21729d0963a1f79f0b4ef731132424bf41ab028241259a5f5886130f2e4c7da6a7368ab023bf1 +EBUILD parted-3.2.ebuild 1316 SHA256 b6a525b8b980ebeca25ddba4fbf47048185dd580dd5e77964c85cad0e8390eba SHA512 f6836f813e348cc3d8836c22d36f38cb95bcb639e994b2ab61526c961edee9af4a3a72d513ab969ed60445ecc07b234246457d7552a20f1d51836a9b696de3ed WHIRLPOOL fa3c168a53cce046d5912d404ccb89652b6654620b9e4c226dbfb2b21745bc9e6db96294d618556a0cd24bd0ac2cfc3523479bc27a62ff29dba312f872febbb8 +MISC ChangeLog 4195 SHA256 5661e3c0fb43e3a8a1d45803abbd4fa3a6a8872bd78c327bf404d8bc421bcd3c SHA512 a65226cd56e622fc08889a08a5f7c22c8eca43d4e613673d9cea176defca51f36fc60425d6f7ad3083c9728bb69318c2e955c7ae50dee879a4580fc5af07a2cb WHIRLPOOL 1ba41c868f2cdee53a38b7c5f6711b568174d016fc706ef898374a8a792e3b24bd69000a39f2ed5144ca731b6834790754a029ceadb0fdf3345ab901e8191852 +MISC ChangeLog-2015 29566 SHA256 cefa05c5b9ec8320edd52f3a11bd69598f9cf6d115438987ebb7d8bb7c42d50a SHA512 2e9119b325726109f92efbba6c369da28270e597e20140de169f289e810e227eb67c74820f2f67a7b3ab47f8470822b32e8486f3caa82962e524bdc82d12cfaf WHIRLPOOL e0bd0963d7a1473ab424a5bb0f9d4406173858799d241ccc3099b94062b581124f3ebce9394280a91b7920f43165853842e870c8c91f6cccfee389e7747f0f59 +MISC metadata.xml 754 SHA256 2d42fbc8cd3794d340cfe11cacec0dc085d47263a3e35f754481dac0838a52d9 SHA512 b5ced0310e8a606de46a5a2a690d7a549c5528eb843616621486db93a9fc45266eafbcbacc90d38d8005cd0366fee671705fc98c54c79bf0b3519d182d15c184 WHIRLPOOL ca7ca6b6e54835e668d6db0a043e3e8e10d61da933a7ba7bafd799b5f6c995c846bb0fc587a46eb32024876f2642a913e6f1f88164e1dec876702895ed22561c diff --git a/sys-block/parted/files/parted-2.4-no-gets.patch b/sys-block/parted/files/parted-2.4-no-gets.patch new file mode 100644 index 000000000000..efa6e00b8d45 --- /dev/null +++ b/sys-block/parted/files/parted-2.4-no-gets.patch @@ -0,0 +1,10 @@ +--- a/lib/stdio.in.h ++++ b/lib/stdio.in.h +@@ -735,7 +735,6 @@ + /* It is very rare that the developer ever has full control of stdin, + so any use of gets warrants an unconditional warning. Assume it is + always declared, since it is required by C89. */ +-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); + #endif + + diff --git a/sys-block/parted/files/parted-2.4-readline.patch b/sys-block/parted/files/parted-2.4-readline.patch new file mode 100644 index 000000000000..5873ed1e5d43 --- /dev/null +++ b/sys-block/parted/files/parted-2.4-readline.patch @@ -0,0 +1,11 @@ +--- a/parted/ui.c ++++ b/parted/ui.c +@@ -1440,7 +1440,7 @@ + #ifdef HAVE_LIBREADLINE + if (!opt_script_mode) { + rl_initialize (); +- rl_attempted_completion_function = (CPPFunction*) complete_function; ++ rl_attempted_completion_function = (rl_completion_func_t*) complete_function; + readline_state.in_readline = 0; + } + #endif diff --git a/sys-block/parted/files/parted-3.1-readline.patch b/sys-block/parted/files/parted-3.1-readline.patch new file mode 100644 index 000000000000..936ec00cbefc --- /dev/null +++ b/sys-block/parted/files/parted-3.1-readline.patch @@ -0,0 +1,11 @@ +--- a/parted/ui.c ++++ b/parted/ui.c +@@ -1474,7 +1474,7 @@ + #ifdef HAVE_LIBREADLINE + if (!opt_script_mode) { + rl_initialize (); +- rl_attempted_completion_function = (CPPFunction*) complete_function; ++ rl_attempted_completion_function = (rl_completion_func_t*) complete_function; + readline_state.in_readline = 0; + } + #endif diff --git a/sys-block/parted/files/parted-3.1-zfs.patch b/sys-block/parted/files/parted-3.1-zfs.patch new file mode 100644 index 000000000000..a87d6d346551 --- /dev/null +++ b/sys-block/parted/files/parted-3.1-zfs.patch @@ -0,0 +1,170 @@ +commit 65f838008107a688751dd5a2753c9073e9353daf +Author: root +Date: Fri Jun 1 16:26:34 2012 -0400 + + Add ZFS Support + +diff --git a/libparted/fs/Makefile.am b/libparted/fs/Makefile.am +index 8d48ea1..51b4151 100644 +--- a/libparted/fs/Makefile.am ++++ b/libparted/fs/Makefile.am +@@ -49,7 +49,8 @@ libfs_la_SOURCES = \ + xfs/platform_defs.h \ + xfs/xfs.c \ + xfs/xfs_sb.h \ +- xfs/xfs_types.h ++ xfs/xfs_types.h \ ++ zfs/zfs.c + + lib_LTLIBRARIES = libparted-fs-resize.la + +diff --git a/libparted/fs/Makefile.in b/libparted/fs/Makefile.in +index 4335eb1..e3a134b 100644 +--- a/libparted/fs/Makefile.in ++++ b/libparted/fs/Makefile.in +@@ -1112,7 +1112,8 @@ libfs_la_SOURCES = \ + xfs/platform_defs.h \ + xfs/xfs.c \ + xfs/xfs_sb.h \ +- xfs/xfs_types.h ++ xfs/xfs_types.h \ ++ zfs/zfs.c + + lib_LTLIBRARIES = libparted-fs-resize.la + EXTRA_DIST = hfs/DOC hfs/HISTORY hfs/TODO fsresize.sym +diff --git a/libparted/fs/zfs/Makefile.am b/libparted/fs/zfs/Makefile.am +new file mode 100644 +index 0000000..3273c6a +--- /dev/null ++++ b/libparted/fs/zfs/zfs.c +@@ -0,0 +1,81 @@ ++/* ++ libparted - a library for manipulating disk partitions ++ Copyright (C) 2000, 2007, 2009-2010 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . ++*/ ++ ++#include ++ ++#include ++#include ++ ++#if ENABLE_NLS ++# include ++# define _(String) dgettext (PACKAGE, String) ++#else ++# define _(String) (String) ++#endif /* ENABLE_NLS */ ++ ++#include ++ ++#define ZFS_BLOCK_SIZES ((int[2]){512, 0}) ++ ++#define ZFS_SIGNATURE 0x00bab10c ++ ++struct zfs_uberblock ++{ ++ uint64_t signature; ++ uint64_t version; ++}; ++ ++static PedGeometry* ++zfs_probe (PedGeometry* geom) ++{ ++ uint8_t buf[512]; ++ struct zfs_uberblock *uber = (void *) buf; ++ ++ if (!ped_geometry_read (geom, buf, 256, 1)) ++ return 0; ++ ++ if ((le64toh (uber->signature) == ZFS_SIGNATURE ++ || be64toh (uber->signature) == ZFS_SIGNATURE) ++ && uber->version != 0) ++ return ped_geometry_new (geom->dev, geom->start, geom->length); ++ else ++ return NULL; ++} ++ ++static PedFileSystemOps zfs_ops = { ++ probe: zfs_probe, ++}; ++ ++static PedFileSystemType zfs_type = { ++ next: NULL, ++ ops: &zfs_ops, ++ name: "zfs", ++ block_sizes: ZFS_BLOCK_SIZES ++}; ++ ++void ++ped_file_system_zfs_init () ++{ ++ ped_file_system_type_register (&zfs_type); ++} ++ ++void ++ped_file_system_zfs_done () ++{ ++ ped_file_system_type_unregister (&zfs_type); ++} +diff --git a/libparted/libparted.c b/libparted/libparted.c +index a6d86f0..6545989 100644 +--- a/libparted/libparted.c ++++ b/libparted/libparted.c +@@ -109,6 +109,7 @@ extern void ped_file_system_hfs_init (void); + extern void ped_file_system_fat_init (void); + extern void ped_file_system_ext2_init (void); + extern void ped_file_system_nilfs2_init (void); ++extern void ped_file_system_zfs_init (void); + + static void + init_file_system_types () +@@ -124,6 +125,7 @@ init_file_system_types () + ped_file_system_fat_init (); + ped_file_system_ext2_init (); + ped_file_system_nilfs2_init (); ++ ped_file_system_zfs_init (); + } + + extern void ped_disk_aix_done (); +@@ -186,6 +188,7 @@ extern void ped_file_system_reiserfs_done (void); + extern void ped_file_system_ufs_done (void); + extern void ped_file_system_xfs_done (void); + extern void ped_file_system_amiga_done (void); ++extern void ped_file_system_zfs_done (void); + + static void + done_file_system_types () +@@ -201,6 +204,7 @@ done_file_system_types () + ped_file_system_ufs_done (); + ped_file_system_xfs_done (); + ped_file_system_amiga_done (); ++ ped_file_system_zfs_done (); + } + + static void _done() __attribute__ ((destructor)); +diff --git a/scripts/data/abi/baseline_symbols.txt b/scripts/data/abi/baseline_symbols.txt +index 9162f1a..8bb87e6 100644 +--- a/scripts/data/abi/baseline_symbols.txt ++++ b/scripts/data/abi/baseline_symbols.txt +@@ -344,6 +344,8 @@ FUNC:ped_file_system_ufs_done + FUNC:ped_file_system_ufs_init + FUNC:ped_file_system_xfs_done + FUNC:ped_file_system_xfs_init ++FUNC:ped_file_system_zfs_done ++FUNC:ped_file_system_zfs_init + FUNC:ped_geometry_check + FUNC:ped_geometry_destroy + FUNC:ped_geometry_duplicate diff --git a/sys-block/parted/files/parted-3.2-devmapper.patch b/sys-block/parted/files/parted-3.2-devmapper.patch new file mode 100644 index 000000000000..0cd3e0e3307f --- /dev/null +++ b/sys-block/parted/files/parted-3.2-devmapper.patch @@ -0,0 +1,60 @@ +--- a/libparted/arch/linux.c ++++ b/libparted/arch/linux.c +@@ -2304,6 +2304,7 @@ + return r < 0 ? NULL : resultp; + } + ++#ifdef ENABLE_DEVICE_MAPPER + static char * + dm_canonical_path (PedDevice const *dev) + { +@@ -2326,12 +2327,22 @@ + err: + return NULL; + } ++#endif /* ENABLE_DEVICE_MAPPER */ + + static char* + _device_get_part_path (PedDevice const *dev, int num) + { +- char *devpath = (dev->type == PED_DEVICE_DM +- ? dm_canonical_path (dev) : dev->path); ++ char *devpath = ++#ifdef ENABLE_DEVICE_MAPPER ++ ( ++ dev->type == PED_DEVICE_DM ++ ? dm_canonical_path (dev) : ++#endif /* ENABLE_DEVICE_MAPPER */ ++ dev->path ++#ifdef ENABLE_DEVICE_MAPPER ++ ) ++#endif /* ENABLE_DEVICE_MAPPER */ ++ ; + size_t path_len = strlen (devpath); + char *result; + /* Check for devfs-style /disc => /partN transformation +@@ -2945,12 +2956,14 @@ + 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 { ++#endif /* ENABLE_DEVICE_MAPPER */ + add_partition = _blkpg_add_partition; + remove_partition = _blkpg_remove_partition; + #ifdef BLKPG_RESIZE_PARTITION +@@ -2959,7 +2972,9 @@ + resize_partition = NULL; + #endif + get_partition_start_and_length = _kernel_get_partition_start_and_length; ++#ifdef ENABLE_DEVICE_MAPPER + } ++#endif /* ENABLE_DEVICE_MAPPER */ + + /* lpn = largest partition number. + * for remove pass, use greater of device or label limit */ diff --git a/sys-block/parted/files/parted-3.2-fix-resizing-FAT16.patch b/sys-block/parted/files/parted-3.2-fix-resizing-FAT16.patch new file mode 100644 index 000000000000..2a5a2311f1dd --- /dev/null +++ b/sys-block/parted/files/parted-3.2-fix-resizing-FAT16.patch @@ -0,0 +1,64 @@ +From 1e9e770f4bc7f3d80e09ecd1df58575fad064163 Mon Sep 17 00:00:00 2001 +From: Mike Fleetwood +Date: Sun, 28 Sep 2014 15:15:48 +0000 +Subject: lib-fs-resize: Prevent crash resizing FAT16 file systems + +Resizing FAT16 file system crashes in libparted/fs/r/fat/resize.c +create_resize_context() because it was dereferencing NULL pointer +fs_info->info_sector to copy the info_sector. + +Only FAT32 file systems have info_sector populated by fat_open() -> +fat_info_sector_read(). FAT12 and FAT16 file systems don't have an +info_sector so pointer fs_info->info_sector remains assigned NULL from +fat_alloc(). When resizing a FAT file system create_resize_context() +was always dereferencing fs_info->info_sector to memory copy the +info_sector, hence it crashed for FAT12 and FAT16. + +Make create_resize_context() only copy the info_sector for FAT32 file +systems. + +Reported by Christian Hesse in +https://bugzilla.gnome.org/show_bug.cgi?id=735669 +--- +diff --git a/NEWS b/NEWS +index 297b0a5..da7db50 100644 +--- a/NEWS ++++ b/NEWS +@@ -2,6 +2,10 @@ GNU parted NEWS -*- outline -*- + + * Noteworthy changes in release ?.? (????-??-??) [?] + ++** Bug Fixes ++ ++ libparted-fs-resize: Prevent crash resizing FAT16 file systems. ++ + + * Noteworthy changes in release 3.2 (2014-07-28) [stable] + +diff --git a/libparted/fs/r/fat/resize.c b/libparted/fs/r/fat/resize.c +index 919acf0..bfe60a0 100644 +--- a/libparted/fs/r/fat/resize.c ++++ b/libparted/fs/r/fat/resize.c +@@ -668,11 +668,17 @@ create_resize_context (PedFileSystem* fs, const PedGeometry* new_geom) + + /* preserve boot code, etc. */ + new_fs_info->boot_sector = ped_malloc (new_geom->dev->sector_size); +- new_fs_info->info_sector = ped_malloc (new_geom->dev->sector_size); + memcpy (new_fs_info->boot_sector, fs_info->boot_sector, + new_geom->dev->sector_size); +- memcpy (new_fs_info->info_sector, fs_info->info_sector, +- new_geom->dev->sector_size); ++ new_fs_info->info_sector = NULL; ++ if (fs_info->fat_type == FAT_TYPE_FAT32) ++ { ++ PED_ASSERT (fs_info->info_sector != NULL); ++ new_fs_info->info_sector = ++ ped_malloc (new_geom->dev->sector_size); ++ memcpy (new_fs_info->info_sector, fs_info->info_sector, ++ new_geom->dev->sector_size); ++ } + + new_fs_info->logical_sector_size = fs_info->logical_sector_size; + new_fs_info->sector_count = new_geom->length; +-- +cgit v0.9.0.2 diff --git a/sys-block/parted/files/parted-3.2-po4a-mandir.patch b/sys-block/parted/files/parted-3.2-po4a-mandir.patch new file mode 100644 index 000000000000..be0a9c69f403 --- /dev/null +++ b/sys-block/parted/files/parted-3.2-po4a-mandir.patch @@ -0,0 +1,11 @@ +--- a/doc/po4a.mk ++++ b/doc/po4a.mk +@@ -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/sys-block/parted/files/parted-3.2-sysmacros.patch b/sys-block/parted/files/parted-3.2-sysmacros.patch new file mode 100644 index 000000000000..a29e7619b148 --- /dev/null +++ b/sys-block/parted/files/parted-3.2-sysmacros.patch @@ -0,0 +1,28 @@ +https://bugs.gentoo.org/580022 + +From dec8995fe80508374beba6356f6ecbba8ef6b18b Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +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. +--- + 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 + #include + #include ++#include + #include + #include /* for uname() */ + #include +-- +2.8.2 + diff --git a/sys-block/parted/metadata.xml b/sys-block/parted/metadata.xml new file mode 100644 index 000000000000..2011c0117f13 --- /dev/null +++ b/sys-block/parted/metadata.xml @@ -0,0 +1,20 @@ + + + + + livecd@gentoo.org + Gentoo LiveCD Project + + + + Enable device-mapper support from sys-fs/lvm2 in parted + + + Enable debugging as encouraged by upstream: [The default configuration] + includes --enable-debug (by default), which contains many assertions. + Obviously, these "waste" space, but in the past, they have caught + potentially dangerous bugs before they would have done damage, so we think + it's worth it. Also, it means we get more bug reports ;) + + + diff --git a/sys-block/parted/parted-2.4-r1.ebuild b/sys-block/parted/parted-2.4-r1.ebuild new file mode 100644 index 000000000000..2e24db5fe76f --- /dev/null +++ b/sys-block/parted/parted-2.4-r1.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils + +DESCRIPTION="Create, destroy, resize, check, copy partitions and file systems" +HOMEPAGE="https://www.gnu.org/software/parted" +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="+debug device-mapper nls readline selinux static-libs" +RESTRICT="test" + +# specific version for gettext needed +# to fix bug 85999 +RDEPEND=" + >=sys-fs/e2fsprogs-1.27 + >=sys-libs/ncurses-5.2:0= + device-mapper? ( >=sys-fs/lvm2-2.02.45 ) + readline? ( >=sys-libs/readline-5.2:0= ) + selinux? ( sys-libs/libselinux ) +" +DEPEND=" + ${RDEPEND} + nls? ( >=sys-devel/gettext-0.12.1-r2 ) + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${P}-no-gets.patch + "${FILESDIR}"/${P}-readline.patch +) +DOCS=( AUTHORS BUGS ChangeLog NEWS README THANKS TODO doc/{API,FAT,USER.jp} ) + +src_configure() { + econf \ + $(use_enable debug) \ + $(use_enable device-mapper) \ + $(use_enable nls) \ + $(use_enable selinux) \ + $(use_enable static-libs static) \ + $(use_with readline) \ + --disable-Werror \ + --disable-rpath \ + --disable-silent-rules +} + +src_install() { + default + + prune_libtool_files +} diff --git a/sys-block/parted/parted-2.4.ebuild b/sys-block/parted/parted-2.4.ebuild new file mode 100644 index 000000000000..eb161766ad3e --- /dev/null +++ b/sys-block/parted/parted-2.4.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils + +DESCRIPTION="Create, destroy, resize, check, copy partitions and file systems" +HOMEPAGE="https://www.gnu.org/software/parted" +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86" +IUSE="+debug device-mapper nls readline selinux static-libs" +RESTRICT="test" + +# specific version for gettext needed +# to fix bug 85999 +RDEPEND=" + >=sys-fs/e2fsprogs-1.27 + >=sys-libs/ncurses-5.2:0= + device-mapper? ( >=sys-fs/lvm2-2.02.45 ) + readline? ( >=sys-libs/readline-5.2:0= ) + selinux? ( sys-libs/libselinux ) +" +DEPEND=" + ${RDEPEND} + nls? ( >=sys-devel/gettext-0.12.1-r2 ) + virtual/pkgconfig +" + +src_prepare() { + epatch "${FILESDIR}"/${P}-no-gets.patch + epatch "${FILESDIR}"/${P}-readline.patch +} + +src_configure() { + econf \ + $(use_enable debug) \ + $(use_enable device-mapper) \ + $(use_enable nls) \ + $(use_enable selinux) \ + $(use_enable static-libs static) \ + $(use_with readline) \ + --disable-Werror \ + --disable-rpath \ + --disable-silent-rules +} + +DOCS=( AUTHORS BUGS ChangeLog NEWS README THANKS TODO doc/{API,FAT,USER.jp} ) + +src_install() { + default + prune_libtool_files +} diff --git a/sys-block/parted/parted-3.1-r1.ebuild b/sys-block/parted/parted-3.1-r1.ebuild new file mode 100644 index 000000000000..011ec68857d4 --- /dev/null +++ b/sys-block/parted/parted-3.1-r1.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="4" + +inherit autotools eutils + +DESCRIPTION="Create, destroy, resize, check, copy partitions and file systems" +HOMEPAGE="https://www.gnu.org/software/parted" +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86" +IUSE="+debug device-mapper nls readline selinux static-libs test" + +# specific version for gettext needed +# to fix bug 85999 +RDEPEND=" + >=sys-fs/e2fsprogs-1.27 + >=sys-libs/ncurses-5.7-r7 + device-mapper? ( >=sys-fs/lvm2-2.02.45 ) + readline? ( >=sys-libs/readline-5.2 ) + selinux? ( sys-libs/libselinux ) +" +DEPEND=" + ${RDEPEND} + nls? ( >=sys-devel/gettext-0.12.1-r2 ) + virtual/pkgconfig + test? ( + >=dev-libs/check-0.9.3 + dev-perl/Digest-CRC + ) +" + +src_prepare() { + # Remove tests known to FAIL instead of SKIP without OS/userland support + sed -i libparted/tests/Makefile.am \ + -e 's|t3000-symlink.sh||g' || die "sed failed" + sed -i tests/Makefile.am \ + -e '/t4100-msdos-partition-limits.sh/d' \ + -e '/t4100-dvh-partition-limits.sh/d' \ + -e '/t6000-dm.sh/d' || die "sed failed" + # there is no configure flag for controlling the dev-libs/check test + sed -i configure.ac \ + -e "s:have_check=[a-z]*:have_check=$(usex test):g" || die + + epatch "${FILESDIR}"/${PN}-3.1-zfs.patch + epatch "${FILESDIR}"/${PN}-3.1-readline.patch + + eautoreconf +} + +src_configure() { + econf \ + $(use_enable debug) \ + $(use_enable device-mapper) \ + $(use_enable nls) \ + $(use_enable selinux) \ + $(use_enable static-libs static) \ + $(use_with readline) \ + --disable-rpath \ + --disable-silent-rules +} + +src_test() { + if use debug; then + # Do not die when tests fail - some requirements are not + # properly checked and should not lead to the ebuild failing. + emake check + else + ewarn "Skipping tests because USE=-debug is set." + fi +} + +src_install() { + emake install DESTDIR="${D}" + dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO + dodoc doc/{API,FAT,USER.jp} + find "${ED}" -name '*.la' -exec rm -f {} + +} diff --git a/sys-block/parted/parted-3.1-r2.ebuild b/sys-block/parted/parted-3.1-r2.ebuild new file mode 100644 index 000000000000..92ce2da8bcbf --- /dev/null +++ b/sys-block/parted/parted-3.1-r2.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools eutils + +DESCRIPTION="Create, destroy, resize, check, copy partitions and file systems" +HOMEPAGE="https://www.gnu.org/software/parted" +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="+debug device-mapper nls readline selinux static-libs test" + +# specific version for gettext needed +# to fix bug 85999 +RDEPEND=" + >=sys-fs/e2fsprogs-1.27 + >=sys-libs/ncurses-5.7-r7 + device-mapper? ( >=sys-fs/lvm2-2.02.45 ) + readline? ( >=sys-libs/readline-5.2 ) + selinux? ( sys-libs/libselinux ) +" +DEPEND=" + ${RDEPEND} + nls? ( >=sys-devel/gettext-0.12.1-r2 ) + virtual/pkgconfig + test? ( + >=dev-libs/check-0.9.3 + dev-perl/Digest-CRC + ) +" +PATCHES=( + "${FILESDIR}"/${PN}-3.1-zfs.patch + "${FILESDIR}"/${PN}-3.1-readline.patch +) +DOCS=( + AUTHORS BUGS ChangeLog NEWS README THANKS TODO doc/{API,FAT,USER.jp} +) + +src_prepare() { + default + + # Remove tests known to FAIL instead of SKIP without OS/userland support + sed -i libparted/tests/Makefile.am \ + -e 's|t3000-symlink.sh||g' || die "sed failed" + sed -i tests/Makefile.am \ + -e '/t4100-msdos-partition-limits.sh/d' \ + -e '/t4100-dvh-partition-limits.sh/d' \ + -e '/t6000-dm.sh/d' || die "sed failed" + # there is no configure flag for controlling the dev-libs/check test + sed -i configure.ac \ + -e "s:have_check=[a-z]*:have_check=$(usex test):g" || die + + eautoreconf +} + +src_configure() { + econf \ + $(use_enable debug) \ + $(use_enable device-mapper) \ + $(use_enable nls) \ + $(use_enable selinux) \ + $(use_enable static-libs static) \ + $(use_with readline) \ + --disable-rpath \ + --disable-silent-rules +} + +src_test() { + if use debug; then + # Do not die when tests fail - some requirements are not + # properly checked and should not lead to the ebuild failing. + emake check + else + ewarn "Skipping tests because USE=-debug is set." + fi +} + +src_install() { + default + + prune_libtool_files +} diff --git a/sys-block/parted/parted-3.2-r1.ebuild b/sys-block/parted/parted-3.2-r1.ebuild new file mode 100644 index 000000000000..61366aa00ada --- /dev/null +++ b/sys-block/parted/parted-3.2-r1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils flag-o-matic + +DESCRIPTION="Create, destroy, resize, check, copy partitions and file systems" +HOMEPAGE="https://www.gnu.org/software/parted" +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="alpha amd64 ~arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86" +IUSE="+debug device-mapper nls readline selinux static-libs" +RESTRICT="test" + +# specific version for gettext needed +# to fix bug 85999 +RDEPEND=" + >=sys-fs/e2fsprogs-1.27 + device-mapper? ( >=sys-fs/lvm2-2.02.45 ) + readline? ( >=sys-libs/readline-5.2:0= >=sys-libs/ncurses-5.7-r7:0= ) + selinux? ( sys-libs/libselinux ) + elibc_uclibc? ( dev-libs/libiconv ) +" +DEPEND=" + ${RDEPEND} + nls? ( >=sys-devel/gettext-0.12.1-r2 ) + virtual/pkgconfig +" + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-3.2-devmapper.patch \ + "${FILESDIR}"/${PN}-3.2-po4a-mandir.patch \ + "${FILESDIR}"/${PN}-3.2-fix-resizing-FAT16.patch \ + "${FILESDIR}"/${PN}-3.2-sysmacros.patch + + eautoreconf +} + +src_configure() { + use elibc_uclibc && append-libs -liconv + econf \ + $(use_enable debug) \ + $(use_enable device-mapper) \ + $(use_enable nls) \ + $(use_enable selinux) \ + $(use_enable static-libs static) \ + $(use_with readline) \ + --disable-rpath \ + --disable-silent-rules +} + +DOCS=( AUTHORS BUGS ChangeLog NEWS README THANKS TODO doc/{API,FAT,USER.jp} ) + +src_install() { + default + prune_libtool_files +} diff --git a/sys-block/parted/parted-3.2-r2.ebuild b/sys-block/parted/parted-3.2-r2.ebuild new file mode 100644 index 000000000000..b4561cfee286 --- /dev/null +++ b/sys-block/parted/parted-3.2-r2.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools eutils flag-o-matic + +DESCRIPTION="Create, destroy, resize, check, copy partitions and file systems" +HOMEPAGE="https://www.gnu.org/software/parted" +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="+debug device-mapper nls readline selinux static-libs" +RESTRICT="test" + +# specific version for gettext needed +# to fix bug 85999 +RDEPEND=" + >=sys-fs/e2fsprogs-1.27 + device-mapper? ( >=sys-fs/lvm2-2.02.45 ) + readline? ( >=sys-libs/readline-5.2:0= >=sys-libs/ncurses-5.7-r7:0= ) + selinux? ( sys-libs/libselinux ) + elibc_uclibc? ( dev-libs/libiconv ) +" +DEPEND=" + ${RDEPEND} + nls? ( >=sys-devel/gettext-0.12.1-r2 ) + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${PN}-3.2-devmapper.patch + "${FILESDIR}"/${PN}-3.2-po4a-mandir.patch + "${FILESDIR}"/${PN}-3.2-fix-resizing-FAT16.patch + "${FILESDIR}"/${PN}-3.2-sysmacros.patch +) + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + use elibc_uclibc && append-libs -liconv + econf \ + $(use_enable debug) \ + $(use_enable device-mapper) \ + $(use_enable nls) \ + $(use_enable selinux) \ + $(use_enable static-libs static) \ + $(use_with readline) \ + --disable-rpath \ + --disable-silent-rules +} + +DOCS=( AUTHORS BUGS ChangeLog NEWS README THANKS TODO doc/{API,FAT,USER.jp} ) + +src_install() { + default + + prune_libtool_files +} diff --git a/sys-block/parted/parted-3.2.ebuild b/sys-block/parted/parted-3.2.ebuild new file mode 100644 index 000000000000..63f152b69d22 --- /dev/null +++ b/sys-block/parted/parted-3.2.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools eutils + +DESCRIPTION="Create, destroy, resize, check, copy partitions and file systems" +HOMEPAGE="https://www.gnu.org/software/parted" +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86" +IUSE="+debug device-mapper nls readline selinux static-libs" +RESTRICT="test" + +# specific version for gettext needed +# to fix bug 85999 +RDEPEND=" + >=sys-fs/e2fsprogs-1.27 + >=sys-libs/ncurses-5.7-r7:0= + device-mapper? ( >=sys-fs/lvm2-2.02.45 ) + readline? ( >=sys-libs/readline-5.2:0= ) + selinux? ( sys-libs/libselinux ) +" +DEPEND=" + ${RDEPEND} + nls? ( >=sys-devel/gettext-0.12.1-r2 ) + virtual/pkgconfig +" + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-3.2-devmapper.patch \ + "${FILESDIR}"/${PN}-3.2-po4a-mandir.patch + eautoreconf +} + +src_configure() { + econf \ + $(use_enable debug) \ + $(use_enable device-mapper) \ + $(use_enable nls) \ + $(use_enable selinux) \ + $(use_enable static-libs static) \ + $(use_with readline) \ + --disable-rpath \ + --disable-silent-rules +} + +DOCS=( AUTHORS BUGS ChangeLog NEWS README THANKS TODO doc/{API,FAT,USER.jp} ) + +src_install() { + default + prune_libtool_files +} -- cgit v1.2.3