aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAric Belsito <lluixhi@gmail.com>2017-03-02 11:22:50 -0800
committerAric Belsito <lluixhi@gmail.com>2017-03-02 11:22:50 -0800
commite9801ebbaeb5841949f60c6f44a045fef23768c5 (patch)
treee125b6b250ee0546a1df706045252671f4b75a5c /sys-block
parentsys-libs/pam: sync with upstream (diff)
downloadmusl-e9801ebbaeb5841949f60c6f44a045fef23768c5.tar.gz
musl-e9801ebbaeb5841949f60c6f44a045fef23768c5.tar.bz2
musl-e9801ebbaeb5841949f60c6f44a045fef23768c5.zip
sys-block/parted: sync with upstream
drop r99 suffix and split into two ebuilds (stable, unstable)
Diffstat (limited to 'sys-block')
-rw-r--r--sys-block/parted/Manifest5
-rw-r--r--sys-block/parted/files/parted-3.2-fix-resizing-FAT16.patch64
-rw-r--r--sys-block/parted/files/parted-3.2-sysmacros.patch28
-rw-r--r--sys-block/parted/parted-3.2-r1.ebuild60
-rw-r--r--sys-block/parted/parted-3.2.ebuild (renamed from sys-block/parted/parted-3.2-r99.ebuild)19
5 files changed, 166 insertions, 10 deletions
diff --git a/sys-block/parted/Manifest b/sys-block/parted/Manifest
index d649015..7b06e23 100644
--- a/sys-block/parted/Manifest
+++ b/sys-block/parted/Manifest
@@ -1,6 +1,9 @@
AUX parted-3.2-devmapper.patch 1972 SHA256 a72db7a487b891b19e6b859a6deaa4defe0c603842f1a91962de553e68acc96f SHA512 3baf2090ba86242df1633bb4b50deeb6e0226b0a56ad82466ddd76f028a859e29bd021f1f251047cd2a2a5ea1c77ed0129eca8be2e97ee48c21c1d186c07b8da WHIRLPOOL c0a16dce6f967b6d4d343bec9fe34c0803fdb231aa51abede4b94080db90af8be36d232f9d24246808a59be13be7635b520b0ec6c2cd82a99515c2ad0866f876
AUX parted-3.2-fix-includes.patch 257 SHA256 f87c9290e861b969f4520a1af84ebf4b8f5f1437c1d78ee235d5ffcda3bffe84 SHA512 55ee63c218d1867c0f2c596e7c3eec5c42af160181456cc551fe3d432eabed0ac2dd3a3955ff0c375f76aeec8071e7f55a32834b87a0d39b8ef30361f671bfdd WHIRLPOOL cbc2d36e9e0d59f032f4cd7e3a487674a17b8e87a873dea796dfadda7219526ad052b5826a9a353c0ed6d387b8f8c0ed9420394c8037f85c5deec08b292a158c
+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-3.2.tar.xz 1655244 SHA256 858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4 SHA512 4e37dbdd6f5032c9ebfec43704f6882379597d038167b9c4d04053efa083c68a705196713864451fa9e11d32777e16c68982877945c5efd9ea5f8252cb20e1c4 WHIRLPOOL af928177b893150ac6d5e0efcef542b6fa0df6b135f975078f7d8d5f7a4b109ef4c1f8eeaf6afc5c34448ff662ce4cbe5289e084f4ec05257666503a0cd3c93f
-EBUILD parted-3.2-r99.ebuild 1323 SHA256 e7ddb64c2d5385c8a3e883d275915ff63f33180cc87e766d987e6beaf702e7d8 SHA512 30fded16d73afab323d6fc57ae9a788aed858f8f9b1008e8355c5e328fe9098a0cf627116679334b9f77de9c37a4373f8e2dbd463d5163c8f61f763f26b7f9f2 WHIRLPOOL b4ae58787828852ace862cf27576a898c7b3f05f7e65fce908faf027fbec18cc6fae7e557c916b59911866bdd87f3f541a1e0012d9ba237dfe07c0667ba10e24
+EBUILD parted-3.2-r1.ebuild 1558 SHA256 70958c963eb508cb322ce20258e1ef742145a2d0a398acd838380b9fc3a70400 SHA512 11c1873b9fbc521d8660507cdc1e6656e06327092cbe76514af918d8bab5e64e69601adb68596cd96dd133591f65d1f47ba15fff21c3e937ce162a5ecd4c988f WHIRLPOOL ad5b5161c62a29acf4bcfcc691fb862dbf8cced94e8d2593bdf95929371dfaae8dc0416b72fd7d18b1217423b33c54da5826bb66062815aedaec11e747599349
+EBUILD parted-3.2.ebuild 1363 SHA256 a03c16da244487cd93e923d22bb44c7d33cfa4088e83280129d2182b1c6b651e SHA512 1ef9023d779f8183453a1bfaa2bcd2ddb7c1069a7a6969990d5f471e726944838dae8869892004c4af5ab2e695f1314356aca7af5e6c6e893303983893a2ea2a WHIRLPOOL 6adc38d65190478fc89bd36c4ee49914603fc44d265edfc0253406d97343a043a83daf36f78a38ebc57976dcf90c62736d97ef8d5bfbcd64abe3229ebc31db86
MISC metadata.xml 754 SHA256 2d42fbc8cd3794d340cfe11cacec0dc085d47263a3e35f754481dac0838a52d9 SHA512 b5ced0310e8a606de46a5a2a690d7a549c5528eb843616621486db93a9fc45266eafbcbacc90d38d8005cd0366fee671705fc98c54c79bf0b3519d182d15c184 WHIRLPOOL ca7ca6b6e54835e668d6db0a043e3e8e10d61da933a7ba7bafd799b5f6c995c846bb0fc587a46eb32024876f2642a913e6f1f88164e1dec876702895ed22561c
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 0000000..2a5a231
--- /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 <mike.fleetwood@googlemail.com>
+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-sysmacros.patch b/sys-block/parted/files/parted-3.2-sysmacros.patch
new file mode 100644
index 0000000..a29e761
--- /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 <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.
+---
+ 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/sys-block/parted/parted-3.2-r1.ebuild b/sys-block/parted/parted-3.2-r1.ebuild
new file mode 100644
index 0000000..c817260
--- /dev/null
+++ b/sys-block/parted/parted-3.2-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2016 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 \
+ "${FILESDIR}"/${PN}-3.2-fix-includes.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-r99.ebuild b/sys-block/parted/parted-3.2.ebuild
index 9eb0ea2..30e5a80 100644
--- a/sys-block/parted/parted-3.2-r99.ebuild
+++ b/sys-block/parted/parted-3.2.ebuild
@@ -1,17 +1,17 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Id$
EAPI=5
+
inherit autotools eutils
DESCRIPTION="Create, destroy, resize, check, copy partitions and file systems"
-HOMEPAGE="http://www.gnu.org/software/parted"
+HOMEPAGE="https://www.gnu.org/software/parted"
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="amd64 arm ~mips ppc x86"
+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"
@@ -19,9 +19,9 @@ RESTRICT="test"
# to fix bug 85999
RDEPEND="
>=sys-fs/e2fsprogs-1.27
- >=sys-libs/ncurses-5.7-r7
+ >=sys-libs/ncurses-5.7-r7:0=
device-mapper? ( >=sys-fs/lvm2-2.02.45 )
- readline? ( >=sys-libs/readline-5.2:= )
+ readline? ( >=sys-libs/readline-5.2:0= )
selinux? ( sys-libs/libselinux )
"
DEPEND="
@@ -31,9 +31,10 @@ DEPEND="
"
src_prepare() {
- epatch "${FILESDIR}"/${PN}-3.2-devmapper.patch
- epatch "${FILESDIR}"/${PN}-3.2-po4a-mandir.patch
- epatch "${FILESDIR}"/${PN}-3.2-fix-includes.patch
+ epatch \
+ "${FILESDIR}"/${PN}-3.2-devmapper.patch \
+ "${FILESDIR}"/${PN}-3.2-po4a-mandir.patch \
+ "${FILESDIR}"/${PN}-3.2-fix-includes.patch
eautoreconf
}