Bug 1247243
Summary: | Review Request: mod_cluster - httpd modules and Tomcat/WildFly java libraries | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Michal Karm Babacek <mbabacek> | ||||||||||||||||
Component: | Package Review | Assignee: | Michal Karm Babacek <mbabacek> | ||||||||||||||||
Status: | CLOSED DEFERRED | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||||||||
Severity: | medium | Docs Contact: | |||||||||||||||||
Priority: | medium | ||||||||||||||||||
Version: | rawhide | CC: | bperkins, csutherl, jclere, jreznik, mbabacek, mgoldman, mjuszkie, ohudlick, package-review, paul | ||||||||||||||||
Target Milestone: | --- | ||||||||||||||||||
Target Release: | --- | ||||||||||||||||||
Hardware: | All | ||||||||||||||||||
OS: | Linux | ||||||||||||||||||
Whiteboard: | |||||||||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||||||||
Doc Text: | Story Points: | --- | |||||||||||||||||
Clone Of: | Environment: | ||||||||||||||||||
Last Closed: | 2019-05-10 06:29:04 UTC | Type: | --- | ||||||||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||||||||
Documentation: | --- | CRM: | |||||||||||||||||
Verified Versions: | Category: | --- | |||||||||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||||||
Embargoed: | |||||||||||||||||||
Attachments: |
|
Description
Michal Karm Babacek
2015-07-27 15:50:59 UTC
I would like to backport to f23 and f22 as soon as the rawhide is accepted. Lemme add that this is my first specfile ever, so if you smell anything fishy, it is much more likely to be a bug than a feature. Note that I never did Fedora package review before. My notes: Have you used rpmlint? Provide links to scratch builds on primary. use -p1 patches please use %configure macro instead of ./configure define module_dirs once use '%license lgpl.txt' instead of %doc add %changelog entry with proper description jerboaa's scratch build of java-1.8.0-openjdk?#d28765c33d068af9ff432a92443b93beeef88a22 for git://pkgs.fedoraproject.org/java-1.8.0-openjdk?#d28765c33d068af9ff432a92443b93beeef88a22 and rawhide failed http://koji.fedoraproject.org/koji/taskinfo?taskID=12181621 Please up the priority of this bug. The Tomcat team now recommends mod_proxy, not mod_jk. But mod_cluster is what Fedora uses instead of mod_proxy. Therefore more users of Fedora are going to run into this issue. I now have to manually compile mod_jk. And all this work just to have TomEE, Bugzilla and phpBB on the same Fedora server. I would vote up this bug, but it seems voting is turned off. Actually mod_cluster will use http if you don't configure an AJP connector in tomcat (AKA comment it from the default server.xml) Use of http will not fix the "2 years old code with unfixed CVE, performance and severe functional issues. " I stand by my first comment. mod_cluster needs updated for Fedora 23 distributions with dnf. Dear Paul, thank you for your interest in mod_cluster project. Here is an _untested_ scratch build of the upcoming update, you could give it a shot on Fedora 24: http://koji.fedoraproject.org/koji/taskinfo?taskID=15014378 Sources: https://github.com/Karm/mod_cluster-fedora-packages Note: It brings: - httpd modules - Tomcat 8 dependencies - Wildfly dependencies Tomcat 7 nor Tomcat 6 and not even JBoss AS7 libs are present. Tomcat 6 and JBoss AS7 are definitely dropped and Tomcat 7 could re-appear if there is a strong interest in it. Feedback is more than welcome. Cheers -K- I am a small startup company. I don't have a test server, period. I am not able to install Fedora 24. I will gladly help in the future when I have more than one server. Hi Paul, no need for a test server, a small virtual machine is enough to test and play. If you would like to know more about setting up a test virtual machine, feel free to post a question on http://ask.fedoraproject.org/ These are _untested_ Fedora 23 packages (I haven't even tried to install them yet), if you happen to have Fedora 23 somewhere: https://kojipkgs.fedoraproject.org//work/tasks/5787/15015787/mod_cluster-1.3.3-1.fc23.x86_64.rpm https://kojipkgs.fedoraproject.org//work/tasks/5787/15015787/mod_cluster-java-1.3.3-1.fc23.x86_64.rpm https://kojipkgs.fedoraproject.org//work/tasks/5787/15015787/mod_cluster-java-catalina-1.3.3-1.fc23.x86_64.rpm https://kojipkgs.fedoraproject.org//work/tasks/5787/15015787/mod_cluster-java-tomcat8-1.3.3-1.fc23.x86_64.rpm Please, under no circumstances put these scratch build test packages into production anywhere. Cheers -K- This package is already present https://admin.fedoraproject.org/pkgdb/package/rpms/mod_cluster/ This is the guideline for java packages https://fedorahosted.org/released/javapackages/doc/ the spec file, sorry, is horrible, the last time I saw one so goes back at least twenty years ago e.g. these are really useless: BuildRequires: jpackage-utils BuildRequires: java-devel are installed by default using maven-local The Group: tag is unnecessary. https://fedoraproject.org/wiki/Packaging:Guidelines#Tags_and_Sections Requires: jboss-logging Requires: tomcat >= 1:8 because "Requires" are handled by our java tools %exclude %{libdir}/%{name}-container-tomcat8* %exclude %{libdir}/%{name}-container-catalina* %exclude %{_mavenpomdir}/JPP.%{name}-%{name}-container-tomcat8* %exclude %{_mavendepmapfragdir}/JPP.%{name}-%{name}-container-tomcat8* %exclude %{_datadir}/maven-effective-poms/JPP.%{name}-%{name}-container-tomcat8* must be use at least %mvn_package groupId:artifactId [SUB PAKAGE] or adding "-s" option: %mvn_build -s -f -- -PTC8 or %mvn_build -sf -- -PTC8 this had not yet seen %post java-tomcat8 if [ "$1" == "1" ]; then %{__ln_s} %{libdir}/mod_cluster-container-catalina.jar %{_javadir}/tomcat/mod_cluster-container-catalina.jar %{__ln_s} %{libdir}/mod_cluster-container-catalina-standalone.jar %{_javadir}/tomcat/mod_cluster-container-catalina-standalone.jar %{__ln_s} %{libdir}/mod_cluster-container-spi.jar %{_javadir}/tomcat/mod_cluster-container-spi.jar %{__ln_s} %{libdir}/mod_cluster-core.jar %{_javadir}/tomcat/mod_cluster-core.jar %{__ln_s} %{_javadir}/jboss-logging/jboss-logging.jar %{_javadir}/tomcat/jboss-logging.jar %{__ln_s} %{libdir}/mod_cluster-container-tomcat8.jar %{_javadir}/tomcat/mod_cluster-container-tomcat8.jar fi #%postun java-tomcat7 #if [ "$1" == "0" ]; then # rm -f %{_javadir}/tomcat/mod_cluster-container-catalina.jar # rm -f %{_javadir}/tomcat/mod_cluster-container-catalina-standalone.jar # rm -f %{_javadir}/tomcat/mod_cluster-container-spi.jar # rm -f %{_javadir}/tomcat/mod_cluster-core.jar # rm -f %{_javadir}/tomcat/jboss-logging.jar # rm -f %{_javadir}/tomcat/mod_cluster-container-tomcat7.jar #fi %postun java-tomcat8 if [ "$1" == "0" ]; then rm -f %{_javadir}/tomcat/mod_cluster-container-catalina.jar rm -f %{_javadir}/tomcat/mod_cluster-container-catalina-standalone.jar rm -f %{_javadir}/tomcat/mod_cluster-container-spi.jar rm -f %{_javadir}/tomcat/mod_cluster-core.jar rm -f %{_javadir}/tomcat/jboss-logging.jar rm -f %{_javadir}/tomcat/mod_cluster-container-tomcat8.jar fi %endif i do not know what good and i do not know but this work is really useless ... you could be simplified using the macro %mvn_file groupId:artifactId [SUBDIR] e.g. %mvn_file :mod_cluster-container-catalina %{name}/mod_cluster-container-catalina tomcat/mod_cluster-container-catalina @Gil, THX for reading the spec. I'll amend the regions you highlighted. @Gil, I've updated the spec [1] and tested on F24 with Tomcat 8. Wildfly on F24 seems to be fundamentally broken with respect to configuration and log4j stuff, but the single mod_cluster jar needed is present where it is supposed to be. Apache HTTP Server modules are also correctly built. If you are cool with the form of the spec file, I'll proceed with pushing to Fedora. THX for pinpointing the ugly stuff by the way :-) Cheers -K- [1] https://github.com/Karm/mod_cluster-fedora-packages/blob/master/mod_cluster.spec you should use: https://github.com/modcluster/mod_cluster/archive/1.3.3.Final/mod_cluster-1.3.3.Final.tar.gz maybe you can use pom macros, e.g.: %pom_change_dep org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec org.apache.tomcat:tomcat-util container/catalina or simplified %pom_change_dep :jboss-servlet-api_3.0_spec org.apache.tomcat:tomcat-util container/catalina %pom_change_dep org.apache.tomcat: ::'${version.tomcat8}' container/catalina %pom_change_dep :catalina :tomcat-catalina:'${version.tomcat8}' container/catalina-standalone %pom_change_dep :coyote :tomcat-coyote:'${version.tomcat8}' container/catalina-standalone %pom_remove_dep :mod_cluster-container-catalina::test-jar container/tomcat8 these are only waste of time %global major_version 1 %global minor_version 3 %global micro_version 3 Version: %{major_version}.%{minor_version}.%{micro_version} here you should use, instead of %define with_java 1 %if 0%{?fedora} %bcond_with java %endif %if %{without java} BuildRequires: maven-local BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin) BuildRequires: mvn(org.jboss:jboss-parent:pom:) BuildRequires: mvn(net.jcip:jcip-annotations) BuildRequires: mvn(org.jboss.logging:jboss-logging) BuildRequires: mvn(org.jboss.logging:jboss-logging-tools-parent:pom:) %endif ... %if %{without java} %package java .... .... %if %{with_java} %pom_disable_module demo .... %if %{without java} %pom_disable_module demo ... %mvn_file :mod_cluster-container-tomcat8 mod_cluster/mod_cluster-container-tomcat8 tomcat/mod_cluster-container-tomcat8 %mvn_package "org.jboss.mod_cluster:" java %endif .... .... %if %{without java} %mvn_build -s -f -- -PTC8 %endif .... %if %{with_java} %mvn_install .... %if %{without java} %mvn_install .... %if %{without java} %files javadoc -f .mfiles-javadoc ..... please, leave jboss-servlet-api_3.0_spec instead of use glassfish-servlet-api so remove %pom_change_dep org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec javax.servlet:javax.servlet-api container-spi/pom.xml container/catalina/pom.xml core/pom.xml Upstream release is not 1.3.3-1 my fault, please use: %pom_xpath_remove "pom:dependency[pom:type = 'test-jar']" container/tomcat8 another pom macro for replace MODCLUSTER-528-container_pom.xml.patch %pom_xpath_inject "pom:profile[pom:id = 'TC8']/pom:modules" "<module>catalina-standalone</module>" container this replace MODCLUSTER-528-container_catalina_pom.xml.patch %pom_xpath_set "pom:profile[pom:id = 'TC7']/pom:id" TC8 container/catalina Created attachment 1195455 [details]
fix pom macros
See spec file linked only the mod_cluster JARS (and not also the pom files) in %{_javadir}/tomcat handle in this way ln -sf %{_javadir}/jboss-logging/jboss-logging.jar \ $RPM_BUILD_ROOT%{_javadir}/tomcat/jboss-logging.jar jboss-logging is not part of the package Remove useless Provides and adjust Requires Created attachment 1195457 [details]
fix pom macros
corrected Release field
Created attachment 1195459 [details]
fix pom macros
fix java BR list
Hi Gil, thank you for the file, it's so much cleaner with the pom macros. I used it almost without changes, but my local, scratch and smoke test failed, so I did several additional changes. I hope they are cool. Current state: https://github.com/Karm/mod_cluster-fedora-packages/ Summary of changes: - removed buildarch due to: RPM build errors: Arch dependent binaries in noarch package - version classifier .Final is part of version now, we don't need to use it separately, it's always part of the version - we need tomcat-lib for build, so I added mvn(..) macros that lead to tomcat-lib dependency rather than directly requiring tomcat just for build Smoke-tested ============ Wildfly starts with mod_cluster from the mod_cluster-java-1.3.3.Final-2.fc24.x86_64.rpm, so it doesn't need tomcat 8 stuff, and that is good. >21:32:09,263 INFO [org.jboss.modcluster] (ServerService Thread Pool -- 59) MODCLUSTER000001: Initializing mod_cluster version 1.3.3.Final >21:32:09,287 INFO [org.jboss.modcluster] (ServerService Thread Pool -- 59) MODCLUSTER000032: Listening to proxy advertisements on /224.0.1.105:23364 Tomcat 8 starts correctly: >29-Aug-2016 21:35:36.221 INFO [main] org.jboss.modcluster.ModClusterService.init MODCLUSTER000001: Initializing mod_cluster version 1.3.3.Final >29-Aug-2016 21:35:36.242 INFO [main] org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl.start MODCLUSTER000032: Listening to proxy advertisements on /224.0.1.105:23364 Apache HTTP Server loads modules and starts advertising: >[Mon Aug 29 21:36:54.575797 2016] [mpm_prefork:notice] [pid 3861] AH00163: Apache/2.4.23 (Fedora) OpenSSL/1.0.2h-fips mod_cluster/1.3.3.Final configured -- resuming normal operations Successful f23, f24, f25 scratch builds ======================================= f23 http://koji.fedoraproject.org/koji/taskinfo?taskID=15430973 f24 http://koji.fedoraproject.org/koji/taskinfo?taskID=15430968 f25 http://koji.fedoraproject.org/koji/taskinfo?taskID=15430970 So, I'll push it to the Fedora repo :-) WDYT? (In reply to Michal Karm Babacek from comment #28) > Hi Gil, thank you for the file, it's so much cleaner with the pom macros. > > I used it almost without changes, but my local, scratch and smoke test > failed, so I did several additional changes. I hope they are cool. > > Current state: https://github.com/Karm/mod_cluster-fedora-packages/ > > Summary of changes: > > - removed buildarch due to: RPM build errors: Arch dependent binaries in > noarch package "BuildArch: noarch" must be aded on in the java* packages (sorry, i wrote a clean new spec and i forgotten to remove it in the main package, my custom spec file template ...) e.g. %if %{without java} %package java Summary: Java libraries for %{name} BuildArch: noarch %description java This package contains %{name} core Java libraries that can be used with WildFly application server. %package java-tomcat8 Summary: Tomcat 8 Java libraries for %{name} Requires: tomcat >= 1:8 BuildArch: noarch %description java-tomcat8 This package contains %{name} Java libraries that can be used with Tomcat 8. %package javadoc Summary: Javadoc for %{name} BuildArch: noarch %description javadoc This package contains the API documentation for %{name}. %endif > - we need tomcat-lib for build, so I added mvn(..) macros that lead to > tomcat-lib dependency rather than directly requiring tomcat just for build %if %{without java} BuildRequires: maven-local BuildRequires: mvn(net.jcip:jcip-annotations) BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin) BuildRequires: mvn(org.apache.tomcat:tomcat-catalina) BuildRequires: mvn(org.apache.tomcat:tomcat-coyote) BuildRequires: mvn(org.apache.tomcat:tomcat-util) BuildRequires: mvn(org.jboss:jboss-parent:pom:) BuildRequires: mvn(org.jboss.logging:jboss-logging) BuildRequires: mvn(org.jboss.logging:jboss-logging-processor) BuildRequires: mvn(org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec) %endif you shold use "BuildRequires: mvn(org.jboss.logging:jboss-logging-processor)" in the pom files is specified this artifact. not BuildRequires: mvn(org.jboss.logging:jboss-logging-processor:pom:) Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=15431065 Created attachment 1195542 [details]
fix BR list
- marked as noarch only the java stuff
ops i see now in your spec file: Version: 1.3.3.Final is no good, please use %global namedreltag .Final %global namedversion %{version}%{?namedreltag} %if 0%{?fedora} %bcond_with java %endif Name: mod_cluster Version: 1.3.3 Release: 2%{?dist} .... %prep %setup -q -n %{name}-%{namedversion} .... * Mon Aug 29 2016 gil cattaneo <puntogil> 1.3.3-4 .... as for all the other jboss/wildfly packages Roger that... Updating.... Shouldn't "Release" be actually 1 since this is the first 1.3.3.Final Release? Created attachment 1195543 [details]
fix BR list
corrected Release field
(In reply to Michal Karm Babacek from comment #33) > Shouldn't "Release" be actually 1 since this is the first 1.3.3.Final > Release? sorry i dont understand i dont understand also this %mvn_file :mod_cluster-container-catalina-spi:jar: tomcat/mod_cluster-container-catalina-spi mod_cluster-container-catalina-spi do not exist, please remove Created attachment 1195546 [details]
remove pom macro on unavailable mod_cluster-container-catalina-spi
No problem, I just thought it was supposed to be 1 because it is the first build of mod_cluster 1.3.3. I used 4 (actually 5) as you suggested though. So far, I pushed to rawhide: * 1.3.3-4 http://pkgs.fedoraproject.org/cgit/rpms/mod_cluster.git/commit/?id=6bf9d20ffd40b625762637ffeb43a1570f3a7785 * 1.3.3-5 http://pkgs.fedoraproject.org/cgit/rpms/mod_cluster.git/commit/?id=0e223e9831a01f92de47be11d8a652bbe87f6e07 * http://koji.fedoraproject.org/koji/taskinfo?taskID=15431508 and I tested upgrade from 1.2.6 on f24. Wildfly would need additional testing as soon as it's updated, because I used Wildfly from zip and just replaced mod_cluster libs so as to make sure mod_cluster rpm provides all necessary classes. Any reason not to carry on with f25 and f24? There is none from the mod_cluster project view, nobody could use mod_cluster in Fedora these days in any production env because it actually doesn't work (numerous bugs, performance issues, CVEs...). Created attachment 1195551 [details] remove useless pom macros - fix BR list - marked as noarch only the java stuff - remove useless pom macros - add subpackages for parent POMs - use custom _httpd_confdir macro Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=15431585 (In reply to Michal Karm Babacek from comment #39) > No problem, I just thought it was supposed to be 1 because it is the first > build of mod_cluster 1.3.3. I used 4 (actually 5) as you suggested though. > > So far, I pushed to rawhide: > > * 1.3.3-4 > http://pkgs.fedoraproject.org/cgit/rpms/mod_cluster.git/commit/ > ?id=6bf9d20ffd40b625762637ffeb43a1570f3a7785 > * 1.3.3-5 > http://pkgs.fedoraproject.org/cgit/rpms/mod_cluster.git/commit/ > ?id=0e223e9831a01f92de47be11d8a652bbe87f6e07 > * http://koji.fedoraproject.org/koji/taskinfo?taskID=15431508 > > and I tested upgrade from 1.2.6 on f24. Wildfly would need additional > testing as soon as it's updated, because I used Wildfly from zip and just > replaced mod_cluster libs so as to make sure mod_cluster rpm provides all > necessary classes. > > Any reason not to carry on with f25 and f24? There is none from the > mod_cluster project view, nobody could use mod_cluster in Fedora these days > in any production env because it actually doesn't work (numerous bugs, > performance issues, CVEs...). Unfortunately, for Wildfly (10.1.0), import in the other branches, different from the master, is not possible ... Some dependencies if you update would create a lot of compatibility problems ... not to mention the jackson libraries (2.7.x) ... If you want update mod_cluster in other branches for me is ok if this not cause compatibility problems Ad other branches (f24, f25): > Some dependencies if you update would create a lot of compatibility problems ... > not to mention the jackson libraries (2.7.x) ... I'll test before I move, but there is nothing to worry about, the dependency on jboss-logging is safe and that's about it... The Wildfly-mod_cluster subsystem code resides in Wildfly code repo itself. Ad your latest specfile: THX Gil. I added: > +BuildRequires: mvn(org.apache.maven.plugins:maven-release-plugin) to attachment 1195551 [details], because the build needs maven-release-plugin now. Pushing new Rawhide... * 1.3.3-4 http://pkgs.fedoraproject.org/cgit/rpms/mod_cluster.git/commit/?id=6bf9d20ffd40b625762637ffeb43a1570f3a7785 * 1.3.3-5 http://pkgs.fedoraproject.org/cgit/rpms/mod_cluster.git/commit/?id=0e223e9831a01f92de47be11d8a652bbe87f6e07 * 1.3.3-6 http://pkgs.fedoraproject.org/cgit/rpms/mod_cluster.git/commit/?id=7e9002c816d93eb620f3aa478f8b2f81d25165c7 * http://koji.fedoraproject.org/koji/taskinfo?taskID=15431737 I go off-line to sleep; thank you very much for this back and forth. ops forgotten to increase * Mon Aug 30 2016 XXXXXXXXX 1.3.3-5 mow is Release: 6%{?dist} |