-
Notifications
You must be signed in to change notification settings - Fork 823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate Maven -> Gradle #1440
Comments
@praiskup , do you know if Gradle is an option for Fedora packaging? |
Unfortunately I don't know. Is there any package you know of that should be in fedora (some core stuff) which is using gradle? FWIW, from Fedora perspective I don't really understand what is the parent-poms for. :-) |
@kubco2, any idea? (FTR: Jakub is going to be the main package maintainer for postgresql-jdbc RPM package, I'll stay to help a bit as a co-maintainer). |
No-one knows :-) With Gradle all the code could be co-located in a single repository which would be easier to follow. |
What would happen if parent-poms were in the pgjdbc/pgjdbc.git? |
Technically speaking in Maven it has to be two distinct mvn calls. |
I suspect that we'll have to adapt somehow if upstream feels it's necessary; I have found other packages depending on Note only that Fedora does offline builds, only against Fedora RPMs and nothing else. So any additional build dependency might hurt (and not only Fedora, I've seen that other distributions were able to adapt and package new pgjdbc versions as well). |
I looked at the Gradle in Fedora and it is on the list of orphaned packages, it may be retired soon. I do not think it is good move in case of fedora packaging. |
Dave Cramer
On Mon, 18 Mar 2019 at 10:04, Jakub Janco ***@***.***> wrote:
I looked at the Gradle in Fedora and it is on the list of orphaned
packages, it may be retired soon. I do not think it is good move in case of
fedora packaging.
Wow, really ? If anything it should be maven that should be on that list.
… —
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1440 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAYz9he2pHSrSZF6XUaJhu3DUF1BvuQuks5vX5z-gaJpZM4bz7N->
.
|
It rather seems that some people think that java should live in module only ... shrug. That said, doubt it will disappear from Fedora entirely, but it will live on a slightly different place. |
there are ways to pull it in using sdkman when you build |
I guess you mean bundling, which is possible in Fedora (though ugly) ... However, what is difficult in Fedora is a way more difficult in RHEL (moving to gradle would probably mean that we wont be able to get updated pgjdbc to RHEL 8). |
I noticed this thread by accident (fedora is dropping gradle support): |
So do you need to actually build gradle to be able to build packages ? I
suspect the answer to this question is yes, but I have to ask
My sense is that more people are moving to gradle from maven than the other
way around.
Certainly the open CVE's are disturbing though.
Dave Cramer
…On Wed, 18 Sep 2019 at 06:44, Pavel Raiskup ***@***.***> wrote:
I noticed this thread by accident (fedora is dropping gradle support):
***@***.***/thread/BMJXGWKXXFOOBQON3XFYPFBOWEZMAKKU/#2OBMVCMHZEFEYRFG4XS3YFSF23ENGXNC
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1440?email_source=notifications&email_token=AADDH5UETY5RABE3QXY6AATQKIA7ZA5CNFSM4G6PWN7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD67UNWI#issuecomment-532629209>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADDH5XWZDOTICUXSQTRNVTQKIA7ZANCNFSM4G6PWN7A>
.
|
Probably (I haven't played with gradle so far, and I don't think I'll have to Just pinging @odubaj (current Fedora maintainer), because @kubco2 left |
This will probably sound ignorant as I don't know anything about Fedora / CentOS / RHEL packaging, but can the problem be reasonably solved using Gradle Wrapper scripts? You basically only need the correct JDK to be installed for the build. Wrapper can be instructed to "download" the full Gradle binary from a local file AFAIK, so all you need is the dependencies for the project, if any (haven't looked at the POM, too much XML 😛). I rarely see a Bamboo or Jenkins CI server that has the latest (or any) Gradle version I would like to use when building applications, but the problem can be easily overcome with using wrapper. |
If RHEL packaging is OK with using this method then that would be great.
Many distros want to build everything they use from source.
Dave Cramer
…On Thu, 19 Sep 2019 at 14:13, Igor Volkov ***@***.***> wrote:
This will probably sound ignorant as I don't know anything about Fedora /
CentOS / RHEL packaging, but can the problem be reasonably solved using Gradle
Wrapper
<https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:using_wrapper>
scripts?
You basically only need the correct JDK to be installed for the build.
Wrapper can be instructed to "download" the full Gradle binary from a local
file AFAIK, so all you need is the dependencies for the project, if any
(haven't looked at the POM, too much XML 😛).
I rarely see a Bamboo or Jenkins CI server that has the latest (or any)
Gradle version I would like to use when building applications, but the
problem is easily overcome with using wrapper.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1440?email_source=notifications&email_token=AADDH5QXRG7FJHJX4WS3LTLQKO6NZA5CNFSM4G6PWN7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7ELOTA#issuecomment-533247820>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADDH5R7O7QTVMWRGDGTEQ3QKO6NZANCNFSM4G6PWN7A>
.
|
The whole thing is funny and not that funny at the same time. For instance, JUnit 5 is built with Gradle: https://github.com/junit-team/junit5 Note: the pom files do not have entries that are related to the build steps. They contain just dependencies. Then there's a Fedora package for junit5: https://src.fedoraproject.org/rpms/junit5/blob/master/f/junit5.spec I see two cases for a build system:
A bit of the fun is their compiler/environment/build process might have issues, so the produced binary might turn out to be ill. Even though current Gradle builds from the source (of course it requires some Gradle version, so there's bootstrapping problem, however it is the same for GCC), it does pull a lot of dependencies. That means Fedora would have to build those dependencies from the source as well, and update when CVEs are discovered. "Supporting Gradle package" might indeed sound non-trivial taking into the account that Gradle is not used a lot for package builds. However, here I just guess, and I don't know the true effort it requires to build Gradle in Fedora-like env. So. What should we do about it? I guess we do the following:
Note: I do not think there's a rule that the source code must always come from Note: "keeping Git for developers only, and releasing software with source archives" is a well-established practice at the Apache Software Foundation. I don't want to invest much into the support of two build systems at the same time (e.g. "Gradle for development" + "Ant/Maven for packagers"), however it won't probably take us much to produce a "source release" that is buildable with more-or-less trivial However, I would start with |
Well, I'd suggest to not move to gradle and stay on maven, and try to There was a several-years window when distributions were not able to build I'm not an expert on java topics; and unfortunately I'm not able to spend |
On Fri, 20 Sep 2019 at 09:22, Pavel Raiskup ***@***.***> wrote:
Well, I'd suggest to not move to gradle and stay on maven, and try to
avoid the parent-pom dance while staying with maven (if other projects
can?). Especially if that's the only motivation here.
There was a several-years window when distributions were not able to build
new version of pgjdbc, and it changed after the Fedora efforts... now the
pgjdbc module shipped in distros is mostly up2date). Testsuite can be run
just fine, and I was glad it's all in a very good shape. It would be
certainly regression from distro POV.
I'm not an expert on java topics; and unfortunately I'm not able to spend
too much time on pgjdbc packaging anymore. So I form this as a wish.
In light of this who would be able to do packaging for pgjdbc if not you ?
Dave
… |
@pkubatrh, @hhorak, @odubaj, @UncleAlbie and @ljavorsk. |
Isn't a source JAR basically a source release?
From what I can see JUnit5 has a rather complex build. I wouldn't be surprised if they couldn't maintain both Maven and Gradle if they wanted to - "too much" build logic done in Gradle, some plugins may be either missing in Maven or have different API. So they basically applied |
No, it is not. |
@odubaj and @UncleAlbie should take care of pgjdbc in Fedora in the future, they've joined this "Java business" pretty recently, so this will be an interesting start for them. For Gradle Wrapper, it was not mentioned here explicitly, but since that tool downloads the gradle if not present, it does not help at all in Fedora, we're simply required to build all packages from source in Fedora (no downloading possible during build). @vlsi, a question for the idea with the "source release" -- do I understand correctly that the ant/maven build scripts/config would be maintained in parallel to the gradle build config? |
I don't really know the complexity, however I don't want to maintain the two sets of the build scripts. I see there might be "really crazy" move where we build pgjdbc.jar with Gradle, then we extract relevant It is not like "Gradle would make things 42 times simpler for pgjdbc", however Apache Maven does have limitations in terms of "making pgjdbc releases for multiple Java versions at the same time". Typical source releases in Apache include the original build scripts. A site question would be "what if pgjdbc wants to add Kotlin as a dependency?" |
Just in case, Bazel package is built in COPR out of 250MiB archive that contains all the jar dependencies included (see https://copr-dist-git.fedorainfracloud.org/cgit/vbatts/bazel/bazel.git/ ) It basically takes bazel-0.29.1-dist.zip from https://github.com/bazelbuild/bazel/releases and "builds" it. What if we just bundle Gradle for the build purposes? (just kidding) |
@odubaj, @UncleAlbie can you please have a look at So far copr build is working. Can you please verify if the resulting artifacts work at all for Fedora's purposes, and can you please verify if The idea is that upstream (pgjdbc) generates an archive like
There's an alternative way which might be something like is used for junit5 Frankly speaking, I love neither of those options. In |
Can you please describe the option using reduced-pom.xml in more detail? Are there any other disadvantages than maintaining another pom.xml? I understand that the package will use -src.tar.gz with reduced tests and other things, which I would say might not disturb us much (I am not expert in these technologies, there might be some issues I do not know), if compatibility to previous versions will be held. In addintion, why is the reduced -src.tar.gz available on new url (https://repo1.maven.org/maven2/org/postgresql/postgresql/%{version}/postgresql-%{version}-src.tar.gz) ? From my point of view, the option where developer or maintainer cannot debug or analyze some problems is dangerous. If problems occur, it can be very disturbing for boths sides. We can talk more about this option, but the package must be debbugable by both sides... |
Technically speaking, the binary will be different, and it might easily fail to work.
E.g. Gradle-based build is reproducible, while Maven-based is not. |
On Mon, 10 Aug 2020 at 07:47, Christoph Berg ***@***.***> wrote:
No change unfortunately:
+ echo 'SELECT 3*3*17*17*379721;'
+ sqlline -u 'jdbc:postgresql://localhost:5433/postgres?user=cbe&password=cdb36f45e489f6d7f7d477bec7fc09e0'
[warning] /usr/bin/sqlline: Unable to locate mariadb-java-client in /usr/share/java
[warning] /usr/bin/sqlline: Unable to locate hsqldb in /usr/share/java
[warning] /usr/bin/sqlline: Unable to locate jtds in /usr/share/java
Connecting to jdbc:postgresql://localhost:5433/postgres?user=cbe&password=cdb36f45e489f6d7f7d477bec7fc09e0
com/ongres/scram/common/stringprep/StringPreparation
sqlline version 1.0.2 by Marc Prud'hommeaux
0: jdbc:postgresql://localhost:5433/postgres> SELECT 3*3*17*17*379721;
No current connection
0: jdbc:postgresql://localhost:5433/postgres> Connection is already closed.
—
Strangely I don't see this on github.
Also I can't see what the error is here ?
Dave Cramer
… |
Sorry about the last comment (now deleted), I didn't realize I have two checkouts of pgjdbc on this machine and used the wrong one. Scram does get bundled correctly now. (There are still some problems with building on older Debians but that's a different issue I think.) |
Thanks for the clarification! |
@davecramer: The error was that the query shown didn't get executed and it printed some internal "StringPreparation" instead. The test script used is https://salsa.debian.org/java-team/libpostgresql-jdbc-java/-/blob/master/debian/tests/sqlline |
@df7cb , can you please clarify if the error still appears if you use the latest pgjdbc? |
@vlsi: Everything works fine now with the 42.2.15 tarball. Thanks! |
Hi, Can you please fix the tarball, and put everthing under the root directory? Currently it is: pgjdbc-REL42.2.15/postgresql-42.2.15-jdbc-src/ Also, can you please fix the tarball name? It used to be: postgresql-jdbc-42.2.14.src.tar.gz but now it is: Thanks! |
Also, packages are lagging way behind. Any chance you can release .15 soon? |
Do you suggest we should drop
AFAIK the previous name was That is why we added We do not really want to use a new artifact name for |
@devrimgunduz , @df7cb we can release 42.2.15 as soon as you confirm |
As said above, 4.2.15 works for me. Thanks! |
I still don't like the tarball name. I respect Maven requirements, but I can also please get along with the others? Thanks. |
(Debian renames the tarballs anyway to |
To my best knowledge, I can't make Maven file to be like So the only option left is to publish The current Just in case if you missed: if we release https://oss.sonatype.org/content/repositories/orgpostgresql-1240/org/postgresql/postgresql/42.2.15/ , then the release file would be byte-by-byte the same thing as you just saw. |
Testing what? We are talking about the same tarball, with just a different name. "postgresql"-version is a broken naming, sorry. |
Testing release candidates.
Don't get me wrong. I think it is wrong naming event for Java clients, as they have something like |
Hi, due to missing gradle in Fedora, I am forced to use maven for building this project. I am also experiencing some dependency problems. For example missing "Checker Framework" and many other (hopefully solvable) problems. Any suggestions, how to resolve at least the problem with checker framework ? |
@odubaj , please check #1440 (comment). The current release candidate is https://oss.sonatype.org/content/repositories/orgpostgresql-1240/org/postgresql/postgresql/42.2.15/postgresql-42.2.15-jdbc-src.tar.gz |
Not sure if it answers this question, but I did have to remove some test deps from maven's pom.xml for Debian, and the build still works: https://salsa.debian.org/java-team/libpostgresql-jdbc-java/-/blob/master/debian/patches/missing-test-deps |
No changes, still missing dependencies of org.checkerframework.* Build here: |
@odubaj , can you please clarify which |
I use my own one, I will also use the driver maintained and see what will happen |
My custom .spec is very similar to the driver maintained one. I am afraid I won't be able to build this package without explicitly bundling the missing dependency (not a good option) or somehow disabling the org.checkerframework.* tools. |
@odubaj , are you sure you use I'm afraid you are not using it, which causes the error. |
Sorry my mistake, we were using the old URL pointing to tags in this repository. |
On top of that, I guess you are still using pgjdbc-parent-poms, which is no longer needed. I'm closing the issue, as migration to Gradle has already been made, and source release artifacts are also provided. |
Thanks for help! |
Gradle would simplify build process, and we would be able to avoid current
pgjdbc-parent-poms
dance.Note to
postgresql-jdbc
-like package maintainers:Some distributions miss Gradle, Kotlin, and other dependencies, so pgjdbc provides a convenience "source release artifact" which is a minimal Maven project to produce a similar to the official release jar artifact from "text files only".
The name of the source release archive in 42.2.15 will be https://repo1.maven.org/maven2/org/postgresql/postgresql/42.2.15/postgresql-42.2.15-jdbc-src.tar.gz.
The package should be buildable with
mvn package
.The text was updated successfully, but these errors were encountered: