Skip to content

Commit

Permalink
Remove cygsympathy
Browse files Browse the repository at this point in the history
  • Loading branch information
mtelvers committed Oct 30, 2024
1 parent 502c87c commit 905c64c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 63 deletions.
14 changes: 4 additions & 10 deletions qemu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
70 changes: 17 additions & 53 deletions qemu/autounattend.xml.m4
Original file line number Diff line number Diff line change
Expand Up @@ -185,138 +185,102 @@

<SynchronousCommand wcm:action="add">
<Order>10</Order>
<CommandLine>setx /m CYGWIN "nodosfilewarning winsymlinks:native"</CommandLine>
<Description>Set PATH environment variable</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>11</Order>
<CommandLine>cmd /c "mkdir C:\cygwin64\lib\cygsympathy"</CommandLine>
<Description>Create lib/cygsympathy</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>12</Order>
<CommandLine>cmd /c "mkdir C:\cygwin64\etc\postinstall"</CommandLine>
<Description>Create etc/postinstall</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>13</Order>
<CommandLine>cmd /c "copy f:\cygsympathy.cmd C:\cygwin64\lib\cygsympathy"</CommandLine>
<Description>Install cmd script</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>14</Order>
<CommandLine>cmd /c "copy f:\cygsympathy.sh C:\cygwin64\lib\cygsympathy\cygsympathy"</CommandLine>
<Description>Install cmd script</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>15</Order>
<CommandLine>mklink C:\cygwin64\etc\postinstall\zp_zcygsympathy.sh C:\cygwin64\lib\cygsympathy\cygsympathy</CommandLine>
<Description>Install cmd script</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>16</Order>
<CommandLine>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</CommandLine>
<CommandLine>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</CommandLine>
<Description>Install cygwin</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>17</Order>
<Order>11</Order>
<CommandLine>setx /m PATH "c:\cygwin64\bin;c:\cygwin64\usr\x86_64-w64-mingw32\sys-root\mingw\bin;%PATH%"</CommandLine>
<Description>Set PATH environment variable</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>18</Order>
<Order>12</Order>
<CommandLine>c:\cygwin64\bin\gawk.exe -i inplace "/(^#)|(^$)/{print;next}{$4=""noacl,""$4;print}" C:\cygwin64\etc\fstab</CommandLine>
<Description>Add opam-repository</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>19</Order>
<Order>13</Order>
<CommandLine>setx /m OPAMCONFIRMLEVEL unsafe-yes</CommandLine>
<Description>Set PATH environment variable</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>20</Order>
<Order>14</Order>
<CommandLine>setx /m OPAMYES 1</CommandLine>
<Description>Set PATH environment variable</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>21</Order>
<Order>15</Order>
<CommandLine>reg add HKLM\SOFTWARE\OpenSSH /v DefaultShell /d c:\cygwin64\bin\bash.exe</CommandLine>
<Description>Configure WinRM</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>22</Order>
<Order>16</Order>
<CommandLine>cmd /c "msiexec /q /norestart /i f:\openssh-win64.msi"</CommandLine>
<Description>Install OpenSSH</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>23</Order>
<Order>17</Order>
<CommandLine>cmd /c "copy f:\id_ed25519.pub c:\programdata\ssh\administrators_authorized_keys"</CommandLine>
<Description>Install public key</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>24</Order>
<Order>18</Order>
<CommandLine>cmd /c "echo AcceptENV * >> c:\programdata\ssh\sshd_config"</CommandLine>
<Description>Install public key</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>25</Order>
<Order>19</Order>
<CommandLine>netsh advfirewall firewall set rule group="OpenSSH SSH Server Preview (sshd)" new profile=any enable=yes</CommandLine>
<Description>Configure OpenSSH</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>26</Order>
<Order>20</Order>
<CommandLine>cmd /c "copy f:\opam-2.2.exe c:\cygwin64\bin\opam.exe"</CommandLine>
<Description>Copy opam executable</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>27</Order>
<Order>21</Order>
<CommandLine>cmd /c "copy f:\opam-2.2.exe c:\cygwin64\bin\opam-2.2.exe"</CommandLine>
<Description>Copy opam executable</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>28</Order>
<Order>22</Order>
<CommandLine>cmd /c "copy f:\opam-dev.exe c:\cygwin64\bin\opam-dev.exe"</CommandLine>
<Description>Copy opam executable</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>29</Order>
<Order>23</Order>
<CommandLine>c:\cygwin64\bin\bash.exe --login -c "cd /cygdrive/c/Users/opam && git clone https://github.com/ocaml/opam-repository"</CommandLine>
<Description>Add opam-repository</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>30</Order>
<Order>24</Order>
<CommandLine>c:\cygwin64\bin\opam init -y -k local -a c:\users\opam\opam-repository --bare --cygwin-location=c:\cygwin64</CommandLine>
<Description>Opam init</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>31</Order>
<Order>25</Order>
<CommandLine>c:\cygwin64\bin\opam switch create VERSION --packages=ocaml-base-compiler.VERSION</CommandLine>
<Description>Opam switch</Description>
</SynchronousCommand>

<SynchronousCommand wcm:action="add">
<Order>32</Order>
<Order>26</Order>
<CommandLine>c:\cygwin64\bin\opam pin add -k version ocaml-base-compiler VERSION</CommandLine>
<Description>Opam switch</Description>
</SynchronousCommand>
Expand Down

0 comments on commit 905c64c

Please sign in to comment.