Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:ecsos:server
wildfly
wildfly.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File wildfly.spec of Package wildfly
# # spec file for package wildfly # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: wildfly Group: Productivity/Networking/Web/Servers Version: 31.0.0 Release: 1 Summary: JEE 10 Application Server License: LGPL-2.1 and APSL-2.0 and GPL-2.0 Url: http://wildfly.org/ ##Source0: http://download.jboss.org/wildfly/%%{version}.Final/wildfly-%%{version}.Final.tar.gz Source0: https://github.com/wildfly/wildfly/releases/download/%{version}.Final/wildfly-%{version}.Final.tar.gz Source1: %{name}-Documentation-v1-20180305_0409.pdf #Source2: %%{name}.sysinit Source3: %{name}.sysconfig #Source4: %%{name}.systemd Source99: %{name}.rpmlintrc Patch0: %{name}-systemd.patch Provides: jboss-as = %{version} #NoSource: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: dos2unix BuildRequires: systemd fdupes %{?systemd_requires} ###Requires: java >= 1.8 Requires: java-headless >= 11 Requires: shadow %description WildFly, formerly known as JBoss AS, or simply JBoss, is an application server authored by JBoss, now developed by Red Hat. WildFly is written in Java, and implements the Java Platform, Enterprise Edition (Java EE) specification JEE 10. %package doc Summary: JEE Application Server Documentation Group: Documentation/Other %description doc Documentation and examples for JEE Application Server wildfly. %prep %setup -n wildfly-%{version}.Final %patch -P 0 -p1 # remove unneeded files find . type -f -name *.exe | xargs rm -f find . type -f -name *.bat | xargs rm -f # we don't want windows things rm -rf docs/contrib/scripts/service rm -rf modules/system/layers/base/org/wildfly/openssl/main/lib/win* rm -rf modules/system/layers/base/org/wildfly/openssl/main/lib/macosx* rm -rf modules/system/layers/base/org/wildfly/openssl/main/lib/solaris* %build # nothing to build %install # bytecode has been compiled for java > 1.5, so suppress message (and error) export NO_BRP_CHECK_BYTECODE_VERSION=true ## "home" folder for prog in bin/*.sh; do #install -D -m755 $prog %%{buildroot}/var/lib/%%{name}/bin/$(basename $prog .sh) install -D -m755 $prog %{buildroot}/var/lib/%{name}/bin/$prog done for file in bin/*.conf bin/*.properties bin/.jbossclirc; do install -D -m644 $file %{buildroot}/var/lib/%{name}/$file done cp -a bin/client %{buildroot}/var/lib/%{name}/bin cp -a modules %{buildroot}/var/lib/%{name} install -m644 jboss-modules.jar %{buildroot}/var/lib/%{name} ## doc install -d -m755 %{buildroot}%{_docdir}/%{name} install -D -m644 %{SOURCE1} %{buildroot}%{_docdir}/%{name}/%{name}-11-documentation.pdf cp -a docs/* %{buildroot}%{_docdir}/%{name}/ install -m644 LICENSE.txt %{buildroot}%{_docdir}/%{name}/LICENSE install -m644 README.txt %{buildroot}%{_docdir}/%{name}/README install -m644 copyright.txt %{buildroot}%{_docdir}/%{name}/COPYRIGHT find %{buildroot}%{_docdir}/%{name} -type f -print0 | xargs -0 dos2unix ## install sysconfig %if 0%{?suse_version} < 1500 install -d -m 755 %{buildroot}/var/adm/fillup-templates/ install -D -m644 %{SOURCE3} %{buildroot}/var/adm/fillup-templates/sysconfig.%{name} %else install -d -m 755 %{buildroot}%{_fillupdir}/ install -D -m644 %{SOURCE3} %{buildroot}%{_fillupdir}/sysconfig.%{name} %endif # configurations for f in domain standalone appclient; do install -d -m755 %{buildroot}%{_sysconfdir}/%{name}/$f install -m644 -t %{buildroot}%{_sysconfdir}/%{name}/$f $f/configuration/* install -d -m755 %{buildroot}/var/lib/%{name}/$f install -d -m755 %{buildroot}%{_sysconfdir}/%{name}/$f ln -snf %{_sysconfdir}/%{name}/$f %{buildroot}/var/lib/%{name}/$f/configuration done install -m644 bin/jboss-cli.xml %{buildroot}%{_sysconfdir}/%{name} ln -snf %{_sysconfdir}/%{name}/jboss-cli.xml %{buildroot}/var/lib/%{name}/bin/jboss-cli.xml install -d -m755 %{buildroot}%{_bindir} cat << 'EOF' > %{buildroot}%{_bindir}/jboss-cli #!/bin/bash exec /var/lib/%{name}/bin/jboss-cli "$@" EOF chmod +x %{buildroot}%{_bindir}/jboss-cli ## install systemd service install -d -m755 %{buildroot}%{_sbindir} install -D -m755 docs/contrib/scripts/systemd/launch.sh %{buildroot}/var/lib/wildfly/bin/launch.sh install -D -m644 docs/contrib/scripts/systemd/wildfly.service %{buildroot}%{_unitdir}/%{name}.service ln -s /usr/sbin/service %{buildroot}/%{_sbindir}/rcwildfly ### SuSEfirewall %if 0%{?suse_version} <= 1500 install -d -m755 %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ cat << 'EOF' > %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name} ## Name: WildFly ## Description: JEE 7 Application Server TCP="8080 9990" EOF %endif # welcome content cp -a welcome-content %{buildroot}/var/lib/%{name}/ ## misc install -d -m700 %{buildroot}/var/cache/%{name}/auth install -d -m775 %{buildroot}/var/cache/%{name}/domain/tmp install -d -m775 %{buildroot}/var/cache/%{name}/domain/tmp/auth install -d -m775 %{buildroot}/var/cache/%{name}/domain/servers install -d -m775 %{buildroot}/var/cache/%{name}/standalone/tmp install -d -m775 %{buildroot}/var/cache/%{name}/standalone/tmp/auth install -d -m755 %{buildroot}/usr/lib/tmpfiles.d cat << EOF > %{buildroot}/usr/lib/tmpfiles.d/%{name}.conf d /var/run/%{name} 775 root wildfly EOF for f in standalone domain; do install -d -m775 %{buildroot}/var/log/%{name}/$f install -d -m755 %{buildroot}/var/lib/%{name}/$f install -d -m775 %{buildroot}/var/lib/%{name}/$f/data install -d -m775 %{buildroot}/var/lib/%{name}/$f/data/content install -d -m775 %{buildroot}/var/lib/%{name}/$f/deployments install -d -m775 %{buildroot}/var/lib/%{name}/$f/lib install -d -m775 %{buildroot}/var/lib/%{name}/$f/lib/ext install -d -m775 %{buildroot}/var/lib/%{name}/$f/ ln -s /var/log/%{name} %{buildroot}/var/lib/%{name}/$f/log ln -s /var/cache/%{name}/$f/tmp %{buildroot}/var/lib/%{name}/$f/tmp # configuration history for x in %{buildroot}%{_sysconfdir}/%{name}/$f/*.xml; do histdir=$(basename $x .xml)_xml_history install -d -m775 %{buildroot}/var/cache/%{name}/$f/$histdir ln -snf /var/cache/%{name}/$f/$histdir %{buildroot}%{_sysconfdir}/%{name}/$f/$histdir done done ln -s /var/cache/%{name}/domain/servers %{buildroot}/var/lib/%{name}/domain/servers # patch files %if 0%{?suse_version} < 1500 sed -i -e 's|@_lib@|%{_lib}|g' %{buildroot}/var/adm/fillup-templates/sysconfig.%{name} %else sed -i -e 's|@_lib@|%{_lib}|g' %{buildroot}%{_fillupdir}/sysconfig.%{name} %endif # rpmlint %fdupes %{buildroot}%{_var} %fdupes %{buildroot}%{_docdir} %pre if ! getent group %{name} >/dev/null; then groupadd -r %{name} fi if ! getent passwd %{name} >/dev/null; then useradd -r -g %{name} -d %{_var}/lib/%{name} -c "WildFly Application Server" %{name} -s /sbin/nologin else true fi %service_add_pre %{name}.service %post %service_add_post %{name}.service %restart_on_update %{name} %fillup_only %{name} # create /var/run/wildfly %if 0%{?suse_version} <= 1320 systemd-tmpfiles --create /usr/lib/tmpfiles.d/%{name}.conf %else %tmpfiles_create /usr/lib/tmpfiles.d/%{name}.conf %endif %preun %service_del_preun %{name}.service %stop_on_removal %{name} # remove logfiles,... if [ $1 -eq 0 ]; then rm -f /var/log/%{name}/* 2>/dev/null for f in standalone domain; do rm -rf /var/lib/%{name}/$f/data/* rm -rf /var/cache/%{name}/$f/tmp/* done rm -rf %{_sysconfdir}/%{name}/*/*_xml_history/* rm -rf /var/cache/%{name}/domain/servers/* else true fi %postun %service_del_postun %{name}.service # Remove user and group if [ $1 -eq 0 ]; then userdel -f %{name} groupdel %{name} rm -f %{_sysconfdir}/sysconfig/%{name} else true fi %files %defattr(-,root,wildfly) %{_var}/lib/%{name} %defattr(-,root,root) #%%ghost /var/run/wildfly %{_bindir}/jboss-cli /usr/lib/systemd/system/%{name}.service %{_sbindir}/rc%{name} %if 0%{?suse_version} < 1500 /var/adm/fillup-templates/sysconfig.wildfly %else %{_fillupdir}/sysconfig.wildfly %endif %defattr(0644,root,wildfly,0775) %if 0%{?suse_version} >= 1220 %attr(0644,root,root) /usr/lib/tmpfiles.d/%{name}.conf %else %attr(0775,root,wildfly) %dir %{_var}/run/%{name} %endif %dir %{_var}/cache/%{name} %dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{name}/appclient %defattr(0664,root,wildfly,0775) %dir %{_var}/log/%{name} %defattr(0600,wildfly,wildfly) %config(noreplace) %{_sysconfdir}/%{name}/appclient/logging.properties %defattr(0664,wildfly,wildfly) %config(noreplace) %{_sysconfdir}/%{name}/appclient/*.xml %defattr(-,root,wildfly) %config(noreplace) %{_sysconfdir}/%{name}/jboss-cli.xml %defattr(0700,wildfly,wildfly) %dir %{_var}/cache/%{name}/auth %defattr(-,root,root) %dir %{_docdir}/%{name} %doc %{_docdir}/%{name}/README %doc %{_docdir}/%{name}/COPYRIGHT %doc %{_docdir}/%{name}/LICENSE %doc %{_docdir}/%{name}/contrib/ %doc %{_docdir}/%{name}/licenses/ %if 0%{?suse_version} <= 1500 %config(noreplace) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name} %endif ### TODO %%files domain %defattr(-,root,wildfly) %{_var}/lib/%{name}/domain %defattr(0660,root,wildfly,0775) %dir %{_var}/cache/%{name}/domain %dir %{_var}/cache/%{name}/domain/* %{_sysconfdir}/%{name}/domain/*_xml_history %dir %{_sysconfdir}/%{name}/domain %defattr(0770,root,wildfly) %dir %{_var}/log/%{name}/domain %defattr(0600,wildfly,wildfly) %config(noreplace) %{_sysconfdir}/%{name}/domain/application-roles.properties %config(noreplace) %{_sysconfdir}/%{name}/domain/application-users.properties %config(noreplace) %{_sysconfdir}/%{name}/domain/mgmt-groups.properties %config(noreplace) %{_sysconfdir}/%{name}/domain/mgmt-users.properties %config(noreplace) %{_sysconfdir}/%{name}/domain/default-server-logging.properties %config(noreplace) %{_sysconfdir}/%{name}/domain/logging.properties %defattr(0664,wildfly,wildfly) %config(noreplace) %{_sysconfdir}/%{name}/domain/*.xml #### TODO %%files standalone %defattr(-,root,wildfly) %{_var}/lib/%{name}/standalone %defattr(0660,root,wildfly,0775) %dir %{_var}/cache/%{name}/standalone %dir %{_var}/cache/%{name}/standalone/* %{_sysconfdir}/%{name}/standalone/*_xml_history %dir %{_sysconfdir}/%{name}/standalone %defattr(0770,root,wildfly) %dir %{_var}/log/%{name}/standalone %defattr(0600,wildfly,wildfly) %config(noreplace) %{_sysconfdir}/%{name}/standalone/application-roles.properties %config(noreplace) %{_sysconfdir}/%{name}/standalone/application-users.properties %config(noreplace) %{_sysconfdir}/%{name}/standalone/mgmt-groups.properties %config(noreplace) %{_sysconfdir}/%{name}/standalone/mgmt-users.properties %config(noreplace) %{_sysconfdir}/%{name}/standalone/logging.properties %defattr(0644,wildfly,wildfly) %config(noreplace) %{_sysconfdir}/%{name}/standalone/*.xml %files doc %defattr(-,root,root) %doc %{_docdir}/%{name}/examples %doc %{_docdir}/%{name}/schema %doc %{_docdir}/%{name}/%{name}-11-documentation.pdf %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor