Hello community,

here is the log from the commit of package otrs.12398 for 
openSUSE:Leap:15.1:Update checked in at 2020-04-25 18:09:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.1:Update/otrs.12398 (Old)
 and      /work/SRC/openSUSE:Leap:15.1:Update/.otrs.12398.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "otrs.12398"

Sat Apr 25 18:09:36 2020 rev:1 rq:796295 version:5.0.42

Changes:
--------
New Changes file:

--- /dev/null   2020-04-14 14:47:33.391806949 +0200
+++ /work/SRC/openSUSE:Leap:15.1:Update/.otrs.12398.new.2738/otrs.changes       
2020-04-25 18:09:42.980612716 +0200
@@ -0,0 +1,3694 @@
+-------------------------------------------------------------------
+Tue Apr  7 21:05:42 UTC 2020 - ch...@computersalat.de
+
+- Update to 5.0.42
+  https://community.otrs.com/otrs-community-edition-5s-patch-level-42/
+- fix for boo#1168029 (CVE-2020-1773, OSA-2020-10)
+  * Session / Password / Password token leak
+    An attacker with the ability to generate session IDs or password
+    reset tokens, either by being able to authenticate or by exploiting
+    OSA-2020-09, may be able to predict other users session IDs,
+    password reset tokens and automatically generated passwords.
+- fix for boo#1168029 (CVE-2020-1772, OSA-2020-09)
+  * Information Disclosure
+    It’s possible to craft Lost Password requests with wildcards in
+    the Token value, which allows attacker to retrieve valid Token(s),
+    generated by users which already requested new passwords.
+- fix for boo#1168030 (CVE-2020-1771, OSA-2020-08)
+  * Possible XSS in Customer user address book
+    Attacker is able craft an article with a link to the customer
+    address book with malicious content (JavaScript). When agent opens
+    the link, JavaScript code is executed due to the missing parameter
+    encoding.
+- fix for boo#1168031 (CVE-2020-1770, OSA-2020-07)
+  * Information disclosure in support bundle files
+    Support bundle generated files could contain sensitive information
+    that might be unwanted to be disclosed.
+- fix for boo#1168032 (CVE-2020-1769, OSA-2020-06)
+  * Autocomplete in the form login screens
+    In the login screens (in agent and customer interface), Username
+    and Password fields use autocomplete, which might be considered
+    as security issue.
+- Update to 5.0.41
+  https://community.otrs.com/otrs-community-edition-5s-patch-level-41/
+  * bug#14912 - Installer refers to non-existing documentation
+- add code to upgrade OTRS from 4 to 5
+  READ UPGRADING.SUSE
+  * steps 1 to 4 are done by rpm pkg
+  * steps 5 to *END* need to be done manully cause of DB backup
+- BuildRequire pkgconfig(systemd) instead of systemd: allow OBS to
+  shortcut through the -mini flavors.  
+
+-------------------------------------------------------------------
+Fri Jan 10 17:46:02 UTC 2020 - ch...@computersalat.de
+
+- Update to 5.0.40
+  https://community.otrs.com/otrs-community-edition-5s-patch-level-40/
+- fix for boo#1160663
+  * (CVE-2020-1766, OSA-2020-02)
+    Improper handling of uploaded inline images
+    Due to improper handling of uploaded images it is possible in very
+    unlikely and rare conditions to force the agents browser to execute
+    malicious javascript from a special crafted SVG file rendered as
+    inline jpg file.
+  * (CVE-2020-1765, OSA-2020-01)
+    Spoofing of From field in several screens
+    An improper control of parameters allows the spoofing of the from
+    fields of the following screens:
+    AgentTicketCompose, AgentTicketForward, AgentTicketBounce and
+    AgentTicketEmailOutbound
+  * run bin/otrs.Console.pl Maint::Config::Rebuild after the upgrade
+- !!! This is latest update for 5.0.x Release by OTRS !!!
+
+-------------------------------------------------------------------
+Sat Dec 28 18:16:25 UTC 2019 - ch...@computersalat.de
+
+- Update 5.0.39
+  https://community.otrs.com/otrs-community-edition-5s-patch-level-39/
+- fix for boo#1157001
+  * (CVE-2019-18180, OSA-2019-15)
+    Denial of service
+    OTRS can be put into an endless loop by providing filenames with
+    overly long extensions. This applies to the PostMaster
+    (sending in email) and also upload
+    (attaching files to mails, for example).
+  * (CVE-2019-18179, OSA-2019-14)
+    Information Disclosure
+    An attacker who is logged into OTRS as an agent is able to list
+    tickets assigned to other agents, which are in the queue where
+    attacker doesn’t have permissions.
+
+-------------------------------------------------------------------
+Sun Nov 10 13:42:13 UTC 2019 - ch...@computersalat.de
+
+- Update to 5.0.38
+  https://community.otrs.com/release-notes-otrs-5s-patch-level-38/
+- fix for boo#1156431
+  * (CVE-2019-16375, OSA-2019-13)
+    Stored XXS
+    An attacker who is logged into OTRS as an agent or customer user
+    with appropriate permissions can create a carefully crafted
+    string containing malicious JavaScript code as an article body.
+    This malicious code is executed when an agent compose an answer
+    to the original article.
+
+-------------------------------------------------------------------
+Sat Jul 20 11:50:04 UTC 2019 - ch...@computersalat.de
+
+- Update to 5.0.37
+  https://community.otrs.com/release-notes-otrs-5s-patch-level-37/
+- fix for boo#1141432
+  * (CVE-2019-13458, OSA-2019-12)
+    Information Disclosure
+    An attacker who is logged into OTRS as an agent user with
+    appropriate permissions can leverage OTRS tags in templates in
+    order to disclose hashed user passwords.
+- fix for boo#1141431
+  * (CVE-2019-13457, OSA-2019-11)
+    Information Disclosure
+    A customer user can use the search results to disclose information
+    from their “company” tickets (with the same CustomerID), even when
+    CustomerDisableCompanyTicketAccess setting is turned on.
+- fix for boo#1141430
+  * (CVE-2019-12746, OSA-2019-10)
+    Session ID Disclosure
+    A user logged into OTRS as an agent might unknowingly disclose
+    their session ID by sharing the link of an embedded ticket article
+    with third parties. This identifier can be then potentially abused
+    in order to impersonate the agent user.
+
+-------------------------------------------------------------------
+Sat Jun 29 10:50:27 UTC 2019 - ch...@computersalat.de
+
+- Update to 5.0.36
+  https://community.otrs.com/release-notes-otrs-5s-patch-level-36/
+- fix for boo#1137614
+  * (CVE-2019-12497, OSA-2019-09)
+    Information Disclosure
+    In the customer or external frontend, personal information of agents
+    can be disclosed like Name and mail address in external notes.
+- fix for boo#1137615
+  * (CVE-2019-12248, OSA-2019-08)
+    Loading External Image Resources
+    An attacker could send a malicious email to an OTRS system. If a
+    logged in agent user quotes it, the email could cause the browser
+    to load external image resources.
+- Update to 5.0.35
+  https://community.otrs.com/release-notes-otrs-5s-patch-level-35/
+- fix for boo#1139406
+  * (CVE-2019-10067, OSA-2019-05)
+    Reflected and Stored XSS
+    An attacker who is logged into OTRS as an agent user with appropriate
+    permissions may manipulate the URL to cause execution of JavaScript
+    in the context of OTRS.
+- fix for boo#1139406
+  * (CVE-2019-9892, OSA-2019-04)
+    XXE Processing
+    An attacker who is logged into OTRS as an agent user with appropriate
+    permissions may try to import carefully crafted Report Statistics XML
+    that will result in reading of arbitrary files of OTRS filesystem.
+- rebase otrs-perm_test.patch
+
+-------------------------------------------------------------------
+Sat Jun 22 22:33:42 UTC 2019 - ch...@computersalat.de
+
+- update missing CVE for OSA-2018-10, OSA-2019-01
+
+-------------------------------------------------------------------
+Sat Jan 19 14:08:22 UTC 2019 - ch...@computersalat.de
+
+- Update to 5.0.34
+  * https://community.otrs.com/release-notes-otrs-5s-patch-level-34/
+- fix for boo#1122560
+  * (CVE-2019-9752, OSA-2019-01)
+    Stored XSS
+    An attacker who is logged into OTRS as an agent or a customer user
+    may upload a carefully crafted resource in order to cause execution
+    of JavaScript in the context of OTRS.
+- Update to 5.0.33
+  * https://community.otrs.com/release-notes-otrs-5s-patch-level-33/
+
+-------------------------------------------------------------------
+Thu Nov 29 14:09:33 UTC 2018 - ch...@computersalat.de
+
+- Update to 4.0.33
+  * https://community.otrs.com/release-notes-otrs-4-patch-level-33/
+- fix for boo#1115416
+  * (CVE-2018-19141, OSA-2018-09)
+    Privilege Escalation
+    An attacker who is logged into OTRS as an admin user may manipulate
+    the URL to cause execution of JavaScript in the context of OTRS.
+  * (CVE-2018-19143, OSA-2018-07)
+    Remote File Deletion
+    An attacker who is logged into OTRS as a user may manipulate the
+    submission form to cause deletion of arbitrary files that the
+    OTRS web server user has write access to.
+
+-------------------------------------------------------------------
+Wed Sep 26 14:16:46 UTC 2018 - ch...@computersalat.de
+
+- Update to 4.0.32
+  * https://community.otrs.com/release-notes-otrs-4-patch-level-32/
+  * https://community.otrs.com/release-notes-otrs-4-patch-level-31/
+  * https://community.otrs.com/release-notes-otrs-4-patch-level-30/
+- fix for boo#1109822 (CVE-2018-16586, OSA-2018-05)
+  * Loading External Image or CSS Resources
+    An attacker could send a malicious email to an OTRS system. If a
+    logged in user opens it, the email could cause the browser to
++++ 3497 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:Leap:15.1:Update/.otrs.12398.new.2738/otrs.changes

New:
----
  UPGRADING.SUSE
  ZZZAuto.pm
  itsm-5.0.42.tar.bz2
  itsm-update.sh
  itsm.README.de
  itsm.README.en
  otrs-5.0.42.tar.bz2
  otrs-httpd_conf.patch
  otrs-perm_test.patch
  otrs.README.de
  otrs.README.en
  otrs.changes
  otrs.init
  otrs.permissions
  otrs.rpmlintrc
  otrs.service
  otrs.service.helper.sh
  otrs.spec
  sysconfig.otrs

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ otrs.spec ++++++
++++ 630 lines (skipped)

++++++ UPGRADING.SUSE ++++++
Upgrading OTRS from 4 to 5
===========================

These instructions are for people upgrading OTRS from 4 to 5 or from a 5
to a later patchlevel release 5 and applies both for RPM and source code 
(tarball) upgrades.

If you are running a lower version of OTRS you have to follow the upgrade path 
to 4 first
(1.1->1.2->1.3->2.0->2.1->2.2->2.3->2.4->3.0->3.1->3.2->3.3->4)! You need to 
perform a full
upgrade to every version in between, including database changes and the 
upgrading Perl script. 

Please note that if you upgrade from OTRS 2.2 or earlier, you have to take an 
extra step.

Within a single minor version you can skip patch level releases if you want to 
upgrade.
For instance you can upgrade directly from OTRS 5 patchlevel 2 to version 5 
patchlevel 6.
If you need to do such a "patch level upgrade", you should skip steps 6, 11, 13 
and 14. 

It is highly recommended to perform a test update on a separate testing machine 
first. 


1. Stop all relevant services
-----------------------------

e. g. (depends on used services):

    shell> rcotrs stop
    shell> rcotrs-scheduler stop
    shell> rcapache2 stop

2. Backup everything below @OTRS_ROOT@ (default: OTRS_ROOT=@OTRS_ROOT@)
---------------------------------------------------------------------

- Kernel/Config.pm
- Kernel/Config/GenericAgent.pm
- Kernel/Config/Files/ZZZAuto.pm
- var/*
- as well as the database


3. Make sure that you have backed up everything ;-)
---------------------------------------------------


4. Install the new release (RPM)
--------------------------------

    shell> rpm -Uvh otrs-4.0.*noarch.rpm

The RPM-update will keep the old configuration files.

- Kernel/Config.pm
- Kernel/Config/GenericAgent.pm
- Kernel/Config/Files/ZZZAuto.pm (will be overwritten by itsm)

You must use the new files *.rpmnew

- Kernel/Config.pm.rpmnew

    shell> cp -a Kernel/Config.pm Kernel/Config.pm.backup
    shell> mv Kernel/Config.pm.rpmnew Kernel/Config.pm

Then modify Kernel/Config.pm to adapt your settings (e.g. DB connection)


5. Check needed Perl modules
----------------------------

    shell> @OTRS_ROOT@/bin/otrs.CheckModules.pl


6. Apply the database changes
-----------------------------

     shell> cd @OTRS_ROOT@


### SCHEMA UPDATE

MySQL:

 Note: new tables created in the MySQL UPGRADING process will be created with 
the
 default table storage engine set in your MySQL server.
 In MySQL 5.5 the new default type is InnoDB.
 If existing tables, e.g. "users", have the table storage engine e.g. MyISAM,
 then an error will be displayed when creating the foreign key constraints.

 You have two options: you can change the default storage engine of MySQL back 
to MyISAM
 so that new tables will have the same engine as the existing tables,
 or change the existing tables to use InnoDB as storage engine.

 Any problems with regards to the storage engine will be reported by the
 `otrs.CheckDB.pl` script, so please run it to check for possible issues.

    shell> bin/otrs.CheckDB.pl
    shell> cat scripts/DBUpdate-to-4.mysql.sql | mysql -p -f -u root otrs

PostgreSQL 8.2+:

    shell> cat scripts/DBUpdate-to-4.postgresql.sql | psql --set 
ON_ERROR_STOP=on --single-transaction otrs otrs


### DATABASE MIGRATION SCRIPT

 Run the migration script (as user `otrs`, NOT as `root`):

    shell> scripts/DBUpdate-to-5.pl

 Do not continue the upgrading process if this script did not work properly for 
you.
 Otherwise data loss may occur.


7. Refresh the configuration cache and delete caches
-----------------------------------------------------

Please run (as user `otrs`, NOT as `root`):

    shell> cd /srv/otrs/
    shell> bin/otrs.Console.pl Maint::Config::Rebuild
    shell> bin/otrs.Console.pl Maint::Cache::Delete


8. Restart your services
-------------------------

e. g. (depends on used services):

    shell> rcapache start
    shell> rcotrs start
    shell> rcotrs-scheduler start

Now you can log into your system.


9. Check installed packages
----------------------------

Note: The OTRS packages of 4 are NOT compatible with OTRS 5, so you have to 
perform a package upgrade! 

The following packages are automatically uninstalled after the upgrade process 
(if they where
installed before):

- OTRSGenericInterfaceMappingXSLT


10. Configure NodeIDs (only for multi-frontend clustered setups)
-----------------------------------------------------------------

Note: This step is only needed if you have a clustered setup with several 
frontend machines.

>From OTRS 5 on, every frontend server needs to have its own unique NodeID.
This defaults to 1 and thus does not need to be configured for single-frontend
setups. If you have more than one machine, each machine needs to have this
value set to a unique value between 1 and 999. This configuration needs to be
done in the file Kernel/Config.pm:

$Self->{'NodeID'} =  '2';   # assign a unique value for every frontend server


11. Update and activate cronjobs
---------------------------------

There are two default OTRS cron files in /srv/otrs/var/cron/*.dist, and their
purpose is to make sure that the OTRS Daemon is running. They need to be
activated by copying them without the ".dist" filename extension.

    shell> cd /srv/otrs/var/cron
    shell> for foo in *.dist; do cp $foo `basename $foo .dist`; done
            

To schedule these cron jobs on your system, you can use the script Cron.sh with 
the otrs user.

    shell> /srv/otrs/bin/Cron.sh start
            

Please note that if you had any custom cron jobs, you should consider moving
them to SysConfig (Daemon -> Daemon::SchedulerCronTaskManager::Task) to have
them executed by the OTRS daemon as well. You might also need to adapt your
custom scripts, because now most OTRS commands are managed by
bin/otrs.Console.pl instead of single scripts.

Note: The console command Dev::Code::Generate::ConsoleCommand can help to
create new console commands for your custom scripts. This command creates a
template where the script logic and its parameters can be adapted.


12: Review your ticket notifications
-------------------------------------

With OTRS 5 ticket notifications are configured differently than in previous
versions. They are now part of the "Event Notifications" that were previously
available as well (now called just "Ticket Notifications"). Your existing
ticket notifications have been migrated into the list of ticket notifications,
but deactivated. You have also received the new default ticket notifications,
active by default.

In case you did not modify the old ticket notifications you don't have to do
anything. If you have made local modifications or translations, you have two
choices: a) you can migrate your modifications to the new ticket notifications
(recommended) or b) you can deactivate the new notifications and activate the
old notifications again.

Please also review the escalation notification recipient settings and see if
they match with your expectations (agents who have the ticket in one of their
custom queues vs. all agents with read permissions). This was configured via a
setting in the file Kernel/Config/GenericAgent.pm (now obsolete) previously and
can now be controlled via the GUI for each notification separately.


13: Update system registration (optional)
------------------------------------------

If the system is already registered with OTRS Group, it is strongly recommended
to update the registration information at this time. This will update the
registered version of the system (among other changes) in the OTRS Group
records, in order to get much accurate information from the cloud services.

If you don't update the registration information manually, it will be done
automatically on a regular basis, but this could happen some hours or days
after. During this period it might be possible to get wrong information from
cloud services like OTRS Business Solution™ updates.

    shell> cd /srv/otrs/
    shell> bin/otrs.Console.pl Maint::Registration::UpdateSend --force
    shell> bin/otrs.Console.pl Maint::Cache::Delete
            

14: Migrate custom Perl based GenericAgent jobs (optional)
-----------------------------------------------------------

This is only relevant if you had any custom GenericAgent jobs in Perl OTRS 4
configuration files such as Kernel/Config/GenericAgent.pm that cannot be handled
with the regular ticket notifications. Such jobs now need to be registered as
OTRS Daemon cron tasks in the SysConfig
    (Daemon -> Daemon::SchedulerCronTaskManager::Task),
in order to be executed on a regular basis.

There are 5 settings in the SysConfig prepared for this purpose
 (Daemon::SchedulerCronTaskManager::Task###GenericAgentFile1 to
 Daemon::SchedulerCronTaskManager::Task###GenericAgentFile5).
If more settings are needed they can be added in a custom SysConfig setting 
file.

Please replace "<ModuleName>" with the file that contains the custom
GenericAgent jobs configuration, e.g. Kernel::Config::GenericAgent for the file:
Kernel/Config/GenericAgent.pm, set the schedule to match the periodicity as it
was executed before, mark the setting as active and save the changes.
Note

To get more information about other parameters that can be used while running
the GenericAgent jobs, please execute:

    shell> bin/otrs.Console.pl Maint::GenericAgent::Run --help
            

15: Setup bash autocompletion (optional)
-----------------------------------------

All regular OTRS command line operations now happen via the OTRS Console
interface bin/otrs.Console.pl. This provides an auto completion for the bash
shell which makes finding the right command and options much easier.

You can activate the bash autocompletion by installing the package 
bash-completion.
It will automatically detect and load the file /srv/otrs/.bash_completion for 
the otrs user.

After restarting your shell, you can just type bin/otrs.Console.pl followed by 
TAB,
and it will list all available commands. If you type a few characters of the
command name, TAB will show all matching commands. After typing a complete 
command,
all possible options and arguments will be shown by pressing TAB.
Step 18: Review ticket action screen configurations (optional)

Some ticket action screens like "Note" had default subjects in OTRS 4
(configurable via SysConfig, Ticket::Frontend::AgentTicketNote###Subject in 
this case).
These default subjects have been removed to reduce the amount of potentially
redundant/meaningless data. You might want to re-add them if they are mandatory 
for you.


16: Review Ticket Event Module Configurations
----------------------------------------------

Because of a bugfix in OTRS 5s, configuration names for a few ticket event 
modules had
to be changed. Any possible customizations need to be re-applied. Please review 
your
settings in SysConfig -> Ticket -> Core::Ticket and check all settings that 
start with
Ticket::EventModulePost to see if your custiomizations have to be re-applied. 
This could
be the case if you had activated and configured the event handler to save 
customer data
in ticket dynamic fields, for example. 


17: Well done!
--------------
++++++ ZZZAuto.pm ++++++
# OTRS config file (automaticaly generated!)
# VERSION:1.1
package Kernel::Config::Files::ZZZAuto;
use utf8;
sub Load {
    my ($File, $Self) = @_;
$Self->{'SecureMode'} =  1;
$Self->{'DefaultCharset'} =  'utf-8';
$Self->{'DefaultLanguage'} =  'de';
$Self->{'LogModule'} =  'Kernel::System::Log::File';
$Self->{'Package::RepositoryList'} =  {
  'file://@OTRS_ROOT@/itsm/packages4/' => '[--OTRS::ITSM 4 local repo]',
  'http://ftp.otrs.org/pub/otrs/itsm/packages4/' => '[--OTRS::ITSM 4 Master--] 
http://ftp.otrs.org/',
  'file://@OTRS_ROOT@/itsm/packages5/' => '[--OTRS::ITSM 5 local repo]',
  'http://ftp.otrs.org/pub/otrs/itsm/packages5/' => '[--OTRS::ITSM 5 Master--] 
http://ftp.otrs.org/'
};
$Self->{'Package::RepositoryAccessRegExp'} =  '127\\.0\\.0\\.1';
}
1;
++++++ itsm-update.sh ++++++
#!/bin/bash
# This script creates a new itsm-%version.tar.bz2

URL='ftp://ftp.otrs.org/pub/otrs/itsm'
VERSION=$(grep "%define itsm_ver" otrs.spec | cut -d' ' -f3)
MAJOR=$(echo ${VERSION} | cut -d'.' -f1)
MINOR=$(echo ${VERSION} | cut -d'.' -f2)
PATCH=$(echo ${VERSION} | cut -d'.' -f3)
PPATCH=$((${PATCH} - 1))

if [[ ${MAJOR} -eq 4 ]]; then
    PMINOR='3.3'
    PMINOR_PKG=33
    PREJECT="*3.2.9?.opm,*${PMINOR}.?.opm,*${PMINOR}.9?.opm"
    REJECT="*${PMINOR}.9?.opm,*${MAJOR}.0.?.opm,*${MAJOR}.0.1?.opm"
elif [[ ${MAJOR} -eq 5 ]]; then
    PMINOR=$((${MAJOR} - 1))
    PMINOR_PKG=${PMINOR}
    
PREJECT="*3.3.9?.opm,*${PMINOR}.0.?.opm,*${PMINOR}.0.1?.opm,*${PMINOR}.0.9?.opm"
    REJECT="*${PMINOR}.0.9?.opm,*${MAJOR}.0.?.opm,*${MAJOR}.0.1?.opm"
elif [[ ${MAJOR} -ge 6 ]]; then
    PMINOR=$((${MAJOR} - 1))
    PMINOR_PKG=${PMINOR}
    
PREJECT="*((${PMINOR}-1)).0.9?.opm,*((${MAJOR}-1)).0.?.opm,*((${MAJOR}-1)).0.1?.opm,*((${MAJOR}-1)).0.9?.opm"
    REJECT="*${PMINOR}.0.9?.opm,*${MAJOR}.0.9?.opm"
fi

if [[ ! -d itsm-${VERSION} ]]; then
    if [[ ! -d itsm-${MAJOR}.${MINOR}.${PPATCH} ]]; then
        if [[ -f itsm-${MAJOR}.${MINOR}.${PPATCH}.tar.bz2 ]]; then
            tar xvfpj itsm-${MAJOR}.${MINOR}.${PPATCH}.tar.bz2
            mv itsm-${MAJOR}.${MINOR}.${PPATCH} itsm-${VERSION}
        else
            mkdir -p itsm-${VERSION}
        fi
    else
        mv itsm-${MAJOR}.${MINOR}.${PPATCH} itsm-${VERSION}
    fi
fi
cd itsm-${VERSION}/ || exit 1

# get INSTALL file
wget -nH --cut-dirs=3 -m \
${URL}/INSTALL-${MAJOR}.ITSM

# convert "ASCII English text, with CRLF line terminators"
#  into "ASCII English text"
perl -p -i -e 's|\r\n|\n|' INSTALL-*

# get packages of current version, exclude RC's
wget -nH --cut-dirs=3 -m \
-R ${REJECT} \
-R *~ \
${URL}/packages${MAJOR}/

# get packages of previous version, exclude RC's
wget -nH --cut-dirs=3 -m \
-R ${PREJECT} \
-R *~ \
${URL}/packages${PMINOR_PKG}/

cd ..
tar cvfj itsm-${VERSION}.tar.bz2 --exclude='.listing' itsm-${VERSION}
++++++ itsm.README.de ++++++
README Datei für OTRS::ITSM

Das Paket otrs-itsm enhält alle notwendigen Module, um Ihre OTRS Installation
mit ITSM zu erweitern.

Hierbei sollten sie folgendes beachten:

- mit der Installation dieses Pakets wird die Datei
  @OTRS_ROOT@/Kernel/Config/Files/ZZZAuto.pm hinzugefügt, welches ein lokales
  Repository zur Installation von OTRS::ITSM Modulen zur Verfügung stellt.
  Somit muß das OTRS System nicht zwingend eine Verbindung zum Internet haben.

- Falls sie OTRS bereits schon länger in Verwendung haben und auch Anpassungen
  vorgenommen haben,dann sollten Sie das lokale Repository via SysConfig
  hinzufügen.
  -> gehen SIe in den Admin Bereich:
  -> wählen Sie SysConfig
  -> wählen Sie bei der Gruppenauswahl "Framework (324)"
  -> im erscheinenden Ergebnis wählen Sie "Core::Package"
  -> Config Einstellungen: Framework -> Core::Package
    o aktivieren Sie "Package::RepositoryAccessRegExp:" und belassen Sie
      den (Default: 127\.0\.0\.1) Wert
    o fügen Sie bei "Package::RepositoryList:" ein neues Repository hinzu
      Schlüssel: file://@OTRS_ROOT@/itsm/packages4/
      Inhalt: [--OTRS::ITSM local repo]
  -> klicken Sie auf Aktualisieren

  Sie können nun in der "Paket Verwaltung" als Quelle "[--OTRS::ITSM local 
repo]"
  auswählen, um OTRS::ITSM zu installieren.

Viel Spaß mit OTRS::ITSM
++++++ itsm.README.en ++++++
README File for OTRS::ITSM

This package holds all needed modules to extend your OTRS with ITSM

You should take care of the following info

- with installing this package, there will be
  @OTRS_ROOT@/Kernel/Config/Files/ZZZAuto.pm added, which provides a local repo
  for installing all needed ITSM modules.
  So your OTRS System does not need to have internet access.

- If you were using your OTRS and you already have done many mods, then you
  should add the local repo by hand.
  -> go to Admin section
  -> choose SysConfig
  -> on groups select "Framework (324)"
  -> on the results choose "Core::Package"
  -> Config settings: Framework -> Core::Package
    o activate "Package::RepositoryAccessRegExp:" and leave
      (Default: 127\.0\.0\.1) value as is.
    o on "Package::RepositoryList:" add a new repo
      Key: file://@OTRS_ROOT@/itsm/packages4/
      Value: [--OTRS::ITSM local repo]
  -> click refresh

  Now you are able to select Source "[--OTRS::ITSM local repo]" in
  package management and can install OTRS::ITSM modules.

Have fun with OTRS::ITSM

++++++ otrs-httpd_conf.patch ++++++
Index: scripts/apache2-httpd.include.conf
===================================================================
--- scripts/apache2-httpd.include.conf.orig
+++ scripts/apache2-httpd.include.conf
@@ -2,13 +2,13 @@
 # added for OTRS (http://otrs.org/)
 # --
 
-ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/"
-Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
+ScriptAlias /otrs/ "@OTRS_ROOT@/bin/cgi-bin/"
+Alias /otrs-web/ "@OTRS_ROOT@/var/httpd/htdocs/"
 
 <IfModule mod_perl.c>
 
     # Setup environment and preload modules
-    Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl
+    Perlrequire @OTRS_ROOT@/scripts/apache2-perl-startup.pl
 
     # Reload Perl modules when changed on disk
     PerlModule Apache2::Reload
@@ -16,7 +16,8 @@ Alias /otrs-web/ "/opt/otrs/var/httpd/ht
 
     # general mod_perl2 options
     <Location /otrs>
-#        ErrorDocument 403 /otrs/customer.pl
+
+#       ErrorDocument 403 /otrs/customer.pl
         ErrorDocument 403 /otrs/index.pl
         SetHandler  perl-script
         PerlResponseHandler ModPerl::Registry
@@ -24,19 +25,21 @@ Alias /otrs-web/ "/opt/otrs/var/httpd/ht
         PerlOptions +ParseHeaders
         PerlOptions +SetupEnv
 
-        <IfModule mod_version.c>
-            <IfVersion < 2.4>
-                Order allow,deny
-                Allow from all
-            </IfVersion>
-            <IfVersion >= 2.4>
-                Require all granted
-            </IfVersion>
-        </IfModule>
-        <IfModule !mod_version.c>
+        <IfVersion < 2.4>
             Order allow,deny
             Allow from all
-        </IfModule>
+        </IfVersion>
+
+        <IfVersion >= 2.4>
+            <IfModule !mod_access_compat.c>
+                Require all granted
+            </IfModule>
+            <IfModule mod_access_compat.c>
+                Order allow,deny
+                Allow from all
+            </IfModule>
+        </IfVersion>
+
     </Location>
 
     # mod_perl2 options for GenericInterface
@@ -46,23 +49,25 @@ Alias /otrs-web/ "/opt/otrs/var/httpd/ht
 
 </IfModule>
 
-<Directory "/opt/otrs/bin/cgi-bin/">
+<Directory "@OTRS_ROOT@/bin/cgi-bin/">
+
     AllowOverride None
     Options +ExecCGI -Includes
 
-    <IfModule mod_version.c>
-        <IfVersion < 2.4>
-            Order allow,deny
-            Allow from all
-        </IfVersion>
-        <IfVersion >= 2.4>
-            Require all granted
-        </IfVersion>
-    </IfModule>
-    <IfModule !mod_version.c>
+    <IfVersion < 2.4>
         Order allow,deny
         Allow from all
-    </IfModule>
+    </IfVersion>
+
+    <IfVersion >= 2.4>
+        <IfModule !mod_access_compat.c>
+           Require all granted
+       </IfModule>
+       <IfModule mod_access_compat.c>
+           Order allow,deny
+           Allow from all
+       </IfModule>
+    </IfVersion>
 
     <IfModule mod_filter.c>
         <IfModule mod_deflate.c>
@@ -72,22 +77,52 @@ Alias /otrs-web/ "/opt/otrs/var/httpd/ht
 
 </Directory>
 
-<Directory "/opt/otrs/var/httpd/htdocs/">
+<Directory "@OTRS_ROOT@/var/httpd/htdocs/js/thirdparty/ckeditor-4.4.8/">
+    #
+    # Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights 
reserved.
+    # For licensing, see LICENSE.html or http://ckeditor.com/license
+    #
+
+    #
+    # On some specific Linux installations you could face problems with 
Firefox.
+    # It could give you errors when loading the editor saying that some illegal
+    # characters were found (three strange chars in the beginning of the file).
+    # This could happen if you map the .js or .css files to PHP, for example.
+    #
+    # Those characters are the Byte Order Mask (BOM) of the Unicode encoded 
files.
+    # All FCKeditor files are Unicode encoded.
+    #
+
+    AddType application/x-javascript .js
+    AddType text/css .css
+
+    #
+    # If PHP is mapped to handle XML files, you could have some issues. The
+    # following will disable it.
+    #
+
+    AddType text/xml .xml
+</Directory>
+
+<Directory "@OTRS_ROOT@/var/httpd/htdocs/">
+
+    Options +FollowSymlinks
     AllowOverride None
 
-    <IfModule mod_version.c>
-        <IfVersion < 2.4>
-            Order allow,deny
-            Allow from all
-        </IfVersion>
-        <IfVersion >= 2.4>
-            Require all granted
-        </IfVersion>
-    </IfModule>
-    <IfModule !mod_version.c>
+    <IfVersion < 2.4>
         Order allow,deny
         Allow from all
-    </IfModule>
+    </IfVersion>
+
+    <IfVersion >= 2.4>
+        <IfModule !mod_access_compat.c>
+            Require all granted
+        </IfModule>
+        <IfModule mod_access_compat.c>
+            Order allow,deny
+            Allow from all
+        </IfModule>
+    </IfVersion>
 
     <IfModule mod_filter.c>
         <IfModule mod_deflate.c>
@@ -123,33 +158,35 @@ Alias /otrs-web/ "/opt/otrs/var/httpd/ht
 # </Location>
 
 <IfModule mod_headers.c>
+
     # Cache css-cache for 30 days
-    <Directory "/opt/otrs/var/httpd/htdocs/skins/*/*/css-cache">
+    <Directory "@OTRS_ROOT@/var/httpd/htdocs/skins/*/*/css-cache">
         <FilesMatch "\.(css|CSS)$">
             Header set Cache-Control "max-age=2592000 must-revalidate"
         </FilesMatch>
     </Directory>
 
     # Cache css thirdparty for 4 hours, including icon fonts
-    <Directory "/opt/otrs/var/httpd/htdocs/skins/*/*/css/thirdparty">
+    <Directory "@OTRS_ROOT@/var/httpd/htdocs/skins/*/*/css/thirdparty">
         <FilesMatch "\.(css|CSS|woff|svg)$">
             Header set Cache-Control "max-age=14400 must-revalidate"
         </FilesMatch>
     </Directory>
 
     # Cache js-cache for 30 days
-    <Directory "/opt/otrs/var/httpd/htdocs/js/js-cache">
+    <Directory "@OTRS_ROOT@/var/httpd/htdocs/js/js-cache">
         <FilesMatch "\.(js|JS)$">
             Header set Cache-Control "max-age=2592000 must-revalidate"
         </FilesMatch>
     </Directory>
 
     # Cache js thirdparty for 4 hours
-    <Directory "/opt/otrs/var/httpd/htdocs/js/thirdparty/">
+    <Directory "@OTRS_ROOT@/var/httpd/htdocs/js/thirdparty/">
         <FilesMatch "\.(js|JS)$">
             Header set Cache-Control "max-age=14400 must-revalidate"
         </FilesMatch>
     </Directory>
+
 </IfModule>
 
 # Limit the number of requests per child to avoid excessive memory usage
++++++ otrs-perm_test.patch ++++++
Index: Kernel/System/Package.pm
===================================================================
--- Kernel/System/Package.pm.orig
+++ Kernel/System/Package.pm
@@ -3744,7 +3744,7 @@ sub _FileSystemCheck {
 
     # create test files in following directories
     for my $Filepath (
-        qw(/bin/ /Kernel/ /Kernel/System/ /Kernel/Output/ /Kernel/Output/HTML/ 
/Kernel/Modules/)
+        qw(/Kernel/ /Kernel/System/ /Kernel/Output/ /Kernel/Output/HTML/ 
/Kernel/Modules/)
         )
     {
         my $Location = $Home . $Filepath . "check_permissions.$$";
++++++ otrs.README.de ++++++
Hallo,

hier eine Schnellübersicht, wie Sie das OTRS auf Ihrem SUSE Linux zum Laufen
bringen.

Prüfen Sie bitte den "max_allow_packets" Wert in Ihrer MySQL config (my.cnf).
Dieser sollte auf jeden Fall > 1MB sein.
Ich empfehle einen Wert von 20MB.

1) Starten Sie Apache und MySQL mittels

    shell> rcapache2 restart && rcmysql restart


2) Rufen Sie http://localhost/otrs/installer.pl in einem web browser auf und
folgen Sie den Anweisungen.


3) Wenn Sie Ihr System neu starten müssen, stellen Sie sicher, dass alle für
OTRS erforderlichen Dienste gestartet werden. Sie gewährleisten dies durch
Aktivieren der Dienste apache2, mysql, otrs-scheduler und otrs mit dem
YaST Runlevel-Editor (SLE11) oder dem YaST Dienste-Manager (SLE12 und openSUSE
ab Version 13.1) oder auf der Kommandozeile mittels

SLE11:
    shell> insserv apache2
    shell> insserv mysql
    shell> insserv otrs-scheduler
    shell> insserv otrs

SLE12 und openSUSE:
    shell> systemctl enable apache2
    shell> systemctl enable mysql
    shell> systemctl enable otrs-scheduler
    shell> systemctl enable otrs


4)  Remember to have fun!


Für weitergehende Fragen besuchen Sie doch unter http://www.otrs.org die OTRS
web-Seiten.  Insoweit Sie professionelle Unterstützung oder Beratung
benötigen, wird ein solcher Dienst durch ((otrs)) unter http://www.otrs.com
seitens des OTRS-Kernteams angeboten.
++++++ otrs.README.en ++++++
Hello,

here is a quick overview, what you have to do, to get the OTRS running on SUSE
Linux.

Please check settings of "max_allow_packets" in your MySQL config (my.cnf).
The value should be > 1MB in any case.
I recommend a value of 20MB.

1) Start Apache and MySQL with

    shell> rcapache2 restart && rcmysql restart


2) Load http://localhost/otrs/installer.pl with a web browser and follow the
instructions.


3) If you reboot the system, make sure, all services are available.  You can
achieve this with the YaST runlevel editor on SLE11 or the YaST services manager
on SLE12 and openSUSE >= 13.1, activating the services apache2, mysql,
otrs-scheduler and otrs, or on the command line with

SLE11:
    shell> insserv apache2
    shell> insserv mysql
    shell> insserv otrs-scheduler
    shell> insserv otrs

SLE12 and openSUSE:
    shell> systemctl enable apache2
    shell> systemctl enable mysql
    shell> systemctl enable otrs-scheduler
    shell> systemctl enable otrs


4) Remember to have fun!


For further questions take a look at the http://www.otrs.org website.  Or if
you are searching for professional support or consulting regarding OTRS, take
a look at ((otrs)) http://www.otrs.com where the OTRS coreteam offers these
services.

++++++ otrs.init ++++++
#!/bin/sh
#
# Copyright (c) 2012 Scorpio IT, Deidesheim, Germany
# All rights reserved
#
# Author: Christian Wittmer <r...@scorpio-it.net>
#
# /etc/init.d/otrs
#   and its symbolic link
# /(usr/)sbin/rcotrs
#
### BEGIN INIT INFO
# Provides:          otrs
# Required-Start:    apache2
# Should-Start:      mysql postgresql otrs-scheduler
# Required-Stop:     apache2
# Should-Stop:       mysql postgresql otrs-scheduler
# Default-Start:     3 5
# Default-Stop:      0 1 2 6
# Short-Description: start OTRS
# Description:       start OTRS (Open Ticket Request System)
### END INIT INFO

export LANG=POSIX
PATH="/bin:/usr/bin:/sbin:/usr/sbin"

# Check for existence of needed config file and read it
OTRS_SYSCONFIG=/etc/sysconfig/otrs
test -r $OTRS_SYSCONFIG || { echo "$OTRS_SYSCONFIG not existing";
        if [ "$1" = "stop" ]; then exit 0;
        else exit 6; fi; }

# Read config
. $OTRS_SYSCONFIG

if [ -z $OTRS_ROOT ]; then
        echo "OTRS_ROOT not set";
        echo "check config: $OTRS_SYSCONFIG";
        exit 6;
fi

if [ -z $OTRS_POSTMASTER ]; then
        echo "OTRS_POSTMASTER not set";
        echo "check config: $OTRS_SYSCONFIG";
        exit 6;
fi

if [ -z $OTRS_CHECKDB ]; then
        echo "OTRS_CHECKDB not set";
        echo "check config: $OTRS_SYSCONFIG";
        exit 6;
fi

if [ -z $OTRS_CLEANUP ]; then
        echo "OTRS_CLEANUP not set";
        echo "check config: $OTRS_SYSCONFIG";
        exit 6;
fi

if [ -z $OTRS_SPOOLDIR ]; then
        echo "OTRS_SPOOLDIR not set";
        echo "check config: $OTRS_SYSCONFIG";
        exit 6;
fi

# Shell functions sourced from /etc/rc.status:
#      rc_check         check and set local and overall rc status
#      rc_status        check and set local and overall rc status
#      rc_status -v     ditto but be verbose in local rc status
#      rc_status -v -r  ditto and clear the local rc status
#      rc_failed        set local and overall rc status to failed
#      rc_failed <num>  set local and overall rc status to <num>
#      rc_reset         clear local rc status (overall remains)
#      rc_exit          exit appropriate to overall rc status
. /etc/rc.status

# Reset status of this service
rc_reset

# Return values acc. to LSB for all commands but status:
# 0       - success
# 1       - generic or unspecified error
# 2       - invalid or excess argument(s)
# 3       - unimplemented feature (e.g. "reload")
# 4       - user had insufficient privileges
# 5       - program is not installed
# 6       - program is not configured
# 7       - program is not running
# 8--199  - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)

case "$1" in
    # ------------------------------------------------------
    # start
    # ------------------------------------------------------
    start)
      echo "Starting $OTRS_PROG"

      # --
      # start web server
      # --
      if test $OTRS_HTTP_RUNNING -gt 0; then
        if $OTRS_USED_WEBSERVER_RCSCRIPT status > /dev/null 2>&1 ; then
          echo " Checking $OTRS_USED_WEBSERVER ... done."
          rc_status
        else
          echo " Checking $OTRS_USED_WEBSERVER ... failed!"
          echo "  --> Please start the web server first! 
($OTRS_USED_WEBSERVER_RCSCRIPT start) <--"
          rc_failed
          exit 1
        fi
      else
          echo " Disabled: web server check!"
      fi

      # --
      # check database
      # --
      if test $OTRS_DB_RUNNING -gt 0; then
        if $OTRS_USED_DB_RCSCRIPT status > /dev/null 2>&1 ; then
          echo " Checking $OTRS_USED_DB ... done."
          rc_status
        else
          echo " Checking $OTRS_USED_DB ... failed."
          echo "  --> Please start the database at first! 
($OTRS_USED_DB_RCSCRIPT start) <--"
          rc_failed
          rc_status -v
          exit 1;
        fi
      else
          echo " Disabled: database check!"
      fi

      # --
      # database connect
      # --
      echo -n " Checking database connection... ("
      if ! $OTRS_CHECKDB -s 1; then
          echo ") "
          echo 
"----------------------------------------------------------------------------"
          echo " Error: Maybe your database isn't configured yet? "
          echo 
"----------------------------------------------------------------------------"
          echo ""
          echo ""
          echo " Try the web installer to configure your database: "
          echo ""
          echo ""
          echo "     -->> http://$OTRS_HOST/$OTRS_HTTP_LOCATION/installer.pl 
<<-- "
          echo ""
          echo ""
          echo 
"----------------------------------------------------------------------------"
          echo " or configure your database with README.database (DB - Setup 
Example)    "
          echo 
"----------------------------------------------------------------------------"
          rc_failed
          rc_status -v
          exit 1;
      else
          echo ")."
          rc_status
      fi

      # --
      # OTRS Scheduler Service
      # --
      if test $OTRS_SCHEDULER_RUNNING -gt 0; then
        if $OTRS_USED_SCHEDULER_RCSCRIPT status > /dev/null 2>&1 ; then
          echo " Checking OTRS SCHEDULER ... done."
          rc_status
        else
          echo " Checking OTRS SCHEDULER ... failed!"
          #echo "  --> Please start the scheduler first! 
($OTRS_USED_SCHEDULER_RCSCRIPT start) <--"
          #rc_failed
          #exit 1
          /etc/init.d/otrs-scheduler $1
        fi
      else
          echo " Disabled: scheduler check!"
      fi


      # --
      # enable otrs.PostMaster.pl
      # --
      echo -n " Enable $OTRS_POSTMASTER ..."
      if chmod 755 $OTRS_POSTMASTER; then
          echo " done."
          rc_status
      else
          echo " failed."
      fi

      # --
      # check otrs spool dir
      # --
      echo -n " Checking otrs spool dir... "
      for i in $OTRS_SPOOLDIR/* ; do
          # process old emails
          if echo $i | grep -v '*' >> /dev/null; then
              echo -n "   Starting otrs PostMaster... ($i) "
              if cat $i | $OTRS_POSTMASTER >> /dev/null 2>&1; then
                  rm $i && echo "(remove email)";
              else
                  rc_failed
              fi
          fi
      done
      echo " done."
      rc_status

      # --
      # start cron stuff
      # --
      if test $OTRS_CRON_RUNNING -gt 0; then
        if mkdir -p $OTRS_CRON_DIR; cd $OTRS_CRON_DIR && ls *|grep -v 
'.dist'|grep -v '.save'|grep -v 'CVS'|grep -v '.rpm'|xargs cat > 
$OTRS_CRON_TMP_FILE && crontab $OTRS_CRON_USER $OTRS_CRON_TMP_FILE ; then
          echo " Creating cronjobs (source $OTRS_CRON_DIR/*) ... done."
          rc_status
        else
          echo " Creating cronjobs (source $OTRS_CRON_DIR/*) ... failed!"
          rc_failed
          exit 1
        fi
      else
          echo " Disabled: cronjobs!"
      fi
      
      echo ""
      echo "  -->> http://$OTRS_HOST/$OTRS_HTTP_LOCATION/index.pl <<-- "

      # show status
      rc_status -v
    ;;
    # ------------------------------------------------------
    # stop
    # ------------------------------------------------------
    stop)
      echo "Shutting down $OTRS_PROG "

      # --
      # disable otrs.PostMaster.pl
      # --
      echo -n " Disable $OTRS_POSTMASTER ..."
      if chmod 644 $OTRS_POSTMASTER; then
          echo " done."
          rc_status
      else
          echo " failed."
      fi

      # --
      # stop cron stuff
      # --
      if test $OTRS_CRON_RUNNING -gt 0; then
        if type -a crontab 2&>/dev/null && crontab $OTRS_CRON_USER -r ; then
          echo " Shutting down cronjobs ... done."
          rc_status
        else
          echo " Shutting down cronjobs ... failed!"
          rc_failed
          exit 1
        fi
      else
          echo " Disabled: cronjobs!"
      fi

      # --
      # stop scheduler
      # --
      if test $OTRS_SCHEDULER_RUNNING -gt 0; then
          echo -e " Shutting down OTRS scheduler ..."
          $OTRS_SCHEDULER -a stop
          echo " done."
      fi

      # show status
      rc_status -v

    ;;
    # ------------------------------------------------------
    # start-force
    # ------------------------------------------------------
    start-force)
      echo "Starting $OTRS_PROG (completely)"

      # --
      # start web server
      # --
      if test $OTRS_HTTP_RUNNING -gt 0; then
        if $OTRS_USED_WEBSERVER_RCSCRIPT restart > /dev/null 2>&1 ; then
          echo " Starting $OTRS_USED_WEBSERVER ... done."
          rc_status
        else
          echo " Starting $OTRS_USED_WEBSERVER ... failed!"
          rc_failed
          exit 1
        fi
      else
          echo " Disabled: web server check!"
      fi

      # --
      # check database
      # --
      if test $OTRS_DB_RUNNING -gt 0; then
        if $OTRS_USED_DB_RCSCRIPT restart > /dev/null 2>&1 ; then
          # just in case, some databases can't get ready so fast!
          sleep 5;
          echo " Starting $OTRS_USED_DB ... done."
          rc_status
        else
          echo " Starting $OTRS_USED_DB ... failed."
          rc_failed
          rc_status -v
          exit 1;
        fi
      else
          echo " Disabled: database check!"
      fi

      # --
      # start normal
      # --
      $0 start

      # show status
      rc_status -v
    ;;
    # ------------------------------------------------------
    # stop-force
    # ------------------------------------------------------
    stop-force)
      # --
      # stop normal
      # --
      $0 stop
      # --
      # clean up
      # --
      if test $OTRS_CLEANUP; then
        if $OTRS_CLEANUP > /dev/null 2>&1 ; then
          echo " Cleaning up session and log cache ... done."
        else
          echo " Cleaning up session and log cache ... failed."
        fi
      fi
      # --
      # stop force
      # --
      echo "Shutting down $OTRS_PROG (completely)"

      # --
      # webserver
      # --
      if test $OTRS_HTTP_RUNNING -gt 0; then
        if $OTRS_USED_WEBSERVER_RCSCRIPT stop > /dev/null 2>&1 ; then
          echo " Shutting down $OTRS_USED_WEBSERVER ... done."
          rc_status
        else
          echo " Shutting down $OTRS_USED_WEBSERVER ... failed."
          rc_failed
        fi
      fi

      # --
      # database
      # --
      if test $OTRS_DB_RUNNING -gt 0; then
        if $OTRS_USED_DB_RCSCRIPT stop > /dev/null 2>&1 ; then
          echo " Shutting down $OTRS_USED_DB ... done."
          rc_status
        else
          echo " Shutting down $OTRS_USED_DB ... failed."
          rc_failed
        fi
      fi

      # show status
      rc_status -v
    ;;
    # ------------------------------------------------------
    # restart
    # ------------------------------------------------------
    restart)
      $0 stop
      $0 start
      # Remember status and be quiet
      rc_status
    ;;
    # ------------------------------------------------------
    # restart-force
    # ------------------------------------------------------
    restart-force)
      $0 stop-force  && sleep 3
      $0 start-force
      # Remember status and be quiet
      rc_status
    ;;
    # ------------------------------------------------------
    # try-restart
    # ------------------------------------------------------
    try-restart|condrestart)
      if test "$1" = "condrestart"; then
         echo "${attn} Use try-restart ${done}(LSB)${attn} rather than 
condrestart ${warn}(RH)${norm}"
      fi
      $0 status
      if test $? = 0; then
        $0 restart
      else
        # Not running is not a failure.
        rc_reset
      fi
      # Remember status and be quiet
      rc_status
    ;;
    # ------------------------------------------------------
    # reload
    # ------------------------------------------------------
    reload)
      ## OTRS does not support reload:
      rc_failed 3

      # Remember status and be verbose
      rc_status -v
    ;;
    # ------------------------------------------------------
    # cleanup
    # ------------------------------------------------------
    cleanup)
      # --
      # check otrs spool dir
      # --
      echo -n " Checking otrs spool dir... "
      for i in $OTRS_SPOOLDIR/* ; do
          # process old emails
          echo $i | grep -v '*' >> /dev/null && \
            echo "" && \
            echo -n "   Starting otrs PostMaster... ($i) " && \
            cat $i | $OTRS_POSTMASTER >> /dev/null 2>&1 && \
            echo -n "remove email... " && \
            (rm $i || rc_failed)
      done
      echo " done."
      rc_status
      # Remember status and be quiet
      rc_status
    ;;
    # ------------------------------------------------------
    # status
    # ------------------------------------------------------
    status)
      # --
      # web server
      # --
      $OTRS_USED_WEBSERVER_RCSCRIPT status

      # --
      # database
      # --
      $OTRS_USED_DB_RCSCRIPT status

      # --
      # db check
      # --
      echo -n "Checking database connection... ("
      if ! $OTRS_CHECKDB -s 1; then
          echo ") "
          echo 
"----------------------------------------------------------------------------"
          echo " Error: Maybe your database isn't configured yet? "
          echo 
"----------------------------------------------------------------------------"
      else
          echo ")."
      fi

      # --
      # scheduler check
      # --
      $OTRS_USED_SCHEDULER_RCSCRIPT status

      # --
      # postmaster check
      # --
      echo -n "Checking $OTRS_POSTMASTER ... "
      if test -x $OTRS_POSTMASTER; then
          echo "(active) done."
      else
          echo "(not active) failed."
      fi

      # --
      # spool dir
      # --
      echo -n "Checking otrs spool dir... "
      for i in $OTRS_SPOOLDIR/* ; do
          # echo old emails
          echo $i | grep -v '*' > /dev/null && \
            echo "" && \
            echo -n " (message:$i) found! "
      done
      echo "done."
    ;;
    *)
    echo "Usage: $0 
{start|stop|stop-force|start-force|status|restart|restart-force|cleanup}"
    exit 1
esac

# Inform the caller not only verbosely and set an exit status.
rc_exit

++++++ otrs.permissions ++++++
### DBUpdate-to-y.pl is going to write there
#@OTRS_ROOT@/Kernel/Config/Files     wwwrun:www  2775
#@OTRS_ROOT@/var/log                 otrs:www    2775
@OTRS_ROOT@/var/tmp/                 wwwrun:www  2770
++++++ otrs.rpmlintrc ++++++
addFilter('files-duplicate /srv/otrs/Kernel/Config.pm.dist')
addFilter('files-duplicate /srv/otrs/Kernel/Config/GenericAgent.pm.dist')
addFilter('files-duplicate 
/srv/otrs/Kernel/Output/HTML/Standard/AgentTicketNote.tt')
addFilter('files-duplicate 
/srv/otrs/Kernel/Output/HTML/Standard/AgentTicketFreeText.tt')
addFilter('files-duplicate 
/srv/otrs/Kernel/Output/HTML/Standard/AgentTicketResponsible.tt')
addFilter('files-duplicate 
/srv/otrs/Kernel/Output/HTML/Standard/AgentTicketOwner.tt')
addFilter('files-duplicate 
/srv/otrs/Kernel/Output/HTML/Standard/AgentTicketPending.tt')
addFilter('files-duplicate 
/srv/otrs/Kernel/Output/HTML/Standard/AgentTicketPriority.tt')
addFilter('files-duplicate 
/srv/otrs/Kernel/Output/HTML/Standard/AgentTicketClose.tt')
addFilter('hidden-file-or-dir')
addFilter('macro-in-comment')
addFilter('no-manual-page-for-binary')
addFilter('non-etc-or-var-file-marked-as-conffile')
addFilter('non-executable-script')
addFilter('zero-length')
++++++ otrs.service ++++++
# Copyright (c) 2017 Scorpio IT, Deidesheim, Germany
[Unit]
# Copyright (C) 2001-2017 OTRS AG, http://otrs.com/
Description=OTRS
Documentation=https://otrs.github.io/doc/manual/admin/stable/en/html/
After=crond.service apache2.service mysql.service

[Service]
User=otrs
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/sysconfig/otrs
#ExecStartPre=/usr/bin/chmod 755 @OTRS_ROOT@/bin/otrs.PostMaster.pl
#ExecStartPre=/usr/bin/otrs.service.helper.sh
ExecStart=@OTRS_ROOT@/bin/otrs.Daemon.pl start
#ExecStop=/usr/bin/chmod 644 @OTRS_ROOT@/bin/otrs.PostMaster.pl
#ExecStopPost=/usr/bin/crontab -u otrs -r

[Install]
WantedBy=multi-user.target
++++++ otrs.service.helper.sh ++++++
#!/bin/bash
#
# Copyright (c) 2017 Scorpio IT, Deidesheim, Germany
# All rights reserved
#
# Author: Christian Wittmer <r...@scorpio-it.net>
#

export LANG=POSIX
PATH="/bin:/usr/bin:/sbin:/usr/sbin"

# Check for existence of needed config file and read it
OTRS_SYSCONFIG=/etc/sysconfig/otrs
test -r $OTRS_SYSCONFIG || { echo "$OTRS_SYSCONFIG does not exist";
        if [ "$1" = "stop" ]; then exit 0;
        else exit 6; fi; }

# Read config
. $OTRS_SYSCONFIG

# --
# prepare cron stuff
# --

if test $OTRS_CRON_RUNNING -gt 0; then
    if [[ -d $OTRS_CRON_DIR ]]; then
        cd $OTRS_CRON_DIR
        /bin/ls * | /usr/bin/grep -v '.dist' | /usr/bin/grep -v '.save' | 
/usr/bin/grep -v 'CVS' | /usr/bin/grep -v '.rpm' | \
            /usr/bin/xargs cat > $OTRS_CRON_TMP_FILE
    fi
fi
++++++ sysconfig.otrs ++++++
## Path:        Network/Mail/OTRS
## Description: Open source Ticket Request System configuration
## Type:        string
## Default:     OTRS
# 
# program name
# 
OTRS_PROG="OTRS"

# Type:        string
## Default:     otrs
# 
# OTRS User
#
OTRS_USER="otrs"

## Type:        string
## Default:     otrs
# 
# OTRS Group
#
OTRS_GROUP="otrs"

## Type:        string
## Default:     @OTRS_ROOT@
# 
# OTRS home (root) directory
#
OTRS_ROOT="@OTRS_ROOT@"

## Type:        string(0,1)
## Default:     1
#
# The OTRS cron jobs run on this host? 1=yes, 0=no
#
OTRS_CRON_RUNNING="1"

## Type:        string(0,1)
## Default:     1
#
# The OTRS database is on this host? 1=yes, 0=no
#
OTRS_DB_RUNNING="0"

## Type:        string(0,1)
## Default:     1
#
# The OTRS web server is on this host? 1=yes, 0=no
#
OTRS_HTTP_RUNNING="1"

## Type:        string(0,1)
## Default:     1
#
# The OTRS scheduler server is on this host? 1=yes, 0=no
#
OTRS_SCHEDULER_RUNNING="1"

## Type:        string(MySQL,PostgreSQL)
## Default:     MySQL
## ServiceRestart: otrs
# 
# Used database. 
# Note: Take care, that you have changed the Config.pm database settings!
# 
OTRS_USED_DB="MySQL"

## Type:        string(rcmysql,rcpostgresql)
## Default:     rcmysql
## ServiceRestart: otrs
#
# Init script to control database.
#
OTRS_USED_DB_RCSCRIPT="rcmysql"

## Type:        string
## Default:     apache
## ServiceRestart: otrs
#
# Used webserver
#
OTRS_USED_WEBSERVER="Apache"

## Type:        string
## Default:     rcapache2
## ServiceRestart: otrs
#
# Init script to control the webserver
#
OTRS_USED_WEBSERVER_RCSCRIPT="rcapache2"

## Type:        string
## Default:     $OTRS_ROOT/var/cron
#
# Location of the cron jobs
#
OTRS_CRON_DIR="$OTRS_ROOT/var/cron"

## Type:        string
## Default:     $OTRS_ROOT/var/tmp/cron
#
# Location of the temporary cron files
#
OTRS_CRON_TMP_FILE="$OTRS_ROOT/var/tmp/cron"

## Type:        string
## Default:     " -u otrs "
#
# Cron job user option
# 
OTRS_CRON_USER=" -u otrs "

## Type:        string
## Default:     otrs.example.com
# 
# Command to get the systems hostname
#
OTRS_HOST="otrs.example.com"

## Type:        string
## Default:     otrs
# 
# OTRS location - means http://host/$OTRS_HTTP_LOCATION/index.pl
# 
OTRS_HTTP_LOCATION="otrs"

## Type:        string
## Default:     $OTRS_ROOT/bin/otrs.PostMaster.pl
# 
# Location of the PostMaster.pl script.
# 
OTRS_POSTMASTER="$OTRS_ROOT/bin/otrs.PostMaster.pl"

## Type:        string
## Default:     $OTRS_ROOT/bin/otrs.CheckDB.pl
#
# Location of the CheckDB.pl script.
#
OTRS_CHECKDB="$OTRS_ROOT/bin/otrs.CheckDB.pl"

## Type:        string
## Default:     $OTRS_ROOT/bin/otrs.CleanUp.pl
#
# Location of the CleanUp.pl script.
#
OTRS_CLEANUP="$OTRS_ROOT/bin/otrs.CleanUp.pl"

## Type:        string
## Default:     $OTRS_ROOT/bin/otrs.Scheduler.pl
#
# Location of the Scheduler.pl script.
#
OTRS_SCHEDULER="$OTRS_ROOT/bin/otrs.Scheduler.pl"

## Type:        string
## Default:     "$OTRS_SCHEDULER -a status | grep 'Running'"
#
# Command to get status of Scheduler
#
OTRS_SCHEDULER_TEST="$OTRS_SCHEDULER -a status | grep 'Running'"

# Type:        string
## Default:     rcotrs-scheduler
## ServiceRestart: otrs
#
# Init script to control the OTRS Scheduler
#
OTRS_USED_SCHEDULER_RCSCRIPT="rcotrs-scheduler"

## Type:        string
## Default:     $OTRS_ROOT/var/spool
# 
# Location of the OTRS spool directory.
# 
OTRS_SPOOLDIR="$OTRS_ROOT/var/spool"

Reply via email to