From 64b9d46792c6bcbd5222f80476838cff78b8255d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Fri, 10 Mar 2023 16:51:30 +0100 Subject: [PATCH] Move code, for consistency --- CHANGES.md | 1 + src-opam/linux.ml | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 77f14148..3c9f3fbd 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,7 @@ unreleased ---------- +- Optimize and fix Linux package install (@MisterDA #153) - Various LCU Updates (@mtelvers #144 #136 #135) - Support mounts, networks, and security parameters in RUN commands, add buildkit_syntax helper function. diff --git a/src-opam/linux.ml b/src-opam/linux.ml index 5a6218f3..48fc9cdc 100644 --- a/src-opam/linux.ml +++ b/src-opam/linux.ml @@ -39,6 +39,13 @@ module RPM = struct let groupinstall fmt = ksprintf (fun s -> run "yum groupinstall -y %s && yum clean all" s) fmt + let dev_packages ?extra () = + install + "sudo passwd bzip2 patch rsync nano gcc-c++ git tar curl xz libX11-devel \ + which m4 diffutils findutils%s" + (match extra with None -> "" | Some x -> " " ^ x) + @@ groupinstall "\"Development Tools\"" + let add_user ?uid ?gid ?(sudo = false) username = let uid = match uid with Some u -> sprintf "-u %d " u | None -> "" in let gid = match gid with Some g -> sprintf "-g %d " g | None -> "" in @@ -60,13 +67,6 @@ module RPM = struct @@ env [ ("HOME", home) ] @@ workdir "%s" home @@ run "mkdir .ssh" @@ run "chmod 700 .ssh" - let dev_packages ?extra () = - install - "sudo passwd bzip2 patch rsync nano gcc-c++ git tar curl xz libX11-devel \ - which m4 diffutils findutils%s" - (match extra with None -> "" | Some x -> " " ^ x) - @@ groupinstall "\"Development Tools\"" - let install_system_ocaml = install "ocaml ocaml-camlp4-devel ocaml-ocamldoc" end