1 |
commit: 2195898d5f9ed4cd445758c7616c0d46ce03a947 |
2 |
Author: Sergey Galkin <sergey.gals <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Jan 8 05:28:10 2022 +0000 |
4 |
Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 11 17:53:58 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2195898d |
7 |
|
8 |
sys-boot/os-prober: fix for kernel 5.15 with ntfs3 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/830753 |
11 |
Signed-off-by: Sergei Galkin <sergey.gals <AT> gmail.com> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/23694 |
13 |
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org> |
14 |
|
15 |
.../os-prober/files/os-prober-1.79-ntfs3.patch | 26 +++++ |
16 |
sys-boot/os-prober/os-prober-1.79-r2.ebuild | 105 +++++++++++++++++++++ |
17 |
2 files changed, 131 insertions(+) |
18 |
|
19 |
diff --git a/sys-boot/os-prober/files/os-prober-1.79-ntfs3.patch b/sys-boot/os-prober/files/os-prober-1.79-ntfs3.patch |
20 |
new file mode 100644 |
21 |
index 000000000000..a354445ebd8b |
22 |
--- /dev/null |
23 |
+++ b/sys-boot/os-prober/files/os-prober-1.79-ntfs3.patch |
24 |
@@ -0,0 +1,26 @@ |
25 |
+For 5.15 kernel with ntfs3 file system |
26 |
+ |
27 |
+Bug: https://bugs.gentoo.org/830753 |
28 |
+ |
29 |
+--- a/os-probes/mounted/arm64/20microsoft |
30 |
++++ b/os-probes/mounted/arm64/20microsoft |
31 |
+@@ -15,7 +15,7 @@ fi |
32 |
+ |
33 |
+ # Weed out stuff that doesn't apply to us |
34 |
+ case "$type" in |
35 |
+- ntfs|ntfs-3g) debug "$1 is a NTFS partition" ;; |
36 |
++ ntfs|ntfs-3g|ntfs3) debug "$1 is a NTFS partition" ;; |
37 |
+ vfat) debug "$1 is a FAT32 partition" ;; |
38 |
+ msdos) debug "$1 is a FAT16 partition" ;; |
39 |
+ fat) debug "$1 is a FAT partition (mounted by GRUB)" ;; |
40 |
+--- a/os-probes/mounted/x86/20microsoft |
41 |
++++ b/os-probes/mounted/x86/20microsoft |
42 |
+@@ -15,7 +15,7 @@ fi |
43 |
+ |
44 |
+ # Weed out stuff that doesn't apply to us |
45 |
+ case "$type" in |
46 |
+- ntfs|ntfs-3g) debug "$1 is a NTFS partition" ;; |
47 |
++ ntfs|ntfs-3g|ntfs3) debug "$1 is a NTFS partition" ;; |
48 |
+ vfat) debug "$1 is a FAT32 partition" ;; |
49 |
+ msdos) debug "$1 is a FAT16 partition" ;; |
50 |
+ fat) debug "$1 is a FAT partition (mounted by GRUB)" ;; |
51 |
|
52 |
diff --git a/sys-boot/os-prober/os-prober-1.79-r2.ebuild b/sys-boot/os-prober/os-prober-1.79-r2.ebuild |
53 |
new file mode 100644 |
54 |
index 000000000000..45b2903ceac8 |
55 |
--- /dev/null |
56 |
+++ b/sys-boot/os-prober/os-prober-1.79-r2.ebuild |
57 |
@@ -0,0 +1,105 @@ |
58 |
+# Copyright 1999-2022 Gentoo Authors |
59 |
+# Distributed under the terms of the GNU General Public License v2 |
60 |
+ |
61 |
+EAPI=8 |
62 |
+inherit readme.gentoo-r1 toolchain-funcs |
63 |
+ |
64 |
+DESCRIPTION="Utility to detect other OSs on a set of drives" |
65 |
+HOMEPAGE="https://salsa.debian.org/installer-team/os-prober" |
66 |
+ |
67 |
+if [[ ${PV} == 9999 ]]; then |
68 |
+ inherit git-r3 |
69 |
+ EGIT_REPO_URI="https://salsa.debian.org/installer-team/${PN}.git" |
70 |
+else |
71 |
+ SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${PN}_${PV}.tar.xz" |
72 |
+ KEYWORDS="~amd64 ~x86" |
73 |
+ S="${WORKDIR}"/${PN} |
74 |
+fi |
75 |
+ |
76 |
+LICENSE="GPL-3" |
77 |
+SLOT="0" |
78 |
+ |
79 |
+# grub-mount needed per bug #607518 |
80 |
+RDEPEND="sys-boot/grub:2[mount]" |
81 |
+ |
82 |
+# bug 594250 |
83 |
+QA_MULTILIB_PATHS="usr/lib/os-prober/.*" |
84 |
+ |
85 |
+PATCHES=( |
86 |
+ "${FILESDIR}"/${PN}-1.79-handle-multiple-initrd-paths.patch |
87 |
+ "${FILESDIR}"/${PN}-1.79-mdraid-detection.patch |
88 |
+ "${FILESDIR}"/${PN}-1.79-btrfs-subvolume-detection.patch |
89 |
+ "${FILESDIR}"/${PN}-1.79-use-fstab-name.patch |
90 |
+ "${FILESDIR}"/${PN}-1.79-mounted-boot-partition-fix.patch |
91 |
+ "${FILESDIR}"/${PN}-1.79-fix-busy-umount-message.patch |
92 |
+ "${FILESDIR}"/${PN}-1.79-efi-chroot-blkid-fallback.patch |
93 |
+ "${FILESDIR}"/${PN}-1.79-ntfs3.patch |
94 |
+) |
95 |
+ |
96 |
+DOC_CONTENTS=" |
97 |
+ If you intend for os-prober to detect versions of Windows installed on |
98 |
+ NTFS-formatted partitions, your system must be capable of reading the |
99 |
+ NTFS filesystem. One way to do this is by installing sys-fs/ntfs3g. |
100 |
+ |
101 |
+ NOTE: Since sys-boot/grub-2.06-rc1, grub-mkconfig disables os-prober by default. |
102 |
+ To enable it, add GRUB_DISABLE_OS_PROBER=false to /etc/default/grub. |
103 |
+" |
104 |
+ |
105 |
+src_prepare() { |
106 |
+ default |
107 |
+ # use default GNU rules |
108 |
+ rm Makefile || die 'rm Makefile failed' |
109 |
+} |
110 |
+ |
111 |
+src_compile() { |
112 |
+ tc-export CC |
113 |
+ emake newns |
114 |
+} |
115 |
+ |
116 |
+src_install() { |
117 |
+ dobin os-prober linux-boot-prober |
118 |
+ |
119 |
+ # Note: as no shared libraries are installed, /usr/lib is correct |
120 |
+ exeinto /usr/lib/os-prober |
121 |
+ doexe newns |
122 |
+ |
123 |
+ insinto /usr/share/os-prober |
124 |
+ doins common.sh |
125 |
+ |
126 |
+ keepdir /var/lib/os-prober |
127 |
+ |
128 |
+ local debarch=${ARCH%-*} dir |
129 |
+ |
130 |
+ case ${debarch} in |
131 |
+ amd64) debarch=x86 ;; |
132 |
+ ppc|ppc64) debarch=powerpc ;; |
133 |
+ esac |
134 |
+ |
135 |
+ for dir in os-probes{,/mounted,/init} linux-boot-probes{,/mounted}; do |
136 |
+ exeinto /usr/lib/${dir} |
137 |
+ doexe ${dir}/common/* |
138 |
+ if [[ -d ${dir}/${debarch} ]]; then |
139 |
+ for exe in ${dir}/${debarch}/*; do |
140 |
+ [[ ! -d "${exe}" ]] && doexe "${exe}" |
141 |
+ done |
142 |
+ fi |
143 |
+ if [[ -d ${dir}/${debarch}/efi ]]; then |
144 |
+ exeinto /usr/lib/${dir}/efi |
145 |
+ doexe ${dir}/${debarch}/efi/* |
146 |
+ fi |
147 |
+ done |
148 |
+ |
149 |
+ if use amd64 || use x86; then |
150 |
+ exeinto /usr/lib/os-probes/mounted |
151 |
+ doexe os-probes/mounted/powerpc/20macosx |
152 |
+ fi |
153 |
+ |
154 |
+ einstalldocs |
155 |
+ dodoc debian/changelog |
156 |
+ |
157 |
+ readme.gentoo_create_doc |
158 |
+} |
159 |
+ |
160 |
+pkg_postinst() { |
161 |
+ readme.gentoo_print_elog |
162 |
+} |