diff options
Diffstat (limited to 'src/main/java/org/openslx/taskmanager/tasks/CompileIPxeNew.java')
-rw-r--r-- | src/main/java/org/openslx/taskmanager/tasks/CompileIPxeNew.java | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/src/main/java/org/openslx/taskmanager/tasks/CompileIPxeNew.java b/src/main/java/org/openslx/taskmanager/tasks/CompileIPxeNew.java index 575ee0a..ad921ac 100644 --- a/src/main/java/org/openslx/taskmanager/tasks/CompileIPxeNew.java +++ b/src/main/java/org/openslx/taskmanager/tasks/CompileIPxeNew.java @@ -126,12 +126,14 @@ public class CompileIPxeNew extends AbstractTask } else if (cpus > 256) { // Sanity check in case it (apparently) reports nonsense cpus = 4; } - ProcLogger pl = new ProcLogger(); - if ( 0 != Exec.syncAt( 600, pl, "/opt/openslx/ipxe/src", join( "nice", "make", "-j" + cpus, - "EMBED=../ipxelinux.ipxe", FILES_ALL ) ) ) { + // Use NO_WERROR so older commits compile on newer gcc versions + if ( 0 != Exec.syncAt( 600, new ProcLogger(), "/opt/openslx/ipxe/src", + join( "nice", "make", "-j" + cpus, "NO_WERROR=1", "CONFIG=bwlp", + "EMBED=../ipxelinux.ipxe", FILES_ALL ) ) ) { status.addError( "Compiling ipxe targets failed" ); return false; } + Exec.syncAt( 1, new ProcVersion(), "/opt/openslx/ipxe", "git", "rev-parse", "HEAD" ); // NETBOOT for ( String f : FILES_NET ) { String destName = new File( f ).getName(); @@ -193,11 +195,12 @@ public class CompileIPxeNew extends AbstractTask return r; } - class Output + static class Output { protected Map<String, Boolean> files = new ConcurrentHashMap<>( FILES_MAP ); protected final BoundedLog log = new BoundedLog( 20, true ); protected String errors = ""; + protected String hash; protected void addLog( String data ) { @@ -233,4 +236,22 @@ public class CompileIPxeNew extends AbstractTask } + class ProcVersion implements ExecCallback + { + + @Override + public void processStdOut( String line ) + { + if ( line.length() >= 40 && !line.contains( " " ) ) { + status.hash = line; + } + } + + @Override + public void processStdErr( String line ) + { + } + + } + } |