diff options
Diffstat (limited to 'sys-boot')
19 files changed, 329 insertions, 213 deletions
diff --git a/sys-boot/Manifest.gz b/sys-boot/Manifest.gz Binary files differindex 691235e7cb68..8d2c49c09b86 100644 --- a/sys-boot/Manifest.gz +++ b/sys-boot/Manifest.gz diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest index 6346cc8bb3f5..e5bea1bf02c6 100644 --- a/sys-boot/grub/Manifest +++ b/sys-boot/grub/Manifest @@ -7,6 +7,6 @@ AUX grub.default-3 2528 BLAKE2B c32de43644eca5fae8d8d727ff443600917a93e015f8a83d DIST dejavu-sans-ttf-2.37.zip 417746 BLAKE2B c8904f3cd5a49370a7dc10e456684c88aeae998a99090bf4d0a5baa4f36cc8fb8f70586cf6d610a5ffeee97261d28c80f55bbe9dcfc3ed796d5c2d60e79adb58 SHA512 ede5899daa1984c5aa8cacb1c850eb53f189dddef3d9bb78bf9774d8976b7c0d6eb0bcf86237cd7d11f5b36cf5b5058d42cd94d3bd76f2bd0931c7ceb1271fae DIST grub-2.06.tar.xz 6581924 BLAKE2B 2a40b9b03d7bb3b9e7b1309ab274d686f01b3c42e7035ebc6e5a0e59a59c3b7362ba518341664b314cb0dbc8222bb10ea05ce09f08ce9d58a293207cb909e417 SHA512 4f11c648f3078567e53fc0c74d5026fdc6da4be27d188975e79d9a4df817ade0fe5ad2ddd694238a07edc45adfa02943d83c57767dd51548102b375e529e8efe DIST unifont-12.1.02.pcf.gz 1335424 BLAKE2B 97080312468e3f3c8aa6f49cef08f5622641e8c9c035f3ede1e09d8d98de4e78d3b23c8aba2e8070eb46cbebd2d55e8568e467d7f15f35aa8fc8db792b7e5f14 SHA512 b280b2db7cf5f480b0668c331130dede2c0cc87d5e02e44566b77787113d0f6604d0105522858288f2ac6b8e77df7a2d9878725013a6c778dc5bfb183156e2f0 -EBUILD grub-2.06-r1.ebuild 7979 BLAKE2B 738e6a2e6e4cabdf4a80c621c149da151069162ba7b4ea3d81579665af930fa73749f2da16483e335de73f00444da03588ae58b0c874fc20cbdbea54cfcd4849 SHA512 1ea86d04405c6fbf8278da66831d80fc3e54e845b103e67e25886da4c5d78175e735e19ec0411f5dc9fe44ad1b90b252e7adac6c1e4c6732f7df796606b9472c -EBUILD grub-9999.ebuild 7888 BLAKE2B 5e54984e4ba904de21a31b0c7fdda9a293346bd2bf526bedaa9410d73c85b006d45b6b0568839ca0f7bfbd18acb18d935ac7e9f195e7100e8b9f89fd2e2243b1 SHA512 ee8f50ab17440288afe89b627a498b467be8d45302f6a98f5f7301bd8a00d51fd2063f9c7616e6792ec9eff7ad31929a99783b73d8b8520fe726255f904e8105 +EBUILD grub-2.06-r1.ebuild 8031 BLAKE2B fee252fdcc9872dcfe778878401c669ec80fdcaf122467f87c85259348f9d39d4dc9c5c43b95e245103d3cf8d0980e77aebee4eb6777517c170a27aa934d4258 SHA512 31bd5503f44f763b081b516a68328c8860290609f6450b92cf2820b61f117743d3f8830d25f60973c3aaa53fe4df64c7f6421cef18879fc7ba9b428aee6bfc76 +EBUILD grub-9999.ebuild 7940 BLAKE2B 36335440d2ad58d5bcf686919b6d8edc5d3604df49d8933026e0c9e570a2865ef28b306f2f55dd231c0257936146f9c6cc4146f52455e448663985e6c94ea5e8 SHA512 90f576358ff79f4c3b5917fcd5fd2463ddaed993b5a4c4b3cdcac3afcda41f3805ca75cecf2fcb63c7943cc463b69dd833c632f9dfd1454132922931f215394d MISC metadata.xml 986 BLAKE2B 7c03fac1bf235c1d82e435926c5a9079a21eb16e9937c0ac4e6297bc2f129bc9022efa11c099df07fd9e3b6c47a13246e25ae1c4cc390878ead82394c9b9ed11 SHA512 eb62f4b746c87bf2756669d57e76e60f24cea493948b19429a45e52d02fc1a501b4465ba52940757409258f7ad0ceef0e0f473aeb80cbd9b693b866ae015f13c diff --git a/sys-boot/grub/grub-2.06-r1.ebuild b/sys-boot/grub/grub-2.06-r1.ebuild index 4224c4f643f1..7e5bd76ac9d0 100644 --- a/sys-boot/grub/grub-2.06-r1.ebuild +++ b/sys-boot/grub/grub-2.06-r1.ebuild @@ -242,6 +242,9 @@ src_configure() { # Bug 508758. replace-flags -O3 -O2 + # Workaround for bug 829165. + filter-ldflags -pie + # We don't want to leak flags onto boot code. export HOST_CCASFLAGS=${CCASFLAGS} export HOST_CFLAGS=${CFLAGS} diff --git a/sys-boot/grub/grub-9999.ebuild b/sys-boot/grub/grub-9999.ebuild index 7ba93a504196..8f568dfed408 100644 --- a/sys-boot/grub/grub-9999.ebuild +++ b/sys-boot/grub/grub-9999.ebuild @@ -240,6 +240,9 @@ src_configure() { # Bug 508758. replace-flags -O3 -O2 + # Workaround for bug 829165. + filter-ldflags -pie + # We don't want to leak flags onto boot code. export HOST_CCASFLAGS=${CCASFLAGS} export HOST_CFLAGS=${CFLAGS} diff --git a/sys-boot/os-prober/Manifest b/sys-boot/os-prober/Manifest index ce14b440e277..31062b3603b6 100644 --- a/sys-boot/os-prober/Manifest +++ b/sys-boot/os-prober/Manifest @@ -1,15 +1,17 @@ AUX os-prober-1.76-exherbo.patch 905 BLAKE2B e8d78b730d33b5760128eaf910f20ac01dc7db3e2b3a271279859869e3c8451e7c8dd72ed5b2784a0dfbf3f31747a81509445d3793a8ed8070a1a721b1b84186 SHA512 0c3c2e4cde868e186131b08268e6344841f0830be5bf4131e5a7ded93a222097599b0a011168e4b7bd0bc97b69ece194df1d46d98eac2c921f16b3e76d004cc8 AUX os-prober-1.78-btrfsfix.patch 14379 BLAKE2B 5aff7aad1957966355748eafb7b1b426e81428c1de9d1053e708cccb271efe97c8728887a7dbc969a78e4ff3d92cbb0b1badf7551532030b585c5211a7308323 SHA512 deefcd22ac50b9a5cdc4609eda6cc5c58f40989c17e56a8f098f529bacfef7bb65fca9775e7ea85540b850eecfd1380d9474388644f13c47459c14bc6cbe681f -AUX os-prober-1.79-btrfs-subvolume-detection.patch 14719 BLAKE2B 94d2c67eac4d17fee345f046a147c8f9d2f12446e07b651a0ddd8245fc6791589bf38603c02dfbbeba05f7ab63a1bd996692ca6b066bc568d33b63c396571d5d SHA512 588f68ab64547d3f854879ec65c74067fe0a3068a0e2f5e2c8bb461e08e4fe3a2be7dcfb10a5d7b44033ad46419e9ef6e8af28c59085fea06f77d6885a11bb35 +AUX os-prober-1.79-btrfs-subvolume-detection.patch 15634 BLAKE2B 3df775b2f28004a86e31d79aaead1482dff2a738acb2d2b905b1ce15d22c2d6dd5f3e37208b571d9687eb2a494f450833673e23ba58c02a2e3b402150d4805df SHA512 05888bedca4a9e972b40060122776349010943c6de7239ad17ddeecafa7fdf4136c4acf84e2b7e2e16f4bd0a205638dde7bb0203b08064e9901671faec48222c +AUX os-prober-1.79-detect-void.patch 693 BLAKE2B 2e9539551d8840a082b3a9d94400629bb71dac67661de785d7c0aea5a518ce47d2c3b914c54ac37dc1413b4ff62ee2b67ff77f892bc0aa8f65879125f11171c7 SHA512 fbcb3d1b9018504e27db64aa85df4f7304970c09d06cbe0b25927e17dd0cc26c2d4132af4792b0d67a4ec1c1c984b1b97b4df7166ef9fb9df0a2da97a1433354 AUX os-prober-1.79-efi-chroot-blkid-fallback.patch 1025 BLAKE2B 86a4b2fee4ac16f0e454cd244f7c27ea40b5115c0a4945b2b0f69be683854853e5f9ae9ed9844821c22e0dd0604f2fb6947a97d2640fc6b1f5e7c723f3b424b7 SHA512 36bc04c07182a83dac3c0e0328a046a665cb535c8719a934756a0f0575122897c3f5542aef0052709aace3a1d4331d7486b5bd993e8d412da5f4b7afe2d48d1b AUX os-prober-1.79-fix-busy-umount-message.patch 435 BLAKE2B 547286075651f19518a4a8815a920604e8c31190fdcea9ef8a0ec2a607d126f2181e51fb77ef1585dac5551e990e6a07aca81004b0fa4fc8ed39559866a0d005 SHA512 b68352f1a7f3607ca853de42bd589600cf310abe34dd7ab99fdb12eebbe1a50b7b5a6b208a8902f2cdb61ce7acff12f6d616311d704ba4ee5347120d44adc37a -AUX os-prober-1.79-handle-multiple-initrd-paths.patch 1008 BLAKE2B b66a9e9e2f2ab3a2e1a092efa5eba519c71d2b48ffde010d260a704a225da39e72a09bc1ed609ad0ccdf738b54f3b25536fa340a973d553d82d6625944a81231 SHA512 266c896c80e36a779502f4f7a10c64d9778bff5d914df1f191f55dd39c2f2d4f4cdcd957ce396d21b486d5d8d48bb353704379ee0eda43ff3c8e0791a5a2f6f6 +AUX os-prober-1.79-handle-multiple-initrd-paths.patch 1133 BLAKE2B f82902b7641288bb0226e0ac46eb375f2e813cc8fcf01691ae64c82a9f06a9ad8b597bb553ed36c7a3cce95529d3a94e300c1820774a5f8322ff25dab93a2cc6 SHA512 87c1cda3d6b05df53a0e0cb06ef8c53490d9b93eb8cdbade625f31a1353caa9bdc5d068683a4e1f5d259adbbcbc9a2d18c5a9ccedb56d4140ea0dbfc8836ccda AUX os-prober-1.79-mdraid-detection.patch 848 BLAKE2B 11ec43662f174d7f12f09b9b46f57ea7519d45aa1560ef31fc9c75b2684d1f549b3a679aa3f6dff855fc79c72757f0814ea147e75536f6503fc76f3426f8c648 SHA512 a4d68ea8cb6dcc2fc452a15ed983cb911e6a6097ec48515511b94c7f0096c6f611ffb4bf8af3c373cc5774f94e398ef74e1e2a8fe68669ace31bed134e839697 AUX os-prober-1.79-mounted-boot-partition-fix.patch 555 BLAKE2B 9b98506f986ceb509271a8a1ce0cc357fb25402ec1059d16411c79e96c727ef40182b5d9f362f16ae4ddab95a45155380cc5742ad1f15ac2cd39fdf273fc9a90 SHA512 fa66356859001d15823c3dbe8143e905e25ee937c236c787965b2a9a50493b55006e0fc9190b076fe106f942ea6074ef7556a443a237d0108b6b936106186061 AUX os-prober-1.79-use-fstab-name.patch 1101 BLAKE2B 37353efa899fd72e68d297325218be5a81abc2eee50bda5607e87c0eb799924fff0f510b4f13c681213e5e4be864a62fec9d5c98e539a61e9cd4036315eeabc5 SHA512 25236c935559398a4c37cdec04c358787f6178a016a6d0d4780c7dcd9eb7e18f308f4a89a1ddbb37d6c7dd17d334d879961029afb4463cef5e9029eab58fdc5c DIST os-prober_1.78.tar.xz 26848 BLAKE2B eee68ab9be36807d86e8bda831cfd490a01d20d9cc3f84ca50d5e1143e5a2dd66e47d3bdf2b4780cf73cc692f0ffc9497c6cbf13ce7aa0057e996b13d706c8f7 SHA512 7a0425130d17ce8554e7d0797b53e3a984f63a2fdcf8e668c83d357418d8c68259ada25bc350b199adece2e683d9014f234e3a83ce5ab7485be2e69c45874640 DIST os-prober_1.79.tar.xz 27028 BLAKE2B b3efacce9d7fce3708f5ec727a219e872e8d1de6dea15540cfbc0a0e8372c1033098230d3ddb9066fb5474d44e5584ee28631e0e5ab981e8fb1dc29ee3cbd89d SHA512 89b827b9b90a1d3bc11e0090ec04d808502cc1883ab10997b6d9edbe6005dcf8a0acdd7d200102c9dccde56297bda6087d68fb6dec419f0920090c2655c9c7d8 EBUILD os-prober-1.78-r1.ebuild 2233 BLAKE2B 7fa1535d0b90ec18c1ec2a49759915a786f35657a1bbed560239fed784e87d8517b2754c315017013f72398d6159faff5178f9976963443fd42ac52c6210f4db SHA512 54cb1e72251533af64b65675b1fb5833c699f9f91c6d20586268e5300a7977e2d95dcd3e8d32629ac6aaf45a9fecc434151aff4d7e656f577ae42f17c15b2f14 +EBUILD os-prober-1.79-r1.ebuild 2587 BLAKE2B fddd96476140557c8b703ed11d6a73c609d9c233f54eb8258356aed4a80f0724b8cebd8ff3b0ffab3d28608467a1ab013d268bae195a0f9834ef6802a474d8e1 SHA512 8b1715a9e321b84cce144715efb0856c174eb0e0a95b365cdadad0c16364fefe13571a2795e9f75d785acde07f695eaa7f3b5f5aba7244ff4200ec7276984535 EBUILD os-prober-1.79.ebuild 2543 BLAKE2B 350e41f8141b46037344bee7f16ef0fb63c40e4d50a70f026d0a39abf24b1d6908620abd8db184261f4e03223738138438b591bdf94a870c5e4f1485d05c20db SHA512 b6e8b8380b1c2a430a4cade4d9489eebca7f3e469467f417717b2fd9dc052de364dc1f6b8bebc9cefeeb312076f365b7719828923a39b1602c423037c227a6d8 EBUILD os-prober-9999.ebuild 2482 BLAKE2B c59a755ba75807f6bdc3f9437ea319ee55600658997a23168f586eb19c4ea1012a9dfc0d637ae18bce2d972f8533e81360249c1af4157e67dad4de242c8dbe1b SHA512 62c4eb2541c01148e715eebf2b65d4ebaa0435a431839360e06509935706cfee3c1c5afc444333e94921f43d767d0964cedc118f9981bf4cb8cc01fcd7ed492c MISC metadata.xml 384 BLAKE2B 98bf64680e61d1c0f0c9cbd73ce11be5a98fc7014517d263be8808064b1ab5b7ef200c243c472c3dedfad24176851007d9f4b03399e0970fd351f086b13d355c SHA512 dd391671666f17ce8e45093ff42c898c4bb0c685df9bb631c56089379d0825a15364656dedf4eec13c7652cfdbeb9c4f40f7bae0a8360cadd9b2cff136189bc3 diff --git a/sys-boot/os-prober/files/os-prober-1.79-btrfs-subvolume-detection.patch b/sys-boot/os-prober/files/os-prober-1.79-btrfs-subvolume-detection.patch index 14cd794530ee..61337661401f 100644 --- a/sys-boot/os-prober/files/os-prober-1.79-btrfs-subvolume-detection.patch +++ b/sys-boot/os-prober/files/os-prober-1.79-btrfs-subvolume-detection.patch @@ -1,23 +1,22 @@ Fixes detection of multiple linux installations on different subvolumes of the -same partition. Also contains changes from -https://build.opensuse.org/package/view_file/openSUSE:Factory/os-prober/os-prober-btrfs-always-detect-default.patch -to fix https://bugs.gentoo.org/790434. +same partition. This patch is a combination of https://src.fedoraproject.org/rpms/os-prober/blob/a27e5121193e2222ada672db3521a7d9de70991b/f/os-prober-btrfsfix.patch and https://build.opensuse.org/package/view_file/openSUSE:Factory/os-prober/Improve-btrfs-handling-on-os-probing-for-grub2.patch?rev=56 . Bug: https://bugs.gentoo.org/790434 + https://bugs.gentoo.org/817905 https://bugs.debian.org/688336 https://bugzilla.redhat.com/888341 --- a/common.sh +++ b/common.sh -@@ -155,6 +155,7 @@ +@@ -155,6 +155,7 @@ parse_proc_mounts () { done } - + +# add forth parameter to pickup btrfs subvol info parsefstab () { while read -r line; do case "$line" in -@@ -165,12 +166,22 @@ +@@ -165,12 +166,22 @@ parsefstab () { set -f set -- $line set +f @@ -27,7 +26,7 @@ Bug: https://bugs.gentoo.org/790434 esac done } - + +#check_btrfs_mounted $bootsv $bootuuid) +check_btrfs_mounted () { + bootsv="$1" @@ -43,8 +42,8 @@ Bug: https://bugs.gentoo.org/790434 sed 's/\\011/ /g; s/\\012/\n/g; s/\\040/ /g; s/\\134/\\/g' --- a/linux-boot-prober +++ b/linux-boot-prober -@@ -5,16 +5,148 @@ - +@@ -5,16 +5,143 @@ set -e + newns "$@" require_tmpdir +ERR="n" @@ -58,9 +57,9 @@ Bug: https://bugs.gentoo.org/790434 +bootmnt= +bootsv= +bootuuid= - + grep "^/dev/" /proc/mounts | parse_proc_mounts >"$OS_PROBER_TMP/mounted-map" || true - + -partition="$1" +if [ -z "$1" ]; then + ERR=y @@ -80,14 +79,14 @@ Bug: https://bugs.gentoo.org/790434 + partition="$1" + type=other +fi - + -if [ -z "$partition" ]; then +if [ "x$ERR" != xn ]; then echo "usage: linux-boot-prober partition" >&2 + echo " linux-boot-prober btrfs UUID=<> subvol=<>" >&2 exit 1 fi - + +if [ "$type" = btrfs ]; then + # handle all of the btrfs stuff here + if [ ! -e "/proc/self/mountinfo" ]; then @@ -111,12 +110,7 @@ Bug: https://bugs.gentoo.org/790434 + fi + if [ -z "$mpoint" ]; then + # mount the btrfs root -+ -+ if [ -n "$subvol" ]; then -+ opts="-o subvol=$subvol" -+ fi -+ -+ if ! mount $opts -t btrfs -U $UUID "$tmpmnt" 2>/dev/null; then ++ if ! mount -o subvol=$subvol -t btrfs -U $UUID "$tmpmnt" 2>/dev/null; then + warn "error mounting btrfs subvol=$subvol UUID=$UUID" + umount "$tmpmnt/boot" 2>/dev/null + umount "$tmpmnt" 2>/dev/null @@ -194,8 +188,8 @@ Bug: https://bugs.gentoo.org/790434 if ! mapped="$(mapdevfs "$partition")"; then log "Device '$partition' does not exist; skipping" continue -@@ -22,8 +154,8 @@ - +@@ -22,8 +149,8 @@ fi + if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map"; then for test in /usr/lib/linux-boot-probes/*; do - debug "running $test" @@ -206,10 +200,10 @@ Bug: https://bugs.gentoo.org/790434 break --- a/linux-boot-probes/mounted/common/40grub2 +++ b/linux-boot-probes/mounted/common/40grub2 -@@ -2,17 +2,30 @@ +@@ -2,17 +2,42 @@ . /usr/share/os-prober/common.sh set -e - + +# add support for btrfs with no separate /boot +# that is, rootsv = bootsv partition="$1" @@ -218,16 +212,28 @@ Bug: https://bugs.gentoo.org/790434 type="$4" +rootsv="$5" +bootsv="$6" - + found_item=0 - + entry_result () { -+ if [ "x$type" = "xbtrfs" -a "$partition" = "$bootpart" ]; then -+ # trim off the leading subvol -+ kernelfile=$(echo "$kernel" | cut -d '/' -f 2- | cut -d '/' -f 2-) -+ if [ "x$rootsv" != "x$bootsv" ]; then -+ kernelfile="/boot/$kernelfile" ++ if [ "x$type" = "xbtrfs" ]; then ++ bsv=${bootsv:+/}${bootsv} ++ # if path is not relative to subvolume make it relative ++ kernel=${kernel#${bsv}} ++ kernelfile=$kernel ++ initrd=${initrd#${bsv}} ++ if [ "x$GRUB_FS" != "xbtrfs" ]; then ++ # absolute path needed: prepend subvolume if $kernel isn't empty ++ kernel=${kernel:+${bsv}}${kernel} ++ # handle multiple initrd paths ++ local initrd_path= ++ for path in ${initrd}; do ++ initrd_path+="${bsv}${path} " ++ done ++ initrd="${initrd_path% }" + fi ++ # assumed: rootsv != bootsv if rootsv isn't ancestor of bootsv ++ [ "$partition" != "$bootpart" -o "$rootsv" != "$bootsv" ] && kernelfile="/boot${kernelfile}" + else + kernelfile=$kernel + fi @@ -238,22 +244,41 @@ Bug: https://bugs.gentoo.org/790434 result "$rootpart:$bootpart:$title:$kernel:$initrd:$parameters" found_item=1 fi -@@ -108,9 +121,9 @@ - [ "$mpoint/boot/grub/grub.cfg" -nt "$mpoint/boot/grub/menu.lst" ]); then - debug "parsing grub.cfg" - parse_grub_menu "$mpoint" "$partition" "$bootpart" < "$mpoint/boot/grub/grub.cfg" --elif [ -e "$mpoint/boot/grub2/grub.cfg" ]; then -+elif [ -e "$mpoint/boot/grub/grub.cfg" ]; then - debug "parsing grub.cfg" -- parse_grub_menu "$mpoint" "$partition" "$bootpart" < "$mpoint/boot/grub2/grub.cfg" -+ parse_grub_menu "$mpoint" "$partition" "$bootpart" < "$mpoint/boot/grub/grub.cfg" - fi - - if [ "$found_item" = 0 ]; then +@@ -64,7 +88,7 @@ parse_grub_menu () { + ignore_item=1 + fi + ;; +- linux) ++ linux|linuxefi|linux16) + # Hack alert: sed off any (hdn,n) but + # assume the kernel is on the same + # partition. +@@ -73,18 +98,18 @@ parse_grub_menu () { + parameters="$@" + # Systems with a separate /boot will not have + # the path to the kernel in grub.cfg. +- if [ "$partition" != "$bootpart" ]; then ++ if [ "$partition" != "$bootpart" -a "$type" != "btrfs" ]; then + kernel="/boot$kernel" + fi + ;; +- initrd) ++ initrd|initrdefi|initrd16) + shift + initrd="" + for initrd_path in "$@"; do + # sed hack, as above + initrd_path="$(echo "$initrd_path" | sed 's/(.*)//')" + # Initrd same. +- if [ "$partition" != "$bootpart" ]; then ++ if [ "$partition" != "$bootpart" -a "$type" != "btrfs" ]; then + initrd_path="/boot$initrd_path" + fi + if [ -z "$initrd" ]; then --- a/os-prober +++ b/os-prober -@@ -76,9 +76,12 @@ - +@@ -76,9 +76,12 @@ partitions () { + # Also detect OSes on LVM volumes (assumes LVM is active) if type lvs >/dev/null 2>&1; then - echo "$(LVM_SUPPRESS_FD_WARNINGS=1 log_output lvs --noheadings --separator : -o vg_name,lv_name | @@ -264,21 +289,21 @@ Bug: https://bugs.gentoo.org/790434 + # now lets make sure we got all of the btrfs partitions and disks + blkid | grep 'TYPE="btrfs"' | cut -d ':' -f 1 } - + parse_proc_swaps () { -@@ -136,6 +139,8 @@ +@@ -136,6 +139,8 @@ if [ -f /proc/mdstat ] ; then grep "^md" /proc/mdstat | cut -d: -f2- | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true fi - + +: >"$OS_PROBER_TMP/btrfs-vols" + for partition in $(partitions); do if ! mapped="$(mapdevfs "$partition")"; then log "Device '$partition' does not exist; skipping" -@@ -154,7 +159,26 @@ +@@ -154,7 +159,26 @@ for partition in $(partitions); do continue fi - + - if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map" ; then + # do btrfs processing here; both mounted and unmounted will + # be handled by 50mounted-tests so we can do a subvol only once. @@ -305,10 +330,10 @@ Bug: https://bugs.gentoo.org/790434 debug "running $test on $partition" --- a/os-probes/common/50mounted-tests +++ b/os-probes/common/50mounted-tests -@@ -14,19 +14,31 @@ +@@ -14,19 +14,31 @@ do_unmount() { rmdir "$tmpmnt" || true } - + -types="$(fs_type "$partition")" +if [ "x$1" = xbtrfs ]; then + types=btrfs @@ -342,7 +367,7 @@ Bug: https://bugs.gentoo.org/790434 elif [ "$types" = ntfs ]; then if type ntfs-3g >/dev/null 2>&1; then types='ntfs-3g ntfs' -@@ -35,7 +47,7 @@ +@@ -35,7 +47,7 @@ elif [ -z "$types" ]; then if type cryptsetup >/dev/null 2>&1 && \ cryptsetup luksDump "$partition" >/dev/null 2>&1; then debug "$1 is a LUKS partition; skipping" @@ -351,52 +376,11 @@ Bug: https://bugs.gentoo.org/790434 fi for type in $(grep -v nodev /proc/filesystems); do # hfsplus filesystems are mountable as hfs. Try hfs last so -@@ -58,6 +70,127 @@ +@@ -58,6 +70,108 @@ if [ ! -d "$tmpmnt" ]; then fi - + mounted= + -+probe_subvol () -+{ -+ local subvol=$1 -+ local partition=$2 -+ local UUID=$3 -+ local tmpmnt=$4 -+ -+ mounted= -+ mpoint="$(grep btrfs /proc/self/mountinfo | grep "$partition " | grep "/$subvol " | cut -d ' ' -f 5)" -+ ret=1 -+ -+ if [ -n "$subvol" ]; then -+ opts="-o subvol=$subvol" -+ fi -+ -+ if [ -n "$mpoint" ]; then -+ if [ "x$mpoint" = "x/" ]; then -+ continue # this is the root for the running system -+ fi -+ mounted=1 -+ else -+ # again, do not mount btrfs ro -+ mount -t btrfs $opts -U "$UUID" "$tmpmnt" -+ mpoint="$tmpmnt" -+ fi -+ test="/usr/lib/os-probes/mounted/90linux-distro" -+ if [ -f "$test" ] && [ -x "$test" ]; then -+ debug "running subtest $test" -+ if "$test" "$partition" "$mpoint" btrfs "UUID=$UUID" "subvol=$subvol"; then -+ debug "os found by subtest $test on subvol $subvol" -+ ret=0 -+ fi -+ fi -+ if [ -z "$mounted" ]; then -+ if ! umount "$tmpmnt"; then -+ warn "failed to umount $tmpmnt" -+ fi -+ fi -+ return $ret -+} -+ +# all btrfs processing here. Handle both unmounted and +# mounted subvolumes. +if [ "$types" = btrfs ]; then @@ -436,7 +420,7 @@ Bug: https://bugs.gentoo.org/790434 + mpoint="$tmpmnt" + fi + -+ test="/usr/libexec/os-probes/mounted/90linux-distro" ++ test="/usr/lib/os-probes/mounted/90linux-distro" + if [ -f "$test" ] && [ -x "$test" ]; then + debug "running subtest $test" + if "$test" "$partition" "$mpoint" btrfs "UUID=$UUID"; then @@ -450,24 +434,46 @@ Bug: https://bugs.gentoo.org/790434 + fi + fi + fi -+ found= -+ # Always probe subvol or root set as default -+ if probe_subvol "$defaultvol" "$partition" "$UUID" "$tmpmnt"; then -+ found=1 -+ fi + -+ # Probe any other OS on subvol -+ for subvol in $subvols; do -+ if echo "$rosubvols" | grep -q -x "$subvol" || -+ echo "$sssubvols" | grep -q -x "$subvol" || -+ echo "$defaultvol" | grep -q -x "$subvol"; then -+ continue -+ fi -+ debug "begin btrfs processing for $UUID subvol=$subvol" -+ if probe_subvol "$subvol" "$partition" "$UUID" "$tmpmnt"; then -+ found=1 -+ fi -+ done ++ if [ -z "$subvols" ]; then ++ debug "no subvols found on btrfs volume $UUID" ++ else ++ found= ++ for subvol in $subvols; do ++ debug "begin btrfs processing for $UUID subvol=$subvol" ++ if echo "$rosubvols" | grep -q -x "$subvol"; then ++ continue ++ fi ++ if echo "$sssubvols" | grep -q -x "$subvol"; then ++ continue ++ fi ++ mounted= ++ mpoint="$(grep btrfs /proc/self/mountinfo | grep "$partition " | grep "/$subvol " | cut -d ' ' -f 5)" ++ if [ -n "$mpoint" ]; then ++ if [ "x$mpoint" = "x/" ]; then ++ continue # this is the root for the running system ++ fi ++ mounted=1 ++ else ++ # again, do not mount btrfs ro ++ mount -t btrfs -o subvol="$subvol" -U "$UUID" "$tmpmnt" ++ mpoint="$tmpmnt" ++ fi ++ test="/usr/lib/os-probes/mounted/90linux-distro" ++ if [ -f "$test" ] && [ -x "$test" ]; then ++ debug "running subtest $test" ++ if "$test" "$partition" "$mpoint" btrfs "UUID=$UUID" "subvol=$subvol"; then ++ debug "os found by subtest $test on subvol $subvol" ++ found=1 ++ fi ++ fi ++ if [ -z "$mounted" ]; then ++ if ! umount "$tmpmnt"; then ++ warn "failed to umount $tmpmnt" ++ fi ++ fi ++ done ++ fi + rmdir "$tmpmnt" || true + if [ "$found" ]; then + exit 0 @@ -481,16 +487,16 @@ Bug: https://bugs.gentoo.org/790434 grub-mount "$partition" "$tmpmnt" 2>/dev/null; then --- a/os-probes/mounted/common/90linux-distro +++ b/os-probes/mounted/common/90linux-distro -@@ -7,6 +7,8 @@ +@@ -7,6 +7,8 @@ set -e partition="$1" dir="$2" type="$3" +uuid="$4" +subvol="$5" - + # This test is inaccurate, but given separate / and /boot partitions and the # fact that only some architectures have ld-linux.so, I can't see anything -@@ -143,7 +145,11 @@ +@@ -143,7 +145,11 @@ if (ls "$dir"/lib*/ld*.so* && [ -d "$dir/boot" ] || ls "$dir"/usr/lib*/ld*.so*) fi label="$(count_next_label "$short")" diff --git a/sys-boot/os-prober/files/os-prober-1.79-detect-void.patch b/sys-boot/os-prober/files/os-prober-1.79-detect-void.patch new file mode 100644 index 000000000000..9d7855906b78 --- /dev/null +++ b/sys-boot/os-prober/files/os-prober-1.79-detect-void.patch @@ -0,0 +1,20 @@ +Handle Void Linux detection. From upstream https://github.com/void-linux/void-packages/blob/2fd8d4df94855a157a4de16c61d54153e16ef185/srcpkgs/os-prober/patches/detect-void.patch + +Bug: https://bugs.gentoo.org/817905 + +--- a/os-probes/mounted/common/90linux-distro ++++ b/os-probes/mounted/common/90linux-distro +@@ -116,6 +116,13 @@ + elif [ -e "$dir/sbin/pkgtool" ]; then + short="Slackware" + long="Slackware Linux" ++ elif [ -e "$dir/sbin/xbps-install" ]; then ++ short="Void" ++ if file "$dir/sbin/xbps-install"|grep -q 32-bit; then ++ long="Void Linux 32" ++ else ++ long="Void Linux 64" ++ fi + elif grep -qs OpenLinux "$dir/etc/issue"; then + short="Caldera" + long="Caldera OpenLinux" diff --git a/sys-boot/os-prober/files/os-prober-1.79-handle-multiple-initrd-paths.patch b/sys-boot/os-prober/files/os-prober-1.79-handle-multiple-initrd-paths.patch index 0b477c17c362..ceab85a92727 100644 --- a/sys-boot/os-prober/files/os-prober-1.79-handle-multiple-initrd-paths.patch +++ b/sys-boot/os-prober/files/os-prober-1.79-handle-multiple-initrd-paths.patch @@ -2,14 +2,15 @@ Backport handling of multiple initrd paths, like those needed by Manjaro installations. Note, it still requires resolution of https://savannah.gnu.org/bugs/index.php?47681 on grub's end. -Commit: https://salsa.debian.org/installer-team/os-prober/-/commit/53b920e106f13acf87ef8a275161e20f94feeb8a +Commits: https://salsa.debian.org/installer-team/os-prober/-/commit/7641c2da0c81f78c5f2ee2a66a1c21350cab03fc + https://salsa.debian.org/installer-team/os-prober/-/commit/53b920e106f13acf87ef8a275161e20f94feeb8a --- a/linux-boot-probes/mounted/common/40grub2 +++ b/linux-boot-probes/mounted/common/40grub2 -@@ -78,11 +78,21 @@ - fi - ;; - initrd) +@@ -78,11 +78,21 @@ parse_grub_menu () { + fi + ;; + initrd) - initrd="$(echo "$2" | sed 's/(.*)//')" - # Initrd same. - if [ "$partition" != "$bootpart" ]; then @@ -30,6 +31,6 @@ Commit: https://salsa.debian.org/installer-team/os-prober/-/commit/53b920e106f13 + initrd="$initrd $initrd_path" + fi + done - ;; - "}") - entry_result + ;; + "}") + entry_result diff --git a/sys-boot/os-prober/os-prober-1.79-r1.ebuild b/sys-boot/os-prober/os-prober-1.79-r1.ebuild new file mode 100644 index 000000000000..b310aa3de302 --- /dev/null +++ b/sys-boot/os-prober/os-prober-1.79-r1.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit readme.gentoo-r1 toolchain-funcs + +DESCRIPTION="Utility to detect other OSs on a set of drives" +HOMEPAGE="https://salsa.debian.org/installer-team/os-prober" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://salsa.debian.org/installer-team/${PN}.git" +else + SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${PN}_${PV}.tar.xz" + KEYWORDS="~amd64 ~x86" + S="${WORKDIR}"/${PN} +fi + +LICENSE="GPL-3" +SLOT="0" + +# grub-mount needed per bug #607518 +RDEPEND="sys-boot/grub:2[mount]" + +# bug 594250 +QA_MULTILIB_PATHS="usr/lib/os-prober/.*" + +PATCHES=( + "${FILESDIR}"/${PN}-1.79-handle-multiple-initrd-paths.patch + "${FILESDIR}"/${PN}-1.79-mdraid-detection.patch + "${FILESDIR}"/${PN}-1.79-btrfs-subvolume-detection.patch + "${FILESDIR}"/${PN}-1.79-use-fstab-name.patch + "${FILESDIR}"/${PN}-1.79-mounted-boot-partition-fix.patch + "${FILESDIR}"/${PN}-1.79-fix-busy-umount-message.patch + "${FILESDIR}"/${PN}-1.79-efi-chroot-blkid-fallback.patch + "${FILESDIR}"/${PN}-1.79-detect-void.patch +) + +DOC_CONTENTS=" + If you intend for os-prober to detect versions of Windows installed on + NTFS-formatted partitions, your system must be capable of reading the + NTFS filesystem. One way to do this is by installing sys-fs/ntfs3g. + + NOTE: Since sys-boot/grub-2.06-rc1, grub-mkconfig disables os-prober by default. + To enable it, add GRUB_DISABLE_OS_PROBER=false to /etc/default/grub. +" + +src_prepare() { + default + # use default GNU rules + rm Makefile || die 'rm Makefile failed' +} + +src_compile() { + tc-export CC + emake newns +} + +src_install() { + dobin os-prober linux-boot-prober + + # Note: as no shared libraries are installed, /usr/lib is correct + exeinto /usr/lib/os-prober + doexe newns + + insinto /usr/share/os-prober + doins common.sh + + 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/lib/${dir} + doexe ${dir}/common/* + if [[ -d ${dir}/${debarch} ]]; then + for exe in ${dir}/${debarch}/*; do + [[ ! -d "${exe}" ]] && doexe "${exe}" + done + fi + if [[ -d ${dir}/${debarch}/efi ]]; then + exeinto /usr/lib/${dir}/efi + doexe ${dir}/${debarch}/efi/* + fi + done + + if use amd64 || use x86; then + exeinto /usr/lib/os-probes/mounted + doexe os-probes/mounted/powerpc/20macosx + fi + + einstalldocs + dodoc debian/changelog + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/sys-boot/raspberrypi-firmware/Manifest b/sys-boot/raspberrypi-firmware/Manifest index 10f149a66ee6..91b8fdd7e87e 100644 --- a/sys-boot/raspberrypi-firmware/Manifest +++ b/sys-boot/raspberrypi-firmware/Manifest @@ -10,7 +10,7 @@ DIST raspberrypi-firmware-1.20211118.tar.gz 193544570 BLAKE2B db6c7c2e247f668b02 EBUILD raspberrypi-firmware-1.20201022.ebuild 1890 BLAKE2B 9753b9646bbc6fde102e179c085a640d655a9c1032fb92a5637fe54327e89d8f898071038c99cf7f013926f06f73795b2b5cab652838665b4a1c368459121cb3 SHA512 2bb448d45c08f68d284eb54ad2bf15e6f5b77dda2b75dbe45ae1a75476177f723336774fbe6e0956419b2822661a33db80692dcd8656b2efbb3c64e535065043 EBUILD raspberrypi-firmware-1.20201201.ebuild 1889 BLAKE2B 9c3cc2d75c0f119a18ac174ed0bf5ca0228917e66a61bbd4a03a340693f31965c513b4de54b6d2dfba12372b387de79034943b96037dc2ecbe987f0f59fc48ae SHA512 cb9b623cece6312cfe8a22af7398ac7f1e5ce187581f7dbb4b7a878c1b9234194d7129faeb59bf34e3456b7a6e6e949bac3dcdf8d22560d262765f46b3a9a39f EBUILD raspberrypi-firmware-1.20210108.ebuild 1889 BLAKE2B 9c3cc2d75c0f119a18ac174ed0bf5ca0228917e66a61bbd4a03a340693f31965c513b4de54b6d2dfba12372b387de79034943b96037dc2ecbe987f0f59fc48ae SHA512 cb9b623cece6312cfe8a22af7398ac7f1e5ce187581f7dbb4b7a878c1b9234194d7129faeb59bf34e3456b7a6e6e949bac3dcdf8d22560d262765f46b3a9a39f -EBUILD raspberrypi-firmware-1.20210527.ebuild 1891 BLAKE2B 7051be955ead1ba29ec0c2de098c25f32468f42abad95eb376d0f6dff75e08fa788f474d202ccbbfa92a515b6048b88ab3ff031dcb205202b0a34490d4ec06a8 SHA512 1a5dd283c6bb7cda32b1c1e60b752de399ba34e202c0916fd8f310a4087d87b707e4c7422e3600f34908f7dbd480afa6fec1b94c648d2932576be6d2e1550e73 +EBUILD raspberrypi-firmware-1.20210527.ebuild 1889 BLAKE2B 9c3cc2d75c0f119a18ac174ed0bf5ca0228917e66a61bbd4a03a340693f31965c513b4de54b6d2dfba12372b387de79034943b96037dc2ecbe987f0f59fc48ae SHA512 cb9b623cece6312cfe8a22af7398ac7f1e5ce187581f7dbb4b7a878c1b9234194d7129faeb59bf34e3456b7a6e6e949bac3dcdf8d22560d262765f46b3a9a39f EBUILD raspberrypi-firmware-1.20211029.ebuild 1891 BLAKE2B 7051be955ead1ba29ec0c2de098c25f32468f42abad95eb376d0f6dff75e08fa788f474d202ccbbfa92a515b6048b88ab3ff031dcb205202b0a34490d4ec06a8 SHA512 1a5dd283c6bb7cda32b1c1e60b752de399ba34e202c0916fd8f310a4087d87b707e4c7422e3600f34908f7dbd480afa6fec1b94c648d2932576be6d2e1550e73 EBUILD raspberrypi-firmware-1.20211118.ebuild 1891 BLAKE2B 7051be955ead1ba29ec0c2de098c25f32468f42abad95eb376d0f6dff75e08fa788f474d202ccbbfa92a515b6048b88ab3ff031dcb205202b0a34490d4ec06a8 SHA512 1a5dd283c6bb7cda32b1c1e60b752de399ba34e202c0916fd8f310a4087d87b707e4c7422e3600f34908f7dbd480afa6fec1b94c648d2932576be6d2e1550e73 EBUILD raspberrypi-firmware-9999.ebuild 1892 BLAKE2B 7d3b73f730a94a75f61652eb350c12c7d3cd328cd26b03bf3cf4300df1c4fe9bd7c7d8fed90523645d6d692665a0b35d4db9ea50fa423d50c38115ed76bb7401 SHA512 7f88844eba41233565f6ac795dd2f9f390c94b7e153bb2893e4bc24eaeb28c7984523b44212f1c349a93b21aa51c984b21f102425eb9fff757f11e5753ca950a diff --git a/sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20210527.ebuild b/sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20210527.ebuild index 263276be82c7..43c2288dc321 100644 --- a/sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20210527.ebuild +++ b/sys-boot/raspberrypi-firmware/raspberrypi-firmware-1.20210527.ebuild @@ -11,7 +11,7 @@ if [[ "${PV}" == 9999 ]]; then EGIT_CLONE_TYPE="shallow" else SRC_URI="https://github.com/raspberrypi/firmware/archive/${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="-* ~arm ~arm64" + KEYWORDS="-* arm arm64" S="${WORKDIR}/firmware-${PV}" fi diff --git a/sys-boot/refind/Manifest b/sys-boot/refind/Manifest index f1f9147a39bc..c3c2a077a0d1 100644 --- a/sys-boot/refind/Manifest +++ b/sys-boot/refind/Manifest @@ -6,5 +6,5 @@ DIST refind-src-0.12.0.tar.gz 3898337 BLAKE2B 1197049fb7d91db64135dafda7488bdb1d DIST refind-src-0.13.2.tar.gz 4554759 BLAKE2B 2c3b1daf5fa100dcd4e1c801aa625e269ae9c1a99b567a271d7cdd30f95fa1e041e22984623b9a0e61f8af45966919f4b9f3a5b6c2026271d1bc37c6925f1e70 SHA512 e671d44385297295c143824dd95593f2e7bc8e282745d127b041a645aa27003467a3a23f368fd30297f33faa06bd914540d7bdc3c71ec42f6b7a38d7ee8e0ddb EBUILD refind-0.11.4.ebuild 4746 BLAKE2B 52a388dc1e57232d120b745e3089bad0d12265dd7718589cc7af9a8a1defa105bb74d01f76510bcaafbcb64f435b3e4a555c64d2c4538ae3cd56027b769a36db SHA512 b17c07d927462adae1b9644bdfd53d3ab58e193f02e54b45c50cbc9f100adca01d97631aeb85c014069733e11645af47b275fa2cef65b73ebd9c39a1ab40f96c EBUILD refind-0.12.0-r1.ebuild 3719 BLAKE2B ca10b2ea88821c597c58b1a801d96e811088ce36b01128b6a4e1719c71b3cdb228580f0399a963a7db09fc02d4ea01d613ab51d60547388e531d101cbead8500 SHA512 9a3a367c466c82d5e92cb0a6ec52d19660db06e88a1bcf73bd12ef43dc4fd5fa4a6381f5c03e2d3a28f1c558789fc85de8b5a0d622d11079dcbc22b707370422 -EBUILD refind-0.13.2.ebuild 3734 BLAKE2B 6ad34a3f248908f7854b9eed3dea12c1c9e3b65f250c08577aacd14c4d61d7127bd166781b75c9fbbb1021703ab5c42f361b24fcb7c8299471a5be5e0ad5d1dc SHA512 d4fe0a9d74f199d7a371c2e9ad8f5650d7efbc497fb0f34a5d5924c8786924005408b61a246a8ab408c22e590e5b40d95ad455fee99303f13f9ed93a4f17feb8 +EBUILD refind-0.13.2.ebuild 3732 BLAKE2B d1b19ff08c3d8a414fd605daeaca564e92f0ba3efd9180dc7e960eecabcfaf4f0fb2144d6603be97e486601b1c330129e92523ce1a41b5ca183d19c505d82495 SHA512 281213176e580222e11e33559dfb5002d9ce2de45674cd193f489f3ecdc9632abb52a05e06c07b4a1a06c8d15ff720b08e1fa382f1a58305b773a655fa53ef84 MISC metadata.xml 3852 BLAKE2B 5c6a075b5130fe3f3991350f694d9bf0b72c0e5eaad0a52daa15a0cd463b9105df04a4f59f539303daabbc58fa48a3c1190974b3df5fc71b27e0c493f5374274 SHA512 ada8758c6ec63943c1fb6b42430a87e8f78811fbfc4f39e5d6d8db8e2e2559782531dd17eb57fef588bc530b41735d1d8b44b8ebf6d7c992661329fa4357d637 diff --git a/sys-boot/refind/refind-0.13.2.ebuild b/sys-boot/refind/refind-0.13.2.ebuild index ce3ba933229e..68c1950f9e8c 100644 --- a/sys-boot/refind/refind-0.13.2.ebuild +++ b/sys-boot/refind/refind-0.13.2.ebuild @@ -11,7 +11,7 @@ SRC_URI="mirror://sourceforge/project/${PN}/${PV}/${PN}-src-${PV}.tar.gz" LICENSE="BSD GPL-2 GPL-3 FDL-1.3" SLOT="0" -KEYWORDS="~amd64 ~x86" +KEYWORDS="amd64 x86" FS_USE="btrfs +ext2 +ext4 hfs +iso9660 ntfs reiserfs" IUSE="${FS_USE} custom-cflags doc" diff --git a/sys-boot/tboot/Manifest b/sys-boot/tboot/Manifest index 51157f0ed317..395e75ee11a9 100644 --- a/sys-boot/tboot/Manifest +++ b/sys-boot/tboot/Manifest @@ -1,4 +1,6 @@ -AUX tboot-1.9.11-genkernel-path.patch 2428 BLAKE2B cff351e880811d1bb48bd57d59a768ab96fa2da9a8ea3ba7ddf1845e6fc5ec80bce92dace05d39d0c92962ebbdb6a80e46d6cc39d8f0e1cdbf28e20c86e2d09d SHA512 dfe335ac25c9565a90cb8513128c4e4c6b994ce79cc665367f1c39a833d6586a80ab32be64fc02f44df80a6511910f1a31a8465deb5aa1fb872bfd872edb1f95 -DIST tboot-1.9.11.tar.gz 709092 BLAKE2B 97b6ea5a09e1adbf1fbdc36516e0e80d3acc67469f297603125542aed8235e6533afb96e6c38885b87e4584392da40d9f65d00eced2b8a87a2ecf61a17c3a985 SHA512 5c2466438ad3ab95ca66fe4d460f4e6b31ccd3c6ac79221b129883df4180fce4878dd07a5f180bb79fae13b59fa90c05aeda7339159d1d950011a59645024b8a -EBUILD tboot-1.9.11-r1.ebuild 1531 BLAKE2B 2e66eac6137dc5c77d1706317b4dcf2e4bee58491f4cc18c234bb98b2516bcacc7301bcb8516f90e56cd9f34d48a1890e8634e159c3a38b3fd24e4278d1f7552 SHA512 04aeb336f45e992e311b9c06171ce930a92908070f85ac8a4cd28596759b133b78438550e40f3c0397e0b112221f9cce3ec852d11b8c81a247881834c4d32261 +AUX tboot-1.10.3-disable-Werror.patch 522 BLAKE2B e25832b544ffc81d83d963061c35432f454590b02f3c9d10ceff60f977b9b022e39193a41ded7f96c71681f7219204809dd4156bcf7ad37ea8738155b6c0469e SHA512 a219e4f1dd637fb93cd05e827ab7d1a9bbcc99b87a3f6e9e8b902d0ab08f150ad87d8804f0d506c5ac721be4d1a85a14466e036c09643601a705be0fb07e4ed4 +AUX tboot-1.10.3-disable-strip.patch 343 BLAKE2B 65d5e7f4e97504ace2d42123701de8f6e27e3ffc196b69a0afc8057ed8fe75c8274c427d858cb316d5712505381a5a109ddc5301eedc0f93c34d3ed0551deaff SHA512 f86f595d8883d433327eb906ee5fbe0c277180c7a993ae47e26c23ea8b406e59cbad28509ca399286ba306949b0d5de5dc9420242706c7affcba12d86e3f183b +AUX tboot-1.10.3-dont-call-strip-directly.patch 328 BLAKE2B f1fe38f44a9d207034ec471b98fe81e92d9b9068e3a1ab05034aa21b83d87df6a6d0f53eee3436d440b8f8514d09bdde4155061b1979aaa304f9974d5eddba32 SHA512 cb2c1bc37368cad9448142393c84da5327d3b4a976ae73d0116b20d1eca7ca0dba399f3fb419e4fb02d41ede8aabb3f3b12af10bb734627975087c352ff4d29b +DIST tboot-1.10.3.tar.gz 906732 BLAKE2B 4015ba84fbc273d1f1ea3f302dd11e62d1866049a31674b8967a9c1be645f88f2fdbc8614e1f7d824010e8280484885392b34aedb2d9f32654a3065e75e0bd42 SHA512 998501cfb23511adf63c0e2a70f203b3a92328cba39948a6be2e0dc6600aaaf9fcc18dc1ffcdd00c43a5d2c688c34c912c7525fd54a5c673a764c34141be4b77 +EBUILD tboot-1.10.3.ebuild 1563 BLAKE2B 92fa20a13f07fc0ebc25348f7e9126973990b2cdffc57f0e50a4f82798409d46b12c66d06aff4078b09a1eb9650c8edf788f9e01b949b8f9700ce811b7bb6b4c SHA512 b81ab541974649a8df4d577062cf937b258b1f2ed21749827122d110a6622eca05c34e0f1dc80e5308d4a4ce49833cdbda47452461247f3611b8a7c98d6f86b5 MISC metadata.xml 508 BLAKE2B c28a3b0e46c57c91011bbee5ff6769ace24ab4e7b3355536b8e8c3bdb33b0be4ee1fedd60f00e2bfe8957570f763e8e85f3a1786f7a470bc5b4c855e57f7b8a2 SHA512 e45960df2560d82cb914db1f661d739b5d6747b7fb433152fef849d36d6bb4cc812def3cbafa4b362056c4d96e37980e65f8bc163b2021d5827ffd6ee9afca4d diff --git a/sys-boot/tboot/files/tboot-1.10.3-disable-Werror.patch b/sys-boot/tboot/files/tboot-1.10.3-disable-Werror.patch new file mode 100644 index 000000000000..5285227713ad --- /dev/null +++ b/sys-boot/tboot/files/tboot-1.10.3-disable-Werror.patch @@ -0,0 +1,12 @@ +diff -r 5a30b6b09e77 Config.mk +--- a/Config.mk Fri Dec 10 15:35:42 2021 +0100 ++++ b/Config.mk Sun Dec 12 14:53:57 2021 -0600 +@@ -39,7 +39,7 @@ + /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;) + + +-CFLAGS_WARN = -Wall -Wformat-security -Werror -Wstrict-prototypes \ ++CFLAGS_WARN = -Wall -Wformat-security -Wstrict-prototypes \ + -Wextra -Winit-self -Wswitch-default -Wunused-parameter \ + -Wwrite-strings \ + $(call cc-option,$(CC),-Wlogical-op,) \ diff --git a/sys-boot/tboot/files/tboot-1.10.3-disable-strip.patch b/sys-boot/tboot/files/tboot-1.10.3-disable-strip.patch new file mode 100644 index 000000000000..c7a7fd04c7b5 --- /dev/null +++ b/sys-boot/tboot/files/tboot-1.10.3-disable-strip.patch @@ -0,0 +1,14 @@ +diff -r 5a30b6b09e77 Config.mk +--- a/Config.mk Fri Dec 10 15:35:42 2021 +0100 ++++ b/Config.mk Sun Dec 12 14:52:19 2021 -0600 +@@ -56,10 +56,6 @@ + OBJCOPY ?= objcopy + OBJDUMP ?= objdump + +-ifeq ($(debug),n) +-INSTALL_STRIP ?= -s +-endif +- + INSTALL ?= install + INSTALL_DIR = $(INSTALL) -d -m0755 -p + INSTALL_DATA = $(INSTALL) -m0644 -p diff --git a/sys-boot/tboot/files/tboot-1.10.3-dont-call-strip-directly.patch b/sys-boot/tboot/files/tboot-1.10.3-dont-call-strip-directly.patch new file mode 100644 index 000000000000..83adeda6d5ac --- /dev/null +++ b/sys-boot/tboot/files/tboot-1.10.3-dont-call-strip-directly.patch @@ -0,0 +1,12 @@ +diff -r 5a30b6b09e77 tboot/Makefile +--- a/tboot/Makefile Fri Dec 10 15:35:42 2021 +0100 ++++ b/tboot/Makefile Mon Dec 20 13:06:09 2021 -0600 +@@ -34,7 +34,7 @@ + TARGET_LDS := $(CURDIR)/common/tboot.lds + + $(TARGET).strip : $(TARGET) +- strip $< -o $@ ++ $(STRIP) $< -o $@ + + $(TARGET).gz : $(TARGET).strip + gzip -n -f -9 < $< > $@ diff --git a/sys-boot/tboot/files/tboot-1.9.11-genkernel-path.patch b/sys-boot/tboot/files/tboot-1.9.11-genkernel-path.patch deleted file mode 100644 index b2459816068b..000000000000 --- a/sys-boot/tboot/files/tboot-1.9.11-genkernel-path.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff -r 9998b2fb83fd tboot/20_linux_tboot ---- a/tboot/20_linux_tboot Wed Apr 10 11:47:06 2019 +0200 -+++ b/tboot/20_linux_tboot Tue Jul 23 22:42:00 2019 -0500 -@@ -173,7 +173,16 @@ - EOF - } - --linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do -+machine=`uname -m` -+case "$machine" in -+ i?86) GENKERNEL_ARCH="x86" ;; -+ mips|mips64) GENKERNEL_ARCH="mips" ;; -+ mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;; -+ arm*) GENKERNEL_ARCH="arm" ;; -+ *) GENKERNEL_ARCH="$machine" ;; -+esac -+ -+linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do - basename=$(basename $i) - version=$(echo $basename | sed -e "s,^[^0-9]*-,,g") - if grub_file_is_not_garbage "$i" && grep -qx "CONFIG_INTEL_TXT=y" /boot/config-${version} 2> /dev/null ; then echo -n "$i " ; fi -@@ -219,7 +228,9 @@ - "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ - "initrd-${alt_version}" "initramfs-${alt_version}.img" \ - "initramfs-genkernel-${version}" \ -- "initramfs-genkernel-${alt_version}"; do -+ "initramfs-genkernel-${alt_version}" \ -+ "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \ -+ "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do - if test -e "${dirname}/${i}" ; then - initrd="$i" - break -diff -r 9998b2fb83fd tboot/20_linux_xen_tboot ---- a/tboot/20_linux_xen_tboot Wed Apr 10 11:47:06 2019 +0200 -+++ b/tboot/20_linux_xen_tboot Tue Jul 23 22:42:00 2019 -0500 -@@ -167,6 +167,15 @@ - EOF - } - -+machine=`uname -m` -+case "$machine" in -+ i?86) GENKERNEL_ARCH="x86" ;; -+ mips|mips64) GENKERNEL_ARCH="mips" ;; -+ mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;; -+ arm*) GENKERNEL_ARCH="arm" ;; -+ *) GENKERNEL_ARCH="$machine" ;; -+esac -+ - linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do - if grub_file_is_not_garbage "$i"; then - basename=$(basename $i) -@@ -234,7 +243,9 @@ - "initrd-${version}" "initrd.img-${alt_version}" \ - "initrd-${alt_version}.img" "initrd-${alt_version}" \ - "initramfs-genkernel-${version}" \ -- "initramfs-genkernel-${alt_version}" ; do -+ "initramfs-genkernel-${alt_version}" \ -+ "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \ -+ "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do - if test -e "${dirname}/${i}" ; then - initrd="$i" - break diff --git a/sys-boot/tboot/tboot-1.9.11-r1.ebuild b/sys-boot/tboot/tboot-1.10.3.ebuild index 64a972787d85..1c4693a6e37b 100644 --- a/sys-boot/tboot/tboot-1.9.11-r1.ebuild +++ b/sys-boot/tboot/tboot-1.10.3.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit flag-o-matic mount-boot +inherit mount-boot toolchain-funcs DESCRIPTION="Performs a measured and verified boot using Intel Trusted Execution Technology" HOMEPAGE="https://sourceforge.net/projects/tboot/" @@ -17,21 +17,19 @@ IUSE="custom-cflags selinux" # requires patching the kernel src RESTRICT="test" -DEPEND="app-crypt/trousers -app-crypt/tpm-tools -dev-libs/openssl:0=[-bindist(-)] -" +DEPEND="dev-libs/openssl:0=[-bindist(-)]" RDEPEND="${DEPEND} -sys-boot/grub:2 -selinux? ( sec-policy/selinux-tboot )" + sys-boot/grub:2 + selinux? ( sec-policy/selinux-tboot )" -DOCS=( README COPYING CHANGELOG ) -PATCHES=( "${FILESDIR}/${PN}-1.9.11-genkernel-path.patch" ) +DOCS=( README.md COPYING CHANGELOG ) +PATCHES=( "${FILESDIR}/${PN}-1.10.3-disable-Werror.patch" + "${FILESDIR}/${PN}-1.10.3-disable-strip.patch" + "${FILESDIR}/${PN}-1.10.3-dont-call-strip-directly.patch" ) -src_prepare() { - sed -i 's/ -Werror//g' Config.mk || die - sed -i 's/^INSTALL_STRIP = -s$//' Config.mk || die # QA Errors +src_configure() { + tc-export AS LD CC CPP AR RANLIB NM OBJCOPY OBJDUMP STRIP default } @@ -52,15 +50,15 @@ src_install() { emake DISTDIR="${D}" install dodoc "${DOCS[@]}" - dodoc docs/*.txt lcptools/*.pdf + dodoc docs/*.{txt,md} - cd "${ED}" + cd "${ED}" || die mkdir -p usr/lib/tboot/ || die mv boot usr/lib/tboot/ || die } pkg_postinst() { - cp "${ROOT}/usr/lib/tboot/boot/*" "${ROOT}/boot/" || die + cp "${ROOT}/usr/lib/tboot/boot/"* "${ROOT}/boot/" || die ewarn "Please remember to download the SINIT AC Module relevant" ewarn "for your platform from:" |