summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Callen <abcd@gentoo.org>2009-12-15 21:24:11 +0000
committerJonathan Callen <abcd@gentoo.org>2009-12-15 21:24:11 +0000
commit7f121510a0a7ba22d061aa056565cc02db77e8f2 (patch)
tree78d34b65f493c947d2696431b8a102115c6266b2 /sys-boot/os-prober
parentInitial commit of qshare application (diff)
downloadgentoo-2-7f121510a0a7ba22d061aa056565cc02db77e8f2.tar.gz
gentoo-2-7f121510a0a7ba22d061aa056565cc02db77e8f2.tar.bz2
gentoo-2-7f121510a0a7ba22d061aa056565cc02db77e8f2.zip
new package
(Portage version: -svn/cvs/Linux i686)
Diffstat (limited to 'sys-boot/os-prober')
-rw-r--r--sys-boot/os-prober/ChangeLog10
-rw-r--r--sys-boot/os-prober/files/os-prober-1.35-multilib.patch120
-rw-r--r--sys-boot/os-prober/metadata.xml13
-rw-r--r--sys-boot/os-prober/os-prober-1.35.ebuild66
4 files changed, 209 insertions, 0 deletions
diff --git a/sys-boot/os-prober/ChangeLog b/sys-boot/os-prober/ChangeLog
new file mode 100644
index 000000000000..06c012b4c0ec
--- /dev/null
+++ b/sys-boot/os-prober/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sys-boot/os-prober
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/os-prober/ChangeLog,v 1.1 2009/12/15 21:24:11 abcd Exp $
+
+*os-prober-1.35 (15 Dec 2009)
+
+ 15 Dec 2009; Jonathan Callen <abcd@gentoo.org> +os-prober-1.35.ebuild,
+ +files/os-prober-1.35-multilib.patch, +metadata.xml:
+ New ebuild. Thanks to Wizzelby <wizzleby@gmail.com> for initial ebuild.
+
diff --git a/sys-boot/os-prober/files/os-prober-1.35-multilib.patch b/sys-boot/os-prober/files/os-prober-1.35-multilib.patch
new file mode 100644
index 000000000000..8f10676462c4
--- /dev/null
+++ b/sys-boot/os-prober/files/os-prober-1.35-multilib.patch
@@ -0,0 +1,120 @@
+--- os-prober.orig/common.sh
++++ os-prober/common.sh
+@@ -1,5 +1,5 @@
+ newns () {
+- [ "$OS_PROBER_NEWNS" ] || exec /usr/lib/os-prober/newns "$0" "$@"
++ [ "$OS_PROBER_NEWNS" ] || exec /usr/libexec/os-prober/newns "$0" "$@"
+ }
+
+ require_tmpdir() {
+--- os-prober.orig/linux-boot-prober
++++ os-prober/linux-boot-prober
+@@ -15,7 +15,7 @@ if ! mapped="$(mapdevfs "$partition")";
+ fi
+
+ if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map"; then
+- for test in /usr/lib/linux-boot-probes/*; do
++ for test in /usr/libexec/linux-boot-probes/*; do
+ debug "running $test"
+ if [ -x $test ] && [ -f $test ]; then
+ if $test "$partition"; then
+@@ -37,7 +37,7 @@ else
+ bootpart="$partition"
+ bootmounted=0
+ fi
+- for test in /usr/lib/linux-boot-probes/mounted/*; do
++ for test in /usr/libexec/linux-boot-probes/mounted/*; do
+ if [ -f $test ] && [ -x $test ]; then
+ debug "running $test on mounted $partition"
+ if $test "$partition" "$bootpart" "$mpoint" "$type"; then
+--- os-prober.orig/linux-boot-probes/common/50mounted-tests
++++ os-prober/linux-boot-probes/common/50mounted-tests
+@@ -39,7 +39,7 @@ for type in $types; do
+ bootpart="${mountboot%% *}"
+ mounted="${mountboot#* }"
+
+- for test in /usr/lib/linux-boot-probes/mounted/*; do
++ for test in /usr/libexec/linux-boot-probes/mounted/*; do
+ if [ -f $test ] && [ -x $test ]; then
+ debug "running $test $partition $bootpart $tmpmnt $type"
+ if $test "$partition" "$bootpart" "$tmpmnt" "$type"; then
+--- os-prober.orig/os-prober
++++ os-prober/os-prober
+@@ -88,7 +88,7 @@ parse_proc_mdstat () {
+ # Needed for idempotency
+ rm -f /var/lib/os-prober/labels
+
+-for prog in /usr/lib/os-probes/init/*; do
++for prog in /usr/libexec/os-probes/init/*; do
+ if [ -x $prog ] && [ -f $prog ]; then
+ $prog || true
+ fi
+@@ -115,7 +115,7 @@ for partition in $(partitions); do
+ fi
+
+ if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map" ; then
+- for test in /usr/lib/os-probes/*; do
++ for test in /usr/libexec/os-probes/*; do
+ if [ -f $test ] && [ -x $test ]; then
+ debug "running $test on $partition"
+ if $test "$partition"; then
+@@ -129,7 +129,7 @@ for partition in $(partitions); do
+ mpoint="$(unescape_mount "$mpoint")"
+ if [ "$mpoint" != "/target/boot" ] && [ "$mpoint" != "/target" ] && [ "$mpoint" != "/" ]; then
+ type=$(grep "^$mapped " "$OS_PROBER_TMP/mounted-map" | head -n1 | cut -d " " -f 3)
+- for test in /usr/lib/os-probes/mounted/*; do
++ for test in /usr/libexec/os-probes/mounted/*; do
+ if [ -f $test ] && [ -x $test ]; then
+ debug "running $test on mounted $partition"
+ if $test "$partition" "$mpoint" "$type"; then
+--- os-prober.orig/os-probes/common/50mounted-tests
++++ os-prober/os-probes/common/50mounted-tests
+@@ -48,7 +48,7 @@ fi
+ for type in $types $delaytypes; do
+ if mount -o ro -t "$type" "$partition" "$tmpmnt" 2>/dev/null; then
+ debug "mounted as $type filesystem"
+- for test in /usr/lib/os-probes/mounted/*; do
++ for test in /usr/libexec/os-probes/mounted/*; do
+ debug "running subtest $test"
+ if [ -f $test ] && [ -x $test ]; then
+ if $test "$partition" "$tmpmnt" "$type"; then
+--- os-prober.orig/os-probes/mounted/common/90linux-distro
++++ os-prober/os-probes/mounted/common/90linux-distro
+@@ -13,7 +13,7 @@ type="$3"
+ # better. Make sure this test has a high number so that more accurate tests
+ # can come first.
+ # TODO: look for ld-linux.so on arches that have it
+-if ls $dir/lib/ld*.so* >/dev/null 2>/dev/null; then
++if ls $dir/lib*/ld*.so* >/dev/null 2>/dev/null; then
+ if [ -e "$dir/etc/debian_version" ]; then
+ short="Debian"
+ long=$(printf "Debian GNU/Linux (%s)\n" "$(cat $dir/etc/debian_version)")
+--- os-prober.orig/README
++++ os-prober/README
+@@ -18,7 +18,7 @@ such as:
+ a chain one for other partitions
+ with their own boot sectors.
+
+-Tests are executable programs in the directory /usr/lib/os-probes/. Each
++Tests are executable programs in the directory /usr/libexec/os-probes/. Each
+ test is called once per partition, with the partiton to check as its
+ parameter, and may output a string as described above, or nothing if it does
+ not recognise an OS on that partition. Tests return an exit code of 0
+@@ -27,7 +27,7 @@ partition; or return an exit code of 1 t
+ and let the next test run.
+
+ Tests that require the partition to be mounted can be placed in
+-/usr/lib/os-probes/mounted/. These tests are passed the following
++/usr/libexec/os-probes/mounted/. These tests are passed the following
+ parameters: partition, mount point, filesystem.
+
+ Bootloader installer packages will then have to process this output (fairly
+@@ -62,7 +62,7 @@ short (or nonexistent), and may be inacc
+ TODO for other limitations.
+
+ The tests used by linux-boot-prober are in the directory
+-/usr/lib/linux-boot-probes/ and also in /usr/lib/linux-boot-probes/mounted,
++/usr/libexec/linux-boot-probes/ and also in /usr/libexec/linux-boot-probes/mounted,
+ and they are called in a similar way as the os-probes described above.
+ The mounted probes are passed parameters for the root partition, the boot
+ partition, and the directory the filesystems are mounted in.
diff --git a/sys-boot/os-prober/metadata.xml b/sys-boot/os-prober/metadata.xml
new file mode 100644
index 000000000000..5f841955c0b5
--- /dev/null
+++ b/sys-boot/os-prober/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+ <email>abcd@gentoo.org</email>
+ <name>Jonathan Callen</name>
+</maintainer>
+<maintainer>
+ <email>wizzleby@gmail.com</email>
+ <name>Wizzleby</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-boot/os-prober/os-prober-1.35.ebuild b/sys-boot/os-prober/os-prober-1.35.ebuild
new file mode 100644
index 000000000000..53b0cd93494d
--- /dev/null
+++ b/sys-boot/os-prober/os-prober-1.35.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/os-prober/os-prober-1.35.ebuild,v 1.1 2009/12/15 21:24:11 abcd Exp $
+
+EAPI="2"
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="Utility to detect other OSs on a set of drives"
+HOMEPAGE="http://packages.debian.org/source/sid/os-prober"
+SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-multilib.patch
+
+ sed -i -e "s:/lib/udev:/$(get_libdir)/udev:g" common.sh || die "sed failed on common.sh"
+
+ # Just use the default rules provided by GNU Make
+ rm Makefile
+}
+
+src_compile() {
+ tc-export CC
+ emake newns || die "emake failed"
+}
+
+src_install() {
+ dobin os-prober linux-boot-prober || die "dobin failed"
+
+ exeinto /usr/libexec/os-prober
+ doexe newns || die "doexe newns failed"
+
+ insinto /usr/share/os-prober
+ doins common.sh || die "doins common.sh failed"
+
+ keepdir /var/lib/os-prober
+
+ local debarch=${ARCH%-*} dir
+
+ case ${debarch} in
+ amd64) debarch=x86 ;;
+ ppc|ppc64) debarch=powerpc ;;
+ esac
+
+ for dir in os-probes{,/mounted,/init} linux-boot-probes{,/mounted}; do
+ exeinto /usr/libexec/$dir
+ doexe $dir/common/* || die "doexe failed in $dir/common"
+ if [[ -d $dir/$debarch ]]; then
+ doexe $dir/$debarch/* || die "doexe failed in $dir/$debarch"
+ fi
+ done
+
+ if use amd64 || use x86; then
+ exeinto /usr/libexec/os-probes/mounted
+ doexe os-probes/mounted/powerpc/20macosx || die "doexe failed on 20macosx"
+ fi
+
+ dodoc README TODO debian/changelog || die "dodoc failed"
+}