Workaround fix for missing partuuid and partlabel symlinks.

After the chromioum OS rebase, systemd-udevd is not creating symlinks
for disk partitions. Add a workaround in libblkid library.

BUG=b/225279485
TEST=presubmit,validation,k8s e2e test
RELEASE_NOTE=None

Change-Id: I187171922f9bb757fce135517d8b38f427f6e131
Reviewed-on: https://cos-review.googlesource.com/c/third_party/overlays/chromiumos-overlay/+/31400
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
Reviewed-by: Robert Kolchmeyer <rkolchmeyer@google.com>
Reviewed-by: Rayan Dasoriya <dasoriya@google.com>
diff --git a/sys-apps/util-linux/files/0001-Workaround-to-probe-disk-partitions.patch b/sys-apps/util-linux/files/0001-Workaround-to-probe-disk-partitions.patch
new file mode 100644
index 0000000..a8eb35c
--- /dev/null
+++ b/sys-apps/util-linux/files/0001-Workaround-to-probe-disk-partitions.patch
@@ -0,0 +1,41 @@
+From 7f24eb3b71bee502e365f0db251e65fd857b5062 Mon Sep 17 00:00:00 2001
+From: Meena Shanmugam <meenashanmugam@google.com>
+Date: Fri, 1 Apr 2022 17:13:43 +0000
+Subject: [PATCH] Workaround to probe disk partitions.
+
+When the disk partitions are probed from systemd-udevd,
+blkid_probe_get_wholedisk_devno function returns prtition devno istead
+of whole disk devno. FOr example, wholedisk devno is 0x800 and partition
+that is probed is 0x801, blkid_probe_get_wholedisk_devno function
+suppose to return 0x800, but it returns 0x801(sda1). sda1 will not have
+any partition information, hence it fails to update the udev database
+with parition information. So insead of calling blkid_probe_get_wholedisk_devno
+mask the partition number in the devno to get the whole disk.
+---
+ libblkid/src/probe.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c
+index 31706240f..dd9c422d7 100644
+--- a/libblkid/src/probe.c
++++ b/libblkid/src/probe.c
+@@ -1850,14 +1850,14 @@ blkid_probe blkid_probe_get_wholedisk_probe(blkid_probe pr)
+ {
+ 	dev_t disk;
+ 
+-	if (blkid_probe_is_wholedisk(pr))
++	if (!(blkid_probe_get_devno(pr) & 0x00FF))
+ 		return NULL;			/* this is not partition */
+ 
+ 	if (pr->parent)
+ 		/* this is cloned blkid_probe, use parent's stuff */
+ 		return blkid_probe_get_wholedisk_probe(pr->parent);
+ 
+-	disk = blkid_probe_get_wholedisk_devno(pr);
++	disk = blkid_probe_get_devno(pr) & 0xFF00;
+ 
+ 	if (pr->disk_probe && pr->disk_probe->devno != disk) {
+ 		/* we have disk prober, but for another disk... close it */
+-- 
+2.35.1.1094.g7c7d902a7c-goog
+
diff --git a/sys-apps/util-linux/util-linux-2.36.2-r1.ebuild b/sys-apps/util-linux/util-linux-2.36.2-r2.ebuild
similarity index 98%
rename from sys-apps/util-linux/util-linux-2.36.2-r1.ebuild
rename to sys-apps/util-linux/util-linux-2.36.2-r2.ebuild
index 26e97af..11b6398 100644
--- a/sys-apps/util-linux/util-linux-2.36.2-r1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.36.2-r2.ebuild
@@ -80,6 +80,7 @@
 
 PATCHES=(
 	"${FILESDIR}"/0001-lib-loopdev-fix-is_loopdev-to-be-usable-with-partiti.patch
+	"${FILESDIR}"/0001-Workaround-to-probe-disk-partitions.patch
 )
 
 src_prepare() {