Differences
This shows you the differences between two versions of the page.
— |
documentation:2.1:contribute [2019/12/04 15:37] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | **Do you want to contribute to LemonLdap:: | ||
+ | ====== Contribute to Project ====== | ||
+ | |||
+ | ===== Configure SSH ===== | ||
+ | |||
+ | //On Debian developper station :// | ||
+ | ssh-keygen -o -t rsa -b 4096 -C " | ||
+ | |||
+ | Go to your gitlab account : | ||
+ | https:// | ||
+ | |||
+ | cat ~/ | ||
+ | copy id_rsa.pub content to key section and enter a name into " | ||
+ | Test ssh connexion : | ||
+ | ssh -T git@gitlab.com | ||
+ | accept messages | ||
+ | |||
+ | ===== Install basic tools ===== | ||
+ | |||
+ | === Debian === | ||
+ | |||
+ | //root :// | ||
+ | apt install aptitude | ||
+ | aptitude install vim make devscripts yui-compressor git git-gui libjs-uglify coffeescript cpanminus autopkgtest pkg-perl-autopkgtest | ||
+ | aptitude install libauth-yubikey-webclient-perl libnet-smtp-server-perl | ||
+ | | ||
+ | cpanm Authen::U2F Authen:: | ||
+ | | ||
+ | curl -sL https:// | ||
+ | apt-get install -y nodejs | ||
+ | | ||
+ | npm install -g protractor | ||
+ | webdriver-manager update | ||
+ | | ||
+ | === Configure Git === | ||
+ | |||
+ | //user :// | ||
+ | git config --global user.name "Name Surname" | ||
+ | git config --global user.email " | ||
+ | git config --global core.editor vim | ||
+ | git config --global merge.tool vimdiff | ||
+ | git config --list | ||
+ | git config --global color.ui true | ||
+ | git config --list | ||
+ | |||
+ | ==== Import Project and using Git ==== | ||
+ | //user :// | ||
+ | create directory | ||
+ | in directory : | ||
+ | git clone git@gitlab.ow2.org:// | ||
+ | cd lemonldap-ng/ | ||
+ | git log | ||
+ | git checkout master # go to master branch | ||
+ | git remote add upstream https:// | ||
+ | git fetch upstream | ||
+ | git checkout v2.1 # to change branch | ||
+ | git fetch upstream | ||
+ | |||
+ | //import version branch// | ||
+ | //on linux station :// | ||
+ | git checkout v2.1 | ||
+ | git fetch upstream --all | ||
+ | git rebase upstream/ | ||
+ | git push # to push to working remote branch | ||
+ | |||
+ | //on gitlab, create working branch, one per thematic// | ||
+ | //on linux station :// | ||
+ | git checkout workingbranch | ||
+ | git log | ||
+ | git status | ||
+ | git commit -am " | ||
+ | git commit --amend file(s) # to modify a commit | ||
+ | git rebase v2.1 # align local working branch to local 2.1 | ||
+ | git checkout -- file(s) # revert | ||
+ | git push # to send on remote working branch | ||
+ | |||
+ | On gitlab, submit merge request when tests are corrects. | ||
+ | |||
+ | ===== Install dependencies | ||
+ | |||
+ | aptitude install libapache-session-perl libcache-cache-perl libclone-perl libconfig-inifiles-perl libconvert-pem-perl libcrypt-openssl-bignum-perl libcrypt-openssl-rsa-perl libcrypt-openssl-x509-perl libcrypt-rijndael-perl libdbi-perl libdigest-hmac-perl libemail-sender-perl libgd-securityimage-perl libhtml-template-perl libio-string-perl libjson-perl libmime-tools-perl libmouse-perl libnet-ldap-perl libplack-perl libregexp-assemble-perl libregexp-common-perl libsoap-lite-perl libstring-random-perl libtext-unidecode-perl libunicode-string-perl liburi-perl libwww-perl libxml-simple-perl libxml-libxslt-perl libcrypt-urandom-perl libconvert-base32-perl | ||
+ | aptitude install apache2 libapache2-mod-fcgid libapache2-mod-perl2 | ||
+ | aptitude install nginx nginx-extras | ||
+ | aptitude install perltidy | ||
+ | |||
+ | SAML : | ||
+ | aptitude install liblasso-perl libglib-perl | ||
+ | |||
+ | ===== Working Project | ||
+ | |||
+ | ==== Unit tests ==== | ||
+ | |||
+ | Launch unit tests: | ||
+ | < | ||
+ | make test # or manager_test, | ||
+ | </ | ||
+ | |||
+ | Same tests launched on a simulated install | ||
+ | < | ||
+ | make autopkgtest # or autopkg_portal, | ||
+ | </ | ||
+ | | ||
+ | Execute an unit test : | ||
+ | < | ||
+ | # Building project | ||
+ | cd ~/ | ||
+ | # Go to parent test directory | ||
+ | cd ~/ | ||
+ | # and execute the unit test: | ||
+ | prove -v t/ | ||
+ | </ | ||
+ | |||
+ | Launch tests with LDAP backend, for example with OpenLDAP LTB package: | ||
+ | < | ||
+ | make LLNGTESTLDAP=1 LLNGTESTLDAP_SLAPD_BIN=/ | ||
+ | </ | ||
+ | |||
+ | ==== Other commands ==== | ||
+ | < | ||
+ | make start_web_server # TESTUSESSL=1 to enable SSL engine (only available for Apache) | ||
+ | make start_web_server TESTWEBSERVER=nginx # to use Nginx web server | ||
+ | make stop_web_server | ||
+ | make reload_web_server # to reload LL:NG conf | ||
+ | make clean # to clean test files | ||
+ | make minify # to minify and compile coffeescript | ||
+ | make json # to build conf and manager tree | ||
+ | make manifest # to update manifest | ||
+ | make tidy # to magnify perl files (perl best pratices) | ||
+ | </ |