diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e4e766e --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/*.png +/rpms/ diff --git a/clone_rpms.sh b/clone_rpms.sh new file mode 100755 index 0000000..e01107d --- /dev/null +++ b/clone_rpms.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +mkdir -p rpms +pushd rpms 2>&1 >/dev/null + +for pkg in $(grep -B1 --no-group-separator buildorder ../tycho.yaml | grep -v buildorder | sed -e 's/:$//') ; do + if [ ! -d "$pkg" ] ; then + fedpkg clone $pkg + (cd $pkg && fedpkg switch-branch f30 && fedpkg switch-branch master && fedpkg switch-branch tycho) + fi +done + +popd 2>&1 >/dev/null diff --git a/gen_build_order_graph.py b/gen_build_order_graph.py new file mode 100755 index 0000000..01dbab7 --- /dev/null +++ b/gen_build_order_graph.py @@ -0,0 +1,54 @@ +#!/usr/bin/python3 + +import yaml +from pygraphviz import AGraph +from subprocess import call + +with open("tycho.yaml", 'r') as stream: + yaml = yaml.safe_load(stream) + +rpms = yaml['data']['components']['rpms'] + +g = AGraph(directed=True, name="G", strict=False, label="Build Order Graph") +ranks = [] +for key, value in rpms.items(): + rank = value['buildorder'] + if rank not in ranks: + ranks.append(rank) + subg = g.get_subgraph(f"{rank}") + if subg is None: + subg = g.add_subgraph(name=f"{rank}", label=f"Build Order {rank}", rank="same") + subg.add_node(f"{rank}") + subg.add_node(key) + rs = value['rationale'].replace('\n', ' ').split('.') + reqs = [] + breqs = [] + for r in rs: + r = r.strip() + if not r or r == 'Module API': + continue + if r.startswith('Runtime dependency of'): + r = r[len('Runtime dependency of'):] + reqs = [x.strip() for x in r.split(',')] + if r.startswith('Build dependency of'): + r = r[len('Build dependency of'):] + breqs = [x.strip() for x in r.split(',')] + for req in reqs: + # For Rs, check if also a BR + if req not in breqs: + g.add_edge(key, req, color='blue') + else: + g.add_edge(key, req, color='purple') + for breq in breqs: + # For BRs, check if also a R + if breq not in reqs: + g.add_edge(key, breq, color='red') +ranks.sort() +for idx, rank in enumerate(ranks): + if idx+1 < len(ranks): + g.add_edge(rank, ranks[idx+1], weight=1000) + + +print(g.string()) +g.draw("build_order_graph.png", prog="dot") +call('eog build_order_graph.png &', shell=True) diff --git a/koschei.cfg b/koschei.cfg new file mode 100644 index 0000000..67385de --- /dev/null +++ b/koschei.cfg @@ -0,0 +1,254 @@ +# -*- python -*- +# vim: ft=python +config = { + "buildrequires": [ + "javapackages-tools", + "platform", + ], + "requires": [ + "javapackages-tools", + "platform", + ], + + "bootstrap": False, + "full_refs": False, + "default_ref": "tycho", + "include_build_deps": True, + "closure": False, + "filter_unused": False, + "topo_sort": True, + + "api": [ + "tycho", + "tycho-extras", + "cbi-plugins", + "takari-tycho-support", + ], + "profiles": { + "default": [ + "tycho", + "tycho-extras", + ], + }, + "filter": [ + ], + "includes": [ + ], + "excludes": [ + # Additional Runtime Exclusions + "apache-commons-configuration", + "avalon-framework", + "avalon-logkit", + "dain-snappy", + "extra166y", + "fop", + "gpars", + "groovy", + "jcsp", + "maven-javadoc-plugin", + "multiverse", + "netty-tcnative", + "netty3", + "parboiled", + "pdfbox", + "pegdown", + "xstream", + # Additional Buildtime Exclusions + "aalto-xml", + "aesh", + "antlr3", + "antlr32", + "apacheds", + "apache-commons-dbcp", + "apache-commons-pool", + "avro", + "bookkeeper", + "buildnumber-maven-plugin", + "byte-buddy", + "bytelist", + "classmate", + "curator", + "eclipselink-persistence-api", + "ehcache-core", + "fastutil", + "felix-bundlerepository", + "geronimo-validation", + "geronimo-interceptor", + "gnu-getopt", + "guava", + "hadoop", + "hibernate3", + "hibernate-jpa-2.0-api", + "hibernate-validator", + "hppc", + "jackson", + "jboss-annotations-1.2-api", + "jboss-classfilewriter", + "jboss-ejb-3.2-api", + "jboss-el-3.0-api", + "jboss-logging", + "jboss-logging-tools", + "jboss-marshalling", + "jboss-remoting", + "jboss-remoting-jmx", + "jboss-sasl", + "jboss-transaction-1.1-api", + "jcodings", + "jctools", + "jdeparser", + "jersey1", + "jets3t", + "jffi", + "jgroups", + "jna", + "jnr-constants", + "jnr-enxio", + "jnr-ffi", + "jnr-netdb", + "jnr-posix", + "jnr-x86asm", + "joda-time", + "jsr-311", + "kohsuke-pom", + "leveldb-java", + "leveldbjni", + "log4j", + "maven-mapping", + "metrics", + "mx4j", + "netty", + "objectweb-asm3", + "protobuf", + "protoparser", + "resteasy", + "rhino", + "scala", + "snappy-java", + "stax2-api", + "stream-lib", + "stringtemplate", + "stringtemplate4", + "wildfly-common", + "xnio", + # eclipse (without contributor_tools and tests) + "apache-commons-fileupload", + "eclipse-egit", + # eclipse-ecf (without providers) + "dnsjava", + "irclib", + # batik (jp_minimal) + "jython", + # mustache-java (jp_minimal) + "jackson-dataformats-text", + "cli-parser", + # tesla-polyglot (jp_minimal) + "mvn(org.codehaus.gmavenplus:gmavenplus-plugin)", + "mvn(org.codehaus.groovy:groovy)", + "snakeyaml", + "base64coder", + # lucene (jp_minimal) + "antlr4", + "morfologik-stemming", + "nekohtml", + "randomizedtesting", + "spatial4j", + # jetty (jp_minimal) + "geronimo-jaspic-spec", + "glassfish-transaction-api", + "glassfish-websocket-api", + "infinispan", + "jboss-websocket-1.0-api", + "jetty-alpn", + "jetty-alpn-api", + "jetty-artifact-remote-resources", + "jetty-assembly-descriptors", + "jetty-distribution-remote-resources", + "jetty-parent", + "jetty-schemas", + "jetty-test-helper", + "jetty-test-policy", + "jetty-toolchain", + "jnr-unixsocket", + "maven-war-plugin", + "mongo-java-driver", + "protostream", + "springframework", + "tomcat", + "tomcat-taglibs-standard", + "weld-api", + "weld-core", + ], + "module_excludes": { + ("javapackages-tools", "201801"), + }, + "frozen_refs": [ + ], + "stream_override": { + "javapackages-tools": { + "1.3": "[201801]", + }, + "platform": { + "1.3": "[f31]", + }, + }, + + "macros": { + "_with_bootstrap": 1, + "_with_jp_minimal": 1, + }, + + "summary": "Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven", + "description": """\ + Tycho is a set of Maven plugins and extensions for building Eclipse plugins and + OSGI bundles with Maven. Eclipse plugins and OSGI bundles have their own metadata + for expressing dependencies, source folder locations, etc. that are normally found + in a Maven POM. Tycho uses native metadata for Eclipse plugins and OSGi bundles + and uses the POM to configure and drive the build. Tycho supports bundles, fragments, + features, update site projects and RCP applications. Tycho also knows how to run + JUnit test plugins using OSGi runtime and there is also support for sharing build + results using Maven artifact repositories. + + Tycho plugins introduce new packaging types and the corresponding lifecycle bindings + that allow Maven to use OSGi and Eclipse metadata during a Maven build. OSGi rules + are used to resolve project dependencies and package visibility restrictions are + honored by the OSGi-aware JDT-based compiler plugin. Tycho will use OSGi metadata + and OSGi rules to calculate project dependencies dynamically and injects them + into the Maven project model at build time. Tycho supports all attributes supported + by the Eclipse OSGi resolver (Require-Bundle, Import-Package, Eclipse-GenericRequire, + etc). Tycho will use proper classpath access rules during compilation. Tycho supports + all project types supported by PDE and will use PDE/JDT project metadata where + possible. One important design goal in Tycho is to make sure there is no duplication + of metadata between POM and OSGi metadata. + """, + + "koji_config": { + "server": "https://koji.fedoraproject.org/kojihub", + "topurl": "https://kojipkgs.fedoraproject.org/", + "multicall_chunk_size": 1000, + "tag_name": "f30-build", + }, + "dependency": { + "repo_arch": "x86_64", + "resolve_for_arch": "x86_64", + "ignore_weak_deps": True, + "cache_l2_capacity": 2, + }, + "directories": { + "cachedir": "/tmp/maven-modulemd-gen", + }, + "logging": { + "version": 1, + "loggers": { + "": { + "level": "INFO", + "handlers": ["stderr"], + }, + }, + "handlers": { + "stderr": { + "class": "logging.StreamHandler", + "stream": "ext://sys.stderr" + }, + }, + }, +} diff --git a/tycho.yaml b/tycho.yaml new file mode 100644 index 0000000..dc2602d --- /dev/null +++ b/tycho.yaml @@ -0,0 +1,373 @@ +--- +document: modulemd +version: 2 +data: + summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven + description: >- + Tycho is a set of Maven plugins and extensions for building Eclipse plugins and + OSGI bundles with Maven. Eclipse plugins and OSGI bundles have their own metadata + for expressing dependencies, source folder locations, etc. that are normally found + in a Maven POM. Tycho uses native metadata for Eclipse plugins and OSGi bundles + and uses the POM to configure and drive the build. Tycho supports bundles, fragments, + features, update site projects and RCP applications. Tycho also knows how to run + JUnit test plugins using OSGi runtime and there is also support for sharing build + results using Maven artifact repositories. + + Tycho plugins introduce new packaging types and the corresponding lifecycle bindings + that allow Maven to use OSGi and Eclipse metadata during a Maven build. OSGi rules + are used to resolve project dependencies and package visibility restrictions are + honored by the OSGi-aware JDT-based compiler plugin. Tycho will use OSGi metadata + and OSGi rules to calculate project dependencies dynamically and injects them + into the Maven project model at build time. Tycho supports all attributes supported + by the Eclipse OSGi resolver (Require-Bundle, Import-Package, Eclipse-GenericRequire, + etc). Tycho will use proper classpath access rules during compilation. Tycho supports + all project types supported by PDE and will use PDE/JDT project metadata where + possible. One important design goal in Tycho is to make sure there is no duplication + of metadata between POM and OSGi metadata. + license: + module: + - MIT + dependencies: + - buildrequires: + javapackages-tools: [201801] + platform: [] + requires: + javapackages-tools: [201801] + platform: [] + profiles: + default: + rpms: + - tycho + - tycho-extras + api: + rpms: + - cbi-plugins + - tycho + - tycho-extras + - takari-tycho-support + buildopts: + rpms: + macros: | + %_with_bootstrap 1 + %_with_jp_minimal 1 + %_without_contrib_tools 1 + components: + rpms: + apache-commons-el: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of eclipse. + Build dependency of eclipse. + auto: + buildorder: 20 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of cbi-plugins. + Build dependency of cbi-plugins. + batik: + buildorder: 20 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of eclipse, tycho. + Build dependency of eclipse, tycho. + cbi-plugins: + buildorder: 50 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Module API. + Build dependency of eclipse. + decentxml: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of cbi-plugins, tycho. + Build dependency of cbi-plugins, tycho. + ecj: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of takari-lifecycle, tycho. + Build dependency of glassfish-jsp, tycho. + eclipse: + buildorder: 80 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of takari-lifecycle. + Build dependency of takari-lifecycle. + eclipse-ecf: + buildorder: 70 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of eclipse. + Build dependency of eclipse. + eclipse-emf: + buildorder: 60 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of eclipse. + Build dependency of eclipse, eclipse-ecf. + eclipse-license: + buildorder: 50 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Build dependency of eclipse, eclipse-ecf. + eclipse-m2e-workspace: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of takari-lifecycle, + takari-plugin-testing. + Build dependency of takari-lifecycle, + takari-plugin-testing. + fasterxml-oss-parent: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of jackson-parent. + Build dependency of jackson-parent. + felix-gogo-command: + buildorder: 30 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of eclipse. + Build dependency of eclipse. + felix-gogo-parent: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Build dependency of felix-gogo-command, + felix-gogo-runtime, felix-gogo-shell. + felix-gogo-runtime: + buildorder: 20 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of eclipse, felix-gogo-command, + felix-gogo-shell. + Build dependency of eclipse, felix-gogo-command, + felix-gogo-shell, felix-scr. + felix-gogo-shell: + buildorder: 30 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of eclipse. + Build dependency of eclipse. + felix-scr: + buildorder: 30 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of eclipse, tycho. + Build dependency of eclipse, tycho. + glassfish-jsp: + buildorder: 20 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of eclipse, tycho. + Build dependency of eclipse, tycho. + google-gson: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of eclipse, takari-lifecycle. + Build dependency of eclipse, takari-lifecycle. + icu4j: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of eclipse, tycho. + Build dependency of eclipse, tycho. + jackson-annotations: + buildorder: 30 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of jackson-databind. + Build dependency of jackson-databind. + jackson-bom: + buildorder: 30 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Build dependency of jackson-core, jackson-databind. + jackson-core: + buildorder: 40 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of jackson-databind, mustache-java. + Build dependency of jackson-databind, mustache-java. + jackson-databind: + buildorder: 50 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of mustache-java. + Build dependency of mustache-java. + jackson-parent: + buildorder: 20 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of jackson-bom. + Build dependency of jackson-annotations, jackson-bom. + javapoet: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of auto, takari-incrementalbuild. + Build dependency of auto, takari-incrementalbuild, + takari-lifecycle. + jetty: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of eclipse. + Build dependency of eclipse. + kxml: + buildorder: 20 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of felix-scr. + Build dependency of felix-scr. + lucene: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of eclipse. + Build dependency of eclipse. + mustache-java: + buildorder: 60 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of takari-lifecycle. + Build dependency of takari-lifecycle. + replacer: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Build dependency of jackson-core, jackson-databind. + sac: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of eclipse, tycho. + Build dependency of eclipse, tycho. + sat4j: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of eclipse, tycho. + Build dependency of eclipse, tycho. + takari-archiver: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of takari-lifecycle. + Build dependency of takari-lifecycle. + takari-incrementalbuild: + buildorder: 20 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of takari-lifecycle. + Build dependency of takari-lifecycle. + takari-lifecycle: + buildorder: 90 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of takari-pom. + Build dependency of takari-pom. + takari-plugin-testing: + buildorder: 20 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Build dependency of takari-lifecycle. + takari-pom: + buildorder: 100 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of takari-tycho-support. + Build dependency of takari-tycho-support. + takari-tycho-support: + buildorder: 110 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Module API. + tesla-polyglot: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of tycho-extras. + Build dependency of tycho-extras. + tycho: + buildorder: 40 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Module API. + Runtime dependency of cbi-plugins, + takari-tycho-support, tycho-extras. + Build dependency of cbi-plugins, eclipse, eclipse-ecf, + eclipse-emf, eclipse-license, takari-tycho-support, + tycho-extras. + tycho-extras: + buildorder: 50 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Module API. + Build dependency of eclipse, eclipse-ecf, eclipse-emf. + xml-maven-plugin: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Build dependency of eclipse. + xmlgraphics-commons: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of batik. + Build dependency of batik. + xpp3: + buildorder: 10 + ref: tycho + arches: [x86_64, ppc64le, aarch64, s390x] + rationale: > + Runtime dependency of felix-scr, kxml. + Build dependency of eclipse-ecf, felix-scr, kxml.