Autonomous build for bootstrap
authorMathieu <mbaudier@argeo.org>
Fri, 10 Mar 2023 09:39:21 +0000 (10:39 +0100)
committerMathieu <mbaudier@argeo.org>
Fri, 10 Mar 2023 09:39:21 +0000 (10:39 +0100)
12 files changed:
.gitmodules
bootstrap/.gitignore
bootstrap/Makefile
bootstrap/branch.mk [new file with mode: 0644]
bootstrap/configure [new file with mode: 0755]
bootstrap/debian/changelog
bootstrap/debian/control
bootstrap/debian/rules
bootstrap/debian/source/format
bootstrap/org.argeo.tp.build/Makefile
bootstrap/sdk/argeo-build [new submodule]
bootstrap/sdk/branches/unstable.bnd [new file with mode: 0644]

index 07b10cacb00393eff6d61e695fefe2acf9ab0577..2237f6cb504d0c58adaff1e99f7e9f1a8cdade37 100644 (file)
@@ -2,3 +2,7 @@
        path = sdk/argeo-build
        url = http://git.argeo.org/cc0/argeo-build.git
        branch = unstable
+[submodule "bootstrap/sdk/argeo-build"]
+       path = bootstrap/sdk/argeo-build
+       url = http://git.argeo.org/cc0/argeo-build.git
+       branch = unstable
index 9671c657c0963f6c01e04cfadf1b8834a97a13d1..9a4df6cced11fa1901a21ba3f8e17088df9dba0f 100644 (file)
@@ -1,2 +1,3 @@
 /ecj/
 /bndlib/
+/output/
index 12514c64d6c36b1666a19b22119a2d8f4309bafd..838046f44fe58cdc4f49c2a82f3854efaa61507e 100644 (file)
@@ -1,5 +1,4 @@
-include ../sdk.mk
-include ../common.mk
+-include sdk.mk
 
 ECJ_VERSION=4.26
 
@@ -31,18 +30,12 @@ $(ORIGIN_BASE)/bnd-$(BND_VERSION).tar.gz
 all: ecj-build bndlib-build    
        make -C org.argeo.tp.build all
 
-ecj: ecj-build
-
 ecj-build:
+       mkdir -p $(BOOTSTRAP_BASE)
        # list sources
-       find $(ECJ_BASE)/org | grep "\.java" > $(BOOTSTRAP_BASE)/ecj.todo
-       # copy sources
-       mkdir -p $(ECJ_SRC)
-       cp -r $(ECJ_BASE)/org $(ECJ_SRC)
+       find $(ECJ_BASE)/OSGI-OPT/src | grep "\.java" > $(BOOTSTRAP_BASE)/ecj.todo
        # build
        $(JAVA_HOME)/bin/javac -d $(ECJ_BASE) -source 17 -target 17 -Xlint:none @$(BOOTSTRAP_BASE)/ecj.todo
-       # remove sources
-       cd $(ECJ_BASE) && find . -name "*.java" -name "*.html" -type f -exec rm -f {} \;
        
 bndlib-build:
        $(JAVA_HOME)/bin/java -cp $(ECJ_BASE) org.eclipse.jdt.internal.compiler.batch.Main -nowarn \
@@ -52,11 +45,15 @@ bndlib-build:
 
 clean:
        $(RM) -rf $(BOOTSTRAP_BASE)
+       cd $(ECJ_BASE) && find . -name "*.class" -type f -exec rm -f {} \;
+       cd $(BNDLIB_BASE) && find . -name "*.class" -type f -exec rm -f {} \;
+       make -C org.argeo.tp.build clean
+
+clean-sources:
        $(RM) -rf $(ECJ_BASE)
        $(RM) -rf $(BNDLIB_BASE)
-       make -C org.argeo.tp.build clean
 
-bootstrap-prepare-source-tarball: bootstrap-download-sources
+bootstrap-prepare-sources: bootstrap-download-sources
        ## ECJ
        mkdir -p $(ECJ_BASE)
        cd $(ECJ_BASE) && jar -xf $(ORIGIN_BASE)/ecjsrc-$(ECJ_VERSION).jar
@@ -69,6 +66,13 @@ bootstrap-prepare-source-tarball: bootstrap-download-sources
        $(RM) -rf $(ECJ_BASE)/scripts
        # TODO: keep the service files
        $(RM) -rf  $(ECJ_BASE)/META-INF
+
+       # copy sources and resources
+       mkdir -p $(ECJ_SRC)
+       cp -r $(ECJ_BASE)/org $(ECJ_SRC)
+       # remove java sources
+       cd $(ECJ_BASE) && find org -name "*.java" -type f -exec rm -f {} \;
+       cd $(ECJ_BASE) && find org -name "*.html -type f -exec rm -f {} \;
        
        ## BNDLIB
        # copy sources
@@ -103,11 +107,7 @@ bootstrap-prepare-source-tarball: bootstrap-download-sources
 
        # clean up BNDLIB
        $(RM) -rf $(BNDLIB_SRC)/aQute/bnd/annotation/spi
-       $(RM) -rf $(BNDLIB_SRC)/aQute/bnd/junit
-               
-       tar -cf ../argeo-tp-build_$(ECJ_VERSION).orig.tar $(ECJ_BASE)
-       tar -rf ../argeo-tp-build_$(ECJ_VERSION).orig.tar $(BNDLIB_BASE)
-       xz -f ../argeo-tp-build_$(ECJ_VERSION).orig.tar
+       $(RM) -rf $(BNDLIB_SRC)/aQute/bnd/junit 
 
 bootstrap-download-sources: $(SOURCE_ARCHIVES)
 
diff --git a/bootstrap/branch.mk b/bootstrap/branch.mk
new file mode 100644 (file)
index 0000000..afde0f8
--- /dev/null
@@ -0,0 +1 @@
+BRANCH=unstable
\ No newline at end of file
diff --git a/bootstrap/configure b/bootstrap/configure
new file mode 100755 (executable)
index 0000000..47f7d96
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Source are located where this script is
+SDK_SRC_BASE="$(cd "$(dirname "$0")"; pwd -P)"
+
+# Source the configure script
+. $SDK_SRC_BASE/sdk/argeo-build/configure
index 83914c52f2d7119b70edec3e7c1dcecc52390147..b4409a7f510b49661d81f20a5861f8fbe0fc9179 100644 (file)
@@ -1,4 +1,4 @@
-argeo-tp-build (4.26-1) unstable; urgency=medium
+argeo-tp-build (4.26) unstable; urgency=medium
 
   * Initial release
 
index 39873ac866aeea6a0020497e2a04d737d8be70a3..b744e3d77a95fd83a0bc4d45ac157e8d51ba406a 100644 (file)
@@ -2,7 +2,7 @@ Source: argeo-tp-build
 Section: unknown
 Priority: optional
 Maintainer: Mathieu Baudier <mbaudier@argeo.org>
-Build-Depends: debhelper-compat (= 13)
+Build-Depends: debhelper-compat (= 13), openjdk-17-jdk
 Standards-Version: 4.5.1
 Rules-Requires-Root: no
 
@@ -10,4 +10,4 @@ Package: argeo-tp-build
 Architecture: all
 Depends: ${misc:Depends}
 Description: Argeo Build third party libraries
- Eclipse ECJ compiler and BND library.
\ No newline at end of file
+ Eclipse ECJ compiler and BND library.
index 2d33f6ac8992b7da84b39a5bca0742c4962d3349..2338cfd00db64553bc318478af324feb35605626 100755 (executable)
@@ -1,4 +1,6 @@
 #!/usr/bin/make -f
 
+JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
+
 %:
        dh $@
index 163aaf8d82b6c54f23c45f32895dbdfdcc27b047..89ae9db8f88b823b6a7eabf55e203658739da122 100644 (file)
@@ -1 +1 @@
-3.0 (quilt)
+3.0 (native)
index 2416d491cfbd89cdd515f55a91d1fd9168610597..65116fddf17d7396488895146482d44aaadfdde2 100644 (file)
@@ -1,21 +1,18 @@
-include ../../sdk.mk
-include ../../common.mk
-
 .PHONY: clean all osgi
 
 A2_OUTPUT := $(SDK_BUILD_BASE)/a2
 JVM ?= $(JAVA_HOME)/bin/java
 
-ARGEO_MAKE := $(JVM) -cp  $(BOOTSTRAP_BASE)/ecj:$(BOOTSTRAP_BASE)/bndlib:$(BND_CLASSPATH) $(SDK_SRC_BASE)/sdk/argeo-build/src/org/argeo/build/Make.java
+ARGEO_MAKE := $(JVM) -cp  ../ecj:../bndlib ../sdk/argeo-build/src/org/argeo/build/Make.java
 
 A2_CATEGORY = org.argeo.tp.build
 
 all: osgi
 
 osgi:
-       cp -r $(BOOTSTRAP_BASE)/ecj/OSGI-OPT/src org.eclipse.jdt.core.compiler.batch
+       cp -r ../ecj/OSGI-OPT/src org.eclipse.jdt.core.compiler.batch
        
-       cp -r $(BOOTSTRAP_BASE)/bndlib/OSGI-OPT/src biz.aQute.bndlib
+       cp -r ../bndlib/OSGI-OPT/src biz.aQute.bndlib
        cp -rv ../../rebuild/org.argeo.tp/org.argeo.ext.slf4j/src/* biz.aQute.bndlib/src
 
        $(ARGEO_MAKE) all --category $(A2_CATEGORY) --bundles org.eclipse.jdt.core.compiler.batch biz.aQute.bndlib
diff --git a/bootstrap/sdk/argeo-build b/bootstrap/sdk/argeo-build
new file mode 160000 (submodule)
index 0000000..0719a66
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 0719a66beb5a861fe351f176e3f69f385a103bc8
diff --git a/bootstrap/sdk/branches/unstable.bnd b/bootstrap/sdk/branches/unstable.bnd
new file mode 100644 (file)
index 0000000..e69de29