Bug 283078 - emulators/linux_base-rl9: missing mount/unmount command
Summary: emulators/linux_base-rl9: missing mount/unmount command
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-emulation (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-02 11:45 UTC by Michael Osipov
Modified: 2024-12-15 21:09 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (emulation)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Osipov freebsd_committer freebsd_triage 2024-12-02 11:45:17 UTC
Trying to move from emulators/linux_base-c7 and found that mount(8)/unmount(8) are missing. At least mount is useful to see from a Linux perspective what is in mtab because:
root@deblndw013x1j:/compat/linux/etc
# ../bin/less mtab
read error
Press RETURN to continue
root@deblndw013x1j:/compat/linux/etc
# ../bin/cat mtab
../bin/cat: mtab: Operation cancelled

but on a RHEL host I can do:
root@deblndw012x:/proc/self
# cat /proc/self/mounts
sysfs /sys sysfs rw,seclabel,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
devtmpfs /dev devtmpfs rw,seclabel,nosuid,size=16228388k,nr_inodes=4057097,mode=755 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,seclabel,nodev,size=25165824k 0 0
devpts /dev/pts devpts rw,seclabel,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
...
Comment 1 Fernando Apesteguía freebsd_committer freebsd_triage 2024-12-11 18:40:19 UTC
(In reply to Michael Osipov from comment #0)
Does adding util-linux-${util_ver} to BIN_DISTNAMES help?
Comment 2 Michael Osipov freebsd_committer freebsd_triage 2024-12-13 12:27:56 UTC
(In reply to Fernando Apesteguía from comment #1)

Let me check...
Comment 3 Michael Osipov freebsd_committer freebsd_triage 2024-12-13 13:23:36 UTC
(In reply to Fernando Apesteguía from comment #1)

Not fully, it is in another package "util-linux-core" and then you have a huge tail of changes:
diff --git a/emulators/linux_base-rl9/Makefile b/emulators/linux_base-rl9/Makefile
index a9401e9c6942..6ed3956d3668 100644
--- a/emulators/linux_base-rl9/Makefile
+++ b/emulators/linux_base-rl9/Makefile
@@ -2,0 +3 @@ PORTVERSION=  ${LINUX_DIST_VER}
+PORTREVISION=  1
@@ -37 +38,2 @@ BIN_DISTNAMES=  bash-${bash_ver} \
-       which-${which_ver}
+       which-${which_ver} \
+       util-linux-core-${util_ver}
@@ -158 +160,8 @@ REMOVE_FILES= bin/chfn bin/chsh bin/findmnt bin/login bin/lsblk bin/lscpu \
-       sbin/clock sbin/debugfs sbin/hwclock sbin/runuser sbin/zramctl
+       sbin/clock sbin/debugfs sbin/hwclock sbin/runuser sbin/zramctl \
+       usr/bin/chrt usr/bin/dmesg usr/bin/flock usr/bin/hardlink \
+       usr/bin/ionice usr/bin/ipcmk usr/bin/ipcrm usr/bin/ipcs usr/bin/kill \
+       usr/bin/logger usr/bin/more usr/bin/mountpoint usr/bin/nsenter \
+       usr/bin/renice usr/bin/setsid usr/bin/taskset usr/bin/unshare \
+       usr/sbin/agetty usr/sbin/blkid usr/sbin/blockdev usr/sbin/fsck \
+       usr/sbin/losetup usr/sbin/mkswap usr/sbin/partx usr/sbin/swapoff \
+       usr/sbin/swapon usr/sbin/switch_root
diff --git a/emulators/linux_base-rl9/distinfo b/emulators/linux_base-rl9/distinfo
index 708b7fb2142a..02e4b92dd9f1 100644
--- a/emulators/linux_base-rl9/distinfo
+++ b/emulators/linux_base-rl9/distinfo
@@ -1 +1 @@
-TIMESTAMP = 1732740699
+TIMESTAMP = 1734094764
@@ -355,0 +356,4 @@ SIZE (rocky/u/util-linux-2.37.4-20.el9.x86_64.rpm) = 2296252
+SHA256 (rocky/u/util-linux-core-2.37.4-20.el9.aarch64.rpm) = 5707b7c504f04a85ccf95f5f2ac329398dc480356ae7dc5e3b7bcb7559af6479
+SIZE (rocky/u/util-linux-core-2.37.4-20.el9.aarch64.rpm) = 445975
+SHA256 (rocky/u/util-linux-core-2.37.4-20.el9.x86_64.rpm) = f9a570f7927d3371d48b2207dfb2aec3dbe15862b5846e39fadd0f568d6778b9
+SIZE (rocky/u/util-linux-core-2.37.4-20.el9.x86_64.rpm) = 447799
diff --git a/emulators/linux_base-rl9/pkg-plist.aarch64 b/emulators/linux_base-rl9/pkg-plist.aarch64
index 1c44645bfaee..8f28deb329c3 100644
--- a/emulators/linux_base-rl9/pkg-plist.aarch64
+++ b/emulators/linux_base-rl9/pkg-plist.aarch64
@@ -191,0 +192 @@ usr/bin/mktemp
+usr/bin/mount
@@ -266,0 +268 @@ usr/bin/umask
+usr/bin/umount
@@ -2083,0 +2086 @@ usr/share/man/man8/mklost+found.8.gz
+usr/share/man/man8/mount.8.gz
@@ -2099,0 +2103 @@ usr/share/man/man8/tune2fs.8.gz
+usr/share/man/man8/umount.8.gz
diff --git a/emulators/linux_base-rl9/pkg-plist.amd64 b/emulators/linux_base-rl9/pkg-plist.amd64
index 596db2e15d5b..ac5c441470aa 100644
--- a/emulators/linux_base-rl9/pkg-plist.amd64
+++ b/emulators/linux_base-rl9/pkg-plist.amd64
@@ -192,0 +193 @@ usr/bin/mktemp
+usr/bin/mount
@@ -267,0 +269 @@ usr/bin/umask
+usr/bin/umount
@@ -2421,0 +2424 @@ usr/share/man/man8/mklost+found.8.gz
+usr/share/man/man8/mount.8.gz
@@ -2437,0 +2441 @@ usr/share/man/man8/tune2fs.8.gz
+usr/share/man/man8/umount.8.gz

But that is incomplete because ther are still orphaned files missing in pkg-plist. All of them need to go into REMOVE_FILES.
Comment 4 Michael Osipov freebsd_committer freebsd_triage 2024-12-13 13:23:50 UTC
Relevant packages: https://dl.rockylinux.org/vault/rocky/9.5/BaseOS/x86_64/os/Packages/u/
Comment 5 Dima Panov freebsd_committer freebsd_triage 2024-12-13 13:27:39 UTC
(In reply to Michael Osipov from comment #3)

I can handle this on holidays
Comment 6 Michael Osipov freebsd_committer freebsd_triage 2024-12-13 13:29:36 UTC
Looking interactively in the ephemeral poudriere jail, yes the executables are there.
Comment 7 Michael Osipov freebsd_committer freebsd_triage 2024-12-13 13:29:50 UTC
(In reply to Dima Panov from comment #5)

Thank you, very much appreciated!
Comment 8 commit-hook freebsd_committer freebsd_triage 2024-12-15 20:47:38 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f97ae91596be7372c506d14831e611ef9c532ea6

commit f97ae91596be7372c506d14831e611ef9c532ea6
Author:     Dima Panov <fluffy@FreeBSD.org>
AuthorDate: 2024-12-15 20:34:31 +0000
Commit:     Dima Panov <fluffy@FreeBSD.org>
CommitDate: 2024-12-15 20:34:31 +0000

    emulators/linux_base-rl9: add missing mount/umount command (+)

    mount is useful to see from a Linux perspective what is in mtab

    PR:     283078
    Sponsored by:   Future Crew, LLC

 emulators/linux_base-rl9/Makefile          | 28 +++++++++++--
 emulators/linux_base-rl9/distinfo          |  6 ++-
 emulators/linux_base-rl9/pkg-plist.aarch64 | 63 ++++++++++++++++++++++++++++++
 emulators/linux_base-rl9/pkg-plist.amd64   | 63 ++++++++++++++++++++++++++++++
 4 files changed, 155 insertions(+), 5 deletions(-)
Comment 9 Dima Panov freebsd_committer freebsd_triage 2024-12-15 21:09:59 UTC
Port adjusted, thaks!