Difference between revisions of "How to build a development environment from source control"

From EPrints Documentation
Jump to: navigation, search
(Centos)
(Ubuntu 14.04)
 
(24 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[Category:Howto]]
 
[[Category:Howto]]
 +
 +
<div style="background-color:yellow; border: solid 2px red; padding:20px;">
 +
This page is under development most of the instructions do not work yet
 +
</div>
 +
 
This article explains the various ways you can build a development environment for EPrints source contributions. If you have a method not listed here then please add it. Instructions assume familiarity with EPrints and the command line. You can use repositories built in this way to test contributions to EPrints source before pushing them to the git remote.
 
This article explains the various ways you can build a development environment for EPrints source contributions. If you have a method not listed here then please add it. Instructions assume familiarity with EPrints and the command line. You can use repositories built in this way to test contributions to EPrints source before pushing them to the git remote.
  
Line 7: Line 12:
  
 
Take a clean ubuntu 14.04 build
 
Take a clean ubuntu 14.04 build
<pre>
+
<div style="background-color:#eeeeee;padding:20px"><source lang="bash">
 
sudo su
 
sudo su
apt-get install git
+
apt-get install git libtest-memory-cycle-perl libtest-mockobject-perl
 
echo "deb http://deb.eprints.org/ nightly/
 
echo "deb http://deb.eprints.org/ nightly/
 
deb-src http://deb.eprints.org/ source/" > /etc/apt/sources.list.d/eprints.nightly.list
 
deb-src http://deb.eprints.org/ source/" > /etc/apt/sources.list.d/eprints.nightly.list
 
apt-get update
 
apt-get update
 
apt-get build-dep eprints
 
apt-get build-dep eprints
</pre>
+
ln -s /home/<yourusername>/eprints /usr/share/eprints3
 +
echo "Include /usr/share/eprints3/cfg/apache.conf" > /etc/apache2/sites-available/eprints-git.conf
 +
sudo a2ensite eprints-git
  
==CentOs==
+
su <yourusername>
 +
cd ~
 +
git clone git@github.com:eprints/eprints.git
 +
 
 +
 
 +
echo "package EPrints::SystemSettings;
 +
 
 +
\$EPrints::SystemSettings::conf =
 +
{
 +
        'base_path' => '/usr/share/eprints3',
 +
        'version_id' => 'git',
 +
        'version' => 'EPrints (development version)',
 +
        'user' => '$USER',
 +
        'group' => '$USER',
 +
        'smtp_server' => 'smtp',
 +
};
 +
 
 +
1;"  > eprints/perl_lib/EPrints/SystemSettings.pm
 +
 
 +
cd eprints
 +
bin/generate_apacheconf
 +
 
 +
bin/epadmin create #create a repository in the normal manner remember your <archiveid>
 +
 
 +
sudo service apache2 restart
 +
 
 +
sudo chgrp www-data archives/test/documents/ -R
 +
 
 +
testdata/bin/import_test_data <archiveid>
 +
 
 +
bin/indexer start
 +
 
 +
# wait for 5 minutes or so until the indexing is done
 +
 
 +
bin/epadmin unit_tests
 +
 
 +
</source></div>
 +
 
 +
==CentOS /RHEL==
  
 
* If using Vagrant, see https://github.com/eprintsug/eprints-vagrant
 
* If using Vagrant, see https://github.com/eprintsug/eprints-vagrant
Line 23: Line 68:
 
See: https://github.com/eprints/apache_rhel
 
See: https://github.com/eprints/apache_rhel
  
 +
<source lang=bash>
 +
> mkdir eprints-github
 +
> git clone https://github.com/eprints/eprints.git
 +
... clones into eprints ...
 +
> cd eprints
 +
> mkdir apache
 +
> git clone https://github.com/eprints/apache_rhel.git apache
 +
... cloning into apache ...
 +
> vi perl_lib/EPrints/SystemSettings.pm
 +
        ##### add the following - setting 'user' and 'group' to your username/group
 +
        package EPrints::SystemSettings;
 +
 +
        $EPrints::SystemSettings::conf =
 +
        {
 +
                'user' => 'john',
 +
                'group' => 'john',
 +
                'smtp_server' => '',
 +
        };
 +
 +
        1;
 +
        ### save and quit (:wq)
 +
 +
> bin/epadmin create
 +
... fill in the details ...
 +
... the userspace apache will listen to port 8080 and 8083 (secure) by default ...
 +
 +
 +
</source>
  
 
==Debian==
 
==Debian==

Latest revision as of 22:24, 5 January 2016


This page is under development most of the instructions do not work yet

This article explains the various ways you can build a development environment for EPrints source contributions. If you have a method not listed here then please add it. Instructions assume familiarity with EPrints and the command line. You can use repositories built in this way to test contributions to EPrints source before pushing them to the git remote.

If you find bugs with any of these instructions please update them

Ubuntu 14.04

Take a clean ubuntu 14.04 build

sudo su
apt-get install git libtest-memory-cycle-perl libtest-mockobject-perl
echo "deb http://deb.eprints.org/ nightly/
deb-src http://deb.eprints.org/ source/" > /etc/apt/sources.list.d/eprints.nightly.list
apt-get update
apt-get build-dep eprints
ln -s /home/<yourusername>/eprints /usr/share/eprints3
echo "Include /usr/share/eprints3/cfg/apache.conf" > /etc/apache2/sites-available/eprints-git.conf
sudo a2ensite eprints-git
 
su <yourusername>
cd ~
git clone git@github.com:eprints/eprints.git
 
 
echo "package EPrints::SystemSettings;
 
\$EPrints::SystemSettings::conf =
{
        'base_path' => '/usr/share/eprints3',
        'version_id' => 'git',
        'version' => 'EPrints (development version)',
        'user' => '$USER',
        'group' => '$USER',
        'smtp_server' => 'smtp',
};
 
1;"  > eprints/perl_lib/EPrints/SystemSettings.pm
 
cd eprints
bin/generate_apacheconf
 
bin/epadmin create #create a repository in the normal manner remember your <archiveid>
 
sudo service apache2 restart
 
sudo chgrp www-data archives/test/documents/ -R
 
testdata/bin/import_test_data <archiveid>
 
bin/indexer start
 
# wait for 5 minutes or so until the indexing is done
 
bin/epadmin unit_tests

CentOS /RHEL

User-space EPrints (when EPrints is already installed on the VM)

See: https://github.com/eprints/apache_rhel

> mkdir eprints-github
> git clone https://github.com/eprints/eprints.git
... clones into eprints ...
> cd eprints
> mkdir apache
> git clone https://github.com/eprints/apache_rhel.git apache
... cloning into apache ...
> vi perl_lib/EPrints/SystemSettings.pm
        ##### add the following - setting 'user' and 'group' to your username/group
        package EPrints::SystemSettings;
 
        $EPrints::SystemSettings::conf =
        {
                'user' => 'john',
                'group' => 'john',
                'smtp_server' => '',
        };
 
        1;
        ### save and quit (:wq)
 
> bin/epadmin create
... fill in the details ...
... the userspace apache will listen to port 8080 and 8083 (secure) by default ...

Debian

User-space

See: https://github.com/eprints/apache_debian