2 commits - java/code java/spacewalk-java.spec rel-eng/packages
by Michael Mraka
java/code/src/com/redhat/rhn/frontend/action/satellite/CobblerAction.java | 22 ++++++++--
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 3 +
java/spacewalk-java.spec | 8 +++
rel-eng/packages/spacewalk-java | 2
4 files changed, 29 insertions(+), 6 deletions(-)
New commits:
commit 1eb0b43fe7b46ed0287684ed823a034ef389f25a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 22 16:27:15 2014 +0100
Automatic commit of package [spacewalk-java] release [2.1.123-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 8c02550..7bdae62 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -28,7 +28,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 2.1.122
+Version: 2.1.123
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -801,6 +801,12 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Wed Jan 22 2014 Michael Mraka <michael.mraka(a)redhat.com> 2.1.123-1
+- Bugfix: ISE when cobbler components are missing (not installed)
+- port reboot_confirm.pxt from perl to java
+- SUSE Studio API will stop working via unencrypted HTTP
+- Inconsistency in build vs. eclipse checkstyle.
+
* Wed Jan 22 2014 Tomas Lestach <tlestach(a)redhat.com> 2.1.122-1
- let taskomatic link commons-io
- fix CVE URL in updateinfo references
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 3d45759..e538d17 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-2.1.122-1 java/
+2.1.123-1 java/
commit 2d7add225d3d4b447cff70c31393ffde7a4b5173
Author: Bo Maryniuk <bo(a)suse.de>
Date: Fri Jan 17 19:21:06 2014 +0100
Bugfix: ISE when cobbler components are missing (not installed)
diff --git a/java/code/src/com/redhat/rhn/frontend/action/satellite/CobblerAction.java b/java/code/src/com/redhat/rhn/frontend/action/satellite/CobblerAction.java
index cadc1b4..c341eeb 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/satellite/CobblerAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/satellite/CobblerAction.java
@@ -35,22 +35,36 @@ import javax.servlet.http.HttpServletResponse;
* @version $Rev$
*/
public class CobblerAction extends RhnAction {
- /** {@inheritDoc} */
+ /** {@inheritDoc}
+ * @param mapping
+ * @param formIn
+ * @param request
+ * @param response
+ * @return */
@Override
public ActionForward execute(ActionMapping mapping,
ActionForm formIn,
HttpServletRequest request,
HttpServletResponse response) {
RequestContext ctx = new RequestContext(request);
+ ActionErrors errors = new ActionErrors();
if (ctx.isSubmitted()) {
- CobblerSyncCommand cmd = new CobblerSyncCommand(ctx.getLoggedInUser());
- ValidatorError ve = cmd.store();
+ ValidatorError ve;
+ try {
+ ve = new CobblerSyncCommand(ctx.getLoggedInUser()).store();
+ } catch (Exception ex) {
+ this.getStrutsDelegate().addError(errors,
+ "cobbler.jsp.xmlrpc.fail",
+ ex.getLocalizedMessage());
+ this.getStrutsDelegate().saveMessages(request, errors);
+ return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
+ }
+
if (ve == null) {
addMessage(request, "cobbler.jsp.synced");
}
else {
- ActionErrors errors = new ActionErrors();
getStrutsDelegate().addError(errors, ve.getKey(), ve.getValues());
getStrutsDelegate().saveMessages(request, errors);
}
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index 62ec065..e46805b 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -8237,6 +8237,9 @@ Please note that some manual configuration of these scripts may still be require
<trans-unit id="cobbler.jsp.sync">
<source>Run Cobbler Sync</source>
</trans-unit>
+ <trans-unit id="cobbler.jsp.xmlrpc.fail">
+ <source>Cobbler command failed: {0}</source>
+ </trans-unit>
<trans-unit id="cobbler.jsp.synced">
<source>Cobbler Sync action was successfully executed. Look at /var/log/cobbler/*.log for more information</source>
</trans-unit>
10 years, 4 months
backend/satellite_tools
by Michael Mraka
backend/satellite_tools/spacewalk-debug | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 8793925a10d2e482669c0e6104197737fad0cad8
Author: Flavio Castelli <fcastelli(a)suse.com>
Date: Wed Jan 22 14:35:52 2014 +0100
Add extra log folder /var/log/rhn/tasko/sat/ in spacewalk-debug.
diff --git a/backend/satellite_tools/spacewalk-debug b/backend/satellite_tools/spacewalk-debug
index 90efd48..d918973 100755
--- a/backend/satellite_tools/spacewalk-debug
+++ b/backend/satellite_tools/spacewalk-debug
@@ -92,6 +92,7 @@ mkdir -p $DIR/rhn-logs
mkdir -p $DIR/kickstarts
mkdir -p $DIR/database
mkdir -p $DIR/cobbler-lib
+mkdir -p $DIR/tasko
echo " * copying configuration information"
cp -fapRd /etc/httpd/conf* $DIR/conf/httpd
@@ -241,6 +242,11 @@ if [ -f /var/log/audit/audit.log ] ; then
cp -fa /var/log/audit/audit.log $DIR/audit-log
fi
+if [ -d /var/log/rhn/tasko/sat ] ; then
+ echo " * copying tasko/sat"
+ cp -fa /var/log/rhn/tasko/sat $DIR/tasko
+fi
+
echo " * timestamping"
echo "Spacewalk debug created on $(date)" > $DIR/timestamp
10 years, 4 months
Changes to 'refs/tags/spacewalk-setup-2.1.10-1'
by Michael Mraka
Tag 'spacewalk-setup-2.1.10-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2014-01-22 13:20 +0000
Tagging package [spacewalk-setup] version [2.1.10-1] in directory [spacewalk/setup/].
Changes since oracle-lib-compat-11.2.0.9-1:
Michael Mraka (2):
1039877 - disable ehcache check for updates
Automatic commit of package [spacewalk-setup] release [2.1.10-1].
---
rel-eng/packages/spacewalk-setup | 2 +-
spacewalk/setup/share/tomcat.java_opts | 2 +-
spacewalk/setup/spacewalk-setup.spec | 5 ++++-
3 files changed, 6 insertions(+), 3 deletions(-)
---
10 years, 4 months
2 commits - rel-eng/packages spacewalk/setup
by Michael Mraka
rel-eng/packages/spacewalk-setup | 2 +-
spacewalk/setup/share/tomcat.java_opts | 2 +-
spacewalk/setup/spacewalk-setup.spec | 5 ++++-
3 files changed, 6 insertions(+), 3 deletions(-)
New commits:
commit c3a9c09e83c0c970acb6640182d191ac86f7a4e8
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 22 14:20:51 2014 +0100
Automatic commit of package [spacewalk-setup] release [2.1.10-1].
diff --git a/rel-eng/packages/spacewalk-setup b/rel-eng/packages/spacewalk-setup
index c99c35a..54e5ebb 100644
--- a/rel-eng/packages/spacewalk-setup
+++ b/rel-eng/packages/spacewalk-setup
@@ -1 +1 @@
-2.1.9-1 spacewalk/setup/
+2.1.10-1 spacewalk/setup/
diff --git a/spacewalk/setup/spacewalk-setup.spec b/spacewalk/setup/spacewalk-setup.spec
index 6ed0d73..5f84472 100644
--- a/spacewalk/setup/spacewalk-setup.spec
+++ b/spacewalk/setup/spacewalk-setup.spec
@@ -1,7 +1,7 @@
%{!?fedora: %global sbinpath /sbin}%{?fedora: %global sbinpath %{_sbindir}}
Name: spacewalk-setup
-Version: 2.1.9
+Version: 2.1.10
Release: 1%{?dist}
Summary: Initial setup tools for Red Hat Spacewalk
@@ -105,6 +105,9 @@ rm -rf %{buildroot}
%doc LICENSE
%changelog
+* Wed Jan 22 2014 Michael Mraka <michael.mraka(a)redhat.com> 2.1.10-1
+- 1039877 - disable ehcache check for updates
+
* Wed Jan 22 2014 Michael Mraka <michael.mraka(a)redhat.com> 2.1.9-1
- modified tomcat setup to work also on Fedora 20
commit be044846edc598178de2f436e1059da226b7f588
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 22 14:16:32 2014 +0100
1039877 - disable ehcache check for updates
diff --git a/spacewalk/setup/share/tomcat.java_opts b/spacewalk/setup/share/tomcat.java_opts
index 1fffafb..54ae1dd 100644
--- a/spacewalk/setup/share/tomcat.java_opts
+++ b/spacewalk/setup/share/tomcat.java_opts
@@ -1 +1 @@
--ea -Xms256m -Xmx256m -Djava.awt.headless=true -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser -Dorg.apache.tomcat.util.http.Parameters.MAX_COUNT=1024 -XX:MaxNewSize=256 -XX:-UseConcMarkSweepGC
+-ea -Xms256m -Xmx256m -Djava.awt.headless=true -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser -Dorg.apache.tomcat.util.http.Parameters.MAX_COUNT=1024 -XX:MaxNewSize=256 -XX:-UseConcMarkSweepGC -Dnet.sf.ehcache.skipUpdateCheck=true
10 years, 4 months
Changes to 'refs/tags/oracle-lib-compat-11.2.0.9-1'
by Michael Mraka
Tag 'oracle-lib-compat-11.2.0.9-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2014-01-22 12:54 +0000
Tagging package [oracle-lib-compat] version [11.2.0.9-1] in directory [projects/oracle-lib-compat/].
Changes since spacewalk-setup-2.1.9-1:
Michael Mraka (1):
Automatic commit of package [oracle-lib-compat] release [11.2.0.9-1].
---
projects/oracle-lib-compat/oracle-lib-compat.spec | 6 +++++-
rel-eng/packages/oracle-lib-compat | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
---
10 years, 4 months
projects/oracle-lib-compat rel-eng/packages
by Michael Mraka
projects/oracle-lib-compat/oracle-lib-compat.spec | 6 +++++-
rel-eng/packages/oracle-lib-compat | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 50d572629b9ff4ab0a4ad49148ea89c994171be7
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 22 13:54:35 2014 +0100
Automatic commit of package [oracle-lib-compat] release [11.2.0.9-1].
diff --git a/projects/oracle-lib-compat/oracle-lib-compat.spec b/projects/oracle-lib-compat/oracle-lib-compat.spec
index 70f55a5..e9eda10 100644
--- a/projects/oracle-lib-compat/oracle-lib-compat.spec
+++ b/projects/oracle-lib-compat/oracle-lib-compat.spec
@@ -1,5 +1,5 @@
Name: oracle-lib-compat
-Version: 11.2.0.8
+Version: 11.2.0.9
Release: 1%{?dist}
Summary: Compatibility package so that perl-DBD-Oracle will install
Group: Applications/Multimedia
@@ -105,6 +105,10 @@ find %{_prefix}/lib/oracle/%{icdir} \
| xargs execstack -c
%changelog
+* Wed Jan 22 2014 Michael Mraka <michael.mraka(a)redhat.com> 11.2.0.9-1
+- LD_PRELOAD setup has been moved to spacewalk-setup-tomcat
+- Purging %%changelog entries preceding Spacewalk 1.0, in active packages.
+
* Tue Dec 04 2012 Jan Pazdziora 11.2.0.8-1
- On Fedoras, start to use tomcat >= 7.
diff --git a/rel-eng/packages/oracle-lib-compat b/rel-eng/packages/oracle-lib-compat
index 4866be4..fd7110a 100644
--- a/rel-eng/packages/oracle-lib-compat
+++ b/rel-eng/packages/oracle-lib-compat
@@ -1 +1 @@
-11.2.0.8-1 projects/oracle-lib-compat/
+11.2.0.9-1 projects/oracle-lib-compat/
10 years, 4 months
Changes to 'refs/tags/spacewalk-setup-2.1.9-1'
by Michael Mraka
Tag 'spacewalk-setup-2.1.9-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2014-01-22 12:53 +0000
Tagging package [spacewalk-setup] version [2.1.9-1] in directory [spacewalk/setup/].
Changes since spacewalk-repo-2.1.1-1:
Michael Mraka (4):
modified tomcat setup to work also on Fedora 20
spacewalk-setup-tomcat packaging
LD_PRELOAD setup has been moved to spacewalk-setup-tomcat
Automatic commit of package [spacewalk-setup] release [2.1.9-1].
---
projects/oracle-lib-compat/oracle-lib-compat.spec | 13 -
projects/oracle-lib-compat/tomcat-setenv.sh | 12 -
rel-eng/packages/spacewalk-setup | 2
spacewalk/setup/Makefile.PL | 2
spacewalk/setup/bin/spacewalk-setup | 85 ----------
spacewalk/setup/bin/spacewalk-setup-tomcat | 186 ++++++++++++++++++++++
spacewalk/setup/share/tomcat.1 | 2
spacewalk/setup/share/tomcat.2 | 1
spacewalk/setup/share/tomcat.3 | 1
spacewalk/setup/share/tomcat.4 | 2
spacewalk/setup/share/tomcat.5 | 2
spacewalk/setup/share/tomcat.java_opts | 1
spacewalk/setup/spacewalk-setup.spec | 7
13 files changed, 203 insertions(+), 113 deletions(-)
---
10 years, 4 months
4 commits - projects/oracle-lib-compat rel-eng/packages spacewalk/setup
by Michael Mraka
projects/oracle-lib-compat/oracle-lib-compat.spec | 13 -
projects/oracle-lib-compat/tomcat-setenv.sh | 12 -
rel-eng/packages/spacewalk-setup | 2
spacewalk/setup/Makefile.PL | 2
spacewalk/setup/bin/spacewalk-setup | 85 ----------
spacewalk/setup/bin/spacewalk-setup-tomcat | 186 ++++++++++++++++++++++
spacewalk/setup/share/tomcat.1 | 2
spacewalk/setup/share/tomcat.2 | 1
spacewalk/setup/share/tomcat.3 | 1
spacewalk/setup/share/tomcat.4 | 2
spacewalk/setup/share/tomcat.5 | 2
spacewalk/setup/share/tomcat.java_opts | 1
spacewalk/setup/spacewalk-setup.spec | 7
13 files changed, 203 insertions(+), 113 deletions(-)
New commits:
commit 28fe717933ea4dddb20802cea0502c10e3e7da7c
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 22 13:53:40 2014 +0100
Automatic commit of package [spacewalk-setup] release [2.1.9-1].
diff --git a/rel-eng/packages/spacewalk-setup b/rel-eng/packages/spacewalk-setup
index 5727fa0..c99c35a 100644
--- a/rel-eng/packages/spacewalk-setup
+++ b/rel-eng/packages/spacewalk-setup
@@ -1 +1 @@
-2.1.8-1 spacewalk/setup/
+2.1.9-1 spacewalk/setup/
diff --git a/spacewalk/setup/spacewalk-setup.spec b/spacewalk/setup/spacewalk-setup.spec
index cce5cbe..6ed0d73 100644
--- a/spacewalk/setup/spacewalk-setup.spec
+++ b/spacewalk/setup/spacewalk-setup.spec
@@ -1,7 +1,7 @@
%{!?fedora: %global sbinpath /sbin}%{?fedora: %global sbinpath %{_sbindir}}
Name: spacewalk-setup
-Version: 2.1.8
+Version: 2.1.9
Release: 1%{?dist}
Summary: Initial setup tools for Red Hat Spacewalk
@@ -105,6 +105,9 @@ rm -rf %{buildroot}
%doc LICENSE
%changelog
+* Wed Jan 22 2014 Michael Mraka <michael.mraka(a)redhat.com> 2.1.9-1
+- modified tomcat setup to work also on Fedora 20
+
* Tue Jan 14 2014 Matej Kollar <mkollar(a)redhat.com> 2.1.8-1
- Updating the copyright years info
commit 0d173c13bb996b81ee65e697a420d7a351532cda
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 22 11:38:51 2014 +0100
LD_PRELOAD setup has been moved to spacewalk-setup-tomcat
diff --git a/projects/oracle-lib-compat/oracle-lib-compat.spec b/projects/oracle-lib-compat/oracle-lib-compat.spec
index 8083f98..70f55a5 100644
--- a/projects/oracle-lib-compat/oracle-lib-compat.spec
+++ b/projects/oracle-lib-compat/oracle-lib-compat.spec
@@ -81,18 +81,6 @@ echo 'diag_adr_enabled = off' > $RPM_BUILD_ROOT/usr/lib/oracle/11.2/client/lib/n
mkdir -p $RPM_BUILD_ROOT/%{_javadir}
ln -s ../../%{_lib}/oracle/%{icdir}/client/lib/ojdbc6.jar $RPM_BUILD_ROOT/%{_javadir}/ojdbc14.jar
-%if 0%{?rhel} && 0%{?rhel} < 6
-%define tomcatname tomcat5
-%else
-%if 0%{?fedora}
-%define tomcatname tomcat
-%else
-%define tomcatname tomcat6
-%endif
-%endif
-install -d $RPM_BUILD_ROOT%{_datadir}/%{tomcatname}/bin
-install tomcat-setenv.sh $RPM_BUILD_ROOT%{_datadir}/%{tomcatname}/bin/setenv.sh
-
%clean
rm -rf $RPM_BUILD_ROOT
@@ -107,7 +95,6 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/oracle-instantclient-%{icdir}.conf
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/oracle-xe.conf
%{_javadir}/ojdbc14.jar
-%{_datadir}/%{tomcatname}/bin/setenv.sh
%post
ldconfig
diff --git a/projects/oracle-lib-compat/tomcat-setenv.sh b/projects/oracle-lib-compat/tomcat-setenv.sh
deleted file mode 100644
index c0b01b3..0000000
--- a/projects/oracle-lib-compat/tomcat-setenv.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-
-# To address bug 623115/627859, we need to override the ldap_* symbols
-# in libclntsh.so* upon tomcat* startup with those from standard library.
-for i in /lib64/security/pam_ldap.so /lib/security/pam_ldap.so ; do
- if [ -f $i ] ; then
- # to force ldd to show the libldap line with => even if LD_PRELOAD was already set
- unset LD_PRELOAD
- export LD_PRELOAD=`ldd $i 2> /dev/null | perl -lne '/^\s+libldap\S+\s+=>\s+(\S+)/ and print $1 and exit'`
- break
- fi
-done
-
commit 4db51cfa8b507bc6fad77bd2648b392f61bd8df2
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 22 11:01:40 2014 +0100
spacewalk-setup-tomcat packaging
diff --git a/spacewalk/setup/Makefile.PL b/spacewalk/setup/Makefile.PL
index 7bb7f09..86df547 100644
--- a/spacewalk/setup/Makefile.PL
+++ b/spacewalk/setup/Makefile.PL
@@ -9,7 +9,7 @@ WriteMakefile(
ABSTRACT_FROM => 'lib/Spacewalk/Setup.pm',
PL_FILES => {},
EXE_FILES => ['bin/spacewalk-setup', 'bin/cobbler20-setup', 'bin/spacewalk-make-mount-points',
- 'bin/spacewalk-setup-cobbler'],
+ 'bin/spacewalk-setup-cobbler', 'bin/spacewalk-setup-tomcat'],
PREREQ_PM => {
'Test::More' => 0,
},
diff --git a/spacewalk/setup/spacewalk-setup.spec b/spacewalk/setup/spacewalk-setup.spec
index 012bc8a..cce5cbe 100644
--- a/spacewalk/setup/spacewalk-setup.spec
+++ b/spacewalk/setup/spacewalk-setup.spec
@@ -80,6 +80,7 @@ install -d -m 755 %{buildroot}/%{_var}/spacewalk
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
/usr/bin/pod2man --section=8 $RPM_BUILD_ROOT/%{_bindir}/spacewalk-make-mount-points | gzip > $RPM_BUILD_ROOT%{_mandir}/man8/spacewalk-make-mount-points.8.gz
/usr/bin/pod2man --section=1 $RPM_BUILD_ROOT/%{_bindir}/spacewalk-setup-cobbler | gzip > $RPM_BUILD_ROOT%{_mandir}/man1/spacewalk-setup-cobbler.1.gz
+/usr/bin/pod2man --section=1 $RPM_BUILD_ROOT/%{_bindir}/spacewalk-setup-tomcat | gzip > $RPM_BUILD_ROOT%{_mandir}/man1/spacewalk-setup-tomcat.1.gz
%check
make test
@@ -95,6 +96,7 @@ rm -rf %{buildroot}
%{_bindir}/spacewalk-setup
%{_bindir}/spacewalk-make-mount-points
%{_bindir}/spacewalk-setup-cobbler
+%{_bindir}/spacewalk-setup-tomcat
%{_bindir}/cobbler20-setup
%{_mandir}/man[13]/*.[13]*
%{_datadir}/spacewalk/*
commit b016950ccf72a3f3d34d01c36fb48e11490f5508
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 22 08:37:28 2014 +0100
modified tomcat setup to work also on Fedora 20
put tomcat_setup() into a separate tool so it can be run multiple times
(e.g. reconfigure tomcat after db backend changes)
diff --git a/spacewalk/setup/bin/spacewalk-setup b/spacewalk/setup/bin/spacewalk-setup
index 8c826bb..38a001b 100755
--- a/spacewalk/setup/bin/spacewalk-setup
+++ b/spacewalk/setup/bin/spacewalk-setup
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# Copyright (c) 2008--2012 Red Hat, Inc.
+# Copyright (c) 2008--2014 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
@@ -553,87 +553,8 @@ sub setup_tomcat {
my $opts = shift;
my $answers = shift;
- my ($tomcatvol, $tomcatdir, $tomcatname);
-
- for my $conf_glob ("/etc/sysconfig/tomcat{5,6,}", "/etc/tomcat*/tomcat*.conf") {
- my ($conf_vol, $conf_dir, $conf_file) = File::Spec->splitpath($conf_glob);
- my ($tomcatconf_content_orig, $tomcatconf_content);
- my @tomcat_confs = grep { -f $_ } glob($conf_glob);
- if (@tomcat_confs < 1) {
- die "Couldn't find tomcat config file ($conf_glob).\n";
- } elsif (@tomcat_confs > 1) {
- die "Multiple tomcat config files found:\n @tomcat_confs\nNot sure which tomcat to use.\n";
- }
-
- my $tomcatfile = $tomcat_confs[0];
- ($tomcatvol, $tomcatdir, $tomcatname) = File::Spec->splitpath($tomcatfile);
-
- {
- open FILE, '<', $tomcatfile
- or die "Error opening [$tomcatfile]: $!\n";
- local $/ = undef;
- $tomcatconf_content = <FILE>;
- $tomcatconf_content_orig = $tomcatconf_content;
- close FILE;
- }
-
- for my $file (glob Spacewalk::Setup::SHARED_DIR . "/$conf_file.[0-9]") {
- open FILE, '<', $file or die "Error reading [$file]: $!\n";
- my $regexp = <FILE>;
- chomp $regexp;
-
- my $content;
- {
- local $/ = undef;
- $content = <FILE>;
- }
- close FILE;
- defined($content) or $content = '';
- $tomcatconf_content =~ s!$regexp!$content!gm or $tomcatconf_content .= $content;
- }
-
- if ($tomcatconf_content ne $tomcatconf_content_orig) {
- Spacewalk::Setup::backup_file($tomcatdir, $tomcatname);
-
- open FILE, '>', $tomcatfile
- or die "Error opening [$tomcatfile]: $!\n";
- chmod 0644, $tomcatfile;
- print FILE $tomcatconf_content;
- close FILE;
- }
-}
-
- my $serverxmlfile = "$tomcatdir/server.xml";
- {
- local $/ = undef;
- local *FILE;
- open FILE, '<', $serverxmlfile
- or die "Error opening [$serverxmlfile]: $!\n";
- my $serverxml_content_orig = <FILE>;
- close FILE;
-
- my $template = Spacewalk::Setup::SHARED_DIR . '/server.xml.xsl';
- my $serverxml_content = qx{/usr/bin/xsltproc $template $serverxmlfile};
- die "There was an error running xsltproc\n" if $?;
- if ($serverxml_content ne $serverxml_content_orig) {
- Spacewalk::Setup::backup_file($serverxmlfile =~ m!^(.+)/(.+)$!);
-
- open FILE, '>', $serverxmlfile
- or die "Error opening [$serverxmlfile]: $!\n";
- chmod 0644, $serverxmlfile;
- print FILE $serverxml_content;
- close FILE;
- }
- }
-
- my $web_patch = Spacewalk::Setup::SHARED_DIR."/web.xml.patch";
- my $command = "patch --silent --directory=$tomcatdir --forward -p1 --input=$web_patch";
- system($command." --dry-run");
- if (not $?){
- Spacewalk::Setup::backup_file($tomcatdir, 'web.xml');
-
- system($command);
- }
+ Spacewalk::Setup::system_or_exit(['/usr/bin/spacewalk-setup-tomcat', ''], 43,
+ 'Could not setup tomcat.');
return;
}
diff --git a/spacewalk/setup/bin/spacewalk-setup-tomcat b/spacewalk/setup/bin/spacewalk-setup-tomcat
new file mode 100755
index 0000000..47fbafd
--- /dev/null
+++ b/spacewalk/setup/bin/spacewalk-setup-tomcat
@@ -0,0 +1,186 @@
+#!/usr/bin/perl
+#
+# Copyright (c) 2014 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+
+use strict;
+use Spacewalk::Setup;
+use File::Spec;
+
+use constant ORACLE_LDCONF => "/etc/ld.so.conf.d/oracle-instantclient-11.2.conf";
+use constant TOMCAT_PAM_LDAP => "/lib{64,}/security/pam_ldap.so";
+use constant TOMCAT_JAVA_OPTS =>
+ File::Spec->catfile(Spacewalk::Setup::SHARED_DIR, "tomcat.java_opts");
+
+sub java_opts {
+ my $ret = '';
+ if (-r TOMCAT_JAVA_OPTS) {
+ open F, '<', TOMCAT_JAVA_OPTS
+ or die "Error reading [" + TOMCAT_JAVA_OPTS + "]: $!\n";
+ $ret = <F>;
+ close(F);
+ chomp($ret);
+ $ret = qq{JAVA_OPTS="$ret"\n};
+ }
+ return $ret;
+}
+
+sub ld_preload {
+ # To address bug 623115/627859, we need to override the ldap_* symbols
+ # in libclntsh.so* upon tomcat* startup with those from standard library.
+ my $ret = '';
+ if (-r ORACLE_LDCONF) {
+ for my $lib (glob TOMCAT_PAM_LDAP) {
+ if (-f $lib) {
+ my $out = qx{ldd $lib 2> /dev/null};
+ $ret = "LD_PRELOAD=$1\n" if $out =~ /^\s+libldap\S+\s+=>\s+(\S+)/m;
+ last;
+ }
+ }
+ }
+ return $ret;
+}
+
+sub ld_library_path {
+ my $ret = '';
+ if (-r ORACLE_LDCONF) {
+ open F, '<', ORACLE_LDCONF
+ or die "Error reading [" + ORACLE_LDCONF + "]: $!\n";
+ $ret = "LD_LIBRARY_PATH=" . <F>;
+ close(F);
+ }
+ return $ret;
+}
+
+sub setup_tomcat {
+ my %macros = (JAVA_OPTS => java_opts(),
+ LD_PRELOAD => ld_preload(),
+ LD_LIBRARY_PATH => ld_library_path(),
+ );
+
+ my ($tomcatvol, $tomcatdir, $tomcatname);
+
+ for my $conf_glob ("/etc/sysconfig/tomcat{5,6,}", "/etc/tomcat*/tomcat*.conf") {
+ my ($conf_vol, $conf_dir, $conf_file) = File::Spec->splitpath($conf_glob);
+ my ($tomcatconf_content_orig, $tomcatconf_content);
+ my @tomcat_confs = grep { -f $_ } glob($conf_glob);
+ if (@tomcat_confs < 1) {
+ die "Couldn't find tomcat config file ($conf_glob).\n";
+ } elsif (@tomcat_confs > 1) {
+ die "Multiple tomcat config files found:\n @tomcat_confs\nNot sure which tomcat to use.\n";
+ }
+
+ my $tomcatfile = $tomcat_confs[0];
+ ($tomcatvol, $tomcatdir, $tomcatname) = File::Spec->splitpath($tomcatfile);
+
+ {
+ open FILE, '<', $tomcatfile
+ or die "Error opening [$tomcatfile]: $!\n";
+ local $/ = undef;
+ $tomcatconf_content = <FILE>;
+ $tomcatconf_content_orig = $tomcatconf_content;
+ close FILE;
+ }
+
+ for my $file (glob Spacewalk::Setup::SHARED_DIR . "/$conf_file.[0-9]") {
+ open FILE, '<', $file or die "Error reading [$file]: $!\n";
+ my $regexp = <FILE>;
+ chomp $regexp;
+
+ my $content;
+ {
+ local $/ = undef;
+ $content = <FILE>;
+ }
+ close FILE;
+ if (defined($content)) {
+ for my $key (keys %macros) {
+ $content =~ s/\@$key\@(\n)?/$macros{$key}/;
+ }
+ } else {
+ $content = '';
+ }
+ $tomcatconf_content =~ s!$regexp!$content!gm or $tomcatconf_content .= $content;
+ }
+
+ if ($tomcatconf_content ne $tomcatconf_content_orig) {
+ Spacewalk::Setup::backup_file($tomcatdir, $tomcatname);
+
+ open FILE, '>', $tomcatfile
+ or die "Error opening [$tomcatfile]: $!\n";
+ chmod 0644, $tomcatfile;
+ print FILE $tomcatconf_content;
+ close FILE;
+ }
+ }
+
+ my $serverxmlfile = "$tomcatdir/server.xml";
+ {
+ local $/ = undef;
+ local *FILE;
+ open FILE, '<', $serverxmlfile
+ or die "Error opening [$serverxmlfile]: $!\n";
+ my $serverxml_content_orig = <FILE>;
+ close FILE;
+
+ my $template = Spacewalk::Setup::SHARED_DIR . '/server.xml.xsl';
+ my $serverxml_content = qx{/usr/bin/xsltproc $template $serverxmlfile};
+ die "There was an error running xsltproc\n" if $?;
+ if ($serverxml_content ne $serverxml_content_orig) {
+ Spacewalk::Setup::backup_file($serverxmlfile =~ m!^(.+)/(.+)$!);
+
+ open FILE, '>', $serverxmlfile
+ or die "Error opening [$serverxmlfile]: $!\n";
+ chmod 0644, $serverxmlfile;
+ print FILE $serverxml_content;
+ close FILE;
+ }
+ }
+
+ my $web_patch = Spacewalk::Setup::SHARED_DIR."/web.xml.patch";
+ my $command = "patch --silent --directory=$tomcatdir --forward -p1 --input=$web_patch";
+ system($command." --dry-run");
+ if (not $?){
+ Spacewalk::Setup::backup_file($tomcatdir, 'web.xml');
+
+ system($command);
+ }
+ return;
+}
+
+setup_tomcat();
+
+=head1 NAME
+
+spacewalk-setup-tomcat - utility for configuring tomcat service to work with
+Spacewalk / Satellite
+
+=head1 SYNOPSIS
+
+B<spacewalk-setup-tomcat>
+
+=head1 DESCRIPTION
+
+B<spacewalk-setup-tomcat> is a utility for configuring tomcat to work
+with Spacewalk / Satellite. The script modifies existing tomcat configuration,
+especially LD_LIBRARY_PATH, LD_PRELOAD and JAVA_OPTS variables, to work with
+specified database backend.
+
+Ordinarily, spacewalk-setup-tomcat is called by spacewalk-setup(1) during
+initial Spacewalk / Satellite configuration or upgrade.
+
+=head1 SEE ALSO
+
+B<spacewalk-setup>(1) - Spacewalk setup program
+
+=cut
diff --git a/spacewalk/setup/share/tomcat.1 b/spacewalk/setup/share/tomcat.1
index 47c01a5..65b994e 100644
--- a/spacewalk/setup/share/tomcat.1
+++ b/spacewalk/setup/share/tomcat.1
@@ -1,2 +1,2 @@
^JAVA_OPTS="(\$JAVA_OPTS )?-ea -Xms256m -Xmx256m -Djava.awt.headless=true -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser -Dorg.apache.tomcat.util.http.Parameters.MAX_COUNT=1024 -XX:MaxNewSize=256 -XX:-UseConcMarkSweepGC"\n
-JAVA_OPTS="$JAVA_OPTS -ea -Xms256m -Xmx256m -Djava.awt.headless=true -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser -Dorg.apache.tomcat.util.http.Parameters.MAX_COUNT=1024 -XX:MaxNewSize=256 -XX:-UseConcMarkSweepGC"
+@JAVA_OPTS@
diff --git a/spacewalk/setup/share/tomcat.2 b/spacewalk/setup/share/tomcat.2
index 39a50a0..a564ca4 100644
--- a/spacewalk/setup/share/tomcat.2
+++ b/spacewalk/setup/share/tomcat.2
@@ -1,2 +1 @@
^_HACK_AROUND_PARSEOPTIONS=1; test -f /etc/ld.so.conf.d/oracle-instantclient-11.2.conf.+LD_LIBRARY_PATH=.+\n
-_HACK_AROUND_PARSEOPTIONS=1; test -f /etc/ld.so.conf.d/oracle-instantclient-11.2.conf && export LD_LIBRARY_PATH=$(cat /etc/ld.so.conf.d/oracle-instantclient-11.2.conf)
diff --git a/spacewalk/setup/share/tomcat.3 b/spacewalk/setup/share/tomcat.3
index c416b8e..0d3cb6a 100644
--- a/spacewalk/setup/share/tomcat.3
+++ b/spacewalk/setup/share/tomcat.3
@@ -1,2 +1 @@
^_HACK_AROUND_PARSEOPTIONS=1; test.+setenv\.sh\n
-_HACK_AROUND_PARSEOPTIONS=1; test -f $CATALINA_HOME/bin/setenv.sh && . $CATALINA_HOME/bin/setenv.sh
diff --git a/spacewalk/setup/share/tomcat.4 b/spacewalk/setup/share/tomcat.4
new file mode 100644
index 0000000..6266385
--- /dev/null
+++ b/spacewalk/setup/share/tomcat.4
@@ -0,0 +1,2 @@
+^LD_LIBRARY_PATH=.+\n
+@LD_LIBRARY_PATH@
diff --git a/spacewalk/setup/share/tomcat.5 b/spacewalk/setup/share/tomcat.5
new file mode 100644
index 0000000..8db871d
--- /dev/null
+++ b/spacewalk/setup/share/tomcat.5
@@ -0,0 +1,2 @@
+^LD_PRELOAD=.+\n
+@LD_PRELOAD@
diff --git a/spacewalk/setup/share/tomcat.java_opts b/spacewalk/setup/share/tomcat.java_opts
new file mode 100644
index 0000000..1fffafb
--- /dev/null
+++ b/spacewalk/setup/share/tomcat.java_opts
@@ -0,0 +1 @@
+-ea -Xms256m -Xmx256m -Djava.awt.headless=true -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser -Dorg.apache.tomcat.util.http.Parameters.MAX_COUNT=1024 -XX:MaxNewSize=256 -XX:-UseConcMarkSweepGC
10 years, 4 months
Changes to 'refs/tags/spacewalk-repo-2.1.1-1'
by Michael Mraka
Tag 'spacewalk-repo-2.1.1-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2014-01-22 12:39 +0000
Tagging package [spacewalk-repo] version [2.1.1-1] in directory [spec-tree/spacewalk-repo/].
Changes since spacewalk-repo-2.1.0-2:
Michael Mraka (2):
reverted tagger to VersionTagger
Automatic commit of package [spacewalk-repo] release [2.1.1-1].
---
rel-eng/packages/spacewalk-repo | 2 +-
spec-tree/spacewalk-repo/spacewalk-repo.spec | 7 +++++--
spec-tree/spacewalk-repo/tito.props | 1 -
3 files changed, 6 insertions(+), 4 deletions(-)
---
10 years, 4 months
2 commits - rel-eng/packages spec-tree/spacewalk-repo
by Michael Mraka
rel-eng/packages/spacewalk-repo | 2 +-
spec-tree/spacewalk-repo/spacewalk-repo.spec | 7 +++++--
spec-tree/spacewalk-repo/tito.props | 1 -
3 files changed, 6 insertions(+), 4 deletions(-)
New commits:
commit 9f46e97d0e33ed9ae0037191de9e079eaef92dd2
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 22 13:39:38 2014 +0100
Automatic commit of package [spacewalk-repo] release [2.1.1-1].
diff --git a/rel-eng/packages/spacewalk-repo b/rel-eng/packages/spacewalk-repo
index 9165e95..eb3ac0e 100644
--- a/rel-eng/packages/spacewalk-repo
+++ b/rel-eng/packages/spacewalk-repo
@@ -1 +1 @@
-2.1.0-2 spec-tree/spacewalk-repo/
+2.1.1-1 spec-tree/spacewalk-repo/
diff --git a/spec-tree/spacewalk-repo/spacewalk-repo.spec b/spec-tree/spacewalk-repo/spacewalk-repo.spec
index 58a19eb..e53092d 100644
--- a/spec-tree/spacewalk-repo/spacewalk-repo.spec
+++ b/spec-tree/spacewalk-repo/spacewalk-repo.spec
@@ -1,6 +1,6 @@
Summary: Spacewalk packages yum repository configuration
Name: spacewalk-repo
-Version: 2.1.0
+Version: 2.1.1
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Base
@@ -96,6 +96,9 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace) %{_sysconfdir}/yum.repos.d/spacewalk-client-nightly.repo
%changelog
+* Wed Jan 22 2014 Michael Mraka <michael.mraka(a)redhat.com> 2.1.1-1
+- reverted tagger to VersionTagger
+
* Wed Jan 22 2014 Michael Mraka <michael.mraka(a)redhat.com> 2.1.0-2
- make spacewalk*.repo on Fedora more generic
commit b0add725c8252f41d45166631057115afc6c1c00
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 22 13:38:01 2014 +0100
reverted tagger to VersionTagger
fixing
Tag [spacewalk-repo-2.1.0-2] does not end with [-1]
diff --git a/spec-tree/spacewalk-repo/spacewalk-repo.spec b/spec-tree/spacewalk-repo/spacewalk-repo.spec
index 2cfcd3e..58a19eb 100644
--- a/spec-tree/spacewalk-repo/spacewalk-repo.spec
+++ b/spec-tree/spacewalk-repo/spacewalk-repo.spec
@@ -1,7 +1,7 @@
Summary: Spacewalk packages yum repository configuration
Name: spacewalk-repo
Version: 2.1.0
-Release: 2%{?dist}
+Release: 1%{?dist}
License: GPLv2
Group: System Environment/Base
# This src.rpm is cannonical upstream
diff --git a/spec-tree/spacewalk-repo/tito.props b/spec-tree/spacewalk-repo/tito.props
index 2a8b6d9..355908e 100644
--- a/spec-tree/spacewalk-repo/tito.props
+++ b/spec-tree/spacewalk-repo/tito.props
@@ -1,3 +1,2 @@
[buildconfig]
builder = spacewalkx.builderx.NoTgzBuilder
-tagger = tito.tagger.ReleaseTagger
10 years, 4 months