yaya
November 17, 2024, 6:19pm
1
Hey there,
i was able to use this on 24.04 with following how-to:
git clone https://github.com/google/gasket-driver
cd gasket-driver
debuild -us -uc -tc -b -d
cd ..
dpkg -i gasket-dkms_1.0-18_all.deb
reboot
but now i can not debuild it - getting this error:
# debuild -us -uc -tc -b
dpkg-buildpackage -us -uc -ui -tc -b
dpkg-buildpackage: info: source package gasket-dkms
dpkg-buildpackage: info: source version 1.0-18
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Coral <coral-support@google.com>
dpkg-source --before-build .
dpkg-buildpackage: info: host architecture amd64
debian/rules clean
dh clean --with dkms
dh_clean
debian/rules build
dh build --with dkms
dh_update_autotools_config
dh_autoreconf
create-stamp debian/debhelper-build-stamp
debian/rules binary
dh binary --with dkms
dh_testroot
dh_prep
debian/rules override_dh_install
make[1]: Entering directory '/mnt/Apps_SSD_128GB/homes/gasket-driver'
dh_install src/* usr/src/gasket-1.0/
make[1]: Leaving directory '/mnt/Apps_SSD_128GB/homes/gasket-driver'
dh_installdocs
dh_installchangelogs
debian/rules override_dh_dkms
make[1]: Entering directory '/mnt/Apps_SSD_128GB/homes/gasket-driver'
dh_dkms -V 1.0
make[1]: Leaving directory '/mnt/Apps_SSD_128GB/homes/gasket-driver'
dh_installudev
dh_perl
dh_link
dh_strip_nondeterminism
dh_compress
dh_fixperms
dh_missing
dh_installdeb
dh_gencontrol
dh_md5sums
sudo: argv[0] mismatch, expected "/usr/bin/sh", got "/bin/sh"
dh_md5sums: error: cd debian/gasket-dkms >/dev/null && xargs -r0 md5sum | perl -pe 'if (s@^\\@@) { s/\\\\/\\/g; }' > DEBIAN/md5sums died with signal 9
dh_md5sums: error: Aborting due to earlier error
make: *** [debian/rules:6: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -tc -b failed
I checked /usr/bin/sh and /bin/sh - both referencing the same:
root@truenas:/mnt/Apps_SSD_128GB/homes/gasket-driver# l /usr/bin/sh
lrwxrwxrwx 1 root root 4 Jan 5 2023 /usr/bin/sh -> dash
root@truenas:/mnt/Apps_SSD_128GB/homes/gasket-driver# l /bin/sh
lrwxrwxrwx 1 root root 4 Jan 5 2023 /bin/sh -> dash
any ideas about that? anyone else figuring out same problems?
the device is for sure there:
# lspci |grep -i coral
02:00.0 System peripheral: Global Unichip Corp. Coral Edge TPU
1 Like
bacon
November 19, 2024, 1:51pm
2
Yes, it’s a known issue that certain things no longer work with sudo.
Looks like it’s a wontfix because doing stuff in the shell isn’t supported.
https://ixsystems.atlassian.net/browse/NAS-131540
However, if you want to hack it, edit the file /etc/sudoers
:
sudo visudo
(EDIT: this is a safer way to edit the sudoers file)
Remove or comment out the line that says Defaults log_subcmd
:
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
# Defaults log_subcmds
Defaults log_format=json
Obviously this isn’t supported, may reset upon reboot or upgrade, etc. But since you’re installing third-party packages I don’t think that is an issue for you
I was trying to do the same thing just recently and ran into the same error messages as the OP. In my case, it seems I was able to resolve it by SSH’ing into the machine to execute the commands, rather than using the shell in the GUI. A warning in the Developer Mode docs is what lead me to try that.
Do Not Use Web Shell
Do not make system changes using the TrueNAS UI web shell. Using package management tools in the web shell can result in middleware changes that render the system inaccessible.
Connect to the system using SSH or a physically connected monitor and keyboard before enabling or using developer mode.
yaya
November 21, 2024, 7:29am
4
actually I give it a try again with editing the sudoers - same error.
the error part is the same:
sudo: argv[0] mismatch, expected "/usr/bin/sh", got "/bin/sh"
dh_md5sums: error: cd debian/gasket-dkms >/dev/null && xargs -r0 md5sum | perl -pe 'if (s@^\\@@) { s/\\\\/\\/g; }' > DEBIAN/md5sums died with signal 9
dh_md5sums: error: Aborting due to earlier error
make: *** [debian/rules:6: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -tc -b -d failed
I am using the ssh shell, no webgui
bacon
November 21, 2024, 7:51am
5
I know that removing log_subcmds
works for things like sudo tmux
or sudo su -
, but maybe it doesn’t work in your case. Can you try sudo su -
to check if you have edited the sudoers correctly?
There is an alternative way which I’ve seen other people using:
Defaults !intercept_verify
I can confirm that change works for sudo su -
.
Reference: https://www.sudo.ws/pipermail/sudo-users/2023-February/006538.html
EDIT: Please use sudo visudo
instead of editing the sudoers file directly.
yaya
November 21, 2024, 8:08am
6
ok, I did now:
sudo visudo
→
#Defaults log_subcmds
Defaults !intercept_verify
trying sudo su -
ends with:
# sudo su -
sudo: argv[0] mismatch, expected "/usr/bin/bash", got "-bash"
Killed
my user is using bash - is this expexting to be used from zsh?
EDIT:
Chatgpt had an answer
cat /etc/passwd | grep root
root:x:0:0:root:/root:/usr/bin/bash
but correctly this should be (to make the build work):
root:x:0:0:root:/root:/bin/bash
I changed this with:
sudo usermod -s /bin/bash root
Next steps:
logout root
start the build with sudo debuild -us -uc -tc -b -d
install the resulting . deb also with sudo dpkg -i gasket-dkms_1.0-18_all.deb
finish
thank for your help guys, really appreciating.
1 Like