Skip to content
Snippets Groups Projects
Verified Commit c75a5f29 authored by Louis-Philippe Véronneau's avatar Louis-Philippe Véronneau
Browse files

Vendor jruby 9.2.14.0

parent 254d790b
No related branches found
No related tags found
No related merge requests found
This package vendors jruby instead of using the Debian jruby package, because
it is currently very broken. Attemps at fixing it yielded mixed results.
This isn't ideal, but it seems the only thing that currently requires jruby in
Debian is puppetserver. Vendoring jruby will also help us use a jruby version
that matches more closely with puppetserver's.
......@@ -14,7 +14,6 @@ Build-Depends: debhelper-compat (= 13),
libprismatic-schema-clojure (>= 1.1.12),
libslingshot-clojure,
libyaml-snake-java,
jruby,
libpuppetlabs-i18n-clojure (>= 0.9.0-2),
libtrapperkeeper-clojure (>= 3.1.0) ,
libpuppetlabs-ring-middleware-clojure (>=1.3.0),
......@@ -23,6 +22,7 @@ Build-Depends: debhelper-compat (= 13),
libdynapath-clojure <!nocheck>,
libcomplete-clojure <!nocheck>,
leiningen
# jruby,
Standards-Version: 4.5.1
Vcs-Git: https://salsa.debian.org/clojure-team/jruby-utils-clojure.git
Vcs-Browser: https://salsa.debian.org/clojure-team/jruby-utils-clojure
......@@ -40,9 +40,10 @@ Depends: ${java:Depends},
libprismatic-schema-clojure,
libslingshot-clojure,
libyaml-snake-java,
jruby,
# jruby,
libpuppetlabs-i18n-clojure,
libtrapperkeeper-clojure,
libpuppetlabs-ring-middleware-clojure,
Conflicts: jruby
Recommends: ${java:Recommends}
Description: Create and interact with a pool of JRuby instances in Clojure
File added
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jruby</groupId>
<artifactId>jruby-artifacts</artifactId>
<version>9.2.14.0</version>
</parent>
<artifactId>jruby-complete</artifactId>
<packaging>bundle</packaging>
<name>JRuby Complete</name>
<properties>
<jruby.complete.home>${project.build.outputDirectory}/META-INF/jruby.home</jruby.complete.home>
<jruby.home>${basedir}/../..</jruby.home>
<main.basedir>${project.parent.parent.basedir}</main.basedir>
<polyglot.dump.pom>pom.xml</polyglot.dump.pom>
<polyglot.dump.readonly>true</polyglot.dump.readonly>
</properties>
<dependencies>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-core</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>jnr-ffi</artifactId>
<groupId>com.github.jnr</groupId>
</exclusion>
<exclusion>
<artifactId>jitescript</artifactId>
<groupId>me.qmx.jitescript</groupId>
</exclusion>
<exclusion>
<artifactId>asm</artifactId>
<groupId>org.ow2.asm</groupId>
</exclusion>
<exclusion>
<artifactId>asm-commons</artifactId>
<groupId>org.ow2.asm</groupId>
</exclusion>
<exclusion>
<artifactId>asm-tree</artifactId>
<groupId>org.ow2.asm</groupId>
</exclusion>
<exclusion>
<artifactId>asm-analysis</artifactId>
<groupId>org.ow2.asm</groupId>
</exclusion>
<exclusion>
<artifactId>asm-util</artifactId>
<groupId>org.ow2.asm</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-stdlib</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<pluginRepositories>
<pluginRepository>
<id>mavengems</id>
<url>mavengem:https://rubygems.org</url>
</pluginRepository>
</pluginRepositories>
<build>
<extensions>
<extension>
<groupId>org.torquebox.mojo</groupId>
<artifactId>mavengem-wagon</artifactId>
<version>1.0.3</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<archive>
<manifest>
<mainClass>org.jruby.Main</mainClass>
</manifest>
<manifestEntries>
<Automatic-Module-Name>org.jruby.complete</Automatic-Module-Name>
</manifestEntries>
</archive>
<instructions>
<Export-Package>org.jruby.*;version=${project.version}</Export-Package>
<Import-Package>!org.jruby.*, *;resolution:=optional</Import-Package>
<DynamicImport-Package>javax.*</DynamicImport-Package>
<Private-Package>*,.</Private-Package>
<Bundle-Name>JRuby ${project.version}</Bundle-Name>
<Bundle-Description>JRuby ${project.version} OSGi bundle</Bundle-Description>
<Bundle-SymbolicName>org.jruby.jruby</Bundle-SymbolicName>
<Embed-Dependency>*;type=jar;scope=provided;inline=true;artifactId=!jnr-ffi|me.qmx.jitescript:jitescript</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>truezip-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>remove</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>${build.directory}/${project.artifactId}-${project.version}.jar</directory>
<includes>
<include>module-info.class</include>
</includes>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<skipSource>true</skipSource>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>clean-extra-osgi-ITs</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/src/it</directory>
<includes>
<include>osgi*/**</include>
</includes>
</fileset>
</filesets>
<failOnError>false</failOnError>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.ju-n.maven.plugins</groupId>
<artifactId>checksum-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>io.takari.polyglot</groupId>
<artifactId>polyglot-maven-plugin</artifactId>
<version>0.3.1</version>
<executions>
<execution>
<id>setup other osgi frameworks</id>
<phase>pre-integration-test</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<taskId>setup other osgi frameworks</taskId>
<nativePom>pom.rb</nativePom>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>io.takari.polyglot</groupId>
<artifactId>polyglot-ruby</artifactId>
<version>0.3.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>sonatype-oss-release</id>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy javadocs and sources from jruby-core</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>jruby-core</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>jruby-core</artifactId>
<version>${project.version}</version>
<classifier>javadoc</classifier>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/jruby-core-${project.version}-sources.jar</file>
<classifier>sources</classifier>
</artifact>
<artifact>
<file>${project.build.directory}/jruby-core-${project.version}-javadoc.jar</file>
<classifier>javadoc</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
<execution>
<id>attach-checksums</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/jruby-complete-${project.version}.jar.sha256</file>
<type>jar.sha256</type>
</artifact>
<artifact>
<file>${project.build.directory}/jruby-complete-${project.version}.jar.sha512</file>
<type>jar.sha512</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>snapshots</id>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy javadocs and sources from jruby-core</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>jruby-core</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>jruby-core</artifactId>
<version>${project.version}</version>
<classifier>javadoc</classifier>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/jruby-core-${project.version}-sources.jar</file>
<classifier>sources</classifier>
</artifact>
<artifact>
<file>${project.build.directory}/jruby-core-${project.version}-javadoc.jar</file>
<classifier>javadoc</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
<execution>
<id>attach-checksums</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/jruby-complete-${project.version}.jar.sha256</file>
<type>jar.sha256</type>
</artifact>
<artifact>
<file>${project.build.directory}/jruby-complete-${project.version}.jar.sha512</file>
<type>jar.sha512</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jdk8</id>
<activation>
<jdk>1.8</jdk>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<configuration>
<pomExcludes>
<pomExclude>osgi_many_bundles_with_embedded_gems_felix-3.2/pom.xml</pomExclude>
<pomExclude>${its.j2ee}</pomExclude>
<pomExclude>${its.osgi}</pomExclude>
</pomExcludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
We're vendoring jruby, but we don't want to vendor all the other jruby-utils
dependencies in our final uberjar. By using the :provided profile we're able to
trick "lein uberjar" into vendoring only the libs we want.
Index: jruby-utils-clojure/project.clj
===================================================================
--- jruby-utils-clojure.orig/project.clj
+++ jruby-utils-clojure/project.clj
@@ -11,27 +11,6 @@
:java-source-paths ["src/java"]
:test-paths ["test/unit" "test/integration"]
- :dependencies [[org.clojure/clojure "1.10.x"]
- [org.clojure/java.jmx "debian"]
- [org.clojure/tools.logging "debian"]
-
- [clj-commons/fs "debian"]
- [prismatic/schema "debian"]
- [slingshot "debian"]
-
- [org.yaml/snakeyaml "1.x"]
- [com.fasterxml.jackson.core/jackson-core "2.x"]
- [com.fasterxml.jackson.dataformat/jackson-dataformat-smile "2.x"]
- [com.fasterxml.jackson.dataformat/jackson-dataformat-cbor "2.x"]
-
- [org.jruby/jruby-core "debian"]
- [org.jruby/jruby-stdlib "debian"]
-
- [puppetlabs/i18n "debian"]
- [puppetlabs/kitchensink "debian"]
- [puppetlabs/trapperkeeper "debian"]
- [puppetlabs/ring-middleware "debian"]]
-
:deploy-repositories [["releases" {:url "https://clojars.org/repo"
:username :env/clojars_jenkins_username
:password :env/clojars_jenkins_password
@@ -43,13 +22,35 @@
;; code that we have.
:classifiers [["test" :testutils]]
- :profiles {:dev {:dependencies [[puppetlabs/kitchensink "debian" :classifier "test" :scope "test"]
- [puppetlabs/trapperkeeper "debian" :classifier "test" :scope "test"]
- [org.bouncycastle/bcpkix "debian"]
- [org.tcrawley/dynapath "debian"]]
- :jvm-opts ["-Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"
+ :profiles {:dev {:jvm-opts ["-Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"
"-Xms1G"
"-Xmx2G"]}
+ :provided {:dependencies [[org.clojure/clojure "1.10.x"]
+ [org.clojure/java.jmx "debian"]
+ [org.clojure/tools.logging "debian"]
+
+ [clj-commons/fs "debian"]
+ [prismatic/schema "debian"]
+ [slingshot "debian"]
+
+ [org.jruby/jruby-complete "debian"]
+
+ [org.yaml/snakeyaml "1.x"]
+ [com.fasterxml.jackson.core/jackson-core "2.x"]
+ [com.fasterxml.jackson.dataformat/jackson-dataformat-smile "2.x"]
+ [com.fasterxml.jackson.dataformat/jackson-dataformat-cbor "2.x"]
+
+ [puppetlabs/i18n "debian"]
+ [puppetlabs/kitchensink "debian"]
+ [puppetlabs/trapperkeeper "debian"]
+ [puppetlabs/ring-middleware "debian"]
+
+ ; Deps for the testsuite
+ [puppetlabs/kitchensink "debian" :classifier "test" :scope "test"]
+ [puppetlabs/trapperkeeper "debian" :classifier "test" :scope "test"]
+ [org.bouncycastle/bcpkix "debian"]
+ [org.tcrawley/dynapath "debian"]]}
+ :uberjar {:dependencies [[org.jruby/jruby-complete "debian"]]}
:testutils {:source-paths ^:replace ["test/unit" "test/integration"]}}
:plugins [[puppetlabs/i18n "debian" :hooks false :exclusions [[org.clojure/clojure]
0001_Lein_Local.patch
0002_Vendor_Jruby_Uberjar.patch
......@@ -11,13 +11,19 @@ NAME=jruby-utils
dh $@ --with javahelper --with maven_repo_helper
override_dh_auto_configure:
cd debian && ln -sf /usr/share/maven-repo .
cd debian && cp -LR /usr/share/maven-repo .
# Vendor jruby
mkdir -p debian/maven-repo/org/jruby/jruby-complete/debian/
for ext in jar pom; do \
cp debian/missing-sources/jruby-complete-9.2.14.0.jar \
debian/maven-repo/org/jruby/jruby-complete/debian/jruby-complete-debian.$$ext ; \
done
override_dh_auto_build:
lein pom debian/pom.xml
lein jar
lein uberjar
# symlinks so we don't need a version in debian/*.poms
cd target && ln -sf $(NAME)-$(DEB_VERSION_UPSTREAM).jar $(NAME).jar
cd target && ln -sf $(NAME)-$(DEB_VERSION_UPSTREAM)-standalone.jar $(NAME).jar
cd target/test && ln -sf $(NAME)-$(DEB_VERSION_UPSTREAM)-test.jar $(NAME)-test.jar
override_dh_auto_test:
......
debian/missing-sources/jruby-complete-9.2.14.0.jar
debian/missing-sources/jruby-complete-9.2.14.0.pom
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment