Skip to contentSkip to conversation

Fix mtab issue for initramfs install

PATCH In review Saul Wold 2 participants 5 messages May 16, 2013 – May 17, 2013

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

cover Fix mtab issue for initramfs install

This patch set reversn and older patch and correctly fixes the issue that /etc/mtab was getting installed in the initramfs because of a RDEPENDS on base files from rpm-postinsts. This RDEPENDS was wrong and now removed by this patch.

The revert need to undo the remove of the cat /proc/mounts > /etc/mtab and then ensure that the PR bumps are retained.

Sau!

The following changes since commit e3561c1cae467a4fb79723f83dea54d9d62adf7d:

qemuimage-testlib: change default directory for target tests (2013-05-16 00:23:34 +0300)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib sgw/update
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=sgw/update

Saul Wold (3):
rpm-postinst: remove un-needed RDEPENDS on base-files Revert "initramfs-live-install*: fix the "install" boot option"
initrdscripts: Not let PR go backwards after revert

 meta/recipes-core/initrdscripts/files/init-install-efi.sh | 1 +
 meta/recipes-core/initrdscripts/files/init-install.sh     | 1 +
 meta/recipes-devtools/rpm/rpm-postinsts.bb                | 2 --
 3 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.0.2
author
#1 lore raw

PATCH 1/3 rpm-postinst: remove un-needed RDEPENDS on base-files

This was transferred un-intentionally when we split the rpm code, the base-files then layed down additional files (specificaly /etc/mtab) in the initramfs image and caused problems for the installer code.

Removing the RDEPENDS will fix the image generation issue and thus the installer, so we will need to revert a previous patch that attempted to fix the earlier issue #4229.

[YOCTO #4504]
[YOCTO #4229]

---
 meta/recipes-devtools/rpm/rpm-postinsts.bb | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-devtools/rpm/rpm-postinsts.bb +0 -2
index 3d2d05d..3c0f520 100644
@@ -3,8 +3,6 @@ SECTION = "core"
 LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/LGPL-2.1;md5=1a6d268fd218675ffea8be556788b780"
 
-RDEPENDS_${PN} = "base-files"
-
 inherit allarch
 #
 # Allow distributions to alter when [postponed] package install scripts are run
Signature · 1 line
1.8.0.2
author
#2 lore raw

PATCH 2/3 Revert "initramfs-live-install*: fix the "install" boot option"

In reply to Saul Wold

This was not the correct fix for this issues, it turns out that base-files package was getting installed un-intentionally when rpm-postinsts was split out. The base-files recipe lays down the link that caused the cat failure.

[YOCTO #4504]

This reverts commit 45e460d0846f0f660128dc06064b597ce40282b3.

---
 meta/recipes-core/initrdscripts/files/init-install-efi.sh         | 1 +
 meta/recipes-core/initrdscripts/files/init-install.sh             | 1 +
 meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb | 2 +-
 meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb     | 2 +-
 4 files changed, 4 insertions(+), 2 deletions(-)
meta/recipes-core/initrdscripts/files/init-install-efi.sh +1 -0
index 9f7a9e7..23228c9 100644
@@ -66,6 +66,7 @@ rm -f /etc/udev/scripts/mount*
 umount /dev/${device}* 2> /dev/null || /bin/true
 
 mkdir -p /tmp
+cat /proc/mounts > /etc/mtab
 
 disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
 
meta/recipes-core/initrdscripts/files/init-install.sh +1 -0
index 2ecd333..d2a0db3 100644
@@ -78,6 +78,7 @@ if [ ! -b /dev/loop0 ] ; then
 fi
 
 mkdir -p /tmp
+cat /proc/mounts > /etc/mtab
 
 disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
 
meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb +1 -1
index 264931f..8ad47d4 100644
@@ -3,7 +3,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 SRC_URI = "file://init-install-efi.sh"
 
-PR = "r1"
+PR = "r0"
 
 RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools"
 
meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb +1 -1
index 3a8836d..0f80f0e 100644
@@ -3,7 +3,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 SRC_URI = "file://init-install.sh"
 
-PR = "r9"
+PR = "r8"
 
 RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs"
 
Signature · 1 line
1.8.0.2
#3 lore raw

Re: [PATCH 2/3] Revert "initramfs-live-install*: fix the "install" boot option"

Op 16 mei 2013, om 20:03 heeft Saul Wold <[email protected]> het volgende geschreven:

Quoted 22 lines

This was not the correct fix for this issues, it turns out that base-files package was getting installed un-intentionally when rpm-postinsts was split out. The base-files recipe lays down the link that caused the cat failure.

[YOCTO #4504]

This reverts commit 45e460d0846f0f660128dc06064b597ce40282b3.
---

meta/recipes-core/initrdscripts/files/init-install-efi.sh         | 1 +
meta/recipes-core/initrdscripts/files/init-install.sh             | 1 +
meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb | 2 +-
meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb     | 2 +-
4 files changed, 4 insertions(+), 2 deletions(-)
meta/recipes-core/initrdscripts/files/init-install-efi.sh +0 -0
index 9f7a9e7..23228c9 100644
@@ -66,6 +66,7 @@ rm -f /etc/udev/scripts/mount*

umount /dev/${device}* 2> /dev/null || /bin/true

Quoted 2 lines

mkdir -p /tmp
+cat /proc/mounts > /etc/mtab

Traditionally /etc/mtab is a symlink to /proc/mounts, not a copy of it.

author
#4 lore raw

PATCH 3/3 initrdscripts: Not let PR go backwards after revert

In reply to Saul Wold
---
 meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb | 2 +-
 meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb +1 -1
index 8ad47d4..264931f 100644
@@ -3,7 +3,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 SRC_URI = "file://init-install-efi.sh"
 
-PR = "r0"
+PR = "r1"
 
 RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools"
 
meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb +1 -1
index 0f80f0e..3a8836d 100644
@@ -3,7 +3,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 SRC_URI = "file://init-install.sh"
 
-PR = "r8"
+PR = "r9"
 
 RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs"
 
Signature · 1 line
1.8.0.2