diff --git a/qemu/Makefile b/qemu/Makefile index 17690bca..ad5ba17e 100644 --- a/qemu/Makefile +++ b/qemu/Makefile @@ -24,13 +24,13 @@ windows-server-2022-x86_64-ocaml-4.14.img: unattend-4.14.2.iso -drive file=SW_DVD9_Win_Server_STD_CORE_2022_2108.6_64Bit_English_DC_STD_MLF_X23-03231.ISO,media=cdrom \ -drive file=unattend-4.14.2.iso,media=cdrom -unattend-4.14.2.iso: autounattend.xml.m4 id_ed25519.pub openssh-win64.msi opam-2.2.exe opam-dev.exe setup-x86_64.exe cygsympathy.cmd cygsympathy.sh +unattend-4.14.2.iso: autounattend.xml.m4 id_ed25519.pub openssh-win64.msi opam-2.2.exe opam-dev.exe setup-x86_64.exe m4 -D VERSION=4.14.2 autounattend.xml.m4 > autounattend.xml - mkisofs -o unattend-4.14.2.iso -r -J autounattend.xml id_ed25519.pub openssh-win64.msi opam-2.2.exe opam-dev.exe setup-x86_64.exe cygsympathy.cmd cygsympathy.sh + mkisofs -o unattend-4.14.2.iso -r -J autounattend.xml id_ed25519.pub openssh-win64.msi opam-2.2.exe opam-dev.exe setup-x86_64.exe -unattend-5.2.0.iso: autounattend.xml.m4 id_ed25519.pub openssh-win64.msi opam-2.2.exe opam-dev.exe setup-x86_64.exe cygsympathy.cmd cygsympathy.sh +unattend-5.2.0.iso: autounattend.xml.m4 id_ed25519.pub openssh-win64.msi opam-2.2.exe opam-dev.exe setup-x86_64.exe m4 -D VERSION=5.2.0 autounattend.xml.m4 > autounattend.xml - mkisofs -o unattend-5.2.0.iso -r -J autounattend.xml id_ed25519.pub openssh-win64.msi opam-2.2.exe opam-dev.exe setup-x86_64.exe cygsympathy.cmd cygsympathy.sh + mkisofs -o unattend-5.2.0.iso -r -J autounattend.xml id_ed25519.pub openssh-win64.msi opam-2.2.exe opam-dev.exe setup-x86_64.exe opam-2.2.exe: curl -L https://github.com/ocaml/opam/releases/download/2.2.1/opam-2.2.1-x86_64-windows.exe -o opam-2.2.exe @@ -47,12 +47,6 @@ setup-x86_64.exe: virtio-win.iso: curl -L https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.262-2/virtio-win.iso -o virtio-win.iso -cygsympathy.cmd: - curl -L https://raw.githubusercontent.com/metastack/cygsympathy/master/cygsympathy.cmd -o cygsympathy.cmd - -cygsympathy.sh: - curl -L https://raw.githubusercontent.com/metastack/cygsympathy/master/cygsympathy.sh -o cygsympathy.sh - # Ubuntu seed.iso: user-data.yaml diff --git a/qemu/autounattend.xml.m4 b/qemu/autounattend.xml.m4 index 8becf7e3..43d2276a 100644 --- a/qemu/autounattend.xml.m4 +++ b/qemu/autounattend.xml.m4 @@ -185,138 +185,102 @@ 10 - setx /m CYGWIN "nodosfilewarning winsymlinks:native" - Set PATH environment variable - - - - 11 - cmd /c "mkdir C:\cygwin64\lib\cygsympathy" - Create lib/cygsympathy - - - - 12 - cmd /c "mkdir C:\cygwin64\etc\postinstall" - Create etc/postinstall - - - - 13 - cmd /c "copy f:\cygsympathy.cmd C:\cygwin64\lib\cygsympathy" - Install cmd script - - - - 14 - cmd /c "copy f:\cygsympathy.sh C:\cygwin64\lib\cygsympathy\cygsympathy" - Install cmd script - - - - 15 - mklink C:\cygwin64\etc\postinstall\zp_zcygsympathy.sh C:\cygwin64\lib\cygsympathy\cygsympathy - Install cmd script - - - - 16 - c:\windows\setup-x86_64.exe -q -O -s https://cygwin.mirror.uk.sargasso.net -P mingw64-x86_64-gcc-core,rsync,git,make,patch,unzip,pkgconf,pkg-config + c:\windows\setup-x86_64.exe -q -O --site https://cygwin.mirror.constant.com --symlink-type native -P mingw64-x86_64-gcc-core,rsync,git,make,patch,unzip,pkgconf,pkg-config Install cygwin - 17 + 11 setx /m PATH "c:\cygwin64\bin;c:\cygwin64\usr\x86_64-w64-mingw32\sys-root\mingw\bin;%PATH%" Set PATH environment variable - 18 + 12 c:\cygwin64\bin\gawk.exe -i inplace "/(^#)|(^$)/{print;next}{$4=""noacl,""$4;print}" C:\cygwin64\etc\fstab Add opam-repository - 19 + 13 setx /m OPAMCONFIRMLEVEL unsafe-yes Set PATH environment variable - 20 + 14 setx /m OPAMYES 1 Set PATH environment variable - 21 + 15 reg add HKLM\SOFTWARE\OpenSSH /v DefaultShell /d c:\cygwin64\bin\bash.exe Configure WinRM - 22 + 16 cmd /c "msiexec /q /norestart /i f:\openssh-win64.msi" Install OpenSSH - 23 + 17 cmd /c "copy f:\id_ed25519.pub c:\programdata\ssh\administrators_authorized_keys" Install public key - 24 + 18 cmd /c "echo AcceptENV * >> c:\programdata\ssh\sshd_config" Install public key - 25 + 19 netsh advfirewall firewall set rule group="OpenSSH SSH Server Preview (sshd)" new profile=any enable=yes Configure OpenSSH - 26 + 20 cmd /c "copy f:\opam-2.2.exe c:\cygwin64\bin\opam.exe" Copy opam executable - 27 + 21 cmd /c "copy f:\opam-2.2.exe c:\cygwin64\bin\opam-2.2.exe" Copy opam executable - 28 + 22 cmd /c "copy f:\opam-dev.exe c:\cygwin64\bin\opam-dev.exe" Copy opam executable - 29 + 23 c:\cygwin64\bin\bash.exe --login -c "cd /cygdrive/c/Users/opam && git clone https://github.com/ocaml/opam-repository" Add opam-repository - 30 + 24 c:\cygwin64\bin\opam init -y -k local -a c:\users\opam\opam-repository --bare --cygwin-location=c:\cygwin64 Opam init - 31 + 25 c:\cygwin64\bin\opam switch create VERSION --packages=ocaml-base-compiler.VERSION Opam switch - 32 + 26 c:\cygwin64\bin\opam pin add -k version ocaml-base-compiler VERSION Opam switch