Preparing development environment

English! place to talk about development, programming and coding
Post Reply
mmesnjak
Znuny newbie
Posts: 9
Joined: 21 May 2015, 10:16
Znuny Version: 4.0.11

Preparing development environment

Post by mmesnjak »

Hello,

I'm trying to setup development environment for eventual custom Module development but I have some questions...

First to put it in context:
- There is a test production install of OTRS on CentOS 7 machine (instalation from rpm)
- That install uses MySQL server as a DB backend
- This instance is patched to v 4.0.11 and ITSM 4 Bundle is installed
- Everything is configured and working as expected (for now)

I cloned the OTRS git repo to my test machine and use branch 4_0 to be in sync with production version:

Code: Select all

git clone https://github.com/OTRS/otrs.git -b rel-4_0
I copied the Config.pm from the production install and adjusted it to use different DB but on the same server (made a clone/copy of the production data)

I'm now able to login using users info defined in the production install but I get some messages:
Image

I was under impression that all patches are commited to the git repo. Is that not the case?
What is the best recourse to get development environment in sync with production code?

And if I understood developer manual info correctly I should put all my custom modifications under <install_root>/Custom/<replicated_directory_structure>/<modified_or_new_file>
Is this assumption correct on my side?
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Preparing development environment

Post by RStraub »

What does it read in your ~otrs/RELEASE file ? That's the one being parsed for those notifications.

Your assumption is correct, if you modify files, it's a good practice to save them under ~otrs/Custom/[...]

If you want to bundle them to a package however, you might need another folder that contains only those files that will be bundled. That depends on how you plan to build your package. The ~otrs/bin/otrs.PackageManager.pl -build can be pointed to the "module home path", thus a separated folder could be recommended.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
mmesnjak
Znuny newbie
Posts: 9
Joined: 21 May 2015, 10:16
Znuny Version: 4.0.11

Re: Preparing development environment

Post by mmesnjak »

RStraub wrote:What does it read in your ~otrs/RELEASE file ? That's the one being parsed for those notifications.
In RELEASE:

Code: Select all

[otrsadm@OTRSDEV2 otrs-dev]$ cat RELEASE 
PRODUCT = OTRS
VERSION = 4.0.x git
RStraub wrote:Your assumption is correct, if you modify files, it's a good practice to save them under ~otrs/Custom/[...]
OK. Great. Thanks.
RStraub wrote:If you want to bundle them to a package however, you might need another folder that contains only those files that will be bundled. That depends on how you plan to build your package. The ~otrs/bin/otrs.PackageManager.pl -build can be pointed to the "module home path", thus a separated folder could be recommended.
I still have to find my way around and I will for sure come back with specific questions about that. Thank you.
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Preparing development environment

Post by RStraub »

Try changing
VERSION = 4.0.x git
to
VERSION = 4.0.11

The .pm that parses the version takes integers afaik.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
mmesnjak
Znuny newbie
Posts: 9
Joined: 21 May 2015, 10:16
Znuny Version: 4.0.11

Re: Preparing development environment

Post by mmesnjak »

RStraub wrote:Try changing
VERSION = 4.0.x git
to
VERSION = 4.0.11

The .pm that parses the version takes integers afaik.
OK, that helped to get rid of messages.
But am I correct to assume that all changes from 4.0.11 stable version are actually commited (and cloned into my local repository) into this branch?
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Preparing development environment

Post by RStraub »

I think so yes.

I would also assume that when OTRS releases a new package, the Version tag and the comments in the files headers (like origin) are set with the "correct" values :)
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Post Reply