From d19be93ad7593c2db13d527b40173e8fb79a3d0bcd589b993a18a7bff0d1e098 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 12 Jul 2011 13:23:33 +0000 Subject: [PATCH] Accepting request 76111 from home:a_jaeger:branches:openSUSE:Factory New package for operating system probing OBS-URL: https://build.opensuse.org/request/show/76111 OBS-URL: https://build.opensuse.org/package/show/Base:System/os-prober?expand=0&rev=1 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + os-prober-SUSE.patch | 13 ++++++ os-prober-newnsdirfix.patch | 10 +++++ os-prober.changes | 5 +++ os-prober.spec | 86 +++++++++++++++++++++++++++++++++++++ os-prober_1.47.tar.gz | 3 ++ 7 files changed, 141 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 os-prober-SUSE.patch create mode 100644 os-prober-newnsdirfix.patch create mode 100644 os-prober.changes create mode 100644 os-prober.spec create mode 100644 os-prober_1.47.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/os-prober-SUSE.patch b/os-prober-SUSE.patch new file mode 100644 index 0000000..29f434e --- /dev/null +++ b/os-prober-SUSE.patch @@ -0,0 +1,13 @@ +Index: os-prober/os-probes/mounted/common/90linux-distro +=================================================================== +--- os-prober.orig/os-probes/mounted/common/90linux-distro ++++ os-prober/os-probes/mounted/common/90linux-distro +@@ -80,7 +80,7 @@ if ls "$dir"/lib*/ld*.so* >/dev/null 2>/ + short="RedHat" + long="$(cat "$dir/etc/redhat-release")" + elif [ -e "$dir/etc/SuSE-release" ]; then +- short="SuSE" ++ short="SUSE" + long="$(head -n 1 "$dir/etc/SuSE-release")" + elif [ -e "$dir/etc/gentoo-release" ]; then + short="Gentoo" diff --git a/os-prober-newnsdirfix.patch b/os-prober-newnsdirfix.patch new file mode 100644 index 0000000..97586c2 --- /dev/null +++ b/os-prober-newnsdirfix.patch @@ -0,0 +1,10 @@ +diff -up os-prober-1.46/common.sh.newnsmove os-prober-1.46/common.sh +--- os-prober-1.46/common.sh.newnsmove 2011-04-10 05:30:57.000000000 +0430 ++++ os-prober-1.46/common.sh 2011-05-04 04:08:09.603020037 +0430 +@@ -1,5 +1,5 @@ + newns () { +- [ "$OS_PROBER_NEWNS" ] || exec /usr/lib/os-prober/newns "$0" "$@" ++ [ "$OS_PROBER_NEWNS" ] || exec /usr/lib/newns "$0" "$@" + } + + cleanup_tmpdir=false diff --git a/os-prober.changes b/os-prober.changes new file mode 100644 index 0000000..9ff2e78 --- /dev/null +++ b/os-prober.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Tue Jul 12 13:08:58 UTC 2011 - aj@suse.de + +- Create new package. + diff --git a/os-prober.spec b/os-prober.spec new file mode 100644 index 0000000..1368d9e --- /dev/null +++ b/os-prober.spec @@ -0,0 +1,86 @@ +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +Name: os-prober +Version: 1.47 +Release: 1 +Summary: Probes disks on the system for installed operating systems + +License: GPL +Url: http://kitenet.net/~joey/code/os-prober/ +Group: System/Boot +Source0: http://ftp.de.debian.org/debian/pool/main/o/os-prober/%{name}_%{version}.tar.gz +# move newns binary outside of os-prober subdirectory, so that debuginfo +# can be automatically generated for it +Patch0: os-prober-newnsdirfix.patch +# PATCH-FIX-OPENSUSE: Fix spelling of SUSE aj@suse.de +Patch1: os-prober-SUSE.patch + +Requires: /bin/grep +Requires: /bin/sed +Requires: /sbin/modprobe +Requires: coreutils +Requires: dmraid +Requires: lvm2 +Requires: udev +Requires: util-linux + +%description +This package detects other OSes available on a system and outputs the results +in a generic machine-readable format. Support for new OSes and Linux +distributions can be added easily. + +%prep +%setup -q -n %{name} +%patch0 -p1 +%patch1 -p1 + +%build +make %{?_smp_mflags} CFLAGS="%{optflags}" + +%install +install -m 0755 -d %{buildroot}%{_bindir} +install -m 0755 -d %{buildroot}%{_localstatedir}/lib/%{name} + +install -m 0755 -p os-prober linux-boot-prober %{buildroot}%{_bindir} +install -m 0755 -Dp newns %{buildroot}%{_libexecdir}/newns +install -m 0644 -Dp common.sh %{buildroot}%{_datadir}/%{name}/common.sh + +%ifarch m68k +ARCH=m68k +%endif +%ifarch ppc ppc64 +ARCH=powerpc +%endif +%ifarch sparc sparc64 +ARCH=sparc +%endif +%ifarch %{ix86} x86_64 +ARCH=x86 +%endif + +for probes in os-probes os-probes/mounted os-probes/init \ + linux-boot-probes linux-boot-probes/mounted; do + install -m 755 -d %{buildroot}%{_libexecdir}/$probes + cp -a $probes/common/* %{buildroot}%{_libexecdir}/$probes + if [ -e "$probes/$ARCH" ]; then + cp -a $probes/$ARCH/* %{buildroot}%{_libexecdir}/$probes + fi +done +if [ "$ARCH" = x86 ]; then + install -m 755 -p os-probes/mounted/powerpc/20macosx \ + %{buildroot}%{_libexecdir}/os-probes/mounted +fi + +%files +%defattr(-,root,root,-) +%doc README TODO debian/copyright debian/changelog +%{_bindir}/* +%{_libexecdir}/linux-boot-probes +%{_libexecdir}/newns +%{_libexecdir}/os-probes +%{_datadir}/%{name} +%{_localstatedir}/lib/%{name} + +%changelog diff --git a/os-prober_1.47.tar.gz b/os-prober_1.47.tar.gz new file mode 100644 index 0000000..3a1d75b --- /dev/null +++ b/os-prober_1.47.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:702c8e0bc148c13708d9e52cf8255b5d7bcd6fbabac3d823f506f2fe2376654f +size 24896