I agree that a Docker build is a good idea. In fact, I *thought* the project already had a Dockerfile from the release process for 1.1.0. I'm certain that at least one contributor created one, but apparently it never made the baseline. I don't recall if it was actually used to build the release. Gary was the release manager, so he is probably the person most likely to recall or to be aware of a functional Dockerfile's existence or current location.
Alex On Wed, May 18, 2022 at 2:34 PM Bernd Eckenfels <e...@zusammenkunft.net> wrote: > Hello Jochen, > > I think that’s useful with the container. I would shift it relative to the > source project, then you don’t need the wget and git clone but can use > copy;mount to provide the source from the current version. > > But that’s probably not related to the problems you encounter. > > Gruss > Bernd > > > -- > http://bernd.eckenfels.net > ________________________________ > Von: Jochen Wiedmann <jochen.wiedm...@gmail.com> > Gesendet: Wednesday, May 18, 2022 4:59:43 PM > An: Apache Commons Developers List <dev@commons.apache.org> > Betreff: [Crypto] How to build? > > Hi, > > I recently had the questionable pleasure to get in touch with Commons > Crypto, and could not build it. There are some instructions in the > BUILDING.txt file, but they aren't really helpful. In case, you don't > know: Crypto is not a simple Java library. Instead, it requires > building some shared libraries from C sources, that are being added to > the jar file. > > The main problem here: We do not have something like a fully automated > build procedure, that > > a) ensures that the requirements are met, and then > b) performs all the necessary steps for building that jar file. > > Thinking about that, I came up with the idea, that we could add a > Dockerfile to the sources, that could then be used with some simple > commands, like > > docker image build -t apache/commons-crypto:1.1.1-SNAPSHOT > docker container run --name mycrypto > apache/commons-crypto:1.1.1-SNAPSHOT > docker container cp > "mycrypto:/usr/local/build/commons-crypto/target/*.jar" . > > (Not sure, that these might actually work, Docker beginner.) > > So, I started working with the Docker file below: Unfortnately, that fails > with > > [22/23] RUN VERSION=1.1.1-SNAPSHOT > JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 make: > #26 0.624 Error: Could not find or load main class > org.apache.commons.crypto.OsInfo > #26 0.697 Error: Could not find or load main class > org.apache.commons.crypto.OsInfo > #26 0.778 Error: Could not find or load main class > org.apache.commons.crypto.OsInfo > #26 0.790 make: *** No rule to make target > > 'target/jni-classes/org_apache_commons_crypto_random_OpenSslCryptoRandomNative.h', > needed by > 'target/commons-crypto-1.1.1-SNAPSHOT--/OpenSslCryptoRandomNative.o'. > Stop. > > And that's, where I could need your help. What's wong? > > Thanks, > > Jochen > > > > FROM ubuntu:bionic-20220401 > RUN dpkg --add-architecture i386 > RUN apt update > RUN apt-get -y install gcc > RUN apt-get -y install g++ > RUN apt-get -y install make > RUN apt-get -y install wget curl > RUN apt-get -y install git > RUN apt-get -y install openjdk-8-jdk > RUN apt-get -y -oDebug::pkgAcquire::Worker=1 install openjdk-11-jdk > RUN apt-get install -y mingw-w64 > # This package is documented in BUILDING.txt, but doesn't appear to be > available. > # RUN apt-get install -y x86_64-w64-mingw32-gcc > RUN apt-get install -y gcc-mingw-w64-i686 > RUN apt-get install -y libssl-dev:i386 libssl-dev > RUN apt-get install -y g++-multilib > RUN mkdir -p /usr/local/build > WORKDIR /usr/local/build > RUN wget > https://dlcdn.apache.org/maven/maven-3/3.8.5/binaries/apache-maven-3.8.5-bin.tar.gz > RUN tar xzf apache-maven-3.8.5-bin.tar.gz > RUN ln -s ../build/apache-maven-3.8.5/bin/mvn /usr/local/bin > RUN git clone https://gitbox.apache.org/repos/asf/commons-crypto.git > commons-crypto > <https://gitbox.apache.org/repos/asf/commons-crypto.gitcommons-crypto> > WORKDIR /usr/local/build/commons-crypto > RUN VERSION=1.1.1-SNAPSHOT JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 make > RUN mvn > CMD bash > > > > > -- > Philosophy is useless, theology is worse. (Industrial Desease, Dire > Straits) > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > >