summaryrefslogtreecommitdiff
path: root/sys-block/gpart
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-block/gpart
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-block/gpart')
-rw-r--r--sys-block/gpart/Manifest14
-rw-r--r--sys-block/gpart/files/gpart-0.1h-errno.patch20
-rw-r--r--sys-block/gpart/files/gpart-0.1h-l64seek.patch71
-rw-r--r--sys-block/gpart/files/gpart-0.1h-ntfs.patch75
-rw-r--r--sys-block/gpart/files/gpart-0.1h-openmode.patch11
-rw-r--r--sys-block/gpart/files/gpart-0.1h-vfat.patch17
-rw-r--r--sys-block/gpart/files/gpart-0.3-build.patch10
-rw-r--r--sys-block/gpart/gpart-0.1h-r2.ebuild35
-rw-r--r--sys-block/gpart/gpart-0.3.ebuild34
-rw-r--r--sys-block/gpart/metadata.xml8
10 files changed, 295 insertions, 0 deletions
diff --git a/sys-block/gpart/Manifest b/sys-block/gpart/Manifest
new file mode 100644
index 000000000000..760d486e9f78
--- /dev/null
+++ b/sys-block/gpart/Manifest
@@ -0,0 +1,14 @@
+AUX gpart-0.1h-errno.patch 384 SHA256 fe910231e5cf8640d8b07b2767219f0a3794a57f3b18d3af49d3980ca96058f5 SHA512 0b81a8a3edecb4f44907afba9364010f2920a71d7f38626e2cf5f2bf5025b27f021ee762c039718dfb6f1119956c03219b1ffd4373f9f6b3157662dfca553618 WHIRLPOOL c7852153c8ae8b29608dc37208e934d8ac65e29c93696092f030567a50f7f6cfa34ac2a1ce637b188d840e2a0d047fa1a34e6cba49e80df61d84137b177dd74d
+AUX gpart-0.1h-l64seek.patch 1352 SHA256 d8f7bef414e079fc49d74d38c5537e3e8a3588fd71d84be0ac265efcc78b45b5 SHA512 320600b849a77631a6885bd9c4f6d412c1654e3617098531d6c449a186d0cfb3b703a95f3d5a77d9c71cc33ce867e89eddb2cf5acc33ac0cedfd0cf1afcfadf4 WHIRLPOOL 49cfc2666bb456cb4fc928d91dc602d0905f795df943d6c1948272bec9423ed3855d6b387d0c5b58ca61f510ffcf3316b603ac960437736ddb5cd4832a216c7b
+AUX gpart-0.1h-ntfs.patch 2430 SHA256 01617b0fdb729232073d808efb137bc33790c3d071b7d945ce1ac8e0f697761b SHA512 d622f4429baab567d34155a45d72e88d16c26f571d6a20dd294ae8fd1d0db2a05d6b4edfaaeb804d0dc32d12086f1331e794fe719dbcb14867a998cbb316cb04 WHIRLPOOL 5307e8670ed8b12f2a95c1edd2080919dc7aa8296a12c69ce20c89039ed309ffb37902d2f1e6e0fe1e65cad8268bed273dd2bd7faf91ddb3921e8bb2def9ed5a
+AUX gpart-0.1h-openmode.patch 404 SHA256 a90c2b7663c828dae8ab35de4f91eee01148d602297a1c52223573e0d481ff00 SHA512 3b7f46db58c90b0fc43b225f267250d8759b47b6b0c07457f46f549a86d322a1458f0421e1da8a481f6f486c5265caa50cb45d3c9682e91cd684fd2744f299dc WHIRLPOOL 0ee315b0fc5daff6a8ff8ec295434d43b54a4cec5038b5d32604a7823d8b29bacdddadaad97ffcb2fe98ad354128882618d49e680ac69590dbd9b88d19ac3e23
+AUX gpart-0.1h-vfat.patch 515 SHA256 39d542bb6ee52008b08fd161b051dc08658d363076df56a1b054b5403ceb4661 SHA512 80dc8eb5e7ee2d3d413adebec63a8dcae868774a42cc27f27fb2be98ca299c4fe744f5188207e5c53a86e06e213e1a18b8f7d40b5fdf8cf6378f14d25794cb8d WHIRLPOOL dba791aceb9b6ccb215cfdc4701fbbf08a590a696f81a8f17900e5ef035bd2567c833a410d45bc1373c97b8f6f8a29e15f17d5ba409063affa2da6726b33319e
+AUX gpart-0.3-build.patch 259 SHA256 f37cd4ae38ce0e014812ee5b7afd4d1ddf140469af96c080f1a186963c2f68ba SHA512 05cb685691a59bdb60af306c01c3f619e88cdbf3db0d4b48c23ac740b241b80d44a03dd90e89255180c6e0c6f4cc7bb428345734da4f4ad709659aefac66a772 WHIRLPOOL a6478d16673c9456bf1440c0399f7e4d1c7bfeb9e4c37b45a6dbb9944c77556fb89e51936cbdc2080817ff6c090e6afc82f5ab6471a4f6f375612a172962cac1
+DIST gpart-0.1h-reiserfs-3.6.patch.gz 3658 SHA256 769f5587853cb7d9c3ba4d0496bbb57d42d04ad561a42d24bcbe5f4723849a3c SHA512 c39433e1d6dc0a995322f9985cb1735e89e3c3c7230193609ab2c82fa4cc3fc921d8743b37f6fba18cdda71d29cd83afcb36870fceb88d2a26f7113022226a60 WHIRLPOOL a98483eeffa1749be09b08f56ab5e86f47ed23ecd26aab71c3f8eb554a2066728e7162723391a06d845247dee9fa65ea29e63198906942584f597dd6eb71a4cb
+DIST gpart-0.1h.tar.gz 52352 SHA256 b9fdb064efabf5d63d7db6f07605c2fca3d011ecfa05ab3723dd98b9bde3a2ff SHA512 673cc99ccc2342c18be3f6395bf7258ab1d8e2ffeac6fd68a4bd75c89825031cb9d7ae628c51bad4da47a8d0625f1608cf4c78345aae5205fd98a9a908a3d45c WHIRLPOOL b3c54bf67d2d7cbe01171f438988db352051a33f9778606c182bf2a27d6f1414b774f94fbb20313cf0424b6e812b2e00195658289b3a91ca4eb8945da4eb2cc4
+DIST gpart-0.3.tar.gz 53589 SHA256 ec56d12ec9ffdb9877c12692ea6e51620b1ae44473d3d253b27fc31ed9ebb4dd SHA512 5ee8bc551050d26dc71898d3232549d2b96e0806071571b120cbf819282da0ec2246147a0dfc44576e62d68092bb0183c1a9bb71db7ddca12c0922da60aeea35 WHIRLPOOL 3aaa6996863bb91d0dde81fa004413b92c122c914ed5e9824c8b51f9202b0c94974fb1c3965bb4eb9928cb7ed975d0986e9b436727eefa9ce46ece40749fd2ef
+EBUILD gpart-0.1h-r2.ebuild 943 SHA256 67ba4ee088d1adc40c2f0498d317dbb0495e94428ec26e423165b4bdc90a1b51 SHA512 0fca4bff96aaf63d8a58c0aecbc0257cc20d527caab197f571b6a7c48e233c0614cebcc59c7ed77a7d9dc944a886c1cc6a3c7b856ae3e3c0396e8a7d9c43c8e0 WHIRLPOOL 136f49e0422503bc3012e9f12abdbc67915c1c3785c145478a2c8c8360897d239ee37fc8836c0769f33a30fe2168f4ac4d95ff9409d78d7f3133b9e5ad655dac
+EBUILD gpart-0.3.ebuild 728 SHA256 3eece97feed9ea5d27249f5f5cf0f53c9b66785ad2228e79f05006e69fdac274 SHA512 270c2f7bfac1610dac00d0df5716b24983b78d5ca26718ab0472a226f482782b6824c47d4b2d4ab7780862e6537c02c8c6204a04889a2adc6acdf8c556fe76ab WHIRLPOOL 49db7b36d40d04fbf47068381519d621e7c5868f20ccd1f3aca8c0bbe2536f6a4bbd94826641057838517723ffa1a329ad0414160823f896bfedc94841965290
+MISC ChangeLog 3329 SHA256 b05bbffbbe2a4628b9b35c1da49056a1d8ecb00db5a8506d8d35bbb41ffa3c01 SHA512 fb801bf392ce493bcf9936ab9e030e8b15c0865975a37c8ce0e4d67a76760700e5a6a449d48e57a1c7bd09b3b92983892eb66a57fa7fa634262282b8b6c2eb83 WHIRLPOOL 211a12e95cf6e97b08e1f18c6bd868de425adde954675937e6ced3480288cffdcd61da8d0af723c82da9e111e71a6cd3786d66e8cc3e28bdd674a1a200b4d2b5
+MISC ChangeLog-2015 2146 SHA256 ff43db986d58830bf2df9c24e8b7b20e8d7deb532b5c0e238557b740978b3065 SHA512 2ae46124975bf348dffd65338e785de9c250a9256f232ba78698042359677c8196c37ddff34bc17c32e964be8c9c32271b4d8574a15ad37b1a37d9d7965465a0 WHIRLPOOL 16688aa8eae5c53945c19ee547cfb453904f2a51cb620ee2f893bf8f28c494b21941621cdb944ecb7c9b3a1e63b4f1f387669edbd65350a3ac0e5b0fed2a065c
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-block/gpart/files/gpart-0.1h-errno.patch b/sys-block/gpart/files/gpart-0.1h-errno.patch
new file mode 100644
index 000000000000..13041c20245d
--- /dev/null
+++ b/sys-block/gpart/files/gpart-0.1h-errno.patch
@@ -0,0 +1,20 @@
+--- gpart-0.1h/src/l64seek.c
++++ gpart-0.1h-working/src/l64seek.c
+@@ -16,6 +16,7 @@
+
+ #include "l64seek.h"
+
++#include <errno.h>
+
+ #define OSTACKLEN 16
+ static struct
+--- gpart-0.1h/src/disku.c
++++ gpart-0.1h-working/src/disku.c
+@@ -20,6 +20,7 @@
+ #include <string.h>
+ #include <sys/ioctl.h>
+ #include "gpart.h"
++#include <errno.h>
+
+ #if defined(__linux__)
+ #include <sys/mount.h>
diff --git a/sys-block/gpart/files/gpart-0.1h-l64seek.patch b/sys-block/gpart/files/gpart-0.1h-l64seek.patch
new file mode 100644
index 000000000000..8a14411a5ccc
--- /dev/null
+++ b/sys-block/gpart/files/gpart-0.1h-l64seek.patch
@@ -0,0 +1,71 @@
+--- gpart-0.1h.orig/src/l64seek.c
++++ gpart-0.1h/src/l64seek.c
+@@ -25,30 +25,11 @@
+ } ostck[OSTACKLEN];
+ static int osptr = -1;
+
+-#if defined(__linux__) && defined(__i386__)
+-_syscall5(int,_llseek,uint,fd,ulong,hi,ulong,lo,loff_t *,res,uint,wh)
+-#endif
+-
+-
+-
+ off64_t l64seek(int fd,off64_t offset,int whence)
+ {
+ off64_t ret = (off64_t)-1;
+
+-#if defined(__linux__) && defined(__i386__)
+- int iret;
+- unsigned long ohi, olo;
+-
+- ohi = (unsigned long)((offset >> 32) & 0xFFFFFFFF);
+- olo = (unsigned long)(offset & 0xFFFFFFFF);
+- iret = _llseek(fd,ohi,olo,&ret,whence);
+- if (iret == -1)
+- ret = (off64_t)-1;
+-#endif
+-
+-#if defined(__FreeBSD__) || (defined(__linux__) && defined(__alpha__))
+ ret = lseek(fd,offset,whence);
+-#endif
+
+ return (ret);
+ }
+--- gpart-0.1h.orig/src/l64seek.h
++++ gpart-0.1h/src/l64seek.h
+@@ -17,6 +17,8 @@
+ #ifndef _L64SEEK_H
+ #define _L64SEEK_H
+
++#include <sys/stat.h>
++#include <sys/types.h>
+ #include <unistd.h>
+
+ /*
+@@ -25,19 +27,7 @@
+ * offsets.
+ */
+
+-
+-#if defined(__linux__)
+-# include <linux/unistd.h>
+-# include <sys/types.h>
+- typedef int64_t off64_t;
+-#endif
+-
+-
+-#if defined(__FreeBSD__)
+- typedef off_t off64_t;
+-#endif
+-
+-
++typedef loff_t off64_t;
+ typedef off64_t s64_t;
+
+ off64_t l64seek(int fd, off64_t offset, int whence);
+@@ -45,5 +35,4 @@
+ int l64opush(int);
+ s64_t l64opop(int);
+
+-
+ #endif
diff --git a/sys-block/gpart/files/gpart-0.1h-ntfs.patch b/sys-block/gpart/files/gpart-0.1h-ntfs.patch
new file mode 100644
index 000000000000..1f887ac47135
--- /dev/null
+++ b/sys-block/gpart/files/gpart-0.1h-ntfs.patch
@@ -0,0 +1,75 @@
+Ripped out of debian
+
+--- gpart-0.1h.orig/src/gm_ntfs.h
++++ gpart-0.1h/src/gm_ntfs.h
+@@ -14,6 +14,9 @@
+ *
+ */
+
++#include <stdint.h>
++#include <asm/byteorder.h>
++
+ #ifndef _GM_NTFS_H
+ #define _GM_NTFS_H
+
+@@ -29,32 +32,38 @@
+ /* 'NTFS' in little endian */
+ #define NTFS_SUPER_MAGIC 0x5346544E
+
+-#if defined(i386) || defined(__i386__) || defined(__alpha__)
+-
+ /* unsigned integral types */
+ #ifndef NTFS_INTEGRAL_TYPES
+ #define NTFS_INTEGRAL_TYPES
+-typedef unsigned char ntfs_u8;
+-typedef unsigned short ntfs_u16;
+-typedef unsigned int ntfs_u32;
+-typedef s64_t ntfs_u64;
++typedef uint8_t ntfs_u8;
++typedef uint16_t ntfs_u16;
++typedef uint32_t ntfs_u32;
++typedef uint64_t ntfs_u64;
++typedef int8_t ntfs_s8;
++typedef int16_t ntfs_s16;
+ #endif /* NTFS_INTEGRAL_TYPES */
+-#endif /* defined(i386) || defined(__i386__) || defined(__alpha__) */
+-
+-
+-/* Macros reading unsigned integers from a byte pointer */
+-/* these should work for all little endian machines */
+-#define NTFS_GETU8(p) (*(ntfs_u8*)(p))
+-#define NTFS_GETU16(p) (*(ntfs_u16*)(p))
+-#define NTFS_GETU24(p) (NTFS_GETU32(p) & 0xFFFFFF)
+-#define NTFS_GETU32(p) (*(ntfs_u32*)(p))
+-#define NTFS_GETU64(p) (*(ntfs_u64*)(p))
+-
+-/* Macros reading signed integers, returning int */
+-#define NTFS_GETS8(p) ((int)(*(char*)(p)))
+-#define NTFS_GETS16(p) ((int)(*(short*)(p)))
+-#define NTFS_GETS24(p) (NTFS_GETU24(p) < 0x800000 ? (int)NTFS_GETU24(p) :
+-
+
++#define CPU_TO_LE16(a) __cpu_to_le16(a)
++#define CPU_TO_LE32(a) __cpu_to_le32(a)
++#define CPU_TO_LE64(a) __cpu_to_le64(a)
++
++#define LE16_TO_CPU(a) __cpu_to_le16(a)
++#define LE32_TO_CPU(a) __cpu_to_le32(a)
++#define LE64_TO_CPU(a) __cpu_to_le64(a)
++
++/* Macros reading unsigned integers */
++#define NTFS_GETU8(p) (*(ntfs_u8*)(p))
++#define NTFS_GETU16(p) ((ntfs_u16)LE16_TO_CPU(*(ntfs_u16*)(p)))
++#define NTFS_GETU24(p) ((ntfs_u32)NTFS_GETU16(p) | \
++ ((ntfs_u32)NTFS_GETU8(((char*)(p)) + 2) << 16))
++#define NTFS_GETU32(p) ((ntfs_u32)LE32_TO_CPU(*(ntfs_u32*)(p)))
++#define NTFS_GETU64(p) ((ntfs_u64)LE64_TO_CPU(*(ntfs_u64*)(p)))
++
++/* Macros reading signed integers */
++#define NTFS_GETS8(p) ((*(ntfs_s8*)(p)))
++#define NTFS_GETS16(p) ((ntfs_s16)LE16_TO_CPU(*(short*)(p)))
++#define NTFS_GETS24(p) (NTFS_GETU24(p) < 0x800000 ? \
++ (int)NTFS_GETU24(p) : \
++ (int)(NTFS_GETU24(p) - 0x1000000))
+
+ #endif /* _GM_NTFS_H */
diff --git a/sys-block/gpart/files/gpart-0.1h-openmode.patch b/sys-block/gpart/files/gpart-0.1h-openmode.patch
new file mode 100644
index 000000000000..ca13cc9420e6
--- /dev/null
+++ b/sys-block/gpart/files/gpart-0.1h-openmode.patch
@@ -0,0 +1,11 @@
+--- gpart.orig/src/gpart.c 2008-10-19 15:06:06.000000000 +0000
++++ gpart/src/gpart.c 2008-11-25 07:34:47.000000000 +0000
+@@ -1221,7 +1221,7 @@ static int make_mbr_backup(disk_desc *d,
+ {
+ int fd, ret = 0;
+
+- if ((fd = open(bfile,O_WRONLY|O_CREAT)) < 0)
++ if ((fd = open(bfile,O_WRONLY|O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0)
+ return (ret);
+
+ if (write(fd,d->d_pt.t_boot,512) == 512)
diff --git a/sys-block/gpart/files/gpart-0.1h-vfat.patch b/sys-block/gpart/files/gpart-0.1h-vfat.patch
new file mode 100644
index 000000000000..7234ac689831
--- /dev/null
+++ b/sys-block/gpart/files/gpart-0.1h-vfat.patch
@@ -0,0 +1,17 @@
+Ripped out of debian
+
+--- gpart-0.1h.orig/src/gm_fat.h
++++ gpart-0.1h/src/gm_fat.h
+@@ -60,6 +60,10 @@
+ __u16 info_sector; /* filesystem info sector */
+ __u16 backup_boot; /* backup boot sector */
+ __u16 reserved2[6]; /* Unused */
+-};
+-
++} __attribute__ ((packed));
++/* "__attribute__ ((packed))"
++ added by davidc@debian.org,
++ as suggested by falk@zxmjz18.extern.uni-tuebingen.de
++ Fri Jul 07 18:04:15 2000
++ in debian bug report #66893 "FAT detection broken on Alpha" */
+ #endif /* _GM_FAT_H */
diff --git a/sys-block/gpart/files/gpart-0.3-build.patch b/sys-block/gpart/files/gpart-0.3-build.patch
new file mode 100644
index 000000000000..f45545d0fd80
--- /dev/null
+++ b/sys-block/gpart/files/gpart-0.3-build.patch
@@ -0,0 +1,10 @@
+--- gpart-0.3/Makefile.am
++++ gpart-0.3/Makefile.am
+@@ -1,6 +1,6 @@
+ AUTOMAKE_OPTIONS = foreign
+ SUBDIRS = src man
+
+-docdir = $(datadir)/doc/@PACKAGE@
++docdir = $(datadir)/doc/@PACKAGE@-@VERSION@
+ doc_DATA = Changes README.md
+ EXTRA_DIST = Changes README.md
diff --git a/sys-block/gpart/gpart-0.1h-r2.ebuild b/sys-block/gpart/gpart-0.1h-r2.ebuild
new file mode 100644
index 000000000000..b4cbe7bbc797
--- /dev/null
+++ b/sys-block/gpart/gpart-0.1h-r2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+DESCRIPTION="Partition table rescue/guessing tool"
+HOMEPAGE="http://www.stud.uni-hannover.de/user/76201/gpart/"
+SRC_URI="http://www.stud.uni-hannover.de/user/76201/gpart/${P}.tar.gz
+ ftp://ftp.namesys.com/pub/misc-patches/gpart-0.1h-reiserfs-3.6.patch.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa x86"
+IUSE=""
+
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-errno.patch
+ epatch "${FILESDIR}"/${P}-vfat.patch
+ epatch "${FILESDIR}"/${P}-ntfs.patch
+ epatch "${WORKDIR}"/gpart-0.1h-reiserfs-3.6.patch
+ epatch "${FILESDIR}"/${P}-l64seek.patch
+ epatch "${FILESDIR}"/${P}-openmode.patch
+ sed -i -e "/^CFLAGS/s: -O2 : ${CFLAGS} :" make.defs
+ sed -i -e "/^LDFLAGS/s:=:=${LDFLAGS} :" make.defs
+}
+
+src_install() {
+ dobin src/gpart || die
+ doman man/gpart.8
+ dodoc README Changes INSTALL LSM
+}
diff --git a/sys-block/gpart/gpart-0.3.ebuild b/sys-block/gpart/gpart-0.3.ebuild
new file mode 100644
index 000000000000..7b56760641f2
--- /dev/null
+++ b/sys-block/gpart/gpart-0.3.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="Partition table rescue/guessing tool"
+HOMEPAGE="https://github.com/baruch/gpart"
+SRC_URI="https://github.com/baruch/gpart/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE=""
+
+RDEPEND=""
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.1h-errno.patch
+ "${FILESDIR}"/${PN}-0.3-build.patch
+)
+
+src_prepare() {
+ default
+
+ # Fix version string in build environment.
+ if [[ "$(awk -F , '/^AC_INIT/ {print $2}' configure.ac)" != ${PV} ]] ; then
+ sed "/^AC_INIT/s@, [[:digit:]\.]\+[[:alnum:]-]*,@, ${PV},@" \
+ -i configure.ac || die
+ fi
+
+ eautoreconf
+}
diff --git a/sys-block/gpart/metadata.xml b/sys-block/gpart/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-block/gpart/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>