summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-boot/dvhtool
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-boot/dvhtool')
-rw-r--r--sys-boot/dvhtool/Manifest1
-rw-r--r--sys-boot/dvhtool/dvhtool-1.0.1-r2.ebuild44
-rw-r--r--sys-boot/dvhtool/files/dvhtool-1.0.1-add-raid-lvm-parttypes.patch24
-rw-r--r--sys-boot/dvhtool/files/dvhtool-1.0.1-debian-warn_type_guess.diff12
-rw-r--r--sys-boot/dvhtool/files/dvhtool-1.0.1-debian-xopen_source.diff11
-rw-r--r--sys-boot/dvhtool/files/dvhtool-1.0.1-debian.diff135
-rw-r--r--sys-boot/dvhtool/metadata.xml5
7 files changed, 232 insertions, 0 deletions
diff --git a/sys-boot/dvhtool/Manifest b/sys-boot/dvhtool/Manifest
new file mode 100644
index 000000000000..6222e0ff4bdd
--- /dev/null
+++ b/sys-boot/dvhtool/Manifest
@@ -0,0 +1 @@
+DIST dvhtool_1.0.1.orig.tar.gz 53283 SHA256 3596c74c08ee8f2f19712e8f0ab1f7ff8c483de7bfc2f50d205a186f52896f02
diff --git a/sys-boot/dvhtool/dvhtool-1.0.1-r2.ebuild b/sys-boot/dvhtool/dvhtool-1.0.1-r2.ebuild
new file mode 100644
index 000000000000..73f6db4383b7
--- /dev/null
+++ b/sys-boot/dvhtool/dvhtool-1.0.1-r2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools eutils toolchain-funcs
+
+DESCRIPTION="Tool to copy kernel(s) into the volume header on SGI MIPS-based workstations"
+HOMEPAGE="http://packages.debian.org/unstable/utils/dvhtool"
+SRC_URI="mirror://debian/pool/main/d/dvhtool/dvhtool_1.0.1.orig.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~x86"
+IUSE=""
+DEPEND=""
+RDEPEND=""
+
+S="${S}.orig"
+
+src_prepare() {
+ # several applicable hunks from a debian patch
+ epatch "${FILESDIR}"/${P}-debian.diff
+
+ # Newer minor patches from Debian
+ epatch "${FILESDIR}"/${P}-debian-warn_type_guess.diff
+ epatch "${FILESDIR}"/${P}-debian-xopen_source.diff
+
+ # Allow dvhtool to recognize Linux RAID and Linux LVM partitions
+ epatch "${FILESDIR}"/${P}-add-raid-lvm-parttypes.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ CC=$(tc-getCC) LD=$(tc-getLD) \
+ econf
+}
+
+src_compile() {
+ CC=$(tc-getCC) LD=$(tc-getLD) \
+ emake
+}
diff --git a/sys-boot/dvhtool/files/dvhtool-1.0.1-add-raid-lvm-parttypes.patch b/sys-boot/dvhtool/files/dvhtool-1.0.1-add-raid-lvm-parttypes.patch
new file mode 100644
index 000000000000..2a3cd753252b
--- /dev/null
+++ b/sys-boot/dvhtool/files/dvhtool-1.0.1-add-raid-lvm-parttypes.patch
@@ -0,0 +1,24 @@
+diff -Naurp dvhtool-1.0.1.orig-A/dvh.h dvhtool-1.0.1.orig/dvh.h
+--- dvhtool-1.0.1.orig-A/dvh.h 2005-09-28 02:45:56 -0400
++++ dvhtool-1.0.1.orig/dvh.h 2005-09-28 02:41:15 -0400
+@@ -129,6 +129,8 @@ struct partition_table { /* one per log
+ #define PTYPE_XVM 13 /* partition is sgi XVM */
+ #define PTYPE_LSWAP 0x82 /* partition is Linux swap */
+ #define PTYPE_LINUX 0x83 /* partition is Linux native */
++#define PTYPE_LLVM 0x8e /* partition is Linux LVM */
++#define PTYPE_LRAID 0xfd /* partition is Linux RAID */
+ #define NPTYPES 16
+
+ #define VHMAGIC 0xbe5a941 /* randomly chosen value */
+diff -Naurp dvhtool-1.0.1.orig-A/dvhlib.c dvhtool-1.0.1.orig/dvhlib.c
+--- dvhtool-1.0.1.orig-A/dvhlib.c 2005-09-28 02:45:56 -0400
++++ dvhtool-1.0.1.orig/dvhlib.c 2005-09-28 02:41:45 -0400
+@@ -52,6 +52,8 @@ ptype2str(int ptype)
+ case PTYPE_XVM: return "XVM Volume";
+ case PTYPE_LSWAP: return "Linux Swap";
+ case PTYPE_LINUX: return "Linux Native";
++ case PTYPE_LLVM: return "Linux LVM";
++ case PTYPE_LRAID: return "Linux RAID";
+ }
+ return "Unknown Partition Type";
+ }
diff --git a/sys-boot/dvhtool/files/dvhtool-1.0.1-debian-warn_type_guess.diff b/sys-boot/dvhtool/files/dvhtool-1.0.1-debian-warn_type_guess.diff
new file mode 100644
index 000000000000..bab2a305be92
--- /dev/null
+++ b/sys-boot/dvhtool/files/dvhtool-1.0.1-debian-warn_type_guess.diff
@@ -0,0 +1,12 @@
+--- a/dvhlib.h
++++ b/dvhlib.h
+@@ -3,7 +3,8 @@ #include "config.h"
+ #ifdef HAVE_INTTYPES_H
+ #include <inttypes.h>
+ #else
+-typedef unsigned int uint32_t; /* A guess ... */
++ #warning Guessing type of uint32_t
++ typedef unsigned int uint32_t; /* A guess ... */
+ #endif
+
+ #include "dvh.h"
diff --git a/sys-boot/dvhtool/files/dvhtool-1.0.1-debian-xopen_source.diff b/sys-boot/dvhtool/files/dvhtool-1.0.1-debian-xopen_source.diff
new file mode 100644
index 000000000000..333eb2a74064
--- /dev/null
+++ b/sys-boot/dvhtool/files/dvhtool-1.0.1-debian-xopen_source.diff
@@ -0,0 +1,11 @@
+diff --git a/dvhlib.c b/dvhlib.c
+--- a/dvhlib.c
++++ b/dvhlib.c
+@@ -1,6 +1,7 @@
+ /*
+ * Disk Volume Header Library
+ */
++#define _XOPEN_SOURCE 500
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/sys-boot/dvhtool/files/dvhtool-1.0.1-debian.diff b/sys-boot/dvhtool/files/dvhtool-1.0.1-debian.diff
new file mode 100644
index 000000000000..43f33ffc2596
--- /dev/null
+++ b/sys-boot/dvhtool/files/dvhtool-1.0.1-debian.diff
@@ -0,0 +1,135 @@
+--- dvhtool-1.0.1.orig/dvh.h
++++ dvhtool-1.0.1/dvh.h
+@@ -127,6 +127,8 @@
+ #define PTYPE_XFSLOG 11 /* partition is sgi XFS log */
+ #define PTYPE_XLV 12 /* partition is part of an XLV vol */
+ #define PTYPE_XVM 13 /* partition is sgi XVM */
++#define PTYPE_LSWAP 0x82 /* partition is Linux swap */
++#define PTYPE_LINUX 0x83 /* partition is Linux native */
+ #define NPTYPES 16
+
+ #define VHMAGIC 0xbe5a941 /* randomly chosen value */
+--- dvhtool-1.0.1.orig/dvhlib.c
++++ dvhtool-1.0.1/dvhlib.c
+@@ -50,6 +50,8 @@
+ case PTYPE_XFSLOG: return "XFS Log";
+ case PTYPE_XLV: return "XLV Volume";
+ case PTYPE_XVM: return "XVM Volume";
++ case PTYPE_LSWAP: return "Linux Swap";
++ case PTYPE_LINUX: return "Linux Native";
+ }
+ return "Unknown Partition Type";
+ }
+@@ -325,8 +327,10 @@
+ if (res == -1)
+ die("Couldn't stat source file");
+
+- /* XXX pad to blocksize? */
+- size = vh->vh_pt[8].pt_nblks * blksize - istat.st_size;
++ /* calculate free blocks in vh */
++ size = vh->vh_pt[8].pt_nblks /* total vh size */
++ - ( vh->vh_pt[8].pt_firstlbn + 4 ) /* reserved area */
++ - (( istat.st_size + blksize - 1 ) / blksize ); /* pad to blocksize */
+ /*
+ * Are we replacing an existing file, check for enough space and free
+ * entry in volume header
+@@ -336,16 +340,15 @@
+ /* It's an existing file, delete it. */
+ memset(vd->vd_name, 0, VDNAMESIZE);
+ vd->vd_nbytes = 0;
+- break;
+ }
+ if ( vd->vd_nbytes ) {
+- size -= vd->vd_nbytes;
++ size -= (vd->vd_nbytes + blksize - 1 ) / blksize; /* pad to blocksize */
+ num++;
+ }
+ vd++;
+ }
+
+- if ( num == NVDIR )
++ if ( num == NVDIR )
+ die("No more free entries in volume header");
+ if ( size <= 0 )
+ die("Not enough space left in volume header");
+@@ -403,7 +406,7 @@
+ die("Short write");
+ }
+ }
+- dest += (vd->vd_nbytes + 511) / 512; /* XXX Blocksize */
++ dest += (vd->vd_nbytes + blksize - 1) / blksize;
+ vd++;
+ }
+
+--- dvhtool-1.0.1.orig/dvhtool.8
++++ dvhtool-1.0.1/dvhtool.8
+@@ -1,4 +1,4 @@
+-.TH DVHTOOL 1 "July 2000"
++.TH DVHTOOL 8 "July 2000"
+ .UC 4
+ .SH NAME
+ dvhtool \- Disk volume header manipulation tool
+@@ -85,4 +85,4 @@
+ .PP
+ .I dvhtool
+ was written by Ralf Baechle <ralf@oss.sgi.com>, Keith M. Wesolowski <wesolows@foobazco.org>,
+-Tor Arntsen <tor@spacetec.no>, Guido Guenther <guido.guenther@gmx.net>.
++Tor Arntsen <tor@spacetec.no>, Guido Guenther <agx@debian.org>.
+--- dvhtool-1.0.1.orig/Makefile.in
++++ dvhtool-1.0.1/Makefile.in
+@@ -1,4 +1,4 @@
+-# Makefile.in generated automatically by automake 1.4a from Makefile.am
++# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
+
+ # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+@@ -46,10 +46,9 @@
+ AUTOHEADER = @AUTOHEADER@
+
+ INSTALL = @INSTALL@
+-INSTALL_PROGRAM = @INSTALL_PROGRAM@
++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+-INSTALL_STRIP_FLAG =
+ transform = @program_transform_name@
+
+ NORMAL_INSTALL = :
+@@ -104,7 +103,7 @@
+
+ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+-TAR = gtar
++TAR = tar
+ GZIP_ENV = --best
+ DEP_FILES = .deps/dvhlib.P .deps/dvhtool.P .deps/getopt.P \
+ .deps/getopt1.P .deps/pread.P
+@@ -124,7 +123,7 @@
+ $(ACLOCAL_M4): configure.in acinclude.m4
+ cd $(srcdir) && $(ACLOCAL)
+
+-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
++config.status: $(srcdir)/configure.in $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+ $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+@@ -173,8 +172,8 @@
+ $(mkinstalldirs) $(DESTDIR)$(sbindir)
+ @list='$(sbin_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+- echo " $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+- $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
++ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
++ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+
+@@ -382,7 +381,7 @@
+ all-am: Makefile $(PROGRAMS) $(MANS) $(HEADERS) config.h
+ all-redirect: all-am
+ install-strip:
+- $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+ installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir)/man8
+
diff --git a/sys-boot/dvhtool/metadata.xml b/sys-boot/dvhtool/metadata.xml
new file mode 100644
index 000000000000..9b9d8d219fd3
--- /dev/null
+++ b/sys-boot/dvhtool/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>mips</herd>
+</pkgmetadata>