Closed sickcodes closed 3 years ago
Privileged
Applying fixes from OSX-KVM upstream: https://github.com/kholia/OSX-KVM/commit/dad4131633dfc38b404ed85ee17e14f7ce0e5520#diff-da40b33019e72009f42724f6858b8329fe12e3220d3f1ce6d2b9a0dcdb58987c
EDIT: failed
libguestfs moves slow providing a newer libguestfs, might claim the AUR one or create libguestfs-dev
sudo pacman -S gperf xorriso ocamlbuild ocaml-findlib perl --noconfirm
export PATH="/usr/bin/core_perl:${PATH}"
wget https://download.libguestfs.org/1.45-development/libguestfs-1.45.6.tar.gz
tar -xzvf libguestfs-1.45.6.tar.gz
cd libguestfs-1.45.6
./configure
make
sudo make install
EDIT: failed
Fail, downgrading libguestfs:
git clone https://aur.archlinux.org/libguestfs-git.git
cd libguestfs-git
makepkg -si --syncdeps
Package Details: libguestfs-git 1.42.0.r21.g4837698d8-1
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1967905
Trying old libguestfs'es via https://github.com/archlinux/svntogit-community/commits/packages/libguestfs/trunk
yes | sudo pacman -U https://archive.archlinux.org/packages/l/libguestfs/libguestfs-1.44.1-4-x86_64.pkg.tar.zst
yes | sudo pacman -U https://archive.archlinux.org/packages/l/libguestfs/libguestfs-1.44.1-3-x86_64.pkg.tar.zst
yes | sudo pacman -U https://archive.archlinux.org/packages/l/libguestfs/libguestfs-1.44.1-2-x86_64.pkg.tar.zst
yes | sudo pacman -U https://archive.archlinux.org/packages/l/libguestfs/libguestfs-1.44.1-1-x86_64.pkg.tar.zst
yes | sudo pacman -U https://archive.archlinux.org/packages/l/libguestfs/libguestfs-1.42.0-5-x86_64.pkg.tar.zst
It's this:
qemu-system-x86_64: -enable-fips: warning: -enable-fips is deprecated, please build QEMU with the libgcrypt library as the cryptography provider to enable FIPS compliance
Edit, it's not
EDIT: failed
Requires the following fix (will add in around 10-20 hours, unless someone wants to create a PR)
sudo pacman -S gperf xorriso ocamlbuild ocaml-findlib perl perl-inc-latest perl-module-build --noconfirm
Using PKGBUILD: https://raw.githubusercontent.com/archlinux/svntogit-community/packages/libguestfs/trunk/PKGBUILD
Use latest release: https://download.libguestfs.org/1.45-development/libguestfs-1.45.6.tar.gz
Claiming libguestfs-dev as git AUR has not been updated in a while
Created bleeding edge libguestfs-dev
, as libguestfs-git
(stable) is behind a few versions.
Work in progress: https://aur.archlinux.org/packages/libguestfs-dev/
Work in progress: https://github.com/sickcodes/aur/tree/master/libguestfs-dev
Testing (edited):
### FIX LIBGUESTFS
# downgrade file command for supermin sub environment
RUN yes | sudo pacman -Syyu \
&& yes | sudo pacman -R libguestfs --noconfirm \
&& yes | sudo pacman -U https://archive.archlinux.org/packages/f/file/file-5.39-1-x86_64.pkg.tar.zst --noconfirm \
&& git clone https://aur.archlinux.org/libguestfs-dev.git \
&& cd libguestfs-dev \
&& makepkg -si --syncdeps --noconfirm || exit 1
### FIX LIBGUESTFS
Testing
### FIX LIBGUESTFS # downgrade file command for supermin sub environment RUN sudo pacman -Syyu \ && sudo pacman -R libguestfs \ && sudo pacman -U https://archive.archlinux.org/packages/f/file/file-5.39-1-x86_64.pkg.tar.zst \ && git clone https://aur.archlinux.org/libguestfs-dev.git \ && cd libguestfs-dev \ && makepkg -si --syncdeps --noconfirm || exit 1 ### FIX LIBGUESTFS
Doesn't seem working atm. The only solution is to set GENERATE_SPECIFIC and GENERATE_UNIQUE to false.
Working on it, will have it fixed soon!
Inserted the patches back in https://github.com/sickcodes/Docker-OSX/commit/d910db6958a502d4e72dc234605729645ab99331
The exact issue is libguestfs.
Occurs during libguestfs "run" on line 85: https://github.com/sickcodes/osx-serial-generator/blob/master/opencore-image-ng.sh#L85
It ends up affecting supermin
, which later in the GENERATE options, will use system libs, and if it's the broken file/glibc, then we won't be able to build due to a cache that I have recently learnt about.
I'm not actually sure yet, there was about 5 issues.
Second tiny issue was https://github.com/sickcodes/osx-serial-generator/commit/f8497bee65d5725f97d1ed79ecf7300fc8c9990e
fish copy-in $WORK/EFI/OC/Resources /ESP/EFI/OC/
I blind changed to:
fish copy-in $BASE/../resources/OcBinaryData/Resources /ESP/EFI/OC/
And have reverted to:
fish copy-in $BASE/resources/OcBinaryData/Resources /ESP/EFI/OC/
@kholia moved his OcBinaryData to a submodule, and we are going to use that one.
If anyone wants to assist, would be great to debug this issue with libguestfs
.
I believe it's a combination of the cached copies of glibc
, linux
, vs latest versions.
OR the boot disks may need to be built without KVM now?
/var/tmp/.guestfs-1000
libguestfs: trace: get_backend_setting "force_tcg"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "force_kvm"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_sockdir
libguestfs: trace: get_sockdir = "/tmp"
libguestfs: finished testing qemu features
libguestfs: trace: get_backend_setting "gdb"
libguestfs: trace: get_backend_setting = NULL (error)
Booting from ROM...
\x1b[2J[ 0.082806] usbserial: usb_serial_init - registering generic driver failed
[ 0.083543] usbserial: usb_serial_init - returning with error -19
RUN tee -a /etc/pacman.conf <<< '[community-testing]' \
&& tee -a /etc/pacman.conf <<< 'Include = /etc/pacman.d/mirrorlist' \
&& tee -a /etc/pacman.conf <<< '[community-testing]' \
&& tee -a /etc/pacman.conf <<< 'Include = /etc/pacman.d/mirrorlist' \
Also went ahead with this: https://aur.archlinux.org/packages/libguestfs-dev/
Useless but useful for future issues.
Actually that didn't work so it has to be the early one straight after clearing the pacman cache after installing libvirt etc.
https://github.com/sickcodes/Docker-OSX/commit/ca92e33b206d9c006eaf3d359965326f415929d9
diff GOOD BAD the red (left) colored packages are working.
13c13
< at-spi2-core 2.40.2-1
---
> at-spi2-core 2.40.3-1
27c27
< brltty 6.3-3
---
> brltty 6.3-4
29c29
< btrfs-progs 5.12.1-1
---
> btrfs-progs 5.13-1
32c32
< ca-certificates-mozilla 3.67-1
---
> ca-certificates-mozilla 3.68-1
36a37
> celt 0.11.3-4
40c41
< curl 7.77.0-1
---
> curl 7.78.0-1
52c53
< dtc 1.6.0-3
---
> dtc 1.6.1-1
58c59
< f2fs-tools 1.14.0-1
---
> f2fs-tools 1.14.0-2
76c77
< gdk-pixbuf2 2.42.6-1
---
> gdk-pixbuf2 2.42.6-2
84c85
< gnupg 2.2.28-2
---
> gnupg 2.2.29-1
102c103
< gtk3 1:3.24.29-2
---
> gtk3 1:3.24.30-1
106c107
< harfbuzz 2.8.1-1
---
> harfbuzz 2.8.2-1
109c110
< hivex 1.3.20-5
---
> hivex 1.3.20-6
118c119
< jack 0.125.0-9
---
> jack2 1.9.19-2
121c122
< js78 78.11.0-1
---
> js78 78.12.0-1
131c132
< less 1:581.2-1
---
> less 1:590-1
160c161
< libguestfs 1.44.1-5
---
> libguestfs 1.44.1-6
169c170
< libldap 2.4.59-1
---
> libldap 2.4.59-2
178c179
< libnghttp2 1.43.0-1
---
> libnghttp2 1.44.0-1
216,217c217,218
< libvirt 1:7.3.0-1
< libvirt-dbus 1.4.0-1
---
> libvirt 1:7.5.0-1
> libvirt-dbus 1.4.1-1
247c248
< linux 5.12.14.arch1-1
---
> linux 5.13.5.arch1-1
249c250
< llvm-libs 12.0.0-2
---
> llvm-libs 12.0.1-2
261,262c262,263
< mesa 21.1.4-1
< mkinitcpio 30-1
---
> mesa 21.1.5-1
> mkinitcpio 30-2
265,266c266,267
< mpg123 1.28.0-1
< mtools 1:4.0.31-1
---
> mpg123 1.28.2-1
> mtools 1:4.0.34-1
277c278
< nss 3.67-1
---
> nss 3.68-1
287c288
< pacman 6.0.0-3
---
> pacman 6.0.0-5
289c290
< pacman-mirrorlist 20210509-1
---
> pacman-mirrorlist 20210718-1
298c299
< perl 5.34.0-1
---
> perl 5.34.0-2
316c317
< python-requests 2.25.1-1
---
> python-requests 2.26.0-1
336,337c337,338
< squashfs-tools 4.4_git.1-1
< strace 5.12-1
---
> squashfs-tools 4.5-1
> strace 5.13-1
342,344c343,345
< systemd 248.3-2
< systemd-libs 248.3-2
< systemd-sysvcompat 248.3-2
---
> systemd 249.2-1
> systemd-libs 249.2-1
> systemd-sysvcompat 249.2-1
348c349
< tdb 1.4.3-4
---
> tdb 1.4.5-1
354,355c355,356
< util-linux 2.37-3
< util-linux-libs 2.37-3
---
> util-linux 2.37.1-1
> util-linux-libs 2.37.1-1
365c366
< vulkan-icd-loader 1.2.182-1
---
> vulkan-icd-loader 1.2.185-1
I need help with this one, if anyone is available.
Working:
sickcodes/docker-osx:big-sur
Not working
sickcodes/docker-osx:latest
Just need to find out why latest is broken at supermin
stage.
- e GENERATE_UNIQUE=true \
And latest
will fail
But the big-sur
image is OK.
The packages are listed above in diff.
Observable with the following commands (usptream, or due to one of the above packages):
git clone --depth 1 --recursive https://github.com/kholia/OSX-KVM.git
cd OSX-KVM/OpenCore-Catalina
bash opencore-image-ng.sh --cfg "$PWD/config.plist" --img "${PWD}/out.qcow2"
rm "${PWD}out.qcow2"
git checkout -f a1cd556d3a124ed3ab8b6640af80720c3867e70d
bash opencore-image-ng.sh --cfg "$PWD/config.plist" --img "${PWD}/out.qcow2"
Fails, so it's host related... probably 5.13?
git checkout -f ca219f57e5b25496edf1970054f922181d47d6e8
bash opencore-image-ng.sh --cfg "$PWD/config.plist" --img "${PWD}/out.qcow2"
Not permission related...
sudo LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1 bash opencore-image-ng.sh --cfg "$PWD/config.plist" --img "${PWD}/out.qcow2"
Fixed with:
# this has been merged into master
sudo pacman -Rns linux
sudo pacman -U https://archive.archlinux.org/packages/l/linux/linux-5.12.14.arch1-1-x86_64.pkg.tar.zst
export SUPERMIN_KERNEL=/boot/vmlinuz-linux
export SUPERMIN_MODULES=/lib/modules/5.12.14-arch1-1
export SUPERMIN_KERNEL_VERSION=5.12.14-arch1-1
rm -rf /var/tmp/.guestfs-*
libguestfs-test-tool
Finally... SUPERMIN_KERNEL
downgrade to 5.12 due to 5.13 zstd issue and supermin
https://github.com/sickcodes/Docker-OSX/commit/5e294d35c1d362f2a65b41a8264755c04d01e14b
Fixed below https://github.com/sickcodes/Docker-OSX/issues/322#issuecomment-888482270
Unprivileged: