mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 09:01:40 +01:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51e61c8ef3 | ||
|
|
e69d016b9f | ||
|
|
53dbc754f6 | ||
|
|
a9dcecbc2f | ||
|
|
5d524f7973 | ||
|
|
1b2f16b01a |
@@ -4,10 +4,10 @@ languages:
|
||||
JavaScript: true
|
||||
PHP: true
|
||||
engines:
|
||||
phpcodesniffer: true
|
||||
phpcodesniffer: true
|
||||
exclude_paths:
|
||||
- 'build/*'
|
||||
- 'dev/*'
|
||||
- 'doc/*'
|
||||
- 'test/*'
|
||||
- 'htdocs/includes/*'
|
||||
- 'htdocs/includes/*'
|
||||
@@ -22,7 +22,3 @@ indent_style = tab
|
||||
indent_style = tab
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
[*.sql]
|
||||
indent_style = tab
|
||||
trim_trailing_whitespace = true
|
||||
indent_size = 4
|
||||
|
||||
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -3,7 +3,7 @@
|
||||
* text=auto
|
||||
|
||||
|
||||
# Explicitly declare text files we want to always be normalized and converted
|
||||
# Explicitly declare text files we want to always be normalized and converted
|
||||
# to native line endings on checkout.
|
||||
*.php text eol=lf
|
||||
*.pl text eol=lf
|
||||
@@ -21,7 +21,6 @@
|
||||
*.yml text eol=lf
|
||||
*.yaml text eol=lf
|
||||
*.conf text eol=lf
|
||||
*.neon text eol=lf
|
||||
|
||||
.bash_aliases text eol=lf
|
||||
|
||||
|
||||
7
.github/CONTRIBUTING.md
vendored
7
.github/CONTRIBUTING.md
vendored
@@ -30,7 +30,6 @@ Default **language here is English**. So please prepare your contributions in En
|
||||
5. Commit and push your changes.
|
||||
6. [Make a pull request](https://help.github.com/articles/creating-a-pull-request).
|
||||
|
||||
|
||||
<span id="branches" name="branches"></span>
|
||||
### Branches
|
||||
|
||||
@@ -45,11 +44,9 @@ higher versions.
|
||||
The rule N - 2 is just a tip if you don't know which version to choose to get the best the best compromise between ease of correction
|
||||
and number of potential beneficiaries of the correction.
|
||||
|
||||
|
||||
### General rules
|
||||
Please don't edit the ChangeLog file. This file is generated from all commit messages during release process by the project manager.
|
||||
|
||||
|
||||
### <a name="commits"></a>Commits
|
||||
Use clear commit messages with the following structure:
|
||||
|
||||
@@ -113,9 +110,7 @@ Short description (when the commit is not introducing feature nor closing a bug)
|
||||
Long description (Can span across multiple lines).
|
||||
</pre>
|
||||
|
||||
|
||||
### Pull Requests
|
||||
|
||||
Pull Request (PR) process is the process to submit a change (enhancement, bug fix, ...) into the code of the project. There is some rules to know and
|
||||
a process to follow to optimize the chance to have PRs merged efficiently...
|
||||
|
||||
@@ -125,8 +120,6 @@ a process to follow to optimize the chance to have PRs merged efficiently...
|
||||
|
||||
* When submitting a pull request, use same rule as [Commits](#commits) for the message. If your pull request only contains 1 commit, GitHub will be smart enough to fill it for you. Otherwise, please be a bit verbose about what you're providing.
|
||||
|
||||
* A screenshot will be always required for any PR of change/addition of a GUI behaviour.
|
||||
|
||||
Also, some code changes need a prior approbation:
|
||||
|
||||
* if you want to include a new external library (into htdocs/includes directory), please ask before to the core project manager (mention @dolibarr-jedi in your issue) to see if such a library can be accepted.
|
||||
|
||||
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@@ -2,4 +2,4 @@
|
||||
|
||||
open_collective: dolibarr
|
||||
custom: https://wiki.dolibarr.org/index.php/Subscribe
|
||||
github: [eldy]
|
||||
github: [eldy]
|
||||
35
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
35
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -7,7 +7,7 @@ body:
|
||||
attributes:
|
||||
value: |
|
||||
This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.
|
||||
|
||||
|
||||
- type: textarea
|
||||
id: bug
|
||||
attributes:
|
||||
@@ -19,28 +19,51 @@ body:
|
||||
- type: input
|
||||
id: environment-version
|
||||
attributes:
|
||||
label: Dolibarr Version
|
||||
label: Environment Version
|
||||
description: Affected Dolibarr version(s)
|
||||
placeholder: 19.0, develop, ...
|
||||
|
||||
- type: input
|
||||
id: environment-os
|
||||
attributes:
|
||||
label: Environment OS
|
||||
description: Server OS type and version
|
||||
|
||||
- type: input
|
||||
id: environment-webserver
|
||||
attributes:
|
||||
label: Environment Web server
|
||||
description: Webserver type and version
|
||||
|
||||
- type: input
|
||||
id: environment-php
|
||||
attributes:
|
||||
label: Environment PHP
|
||||
description: PHP version
|
||||
|
||||
|
||||
- type: input
|
||||
id: environment-database
|
||||
attributes:
|
||||
label: Environment Database
|
||||
description: Database type and version
|
||||
|
||||
- type: input
|
||||
id: environment-urls
|
||||
attributes:
|
||||
label: Environment URL(s)
|
||||
description: Affected URL(s)
|
||||
|
||||
- type: textarea
|
||||
id: expected-behaviour
|
||||
attributes:
|
||||
label: Expected and actual behavior
|
||||
description: Verbose description
|
||||
|
||||
- type: textarea
|
||||
id: reproduce
|
||||
attributes:
|
||||
label: Steps to reproduce the behavior and expected behavior
|
||||
label: Steps to reproduce the behavior
|
||||
description: Verbose description
|
||||
|
||||
|
||||
- type: textarea
|
||||
id: files
|
||||
attributes:
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -21,7 +21,7 @@ body:
|
||||
attributes:
|
||||
label: Use case
|
||||
description: Verbose description
|
||||
|
||||
|
||||
- type: textarea
|
||||
id: suggested-implementation
|
||||
attributes:
|
||||
|
||||
0
.github/tmp/.gitkeep
vendored
0
.github/tmp/.gitkeep
vendored
16
.github/workflows/README.md
vendored
16
.github/workflows/README.md
vendored
@@ -1,16 +0,0 @@
|
||||
# Workflow run order
|
||||
|
||||
To reduce run minutes, the following order is put in place:
|
||||
|
||||
On PR & Merge, always run:
|
||||
|
||||
- pre-commit;
|
||||
- phan.
|
||||
|
||||
When both succeed, start:
|
||||
|
||||
- phpstan;
|
||||
- Windows-ci;
|
||||
- travis.
|
||||
|
||||
See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow
|
||||
36
.github/workflows/cache-clean-pr.yml
vendored
36
.github/workflows/cache-clean-pr.yml
vendored
@@ -1,36 +0,0 @@
|
||||
---
|
||||
name: Cleanup caches of a closed branch
|
||||
# See https://github.com/actions/cache/blob/main/tips-and-workarounds.md#force-deletion-of-caches-overriding-default-cache-eviction-policy
|
||||
on:
|
||||
pull_request:
|
||||
types: [closed]
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# `actions:write` permission is required to delete caches
|
||||
# See also: https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-a-github-actions-cache-for-a-repository-using-a-cache-id
|
||||
actions: write
|
||||
contents: read
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
- name: Cleanup
|
||||
run: |
|
||||
gh extension install actions/gh-actions-cache
|
||||
REPO=${{ github.repository }}
|
||||
BRANCH=refs/pull/${{ github.event.pull_request.number }}/merge
|
||||
echo "Fetching list of cache key"
|
||||
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
|
||||
|
||||
## Setting this to not fail the workflow while deleting cache keys.
|
||||
set +e
|
||||
echo "Deleting caches..."
|
||||
for cacheKey in $cacheKeysForPR
|
||||
do
|
||||
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
|
||||
done
|
||||
echo "Done"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
41
.github/workflows/ci-on-pull_request.yml
vendored
41
.github/workflows/ci-on-pull_request.yml
vendored
@@ -1,41 +0,0 @@
|
||||
name: "CI-PULL-REQUEST"
|
||||
|
||||
on: [pull_request]
|
||||
jobs:
|
||||
pre-commit:
|
||||
uses: ./.github/workflows/pre-commit.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
phan:
|
||||
uses: ./.github/workflows/phan.yml
|
||||
secrets: inherit
|
||||
needs: [pre-commit]
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
phpstan:
|
||||
uses: ./.github/workflows/phpstan.yml
|
||||
secrets: inherit
|
||||
needs: [pre-commit]
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
#windows-ci:
|
||||
# needs: [pre-commit, phan, phpstan]
|
||||
# secrets: inherit
|
||||
# uses: ./.github/workflows/windows-ci.yml
|
||||
# with:
|
||||
# gh_event: ${{ github.event_name }}
|
||||
#gh-travis: # Runs travis script on github runner (not on travis)
|
||||
# if: false
|
||||
# # needs: [pre-commit, phan]
|
||||
# # needs: [windows-ci]
|
||||
# secrets: inherit
|
||||
# needs: [pre-commit, phan, phpstan]
|
||||
# uses: ./.github/workflows/gh-travis.yml
|
||||
# with:
|
||||
# gh_event: ${{ github.event_name }}
|
||||
|
||||
# Note (not tested, from https://github.com/orgs/community/discussions/38361)
|
||||
# To cancel jobs if one fails, the following action may help
|
||||
# - if: "failure()"
|
||||
# uses: "andymckay/cancel-action@0.3"
|
||||
40
.github/workflows/ci-on-push.yml
vendored
40
.github/workflows/ci-on-push.yml
vendored
@@ -1,40 +0,0 @@
|
||||
name: "CI-PUSH"
|
||||
|
||||
on: [push]
|
||||
jobs:
|
||||
pre-commit:
|
||||
uses: ./.github/workflows/pre-commit.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
phan:
|
||||
uses: ./.github/workflows/phan.yml
|
||||
secrets: inherit
|
||||
needs: [pre-commit]
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
phpstan:
|
||||
uses: ./.github/workflows/phpstan.yml
|
||||
secrets: inherit
|
||||
needs: [pre-commit, phan]
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
windows-ci:
|
||||
needs: [pre-commit, phan, phpstan]
|
||||
secrets: inherit
|
||||
uses: ./.github/workflows/windows-ci.yml
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
gh-travis: # Runs travis script on github runner (not on travis)
|
||||
if: false
|
||||
# needs: [pre-commit, phan]
|
||||
# needs: [windows-ci]
|
||||
secrets: inherit
|
||||
uses: ./.github/workflows/gh-travis.yml
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
|
||||
# Note (not tested, from https://github.com/orgs/community/discussions/38361)
|
||||
# To cancel jobs if one failes, the following action may help
|
||||
# - if: "failure()"
|
||||
# uses: "andymckay/cancel-action@0.3"
|
||||
2
.github/workflows/exakat.yml
vendored
2
.github/workflows/exakat.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
- name: Exakat
|
||||
uses: docker://exakat/exakat-ga
|
||||
with:
|
||||
ignore_rules: 'Classes/UseInstanceof,Constants/ConstantStrangeNames,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/NestedTernary,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
|
||||
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/NestedTernary,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
|
||||
ignore_dirs: '/htdocs/includes/,/htdocs/install/doctemplates/,/build/,/dev/,/doc/,/scripts/,/test/'
|
||||
file_extensions: php
|
||||
project_reports: Perfile
|
||||
|
||||
49
.github/workflows/gh-travis.yml.disabled
vendored
49
.github/workflows/gh-travis.yml.disabled
vendored
@@ -1,49 +0,0 @@
|
||||
---
|
||||
# This runs a travis script inside a github runner
|
||||
name: Travis
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
# workflow called by the parent workflow ci.yml
|
||||
workflow_call:
|
||||
inputs:
|
||||
gh_event:
|
||||
required: true
|
||||
type: string
|
||||
# can run job manually
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: travis-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref
|
||||
}}
|
||||
cancel-in-progress: true
|
||||
env:
|
||||
gh_event: ${{ inputs.gh_event || github.event_name }}
|
||||
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
# This workflow contains a single job
|
||||
gh-travis:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
# matrix:
|
||||
# php-version:
|
||||
# # PHPStan requires PHP >= 7.2.
|
||||
# #- "7.2"
|
||||
# - "8.2"
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
- name: Checkout travis file
|
||||
uses: actions/checkout@v4
|
||||
- name: Run .travis.yml build script
|
||||
uses: ktomk/run-travis-yml@v1
|
||||
with:
|
||||
# run-job: travis # name of a job in travis file
|
||||
allow-failure: false
|
||||
# file: .travis.yml
|
||||
# steps: | # Default: setup, before_install, install, before_script, script, after_script, before_deploy
|
||||
# install
|
||||
# script
|
||||
# env:
|
||||
# TRAVIS_PHP_VERSION: ${{ matrix.php-version }}
|
||||
55
.github/workflows/phan.yml
vendored
55
.github/workflows/phan.yml
vendored
@@ -1,55 +0,0 @@
|
||||
---
|
||||
on:
|
||||
# workflow called by the parent workflow ci.yml
|
||||
workflow_call:
|
||||
inputs:
|
||||
gh_event:
|
||||
required: true
|
||||
type: string
|
||||
# can run job manually
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: phan-${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
env:
|
||||
gh_event: ${{ inputs.gh_event || github.event_name }}
|
||||
PHAN_CONFIG: >
|
||||
${{ 'dev/tools/phan/config.php' }}
|
||||
PHAN_BASELINE: dev/tools/phan/baseline.txt
|
||||
PHAN_MIN_PHP: 7.0
|
||||
PHAN_QUICK: ${{ github.event.schedule && '' || '--quick' }}
|
||||
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
|
||||
|
||||
name: phan
|
||||
jobs:
|
||||
phan:
|
||||
name: Run phan
|
||||
runs-on: ubuntu-latest
|
||||
# Do not run schedule on forks
|
||||
if: |
|
||||
github.repository == 'Dolibarr/dolibarr'
|
||||
|| github.event.schedule == false
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.2
|
||||
coverage: none # disable xdebug, pcov
|
||||
tools: cs2pr,phan:5.5.2
|
||||
- name: Run Phan analysis
|
||||
run: |
|
||||
phan $PHAN_QUICK -k $PHAN_CONFIG -B $PHAN_BASELINE --analyze-twice --minimum-target-php-version $PHAN_MIN_PHP --output-mode=checkstyle -o _phan.xml
|
||||
- name: Add results to PR
|
||||
if: ${{ always() }}
|
||||
run: |
|
||||
cs2pr --prepend-filename --prepend-source --notices-as-warnings _phan.xml
|
||||
- name: Provide phan log as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ always() }}
|
||||
with:
|
||||
name: phan-srcrt
|
||||
# path: ${{ github.workspace }}/phan.log
|
||||
path: ${{ github.workspace }}/_phan.xml
|
||||
retention-days: 2
|
||||
@@ -1,7 +1,6 @@
|
||||
name: "PHPCS"
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
paths:
|
||||
- "**.php"
|
||||
@@ -12,7 +11,6 @@ jobs:
|
||||
phpcs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Get git sources
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 50 # important!
|
||||
63
.github/workflows/phpcsfixer.yml.disabled
vendored
Normal file
63
.github/workflows/phpcsfixer.yml.disabled
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
name: GitHub CI PHPCS and PHPCBF
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened]
|
||||
#on:
|
||||
# push:
|
||||
# paths:
|
||||
# - '**.php'
|
||||
|
||||
jobs:
|
||||
#filesChanged:
|
||||
# uses: ./.github/workflows/files_changed.yaml
|
||||
# with:
|
||||
# folder_path: .*
|
||||
|
||||
linter_name:
|
||||
name: Run & fix PHP Code Sniffer
|
||||
runs-on: ubuntu-latest
|
||||
#needs: filesChanged
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
# fetch-depth: 10
|
||||
|
||||
- name: echo Get list of all changed files
|
||||
run: |
|
||||
#echo ${{ needs.filesChanged.outputs.all_changed_files }}
|
||||
#echo boolean_output=${{ needs.filesChanged.outputs.boolean_output }}
|
||||
echo github.head_ref=${{github.head_ref}}
|
||||
echo github.base_ref=${{github.base_ref}}
|
||||
echo github.ref_name=${{github.ref_name}}
|
||||
|
||||
- uses: eldy/phpcsfixer-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.github_token }}
|
||||
use_default_configuration_file: false
|
||||
phpcs_standard: 'dev/setup/codesniffer/ruleset.xml'
|
||||
phpcs_head_ref: ${{github.head_ref}}
|
||||
phpcs_base_ref: ${{github.base_ref}}
|
||||
phpcs_ref_name: ${{github.ref_name}}
|
||||
phpcs_github_event_name: ${{github.event_name}}
|
||||
phpcs_files: ${{ needs.filesChanged.outputs.all_changed_files }}
|
||||
|
||||
#- uses: stefanzweifel/git-auto-commit-action@v4 # auto commit the fixes action for GitHub
|
||||
# with:
|
||||
# commit_message: Fix PHPCS errors by GitHub PHPCSfixer action
|
||||
|
||||
- name: Commit changes
|
||||
uses: EndBug/add-and-commit@v9.1.3
|
||||
with:
|
||||
default_author: github_actions
|
||||
committer_name: GitHub Actions
|
||||
committer_email: actions@github.com
|
||||
#author_name: PHP CS fixer
|
||||
#author_email: eldy@destailleur.fr
|
||||
#committer_name: PHP CS fixer
|
||||
#committer_email: eldy@destailleur.fr
|
||||
message: 'PHP CS fixer github action'
|
||||
add: '*.php'
|
||||
|
||||
87
.github/workflows/phpstan.yml
vendored
87
.github/workflows/phpstan.yml
vendored
@@ -1,87 +0,0 @@
|
||||
---
|
||||
# This is a basic workflow to check code with PHPSTAN tool
|
||||
name: PHPStan
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
# workflow called by the parent workflow ci.yml
|
||||
workflow_call:
|
||||
inputs:
|
||||
gh_event:
|
||||
required: true
|
||||
type: string
|
||||
# can run job manually
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: stan-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
env:
|
||||
gh_event: ${{ inputs.gh_event || github.event_name }}
|
||||
CACHE_KEY_PART: ${{ ( inputs.gh_event == 'pull_request' || github.event_name == 'pull_request' ) && format('{0}-{1}', github.base_ref, github.head_ref) || github.ref_name }}
|
||||
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
# This workflow contains a single job
|
||||
php-stan:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-version:
|
||||
# PHPStan requires PHP >= 7.2.
|
||||
#- "7.2"
|
||||
- '8.2'
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Get PHP and addons
|
||||
- name: Setup PHP
|
||||
id: setup-php
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
tools: phpstan:1, cs2pr
|
||||
extensions: calendar, json, imagick, gd, zip, mbstring, intl, opcache, imap,
|
||||
mysql, pgsql, sqlite3, ldap, xml, mcrypt
|
||||
|
||||
# Restore old cache
|
||||
- name: Restore phpstan cache
|
||||
id: cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ./.github/tmp
|
||||
key: phpstan-cache-${{ matrix.php-version }}-${{ env.CACHE_KEY_PART }}-${{
|
||||
github.run_id }}
|
||||
restore-keys: |
|
||||
phpstan-cache-${{ matrix.php-version }}-${{ env.CACHE_KEY_PART }}-
|
||||
phpstan-cache-${{ matrix.php-version }}-${{ github.head_ref }}-
|
||||
phpstan-cache-${{ matrix.php-version }}-${{ github.base_ref }}-
|
||||
phpstan-cache-${{ matrix.php-version }}-
|
||||
- name: Show debug into
|
||||
run: cd ./.github/tmp && ls -al
|
||||
|
||||
# Run PHPStan
|
||||
- name: Run PHPStan
|
||||
id: phpstan
|
||||
run: |
|
||||
phpstan -vvv analyse --error-format=checkstyle --memory-limit 7G -a build/phpstan/bootstrap_action.php | tee _stan.xml | cs2pr --graceful-warnings
|
||||
# continue-on-error: true
|
||||
|
||||
# Save cache
|
||||
- name: Save phpstan cache
|
||||
uses: actions/cache/save@v4
|
||||
if: ${{ success() || ( ! cancelled() && steps.cache.outputs.cache-hit != 'true' ) }}
|
||||
with:
|
||||
path: ./.github/tmp
|
||||
key: phpstan-cache-${{ matrix.php-version }}-${{ env.CACHE_KEY_PART }}-${{
|
||||
github.run_id }}
|
||||
- name: Provide phpstan log as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ always() }}
|
||||
with:
|
||||
name: phpstan-srcrt
|
||||
path: ${{ github.workspace }}/_stan.xml
|
||||
retention-days: 2
|
||||
47
.github/workflows/pre-commit.yml
vendored
47
.github/workflows/pre-commit.yml
vendored
@@ -1,21 +1,8 @@
|
||||
---
|
||||
name: pre-commit
|
||||
on:
|
||||
# workflow called by the parent workflow ci.yml
|
||||
workflow_call:
|
||||
inputs:
|
||||
gh_event:
|
||||
required: true
|
||||
type: string
|
||||
# can run job manually
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: pre-commit-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref
|
||||
}}
|
||||
cancel-in-progress: true
|
||||
env:
|
||||
gh_event: ${{ inputs.gh_event || github.event_name }}
|
||||
pull_request:
|
||||
push:
|
||||
jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -31,7 +18,6 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# The next uses the git API because there is no clone yet.
|
||||
# It sets the variable steps.changed-php.outputs.all_changed_files for other steps
|
||||
# This is faster for a big repo.
|
||||
- name: Get all changed php files (if PR)
|
||||
id: changed-php
|
||||
@@ -51,14 +37,12 @@ jobs:
|
||||
cache: pip
|
||||
python-version: "3.11"
|
||||
- run: python -m pip install pre-commit
|
||||
|
||||
# Restore previous cache of precommit
|
||||
- uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ~/.cache/pre-commit/
|
||||
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
|
||||
# Run all the precommit tools (defined in pre-commit-config.yaml).
|
||||
- name: Extract PHP version
|
||||
id: extract-php-version
|
||||
run: |
|
||||
@@ -68,19 +52,6 @@ jobs:
|
||||
- name: Setup PHPCS
|
||||
uses: shivammathur/setup-php@v2
|
||||
# Install proper php version, and also install phpcs which may be needed
|
||||
if: |
|
||||
! cancelled() &&
|
||||
(
|
||||
steps.changed-php.outputs.any_changed == 'true'
|
||||
||
|
||||
(
|
||||
env.gh_event == 'push'
|
||||
&& (
|
||||
github.event.ref == 'refs/heads/develop'
|
||||
|| endsWith(github.event.ref, '.0')
|
||||
)
|
||||
)
|
||||
)
|
||||
with:
|
||||
php-version: ${{ env.PHP_VERSION }} # Version from check.php
|
||||
coverage: none # disable xdebug, pcov
|
||||
@@ -91,7 +62,7 @@ jobs:
|
||||
- name: Run pre-commit hooks
|
||||
env:
|
||||
# SKIP is used by pre-commit to not execute certain hooks
|
||||
SKIP: no-commit-to-branch,php-cs,php-cbf,trailing-whitespace,end-of-file-fixer
|
||||
SKIP: no-commit-to-branch,php-cs,php-cbf,trailing-whitespace,end-of-file-fixer,check-json,check-executables-have-shebangs,check-shebang-scripts-are-executable,beautysh,yamllint,shellcheck
|
||||
run: |
|
||||
set -o pipefail
|
||||
pre-commit gc
|
||||
@@ -100,14 +71,14 @@ jobs:
|
||||
# The next uses git, which is slow for a bit repo.
|
||||
# - name: Get all changed php files (if PR)
|
||||
# id: changed-php
|
||||
# uses: tj-actions/changed-files@v44
|
||||
# if: env.gh_event == 'pull_request'
|
||||
# uses: tj-actions/changed-files@v42
|
||||
# if: github.event_name == 'pull_request'
|
||||
# with:
|
||||
# files: |
|
||||
# **.php
|
||||
|
||||
- name: Run some pre-commit hooks on selected changed files only
|
||||
if: "! cancelled() && steps.changed-php.outputs.any_changed == 'true'"
|
||||
if: steps.changed-php.outputs.any_changed == 'true'
|
||||
env:
|
||||
ALL_CHANGED_FILES: ${{ steps.changed-php.outputs.all_changed_files }}
|
||||
run: |
|
||||
@@ -116,7 +87,7 @@ jobs:
|
||||
|
||||
- name: Run some pre-commit hooks on all files on push to "main" branches
|
||||
if: |
|
||||
env.gh_event == 'push'
|
||||
github.event_name == 'push'
|
||||
&& (
|
||||
github.event.ref == 'refs/heads/develop'
|
||||
|| endsWith(github.event.ref, '.0')
|
||||
@@ -125,11 +96,10 @@ jobs:
|
||||
set -o pipefail
|
||||
ln -sf ~/.cache .cache # Absolute path in .pre-commit-config.yaml
|
||||
pre-commit run --hook-stage manual -a php-cs-with-cache | tee -a ${RAW_LOG}
|
||||
pre-commit run --hook-stage manual -a sqlfluff-lint | tee -a ${RAW_LOG}
|
||||
ls -l ~/.cache/pre-commit/
|
||||
|
||||
- name: Convert Raw Log to Annotations
|
||||
uses: mdeweerd/logToCheckStyle@v2024.3.5
|
||||
uses: mdeweerd/logToCheckStyle@v2024.2.9
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
in: ${{ env.RAW_LOG }}
|
||||
@@ -149,3 +119,4 @@ jobs:
|
||||
path: |
|
||||
${{ env.RAW_LOG }}
|
||||
${{ env.CS_XML }}
|
||||
retention-days: 2
|
||||
|
||||
5
.github/workflows/stale-issues-safe.yml
vendored
5
.github/workflows/stale-issues-safe.yml
vendored
@@ -7,8 +7,8 @@ on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {} # none
|
||||
|
||||
permissions: {} # no restriction by default
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
@@ -26,3 +26,4 @@ jobs:
|
||||
days-before-close: 10
|
||||
operations-per-run: 100
|
||||
dry-run: false
|
||||
|
||||
|
||||
194
.github/workflows/windows-ci.yml
vendored
194
.github/workflows/windows-ci.yml
vendored
@@ -1,194 +0,0 @@
|
||||
---
|
||||
name: Win CI
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
# workflow called by the parent workflow ci.yml
|
||||
workflow_call:
|
||||
inputs:
|
||||
gh_event:
|
||||
required: true
|
||||
type: string
|
||||
# can run job manually
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: win-ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref
|
||||
}}
|
||||
cancel-in-progress: true
|
||||
env:
|
||||
gh_event: ${{ inputs.gh_event || github.event_name }}
|
||||
PHPUNIT_LOG: phpunit_tests.log
|
||||
DOLIBARR_LOG: documents/dolibarr.log
|
||||
PHPSERVER_LOG: phpserver.log
|
||||
PHPSERVER_DOMAIN_PORT: 127.0.0.1:8000 # could be 127.0.0.1:8000 if config modified
|
||||
CACHE_KEY_PART: ${{ ( inputs.gh_event == 'pull_request' || github.event_name == 'pull_request' ) && format('{0}-{1}', github.base_ref, github.head_ref) || github.ref_name }}
|
||||
PHP_INI_SCAN_DIR: C:\myphpini
|
||||
CKEY: win-ci-2
|
||||
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
|
||||
jobs:
|
||||
win-test:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest]
|
||||
# php_version: [7.4, 8.0] # Add more versions if needed
|
||||
php_version: [7.4] # Add more versions if needed
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php_version }}
|
||||
# ini-values: post_max_size=256M, max_execution_time=180
|
||||
extensions: >
|
||||
calendar, gd, imagick, imap, intl, json, ldap, mbstring,
|
||||
mcrypt, mysql, mysqli, opcache, pgsql, sqlite3, xml, zip
|
||||
tools: >
|
||||
composer,
|
||||
phpunit:9.5
|
||||
coverage: none
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# phpts: ts # ts for thread-safe, default nts
|
||||
|
||||
# Restore cache
|
||||
- name: Restore cache
|
||||
id: cache
|
||||
uses: actions/cache/restore@v4
|
||||
env:
|
||||
HASH: ${{ hashFiles('htdocs/install/**', 'htdocs/filefunc.inc.php') }}
|
||||
KEY_ROOT: ${{ matrix.os }}-${{ env.ckey }}-${{ matrix.php_version }}
|
||||
with:
|
||||
# See https://github.com/actions/cache/issues/1275#issuecomment-1925217178
|
||||
enableCrossOsArchive: true
|
||||
path: |
|
||||
./db_init.sql
|
||||
./db_init.sql.md5
|
||||
./.cache/mariadb
|
||||
key: ${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ env.CACHE_KEY_PART }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ env.CACHE_KEY_PART }}-
|
||||
${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ github.head_ref }}-
|
||||
${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ github.base_ref }}-
|
||||
${{ env.KEY_ROOT }}-${{ env.HASH }}-
|
||||
# ${{ env.KEY_ROOT }}-
|
||||
|
||||
- name: Setup MariaDB
|
||||
uses: frederic34/setup-mariadb@v1
|
||||
with:
|
||||
# mariadb-version: ${{ matrix.mariadb-version }}
|
||||
database: travis # Specify your database name
|
||||
|
||||
- name: Create local php.ini with open_basedir restrictions
|
||||
shell: cmd
|
||||
# Objective: separate step, and before database initialisation to verify open_basedir restrictions
|
||||
run: |-
|
||||
echo "BASEDIR=%CD%" >> %GITHUB_ENV%
|
||||
ECHO "==== Show INI file usage before our configuration ==="
|
||||
php --ini
|
||||
ECHO "==== Set PHP_INI_SCAN_DIR to include the INI File we create ==="
|
||||
mkdir %PHP_INI_SCAN_DIR%
|
||||
SET INIFILE="%PHP_INI_SCAN_DIR%\dolibarr.ini"
|
||||
SET HTDOCS_DIR=%CD%\htdocs
|
||||
SET DATA_DIR=%CD%\documents
|
||||
SET TEST_DIR=%CD%\test
|
||||
SET INITDEMO_DIR=%CD%\dev\initdemo
|
||||
ECHO "==== Create INI file to set open_basedir ==="
|
||||
echo [php] > %INIFILE%
|
||||
echo open_basedir^="%HTDOCS_DIR%;%DATA_DIR%;%TEST_DIR%;%INITDEMO_DIR%;%PHPROOT%" >> %INIFILE%
|
||||
REM Unset PHP_INI_SCAN_DIR to disable open_basedir restritions (to limit debug effort)
|
||||
REM SET PHP_INI_SCAN_DIR=
|
||||
ECHO "==== Show contents of INI file to set open_basedir ==="
|
||||
type %INIFILE%
|
||||
ECHO "==== Verify it is used by PHP ==="
|
||||
php --ini
|
||||
REM TEST OPEN_BASEDIR restriction is not limiting wrongly
|
||||
REM THE DATA_DIR MUST BE CREATED HERE - open_base does not allow it's creation
|
||||
mkdir "%DATA_DIR%"
|
||||
mkdir "%DATA_DIR%\mytest"
|
||||
php -r "$d=implode(DIRECTORY_SEPARATOR,[__DIR__,'documents','mytest']);echo 'IS_DIR '.$d.' '.((int) is_dir($d)).PHP_EOL;"
|
||||
php -r "$d=__DIR__.'\documents/mytest';echo 'TEST PATH IS SHOWN: '.$d.PHP_EOL;"
|
||||
php -r "$d=__DIR__.'\documents/mytest';echo 'IS_DIR '.$d.' '.((int) is_dir($d)).PHP_EOL;"
|
||||
ECHO "The above should show 2 successful tests"
|
||||
|
||||
- name: Run Bash script that Initialises the database
|
||||
# Note this is bash (MSYS) on Windows
|
||||
shell: bash
|
||||
run: |
|
||||
ECHO "#[group]Directory contents to verify cache files, ..."
|
||||
ls -l
|
||||
ECHO "#[endgroup]"
|
||||
ECHO "==== Verify openbase_dir restriction"
|
||||
php --ini
|
||||
# Run bash script to initialise database
|
||||
ECHO "==== Start 'setup_conf.sh' to setup database"
|
||||
${SHELL} -xv dev/setup/phpunit/setup_conf.sh
|
||||
## Updating test configuration to not stop on first failure (to see all errors) - need sed
|
||||
sed -i -e 's/stopOnFailure="[^"]*"/stopOnFailure="false"/' test/phpunit/phpunittest.xml
|
||||
ECHO "#[group]Directory contents after database setup to verify cache files, ..."
|
||||
ls -l
|
||||
ECHO "#[endgroup]"
|
||||
# Export some tool paths to reuse the from CMD shell.
|
||||
echo "TAIL=$(cygpath -w "$(which tail)")" >> "$GITHUB_ENV"
|
||||
echo "GREP=$(cygpath -w "$(which grep)")" >> "$GITHUB_ENV"
|
||||
echo "TEE=$(cygpath -w "$(which tee)")" >> "$GITHUB_ENV"
|
||||
echo "BASEDIR=$(realpath .)" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Run PHPUnit tests
|
||||
# continue-on-error: true
|
||||
shell: cmd
|
||||
# setting up php.ini, starting the php server are currently in this step
|
||||
run: |-
|
||||
ECHO "==== Visually verify our dolibarr.INI file usage ==="
|
||||
php --ini
|
||||
ECHO "==== Add our web server information to the config file ==="
|
||||
echo $dolibarr_main_url_root="http://${{ env.PHPSERVER_DOMAIN_PORT }}"; >> htdocs/conf/conf.php
|
||||
ECHO "#[group]==== Dolibarr config file contents"
|
||||
cat htdocs/conf/conf.php
|
||||
ECHO "#[endgroup]"
|
||||
ECHO "==== START PHP server"
|
||||
start /B php -S %PHPSERVER_DOMAIN_PORT% -t htdocs >> %PHPSERVER_LOG% 2>&1
|
||||
ECHO "#[group]==== Output from curl on PHP server"
|
||||
curl "http://${{ env.PHPSERVER_DOMAIN_PORT }}"
|
||||
ECHO "#[endgroup]"
|
||||
ECHO "==== START PHPUNIT TESTS"
|
||||
REM 'DOSKEY' USED to recover error code (no pipefile equivalent in windows?)
|
||||
( php "%PHPROOT%\phpunit" -d memory_limit=-1 -c %CD%\test\phpunit\phpunittest.xml "test\phpunit\AllTests.php" --exclude-group WindowsWaitingForFix & call doskey /exename=err err=%%^^errorlevel%% ) | "${{ env.TEE }}" "${{ env.PHPUNIT_LOG }}"
|
||||
echo ""
|
||||
echo "Ensure that PHPUNIT completed (no early exit from code)"
|
||||
"${{ env.TAIL }}" -5 "${{ env.PHPUNIT_LOG }}" | "${{ env.GREP }}" -qE "(OK .*[0-9]+ tests.*[0-9]+ assertions|Tests: [0-9]+)" || EXIT /B 1
|
||||
echo "PHPUNIT seems to have completed with a test result, reuse the exit code"
|
||||
for /f "tokens=2 delims==" %%A in ('doskey /m:err') do EXIT /B %%A
|
||||
|
||||
- name: Convert Raw Log to Annotations
|
||||
uses: mdeweerd/logToCheckStyle@v2024.3.5
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
in: ${{ env.PHPUNIT_LOG }}
|
||||
|
||||
- name: Provide dolibarr and phpunit logs as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ ! cancelled() }}
|
||||
with:
|
||||
name: win-ci-logs
|
||||
path: |
|
||||
${{ env.PHPUNIT_LOG }}
|
||||
${{ env.DOLIBARR_LOG }}
|
||||
${{ env.PHPSERVER_LOG }}
|
||||
db_init.sql
|
||||
db_init.sql.md5
|
||||
retention-days: 2
|
||||
|
||||
# Save cache
|
||||
- name: Save cache
|
||||
uses: actions/cache/save@v4
|
||||
if: ${{ ! cancelled() }}
|
||||
with:
|
||||
# See https://github.com/actions/cache/issues/1275#issuecomment-1925217178
|
||||
enableCrossOsArchive: true
|
||||
key: ${{ steps.cache.outputs.cache-primary-key }}
|
||||
path: |
|
||||
./db_init.sql
|
||||
./db_init.sql.md5
|
||||
./.cache/mariadb
|
||||
24
.gitignore
vendored
24
.gitignore
vendored
@@ -50,9 +50,6 @@ build/yarn-error.log
|
||||
build/node_modules/
|
||||
node_modules/
|
||||
|
||||
vendor/
|
||||
tmp/
|
||||
|
||||
#yarn
|
||||
yarn.lock
|
||||
|
||||
@@ -66,29 +63,8 @@ doc/install.lock
|
||||
/composer.json
|
||||
/composer.lock
|
||||
|
||||
# Local script, executed during pre-commit
|
||||
/local.sh
|
||||
|
||||
# Local phpstan configuration
|
||||
/phpstan.neon
|
||||
/phpstan-baseline.neon
|
||||
|
||||
# Logs
|
||||
/*.log
|
||||
|
||||
# Vim swap files
|
||||
*.sw?
|
||||
|
||||
# Generated by PHPUNIT.BAT
|
||||
/INI_PHPUNIT
|
||||
|
||||
# ignore cache builds
|
||||
/build/phpstan/phpstan
|
||||
/build/phpstan/bootstrap_custom.php
|
||||
phpstan_custom.neon
|
||||
/.php-cs-fixer.cache
|
||||
/.php_cs.cache
|
||||
/.cache
|
||||
|
||||
# ignore .htaccess files
|
||||
.htaccess
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*/
|
||||
return include __DIR__ . "/../dev/tools/phan/config.php";
|
||||
@@ -39,7 +39,7 @@ return (new PhpCsFixer\Config())
|
||||
|
||||
// Minimum version Dolibarr v18.0.0
|
||||
// Compatibility with min 7.1 is announced with Dolibarr18.0 but
|
||||
// app is still working with 7.0 so no reason to abandon compatibility with this target for the moment.
|
||||
// app is still working with 7.0 so no reason to abandon compatiblity with this target for the moment.
|
||||
// So we use target PHP70 for the moment.
|
||||
'@PHP70Migration' => true,
|
||||
//'@PHP71Migration' => true,
|
||||
@@ -1,61 +1,29 @@
|
||||
---
|
||||
exclude: (?x)^( htdocs/includes/ckeditor/.*|(\.[^/]*/.*))$
|
||||
exclude: (?x)^( htdocs/includes/ckeditor/.* )
|
||||
repos:
|
||||
# Several miscellaneous checks and fix (on yaml files, end of files fix)
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.5.0
|
||||
hooks:
|
||||
# This hook tests the name of the branch and return an error if the name is
|
||||
# 'develop' or an official version 'x.y'
|
||||
# So you can't commit if your branch name is not a custom branch name.
|
||||
# Using a custom branch name is good practice that makes it easier to manage PRs.
|
||||
# You can skip this:
|
||||
# - Permanently:
|
||||
# export SKIP=no-commit-to-branch # In your .bashrc or session.
|
||||
# - Only this for one commit:
|
||||
# SKIP=no-commit-to-branch git commit -a -m "My message"
|
||||
# - Skipping all checks for a commit:
|
||||
# git commit -a -m "My message" --no-verify
|
||||
# (Recommendation: run git commit -a .. once, then with `--no-verify`)
|
||||
- id: no-commit-to-branch
|
||||
args: [--branch, develop, --pattern, \d+.0$]
|
||||
# This checks that xml files are correct
|
||||
- id: check-xml
|
||||
exclude: |
|
||||
(?x)^(htdocs/includes/.*)$
|
||||
# This checks that yaml files are correct
|
||||
- id: check-yaml
|
||||
args: [--unsafe]
|
||||
# This checks that json files are correct
|
||||
- id: check-json
|
||||
# Fixes Fix files that have DOS end of line endings
|
||||
- id: mixed-line-ending
|
||||
# alternative for dev/tools/fixdosfiles.sh
|
||||
exclude: |
|
||||
(?x)^(htdocs/includes/tecnickcom/tcpdf/fonts/.*
|
||||
|.*/CRLF.*.php # Files in swiftmailer
|
||||
)$
|
||||
args: [--fix=lf]
|
||||
# Remove trailing whitespace
|
||||
exclude: (?x)^(htdocs/includes/tecnickcom/tcpdf/fonts/.*)$
|
||||
- id: trailing-whitespace
|
||||
exclude_types: [markdown]
|
||||
# Fix the end of file
|
||||
- id: end-of-file-fixer
|
||||
# Check that there are no completely merged file conflicts
|
||||
- id: check-merge-conflict
|
||||
stages: [pre-commit, pre-rebase, pre-commit, pre-merge-commit]
|
||||
# Check that files with shebangs have the executable bit set (in git)
|
||||
- id: check-executables-have-shebangs
|
||||
# Check that shell files are executables
|
||||
- id: check-shebang-scripts-are-executable
|
||||
exclude:
|
||||
(?x)^( dev/tools/dolibarr-postgres2mysql.php |test/other/test_serialize.php
|
||||
|test/phpunit/textutf8.txt |test/phpunit/textiso.txt |htdocs/includes/.*
|
||||
|htdocs/modulebuilder/template/.* |build/debian/dolibarr.postrm |build/debian/dolibarr.postinst
|
||||
|build/debian/dolibarr.config )$
|
||||
# Fix the first UTF8 byte
|
||||
- id: fix-byte-order-marker
|
||||
# Check that there are no files that have are the same when uppercased (conflict on windows)
|
||||
- id: check-case-conflict
|
||||
|
||||
# Beautify shell scripts
|
||||
@@ -69,63 +37,30 @@ repos:
|
||||
rev: v6.2.1
|
||||
hooks:
|
||||
- id: beautysh
|
||||
exclude: |
|
||||
(?x)^(dev/setup/git/hooks/pre-commit
|
||||
)$
|
||||
exclude: (?x)^(dev/setup/git/hooks/pre-commit)$
|
||||
args: [--tab]
|
||||
|
||||
# Run local script
|
||||
#
|
||||
# For example, to update the license in edited files, you could add to local.sh:
|
||||
# For instance to update the license in edited files, you could add to local.sh:
|
||||
#
|
||||
# ```shell
|
||||
# #!/bin/bash
|
||||
# #!/bin/bash
|
||||
# MYDIR=$(dirname "$0")
|
||||
# git diff HEAD --name-only | grep -v includes | \
|
||||
# xargs "$MYDIR/dev/tools/updatelicense.php"
|
||||
# CHANGED_INTERNALS=$(git diff --name-only | grep -v includes)
|
||||
# "$MYDIR/dev/tools/updatelicense.php" $CHANGED_INTERNALS
|
||||
# ```
|
||||
- repo: local
|
||||
hooks:
|
||||
- name: Find missing/unused/duplicate language keys
|
||||
id: check-translations
|
||||
files: (?x)^(htdocs/langs/en_US/.*\.lang)
|
||||
language: script
|
||||
entry: ./dev/translation/sanity_check_trans_missing_unused.sh
|
||||
pass_filenames: false
|
||||
args: [list]
|
||||
- id: local-precommit-script
|
||||
name: Run local script before commit if it exists
|
||||
language: system
|
||||
entry: bash -c '[ ! -x local.sh ] || ./local.sh'
|
||||
pass_filenames: false
|
||||
- id: duplicate-lang-lines
|
||||
stages: [manual]
|
||||
name: Find duplicate language lines
|
||||
files: (?x)^(htdocs/langs/en_US/.*\.lang)
|
||||
language: script
|
||||
entry: ./dev/tools/fixduplicatelanglines.sh
|
||||
pass_filenames: false
|
||||
args: [list]
|
||||
- id: duplicate-lang-keys
|
||||
stages: [manual]
|
||||
name: Find duplicate language keys
|
||||
files: (?x)^(htdocs/langs/en_US/.*\.lang)
|
||||
language: script
|
||||
entry: ./dev/tools/fixduplicatelangkey.sh
|
||||
pass_filenames: false
|
||||
args: [list]
|
||||
- id: fix-alt-languages
|
||||
stages: [manual]
|
||||
name: Fix alt languages
|
||||
# Selection: see fixaltlanguages.sh script
|
||||
files: (?x)^(htdocs/langs/(e[lnstu]|k[akmno]|s[lqrv]|b[nrs]|c[asy]|n[bel]|[ip]t|a[mr]|d[ae]|f[ar]|h[ei]|m[sy]|t[ag]|u[kr]|gl|ja|lo|ru|vi|zh)_[^/]*/.*\.lang)
|
||||
language: script
|
||||
entry: ./dev/tools/fixaltlanguages_pre-commit.sh
|
||||
pass_filenames: true
|
||||
|
||||
# Check PHP syntax
|
||||
- repo: https://github.com/mdeweerd/pre-commit-php
|
||||
rev: v1.6.8
|
||||
rev: v1.6.5
|
||||
hooks:
|
||||
- id: php-cbf
|
||||
files: \.(php)$
|
||||
@@ -137,7 +72,6 @@ repos:
|
||||
--standard=dev/setup/codesniffer/ruleset.xml,
|
||||
--report=emacs,
|
||||
--severity=5,
|
||||
--no-colors,
|
||||
]
|
||||
- alias: php-cs-with-cache
|
||||
id: php-cs
|
||||
@@ -148,7 +82,6 @@ repos:
|
||||
--standard=dev/setup/codesniffer/ruleset.xml,
|
||||
--report=emacs,
|
||||
--severity=5,
|
||||
--no-colors,
|
||||
--cache=.cache/pre-commit/dolibarr-php-cs.cache,
|
||||
.,
|
||||
]
|
||||
@@ -211,6 +144,8 @@ repos:
|
||||
- dev/tools/codespell/codespell-ignore.txt
|
||||
- -x
|
||||
- dev/tools/codespell/codespell-lines-ignore.txt
|
||||
- --uri-ignore-words-list
|
||||
- ned
|
||||
exclude_types: [image]
|
||||
exclude: (?x)^(.phan/stubs/.*)$
|
||||
additional_dependencies: [tomli]
|
||||
@@ -242,26 +177,3 @@ repos:
|
||||
hooks:
|
||||
- id: shellcheck
|
||||
args: [-W, "100"]
|
||||
|
||||
- repo: https://github.com/sqlfluff/sqlfluff
|
||||
rev: 3.0.4
|
||||
hooks:
|
||||
- id: sqlfluff-lint
|
||||
stages: [pre-commit, manual] # manual needed for ci
|
||||
exclude: (?x)^
|
||||
(htdocs/includes/.*
|
||||
|htdocs/install/doctemplates/websites/.*_template
|
||||
|htdocs/core/menus/init_menu_auguria\.sql
|
||||
|htdocs/install/doctemplates/websites/website_template-.*\.sql
|
||||
|(htdocs/install/mysql/data/(llx_20_c_departements\.sql
|
||||
|llx_accounting_account_.*\.sql)
|
||||
|(htdocs/install/mysql/migration/3\.[256]\.0-.*\.sql)
|
||||
)
|
||||
|htdocs/install/mysql/migration/(1[0-5]|[456789])\.0\.0-.*\.sql
|
||||
|htdocs/install/mysql/migration/3\.([0134789])\.0-.*\.sql
|
||||
|htdocs/install/mysql/migration/repair\.sql
|
||||
|htdocs/install/mysql/tables/llx_bookcal_availabilities-bookcal\.sql
|
||||
|htdocs/install/mysql/tables/llx_categorie(_(account|actioncomm|contact|fournisseur|knowledgemanagement-knowledgemanagement|member|product|project|societe|ticket-ticket|user|warehouse|website_page-website)?\.key\.sql)
|
||||
|htdocs/install/mysql/tables/llx_rights_def\.key\.sql
|
||||
|htdocs/install/pgsql/functions/functions(-(don|loan|mailing|opensurvey|partnership|recruitment|website))?\.sql
|
||||
)$
|
||||
|
||||
33
.travis.yml
33
.travis.yml
@@ -29,11 +29,6 @@ env:
|
||||
# Set to true for very verbose output
|
||||
- DEBUG=true
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- ~/.cache
|
||||
|
||||
|
||||
jobs:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
@@ -365,17 +360,16 @@ script:
|
||||
echo "Checking coding style (only for 1 version to not overload travis and avoid duplicate tests)"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
CACHE_OPT="--cache=${HOME}/.cache/dolibarr-phpcs-${TRAVIS_PHP_VERSION}.cache"
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
#if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --severity=1 ${CACHE_OPT} --runtime-set ignore_warnings_on_exit true .;
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --severity=1 ${CACHE_OPT} --runtime-set ignore_warnings_on_exit true .;
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --severity=1 ${CACHE_OPT} --runtime-set ignore_warnings_on_exit true .;
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
@@ -493,9 +487,6 @@ script:
|
||||
php upgrade.php 18.0.0 19.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade18001900.log || cat $TRAVIS_BUILD_DIR/upgrade18001900.log
|
||||
php upgrade2.php 18.0.0 19.0.0 > $TRAVIS_BUILD_DIR/upgrade18001900-2.log || cat $TRAVIS_BUILD_DIR/upgrade18001900-2.log
|
||||
php step5.php 18.0.0 19.0.0 > $TRAVIS_BUILD_DIR/upgrade18001900-3.log || cat $TRAVIS_BUILD_DIR/upgrade18001900-3.log
|
||||
php upgrade.php 19.0.0 20.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade19002000.log || cat $TRAVIS_BUILD_DIR/upgrade19002000.log
|
||||
php upgrade2.php 19.0.0 20.0.0 > $TRAVIS_BUILD_DIR/upgrade19002000-2.log || cat $TRAVIS_BUILD_DIR/upgrade19002000-2.log
|
||||
php step5.php 19.0.0 20.0.0 > $TRAVIS_BUILD_DIR/upgrade19002000-3.log || cat $TRAVIS_BUILD_DIR/upgrade19002000-3.log
|
||||
set +e
|
||||
echo
|
||||
|
||||
@@ -503,7 +494,6 @@ script:
|
||||
echo Show some debug info like table content or log
|
||||
#echo '\d llx_adherent' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
cat $TRAVIS_BUILD_DIR/upgrade18001900.log
|
||||
cat $TRAVIS_BUILD_DIR/upgrade19002000.log
|
||||
echo
|
||||
|
||||
- |
|
||||
@@ -532,11 +522,12 @@ script:
|
||||
|
||||
- |
|
||||
echo "Unit testing"
|
||||
# Execute phpunit, check its exit status and that the phpunit output shows a test summary
|
||||
phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php | tee /dev/tty | grep -qE "(OK .*[0-9]+ tests.*[0-9]+ assertions|Tests: [0-9]+)" ; phpunitresult=$((PIPESTATUS[0]?PIPESTATUS[0]:PIPESTATUS[2]))
|
||||
# Ensure we catch errors with -e. Set this to +e instead of -e if you want to go to the end to see dolibarr.log file.
|
||||
set -e
|
||||
phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
||||
phpunitresult=$?
|
||||
echo "Phpunit return code = $phpunitresult"
|
||||
# Comment next line if you want to go to the end to see the dolibarr.log file.
|
||||
[ $phpunitresult == 0 ] || exit $phpunitresult
|
||||
set +e
|
||||
echo
|
||||
|
||||
after_script:
|
||||
@@ -560,18 +551,18 @@ after_failure:
|
||||
# Show upgrade log files
|
||||
#for ficlog in `ls $TRAVIS_BUILD_DIR/*.log`
|
||||
#do
|
||||
#echo "Debugging information for file $ficlog"
|
||||
#echo "Debugging informations for file $ficlog"
|
||||
#cat $ficlog
|
||||
#done
|
||||
# Show Apache log file
|
||||
echo "Debugging information for file apache error.log"
|
||||
echo "Debugging informations for file apache error.log"
|
||||
sudo tail -n 200 /var/log/apache2/travis_error_log
|
||||
if [ "$DEBUG" = true ]; then
|
||||
# Dolibarr log file
|
||||
echo "Debugging information for file dolibarr.log (latest 50 lines)"
|
||||
echo "Debugging informations for file dolibarr.log (latest 50 lines)"
|
||||
tail -n 200 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
# Database log file
|
||||
echo "Debugging information for file mysql error.log"
|
||||
echo "Debugging informations for file mysql error.log"
|
||||
sudo tail -n 200 /var/log/mysql/error.log
|
||||
# TODO: PostgreSQL log file
|
||||
echo
|
||||
|
||||
@@ -428,3 +428,9 @@ source_file = htdocs/langs/en_US/workflow.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:zapier]
|
||||
file_filter = htdocs/langs/<lang>/zapier.lang
|
||||
source_file = htdocs/langs/en_US/zapier.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ PHP libraries:
|
||||
EvalMath 1.0 BSD Yes Safe math expressions evaluation. Used by dynamic price only. TODO Replace with dol_eval ?
|
||||
Escpos-php 3.0 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
|
||||
GeoIP2 0.2.0 Apache License 2.0 Yes Lib to make geoip convert
|
||||
GeoPHP 1.2 Modified BSD License Yes Lib to make geo convert
|
||||
MathPHP 2.8.1 MIT License Yes Modern math library for PHP (only few files)
|
||||
Mobiledetect 2.8.41 MIT License Yes Detect mobile devices browsers
|
||||
NuSoap 0.9.16 LGPL 2.1+ Yes Library to develop SOAP Web services. From https://github.com/f00b4r/nusoap/tree/v0.9.16
|
||||
@@ -43,7 +42,7 @@ PrestaShop-WS-Lib 94feb5f OSL-3.0 No
|
||||
PSR/Logs 1.0 MIT License Yes Library for logs (used by DebugBar)
|
||||
PSR/simple-cache ? MIT License Yes Library for cache (used by PHPSpreadSheet)
|
||||
Restler 3.1.1 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
|
||||
Sabre 4.6.0 BSD Yes DAV support
|
||||
Sabre 4.0.2 BSD Yes DAV support
|
||||
Swift Mailer 5.4.2-DEV MIT License Yes Comprehensive mailing tools for PHP
|
||||
Symfony/var-dumper ??? MIT License Yes Library to make var dump (used by DebugBar)
|
||||
Stripe 10.7.0 MIT Licence Yes Library for Stripe module
|
||||
@@ -69,7 +68,8 @@ jQuery jqueryFileTree 1.0.1 GPL and MIT License Yes
|
||||
jQuery jquerytreeview 1.4.1 MIT License Yes JS library for filetree
|
||||
jQuery TableDnD 0.6 GPL and MIT License Yes JS library plugin TableDnD (to reorder table rows)
|
||||
jQuery Timepicker 1.1.0 GPL and MIT License Yes JS library Timepicker addon for Datepicker
|
||||
jsGanttImproved 2.8.10 BSD License Yes JS library (to build Gantt reports)
|
||||
jsGanttImproved 2.7.3 BSD License Yes JS library (to build Gantt reports)
|
||||
JsTimezoneDetect 1.0.6 MIT License Yes JS library to detect user timezone
|
||||
SwaggerUI 2.2.10 GPL-2+ Yes JS library to offer the REST API explorer
|
||||
|
||||
Image libraries:
|
||||
@@ -79,7 +79,7 @@ Font libraries:
|
||||
Fontawesome 5.13 Font Awesome Free Licence Yes
|
||||
|
||||
|
||||
For more licenses compatibility information: https://www.gnu.org/licenses/licenses.en.html
|
||||
For more licenses compatibility informations: https://www.gnu.org/licenses/licenses.en.html
|
||||
|
||||
|
||||
Authors
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
# DOLIBARR ERP & CRM
|
||||
|
||||

|
||||
[](https://php.net/)
|
||||
[](https://github.com/Dolibarr/dolibarr)
|
||||
[](https://bestpractices.coreinfrastructure.org/projects/5521)
|
||||

|
||||
|
||||
Dolibarr ERP & CRM est un logiciel moderne pour gérer votre activité (société, association, auto-entrepreneurs, artisans).
|
||||
Il est simple d'utilisation et modulaire, vous permettant de n'activez que les fonctions dont vous avez besoin (contacts, fournisseurs, factures, commandes, stocks, agenda, ...).
|
||||
|
||||
60
README.md
60
README.md
@@ -5,13 +5,13 @@
|
||||
[](https://github.com/Dolibarr/dolibarr)
|
||||
[](https://bestpractices.coreinfrastructure.org/projects/5521)
|
||||
|
||||
Dolibarr ERP & CRM is a modern software package that helps manage your organization's activities (contacts, suppliers, invoices, orders, stocks, agenda…).
|
||||
Dolibarr ERP & CRM is a modern software package that helps manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
|
||||
|
||||
It's an Open-Source Software suite (written in PHP with JavaScript enhancements) designed for small, medium or large companies, foundations and freelancers.
|
||||
It's an Open Source Software suite (written in PHP with optional JavaScript enhancements) designed for small, medium or large companies, foundations and freelancers.
|
||||
|
||||
You can freely use, study, modify or distribute it according to its license.
|
||||
|
||||
You can use it as a standalone application or as a web application to access it from the Internet or from a LAN.
|
||||
You can use it as a standalone application or as a web application to access it from the Internet or a LAN.
|
||||
|
||||
Dolibarr has a large community ready to help you, free forums and [preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org)
|
||||
|
||||
@@ -19,7 +19,7 @@ Dolibarr has a large community ready to help you, free forums and [preferred par
|
||||
|
||||
## LICENSE
|
||||
|
||||
Dolibarr is released under the terms of the GNU General Public License as published by the Free Software Foundation; either Version 3 of the License, or (at your option) any later version (GPL-3+).
|
||||
Dolibarr is released under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version (GPL-3+).
|
||||
|
||||
See the [COPYING](https://github.com/Dolibarr/dolibarr/blob/develop/COPYING) file for a full copy of the license.
|
||||
|
||||
@@ -29,34 +29,35 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git
|
||||
|
||||
### Simple setup
|
||||
|
||||
If you have low technical skills and you're looking to install Dolibarr ERP/CRM with just a few clicks, you can use one of the packaged versions:
|
||||
If you have low technical skills and you're looking to install Dolibarr ERP/CRM in just a few clicks, you can use one of the packaged versions:
|
||||
|
||||
- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_(DoliWamp))
|
||||
- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian)
|
||||
- DoliRpm for Red Hat, Fedora, OpenSuse, Mandriva or Mageia
|
||||
- DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia
|
||||
|
||||
Releases can be downloaded from [official website](https://www.dolibarr.org/).
|
||||
|
||||
### Recommended setup
|
||||
### Advanced setup
|
||||
|
||||
You can use any web server supporting PHP (Apache, Nginx, ...) and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version.
|
||||
You can use a web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version.
|
||||
|
||||
On GNU/Linux, first check if your distribution has already packaged Dolibarr.
|
||||
|
||||
#### Generic install steps
|
||||
|
||||
- Verify that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
|
||||
- Uncompress the downloaded .zip archive to copy the `dolibarr/htdocs` directory and all its files inside your web server root or get the files directly from GitHub (recommended if you know git as it makes it easier if you want to upgrade later):
|
||||
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommended if you know git as it makes it easier if you want to upgrade later):
|
||||
|
||||
`git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is the main version like 9.0, 19.0, ...)
|
||||
`git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is the main version like 3.6, 9.0, ...)
|
||||
|
||||
- Set up your web server to use `dolibarr/htdocs` as root if your web server does not already define a directory to point to.
|
||||
- Set up your web server to use "*dolibarr/htdocs*" as root if your web server does not have an already defined directory to point to.
|
||||
|
||||
- Create an empty `htdocs/conf/conf.php` file and set *write* permissions for your web server user (*write* permission will be removed once install is finished)
|
||||
|
||||
- From your browser, go to the dolibarr "install/" page
|
||||
|
||||
The URL will depend on how your web configuration directs to your dolibarr installation. It may look like:
|
||||
The URL will depends on how your web setup was set up to point to your dolibarr installation. It may look like:
|
||||
|
||||
`http://localhost/dolibarr/htdocs/install/`
|
||||
|
||||
@@ -70,20 +71,18 @@ You can use any web server supporting PHP (Apache, Nginx, ...) and a supported d
|
||||
|
||||
- Follow the installer instructions
|
||||
|
||||
### SaaS/Cloud Setup
|
||||
### SaaS/Cloud setup
|
||||
|
||||
If you lack the time to install it yourself, consider exploring commercial 'ready-to-use' Cloud offerings (refer to https://saas.dolibarr.org). Keep in mind that this third option comes with associated costs.
|
||||
If you don't have time to install it yourself, you can try some commercial 'ready to use' Cloud offers (See [https://saas.dolibarr.org](https://saas.dolibarr.org)). However, this third solution is not free.
|
||||
|
||||
## UPGRADING
|
||||
|
||||
Dolibarr supports upgrading, usually without the need for any (commercial) support (depending on if you use any commercial extensions). It supports upgrading all the way from any version after 2.8 without breakage. This is unique in the ERP ecosystem and a benefit our users highly appreciate!
|
||||
|
||||
Follow these step-by-step instructions to seamlessly upgrade Dolibarr to the latest version:
|
||||
|
||||
- At first make a backup of your Dolibarr files & then [see](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr)
|
||||
- Verify that your installed PHP version is supported by the new version [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
- Overwrite all old files from the 'dolibarr' directory with files provided in the new version's package.
|
||||
- At your next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process.
|
||||
- Check that your installed PHP version is supported by the new version [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
- Overwrite all old files from the 'dolibarr' directory with files provided into the new version's package.
|
||||
- At first next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process.
|
||||
If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file in the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").
|
||||
|
||||
## WHAT'S NEW
|
||||
@@ -115,7 +114,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Customer Orders management
|
||||
- Contracts/Subscription management
|
||||
- Interventions management
|
||||
- Ticket System (+ Knowledge management)
|
||||
- Ticket System (+ Knowledge management)
|
||||
- Partnership management
|
||||
- Shipping management
|
||||
- Customer Invoices/Credit notes and payment management
|
||||
@@ -124,10 +123,10 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
Supplier/Purchase Management
|
||||
|
||||
- Suppliers/Vendors + Contacts
|
||||
- Supplier (pricing) requests
|
||||
- Supplier (price) requests
|
||||
- Purchase Orders management
|
||||
- Delivery/Reception
|
||||
- Supplier Invoices/Credit notes and payment management
|
||||
- Supplier Invoices/credit notes and payment management
|
||||
- INCOTERMS
|
||||
|
||||
Finance/Accounting
|
||||
@@ -143,7 +142,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
|
||||
Collaboration
|
||||
|
||||
- Shared calendar/agenda (with `ical` and `vcal` import/export for third-party tools integration)
|
||||
- Shared calendar/agenda (with ical and vcal import/export for third-party tools integration)
|
||||
- Projects & Tasks management
|
||||
- Event organization
|
||||
- Ticket System
|
||||
@@ -151,7 +150,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
|
||||
HR - Human Resources Management
|
||||
|
||||
- Employee leave management
|
||||
- Employee's leaves management
|
||||
- Expense reports
|
||||
- Recruitment management
|
||||
- Employee/staff management
|
||||
@@ -179,22 +178,21 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Multi-Language Support (Localization in most major languages)
|
||||
- Multi-users and groups with finely-grained rights
|
||||
- Multi-Currency
|
||||
- Multi-Company (by adding an external module)
|
||||
- Multi-Company (by adding of an external module)
|
||||
- Very user-friendly and easy to use
|
||||
- Customizable dashboards
|
||||
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
|
||||
- APIs (REST, SOAP)
|
||||
- Code that is easy to understand, maintain and develop (PHP with no heavy framework; trigger and hook architecture)
|
||||
- Support a lot of country-specific features:
|
||||
- Spanish Tax RE and IRPF
|
||||
- Spanish Tax RE and ISPF
|
||||
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
|
||||
- Canadian double taxes (federal/province) and other countries using cumulative VAT
|
||||
- Tunisian tax stamp
|
||||
- Argentina invoice numbering using A,B,C...
|
||||
- Greece fetch customer vat details from AADE, all invoice types, MyData(external free module)
|
||||
- ZATCA e-invoicing QR-Code
|
||||
- Compatible with [European directives](https://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
|
||||
- Compatible with data privacy rules (Europe's GDPR, ...)
|
||||
- Compatible with data privacy rules (Europe GDPR, ...)
|
||||
- ...
|
||||
- Flexible PDF & ODT generation for invoices, proposals, orders...
|
||||
- ...
|
||||
@@ -217,7 +215,7 @@ These are features that Dolibarr does **not** yet fully support:
|
||||
|
||||
- Tasks dependencies in projects
|
||||
- Payroll module
|
||||
- Native embedded Webmail, but you can send email to contacts in Dolibarr with e.g. offers, invoices, etc.
|
||||
- No native embedded Webmail, but you can send emails to contacts in Dolibarr with e.g. offers, invoices, etc.
|
||||
- Dolibarr can't do coffee (yet)
|
||||
|
||||
## DOCUMENTATION
|
||||
@@ -227,7 +225,7 @@ Administrator, user, developer and translator's documentation are available alon
|
||||
## CONTRIBUTING
|
||||
|
||||
This project exists thanks to all the people who contribute.
|
||||
Please read the instructions on how to contribute (report a bug/error, a feature request, send code, ...) [[Contributing](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]
|
||||
Please read the instructions on how to contribute (report a bug/error, a feature request, send code ...) [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]
|
||||
|
||||
A View on Contributors:
|
||||
|
||||
|
||||
27
SECURITY.md
27
SECURITY.md
@@ -2,22 +2,17 @@
|
||||
|
||||
This file contains some policies about the security reports on Dolibarr ERP CRM project, one of the most popular Open Source ERP and CRM in the world.
|
||||
|
||||
|
||||
## Supported Versions for security reports
|
||||
|
||||
Security report are valid only on current stable version (see https://dolibarr.org web site to get current stable version) or on development version (branch "develop" on https://github.com/Dolibarr/dolibarr).
|
||||
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
To report a vulnerability, for a private report, you can:
|
||||
|
||||
- Send your report on Vulnerability Disclosure Program (VDP) [https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US](https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US) (recommended for everybody)
|
||||
<!--
|
||||
- Send your report on [https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US](https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US) (recommended for everybody)
|
||||
- Or if you have permissions, use GitHub security advisory at [https://github.com/Dolibarr/dolibarr/security/advisories/new](https://github.com/Dolibarr/dolibarr/security/advisories/new)
|
||||
-->
|
||||
- Or send an email to security@dolibarr.org with clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary.
|
||||
|
||||
- Or send by email to security@dolibarr.org a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary
|
||||
|
||||
## Hunting vulnerabilities on Dolibarr
|
||||
|
||||
@@ -37,7 +32,6 @@ If you try to find bug on Dolibarr, we recommend to append to your user-agent he
|
||||
|
||||
You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put in your own web server virtual host from [https://www.dolibarr.org/download](https://www.dolibarr.org/download)
|
||||
|
||||
|
||||
## Eligibility and Responsible Disclosure
|
||||
|
||||
We are happy to thank everyone who submits valid reports which help us improve the security of Dolibarr, however only those that meet the following eligibility requirements will be "validated reports" (if not, we may close the report without any answer):
|
||||
@@ -50,7 +44,6 @@ You must not leak, manipulate, or destroy any user data of third parties to find
|
||||
|
||||
Reports are processed around once a month.
|
||||
|
||||
|
||||
## Scope for qualified vulnerabilities
|
||||
|
||||
ONLY vulnerabilities discovered, when the following setup on test platform is used, are "valid":
|
||||
@@ -64,24 +57,22 @@ ONLY vulnerabilities discovered, when the following setup on test platform is us
|
||||
- MAIN_RESTRICTHTML_ONLY_VALID_HTML = 1
|
||||
- MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = 1
|
||||
- MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES = 1
|
||||
- MAIN_DISALLOW_URL_INTO_DESCRIPTIONS = 1 (only relative links are allowed in descriptions/notes), or 2 (no links are allowed in descriptions/notes)
|
||||
CSRF attacks and HTML injections are accepted but double check this setup that is experimental setup that already fix a lot of case and soon enabled by default.
|
||||
* ONLY security reports on modules provided by default and with the "stable" status are valid (troubles in "experimental", "development" or external modules are not valid vulnerabilities).
|
||||
* The root of web server must link to htdocs and the documents directory must be outside of the web server root (this is the default when using the default installer but may differs with external installer).
|
||||
* The web server setup must be done so that only the documents directory is in write mode and directory listing is not allowed. The directory path htdocs/ must be read-only.
|
||||
* The web server setup must be done so that only the documents directory is in write mode. The root directory called htdocs must be read-only.
|
||||
* The modules DebugBar and ModuleBuilder must NOT be enabled. (by default, these modules are not enabled. They are developer tools)
|
||||
* Ability for a high-level user to edit web site pages in the CMS by including HTML or JavaScript is an expected feature. Vulnerabilities in the website module are validated only if HTML or JavaScript injection can be done by a non-allowed user.
|
||||
* Fail2ban rules for rate limit on the login page, forgotten password page, API calls and all public pages (/public/*) must be installed as recommended in the section "About - Admin tools - Section Access limits and mitigation".
|
||||
|
||||
Scope is the web application (backoffice) and the APIs.
|
||||
|
||||
|
||||
## Examples of vulnerabilities that are Qualified for reporting.
|
||||
|
||||
* Remote code execution (RCE)
|
||||
* Local files access and manipulation (LFI, RFI, XXE, SSRF, XSPA)
|
||||
* Code injections (JS, SQL, PHP). HTML are covered only for fields that are not description, notes or comments fields (where rich content is allowed on purpose).
|
||||
* Cross-Site Scripting (XSS), except from setup page of module "External web site" (allowing any content here, editable by admin user only, is accepted on purpose) and except
|
||||
in the module "Web site" when permission to edit website content is allowed (injecting any data in this case is allowed too).
|
||||
* Cross-Site Scripting (XSS), except from setup page of module "External web site" (allowing any content here, editable by admin user only, is accepted on purpose) and except in the module "Web site" when permission to edit website content is allowed (injecting any data in this case is allowed too).
|
||||
* Cross-Site Requests Forgery (CSRF) with real security impact (when using GET URLs, CSRF are qualified only for creating, updating or deleting data from pages restricted to admin users)
|
||||
* Open redirect
|
||||
* Broken authentication & session management
|
||||
@@ -91,14 +82,9 @@ Scope is the web application (backoffice) and the APIs.
|
||||
* "HTTP Host Header" XSS
|
||||
* Software version disclosure (for non-admin users only)
|
||||
* Stack traces or path disclosure (for non-admin users only)
|
||||
* Ability for a high-level user to edit web site pages in the CMS by including HTML or JavaScript is an expected feature. Vulnerabilities in the website module are validated only
|
||||
if HTML or JavaScript injection can be done by a non-allowed user.
|
||||
|
||||
|
||||
## Examples of vulnerabilities that are Non-qualified for reporting.
|
||||
|
||||
* Any vulnerabilities due to a configuration different than the one defined in chapter "Scope for qualified vulnerabilities".
|
||||
* Directory Listing (this is a bad setup of the web server, not a problem into the application)
|
||||
* "Self" XSS
|
||||
* Clickjacking/UI redressing
|
||||
* Presence of autocomplete attribute on web forms
|
||||
@@ -106,10 +92,9 @@ Scope is the web application (backoffice) and the APIs.
|
||||
* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated
|
||||
* Reports on features on modules flagged as "deprecated", "experimental" or "development" if the module needs to be enabled for that (this is not the case on production).
|
||||
* Software or libraries versions, private IP disclosure, Stack traces or path disclosure when logged-in user is admin.
|
||||
* Any vulnerabilities due to a configuration different than the one defined in chapter "Scope for qualified vulnerabilities".
|
||||
* Vulnerabilities affecting outdated browsers or platforms, or vulnerabilities inside browsers themself.
|
||||
* Brute force attacks on login page, password forgotten page or any public pages (/public/*) are not qualified if the recommended fail2ban rules were not installed.
|
||||
* SSL/TLS best practices
|
||||
* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC)
|
||||
* Physical or social engineering attempts or issues that require physical access to a victim’s computer/device
|
||||
* Vulnerabilities of type XSS exploited by using javascript into a website page (with permission to edit website pages) or by using php code into a website page
|
||||
using the permission to edit php code are not qualified, except if this allow to get higher privileges (being able to set javascript or php code is the expected behaviour).
|
||||
|
||||
@@ -34,7 +34,7 @@ See makepack-howto.txt for prerequisites.
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
- To build developer documentation, launch the script
|
||||
- To build developper documentation, launch the script
|
||||
> perl dolibarr-doxygen-build.pl
|
||||
|
||||
|
||||
|
||||
@@ -1,40 +1,19 @@
|
||||
--- HOW TO USE COMPOSER
|
||||
|
||||
* Switch to the minimal version of PHP
|
||||
|
||||
update-alternatives --config php
|
||||
|
||||
|
||||
* To list packages
|
||||
|
||||
cd htdocs/includes/diroflib
|
||||
composer install
|
||||
composer show -i
|
||||
composer show -i
|
||||
|
||||
|
||||
* To upgrade a lib with composer using the composer.json of the library only:
|
||||
* To test upgrade of a lib with composer:
|
||||
|
||||
Remove entry in composer.lock
|
||||
|
||||
cd htdocs/includes/diroflib
|
||||
rm composer.lock
|
||||
|
||||
Edit composer.json to change version to "x.y.z"
|
||||
composer -v update --root-reqs --no-dev --no-autoloader --dry-run ccampbell/chromephp
|
||||
|
||||
composer -v update --root-reqs --no-dev --ignore-platform-reqs
|
||||
composer -v update --root-reqs --no-dev --ignore-platform-reqs [--no-autoloader] [--dry-run] ccampbell/chromephp
|
||||
|
||||
|
||||
* To upgrade a lib with composer using the composer.json of Dolibarr:
|
||||
* To upgrade a lib with composer:
|
||||
|
||||
Remove entry in composer.lock
|
||||
|
||||
cd /
|
||||
mv composer.json.disabled composer.json
|
||||
rm composer.lock
|
||||
|
||||
Edit composer.json to change version to "x.y.z"
|
||||
composer -v update --root-reqs --no-dev --no-autoloader ccampbell/chromephp
|
||||
|
||||
|
||||
composer -v update --root-reqs --no-dev --ignore-platform-reqs
|
||||
composer -v update --root-reqs --no-dev --ignore-platform-reqs [--no-autoloader] [--dry-run] ccampbell/chromephp
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ export QUILT_PATCHES=debian/patches
|
||||
# dpkg -l List all packages
|
||||
# dpkg -b To build binary only package
|
||||
# dpkg -c package.deb List content of package
|
||||
# dpkg -I package.deb Give information on package
|
||||
# dpkg -I package.deb Give informations on package
|
||||
# dpkg -i package.deb Install a package
|
||||
# dpkg-reconfigure -plow package Reconfigure package
|
||||
# dpkg -L packagename List content of installed package
|
||||
@@ -173,7 +173,7 @@ or
|
||||
> ls /srv/chroot
|
||||
|
||||
Puis pour se connecter et préparer l'environnement
|
||||
> schroot -c name_of_chroot (example schroot -c unstable-amd64-sbuild)
|
||||
> schroot -c name_of_chroot (exemple schroot -c unstable-amd64-sbuild)
|
||||
> cat /etc/debian_chroot to check which debian branch we are into
|
||||
> apt-get install vim dialog
|
||||
> vi /usr/sbin/policy-rc.d and replace return code 101 (not allowed) into 0 (ok)
|
||||
@@ -249,7 +249,7 @@ ou
|
||||
> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-x.y.z]
|
||||
|
||||
Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-3.5.x]
|
||||
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommitted file
|
||||
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
|
||||
Note: You can use git-buildpackage -us -uc -d if you want to test build when dependencies does not match
|
||||
Note: Package is built into directory ../build-area
|
||||
Note: To compare 2 packages: debdiff package1.dsc package2.dsc
|
||||
@@ -345,7 +345,7 @@ To update dolibarr debian package when only files not into debian has changed:
|
||||
|
||||
* Checkout the branch you want to work on: master of debian/...
|
||||
* Manually, add patches into debian/patches and update the file debian/series, or do the 2 steps with "quilt import filepatch.patch"
|
||||
* You can test patching of series with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revient a l'état du upstream sans les patch.
|
||||
* You can test patching of serie with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revient a l'état du upstream sans les patch.
|
||||
* Update the debian/changelog to add entry of change.
|
||||
|
||||
Once files has been prepared, it's time to test:
|
||||
@@ -357,7 +357,7 @@ ou
|
||||
> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
|
||||
|
||||
Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
|
||||
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommitted file
|
||||
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
|
||||
Note: You can use git-buildpackage -us -uc -d if you want to test build when dependencies does not match
|
||||
Note: Package is built into directory ../build-area
|
||||
Note: To compare 2 packages: debdiff package1.dsc package2.dsc
|
||||
|
||||
@@ -8,7 +8,7 @@ Denied from all
|
||||
</IfVersion>
|
||||
|
||||
|
||||
# OPTIMIZE: To use cache on static pages (A259200 = 1 month, A7200 = 2 hours, A691600 = 8 days = recommended for static resources).
|
||||
# OPTIMIZE: To use cache on static pages (A259200 = 1 month, A7200 = 2 hours, A691600 = 8 days = recommanded for static resources).
|
||||
# Note that you must also enable the module mod_expires.
|
||||
#ExpiresActive On
|
||||
#ExpiresByType image/x-icon A2592000
|
||||
|
||||
0
build/debian/control
Normal file → Executable file
0
build/debian/control
Normal file → Executable file
@@ -64,7 +64,7 @@ License: GPL-3+
|
||||
Files: htdocs/includes/ckeditor/*
|
||||
Copyright: 2003-2012 CKSource - Frederico Knabben
|
||||
License: GPL-2+
|
||||
The ckeditor is triple licensed under the GNU General Public License (GPL),
|
||||
The ckeditor is tripple licensed under the GNU General Public License (GPL),
|
||||
GNU Lesser General Public License (LGPL), and Mozilla Public License (MPL).
|
||||
In Debian, it is distributed under the GNU General Public License (GPL).
|
||||
.
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Debian install package run: config, preinst, prerm, postinst, postrm
|
||||
#
|
||||
|
||||
# shellcheck disable=1091,2034
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
@@ -50,7 +48,7 @@ echo "Ask for web server to setup"
|
||||
db_input critical dolibarr/reconfigure-webserver || true
|
||||
|
||||
if db_go ; then
|
||||
okcancel="1"
|
||||
okcancel="1"
|
||||
else
|
||||
okcancel="0"
|
||||
fi
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#!/bin/sh
|
||||
# postinst script for dolibarr
|
||||
|
||||
# shellcheck disable=1091,2086,2154
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
@@ -21,25 +19,25 @@ if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
|
||||
fi
|
||||
|
||||
setup_empty_conf() {
|
||||
echo Create empty file $config
|
||||
mkdir -p /etc/dolibarr
|
||||
touch /etc/dolibarr/conf.php
|
||||
chown root:www-data /etc/dolibarr/conf.php
|
||||
chmod 660 /etc/dolibarr/conf.php
|
||||
echo Create empty file $config
|
||||
mkdir -p /etc/dolibarr
|
||||
touch /etc/dolibarr/conf.php
|
||||
chown root:www-data /etc/dolibarr/conf.php
|
||||
chmod 660 /etc/dolibarr/conf.php
|
||||
}
|
||||
|
||||
is_new_upstream_version() {
|
||||
# $1 can be empty (not installed) and will result in a true value
|
||||
# for the check
|
||||
old_version=$(echo "$1" | sed -e 's/-[^-]*$//' -e 's/^[0-9]*://')
|
||||
new_version=$(dpkg-query -f '${Version}' -W dolibarr | \
|
||||
sed -e 's/-[^-]*$//' -e 's/^[0-9]*://')
|
||||
test "$old_version" != "$new_version"
|
||||
# $1 can be empty (not installed) and will result in a true value
|
||||
# for the check
|
||||
old_version=$(echo "$1" | sed -e 's/-[^-]*$//' -e 's/^[0-9]*://')
|
||||
new_version=$(dpkg-query -f '${Version}' -W dolibarr | \
|
||||
sed -e 's/-[^-]*$//' -e 's/^[0-9]*://')
|
||||
test "$old_version" != "$new_version"
|
||||
}
|
||||
|
||||
enable_install_upgrade_wizard() {
|
||||
echo Enable install wizard by removing install.lock file if present
|
||||
rm -f /var/lib/dolibarr/documents/install.lock
|
||||
rm -f /var/lib/dolibarr/documents/install.lock
|
||||
}
|
||||
|
||||
|
||||
@@ -48,24 +46,24 @@ php_install() {
|
||||
# php5endmod exists for ubuntu only
|
||||
echo "Enable php module mysqli with php5enmod"
|
||||
php5enmod mysqli
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
apache_install() {
|
||||
webserver=$1
|
||||
|
||||
|
||||
# Enable Apache 2 alias module
|
||||
if which a2enmod >/dev/null 2>&1 ;then
|
||||
echo "Enable apache module alias with a2enmod"
|
||||
a2enmod alias
|
||||
fi
|
||||
|
||||
|
||||
# Enable dolibarr conf
|
||||
if which a2enconf >/dev/null 2>&1 ;then
|
||||
# a2enconf exists for ubuntu only
|
||||
echo "Enable link for Apache config file with a2enconf"
|
||||
a2enconf dolibarr
|
||||
else
|
||||
else
|
||||
if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/dolibarr.conf ]; then
|
||||
echo "Add link for Apache config file"
|
||||
ln -s /etc/$webserver/conf-available/dolibarr.conf /etc/$webserver/conf.d/dolibarr.conf
|
||||
@@ -103,7 +101,7 @@ case "$1" in
|
||||
configure)
|
||||
if [ -z "$2" ]; then
|
||||
echo First install
|
||||
#setup_empty_conf
|
||||
#setup_empty_conf
|
||||
else
|
||||
echo This is not a first install
|
||||
fi
|
||||
@@ -111,17 +109,17 @@ case "$1" in
|
||||
php_install
|
||||
apache_install
|
||||
lighttpd_install
|
||||
|
||||
|
||||
# Remove lock file
|
||||
if is_new_upstream_version "$2"; then
|
||||
enable_install_upgrade_wizard
|
||||
enable_install_upgrade_wizard
|
||||
fi
|
||||
|
||||
# Create document directory for uploaded data files
|
||||
mkdir -p $docdir
|
||||
chown -R www-data:www-data $docdir
|
||||
chmod -R 775 $docdir
|
||||
chmod -R g+s $docdir
|
||||
|
||||
# Create document directory for uploaded data files
|
||||
mkdir -p $docdir
|
||||
chown -R www-data:www-data $docdir
|
||||
chmod -R 775 $docdir
|
||||
chmod -R g+s $docdir
|
||||
|
||||
# Copy install config file (with matching Debian values) into target directory
|
||||
superuserlogin=''
|
||||
@@ -138,14 +136,14 @@ case "$1" in
|
||||
cat $installfileorig | sed -e 's/__SUPERUSERLOGIN__/'$superuserlogin'/g' | sed -e 's/__SUPERUSERPASSWORD__/'$superuserpassword'/g' > $installconfig
|
||||
fi
|
||||
chown -R root:www-data $installconfig
|
||||
chmod -R 660 $installconfig
|
||||
chmod -R 660 $installconfig
|
||||
|
||||
# If a conf already exists and its content was already completed by installer
|
||||
if [ ! -s $config ] || ! grep -q "File generated by" $config
|
||||
then
|
||||
# Create an empty conf.php with permission to web server
|
||||
setup_empty_conf
|
||||
#else
|
||||
#else
|
||||
# File already exist. We add params not found.
|
||||
#echo Add new params to overwrite path to use shared libraries/fonts
|
||||
##grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
@@ -156,18 +154,18 @@ case "$1" in
|
||||
#grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||
fi
|
||||
|
||||
|
||||
db_get dolibarr/reconfigure-webserver
|
||||
|
||||
|
||||
webservers="$RET"
|
||||
|
||||
|
||||
# Set up web server.
|
||||
for webserver in $webservers ; do
|
||||
webserver=${webserver%,}
|
||||
echo Complete config of server $webserver
|
||||
|
||||
|
||||
# Detect webuser and webgroup
|
||||
webuser=
|
||||
webgroup=
|
||||
@@ -183,7 +181,7 @@ case "$1" in
|
||||
|
||||
# Set permissions to web server
|
||||
chown -R $webuser:$webgroup /usr/share/dolibarr
|
||||
chown -R root:$webgroup $config
|
||||
chown -R root:$webgroup $config
|
||||
done
|
||||
|
||||
# Restart web server.
|
||||
@@ -195,33 +193,33 @@ case "$1" in
|
||||
apache_install $webserver
|
||||
fi
|
||||
# Reload webserver in any case, configuration might have changed
|
||||
# Redirection of 3 is needed because Debconf uses it and it might
|
||||
# Redirection of 3 is needed because Debconf uses it and it might
|
||||
# be inherited by webserver. See bug #446324.
|
||||
if [ -f /etc/init.d/$webserver ] ; then
|
||||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||||
echo Restart web server $server using invoke-rc.d
|
||||
# This works with Debian (5.05,...) and Ubuntu (9.10,10.04,...)
|
||||
invoke-rc.d $webserver reload 3>/dev/null || true
|
||||
else
|
||||
echo Restart web server $server using $server reload
|
||||
/etc/init.d/$webserver reload 3>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
if [ -f /etc/init.d/$webserver ] ; then
|
||||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||||
echo Restart web server $server using invoke-rc.d
|
||||
# This works with Debian (5.05,...) and Ubuntu (9.10,10.04,...)
|
||||
invoke-rc.d $webserver reload 3>/dev/null || true
|
||||
else
|
||||
echo Restart web server $server using $server reload
|
||||
/etc/init.d/$webserver reload 3>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
||||
echo ----------
|
||||
echo "Call Dolibarr page http://localhost/dolibarr/ to complete the setup and use Dolibarr."
|
||||
echo ----------
|
||||
;;
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument $1" >&2
|
||||
exit 0
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
# shellcheck disable=1091,2006,2034,2086,2089,2090
|
||||
|
||||
#set -e
|
||||
set +e
|
||||
|
||||
@@ -32,8 +30,8 @@ lighttpd_remove() {
|
||||
fi
|
||||
# See bug #448682
|
||||
if [ -h /etc/lighttpd/conf-enabled/50-dolibarr.conf ] ; then
|
||||
echo "postrm Manually deleting lighttpd/dolibarr configuration link"
|
||||
rm /etc/lighttpd/conf-enabled/50-dolibarr.conf
|
||||
echo "postrm Manually deleting lighttpd/dolibarr configuration link"
|
||||
rm /etc/lighttpd/conf-enabled/50-dolibarr.conf
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -48,7 +46,7 @@ apache_remove() {
|
||||
|
||||
|
||||
if [ -f /usr/share/debconf/confmodule ]; then
|
||||
. /usr/share/debconf/confmodule
|
||||
. /usr/share/debconf/confmodule
|
||||
fi
|
||||
|
||||
db_version 2.0
|
||||
@@ -64,12 +62,12 @@ lockfile="$docdir/install.lock"
|
||||
|
||||
case "$1" in
|
||||
|
||||
# Call when we upgrade
|
||||
# Call when we upgrade
|
||||
upgrade)
|
||||
echo "postrm upgrade"
|
||||
;;
|
||||
;;
|
||||
|
||||
# Call when we uninstall
|
||||
# Call when we uninstall
|
||||
remove)
|
||||
echo "postrm remove"
|
||||
rm -f $lockfile
|
||||
@@ -87,7 +85,7 @@ case "$1" in
|
||||
else
|
||||
apache_remove $webserver
|
||||
fi
|
||||
# Redirection of 3 is needed because Debconf uses it and it might
|
||||
# Redirection of 3 is needed because Debconf uses it and it might
|
||||
# be inherited by webserver. See bug #446324.
|
||||
if [ -f /etc/init.d/$webserver ] ; then
|
||||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||||
@@ -97,9 +95,9 @@ case "$1" in
|
||||
fi
|
||||
fi
|
||||
done
|
||||
;;
|
||||
;;
|
||||
|
||||
# Call when we uninstall and purge
|
||||
# Call when we uninstall and purge
|
||||
purge)
|
||||
echo "postrm purge"
|
||||
|
||||
@@ -113,7 +111,7 @@ case "$1" in
|
||||
set +e
|
||||
db_get dolibarr/postrm
|
||||
set -e
|
||||
|
||||
|
||||
if [ "$RET" = "true" ] ; then
|
||||
echo postrm Mysql database deletion
|
||||
# Get database configuration
|
||||
@@ -133,7 +131,7 @@ case "$1" in
|
||||
dbadmin="$superuserlogin"
|
||||
dbadmpass="$superuserpassword"
|
||||
dbtype="mysql"
|
||||
|
||||
|
||||
# To delete a mysql user (disabled)
|
||||
# Needs: $dbuser - the user name to create (or replace).
|
||||
# $dballow - what hosts to allow (defaults to %).
|
||||
@@ -146,7 +144,7 @@ case "$1" in
|
||||
# mysql
|
||||
# /usr/share/wwwconfig-coomon/mysql.get
|
||||
#. /usr/share/wwwconfig-common/${dbtype}-dropuser.sh
|
||||
|
||||
|
||||
# To delete database
|
||||
# Needs: $dbname - the database that user should have access to.
|
||||
# $dbserver - the server to connect to.
|
||||
@@ -160,85 +158,85 @@ case "$1" in
|
||||
# Define mysqlcmd
|
||||
if [ -z "$dbserver" ] || [ "$dbserver" = "localhost" ]; then
|
||||
hostopt=""
|
||||
dbserver=localhost
|
||||
dbserver=localhost
|
||||
else
|
||||
case "$dbserver" in
|
||||
:*)
|
||||
dbsocket=`echo $dbserver | sed -e 's/^://'`
|
||||
hostopt="-S $dbsocket"
|
||||
;;
|
||||
*)
|
||||
hostopt="-h $dbserver"
|
||||
;;
|
||||
esac
|
||||
case "$dbserver" in
|
||||
:*)
|
||||
dbsocket=`echo $dbserver | sed -e 's/^://'`
|
||||
hostopt="-S $dbsocket"
|
||||
;;
|
||||
*)
|
||||
hostopt="-h $dbserver"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ -z "$dbadmpass" ] ; then
|
||||
log="${log}No password used."
|
||||
passopt=""
|
||||
log="${log}No password used."
|
||||
passopt=""
|
||||
else
|
||||
passopt="--password='"`echo "$dbadmpass" | sed -e "s/'/'"'"'"'"'"'"'/g"`"'"
|
||||
passopt="--password='"`echo "$dbadmpass" | sed -e "s/'/'"'"'"'"'"'"'/g"`"'"
|
||||
fi
|
||||
mysqlcmd="mysql $hostopt $passopt -u $dbadmin"
|
||||
mysqlcmdnopass="mysql $hostopt -u $dbadmin"
|
||||
|
||||
# Now run the drop user
|
||||
|
||||
# Now run the drop user
|
||||
if eval $mysqlcmd -f -e "\"DROP USER '$dbuser'@'localhost';\"" ; then
|
||||
echo postrm Database login $dbuser@localhost removed
|
||||
else
|
||||
error="Unable to run $mysqlcmdnopass -f -e \"DROP USER '$dbuser'@'localhost';\""
|
||||
error="Unable to run $mysqlcmdnopass -f -e \"DROP USER '$dbuser'@'localhost';\""
|
||||
echo postrm $error
|
||||
fi
|
||||
if eval $mysqlcmd -f -e "\"DROP USER '$dbuser'@'%';\"" ; then
|
||||
echo postrm Database login $dbuser@% removed
|
||||
else
|
||||
error="Unable to run $mysqlcmdnopass -f -e \"DROP USER '$dbuser'@'%';\""
|
||||
error="Unable to run $mysqlcmdnopass -f -e \"DROP USER '$dbuser'@'%';\""
|
||||
echo postrm $error
|
||||
fi
|
||||
|
||||
# Now run the drop commands
|
||||
if eval $mysqlcmd -f -e "\"show databases;\"" | grep -e "^$dbname" > /dev/null 2>&1 ; then
|
||||
log="${log}Dropping database $dbname."
|
||||
# Now run the drop commands
|
||||
if eval $mysqlcmd -f -e "\"show databases;\"" | grep -e "^$dbname" > /dev/null 2>&1 ; then
|
||||
log="${log}Droping database $dbname."
|
||||
if eval $mysqlcmd -f -e "\"DROP DATABASE $dbname;\"" ; then
|
||||
if eval $mysqlcmd -f -e "\"show databases;\"" | grep -e "^$dbname" > /dev/null 2>&1 ; then
|
||||
error="Database $dbname NOT successfully dropped. You have to do it manually."
|
||||
echo postrm $error
|
||||
else
|
||||
status=drop
|
||||
fi
|
||||
if eval $mysqlcmd -f -e "\"show databases;\"" | grep -e "^$dbname" > /dev/null 2>&1 ; then
|
||||
error="Database $dbname NOT successfully droped. You have to do it manually."
|
||||
echo postrm $error
|
||||
else
|
||||
status=drop
|
||||
fi
|
||||
else
|
||||
error="Unable to run the drop database script."
|
||||
error="Unable to run the drop database script."
|
||||
echo postrm $error
|
||||
fi
|
||||
else
|
||||
else
|
||||
status=nothing
|
||||
log="${log}Database $dbname already not exists."
|
||||
fi
|
||||
|
||||
echo "postrm Remove directory $docdir"
|
||||
rm -rf $docdir ;
|
||||
fi
|
||||
|
||||
echo "postrm Remove directory $docdir"
|
||||
rm -rf $docdir ;
|
||||
|
||||
else
|
||||
echo "postrm Delete of dolibarr database and uploaded files not wanted"
|
||||
echo "postrm Delete of dolibarr database and uploaded files not wanted"
|
||||
fi
|
||||
|
||||
|
||||
rm -rf /etc/dolibarr
|
||||
|
||||
# We clean variable (we ignore errors because db_reset can fails if var was never set)
|
||||
set +e
|
||||
set +e
|
||||
db_reset dolibarr/reconfigure-webserver
|
||||
db_reset dolibarr/postrm
|
||||
set -e
|
||||
set -e
|
||||
|
||||
#db_purge
|
||||
;;
|
||||
;;
|
||||
|
||||
failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||
;;
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postrm called with unknown argument $1" >&2
|
||||
exit 0
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# shellcheck disable=2034,2086,2103,2164
|
||||
|
||||
tmpdir=$(mktemp -d)
|
||||
|
||||
|
||||
# Download source file
|
||||
if [ -n "$1" ]; then
|
||||
uscan_opts="--download-version=$1"
|
||||
uscan_opts="--download-version=$1"
|
||||
fi
|
||||
#uscan --noconf --force-download --no-symlink --verbose --destdir=$tmpdir $uscan_opts
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
export DH_VERBOSE=1
|
||||
export DH_OPTIONS=-v
|
||||
|
||||
#export DH_COMPAT=7 # This is the debhelper compatibility version to use, now defined into compat file
|
||||
#export DH_COMPAT=7 # This is the debhelper compatability version to use, now defined into compat file
|
||||
|
||||
|
||||
%:
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
FROM php:8.1-apache-bullseye
|
||||
|
||||
ENV PHP_INI_DATE_TIMEZONE 'UTC'
|
||||
ENV PHP_INI_MEMORY_LIMIT 256M
|
||||
|
||||
RUN apt-get update -y \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libjpeg62-turbo \
|
||||
libpng-dev \
|
||||
libpng16-16 \
|
||||
libldap2-dev \
|
||||
libxml2-dev \
|
||||
libzip-dev \
|
||||
zlib1g-dev \
|
||||
libicu-dev \
|
||||
g++ \
|
||||
default-mysql-client \
|
||||
unzip \
|
||||
curl \
|
||||
apt-utils \
|
||||
msmtp \
|
||||
msmtp-mta \
|
||||
mailutils \
|
||||
&& apt-get autoremove -y \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install -j$(nproc) calendar intl mysqli pdo_mysql gd soap zip \
|
||||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
||||
&& docker-php-ext-install -j$(nproc) ldap && \
|
||||
mv ${PHP_INI_DIR}/php.ini-development ${PHP_INI_DIR}/php.ini
|
||||
|
||||
RUN mkdir /var/documents
|
||||
RUN chown www-data:www-data /var/documents
|
||||
|
||||
COPY docker-run.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-run.sh
|
||||
|
||||
RUN pecl install xdebug && docker-php-ext-enable xdebug
|
||||
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.mode=debug' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.start_with_request=yes' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.client_host=host.docker.internal' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.client_port=9003' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.discover_client_host=true' >> ${PHP_INI_DIR}/php.ini
|
||||
#RUN echo 'xdebug.log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.idekey="netbeans-xdebug"' >> ${PHP_INI_DIR}/php.ini
|
||||
|
||||
# set up sendmail config, to use maildev
|
||||
RUN echo "account default" > /etc/msmtprc
|
||||
RUN echo "auth off" >> /etc/msmtprc
|
||||
RUN echo "port 1025" >> /etc/msmtprc
|
||||
RUN echo "host mail" >> /etc/msmtprc
|
||||
RUN echo "from local@localdomain.com" >> /etc/msmtprc
|
||||
RUN echo "domain localhost.localdomain" >> /etc/msmtprc
|
||||
RUN echo "sendmail_path=/usr/bin/msmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
ENTRYPOINT ["docker-run.sh"]
|
||||
@@ -1,34 +0,0 @@
|
||||
# How to use it ?
|
||||
|
||||
The docker-compose.yml file is a sample of a config file to use to build and run Dolibarr in the current workspace with Docker.
|
||||
This docker image is intended for development usage.
|
||||
For production usage you should consider other contributor reference like https://hub.docker.com/r/tuxgasy/dolibarr
|
||||
|
||||
Before build/run, define the variable HOST_USER_ID as following:
|
||||
|
||||
export HOST_USER_ID=$(id -u)
|
||||
|
||||
Go in repository build/docker :
|
||||
|
||||
cd build/docker
|
||||
|
||||
And then, you can run :
|
||||
|
||||
docker-compose up
|
||||
|
||||
This will run 4 containers Docker : Dolibarr, MariaDB, PhpMyAdmin and MailDev.
|
||||
|
||||
The URL to go to the Dolibarr is :
|
||||
|
||||
http://0.0.0.0
|
||||
|
||||
The URL to go to PhpMyAdmin is (login/password is root/root) :
|
||||
|
||||
http://0.0.0.0:8080
|
||||
|
||||
In Dolibarr configuration Email let PHP mail function, To see all mail send by Dolibarr go to maildev
|
||||
|
||||
http://0.0.0.0:8081
|
||||
|
||||
Setup the database connection during the installation process, please use mariadb (name of the database container) as database host.
|
||||
Setup documents folder, during the installation process, to /var/documents
|
||||
@@ -1,62 +0,0 @@
|
||||
version: '3'
|
||||
|
||||
networks:
|
||||
internal-pod:
|
||||
internal: true
|
||||
external-pod:
|
||||
internal: false
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:latest
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpassfordev
|
||||
MYSQL_DATABASE: dolibarr
|
||||
ports:
|
||||
- "3306:3306"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin
|
||||
environment:
|
||||
PMA_HOST: mariadb
|
||||
depends_on:
|
||||
- mariadb
|
||||
ports:
|
||||
- "8080:80"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
web:
|
||||
build: .
|
||||
environment:
|
||||
HOST_USER_ID: $HOST_USER_ID
|
||||
PHP_INI_DATE_TIMEZONE: $PHP_INI_DATE_TIMEZONE
|
||||
PHP_INI_MEMORY_LIMIT: $PHP_INI_MEMORY_LIMIT
|
||||
volumes:
|
||||
- ../../htdocs:/var/www/html/
|
||||
- ../../documents:/var/documents
|
||||
ports:
|
||||
- "80:80"
|
||||
- "9000:9000"
|
||||
depends_on:
|
||||
- mariadb
|
||||
- mail
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
extra_hosts:
|
||||
- "localhost.localdomain:127.0.0.1"
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
mail:
|
||||
image: maildev/maildev
|
||||
ports:
|
||||
- "8081:1080"
|
||||
- "25:1025"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Script used by the Dockerfile.
|
||||
# See README.md to know how to create a Dolibarr env with docker
|
||||
|
||||
usermod -u "${HOST_USER_ID}" www-data
|
||||
groupmod -g "${HOST_USER_ID}" www-data
|
||||
|
||||
chgrp -hR www-data /var/www/html
|
||||
chmod g+rwx /var/www/html/conf
|
||||
|
||||
if [ ! -d /var/documents ]; then
|
||||
echo "[docker-run] => create volume directory /var/documents ..."
|
||||
mkdir -p /var/documents
|
||||
fi
|
||||
echo "[docker-run] => Set Permission to www-data for /var/documents"
|
||||
chown -R www-data:www-data /var/documents
|
||||
|
||||
echo "[docker-run] => update '${PHP_INI_DIR}/conf.d/dolibarr-php.ini'"
|
||||
cat <<EOF > "${PHP_INI_DIR}/conf.d/dolibarr-php.ini"
|
||||
date.timezone = ${PHP_INI_DATE_TIMEZONE:-UTC}
|
||||
memory_limit = ${PHP_INI_MEMORY_LIMIT:-256M}
|
||||
EOF
|
||||
|
||||
exec apache2-foreground
|
||||
36
build/docker/.github/workflows/build.yml
vendored
36
build/docker/.github/workflows/build.yml
vendored
@@ -1,36 +0,0 @@
|
||||
name: build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: '0 0 * * 6'
|
||||
|
||||
jobs:
|
||||
build-docker-images:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: docker/setup-buildx-action@v2
|
||||
- env:
|
||||
DOCKER_BUILD: 1
|
||||
DOCKER_PUSH: 1
|
||||
run: |
|
||||
echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
|
||||
./update.sh
|
||||
|
||||
update-readme:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: |
|
||||
docker run --rm -t \
|
||||
-v $(pwd):/src \
|
||||
-e DOCKER_USER=${{ secrets.DOCKER_HUB_USERNAME }} \
|
||||
-e DOCKER_PASS=${{ secrets.DOCKER_HUB_PASSWORD }} \
|
||||
-e PUSHRM_PROVIDER=dockerhub \
|
||||
-e PUSHRM_FILE=/src/README.md \
|
||||
-e PUSHRM_SHORT='Docker image for Dolibarr with auto installer on first boot.' \
|
||||
-e PUSHRM_TARGET=docker.io/tuxgasy/dolibarr \
|
||||
-e PUSHRM_DEBUG=1 \
|
||||
chko/docker-pushrm:1
|
||||
27
build/docker/.github/workflows/test.yml
vendored
27
build/docker/.github/workflows/test.yml
vendored
@@ -1,27 +0,0 @@
|
||||
name: test
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
check-update:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: |
|
||||
./update.sh
|
||||
git diff --exit-code
|
||||
|
||||
check-build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- env:
|
||||
DOLI_INSTALL_AUTO: 0
|
||||
run: |
|
||||
./update.sh
|
||||
docker build -t tuxgasy/dolibarr:develop images/develop
|
||||
docker run -d -p 127.0.0.1:80:80 --name dolibarr tuxgasy/dolibarr:develop
|
||||
docker ps | grep -q dolibarr
|
||||
3
build/docker/.gitignore
vendored
3
build/docker/.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
.idea/
|
||||
.volumes/
|
||||
docker-compose-links/
|
||||
@@ -1,43 +1,61 @@
|
||||
FROM php:8.2-apache-bookworm
|
||||
|
||||
LABEL maintainer="Yann Le Doaré <services@linuxconsole.org>"
|
||||
FROM php:8.1-apache-bullseye
|
||||
|
||||
ENV PHP_INI_DATE_TIMEZONE 'UTC'
|
||||
ENV PHP_INI_MEMORY_LIMIT 256M
|
||||
ENV PHP_INI_UPLOAD_MAX_FILESIZE 2M
|
||||
ENV PHP_INI_POST_MAX_SIZE 8M
|
||||
ENV PHP_INI_ALLOW_URL_FOPEN 0
|
||||
|
||||
RUN apt-get update -y \
|
||||
&& apt-get dist-upgrade -y \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
libc-client-dev \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libkrb5-dev \
|
||||
libldap2-dev \
|
||||
libjpeg62-turbo \
|
||||
libpng-dev \
|
||||
libpq-dev \
|
||||
libpng16-16 \
|
||||
libldap2-dev \
|
||||
libxml2-dev \
|
||||
libzip-dev \
|
||||
zlib1g-dev \
|
||||
libicu-dev \
|
||||
g++ \
|
||||
default-mysql-client \
|
||||
postgresql-client \
|
||||
cron \
|
||||
unzip \
|
||||
curl \
|
||||
apt-utils \
|
||||
msmtp \
|
||||
msmtp-mta \
|
||||
mailutils \
|
||||
&& apt-get autoremove -y \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install -j$(nproc) calendar intl mysqli pdo_mysql gd soap zip \
|
||||
&& docker-php-ext-configure pgsql -with-pgsql \
|
||||
&& docker-php-ext-install pdo_pgsql pgsql \
|
||||
&& docker-php-ext-configure ldap --with-libdir=lib/$(gcc -dumpmachine)/ \
|
||||
&& docker-php-ext-install -j$(nproc) ldap \
|
||||
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
|
||||
&& docker-php-ext-install imap \
|
||||
&& mv ${PHP_INI_DIR}/php.ini-production ${PHP_INI_DIR}/php.ini \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
||||
&& docker-php-ext-install -j$(nproc) ldap && \
|
||||
mv ${PHP_INI_DIR}/php.ini-development ${PHP_INI_DIR}/php.ini
|
||||
|
||||
RUN mkdir /var/documents
|
||||
RUN chown www-data:www-data /var/documents
|
||||
|
||||
COPY docker-run.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-run.sh
|
||||
|
||||
RUN pecl install xdebug && docker-php-ext-enable xdebug
|
||||
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.mode=debug' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.start_with_request=yes' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.client_host=host.docker.internal' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.client_port=9003' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.discover_client_host=true' >> ${PHP_INI_DIR}/php.ini
|
||||
#RUN echo 'xdebug.log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.idekey="netbeans-xdebug"' >> ${PHP_INI_DIR}/php.ini
|
||||
|
||||
# set up sendmail config, to use maildev
|
||||
RUN echo "account default" > /etc/msmtprc
|
||||
RUN echo "auth off" >> /etc/msmtprc
|
||||
RUN echo "port 1025" >> /etc/msmtprc
|
||||
RUN echo "host mail" >> /etc/msmtprc
|
||||
RUN echo "from local@localdomain.com" >> /etc/msmtprc
|
||||
RUN echo "domain localhost.localdomain" >> /etc/msmtprc
|
||||
RUN echo "sendmail_path=/usr/bin/msmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
COPY docker-run.sh /usr/local/bin/
|
||||
ENTRYPOINT ["docker-run.sh"]
|
||||
|
||||
CMD ["apache2-foreground"]
|
||||
|
||||
@@ -1,6 +1,34 @@
|
||||
# How to use it ?
|
||||
|
||||
export HOST_USER_ID=$(id -u)
|
||||
export MYSQL_ROOT_PWD=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 13; echo)
|
||||
The docker-compose.yml file is a sample of a config file to use to build and run Dolibarr in the current workspace with Docker.
|
||||
This docker image is intended for development usage.
|
||||
For production usage you should consider other contributor reference like https://hub.docker.com/r/tuxgasy/dolibarr
|
||||
|
||||
docker-compose up -d
|
||||
Before build/run, define the variable HOST_USER_ID as following:
|
||||
|
||||
export HOST_USER_ID=$(id -u)
|
||||
|
||||
Go in repository build/docker :
|
||||
|
||||
cd build/docker
|
||||
|
||||
And then, you can run :
|
||||
|
||||
docker-compose up
|
||||
|
||||
This will run 4 containers Docker : Dolibarr, MariaDB, PhpMyAdmin and MailDev.
|
||||
|
||||
The URL to go to the Dolibarr is :
|
||||
|
||||
http://0.0.0.0
|
||||
|
||||
The URL to go to PhpMyAdmin is (login/password is root/root) :
|
||||
|
||||
http://0.0.0.0:8080
|
||||
|
||||
In Dolibarr configuration Email let PHP mail function, To see all mail send by Dolibarr go to maildev
|
||||
|
||||
http://0.0.0.0:8081
|
||||
|
||||
Setup the database connection during the installation process, please use mariadb (name of the database container) as database host.
|
||||
Setup documents folder, during the installation process, to /var/documents
|
||||
|
||||
@@ -1,38 +1,62 @@
|
||||
# This docker-compose.yml file is used to build and test quickly
|
||||
# a specific version of Dolibarr
|
||||
#
|
||||
# Before build, define the variable DOLI_VERSION as following:
|
||||
# $ export DOLI_VERSION=4.0.4
|
||||
# And then, you can run :
|
||||
# $ docker-compose up
|
||||
#
|
||||
# More information about Docker-compose : https://docs.docker.com/compose/
|
||||
version: '3'
|
||||
|
||||
version: "3"
|
||||
networks:
|
||||
internal-pod:
|
||||
internal: true
|
||||
external-pod:
|
||||
internal: false
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
container_name: dolibarr-mariadb-dev
|
||||
image: mariadb:latest
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PWD
|
||||
MYSQL_DATABASE: "dolibarr-prod"
|
||||
|
||||
web:
|
||||
container_name: dolibarr-web-dev
|
||||
build: .
|
||||
|
||||
volumes:
|
||||
- ../../htdocs:/var/www/html/
|
||||
- ../../documents:/var/www/html/documents
|
||||
MYSQL_ROOT_PASSWORD: rootpassfordev
|
||||
MYSQL_DATABASE: dolibarr
|
||||
ports:
|
||||
- "3306:3306"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin
|
||||
environment:
|
||||
PMA_HOST: mariadb
|
||||
depends_on:
|
||||
- mariadb
|
||||
environment:
|
||||
WWW_USER_ID: 1000
|
||||
WWW_GROUP_ID: 1000
|
||||
DOLI_ROOT_PASSWORD: $MYSQL_ROOT_PWD
|
||||
DOLI_DATABASE: "dolibarr-prod"
|
||||
DOLI_DB_SERVER: "mariadb"
|
||||
ports:
|
||||
- "8080:80"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
web:
|
||||
build: .
|
||||
environment:
|
||||
HOST_USER_ID: $HOST_USER_ID
|
||||
PHP_INI_DATE_TIMEZONE: $PHP_INI_DATE_TIMEZONE
|
||||
PHP_INI_MEMORY_LIMIT: $PHP_INI_MEMORY_LIMIT
|
||||
volumes:
|
||||
- ../../htdocs:/var/www/html/
|
||||
- ../../documents:/var/documents
|
||||
ports:
|
||||
- "80:80"
|
||||
- "9000:9000"
|
||||
depends_on:
|
||||
- mariadb
|
||||
- mail
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
extra_hosts:
|
||||
- "localhost.localdomain:127.0.0.1"
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
mail:
|
||||
image: maildev/maildev
|
||||
ports:
|
||||
- "8081:1080"
|
||||
- "25:1025"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
12
build/docker/docker-run.sh
Executable file → Normal file
12
build/docker/docker-run.sh
Executable file → Normal file
@@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
# Script used by the Dockerfile.
|
||||
# See README.md to know how to create a Dolibarr env with docker
|
||||
# See README.md to know how to create a Dolibarr env with docker
|
||||
|
||||
usermod -u "${HOST_USER_ID}" www-data
|
||||
groupmod -g "${HOST_USER_ID}" www-data
|
||||
usermod -u ${HOST_USER_ID} www-data
|
||||
groupmod -g ${HOST_USER_ID} www-data
|
||||
|
||||
chgrp -hR www-data /var/www/html
|
||||
chmod g+rwx /var/www/html/conf
|
||||
@@ -15,12 +15,10 @@ fi
|
||||
echo "[docker-run] => Set Permission to www-data for /var/documents"
|
||||
chown -R www-data:www-data /var/documents
|
||||
|
||||
echo "[docker-run] => update '${PHP_INI_DIR}/conf.d/dolibarr-php.ini'"
|
||||
cat <<EOF > "${PHP_INI_DIR}/conf.d/dolibarr-php.ini"
|
||||
echo "[docker-run] => update ${PHP_INI_DIR}/conf.d/dolibarr-php.ini"
|
||||
cat <<EOF > ${PHP_INI_DIR}/conf.d/dolibarr-php.ini
|
||||
date.timezone = ${PHP_INI_DATE_TIMEZONE:-UTC}
|
||||
memory_limit = ${PHP_INI_MEMORY_LIMIT:-256M}
|
||||
EOF
|
||||
|
||||
cp /var/www/html/install/install.forced.docker.php /var/www/html/install/install.forced.php
|
||||
|
||||
exec apache2-foreground
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM mariadb:latest
|
||||
# Enable commented out UTF8 charset/collation options
|
||||
# Enable comented out UTF8 charset/collation options
|
||||
RUN sed '/utf8/ s/^#//' /etc/mysql/mariadb.cnf >/tmp/t && mv /tmp/t /etc/mysql/mariadb.cnf
|
||||
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/perl
|
||||
#--------------------------------------------------------------------
|
||||
# Start the generation of the development documentation with doxygen
|
||||
# Lance la generation de la doc dev doxygen
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
# Determine the patho of this script
|
||||
# Detecte repertoire du script
|
||||
($DIR=$0) =~ s/([^\/\\]+)$//;
|
||||
$DIR||='.';
|
||||
$DIR =~ s/([^\/\\])[\\\/]+$/$1/;
|
||||
|
||||
@@ -283,10 +283,10 @@ TYPEDEF_HIDES_STRUCT = NO
|
||||
# For small to medium size projects (<1000 input files) the default value is
|
||||
# probably good enough. For larger projects a too small cache size can cause
|
||||
# doxygen to be busy swapping symbols to and from disk most of the time
|
||||
# causing a significant performance penalty.
|
||||
# causing a significant performance penality.
|
||||
# If the system has enough physical memory increasing the cache will improve the
|
||||
# performance by keeping more symbols in memory. Note that the value works on
|
||||
# a logarithmic scale so increasing the size by one will roughly double the
|
||||
# a logarithmic scale so increasing the size by one will rougly double the
|
||||
# memory usage. The cache size is given by this formula:
|
||||
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
|
||||
# corresponding to a cache size of 2^16 = 65536 symbols
|
||||
|
||||
@@ -160,7 +160,7 @@ html {
|
||||
--toc-background: var(--side-nav-background);
|
||||
--toc-foreground: var(--side-nav-foreground);
|
||||
|
||||
/* height of an item in any tree / collapsible table */
|
||||
/* height of an item in any tree / collapsable table */
|
||||
--tree-item-height: 30px;
|
||||
|
||||
--memname-font-size: var(--code-font-size);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// Page created by Shepard [Fabian Pijcke] <Shepard8@laposte.net>
|
||||
// Arno Esterhuizen <arno.esterhuizen@gmail.com>
|
||||
// and Romain Bourdon <romain@anaska.com>
|
||||
//
|
||||
//
|
||||
// icones by Mark James <http://www.famfamfam.com/lab/icons/silk/>
|
||||
//
|
||||
// Modified from WampServer project by Laurent Destailleur (NLTechno)
|
||||
@@ -260,7 +260,7 @@ if (isset($_GET['askhelp']))
|
||||
// Show PHPInfo
|
||||
if (isset($_GET['phpinfo']))
|
||||
{
|
||||
phpinfo(INFO_GENERAL|INFO_MODULES);
|
||||
phpinfo();
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -274,27 +274,27 @@ if (isset($_GET['img']))
|
||||
header("Content-type: image/png");
|
||||
echo base64_decode($pngFolder);
|
||||
exit();
|
||||
|
||||
|
||||
case 'pngFolderGo' :
|
||||
header("Content-type: image/png");
|
||||
echo base64_decode($pngFolderGo);
|
||||
exit();
|
||||
|
||||
|
||||
case 'pngLogo' :
|
||||
header("Content-type: image/png");
|
||||
echo base64_decode($pngLogo);
|
||||
exit();
|
||||
|
||||
|
||||
case 'pngPlugin' :
|
||||
header("Content-type: image/png");
|
||||
echo base64_decode($pngPlugin);
|
||||
exit();
|
||||
|
||||
|
||||
case 'pngWrench' :
|
||||
header("Content-type: image/png");
|
||||
echo base64_decode($pngWrench);
|
||||
exit();
|
||||
|
||||
|
||||
case 'favicon' :
|
||||
header("Content-type: image/x-icon");
|
||||
echo base64_decode($favicon);
|
||||
@@ -324,7 +324,7 @@ foreach ($loaded_extensions as $extension) {
|
||||
$phpExtContents .= "<li>${extension}</li>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Read alias directory
|
||||
$listoffile=array();
|
||||
$aliasarray=array();
|
||||
@@ -337,10 +337,10 @@ if (is_dir($aliasDir)) {
|
||||
}
|
||||
}
|
||||
sort($listoffiles);
|
||||
|
||||
|
||||
foreach($listoffiles as $file) {
|
||||
if (is_file($aliasDir.$file) && preg_match('/\.conf/',$file))
|
||||
{
|
||||
{
|
||||
$msg = '';
|
||||
|
||||
$aliasContents.='<tr><td><ul class="aliases">';
|
||||
@@ -350,7 +350,7 @@ if (is_dir($aliasDir)) {
|
||||
if (preg_match('/dolibarr/i',$file)) $aliasContents .= $file.'</a></li></ul></td><td>http://localhost'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/</td><td>http://<i>ipofyourserver</i>'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/</td></tr>';
|
||||
elseif (preg_match('/phpmyadmin/i',$file)) $aliasContents .= $file.'</a></li></ul></td><td>http://localhost'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/</td><td>'.$langues[$langue]['NotAvailable'].'</td></tr>';
|
||||
else $aliasContents .= $file.'</a></li></ul></td> <td> </td><td>'.$langues[$langue]['NotAvailable'].'</td></tr>';
|
||||
|
||||
|
||||
$aliasarray[]=$file;
|
||||
}
|
||||
}
|
||||
@@ -358,13 +358,13 @@ if (is_dir($aliasDir)) {
|
||||
}
|
||||
if (!isset($aliasContents))
|
||||
$aliasContents = '<tr><td colspan="3">'.$langues[$langue]['txtNoAlias'].'</td></tr>';
|
||||
|
||||
|
||||
|
||||
// Read projects in www dir
|
||||
$listoffiles=array();
|
||||
$handle=opendir(".");
|
||||
if (is_resource($handle)) {
|
||||
while ($file = readdir($handle))
|
||||
while ($file = readdir($handle))
|
||||
{
|
||||
$listoffiles[]=$file;
|
||||
}
|
||||
@@ -372,14 +372,14 @@ if (is_resource($handle)) {
|
||||
}
|
||||
|
||||
foreach($listoffiles as $file) {
|
||||
if (is_dir($file) && !in_array($file,$projectsListIgnore) && !in_array($file,$aliasarray))
|
||||
{
|
||||
if (is_dir($file) && !in_array($file,$projectsListIgnore) && !in_array($file,$aliasarray))
|
||||
{
|
||||
$projectContents .= '<tr><td><ul class="projects">';
|
||||
|
||||
|
||||
$projectContents .= '<li><a href="'.$file.'/">';
|
||||
$projectContents .= $file.'</a>';
|
||||
$projectContents .= '</li>';
|
||||
|
||||
|
||||
$projectContents .= '</ul></td><td>http://localhost'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/)'.'</td><td>'.$langues[$langue]['NotAvailable'].'</td></tr>';
|
||||
}
|
||||
}
|
||||
@@ -509,7 +509,7 @@ a:hover {
|
||||
font-size: 0.85em;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="index.php?img=favicon" type="image/ico" />
|
||||
</head>
|
||||
|
||||
@@ -533,7 +533,7 @@ a:hover {
|
||||
<dd>${apacheVersion} </dd>
|
||||
<dt>{$langues[$langue]['versp']}</dt>
|
||||
<dd>${phpVersion} </dd>
|
||||
<dt>{$langues[$langue]['phpExt']}</dt>
|
||||
<dt>{$langues[$langue]['phpExt']}</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
${phpExtContents}
|
||||
@@ -554,8 +554,8 @@ a:hover {
|
||||
</td><td valign="middle">
|
||||
{$langues[$langue]['FromInternet']}
|
||||
</td></tr>
|
||||
${aliasContents}
|
||||
${projectContents}
|
||||
${aliasContents}
|
||||
${projectContents}
|
||||
</table>
|
||||
|
||||
<h2>{$langues[$langue]['titrePage']}</h2>
|
||||
|
||||
@@ -49,7 +49,7 @@ If you want to build/test package locally:
|
||||
Use URL pattern (stable):
|
||||
For stable: http://www.dolibarr.org/files/lastbuild/package_debian-ubuntu/dolibarr_x.z.*.tar.gz
|
||||
|
||||
- For Dev, you can also add link series to GIT HEAD.
|
||||
- For Dev, you can also add link serie to GIT HEAD.
|
||||
- For stable, you can init from command line
|
||||
cd bzr/dolibarr-stable
|
||||
bzr init
|
||||
|
||||
@@ -38,7 +38,7 @@ $GITREMOTENAME="$ENV{'GITREMOTENAME'}";
|
||||
"RPM_FEDORA"=>"rpmbuild",
|
||||
"RPM_MANDRIVA"=>"rpmbuild",
|
||||
"RPM_OPENSUSE"=>"rpmbuild",
|
||||
"DEB"=>"dpkg,po2debconf", # need also debhelper
|
||||
"DEB"=>"dpkg",
|
||||
"FLATPACK"=>"flatpack",
|
||||
"EXEDOLIWAMP"=>"ISCC.exe",
|
||||
"SNAPSHOT"=>"tar"
|
||||
@@ -87,9 +87,8 @@ if (! $ENV{"DESTIBETARC"} || ! $ENV{"DESTISTABLE"})
|
||||
print "set DESTIBETARC=c:/tmp\n";
|
||||
print "set DESTISTABLE=c:/tmp\n";
|
||||
print "\n";
|
||||
print "Example in .bashrc:\n";
|
||||
print "export DESTIBETARC='/mnt/HDDATA1_LD/Mes Archives/Doli/dolibarr/lastbuild'\n";
|
||||
print "export DESTISTABLE='/mnt/HDDATA1_LD/Mes Archives/Doli/dolibarr/stable'\n";
|
||||
print "Example: DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'\n";
|
||||
print "Example: DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'\n";
|
||||
sleep 2;
|
||||
exit 1;
|
||||
}
|
||||
@@ -488,7 +487,7 @@ if ($nboftargetok) {
|
||||
print "Clean $BUILDROOT\n";
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.buildpath`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.cache`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.codeclimate.yml`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.codeclimate`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.externalToolBuilders`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.git*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.project`;
|
||||
@@ -498,11 +497,8 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.stickler.yml`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.travis.yml`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.tx`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.pre-commit-config.yaml`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.phan`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build.xml`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/phpstan.neon`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/phpstan.neon.dist`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/pom.xml`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/README-*.md`;
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@ foreach my $target (keys %CHOOSEDTARGET) {
|
||||
if ($CHOOSEDTARGET{$target} < 0) {
|
||||
print "Package $target not built (bad requirement).\n";
|
||||
} else {
|
||||
print "Package $target built successfully in $DESTI\n";
|
||||
print "Package $target built succeessfully in $DESTI\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ Prerequisites to build autoexe DoliWamp package from Linux (solution seems broke
|
||||
See file build/exe/doliwamp.iss to know the doliwamp version currently setup.
|
||||
> Add path to ISCC into PATH windows var:
|
||||
Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH
|
||||
> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommended),
|
||||
> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded),
|
||||
open file build/exe/doliwamp.iss and click on button "Compile".
|
||||
The .exe file will be build into directory build.
|
||||
|
||||
@@ -47,7 +47,7 @@ Prerequisites to build autoexe DoliWamp package from Windows:
|
||||
|
||||
This section describes steps made by Dolibarr packaging team to make a beta version of Dolibarr, step by step.
|
||||
|
||||
- Check all files are committed.
|
||||
- Check all files are commited.
|
||||
- Update version/info in ChangeLog, for this you can:
|
||||
To generate a changelog of a major new version x.y.0 (from a repo on branch develop), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
To generate a changelog of a major new version x.y.0 (from a repo on branch x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
@@ -71,7 +71,7 @@ Recopy the content of the output file into the file ChangeLog.
|
||||
|
||||
This section describes steps made by Dolibarr packaging team to make a complete release of Dolibarr, step by step.
|
||||
|
||||
- Check all files are committed.
|
||||
- Check all files are commited.
|
||||
- Update version/info in ChangeLog, for this you can:
|
||||
To generate a changelog of a major new version x.y.0 (from a repo on branch develop), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
To generate a changelog of a major new version x.y.0 (from a repo pn branch x.y), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
|
||||
@@ -54,5 +54,5 @@ OBS:QualityCategory Stable|Testing|Development|Private
|
||||
For example: https://bugzilla.novell.com/show_bug.cgi?id=848083 to be a maintener of category
|
||||
https://build.opensuse.org/project/show/Application:ERP
|
||||
- Once done, go into project, category, subproject and enter a subproject for your application.
|
||||
For example: Dolibarr
|
||||
Fo example: Dolibarr
|
||||
- Then go onto project into your home and ask a publish to the category/you project your created.
|
||||
|
||||
@@ -58,8 +58,8 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to
|
||||
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM per Windows</Char_Desc_45>
|
||||
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
|
||||
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
|
||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibarr è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
||||
</Italian>
|
||||
</Program_Descriptions>
|
||||
<Web_Info>
|
||||
|
||||
@@ -53,8 +53,8 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt
|
||||
<Char_Desc_45>Gestionale open source e gratuito</Char_Desc_45>
|
||||
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
|
||||
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
|
||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibarr è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
||||
</Italian>
|
||||
<French>
|
||||
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
|
||||
|
||||
@@ -95,8 +95,8 @@ Dolibarr intègre en effet sa propre architecture (design patterns) permettant
|
||||
<Char_Desc_45>Gestionale open source e gratuito</Char_Desc_45>
|
||||
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
|
||||
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
|
||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibarr è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
||||
</Italian>
|
||||
</Program_Descriptions>
|
||||
<Web_Info>
|
||||
|
||||
@@ -95,8 +95,8 @@ Dolibarr intègre en effet sa propre architecture (design patterns) permettant
|
||||
<Char_Desc_45>Gestionale open source e gratuito</Char_Desc_45>
|
||||
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
|
||||
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
|
||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibarr è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
||||
</Italian>
|
||||
</Program_Descriptions>
|
||||
<Web_Info>
|
||||
|
||||
@@ -88,8 +88,8 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to
|
||||
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM per Windows</Char_Desc_45>
|
||||
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
|
||||
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
|
||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibarr è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
||||
</Italian>
|
||||
</Program_Descriptions>
|
||||
<Web_Info>
|
||||
|
||||
@@ -88,8 +88,8 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to
|
||||
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM per Windows</Char_Desc_45>
|
||||
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
|
||||
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
|
||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibarr è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibarr è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
||||
</Italian>
|
||||
</Program_Descriptions>
|
||||
<Web_Info>
|
||||
|
||||
@@ -4,6 +4,6 @@ Building a Patch file
|
||||
##################################################
|
||||
|
||||
This directory contains tools to build a patch after a developer has made changes on files in its Dolibarr tree.
|
||||
The output patch file can then be submitted on Dolibarr dev mailing-list, with explanation on its goal, for inclusion in main branch.
|
||||
The output patch file can then be submited on Dolibarr dev mailing-list, with explanation on its goal, for inclusion in main branch.
|
||||
|
||||
Using this tool is now deprecated. You must use git pull requests to submit contributions.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#/bin/ksh
|
||||
#----------------------------------------------------------------------------
|
||||
# \file build/patch/buildpatch.sh
|
||||
# \brief Create patch files
|
||||
@@ -6,18 +6,16 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# This script can be used to build a patch after a developer has made
|
||||
# changes on files in its Dolibarr tree.
|
||||
# The output patch file can then be submitted on Dolibarr dev mailing-list,
|
||||
# The output patch file can then be submited on Dolibarr dev mailing-list,
|
||||
# with explanation on its goal, for inclusion in main branch.
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# shellcheck disable=2086,2291
|
||||
|
||||
echo ----- Building patch file mypatch.patch -----
|
||||
if [ -z "$1" ] || [ -z "$2" ];
|
||||
then
|
||||
echo Usage: buildpatch.sh original_dir_path modified_dir_path
|
||||
echo Example: buildpatch.sh /mydirA/dolibarrold /mydirB/dolibarrnew
|
||||
then
|
||||
echo Usage: buildpatch.sh original_dir_path modified_dir_path
|
||||
echo Example: buildpatch.sh /mydirA/dolibarrold /mydirB/dolibarrnew
|
||||
else
|
||||
echo Build patch between \"$1\" and \"$2\"
|
||||
diff -BNaur --exclude=CVS --exclude="*.patch" --exclude=".#*" --exclude="*~" --exclude="*.rej" --exclude="*.orig" --exclude="*.bak" --exclude=conf.php --exclude=documents $1 $2 > mypatch.patch
|
||||
echo Build patch between \"$1\" and \"$2\"
|
||||
diff -BNaur --exclude=CVS --exclude="*.patch" --exclude=".#*" --exclude="*~" --exclude="*.rej" --exclude="*.orig" --exclude="*.bak" --exclude=conf.php --exclude=documents $1 $2 > mypatch.patch
|
||||
fi
|
||||
|
||||
@@ -5,16 +5,12 @@ PHPStan requires PHP >= 7.1
|
||||
|
||||
Config File is: ./phpstan.neon
|
||||
|
||||
= Installation =
|
||||
|
||||
cd ./build/phpstan
|
||||
In dolibarr/build/phpstan
|
||||
mkdir phpstan
|
||||
cd phpstan
|
||||
composer require --dev phpstan/phpstan
|
||||
|
||||
|
||||
= Build report from CLI =
|
||||
|
||||
Build report from CLI:
|
||||
In dolibarr/
|
||||
mv htdocs/custom /tmp/
|
||||
php build/phpstan/phpstan/vendor/bin/phpstan -v analyze -c ./phpstan.neon -a build/phpstan/bootstrap.php --memory-limit 4G --error-format=table htdocs/commande/class
|
||||
@@ -23,4 +19,4 @@ mv /tmp/custom htdocs
|
||||
|
||||
Build HTML report from Cron:
|
||||
Example of line to add into a cron to generate a HTML report:
|
||||
0 1 5 * * cd /home/dolibarr/preview.dolibarr.org/dolibarr; chmod -R u+w /home/dolibarr/preview.dolibarr.org/dolibarr; git pull; /home/dolibarr/phpstan/vendor/bin/phpstan -v analyze --memory-limit 4G --error-format=github | awk ' BEGIN{ print "Date "strftime("%Y-%m-%d")"<br>" } { print $0"<br>" } END{ print NR } ' > /home/dolibarr/doxygen.dolibarr.org/phpstan/index.html
|
||||
0 1 5 * * cd /home/dolibarr/preview.dolibarr.org/dolibarr; chmod -R u+w /home/dolibarr/preview.dolibarr.org/dolibarr; git pull; /home/dolibarr/phpstan/vendor/bin/phpstan -v analyze -a build/phpstan/bootstrap.php --memory-limit 4G --error-format=github | awk ' BEGIN{ print "Date "strftime("%Y-%m-%d")"<br>" } { print $0"<br>" } END{ print NR } ' > /home/dolibarr/doxygen.dolibarr.org/phpstan/index.html
|
||||
|
||||
@@ -9,12 +9,8 @@
|
||||
if (!defined("NOLOGIN")) {
|
||||
define("NOLOGIN", '1');
|
||||
}
|
||||
if (!defined("NOSESSION")) {
|
||||
define("NOSESSION", '1');
|
||||
}
|
||||
if (!defined("NOHTTPSREDIRECT")) {
|
||||
define("NOHTTPSREDIRECT", '1');
|
||||
}
|
||||
|
||||
global $conf, $db, $langs, $user;
|
||||
global $conf, $langs, $user, $db;
|
||||
include_once __DIR__ . '/../../htdocs/main.inc.php';
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
// Load the main.inc.php file to have functions env defined
|
||||
if (!defined("NOLOGIN")) {
|
||||
define("NOLOGIN", '1');
|
||||
}
|
||||
if (!defined("NOSESSION")) {
|
||||
define("NOSESSION", '1');
|
||||
}
|
||||
if (!defined("NOHTTPSREDIRECT")) {
|
||||
define("NOHTTPSREDIRECT", '1');
|
||||
}
|
||||
|
||||
// Defined some constants and load Dolibarr env to reduce PHPStan bootstrap that fails to load a lot of things.
|
||||
define('DOL_DOCUMENT_ROOT', __DIR__ . '/../../htdocs');
|
||||
define('DOL_DATA_ROOT', __DIR__ . '/../../documents');
|
||||
define('DOL_URL_ROOT', '/');
|
||||
define('DOL_MAIN_URL_ROOT', '/');
|
||||
define('MAIN_DB_PREFIX', 'llx_');
|
||||
|
||||
global $conf, $db, $langs, $user;
|
||||
// include_once DOL_DOCUMENT_ROOT . '/../../htdocs/main.inc.php';
|
||||
48
build/rpm/dolibarr_fedora.spec
Normal file → Executable file
48
build/rpm/dolibarr_fedora.spec
Normal file → Executable file
@@ -1,15 +1,15 @@
|
||||
#---------------------------------------------------------
|
||||
# Spec file to build a rpm file
|
||||
#
|
||||
# This is an example to build a rpm file. You can use this
|
||||
# file to build a package for your own distributions and
|
||||
# This is an example to build a rpm file. You can use this
|
||||
# file to build a package for your own distributions and
|
||||
# edit it if you need to match your rules.
|
||||
# --------------------------------------------------------
|
||||
|
||||
Name: dolibarr
|
||||
Version: __VERSION__
|
||||
Release: __RELEASE__%{?dist}
|
||||
Summary: ERP and CRM software for small and medium companies or foundations
|
||||
Summary: ERP and CRM software for small and medium companies or foundations
|
||||
Summary(es): Software ERP y CRM para pequeñas y medianas empresas, asociaciones o autónomos
|
||||
Summary(fr): Logiciel ERP & CRM de gestion de PME/PMI, auto-entrepreneurs ou associations
|
||||
Summary(it): Programmo gestionale per piccole imprese, fondazioni e liberi professionisti
|
||||
@@ -34,24 +34,24 @@ AutoReqProv: no
|
||||
|
||||
|
||||
%description
|
||||
An easy to use CRM & ERP open source/free software package for small
|
||||
and medium companies, foundations or freelances. It includes different
|
||||
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||
An easy to use CRM & ERP open source/free software package for small
|
||||
and medium companies, foundations or freelances. It includes different
|
||||
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||
Management (CRM) but also for different other activities.
|
||||
Dolibarr was designed to provide only features you need and be easy to
|
||||
Dolibarr was designed to provide only features you need and be easy to
|
||||
use.
|
||||
|
||||
%description -l es
|
||||
Un software ERP y CRM para pequeñas y medianas empresas, asociaciones
|
||||
o autónomos. Incluye diferentes funcionalidades para la Planificación
|
||||
o autónomos. Incluye diferentes funcionalidades para la Planificación
|
||||
de Recursos Empresariales (ERP) y Gestión de la Relación con los
|
||||
Clientes (CRM) así como para para otras diferentes actividades.
|
||||
Clientes (CRM) así como para para otras diferentes actividades.
|
||||
Dolibarr ha sido diseñado para suministrarle solamente las funcionalidades
|
||||
que necesita y haciendo hincapié en su facilidad de uso.
|
||||
|
||||
|
||||
%description -l fr
|
||||
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
|
||||
artisans ou associations. Il permet de gérer vos clients, prospect,
|
||||
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
|
||||
artisans ou associations. Il permet de gérer vos clients, prospect,
|
||||
fournisseurs, devis, factures, comptes bancaires, agenda, campagnes mailings
|
||||
et bien d'autres choses dans une interface pensée pour la simplicité.
|
||||
|
||||
@@ -59,9 +59,9 @@ et bien d'autres choses dans une interface pensée pour la simplicité.
|
||||
Un programmo gestionale per piccole e medie
|
||||
imprese, fondazioni e liberi professionisti. Include varie funzionalità per
|
||||
Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori
|
||||
attività. Progettato per poter fornire solo ciò di cui hai bisogno
|
||||
attività. Progettato per poter fornire solo ciò di cui hai bisogno
|
||||
ed essere facile da usare.
|
||||
Programmo web, progettato per poter fornire solo ciò di
|
||||
Programmo web, progettato per poter fornire solo ciò di
|
||||
cui hai bisogno ed essere facile da usare.
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ cui hai bisogno ed essere facile da usare.
|
||||
%{__cp} -pr build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/build/tgz
|
||||
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/nusoap
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
|
||||
|
||||
@@ -113,8 +113,8 @@ echo "%dir %{_datadir}/%{name}/htdocs/langs" >> %{name}.lang
|
||||
for i in $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/langs/*_*
|
||||
do
|
||||
lang=$(basename $i)
|
||||
lang1=`expr substr $lang 1 2`;
|
||||
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
||||
lang1=`expr substr $lang 1 2`;
|
||||
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
||||
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
|
||||
if [ "$lang1" = "$lang2" ] ; then
|
||||
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
@@ -158,7 +158,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/accountancy
|
||||
%_datadir/dolibarr/htdocs/adherents
|
||||
%_datadir/dolibarr/htdocs/admin
|
||||
%_datadir/dolibarr/htdocs/ai
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asset
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
@@ -229,7 +228,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/user
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webhook
|
||||
%_datadir/dolibarr/htdocs/webportal
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
%_datadir/dolibarr/htdocs/website
|
||||
%_datadir/dolibarr/htdocs/workstation
|
||||
@@ -263,7 +261,7 @@ export apachegroup='apache';
|
||||
# Remove dolibarr install/upgrade lock file if it exists
|
||||
%{__rm} -f $docdir/install.lock
|
||||
|
||||
# Create empty directory for uploaded files and generated documents
|
||||
# Create empty directory for uploaded files and generated documents
|
||||
echo Create document directory $docdir
|
||||
%{__mkdir} -p $docdir
|
||||
|
||||
@@ -273,7 +271,7 @@ echo Create document directory $docdir
|
||||
# If a conf already exists and its content was already completed by installer
|
||||
export config=%{_sysconfdir}/dolibarr/conf.php
|
||||
if [ -s $config ] && grep -q "File generated by" $config
|
||||
then
|
||||
then
|
||||
# File already exist. We add params not found.
|
||||
echo Add new params to overwrite path to use shared libraries/fonts
|
||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||
@@ -323,9 +321,9 @@ echo Restart mysql server
|
||||
echo
|
||||
echo "----- Dolibarr %version-%release - (c) Dolibarr dev team -----"
|
||||
echo "Dolibarr files are now installed (into /usr/share/dolibarr)."
|
||||
echo "To finish installation and use Dolibarr, click on the menu"
|
||||
echo "To finish installation and use Dolibarr, click on the menu"
|
||||
echo "entry Dolibarr ERP-CRM or call the following page from your"
|
||||
echo "web browser:"
|
||||
echo "web browser:"
|
||||
echo "http://localhost/dolibarr/"
|
||||
echo "-------------------------------------------------------"
|
||||
echo
|
||||
@@ -341,7 +339,7 @@ then
|
||||
|
||||
# Define vars
|
||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||
|
||||
|
||||
# Remove apache link
|
||||
if [ -L $apachelink ] ;
|
||||
then
|
||||
@@ -349,7 +347,7 @@ then
|
||||
%{__rm} -f $apachelink
|
||||
status=purge
|
||||
fi
|
||||
|
||||
|
||||
# Restart web servers if required
|
||||
if [ "x$status" = "xpurge" ] ;
|
||||
then
|
||||
|
||||
54
build/rpm/dolibarr_generic.spec
Normal file → Executable file
54
build/rpm/dolibarr_generic.spec
Normal file → Executable file
@@ -1,8 +1,8 @@
|
||||
#---------------------------------------------------------
|
||||
# Spec file to build a rpm file
|
||||
#
|
||||
# This is an example to build a rpm file. You can use this
|
||||
# file to build a package for your own distributions and
|
||||
# This is an example to build a rpm file. You can use this
|
||||
# file to build a package for your own distributions and
|
||||
# edit it if you need to match your rules.
|
||||
# --------------------------------------------------------
|
||||
|
||||
@@ -13,7 +13,7 @@ Release: __RELEASE__%{?dist}
|
||||
%else
|
||||
Release: __RELEASE__
|
||||
%endif
|
||||
Summary: ERP and CRM software for small and medium companies or foundations
|
||||
Summary: ERP and CRM software for small and medium companies or foundations
|
||||
Summary(es): Software ERP y CRM para pequeñas y medianas empresas, asociaciones o autónomos
|
||||
Summary(fr): Logiciel ERP & CRM de gestion de PME/PMI, auto-entrepreneurs ou associations
|
||||
Summary(it): Programmo gestionale per piccole imprese, fondazioni e liberi professionisti
|
||||
@@ -52,20 +52,20 @@ BuildRequires: desktop-file-utils
|
||||
%else
|
||||
%if 0%{?mdkversion}
|
||||
Group: Applications/Productivity
|
||||
Requires: apache-base, apache-mod_php, php-cgi, php-cli, php-bz2, php-gd, php-ldap, php-imap, php-mysqli, php-openssl, fonts-ttf-dejavu
|
||||
Requires: mysql, mysql-client
|
||||
Requires: apache-base, apache-mod_php, php-cgi, php-cli, php-bz2, php-gd, php-ldap, php-imap, php-mysqli, php-openssl, fonts-ttf-dejavu
|
||||
Requires: mysql, mysql-client
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
# Voir http://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros
|
||||
Group: Productivity/Office/Management
|
||||
Requires: apache2, apache2-mod_php, php >= 5.3.0, php-gd, php-ldap, php-imap, php-mysql, php-openssl, dejavu
|
||||
Requires: mysql-community-server, mysql-community-server-client
|
||||
Requires: mysql-community-server, mysql-community-server-client
|
||||
BuildRequires: update-desktop-files fdupes
|
||||
%else
|
||||
Group: Applications/Productivity
|
||||
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mbstring, php-xml
|
||||
Requires: mysql-server, mysql
|
||||
Requires: php-mysqli >= 4.1.0
|
||||
Requires: mysql-server, mysql
|
||||
Requires: php-mysqli >= 4.1.0
|
||||
%endif
|
||||
%endif
|
||||
|
||||
@@ -76,24 +76,24 @@ AutoReqProv: no
|
||||
|
||||
|
||||
%description
|
||||
An easy to use CRM & ERP open source/free software package for small
|
||||
and medium companies, foundations or freelances. It includes different
|
||||
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||
An easy to use CRM & ERP open source/free software package for small
|
||||
and medium companies, foundations or freelances. It includes different
|
||||
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||
Management (CRM) but also for different other activities.
|
||||
Dolibarr was designed to provide only features you need and be easy to
|
||||
Dolibarr was designed to provide only features you need and be easy to
|
||||
use.
|
||||
|
||||
%description -l es
|
||||
Un software ERP y CRM para pequeñas y medianas empresas, asociaciones
|
||||
o autónomos. Incluye diferentes funcionalidades para la Planificación
|
||||
o autónomos. Incluye diferentes funcionalidades para la Planificación
|
||||
de Recursos Empresariales (ERP) y Gestión de la Relación con los
|
||||
Clientes (CRM) así como para para otras diferentes actividades.
|
||||
Clientes (CRM) así como para para otras diferentes actividades.
|
||||
Dolibarr ha sido diseñado para suministrarle solamente las funcionalidades
|
||||
que necesita y haciendo hincapié en su facilidad de uso.
|
||||
|
||||
%description -l fr
|
||||
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
|
||||
artisans ou associations. Il permet de gérer vos clients, prospect,
|
||||
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
|
||||
artisans ou associations. Il permet de gérer vos clients, prospect,
|
||||
fournisseurs, devis, factures, comptes bancaires, agenda, campagnes mailings
|
||||
et bien d'autres choses dans une interface pensée pour la simplicité.
|
||||
|
||||
@@ -101,9 +101,9 @@ et bien d'autres choses dans une interface pensée pour la simplicité.
|
||||
Un programmo gestionale per piccole e medie
|
||||
imprese, fondazioni e liberi professionisti. Include varie funzionalità per
|
||||
Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori
|
||||
attività. Progettato per poter fornire solo ciò di cui hai bisogno
|
||||
attività. Progettato per poter fornire solo ciò di cui hai bisogno
|
||||
ed essere facile da usare.
|
||||
Programmo web, progettato per poter fornire solo ciò di
|
||||
Programmo web, progettato per poter fornire solo ciò di
|
||||
cui hai bisogno ed essere facile da usare.
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ cui hai bisogno ed essere facile da usare.
|
||||
%{__cp} -pr build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/build/tgz
|
||||
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
|
||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/nusoap
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
|
||||
@@ -187,8 +187,8 @@ echo "%dir %{_datadir}/%{name}/htdocs/langs" >> %{name}.lang
|
||||
for i in $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/langs/*_*
|
||||
do
|
||||
lang=$(basename $i)
|
||||
lang1=`expr substr $lang 1 2`;
|
||||
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
||||
lang1=`expr substr $lang 1 2`;
|
||||
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
||||
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
|
||||
if [ "$lang1" = "$lang2" ] ; then
|
||||
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
@@ -239,7 +239,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/accountancy
|
||||
%_datadir/dolibarr/htdocs/adherents
|
||||
%_datadir/dolibarr/htdocs/admin
|
||||
%_datadir/dolibarr/htdocs/ai
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asset
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
@@ -310,7 +309,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/user
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webhook
|
||||
%_datadir/dolibarr/htdocs/webportal
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
%_datadir/dolibarr/htdocs/website
|
||||
%_datadir/dolibarr/htdocs/workstation
|
||||
@@ -395,7 +393,7 @@ echo OS detected: $os
|
||||
# Remove dolibarr install/upgrade lock file if it exists
|
||||
%{__rm} -f $docdir/install.lock
|
||||
|
||||
# Create empty directory for uploaded files and generated documents
|
||||
# Create empty directory for uploaded files and generated documents
|
||||
echo Create document directory $docdir
|
||||
%{__mkdir} -p $docdir
|
||||
|
||||
@@ -526,9 +524,9 @@ fi
|
||||
echo
|
||||
echo "----- Dolibarr %version-%release - (c) Dolibarr dev team -----"
|
||||
echo "Dolibarr files are now installed (into /usr/share/dolibarr)."
|
||||
echo "To finish installation and use Dolibarr, click on the menu"
|
||||
echo "To finish installation and use Dolibarr, click on the menu"
|
||||
echo "entry Dolibarr ERP-CRM or call the following page from your"
|
||||
echo "web browser:"
|
||||
echo "web browser:"
|
||||
echo "http://localhost/dolibarr/"
|
||||
echo "-------------------------------------------------------"
|
||||
echo
|
||||
@@ -569,7 +567,7 @@ then
|
||||
fi
|
||||
%endif
|
||||
%endif
|
||||
|
||||
|
||||
# Remove apache link
|
||||
if [ -L $apachelink ] ;
|
||||
then
|
||||
@@ -577,7 +575,7 @@ then
|
||||
%{__rm} -f $apachelink
|
||||
status=purge
|
||||
fi
|
||||
|
||||
|
||||
# Restart web servers if required
|
||||
if [ "x$status" = "xpurge" ] ;
|
||||
then
|
||||
|
||||
52
build/rpm/dolibarr_mandriva.spec
Normal file → Executable file
52
build/rpm/dolibarr_mandriva.spec
Normal file → Executable file
@@ -1,15 +1,15 @@
|
||||
#---------------------------------------------------------
|
||||
# Spec file to build a rpm file
|
||||
#
|
||||
# This is an example to build a rpm file. You can use this
|
||||
# file to build a package for your own distributions and
|
||||
# This is an example to build a rpm file. You can use this
|
||||
# file to build a package for your own distributions and
|
||||
# edit it if you need to match your rules.
|
||||
# --------------------------------------------------------
|
||||
|
||||
Name: dolibarr
|
||||
Version: __VERSION__
|
||||
Release: __RELEASE__
|
||||
Summary: ERP and CRM software for small and medium companies or foundations
|
||||
Summary: ERP and CRM software for small and medium companies or foundations
|
||||
Summary(es): Software ERP y CRM para pequeñas y medianas empresas, asociaciones o autónomos
|
||||
Summary(fr): Logiciel ERP & CRM de gestion de PME/PMI, auto-entrepreneurs ou associations
|
||||
Summary(it): Programmo gestionale per piccole imprese, fondazioni e liberi professionisti
|
||||
@@ -25,32 +25,32 @@ BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
Group: Applications/Productivity
|
||||
Requires: apache-base, apache-mod_php, php-cgi, php-cli, php-bz2, php-gd, php-ldap, php-imap, php-mysqli, php-openssl, fonts-ttf-dejavu
|
||||
Requires: mysql, mysql-client
|
||||
Requires: apache-base, apache-mod_php, php-cgi, php-cli, php-bz2, php-gd, php-ldap, php-imap, php-mysqli, php-openssl, fonts-ttf-dejavu
|
||||
Requires: mysql, mysql-client
|
||||
|
||||
# Set yes to build test package, no for release (this disable need of /usr/bin/php not found by OpenSuse)
|
||||
AutoReqProv: no
|
||||
|
||||
|
||||
%description
|
||||
An easy to use CRM & ERP open source/free software package for small
|
||||
and medium companies, foundations or freelances. It includes different
|
||||
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||
An easy to use CRM & ERP open source/free software package for small
|
||||
and medium companies, foundations or freelances. It includes different
|
||||
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||
Management (CRM) but also for different other activities.
|
||||
Dolibarr was designed to provide only features you need and be easy to
|
||||
Dolibarr was designed to provide only features you need and be easy to
|
||||
use.
|
||||
|
||||
%description -l es
|
||||
Un software ERP y CRM para pequeñas y medianas empresas, asociaciones
|
||||
o autónomos. Incluye diferentes funcionalidades para la Planificación
|
||||
o autónomos. Incluye diferentes funcionalidades para la Planificación
|
||||
de Recursos Empresariales (ERP) y Gestión de la Relación con los
|
||||
Clientes (CRM) así como para para otras diferentes actividades.
|
||||
Clientes (CRM) así como para para otras diferentes actividades.
|
||||
Dolibarr ha sido diseñado para suministrarle solamente las funcionalidades
|
||||
que necesita y haciendo hincapié en su facilidad de uso.
|
||||
|
||||
|
||||
%description -l fr
|
||||
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
|
||||
artisans ou associations. Il permet de gérer vos clients, prospect,
|
||||
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
|
||||
artisans ou associations. Il permet de gérer vos clients, prospect,
|
||||
fournisseurs, devis, factures, comptes bancaires, agenda, campagnes mailings
|
||||
et bien d'autres choses dans une interface pensée pour la simplicité.
|
||||
|
||||
@@ -58,9 +58,9 @@ et bien d'autres choses dans une interface pensée pour la simplicité.
|
||||
Un programmo gestionale per piccole e medie
|
||||
imprese, fondazioni e liberi professionisti. Include varie funzionalità per
|
||||
Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori
|
||||
attività. Progettato per poter fornire solo ciò di cui hai bisogno
|
||||
attività. Progettato per poter fornire solo ciò di cui hai bisogno
|
||||
ed essere facile da usare.
|
||||
Programmo web, progettato per poter fornire solo ciò di
|
||||
Programmo web, progettato per poter fornire solo ciò di
|
||||
cui hai bisogno ed essere facile da usare.
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ cui hai bisogno ed essere facile da usare.
|
||||
%{__cp} -pr build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/build/tgz
|
||||
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
|
||||
|
||||
# Lang
|
||||
@@ -111,8 +111,8 @@ echo "%dir %{_datadir}/%{name}/htdocs/langs" >> %{name}.lang
|
||||
for i in $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/langs/*_*
|
||||
do
|
||||
lang=$(basename $i)
|
||||
lang1=`expr substr $lang 1 2`;
|
||||
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
||||
lang1=`expr substr $lang 1 2`;
|
||||
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
||||
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
|
||||
if [ "$lang1" = "$lang2" ] ; then
|
||||
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
@@ -156,7 +156,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/accountancy
|
||||
%_datadir/dolibarr/htdocs/adherents
|
||||
%_datadir/dolibarr/htdocs/admin
|
||||
%_datadir/dolibarr/htdocs/ai
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asset
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
@@ -227,7 +226,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/user
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webhook
|
||||
%_datadir/dolibarr/htdocs/webportal
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
%_datadir/dolibarr/htdocs/website
|
||||
%_datadir/dolibarr/htdocs/workstation
|
||||
@@ -261,7 +259,7 @@ export apachegroup='apache';
|
||||
# Remove dolibarr install/upgrade lock file if it exists
|
||||
%{__rm} -f $docdir/install.lock
|
||||
|
||||
# Create empty directory for uploaded files and generated documents
|
||||
# Create empty directory for uploaded files and generated documents
|
||||
echo Create document directory $docdir
|
||||
%{__mkdir} -p $docdir
|
||||
|
||||
@@ -271,7 +269,7 @@ echo Create document directory $docdir
|
||||
# If a conf already exists and its content was already completed by installer
|
||||
export config=%{_sysconfdir}/dolibarr/conf.php
|
||||
if [ -s $config ] && grep -q "File generated by" $config
|
||||
then
|
||||
then
|
||||
# File already exist. We add params not found.
|
||||
echo Add new params to overwrite path to use shared libraries/fonts
|
||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||
@@ -323,9 +321,9 @@ fi
|
||||
echo
|
||||
echo "----- Dolibarr %version-%release - (c) Dolibarr dev team -----"
|
||||
echo "Dolibarr files are now installed (into /usr/share/dolibarr)."
|
||||
echo "To finish installation and use Dolibarr, click on the menu"
|
||||
echo "To finish installation and use Dolibarr, click on the menu"
|
||||
echo "entry Dolibarr ERP-CRM or call the following page from your"
|
||||
echo "web browser:"
|
||||
echo "web browser:"
|
||||
echo "http://localhost/dolibarr/"
|
||||
echo "-------------------------------------------------------"
|
||||
echo
|
||||
@@ -341,7 +339,7 @@ then
|
||||
|
||||
# Define vars
|
||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||
|
||||
|
||||
# Remove apache link
|
||||
if [ -L $apachelink ] ;
|
||||
then
|
||||
@@ -349,7 +347,7 @@ then
|
||||
%{__rm} -f $apachelink
|
||||
status=purge
|
||||
fi
|
||||
|
||||
|
||||
# Restart web servers if required
|
||||
if [ "x$status" = "xpurge" ] ;
|
||||
then
|
||||
|
||||
54
build/rpm/dolibarr_opensuse.spec
Normal file → Executable file
54
build/rpm/dolibarr_opensuse.spec
Normal file → Executable file
@@ -1,15 +1,15 @@
|
||||
#---------------------------------------------------------
|
||||
# Spec file to build a rpm file
|
||||
#
|
||||
# This is an example to build a rpm file. You can use this
|
||||
# file to build a package for your own distributions and
|
||||
# This is an example to build a rpm file. You can use this
|
||||
# file to build a package for your own distributions and
|
||||
# edit it if you need to match your rules.
|
||||
# --------------------------------------------------------
|
||||
|
||||
Name: dolibarr
|
||||
Version: __VERSION__
|
||||
Release: __RELEASE__
|
||||
Summary: ERP and CRM software for small and medium companies or foundations
|
||||
Summary: ERP and CRM software for small and medium companies or foundations
|
||||
Summary(es): Software ERP y CRM para pequeñas y medianas empresas, asociaciones o autónomos
|
||||
Summary(fr): Logiciel ERP & CRM de gestion de PME/PMI, auto-entrepreneurs ou associations
|
||||
Summary(it): Programmo gestionale per piccole imprese, fondazioni e liberi professionisti
|
||||
@@ -26,7 +26,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
Group: Productivity/Office/Management
|
||||
Requires: apache2, apache2-mod_php, php >= 5.3.0, php-gd, php-ldap, php-imap, php-mysql, php-openssl, dejavu
|
||||
Requires: mysql-community-server, mysql-community-server-client
|
||||
Requires: mysql-community-server, mysql-community-server-client
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: update-desktop-files fdupes
|
||||
%endif
|
||||
@@ -36,24 +36,24 @@ AutoReqProv: no
|
||||
|
||||
|
||||
%description
|
||||
An easy to use CRM & ERP open source/free software package for small
|
||||
and medium companies, foundations or freelances. It includes different
|
||||
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||
An easy to use CRM & ERP open source/free software package for small
|
||||
and medium companies, foundations or freelances. It includes different
|
||||
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||
Management (CRM) but also for different other activities.
|
||||
Dolibarr was designed to provide only features you need and be easy to
|
||||
Dolibarr was designed to provide only features you need and be easy to
|
||||
use.
|
||||
|
||||
%description -l es
|
||||
Un software ERP y CRM para pequeñas y medianas empresas, asociaciones
|
||||
o autónomos. Incluye diferentes funcionalidades para la Planificación
|
||||
o autónomos. Incluye diferentes funcionalidades para la Planificación
|
||||
de Recursos Empresariales (ERP) y Gestión de la Relación con los
|
||||
Clientes (CRM) así como para para otras diferentes actividades.
|
||||
Clientes (CRM) así como para para otras diferentes actividades.
|
||||
Dolibarr ha sido diseñado para suministrarle solamente las funcionalidades
|
||||
que necesita y haciendo hincapié en su facilidad de uso.
|
||||
|
||||
|
||||
%description -l fr
|
||||
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
|
||||
artisans ou associations. Il permet de gérer vos clients, prospect,
|
||||
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
|
||||
artisans ou associations. Il permet de gérer vos clients, prospect,
|
||||
fournisseurs, devis, factures, comptes bancaires, agenda, campagnes mailings
|
||||
et bien d'autres choses dans une interface pensée pour la simplicité.
|
||||
|
||||
@@ -61,9 +61,9 @@ et bien d'autres choses dans une interface pensée pour la simplicité.
|
||||
Un programmo gestionale per piccole e medie
|
||||
imprese, fondazioni e liberi professionisti. Include varie funzionalità per
|
||||
Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori
|
||||
attività. Progettato per poter fornire solo ciò di cui hai bisogno
|
||||
attività. Progettato per poter fornire solo ciò di cui hai bisogno
|
||||
ed essere facile da usare.
|
||||
Programmo web, progettato per poter fornire solo ciò di
|
||||
Programmo web, progettato per poter fornire solo ciò di
|
||||
cui hai bisogno ed essere facile da usare.
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ cui hai bisogno ed essere facile da usare.
|
||||
%{__cp} -pr build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/build/tgz
|
||||
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
|
||||
|
||||
# Lang
|
||||
@@ -111,8 +111,8 @@ echo "%dir %{_datadir}/%{name}/htdocs/langs" >> %{name}.lang
|
||||
for i in $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/langs/*_*
|
||||
do
|
||||
lang=$(basename $i)
|
||||
lang1=`expr substr $lang 1 2`;
|
||||
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
||||
lang1=`expr substr $lang 1 2`;
|
||||
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
||||
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
|
||||
if [ "$lang1" = "$lang2" ] ; then
|
||||
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
@@ -166,7 +166,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/accountancy
|
||||
%_datadir/dolibarr/htdocs/adherents
|
||||
%_datadir/dolibarr/htdocs/admin
|
||||
%_datadir/dolibarr/htdocs/ai
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asset
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
@@ -237,7 +236,6 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/user
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webhook
|
||||
%_datadir/dolibarr/htdocs/webportal
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
%_datadir/dolibarr/htdocs/website
|
||||
%_datadir/dolibarr/htdocs/workstation
|
||||
@@ -271,7 +269,7 @@ export apachegroup='www';
|
||||
# Remove dolibarr install/upgrade lock file if it exists
|
||||
%{__rm} -f $docdir/install.lock
|
||||
|
||||
# Create empty directory for uploaded files and generated documents
|
||||
# Create empty directory for uploaded files and generated documents
|
||||
echo Create document directory $docdir
|
||||
%{__mkdir} -p $docdir
|
||||
|
||||
@@ -281,7 +279,7 @@ echo Create document directory $docdir
|
||||
# If a conf already exists and its content was already completed by installer
|
||||
export config=%{_sysconfdir}/dolibarr/conf.php
|
||||
if [ -s $config ] && grep -q "File generated by" $config
|
||||
then
|
||||
then
|
||||
# File already exist. We add params not found.
|
||||
echo Add new params to overwrite path to use shared libraries/fonts
|
||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||
@@ -293,7 +291,7 @@ then
|
||||
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||
fi
|
||||
|
||||
# Create a config link dolibarr.conf
|
||||
@@ -333,9 +331,9 @@ fi
|
||||
echo
|
||||
echo "----- Dolibarr %version-%release - (c) Dolibarr dev team -----"
|
||||
echo "Dolibarr files are now installed (into /usr/share/dolibarr)."
|
||||
echo "To finish installation and use Dolibarr, click on the menu"
|
||||
echo "To finish installation and use Dolibarr, click on the menu"
|
||||
echo "entry Dolibarr ERP-CRM or call the following page from your"
|
||||
echo "web browser:"
|
||||
echo "web browser:"
|
||||
echo "http://localhost/dolibarr/"
|
||||
echo "-------------------------------------------------------"
|
||||
echo
|
||||
@@ -348,10 +346,10 @@ if [ "x$1" = "x0" ] ;
|
||||
then
|
||||
# Remove
|
||||
echo "Removed package"
|
||||
|
||||
|
||||
# Define vars
|
||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||
|
||||
|
||||
# Remove apache link
|
||||
if [ -L $apachelink ] ;
|
||||
then
|
||||
@@ -359,7 +357,7 @@ then
|
||||
%{__rm} -f $apachelink
|
||||
status=purge
|
||||
fi
|
||||
|
||||
|
||||
# Restart web servers if required
|
||||
if [ "x$status" = "xpurge" ] ;
|
||||
then
|
||||
|
||||
@@ -33,9 +33,16 @@
|
||||
"tecnickcom/tcpdf" : "6.3.2",
|
||||
"nnnick/chartjs" : "^3.7.1",
|
||||
"stripe/stripe-php" : "10.7.0",
|
||||
"maximebf/debugbar" : "1.18.2"
|
||||
"maximebf/debugbar" : "1.18.2",
|
||||
"symfony/var-dumper" : ">=3.2"
|
||||
},
|
||||
"require-dev" : {
|
||||
"php-parallel-lint/php-parallel-lint" : "^0",
|
||||
"php-parallel-lint/php-console-highlighter" : "^0",
|
||||
"phpunit/phpunit" : "^4",
|
||||
"squizlabs/php_codesniffer" : "^2",
|
||||
"phpunit/phpunit-selenium" : "^2",
|
||||
"rector/rector" : "^0.16.0"
|
||||
},
|
||||
"suggest" : {
|
||||
"ext-mysqlnd" : "To use with MySQL or MariaDB",
|
||||
@@ -43,7 +50,7 @@
|
||||
"ext-pgsql" : "To use with PostgreSQL",
|
||||
"ext-gd" : "Image manipulation (Required but maybe built-in PHP)",
|
||||
"ext-imagick" : "Generation of thumbs from PDF",
|
||||
"ext-intl" : "Intl",
|
||||
"ext-mcrypt" : "(Required but maybe built-in PHP)",
|
||||
"ext-openssl" : "Secure connections (Emails, SOAP\u2026)",
|
||||
"ext-mbstring" : "Handle non UTF-8 characters",
|
||||
"ext-soap" : "Native SOAP",
|
||||
|
||||
@@ -3,24 +3,14 @@ This file describes changes made on external libraries after being included
|
||||
in Dolibarr root.
|
||||
|
||||
|
||||
|
||||
ALL:
|
||||
----
|
||||
Check "@CHANGE"
|
||||
|
||||
|
||||
|
||||
PCLZIP
|
||||
------
|
||||
Replace
|
||||
touch($p_entry['filename'], $p_entry['mtime']);
|
||||
With
|
||||
@touch($p_entry['filename'], $p_entry['mtime']);
|
||||
|
||||
|
||||
|
||||
PHP PrestaShopWebservice:
|
||||
-------------------------
|
||||
PrestaShopWebservice:
|
||||
---------------------
|
||||
Replace
|
||||
$params = array('filter', 'display', 'sort', 'limit', 'id_shop', 'id_group_shop');
|
||||
With
|
||||
@@ -28,21 +18,8 @@ With
|
||||
|
||||
|
||||
|
||||
PHP PHPIMAP:
|
||||
------------
|
||||
* In htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php
|
||||
|
||||
Replace:
|
||||
self::setLastErrors(parent::getLastErrors());
|
||||
with:
|
||||
if (parent::getLastErrors()) {
|
||||
self::setLastErrors(parent::getLastErrors());
|
||||
}
|
||||
|
||||
|
||||
|
||||
PHP CKEDITOR:
|
||||
-------------
|
||||
CKEDITOR (4.22.1):
|
||||
-----------------
|
||||
* In ckeditor/ckeditor/contents.css
|
||||
Replace:
|
||||
body { ... margin: 20px;
|
||||
@@ -56,18 +33,16 @@ With
|
||||
d&&d.items&&
|
||||
|
||||
|
||||
|
||||
PHP ESCPOS:
|
||||
-----------
|
||||
ESCPOS:
|
||||
-------
|
||||
Replace
|
||||
private $connector;
|
||||
With
|
||||
protected $connector;
|
||||
|
||||
|
||||
|
||||
PHP SABRE:
|
||||
----------
|
||||
SABRE:
|
||||
------
|
||||
rm -fr ./htdocs/includes/sabre/sabre/bin;
|
||||
rm -fr ./htdocs/includes/sabre/sabre/*/bin;
|
||||
rm -fr ./htdocs/includes/sabre/sabre/*/*/bin;
|
||||
@@ -75,9 +50,8 @@ rm -fr ./htdocs/includes/sabre/sabre/*/*/*/bin;
|
||||
rm -fr ./htdocs/includes/sabre/sabre/*/*/*/*/bin;
|
||||
|
||||
|
||||
|
||||
PHP NUSOAP:
|
||||
-----------
|
||||
NUSOAP:
|
||||
-------
|
||||
* Line 1257 of file nusoap.php. Add:
|
||||
|
||||
libxml_disable_entity_loader(true); // Avoid load of external entities (security problem). Required only for libxml < 2.
|
||||
@@ -97,8 +71,8 @@ PHP NUSOAP:
|
||||
|
||||
|
||||
|
||||
PHP TCPDF:
|
||||
----------
|
||||
TCPDF:
|
||||
------
|
||||
* Modify in tcpdf.php: make TCPDF::_out public.
|
||||
(htdocs/core/lib/pdf.lib.php uses it as a public method)
|
||||
|
||||
@@ -216,14 +190,14 @@ into
|
||||
|
||||
* Removed useless directories ("examples", "tools")
|
||||
|
||||
* Optionally, removed all fonts except
|
||||
dejavusans* (used by greek, arab, person, romanian, turkish),
|
||||
* Optionnaly, removed all fonts except
|
||||
dejavusans* (used by greek, arab, persan, romanian, turkish),
|
||||
freemono* (russian),
|
||||
cid*+msungstdlight+stsongstdlight+uni2cid* (chinese),
|
||||
helvetica* (all other languages),
|
||||
zapfdingbats.php (for special chars like form checkboxes)
|
||||
|
||||
* Optionally, made freemono the default monotype font if we removed courier
|
||||
* Optionnaly, made freemono the default monotype font if we removed courier
|
||||
In htdocs/includes/tecnickcom/tcpdf/tcpdf.php
|
||||
- protected $default_monospaced_font = 'courier';
|
||||
+ protected $default_monospaced_font = 'freemono';
|
||||
@@ -260,9 +234,8 @@ In htdocs/includes/tecnickcom/tcpdf/tcpdf.php
|
||||
}
|
||||
|
||||
|
||||
|
||||
PHP TCPDI:
|
||||
----------
|
||||
TCPDI:
|
||||
------
|
||||
Add file fpdf_tpl.php 1.2
|
||||
|
||||
Add file tcpdi.php
|
||||
@@ -290,14 +263,43 @@ with
|
||||
|
||||
|
||||
|
||||
PHP JQUERYFILETREE:
|
||||
-------------------
|
||||
JSGANTT:
|
||||
--------
|
||||
* Replace in function JSGantt.taskLink
|
||||
var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
|
||||
with
|
||||
// LDR To open in same window
|
||||
//var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
|
||||
window.location.href=pRef
|
||||
|
||||
* Replace
|
||||
vTmpDiv=this.newNode(vTmpCell, 'div', null, null, vTaskList[i].getResource());
|
||||
with
|
||||
var vTmpNode=this.newNode(vTmpCell, 'div', null, '');
|
||||
vTmpNode=this.newNode(vTmpNode, 'a', null, '', vLangs[vLang]['moreinfo']);
|
||||
vTmpNode.setAttribute('href',vTaskList[i].getLink());
|
||||
|
||||
* Replace '% Comp.' to have a smaller text column header
|
||||
'comp':'% Comp.'
|
||||
with
|
||||
'comp':'%'
|
||||
|
||||
|
||||
|
||||
JCROP:
|
||||
------
|
||||
* Remove analytics tag into file index.html
|
||||
|
||||
|
||||
|
||||
JQUERYFILETREE:
|
||||
---------------
|
||||
* Remove directory htdocs/includes/jquery/plugins/jqueryFileTree/connectors
|
||||
|
||||
|
||||
|
||||
PHP RESTLER:
|
||||
------------
|
||||
RESTLER:
|
||||
--------
|
||||
|
||||
* Add line into Util.php to complete function
|
||||
|
||||
@@ -362,8 +364,8 @@ Change content of file htdocs/includes/restler/framework/Luracast/Restler/explor
|
||||
|
||||
|
||||
|
||||
PHP PARSEDOWN
|
||||
-------------
|
||||
PARSEDOWN
|
||||
---------
|
||||
|
||||
* Add support of css by adding in Parsedown.php:
|
||||
|
||||
@@ -395,8 +397,8 @@ PHP PARSEDOWN
|
||||
|
||||
|
||||
|
||||
PHP OAUTH
|
||||
---------
|
||||
OAUTH
|
||||
-----
|
||||
Add into Class Google of file OAuth2/Service/Google:
|
||||
|
||||
// LDR CHANGE Add approval_prompt to force the prompt if value is set to 'force' so it force return of a "refresh token" in addition to "standard token"
|
||||
@@ -412,23 +414,7 @@ Add into Class Google of file OAuth2/Service/Google:
|
||||
|
||||
|
||||
|
||||
JS JSGANTT:
|
||||
-----------
|
||||
* Replace in function JSGantt.taskLink
|
||||
window.open(pRef, 'newwin', 'height=' + vHeight + ',width=' + vWidth);
|
||||
with
|
||||
// @CHANGE DOLI To open in same window
|
||||
//var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
|
||||
window.location.href=pRef
|
||||
|
||||
* Replace '% Comp.' to have a smaller text column header
|
||||
'comp': '%...'
|
||||
with
|
||||
'comp': '%'
|
||||
|
||||
|
||||
|
||||
JS JEDITABLE
|
||||
JEDITABLE.JS
|
||||
------------
|
||||
|
||||
* <button type="submit" /> => <button class="button" type="submit" />
|
||||
@@ -436,17 +422,11 @@ JS JEDITABLE
|
||||
|
||||
|
||||
|
||||
JS SELECT2
|
||||
----------
|
||||
SELECT2
|
||||
-------
|
||||
|
||||
Edit CSS to restore line removed between 4.0.5 and 4.0.6. It generates this bug: https://github.com/select2/select2/issues/5832
|
||||
|
||||
.select2-hidden-accessible {
|
||||
margin: -10000px !important; /* line to restore */
|
||||
}
|
||||
|
||||
|
||||
|
||||
JS JCROP:
|
||||
----------
|
||||
* Remove analytics tag into file index.html
|
||||
|
||||
@@ -43,8 +43,6 @@ $error = 0;
|
||||
require_once $path."../../../htdocs/master.inc.php";
|
||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||
|
||||
global $db, $conf, $langs;
|
||||
|
||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||
$langs->load("main"); // To load language file for default language
|
||||
@set_time_limit(0);
|
||||
@@ -52,7 +50,7 @@ $langs->load("main"); // To load language file for default language
|
||||
// Load user and its permissions
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
dol_print_error(null, $user->error);
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
||||
@@ -50,7 +50,7 @@ $langs->load("main"); // To load language file for default language
|
||||
// Load user and its permissions
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
dol_print_error(null, $user->error);
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
||||
@@ -50,7 +50,7 @@ $langs->load("main"); // To load language file for default language
|
||||
// Load user and its permissions
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
dol_print_error(null, $user->error);
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
||||
@@ -50,7 +50,7 @@ $langs->load("main"); // To load language file for default language
|
||||
// Load user and its permissions
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
dol_print_error(null, $user->error);
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
||||
@@ -50,7 +50,7 @@ $langs->load("main"); // To load language file for default language
|
||||
// Load user and its permissions
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
dol_print_error(null, $user->error);
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Example for recurring event, 1 week, no end, exported by Google
|
||||
Example fo recurring event, 1 week, no end, exported by Google
|
||||
|
||||
# The recurring event were recorded every monday the 20150518. This is the Recurrence-id, but then
|
||||
# first occurrence was moved on tuesday. So this record were added.
|
||||
@@ -38,7 +38,7 @@ END:VEVENT
|
||||
|
||||
|
||||
|
||||
Example for recurring event, every 2 month, no end, exported by Google
|
||||
Example fo recurring event, every 2 month, no end, exported by Google
|
||||
|
||||
BEGIN:VEVENT
|
||||
DTSTART;TZID=Europe/Paris:20150519T080000
|
||||
|
||||
@@ -10,8 +10,7 @@ To: customer@customercompany.fr
|
||||
Subject: [MyBigCompany - Ticket #TS2008-0040] Nouveau message
|
||||
Date: Thu, 20 Aug 2020 18:31:37 +0200
|
||||
Message-ID: <1597941097.SMTPs-dolibarr-tic58@83b5bc91f83a56e458db71e0adac2b62>
|
||||
References: <CALeEO_kij-ogXKzrjV_pTgqVbUB9j=287VkX34iVSWgDHFA8eg@mail.gmail.com>
|
||||
In-Reply-To: <CALeEO_kij-ogXKzrjV_pTgqVbUB9j=287VkX34iVSWgDHFA8eg@mail.gmail.com>
|
||||
References: <1597941097.SMTPs-dolibarr-tic58@83b5bc91f83a56e458db71e0adac2b62>
|
||||
X-Dolibarr-TRACKID: tic58@83b5bc91f83a56e458db71e0adac2b62
|
||||
X-RemoteAddr: 127.0.0.1
|
||||
X-Mailer: Dolibarr version 13.0.0-alpha (using SMTPs Mailer)
|
||||
@@ -26,17 +25,17 @@ Content-Type: multipart/alternative; boundary="mul_872cdd6a64216735955664484832b
|
||||
--mul_872cdd6a64216735955664484832b075
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
|
||||
Bonjour
|
||||
|
||||
Bonjour
|
||||
|
||||
|
||||
Une nouvelle réponse a été ajoutée à un ticket que vous suivez. Voici
|
||||
le message :PredefinedMailContentTicket_send
|
||||
|
||||
|
||||
le message :PredefinedMailContentTicket_send
|
||||
|
||||
|
||||
Vous pouvez voir la progression du ticket en cliquant sur le lien
|
||||
ci-dessus. : fr5uw2yospypn2rz
|
||||
Cordialement,
|
||||
|
||||
ci-dessus. : fr5uw2yospypn2rz
|
||||
Cordialement,
|
||||
|
||||
--
|
||||
--mul_872cdd6a64216735955664484832b075
|
||||
Content-Type: text/html; charset=UTF-8
|
||||
@@ -131,4 +131,4 @@ tter.com/eldy10</a></div></div>
|
||||
ps://www.twitter.com/eldy10" target=3D"_blank">https://www.twitter.com/eldy=
|
||||
10</a></div>
|
||||
|
||||
--000000000000cd54be05ad51fe67--
|
||||
--000000000000cd54be05ad51fe67--
|
||||
@@ -2,6 +2,6 @@ README
|
||||
------
|
||||
|
||||
Scripts in this directory can be used to load massive data or purge data of a database instance.
|
||||
WARNING: Some of these scripts may permanently delete data.
|
||||
WARNING: Some of this script may delete definitely data.
|
||||
|
||||
To initialize data for a demo, use the tools in dev/initdemo instead.
|
||||
To init data for a demo, use instead the tool into dev/initdemo
|
||||
|
||||
@@ -48,7 +48,7 @@ require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
|
||||
|
||||
|
||||
/*
|
||||
* Parameter
|
||||
* Parametre
|
||||
*/
|
||||
|
||||
define('GEN_NUMBER_COMMANDE', $argv[1] ?? 10);
|
||||
|
||||
@@ -50,7 +50,7 @@ $listoflastname = array("Joe","Marc","Steve","Laurent","Nico","Isabelle","Doroth
|
||||
|
||||
|
||||
/*
|
||||
* Parameter
|
||||
* Parametre
|
||||
*/
|
||||
|
||||
define('GEN_NUMBER_SOCIETE', $argv[1] ?? 10);
|
||||
|
||||
@@ -153,7 +153,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
}
|
||||
$object->cond_reglement_id = dol_getIdFromCode($db, $condpayment, 'c_payment_term', 'libelle_facture', 'rowid', 1);
|
||||
if (empty($object->cond_reglement_id)) {
|
||||
print " - Error can't find payment mode for ".$condpayment."\n";
|
||||
print " - Error cant find payment mode for ".$condpayment."\n";
|
||||
$errorrecord++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -125,7 +124,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
$nboflines++;
|
||||
|
||||
$object = new User($db);
|
||||
$object->status = 1;
|
||||
$object->statut = 1;
|
||||
|
||||
$tmp=explode(' ', $fields[3], 2);
|
||||
$object->firstname = trim($tmp[0]);
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
README
|
||||
======
|
||||
|
||||
The scripts in this directory can be used to reload or save a demo database.
|
||||
The package `dialog` is required.
|
||||
Scripts in this directory can be used to reload or save a demo database.
|
||||
Install of package "dialog" is required.
|
||||
|
||||
|
||||
Init demo
|
||||
-------------
|
||||
|
||||
The script `initdemo.sh` will erase the current database with data from `dev/initdemo/mysqldump_dolibarr_x.y.z.sql` and copy files from `documents_demo` to the official document directory.
|
||||
The script initdemo.sh will erase current database with data intodev/initdemo/mysqldump_dolibarr_x.y.z.sql and copy files into documents_demo into officiel document directory.
|
||||
|
||||
You many to execute `chmod 700 initdemo.sh`
|
||||
then run `./initdemo.sh` to launch the Graphical User Interface.
|
||||
Do a chmod 700 initdemo.sh
|
||||
then run ./initdemo.sh to launch Graphic User Interface.
|
||||
|
||||
After loading the demo files, the admin login may be one of the following:
|
||||
After loading the demo files, admin login may be:
|
||||
- admin / admin
|
||||
or
|
||||
- admin / adminadmin
|
||||
@@ -22,10 +22,11 @@ or
|
||||
Update demo
|
||||
-------------
|
||||
|
||||
The goal of the script `dev/initdemo/updatedemo.php` is to update the dates in the demo data so that samples are up to date.
|
||||
The goal of script dev/initdemo/updatedemo.php is to update dates into the demo data so samples are up to date.
|
||||
|
||||
|
||||
Save demo
|
||||
-------------
|
||||
|
||||
The script `dev/initdemo.savedemo.sh` will save the current database into a database dump file.
|
||||
The script dev/initdemo.savedemo.sh will save current database into a database dump file.
|
||||
|
||||
|
||||
@@ -1,49 +1,45 @@
|
||||
#!/bin/bash
|
||||
# Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------
|
||||
# Script to purge and initialize a database with demo values.
|
||||
# Note: "dialog" tool needs to be available if no parameter provided.
|
||||
# Script to purge and init a database with demo values.
|
||||
# Note: "dialog" tool need to be available if no parameter provided.
|
||||
#
|
||||
# WARNING: This script erase all the data in the database
|
||||
# WARNING: This script erase all data of database
|
||||
# with data into dump file
|
||||
#
|
||||
# Regis Houssin - regis.houssin@inodbox.com
|
||||
# Laurent Destailleur - eldy@users.sourceforge.net
|
||||
#------------------------------------------------------
|
||||
# Usage: initdemo.sh confirm
|
||||
# Usage: initdemo.sh confirm
|
||||
# usage: initdemo.sh confirm mysqldump_dolibarr_x.x.x.sql database port login pass
|
||||
#------------------------------------------------------
|
||||
|
||||
|
||||
export mydir
|
||||
mydir=${0//initdemo.sh/}
|
||||
if [ "$mydir" = "" ] || [ "$mydir" = "./" ]
|
||||
export mydir=`echo "$0" | sed -e 's/initdemo.sh//'`;
|
||||
if [ "x$mydir" = 'x' -o "x$mydir" = 'x./' ]
|
||||
then
|
||||
export mydir="."
|
||||
export mydir="."
|
||||
fi
|
||||
export id
|
||||
id=$(id -u)
|
||||
export id=`id -u`;
|
||||
|
||||
|
||||
# ----------------------------- check if root
|
||||
if [ "$id" != "0" ] && [ "$id" != "1001" ]
|
||||
if [ "x$id" != "x0" -a "x$id" != "x1001" ]
|
||||
then
|
||||
echo "Script must be executed as root"
|
||||
echo "Script must be ran as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
# ----------------------------- command line params
|
||||
confirm=$1
|
||||
dumpfile=$2
|
||||
base=$3
|
||||
port=$4
|
||||
admin=$5
|
||||
passwd=$6
|
||||
confirm=$1;
|
||||
dumpfile=$2;
|
||||
base=$3;
|
||||
port=$4;
|
||||
admin=$5;
|
||||
passwd=$6;
|
||||
|
||||
# ----------------------------- check params
|
||||
if [ "$confirm" != "confirm" ]
|
||||
if [ "x$confirm" != "xconfirm" ]
|
||||
then
|
||||
echo "----- $0 -----"
|
||||
echo "Usage: initdemo.sh confirm [mysqldump_dolibarr_x.x.x.sql database port login pass]"
|
||||
@@ -52,205 +48,196 @@ fi
|
||||
|
||||
|
||||
# ----------------------------- if no params on command line
|
||||
if [ "$passwd" = "" ]
|
||||
if [ "x$passwd" = "x" ]
|
||||
then
|
||||
export dumpfile
|
||||
# shellcheck disable=2012
|
||||
dumpfile=$(ls -v "$mydir/mysqldump_dolibarr_"*".sql" | tail -n 1)
|
||||
dumpfile=$(basename "$dumpfile")
|
||||
export dumpfile=`ls -v $mydir/mysqldump_dolibarr_*.sql | tail -n 1`
|
||||
export dumpfile=`basename $dumpfile`
|
||||
|
||||
# ----------------------------- input file
|
||||
DIALOG=${DIALOG:=dialog}
|
||||
DIALOG=${DIALOG=dialog}
|
||||
DIALOG="$DIALOG --ascii-lines"
|
||||
fichtemp=$(mktemp 2>/dev/null) || fichtemp=/tmp/test$$
|
||||
# shellcheck disable=2064,2172
|
||||
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
|
||||
trap "rm -f $fichtemp" 0 1 2 5 15
|
||||
$DIALOG --title "Init Dolibarr with demo values" --clear --inputbox "Input dump file :" 16 55 "$dumpfile" 2> "$fichtemp"
|
||||
$DIALOG --title "Init Dolibarr with demo values" --clear \
|
||||
--inputbox "Input dump file :" 16 55 $dumpfile 2> $fichtemp
|
||||
valret=$?
|
||||
case $valret in
|
||||
0)
|
||||
dumpfile=$(cat "$fichtemp") ;;
|
||||
1)
|
||||
exit ;;
|
||||
255)
|
||||
exit ;;
|
||||
0)
|
||||
dumpfile=`cat $fichtemp`;;
|
||||
1)
|
||||
exit;;
|
||||
255)
|
||||
exit;;
|
||||
esac
|
||||
rm "$fichtemp"
|
||||
|
||||
rm $fichtemp
|
||||
|
||||
# ----------------------------- database name
|
||||
DIALOG=${DIALOG:=dialog}
|
||||
DIALOG=${DIALOG=dialog}
|
||||
DIALOG="$DIALOG --ascii-lines"
|
||||
fichtemp=$(mktemp 2>/dev/null) || fichtemp=/tmp/test$$
|
||||
# shellcheck disable=2064,2172
|
||||
trap "rm -f '$fichtemp'" 0 1 2 5 15
|
||||
$DIALOG --title "Init Dolibarr with demo values" --clear --inputbox "Mysql database name :" 16 55 dolibarrdemo 2> "$fichtemp"
|
||||
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
|
||||
trap "rm -f $fichtemp" 0 1 2 5 15
|
||||
$DIALOG --title "Init Dolibarr with demo values" --clear \
|
||||
--inputbox "Mysql database name :" 16 55 dolibarrdemo 2> $fichtemp
|
||||
valret=$?
|
||||
case $valret in
|
||||
0)
|
||||
base=$(cat "$fichtemp") ;;
|
||||
1)
|
||||
exit ;;
|
||||
255)
|
||||
exit ;;
|
||||
0)
|
||||
base=`cat $fichtemp`;;
|
||||
1)
|
||||
exit;;
|
||||
255)
|
||||
exit;;
|
||||
esac
|
||||
rm "$fichtemp"
|
||||
|
||||
rm $fichtemp
|
||||
|
||||
# ---------------------------- database port
|
||||
DIALOG=${DIALOG:=dialog}
|
||||
fichtemp=$(mktemp 2>/dev/null) || fichtemp=/tmp/test$$
|
||||
# shellcheck disable=2064,2172
|
||||
trap "rm -f '$fichtemp'" 0 1 2 5 15
|
||||
DIALOG=${DIALOG=dialog}
|
||||
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
|
||||
trap "rm -f $fichtemp" 0 1 2 5 15
|
||||
$DIALOG --title "Init Dolibarr with demo values" --clear \
|
||||
--inputbox "Mysql port (ex: 3306):" 16 55 3306 2> "$fichtemp"
|
||||
|
||||
--inputbox "Mysql port (ex: 3306):" 16 55 3306 2> $fichtemp
|
||||
|
||||
valret=$?
|
||||
|
||||
|
||||
case $valret in
|
||||
0)
|
||||
port=$(cat "$fichtemp") ;;
|
||||
1)
|
||||
exit ;;
|
||||
255)
|
||||
exit ;;
|
||||
0)
|
||||
port=`cat $fichtemp`;;
|
||||
1)
|
||||
exit;;
|
||||
255)
|
||||
exit;;
|
||||
esac
|
||||
rm "$fichtemp"
|
||||
|
||||
rm $fichtemp
|
||||
|
||||
# ---------------------------- compte admin mysql
|
||||
DIALOG=${DIALOG:=dialog}
|
||||
fichtemp=$(mktemp 2>/dev/null) || fichtemp=/tmp/test$$
|
||||
# shellcheck disable=2064,2172
|
||||
trap "rm -f '$fichtemp'" 0 1 2 5 15
|
||||
$DIALOG --title "Init Dolibarr with demo values" --clear \
|
||||
--inputbox "Mysql user login (ex: root):" 16 55 root 2> "$fichtemp"
|
||||
|
||||
valret=$?
|
||||
|
||||
case $valret in
|
||||
0)
|
||||
admin=$(cat "$fichtemp") ;;
|
||||
1)
|
||||
exit ;;
|
||||
255)
|
||||
exit ;;
|
||||
esac
|
||||
rm "$fichtemp"
|
||||
|
||||
# ---------------------------- password admin mysql (root)
|
||||
DIALOG=${DIALOG:=dialog}
|
||||
fichtemp=$(mktemp 2>/dev/null) || fichtemp=/tmp/test$$
|
||||
# shellcheck disable=2064,2172
|
||||
trap "rm -f '$fichtemp'" 0 1 2 5 15
|
||||
DIALOG=${DIALOG=dialog}
|
||||
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
|
||||
trap "rm -f $fichtemp" 0 1 2 5 15
|
||||
$DIALOG --title "Init Dolibarr with demo values" --clear \
|
||||
--passwordbox "Password for Mysql user login :" 16 55 2> "$fichtemp"
|
||||
|
||||
--inputbox "Mysql user login (ex: root):" 16 55 root 2> $fichtemp
|
||||
|
||||
valret=$?
|
||||
|
||||
|
||||
case $valret in
|
||||
0)
|
||||
passwd=$(cat "$fichtemp") ;;
|
||||
1)
|
||||
exit ;;
|
||||
255)
|
||||
exit ;;
|
||||
0)
|
||||
admin=`cat $fichtemp`;;
|
||||
1)
|
||||
exit;;
|
||||
255)
|
||||
exit;;
|
||||
esac
|
||||
rm "$fichtemp"
|
||||
|
||||
|
||||
export documentdir
|
||||
# shellcheck disable=2016
|
||||
documentdir=$(< "$mydir/../../htdocs/conf/conf.php" grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g')
|
||||
rm $fichtemp
|
||||
|
||||
# ---------------------------- mot de passe admin mysql
|
||||
DIALOG=${DIALOG=dialog}
|
||||
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
|
||||
trap "rm -f $fichtemp" 0 1 2 5 15
|
||||
$DIALOG --title "Init Dolibarr with demo values" --clear \
|
||||
--passwordbox "Password for Mysql user login :" 16 55 2> $fichtemp
|
||||
|
||||
valret=$?
|
||||
|
||||
case $valret in
|
||||
0)
|
||||
passwd=`cat $fichtemp`;;
|
||||
1)
|
||||
exit;;
|
||||
255)
|
||||
exit;;
|
||||
esac
|
||||
rm $fichtemp
|
||||
|
||||
|
||||
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' `
|
||||
|
||||
|
||||
# ---------------------------- confirmation
|
||||
DIALOG=${DIALOG:=dialog}
|
||||
DIALOG=${DIALOG=dialog}
|
||||
$DIALOG --title "Init Dolibarr with demo values" --clear \
|
||||
--yesno "Do you confirm ? \n Dump file : '$dumpfile' \n Dump dir : '$mydir' \n Document dir : '$documentdir' \n Mysql database : '$base' \n Mysql port : '$port' \n Mysql login: '$admin' \n Mysql password : --hidden--" 15 55
|
||||
|
||||
--yesno "Do you confirm ? \n Dump file : '$dumpfile' \n Dump dir : '$mydir' \n Document dir : '$documentdir' \n Mysql database : '$base' \n Mysql port : '$port' \n Mysql login: '$admin' \n Mysql password : --hidden--" 15 55
|
||||
|
||||
case $? in
|
||||
0) echo "Ok, start process..." ;;
|
||||
1) exit ;;
|
||||
255) exit ;;
|
||||
0) echo "Ok, start process...";;
|
||||
1) exit;;
|
||||
255) exit;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# ---------------------------- run sql file
|
||||
if [ "$passwd" != "" ]
|
||||
if [ "x$passwd" != "x" ]
|
||||
then
|
||||
export passwd="-p$passwd"
|
||||
fi
|
||||
#echo "mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile"
|
||||
#mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
|
||||
#echo "drop old table"
|
||||
echo "drop table if exists llx_accounting_account;" | mysql "-P$port" "-u$admin" "$passwd" "$base"
|
||||
echo "mysql -P$port -u$admin -p***** $base < '$mydir/$dumpfile'"
|
||||
mysql "-P$port" "-u$admin" "$passwd" "$base" < "$mydir/$dumpfile"
|
||||
echo "drop table if exists llx_accounting_account;" | mysql -P$port -u$admin $passwd $base
|
||||
echo "mysql -P$port -u$admin -p***** $base < $mydir/$dumpfile"
|
||||
mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
|
||||
export res=$?
|
||||
|
||||
if [ $res -ne 0 ]; then
|
||||
echo "Error to load database dump with mysql -P$port -u$admin -p***** $base < '$mydir/$dumpfile'"
|
||||
echo "Error to load database dump with mysql -P$port -u$admin -p***** $base < $mydir/$dumpfile"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
"$mydir/updatedemo.php" confirm
|
||||
$mydir/updatedemo.php confirm
|
||||
export res=$?
|
||||
|
||||
# ---------------------------- copy demo files
|
||||
export documentdir
|
||||
# shellcheck disable=2016
|
||||
documentdir=$(< "$mydir/../../htdocs/conf/conf.php" grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g')
|
||||
if [ "$documentdir" != "" ]
|
||||
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' `
|
||||
if [ "x$documentdir" != "x" ]
|
||||
then
|
||||
"$DIALOG" --title "Reset document directory" --clear \
|
||||
--inputbox "DELETE and recreate document directory '$documentdir/':" 16 55 n 2> "$fichtemp"
|
||||
|
||||
$DIALOG --title "Reset document directory" --clear \
|
||||
--inputbox "DELETE and recreate document directory $documentdir/:" 16 55 n 2> $fichtemp
|
||||
|
||||
valret=$?
|
||||
|
||||
|
||||
case $valret in
|
||||
0)
|
||||
rep=$(cat "$fichtemp") ;;
|
||||
1)
|
||||
exit ;;
|
||||
255)
|
||||
exit ;;
|
||||
0)
|
||||
rep=`cat $fichtemp`;;
|
||||
1)
|
||||
exit;;
|
||||
255)
|
||||
exit;;
|
||||
esac
|
||||
|
||||
|
||||
echo "rep=$rep"
|
||||
if [ "$rep" = "y" ]; then
|
||||
echo "rm -fr '$documentdir/'*"
|
||||
rm -fr "${documentdir:?}/"*
|
||||
if [ "x$rep" = "xy" ]; then
|
||||
echo rm -fr "$documentdir/*"
|
||||
rm -fr $documentdir/*
|
||||
fi
|
||||
|
||||
echo "cp -pr '$mydir/documents_demo/'* '$documentdir/'"
|
||||
cp -pr "$mydir/documents_demo/"* "$documentdir/"
|
||||
|
||||
|
||||
echo cp -pr $mydir/documents_demo/* "$documentdir/"
|
||||
cp -pr $mydir/documents_demo/* "$documentdir/"
|
||||
|
||||
mkdir "$documentdir/doctemplates/" 2>/dev/null
|
||||
echo cp -pr "$mydir/../../htdocs/install/doctemplates/"* "$documentdir/doctemplates/"
|
||||
cp -pr "$mydir/../../htdocs/install/doctemplates/"* "$documentdir/doctemplates/"
|
||||
|
||||
echo cp -pr "$mydir/../../htdocs/install/medias/"* "$documentdir/medias/image/"
|
||||
cp -pr "$mydir/../../htdocs/install/medias/"* "$documentdir/medias/image/"
|
||||
echo cp -pr $mydir/../../htdocs/install/doctemplates/* "$documentdir/doctemplates/"
|
||||
cp -pr $mydir/../../htdocs/install/doctemplates/* "$documentdir/doctemplates/"
|
||||
|
||||
echo cp -pr $mydir/../../htdocs/install/medias/* "$documentdir/medias/image/"
|
||||
cp -pr $mydir/../../htdocs/install/medias/* "$documentdir/medias/image/"
|
||||
|
||||
mkdir -p "$documentdir/ecm/Administrative documents" 2>/dev/null
|
||||
mkdir -p "$documentdir/ecm/Images" 2>/dev/null
|
||||
rm -f "$documentdir/doctemplates/"*/index.html
|
||||
echo cp -pr "$mydir/../../doc/images/"* "$documentdir/ecm/Images"
|
||||
cp -pr "$mydir/../../doc/images/"* "$documentdir/ecm/Images"
|
||||
|
||||
echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
|
||||
cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
|
||||
|
||||
chmod -R u+w "$documentdir/"
|
||||
chown -R www-data "$documentdir/"
|
||||
else
|
||||
echo "Detection of 'documents' directory in '$mydir' failed so demo files were not copied."
|
||||
echo Detection of documents directory from $mydir failed so demo files were not copied.
|
||||
fi
|
||||
|
||||
|
||||
if [ -s "$mydir/initdemopostsql.sql" ]; then
|
||||
mysql "-P$port" "$base" < "$mydir/initdemopostsql.sql"
|
||||
mysql -P$port $base < "$mydir/initdemopostsql.sql"
|
||||
fi
|
||||
|
||||
|
||||
if [ "$res" = "0" ]
|
||||
if [ "x$res" = "x0" ]
|
||||
then
|
||||
echo "Success, file successfully loaded."
|
||||
else
|
||||
|
||||
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user