2
0
forked from Wavyzz/dolibarr

Compare commits

..

10 Commits
19.0.2 ... 12.0

Author SHA1 Message Date
Laurent Destailleur
cf57e7e88b Merge 2024-10-29 15:44:25 +01:00
Laurent Destailleur
a186e16568 Backport fix for mysql 8 export 2024-10-29 15:32:54 +01:00
Laurent Destailleur
52138372ce Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2024-09-29 22:27:54 +02:00
Laurent Destailleur
a27538f582 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2024-09-29 22:27:42 +02:00
Laurent Destailleur
a621032643 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2024-09-29 19:28:05 +02:00
Laurent Destailleur
32646cb7f4 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2024-09-29 19:25:49 +02:00
Florian Mortgat
74b67eb6c6 FIX - use price() to display qty on a product's stats tab to avoid showing too many decimals when rounding errors are possible (#31165) 2024-09-29 15:57:05 +02:00
Laurent Destailleur
644f365455 Merge remote-tracking branch 'origin/11.0' into 12.0 2024-09-26 18:47:12 +02:00
Laurent Destailleur
667890247c Merge remote-tracking branch 'origin/10.0' into 11.0 2024-09-26 18:46:30 +02:00
Florian Mortgat
c727bbb530 FIX: when qty is not an integer, apply price() (#31138)
* FIX: when qty is not an integer, apply price() to avoid displaying precision errors if php.ini's precision settings are too high

* Apply eldy's suggestion to use price's parameters rather than a test
2024-09-26 18:41:41 +02:00
15179 changed files with 1155933 additions and 1804811 deletions

13
.gitattributes vendored
View File

@@ -11,31 +11,26 @@
*.htm text eol=lf *.htm text eol=lf
*.html text eol=lf *.html text eol=lf
*.js text eol=lf *.js text eol=lf
*.json text eol=lf
*.css text eol=lf *.css text eol=lf
*.lang text eol=lf *.lang text eol=lf
*.txt text eol=lf *.txt text eol=lf
*.md text eol=lf *.md text eol=lf
*.pp text eol=lf *.pp text eol=lf
*.sh text eol=lf *.sh text eol=lf
*.yml text eol=lf
*.yaml text eol=lf *.yaml text eol=lf
*.conf text eol=lf
.bash_aliases text eol=lf .bash_aliases text eol=lf
# Denote all files that are truly binary and should not be modified. # Denote all files that are truly binary and should not be modified.
*.bmp binary *.bmp binary
*.frm binary
*.ico binary *.ico binary
*.jpeg binary *.png binary
*.jpg binary *.jpg binary
*.odt binary
*.odf binary
*.frm binary
*.MYD binary *.MYD binary
*.MYI binary *.MYI binary
*.odf binary
*.odt binary
*.png binary
# Export ignores to generate clean production tarballs # Export ignores to generate clean production tarballs
/build export-ignore /build export-ignore

View File

@@ -77,8 +77,8 @@ contact@dolibarr.org
## 10. License and attribution ## 10. License and attribution
This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](https://creativecommons.org/licenses/by-sa/3.0/). This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).
Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](https://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy). Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).
Retrieved on November 22, 2016 from [https://citizencodeofconduct.org/](http://citizencodeofconduct.org/) Retrieved on November 22, 2016 from [http://citizencodeofconduct.org/](http://citizencodeofconduct.org/)

View File

@@ -4,21 +4,18 @@ How to contribute to Dolibarr
Bug reports and feature requests Bug reports and feature requests
-------------------------------- --------------------------------
<a name="not-a-support-forum"></a>*Note*: **GitHub Issues is not a support forum.** If you have questions about Dolibarr / need help using the software, please use [the forums](https://www.dolibarr.org/forum.php). Forums exist in different languages. <a name="not-a-support-forum"></a>*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](https://www.dolibarr.org/forum).
Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues). Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
Default **language here is English**. So please prepare your contributions in English.
1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem. 1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem.
2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request. 2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request.
3. Tell us the version you are using! (look at /htdocs/admin/system/dolibarr.php? and check if you are using the latest version) 4. Tell us the version you are using!
4. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging information whenever possible). 3. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging informations whenever possible).
5. Delete unnecessary submissions.
6. **Check your Message at Preview before sending.**
<a name="code"></a>Submit code <a name="code"></a>Code
--------------------- ---------------------
### Basic workflow ### Basic workflow
@@ -26,31 +23,27 @@ Default **language here is English**. So please prepare your contributions in En
1. [Fork](https://help.github.com/articles/fork-a-repo) the [GitHub repository](https://github.com/Dolibarr/dolibarr). 1. [Fork](https://help.github.com/articles/fork-a-repo) the [GitHub repository](https://github.com/Dolibarr/dolibarr).
2. Clone your fork. 2. Clone your fork.
3. Choose a branch(See the [Branches](#branches) section below). 3. Choose a branch(See the [Branches](#branches) section below).
4. Read our developer documentation on the [Dolibarr Wiki](https://wiki.dolibarr.org/index.php?title=Developer_documentation). 4. Commit and push your changes.
5. Commit and push your changes. 5. [Make a pull request](https://help.github.com/articles/creating-a-pull-request).
6. [Make a pull request](https://help.github.com/articles/creating-a-pull-request).
<span id="branches" name="branches"></span> ### <a name="branches"></a>Branches
### Branches
Unless you're fixing a bug, all pull requests should be made against the *develop* branch. Unless you're fixing a bug, all pull requests should be made against the *develop* branch.
If you're fixing a bug, it is preferred that you cook your fix and pull request it against an oldest version affected. If you're fixing a bug, it is preferred that you cook your fix and pull request it
against the oldest version affected that's still supported.
We recommend to push it into N - 2 for N the latest version available, if not possible into version N - 1, and finally into develop. We officially support versions N, N 1 and N 2 for N the latest version available.
This is just a recommendation, currently, if you push a bug fix on a very old version, it is still merged and propagated into
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 Choose your base branch accordingly.
and number of potential beneficiaries of the correction.
### General rules ### General rules
Please don't edit the ChangeLog file. This file is generated from all commit messages during release process by the project manager. Please don't edit the ChangeLog file. File will be generated from all commit messages during release process by the project manager.
### <a name="commits"></a>Commits ### <a name="commits"></a>Commits
Use clear commit messages with the following structure: Use clear commit messages with the following structure:
```plaintext ```
[KEYWORD] [ISSUENUM] DESC [KEYWORD] [ISSUENUM] DESC
LONGDESC LONGDESC
@@ -68,13 +61,10 @@ where
#### Keyword #### Keyword
In uppercase if you want to have the log comment appears into the generated ChangeLog file. In uppercase if you want to have the log comment appears into the generated ChangeLog file.
The keyword can be omitted if your commit does not fit in any of the following categories: The keyword can be ommitted if your commit does not fit in any of the following categories:
- Fix/FIX: for a bug fix - Fix/FIX: for a bug fix
- New/NEW: for an unreferenced new feature (Opening a feature request and using close is prefered)
- Close/CLOSE: for closing a referenced feature request - Close/CLOSE: for closing a referenced feature request
- New/NEW: for an unreferenced new feature (Opening a feature request and using close is preferred)
- Perf/PERF: for a performance enhancement
- Qual/QUAL: for quality code enhancement or re-engineering
#### Issuenum #### Issuenum
If your commit fixes a referenced bug or feature request. If your commit fixes a referenced bug or feature request.
@@ -95,19 +85,19 @@ Feel free to express technical details, use cases or anything relevant to the cu
This section can span multiple lines. This section can span multiple lines.
If your PR is a change on interface, you must also paste a screenshot showing the new screen. Try to keep lines under 120 characters.
#### Examples #### Examples
<pre> <pre>
FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog) FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog)
or or
CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog) NEW|New Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456)
or or
NEW|New|QUAL|Qual|PERF|Perf Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456) CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog)
or or
Short description (when the commit is not introducing feature nor closing a bug) Short description (when the commit is not introducing feature nor closing a bug)
Long description (Can span across multiple lines). Long description (Can span accross multiple lines).
</pre> </pre>
### Pull Requests ### Pull Requests
@@ -122,21 +112,20 @@ a process to follow to optimize the chance to have PRs merged efficiently...
Also, some code changes need a prior approbation: 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. * if you want to include a new external library (into htdocs/includes directory), please ask before to the core project manager (mention @dolibarr-yoda in your issue) to see if such a library can be accepted.
* if you add new tables or fields, you MUST first submit a standalone PR with the data structure changes you plan to add/modify (and only data structure changes). Start development only once this data structure has been accepted. * if you add a new table, you must first create a page on https://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Then ask the project manager (@dolibarr-yoda) if the new data model you plan to add is compatible with curent and future works in progress and can be accepted as you suggest.
Once a PR has been submitted, you may need to wait for its integration. It is common that the project leader let the PR open for a long delay to allow every developer discuss about the PR (A label is added in such a case). Once a PR has been submitted, you may need to wait for its integration. It is common that the project leader let the PR open for a long delay to allow every developer discuss about the PR (A label is added in such a case).
If the label of PR start with "Draft" or "WIP" (Work In Progress), it will not be analyzed for merging until you change the label of the PR (but it can be analyzed for discussion). If the label of PR start with "Draft" or "WIP" (Work In Progress), it will not be analyzed for merging until you change the label of PR (but it can be analyzed for discussion).
If your PR has errors reported by the Continuous Integration Platform, it means your PR is not valid and nothing will be done with it. It will be kept open to allow developers to fix this, or it may be closed several month later. Don't expect anything on your PR if you have such errors, you MUST first fix the Continuous Integration error to have it taken into consideration. If your PR has errors reported by the Continuous Integration Platform, it means your PR is not valid and nothing will be done with it. It will be kept open to allow developers to fix this, or it may be closed several month later. Don't expect anything on your PR if you have such errors, you MUST first fix the Continuous Integration error to have it taken into consideration.
If the PR is valid, and is kept open for a long time, a tag will also be added on the PR to describe the status of your PR and why the PR is kept open. By putting your mouse on the tag, you will get a full explanation of the tag/status that explain why your PR has not been integrated yet. If the PR is valid, and is kept open for a long time, a tag will also be added on the PR to describe the status of your PR and why the PR is kept open. By putting your mouse on the tag, you will get a full explanation of the tag/status that explain why your PR has not been integrated yet.
In most cases, it gives you information of things you have to do to have the PR taken into consideration (for example a change is requested, a conflict is expected to be solved, some questions were asked). If you have a yellow, red flag of purple flag, don't expect to have your PR validated. You must first provide the answer the tag ask you. The majority of open PR are waiting an action of the author of the PR. In most cases, it gives you information of things you have to do to have the PR taken into consideration (for example a change is requested, a conflict is expected to be solved, some questions were asked). If you have a yellow, red flag of purple flag, don't expect to have your PR validated. You must first provide the answer the tag ask you. The majority of open PR are waiting an action of the author of the PR.
Statistics on Dolibarr project shows that 95% of submitted PR are reviewed and tagged. Average answer delay is also one of the best among Open source projects (just few days before having the Answer Tag set). This is one of the most important ratio of answered PR in Open Source world for a major project. Don't expect the core team to reach the 100%. Statistics on Dolibarr project shows that 95% of submitted PR are reviewed and tagged. Average answer delay is also one of the best among Open source projects (just few days before having the Answer Tag set). This is one of the most important ratio of answered PR in Open Source world for a major project. Don't expect the core team to reach the 100%. A so high ratio is very rare on a so popular project and with the increasing popularity of Dolibarr, this ratio will probably decrease in future to a more common level.
A so high ratio is very rare on a so popular project and with the increasing popularity of Dolibarr, this ratio will probably decrease in future to a more common level.
### Resources ### Resources
@@ -150,9 +139,9 @@ All other translations are managed online at [Transifex](https://www.transifex.c
Translations done on transifex are available in the next major release. Translations done on transifex are available in the next major release.
Note: Sometimes, the source text (English) is modified. In such a case, the translation is reset. Transifex assume that if the original source Note: Sometimes, the source text (english) is modified. In such a case, the translation is reset. Transifex assume that if the original source
has changed, the translation is surely no more correct so must be done again. But old translation is not lost and you can use the tab "History" has changed, the translation is surely no more correct so must be done again. But old translation is not lost and you can use the tab "History"
to retrieve all old translation of a source text, and restore the translation in one click with no need to retranslate it if there is no need to. to retreive all old translation of a source text, and restore the translation in one click with no need to retranslate it if there is no need to.
### Resources ### Resources

2
.github/FUNDING.yml vendored
View File

@@ -2,4 +2,4 @@
open_collective: dolibarr open_collective: dolibarr
custom: https://wiki.dolibarr.org/index.php/Subscribe custom: https://wiki.dolibarr.org/index.php/Subscribe
github: [eldy] # github: [eldy]

35
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us fix something that is broken
title: ''
labels: Bug
assignees: ''
---
# Instructions
*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.*
*Please:*
- *replace the bracket enclosed texts with meaningful information*
- *remove any unused sub-section*
# Bug
[*Short description*]
## Environment
- **Version**: [*Affected Dolibarr version(s)*]
- **OS**: [*Server OS type and version*]
- **Web server**: [*Webserver type and version*]
- **PHP**: [*PHP version*]
- **Database**: [*Database type and version*]
- **URL(s)**: [*Affected URL(s)*]
## Expected and actual behavior
[*Verbose description*]
## Steps to reproduce the behavior
[*Verbose description*]
## [Attached files](https://help.github.com/articles/issue-attachments) (Screenshots, screencasts, dolibarr.log, debugging informations…)
[*Files*]

View File

@@ -1,71 +0,0 @@
name: Bug report
description: Create a report to help us fix something that is broken
labels: ["Bug"]
body:
- type: markdown
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:
label: Bug
description: Please give a short description of the bug
validations:
required: true
- type: input
id: environment-version
attributes:
label: Environment Version
description: Affected Dolibarr version(s)
- 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
description: Verbose description
- type: textarea
id: files
attributes:
label: Attached files
description: Screenshots, screencasts, dolibarr.log, debugging information

View File

@@ -0,0 +1,27 @@
---
name: Feature request
about: Suggest a new idea for this project
title: ''
labels: Feature request
assignees: ''
---
# Instructions
*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.*
*Please:*
- *replace the bracket enclosed texts with meaningful information*
- *remove any unused sub-section*
# Feature Request
[*Short description*]
## Use case
[*Verbose description*]
## Suggested implementation
[*Verbose description*]
## Suggested steps
[*List of tasks to achieve goal*]

View File

@@ -1,35 +0,0 @@
name: Feature request
description: Suggest a new idea for this project
labels: ["Feature request"]
body:
- type: markdown
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: feature-request
attributes:
label: Feature Request
description: Short description
validations:
required: true
- type: textarea
id: use-case
attributes:
label: Use case
description: Verbose description
- type: textarea
id: suggested-implementation
attributes:
label: Suggested implementation
description: Verbose description
- type: textarea
id: suggested-steps
attributes:
label: Suggested steps
description: List of tasks to achieve goal

View File

@@ -1,27 +1,18 @@
# Instructions # Instructions
*This is a template to help you make good pull requests. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.* *This is a template to help you make good pull requests. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.*
*Please:* *Please:*
- *only keep the "FIX", "CLOSE", "NEW", "PERF" or "QUAL" section* (use uppercase to have the PR appears into the ChangeLog, lowercase will not appears) - *only keep the "Fix", "Close" or "New" section*
- *follow the project [contributing guidelines](/.github/CONTRIBUTING.md)* - *follow the project [contributing guidelines](/.github/CONTRIBUTING.md)*
- *replace the bracket enclosed texts with meaningful information* - *replace the bracket enclosed textswith meaningful informations*
# FIX|Fix #[*issue_number Short description*] # Fix #[*issue_number Short description*]
[*Long description*] [*Long description*]
# CLOSE|Close #[*issue_number Short description*] # Close #[*issue_number Short description*]
[*Long description*] [*Long description*]
# NEW|New [*Short description*] # New [*Short description*]
[*Long description*] [*Long description*]
# PERF|Perf #[*issue_number Short description*]
[*Long description*]
# QUAL|Qual #[*issue_number Short description*]
[*Long description*]

View File

@@ -1,6 +0,0 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

View File

@@ -1,28 +0,0 @@
name: Qodana
on:
schedule:
- cron: "0 20 * * 1,3,5"
workflow_dispatch:
branches:
- develop
# push:
# branches:
# - develop
permissions:
contents: read
jobs:
qodana:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
#php-version: '7.1'
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2023.2.1
#with:
# php-version: '7.1'
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}

View File

@@ -1,38 +0,0 @@
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: Doxygen
on:
schedule:
- cron: "0 15 * * *"
workflow_dispatch:
branches:
- develop
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Build
uses: DenverCoder1/doxygen-github-pages-action@v1.2.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: build/html
config_file: build/doxygen/dolibarr-doxygen.doxyfile
# - name: Deploy
# uses: JamesIves/github-pages-deploy-action@v4
# with:
# branch: gh-pages
# folder: build/html # The folder the action should deploy.
# target-folder: docs/html2
#jobs:
# doxygen:
# runs-on: ubuntu-latest
# steps:
# - name: 'Doxygen'
# uses: mattnotmitt/doxygen-action@1.9.5
# with:
# doxyfile-path: build/doxygen

View File

@@ -1,28 +0,0 @@
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: "Exakat analysis"
on:
# execute once a month, the 1st
schedule:
- cron: "0 20 1 * *"
workflow_dispatch:
branches:
- develop
permissions:
contents: read
jobs:
exakat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Exakat
uses: docker://exakat/exakat-ga
with:
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

View File

@@ -1,365 +0,0 @@
name: GitHub CI PHP 7.1 Postgres
on:
push:
branches:
- develop
- 1*
- 2*
pull_request:
types: [opened]
permissions:
contents: read
jobs:
github_ci_php71_pgsql:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
ports:
- 32574:3306
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
# git clone dolibarr into GITHUB_WORKSPACE = /home/runner/work/dolibarr/dolibarr
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Version PHP
run: |
php -i | head -
- name: Install packages for PHP 7.1
run: |
sudo composer self-update 2.2.18
sudo chmod -R a+rwx /home/runner
composer -n config -g vendor-dir htdocs/includes
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y pgloader memcached
sudo apt install apache2 php7.1 php7.1-cli php7.1-curl php7.1-mysql php7.1-pgsql php7.1-gd php7.1-imap php7.1-intl php7.1-ldap php7.1-xml php7.1-mbstring php7.1-xml php7.1-zip libapache2-mod-php7.1
sudo update-alternatives --set php /usr/bin/php7.1
php -i | head -
cd $GITHUB_WORKSPACE
ls $GITHUB_WORKSPACE
composer -n require --ignore-platform-reqs phpunit/phpunit ^7.5 \
php-parallel-lint/php-parallel-lint ^1 \
php-parallel-lint/php-console-highlighter ^0 \
php-parallel-lint/php-var-dump-check ~0.4 \
squizlabs/php_codesniffer ^3
#For php7.3
#composer -n require phpunit/phpunit ^7.5 \
# php-parallel-lint/php-parallel-lint ^1.2 \
# php-parallel-lint/php-console-highlighter ^0 \
# php-parallel-lint/php-var-dump-check ~0.4 \
# squizlabs/php_codesniffer ^3
sudo rm -fr htdocs/includes/phpunit/php-code-coverage/src/Report/Html
- name: Adding path of binaries tools installed by composer to the PATH
run: |
export PATH="$GITHUB_WORKSPACE/htdocs/includes/bin:$PATH"
echo $PATH
# We must have a directory bin created by the previous composer call
ls $GITHUB_WORKSPACE/htdocs/includes/bin
- name: Version information
run: |
composer -V
# Check Parallel-lint version
echo "Parallel-lint version"
htdocs/includes/bin/parallel-lint -V
# Check PHP CodeSniffer version
echo "PHPCS version"
htdocs/includes/bin/phpcs --version | head -
htdocs/includes/bin/phpcs -i | head -
# Check PHP Vardump check version
echo "PHP Vardump check version"
htdocs/includes/bin/var-dump-check --version
# Check PHPUnit version
echo "PHPUnit version"
htdocs/includes/bin/phpunit --version | head -
# Check Apache version
echo "Apache version"
apache2 -v | head -
# Check Database
echo "Database version"
mysql --version | head -
psql --version
echo "Check pgloader version"
pgloader --version
- name: Create database
run: |
pwd
echo GITHUB_WORKSPACE = $GITHUB_WORKSPACE
sudo apt-get install -y mysql-client
mysql --version | head -
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SELECT VERSION();" | head -
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SHOW DATABASES"
echo "Drop and create database"
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'DROP DATABASE IF EXISTS travis;'
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8';"
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password';"
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'FLUSH PRIVILEGES;'
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis -e "UPDATE llx_const set value = '0666' WHERE name = 'MAIN_UMASK';"
echo "Init postgresql database"
ps fauxww | grep postgres
ls /etc/postgresql/14/main/
sudo chmod -R a+rwx /etc/postgresql/14/main/pg_hba.conf
sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/14/main/pg_hba.conf
sudo cat /etc/postgresql/14/main/pg_hba.conf
sudo /etc/init.d/postgresql restart
psql postgresql://postgres:postgres@127.0.0.1:5432 -l -A
psql postgresql://postgres:postgres@127.0.0.1:5432 -c 'create database travis;'
sudo mkdir -p /tmp/pgloader
sudo chmod -R a+rwx /tmp/pgloader/
echo sudo pgloader mysql://root:password@127.0.0.1:32574/travis postgresql://postgres:postgres@127.0.0.1:5432/travis
sudo pgloader mysql://root:password@127.0.0.1:32574/travis postgresql://postgres:postgres@127.0.0.1:5432/travis
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql postgresql://postgres:postgres@127.0.0.1:5432/travis
echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql postgresql://postgres:postgres@127.0.0.1:5432/travis
# Create pgsql compatibility functions
psql postgresql://postgres:postgres@127.0.0.1:5432/travis < htdocs/install/pgsql/functions/functions.sql
- name: Generate Dolibarr conf file
run: |
export CONF_FILE=$GITHUB_WORKSPACE/htdocs/conf/conf.php
echo "Setting up Dolibarr $CONF_FILE"
echo '<?php' > $CONF_FILE
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE
echo '$'dolibarr_main_document_root=\'/var/www/html\'';' >> $CONF_FILE
echo '$'dolibarr_main_data_root=\'/var/www/html/documents\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_user=\'postgres\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_pass=\'postgres\'';' >> $CONF_FILE
echo '$'dolibarr_main_instance_unique_id=\'travis1234567890\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_port=\'5432\'';' >> $CONF_FILE
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
cat $CONF_FILE
- name: Generate install.forced.php file to test installation
run: |
export INSTALL_FORCED_FILE=$GITHUB_WORKSPACE/htdocs/install/install.forced.php
echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation"
# Ensure we catch errors
set +e
echo '<?php' > $INSTALL_FORCED_FILE
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_databaselogin=\'postgres\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_databasepass=\'postgres\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_port=\'5432\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE
echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
echo '$'force_install_main_data_root=\'/var/www/html\'';' >> $INSTALL_FORCED_FILE
cat $INSTALL_FORCED_FILE
- name: Create document directory
run: |
echo "Create documents directory and set permissions"
# and admin/temp subdirectory needed for unit tests
sudo mkdir -p /var/www/html/documents/admin/temp
sudo chmod -R a+rwx /var/www/html/documents
sudo echo "***** First line of dolibarr.log" > /var/www/html/documents/dolibarr.log
sudo chmod a+rwx /var/www/html/documents/dolibarr.log
- name: Copy app into /var/www
run: |
sudo cp -r $GITHUB_WORKSPACE/htdocs/. /var/www/html
sudo mv /var/www/html/index.html /var/www/html/index.disabled.html
sudo ln -fs /var/www/html /var/www/htdocs
sudo cp -r $GITHUB_WORKSPACE/test/. /var/www/test
sudo cp -r $GITHUB_WORKSPACE/dev/. /var/www/dev
sudo cp -r $GITHUB_WORKSPACE/scripts/. /var/www/scripts
- name: Setup Apache
run: |
pwd
whoami
# install apache web server
a2query -s
a2query -m
ls /etc/apache2/sites-available
#sudo cp -f $GITHUB_WORKSPACE/build/travis-ci/apache-githubaction.conf /etc/apache2/sites-available/000-default.conf
#sudo sed -e "s?%GITHUB_WORKSPACE%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
a2ensite 000-default
a2enmod php7.1
ls /etc/apache2/sites-enabled
sudo adduser $(whoami) www-data
sudo adduser $(whoami) root
sudo adduser root www-data
sudo chown -R www-data:www-data /etc/apache2/sites-available/
sudo chmod -R 777 /etc/apache2/sites-available/
sudo chown -R www-data:www-data /var/www/html/
ls -l /var/www/html
#ls -l /var/www/html/conf
#ls -l /var/www/html/install/
set +e
sudo cat /etc/apache2/sites-enabled/000-default.conf
sudo service apache2 restart
curl -I localhost
- name: Check Apache availability
run: |
echo "Checking webserver availability by a wget -O - --debug http://127.0.0.1"
# Ensure we stop on error with set -e
set +e
ls /var/log/apache2
#wget -O - --debug http://127.0.0.1/robots.txt
# The wget should return a page with line '<meta name="generator" content="Dolibarr installer">
wget -O - --debug http://127.0.0.1 > $GITHUB_WORKSPACE/test.html 2>&1
head -n 200 $GITHUB_WORKSPACE/test.html
echo Logs are...
#sudo cat /tmp/install.log
sudo cat /var/log/apache2/access.log
sudo cat /var/log/apache2/error.log
sudo cat /var/log/apache2/other_vhosts_access.log
set +e
- name: Upgrading Dolibarr
run: |
# Ensure we catch errors. Set this to +e if you want to go to the end to see log files.
set -e
sudo chmod -R a+rwx $GITHUB_WORKSPACE
sudo chmod -R a+rwx /var/www
ls -l /var/www
cd /var/www/html/install
echo Execute upgrade, upgrade2 and step5 for each major version
php upgrade.php 3.5.0 3.6.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade350360.log
php upgrade2.php 3.5.0 3.6.0 > $GITHUB_WORKSPACE/upgrade350360-2.log
php step5.php 3.5.0 3.6.0 > $GITHUB_WORKSPACE/upgrade350360-3.log
php upgrade.php 3.6.0 3.7.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade360370.log
php upgrade2.php 3.6.0 3.7.0 > $GITHUB_WORKSPACE/upgrade360370-2.log
php step5.php 3.6.0 3.7.0 > $GITHUB_WORKSPACE/upgrade360370-3.log
php upgrade.php 3.7.0 3.8.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade370380.log
php upgrade2.php 3.7.0 3.8.0 > $GITHUB_WORKSPACE/upgrade370380-2.log
php step5.php 3.7.0 3.8.0 > $GITHUB_WORKSPACE/upgrade370380-3.log
php upgrade.php 3.8.0 3.9.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade380390.log
php upgrade2.php 3.8.0 3.9.0 > $GITHUB_WORKSPACE/upgrade380390-2.log
php step5.php 3.8.0 3.9.0 > $GITHUB_WORKSPACE/upgrade380390-3.log
php upgrade.php 3.9.0 4.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade390400.log
php upgrade2.php 3.9.0 4.0.0 > $GITHUB_WORKSPACE/upgrade390400-2.log
php step5.php 3.9.0 4.0.0 > $GITHUB_WORKSPACE/upgrade390400-3.log
php upgrade.php 4.0.0 5.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade400500.log
php upgrade2.php 4.0.0 5.0.0 > $GITHUB_WORKSPACE/upgrade400500-2.log
php step5.php 4.0.0 5.0.0 > $GITHUB_WORKSPACE/upgrade400500-3.log
php upgrade.php 5.0.0 6.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade500600.log
php upgrade2.php 5.0.0 6.0.0 > $GITHUB_WORKSPACE/upgrade500600-2.log
php step5.php 5.0.0 6.0.0 > $GITHUB_WORKSPACE/upgrade500600-3.log
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade600700.log
php upgrade2.php 6.0.0 7.0.0 > $GITHUB_WORKSPACE/upgrade600700-2.log
php step5.php 6.0.0 7.0.0 > $GITHUB_WORKSPACE/upgrade600700-3.log
echo "\dt llx_c_paiement" | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
echo "\dt llx_c_payment_term" | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
php upgrade.php 7.0.0 8.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade700800.log
php upgrade2.php 7.0.0 8.0.0 > $GITHUB_WORKSPACE/upgrade700800-2.log
php step5.php 7.0.0 8.0.0 > $GITHUB_WORKSPACE/upgrade700800-3.log
php upgrade.php 8.0.0 9.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade800900.log
php upgrade2.php 8.0.0 9.0.0 > $GITHUB_WORKSPACE/upgrade800900-2.log
php step5.php 8.0.0 9.0.0 > $GITHUB_WORKSPACE/upgrade800900-3.log
php upgrade.php 9.0.0 10.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade9001000.log
php upgrade2.php 9.0.0 10.0.0 > $GITHUB_WORKSPACE/upgrade9001000-2.log
php step5.php 9.0.0 10.0.0 > $GITHUB_WORKSPACE/upgrade9001000-3.log
php upgrade.php 10.0.0 11.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade10001100.log
php upgrade2.php 10.0.0 11.0.0 > $GITHUB_WORKSPACE/upgrade10001100-2.log
php step5.php 10.0.0 11.0.0 > $GITHUB_WORKSPACE/upgrade10001100-3.log
php upgrade.php 11.0.0 12.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade11001200.log
php upgrade2.php 11.0.0 12.0.0 > $GITHUB_WORKSPACE/upgrade11001200-2.log
php step5.php 11.0.0 12.0.0 > $GITHUB_WORKSPACE/upgrade11001200-3.log
php upgrade.php 12.0.0 13.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade12001300.log
php upgrade2.php 12.0.0 13.0.0 > $GITHUB_WORKSPACE/upgrade12001300-2.log
php step5.php 12.0.0 13.0.0 > $GITHUB_WORKSPACE/upgrade12001300-3.log
php upgrade.php 13.0.0 14.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade13001400.log
php upgrade2.php 13.0.0 14.0.0 > $GITHUB_WORKSPACE/upgrade13001400-2.log
php step5.php 13.0.0 14.0.0 > $GITHUB_WORKSPACE/upgrade13001400-3.log
php upgrade.php 14.0.0 15.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade14001500.log
php upgrade2.php 14.0.0 15.0.0 > $GITHUB_WORKSPACE/upgrade14001500-2.log
php step5.php 14.0.0 15.0.0 > $GITHUB_WORKSPACE/upgrade14001500-3.log
php upgrade.php 15.0.0 16.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade15001600.log
php upgrade2.php 15.0.0 16.0.0 > $GITHUB_WORKSPACE/upgrade15001600-2.log
php step5.php 15.0.0 16.0.0 > $GITHUB_WORKSPACE/upgrade15001600-3.log
php upgrade.php 16.0.0 17.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade16001700.log
php upgrade2.php 16.0.0 17.0.0 > $GITHUB_WORKSPACE/upgrade16001700-2.log
php step5.php 16.0.0 17.0.0 > $GITHUB_WORKSPACE/upgrade16001700-3.log
php upgrade.php 17.0.0 18.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade17001800.log
php upgrade2.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-2.log
php step5.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-3.log
- name: Result of migration scripts
if: always()
run: |
ls -alrt $GITHUB_WORKSPACE/
echo Show content of last file
cat "$(ls -rt $GITHUB_WORKSPACE/ | tail -n1)"
- name: Enabling new modules
run: |
# Enable modules not enabled into original dump
set -e
cd /var/www/html/install
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_ProductBatch,MAIN_MODULE_SupplierProposal,MAIN_MODULE_STRIPE,MAIN_MODULE_ExpenseReport > $GITHUB_WORKSPACE/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP >> $GITHUB_WORKSPACE/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT >> $GITHUB_WORKSPACE/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_KnowledgeManagement,MAIN_MODULE_EventOrganization,MAIN_MODULE_PARTNERSHIP >> $GITHUB_WORKSPACE/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_EmailCollector >> $GITHUB_WORKSPACE/enablemodule.log
echo $?
cd -
- name: Result of enabling modules scripts
if: always()
run: |
echo Show content of enablemodule.log file
cat $GITHUB_WORKSPACE/enablemodule.log
- name: Unit testing
run: |
# Ensure we catch errors. Set this to +e instead of -e if you want to go to the end to see dolibarr.log file.
set -e
cd /var/www/html
sudo chmod -R a+rwx /var/www/html/documents
includes/bin/phpunit -d memory_limit=-1 -c /var/www/test/phpunit/phpunittest.xml /var/www/test/phpunit/AllTests.php
phpunitresult=$?
echo "Phpunit return code = $phpunitresult"
set +e

View File

@@ -1,334 +0,0 @@
name: GitHub CI PHP 8.1 MySQL
on:
push:
branches:
- develop
- 1*
- 2*
pull_request:
types: [opened]
permissions:
contents: read
jobs:
github_ci_php81_mysql:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
ports:
- 32574:3306
steps:
# git clone dolibarr into GITHUB_WORKSPACE = /home/runner/work/dolibarr/dolibarr
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Version PHP
run: |
php -i | head -
- name: Install packages for PHP 8.1
run: |
sudo composer self-update 2.2.18
sudo chmod -R a+rwx /home/runner
composer -n config -g vendor-dir htdocs/includes
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y pgloader memcached
sudo apt install apache2 php8.1 php8.1-cli php8.1-curl php8.1-mysql php8.1-pgsql php8.1-gd php8.1-imap php8.1-intl php8.1-ldap php8.1-xml php8.1-mbstring php8.1-xml php8.1-zip libapache2-mod-php8.1
sudo update-alternatives --set php /usr/bin/php8.1
php -i | head -
cd $GITHUB_WORKSPACE
ls $GITHUB_WORKSPACE
composer -n require --ignore-platform-reqs phpunit/phpunit ^8 \
php-parallel-lint/php-parallel-lint ^1.2 \
php-parallel-lint/php-console-highlighter ^0 \
php-parallel-lint/php-var-dump-check ~0.4 \
squizlabs/php_codesniffer ^3
sudo rm -fr htdocs/includes/phpunit/php-code-coverage/src/Report/Html
- name: Adding path of binaries tools installed by composer to the PATH
run: |
export PATH="$GITHUB_WORKSPACE/htdocs/includes/bin:$PATH"
echo $PATH
# We must have a directory bin created by the previous composer call
ls $GITHUB_WORKSPACE/htdocs/includes/bin
- name: Version information
run: |
composer -V
# Check Parallel-lint version
echo "Parallel-lint version"
htdocs/includes/bin/parallel-lint -V
# Check PHP CodeSniffer version
echo "PHPCS version"
htdocs/includes/bin/phpcs --version | head -
htdocs/includes/bin/phpcs -i | head -
# Check PHP Vardump check version
echo "PHP Vardump check version"
htdocs/includes/bin/var-dump-check --version
# Check PHPUnit version
echo "PHPUnit version"
htdocs/includes/bin/phpunit --version | head -
# Check Apache version
echo "Apache version"
apache2 -v | head -
# Check Database
echo "Database version"
mysql --version | head -
psql --version
echo "Check pgloader version"
pgloader --version
- name: Create database
run: |
pwd
echo GITHUB_WORKSPACE = $GITHUB_WORKSPACE
sudo apt-get install -y mysql-client
mysql --version | head -
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SELECT VERSION();" | head -
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SHOW DATABASES"
echo "Drop and create database"
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'DROP DATABASE IF EXISTS travis;'
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8';"
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password';"
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'FLUSH PRIVILEGES;'
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis -e "UPDATE llx_const set value = '0666' WHERE name = 'MAIN_UMASK';"
- name: Generate Dolibarr conf file
run: |
export CONF_FILE=$GITHUB_WORKSPACE/htdocs/conf/conf.php
echo "Setting up Dolibarr $CONF_FILE"
echo '<?php' > $CONF_FILE
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE
echo '$'dolibarr_main_document_root=\'/var/www/html\'';' >> $CONF_FILE
echo '$'dolibarr_main_data_root=\'/var/www/html/documents\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_user=\'root\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_pass=\'password\'';' >> $CONF_FILE
echo '$'dolibarr_main_instance_unique_id=\'travis1234567890\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_port=\'32574\'';' >> $CONF_FILE
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
cat $CONF_FILE
- name: Generate install.forced.php file to test installation
run: |
export INSTALL_FORCED_FILE=$GITHUB_WORKSPACE/htdocs/install/install.forced.php
echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation"
# Ensure we catch errors
set +e
echo '<?php' > $INSTALL_FORCED_FILE
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_databaselogin=\'root\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_databasepass=\'password\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_port=\'32574\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE
echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
echo '$'force_install_main_data_root=\'/var/www/html\'';' >> $INSTALL_FORCED_FILE
cat $INSTALL_FORCED_FILE
- name: Create document directory
run: |
echo "Create documents directory and set permissions"
# and admin/temp subdirectory needed for unit tests
sudo mkdir -p /var/www/html/documents/admin/temp
sudo chmod -R a+rwx /var/www/html/documents
sudo echo "***** First line of dolibarr.log" > /var/www/html/documents/dolibarr.log
sudo chmod a+rwx /var/www/html/documents/dolibarr.log
- name: Copy app into /var/www
run: |
sudo cp -r $GITHUB_WORKSPACE/htdocs/. /var/www/html
sudo mv /var/www/html/index.html /var/www/html/index.disabled.html
sudo ln -fs /var/www/html /var/www/htdocs
sudo cp -r $GITHUB_WORKSPACE/test/. /var/www/test
sudo cp -r $GITHUB_WORKSPACE/dev/. /var/www/dev
sudo cp -r $GITHUB_WORKSPACE/scripts/. /var/www/scripts
- name: Setup Apache
run: |
pwd
whoami
# install apache web server
a2query -s
a2query -m
ls /etc/apache2/sites-available
#sudo cp -f $GITHUB_WORKSPACE/build/travis-ci/apache-githubaction.conf /etc/apache2/sites-available/000-default.conf
#sudo sed -e "s?%GITHUB_WORKSPACE%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
a2ensite 000-default
a2enmod php8.1
ls /etc/apache2/sites-enabled
sudo adduser $(whoami) www-data
sudo adduser $(whoami) root
sudo adduser root www-data
sudo chown -R www-data:www-data /etc/apache2/sites-available/
sudo chmod -R 777 /etc/apache2/sites-available/
sudo chown -R www-data:www-data /var/www/html/
ls -l /var/www/html
#ls -l /var/www/html/conf
#ls -l /var/www/html/install/
set +e
sudo cat /etc/apache2/sites-enabled/000-default.conf
sudo service apache2 restart
curl -I localhost
- name: Check Apache availability
run: |
echo "Checking webserver availability by a wget -O - --debug http://127.0.0.1"
# Ensure we stop on error with set -e
set +e
ls /var/log/apache2
#wget -O - --debug http://127.0.0.1/robots.txt
# The wget should return a page with line '<meta name="generator" content="Dolibarr installer">
wget -O - --debug http://127.0.0.1 > $GITHUB_WORKSPACE/test.html 2>&1
head -n 200 $GITHUB_WORKSPACE/test.html
echo Logs are...
#sudo cat /tmp/install.log
sudo cat /var/log/apache2/access.log
sudo cat /var/log/apache2/error.log
sudo cat /var/log/apache2/other_vhosts_access.log
set +e
- name: Upgrading Dolibarr
run: |
# Ensure we catch errors. Set this to +e if you want to go to the end to see log files.
set -e
sudo chmod -R a+rwx $GITHUB_WORKSPACE
sudo chmod -R a+rwx /var/www
ls -l /var/www
cd /var/www/html/install
echo Execute upgrade, upgrade2 and step5 for each major version
php upgrade.php 3.5.0 3.6.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade350360.log
php upgrade2.php 3.5.0 3.6.0 > $GITHUB_WORKSPACE/upgrade350360-2.log
php step5.php 3.5.0 3.6.0 > $GITHUB_WORKSPACE/upgrade350360-3.log
php upgrade.php 3.6.0 3.7.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade360370.log
php upgrade2.php 3.6.0 3.7.0 > $GITHUB_WORKSPACE/upgrade360370-2.log
php step5.php 3.6.0 3.7.0 > $GITHUB_WORKSPACE/upgrade360370-3.log
php upgrade.php 3.7.0 3.8.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade370380.log
php upgrade2.php 3.7.0 3.8.0 > $GITHUB_WORKSPACE/upgrade370380-2.log
php step5.php 3.7.0 3.8.0 > $GITHUB_WORKSPACE/upgrade370380-3.log
php upgrade.php 3.8.0 3.9.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade380390.log
php upgrade2.php 3.8.0 3.9.0 > $GITHUB_WORKSPACE/upgrade380390-2.log
php step5.php 3.8.0 3.9.0 > $GITHUB_WORKSPACE/upgrade380390-3.log
php upgrade.php 3.9.0 4.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade390400.log
php upgrade2.php 3.9.0 4.0.0 > $GITHUB_WORKSPACE/upgrade390400-2.log
php step5.php 3.9.0 4.0.0 > $GITHUB_WORKSPACE/upgrade390400-3.log
php upgrade.php 4.0.0 5.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade400500.log
php upgrade2.php 4.0.0 5.0.0 > $GITHUB_WORKSPACE/upgrade400500-2.log
php step5.php 4.0.0 5.0.0 > $GITHUB_WORKSPACE/upgrade400500-3.log
php upgrade.php 5.0.0 6.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade500600.log
php upgrade2.php 5.0.0 6.0.0 > $GITHUB_WORKSPACE/upgrade500600-2.log
php step5.php 5.0.0 6.0.0 > $GITHUB_WORKSPACE/upgrade500600-3.log
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade600700.log
php upgrade2.php 6.0.0 7.0.0 > $GITHUB_WORKSPACE/upgrade600700-2.log
php step5.php 6.0.0 7.0.0 > $GITHUB_WORKSPACE/upgrade600700-3.log
php upgrade.php 7.0.0 8.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade700800.log
php upgrade2.php 7.0.0 8.0.0 > $GITHUB_WORKSPACE/upgrade700800-2.log
php step5.php 7.0.0 8.0.0 > $GITHUB_WORKSPACE/upgrade700800-3.log
php upgrade.php 8.0.0 9.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade800900.log
php upgrade2.php 8.0.0 9.0.0 > $GITHUB_WORKSPACE/upgrade800900-2.log
php step5.php 8.0.0 9.0.0 > $GITHUB_WORKSPACE/upgrade800900-3.log
php upgrade.php 9.0.0 10.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade9001000.log
php upgrade2.php 9.0.0 10.0.0 > $GITHUB_WORKSPACE/upgrade9001000-2.log
php step5.php 9.0.0 10.0.0 > $GITHUB_WORKSPACE/upgrade9001000-3.log
php upgrade.php 10.0.0 11.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade10001100.log
php upgrade2.php 10.0.0 11.0.0 > $GITHUB_WORKSPACE/upgrade10001100-2.log
php step5.php 10.0.0 11.0.0 > $GITHUB_WORKSPACE/upgrade10001100-3.log
php upgrade.php 11.0.0 12.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade11001200.log
php upgrade2.php 11.0.0 12.0.0 > $GITHUB_WORKSPACE/upgrade11001200-2.log
php step5.php 11.0.0 12.0.0 > $GITHUB_WORKSPACE/upgrade11001200-3.log
php upgrade.php 12.0.0 13.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade12001300.log
php upgrade2.php 12.0.0 13.0.0 > $GITHUB_WORKSPACE/upgrade12001300-2.log
php step5.php 12.0.0 13.0.0 > $GITHUB_WORKSPACE/upgrade12001300-3.log
php upgrade.php 13.0.0 14.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade13001400.log
php upgrade2.php 13.0.0 14.0.0 > $GITHUB_WORKSPACE/upgrade13001400-2.log
php step5.php 13.0.0 14.0.0 > $GITHUB_WORKSPACE/upgrade13001400-3.log
php upgrade.php 14.0.0 15.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade14001500.log
php upgrade2.php 14.0.0 15.0.0 > $GITHUB_WORKSPACE/upgrade14001500-2.log
php step5.php 14.0.0 15.0.0 > $GITHUB_WORKSPACE/upgrade14001500-3.log
php upgrade.php 15.0.0 16.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade15001600.log
php upgrade2.php 15.0.0 16.0.0 > $GITHUB_WORKSPACE/upgrade15001600-2.log
php step5.php 15.0.0 16.0.0 > $GITHUB_WORKSPACE/upgrade15001600-3.log
php upgrade.php 16.0.0 17.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade16001700.log
php upgrade2.php 16.0.0 17.0.0 > $GITHUB_WORKSPACE/upgrade16001700-2.log
php step5.php 16.0.0 17.0.0 > $GITHUB_WORKSPACE/upgrade16001700-3.log
php upgrade.php 17.0.0 18.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade17001800.log
php upgrade2.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-2.log
php step5.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-3.log
- name: Result of migration scripts
if: always()
run: |
ls -alrt $GITHUB_WORKSPACE/
echo Show content of last file
cat "$(ls -rt $GITHUB_WORKSPACE/ | tail -n1)"
- name: Enabling new modules
run: |
# Enable modules not enabled into original dump
set -e
cd /var/www/html/install
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_ProductBatch,MAIN_MODULE_SupplierProposal,MAIN_MODULE_STRIPE,MAIN_MODULE_ExpenseReport > $GITHUB_WORKSPACE/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP >> $GITHUB_WORKSPACE/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT >> $GITHUB_WORKSPACE/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_KnowledgeManagement,MAIN_MODULE_EventOrganization,MAIN_MODULE_PARTNERSHIP >> $GITHUB_WORKSPACE/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_EmailCollector >> $GITHUB_WORKSPACE/enablemodule.log
echo $?
cd -
- name: Result of enabling modules scripts
if: always()
run: |
echo Show content of enablemodule.log file
cat $GITHUB_WORKSPACE/enablemodule.log
- name: Unit testing
run: |
# Ensure we catch errors. Set this to +e instead of -e if you want to go to the end to see dolibarr.log file.
set -e
cd /var/www/html
sudo chmod -R a+rwx /var/www/html/documents
includes/bin/phpunit -d memory_limit=-1 -c /var/www/test/phpunit/phpunittest.xml /var/www/test/phpunit/AllTests.php
phpunitresult=$?
echo "Phpunit return code = $phpunitresult"
set +e
- name: Code quality check - Lint
if: github.event_name == 'push'
run: |
htdocs/includes/bin/parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
- name: Code quality check - phpcs
if: github.event_name == 'push'
run: |
htdocs/includes/bin/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 .;
- name: Code quality check - var-dump-check
if: github.event_name == 'push'
run: |
htdocs/includes/bin/var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .

View File

@@ -1,30 +0,0 @@
name: "PHPCS"
on:
pull_request:
paths:
- "**.php"
- "phpcs.xml"
- ".github/workflows/phpcs.yml"
jobs:
phpcs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 50 # important!
# we may use whatever way to install phpcs, just specify the path on the next step
# however, curl seems to be the fastest
- name: Install PHP_CodeSniffer
run: |
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
php phpcs.phar --version
- uses: thenabeel/action-phpcs@v8
with:
files: "**.php" # you may customize glob as needed
phpcs_path: php phpcs.phar
standard: dev/setup/codesniffer/ruleset.xml
fail_on_warnings: false

View File

@@ -1,63 +0,0 @@
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'

View File

@@ -1,125 +0,0 @@
---
name: pre-commit
on:
pull_request:
push:
jobs:
pre-commit:
runs-on: ubuntu-latest
env:
RAW_LOG: pre-commit.log
CS_XML: pre-commit.xml
steps:
- name: Install required tools
run: sudo apt-get update && sudo apt-get install cppcheck
if: false
# The next uses the git API because there is no clone yet.
# This is faster for a big repo.
- name: Get all changed php files (if PR)
id: changed-php
uses: tj-actions/changed-files@v42
if: github.event_name == 'pull_request'
with:
files: |
**.php
# Checkout git sources to analyze
- uses: actions/checkout@v4
# Action setup-python needs a requirements.txt or pyproject.toml
# This ensures one of them exists.
- name: Create requirements.txt if no requirements.txt or pyproject.toml
run: |-
[ -r requirements.txt ] || [ -r pyproject.toml ] || touch requirements.txt
# Install python and pre-commit tool
- uses: actions/setup-python@v5
with:
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 into pre-commit-config.yaml).
# We can force exclusion of some of them here.
- 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,check-json,check-executables-have-shebangs,check-shebang-scripts-are-executable,beautysh,yamllint,shellcheck
run: |
set -o pipefail
pre-commit gc
pre-commit run --show-diff-on-failure --color=always --all-files | tee ${RAW_LOG}
# 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@v42
# if: github.event_name == 'pull_request'
# with:
# files: |
# **.php
- name: Setup PHPCS
uses: shivammathur/setup-php@v2
# Install when we're going to run phpcs
if: |
steps.changed-php.outputs.any_changed == 'true'
||
(
github.event_name == 'push'
&& (
github.event.ref == 'refs/heads/develop'
|| endsWith(github.event.ref, '.0')
)
)
with:
php-version: 8.1
coverage: none # disable xdebug, pcov
tools: phpcs
- name: Run some pre-commit hooks on selected changed files only
if: steps.changed-php.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-php.outputs.all_changed_files }}
run: |
set -o pipefail
pre-commit run php-cs --files ${ALL_CHANGED_FILES} | tee -a ${RAW_LOG}
- name: Run some pre-commit hooks on all files on push to "main" branches
if: |
github.event_name == 'push'
&& (
github.event.ref == 'refs/heads/develop'
|| endsWith(github.event.ref, '.0')
)
run: |
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}
ls -l ~/.cache/pre-commit/
- name: Convert Raw Log to Annotations
uses: mdeweerd/logToCheckStyle@v2024.2.9
if: ${{ failure() }}
with:
in: ${{ env.RAW_LOG }}
# Save the precommit cache
- uses: actions/cache/save@v4
if: ${{ ! cancelled() }}
with:
path: ~/.cache/pre-commit/
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
# Upload result log files of precommit into the Artifact shared store
- name: Provide log as artifact
uses: actions/upload-artifact@v4
if: ${{ ! cancelled() }}
with:
name: precommit-logs
path: |
${{ env.RAW_LOG }}
${{ env.CS_XML }}
retention-days: 2

View File

@@ -6,24 +6,19 @@ on:
- cron: "0 21 * * *" - cron: "0 21 * * *"
issue_comment: issue_comment:
types: [created] types: [created]
workflow_dispatch:
permissions: {} # none
jobs: jobs:
stale: stale:
permissions:
issues: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: Dolibarr/stale@staleunstale - uses: Dolibarr/stale@staleunstale
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).' stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 15 days (you should still be able to re-open it if required).'
stale-label: 'Issue Stale (automatic label)' stale-label: 'Issue Stale (automatic label)'
exempt-labels: 'Priority High / Blocking,Priority Top Strategic,Priority Medium,hacktoberfest,hacktoberfest-accepted,good first issue,Bug Security (CVE),Analysis of PR in progress' exempt-labels: 'Priority High / Blocking,Priority Top Strategic,Priority Medium,Hacktoberfest,good first issue,Bug Security (CVE),Analysis of PR in progres'
days-before-stale: 365 days-before-stale: 365
days-before-close: 10 days-before-close: 15
operations-per-run: 100 operations-per-run: 100
dry-run: false dry-run: false

View File

@@ -0,0 +1,25 @@
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: "Close stale issues (bugs and feature requests)"
on:
schedule:
- cron: "0 20 * * *"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: Dolibarr/stale@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 15 days (you should still be able to re-open it if required).'
stale-issue-label: 'Issue Stale (automatic label)'
exempt-issue-label: 'Priority High / Blocking'
days-before-stale: 365
days-before-close: -1
operations-per-run: 100
#stale-pr-message: 'This PR is stale because it has been open 1 year with no activity. If this PR is still mergeable (no conflict, nor Continuous Integration errors), please comment to confirm this merge is still expected. Without comment, this issue will be closed automatically by stale bot in 15 days.'
stale-pr-label: 'PR Stale (automatic label)'
stale-pr-message:
exempt-pr-label: 'Priority Top Strategic'

30
.gitignore vendored
View File

@@ -14,11 +14,11 @@ default.properties
/.pydevproject /.pydevproject
/.vscode /.vscode
.DS_Store .DS_Store
.idea
*.iml *.iml
*.orig *.orig
Thumbs.db Thumbs.db
/dolibarr_genesis.mp4 /dolibarr_genesis.mp4
.phpunit.result.cache
# Log files # Log files
dolibarr_install.log dolibarr_install.log
upgrade.log upgrade.log
@@ -37,34 +37,8 @@ htdocs/includes/jakub-onderka/
htdocs/includes/phpdocumentor/ htdocs/includes/phpdocumentor/
htdocs/includes/phpspec/ htdocs/includes/phpspec/
htdocs/includes/phpunit/ htdocs/includes/phpunit/
htdocs/includes/php-parallel-lint/
htdocs/includes/sebastian/ htdocs/includes/sebastian/
htdocs/includes/squizlabs/ htdocs/includes/squizlabs/
htdocs/includes/symfony/
htdocs/includes/webmozart/ htdocs/includes/webmozart/
htdocs/.well-known/apple-developer-merchantid-domain-association htdocs/.well-known/apple-developer-merchantid-domain-association
/factory/
/output/
# Node Modules
build/yarn-error.log
build/node_modules/
node_modules/
#yarn
yarn.lock
#package-lock
package-lock.json
doc/install.lock
/.asciidoctorconfig.adoc
.idea
/composer.json
/composer.lock
/build/phpstan/phpstan
/build/phpstan/bootstrap_custom.php
phpstan_custom.neon
/.php-cs-fixer.cache
/.php_cs.cache

View File

@@ -89,9 +89,3 @@ Baffir Abbes <bafbes@users.noreply.github.com> bafbes <bafbes@users.noreply.gith
Kevin Guerrier <guerrier.k@gmail.com> GUERRIER Kevin <guerrier.k@gmail.com> Kevin Guerrier <guerrier.k@gmail.com> GUERRIER Kevin <guerrier.k@gmail.com>
Remy Younes <ryounes@gmail.com> remy <ryounes@gmail.com> Remy Younes <ryounes@gmail.com> remy <ryounes@gmail.com>
Estephe Loridan <github@estephe.me> Estephe L. <github@estephe.me> Estephe Loridan <github@estephe.me> Estephe L. <github@estephe.me>
Anthony Berton <anthony.berton@bb2a.fr> Anthony Berton <anthony.berton@bb2a.fr>
Anthony Berton <anthony.berton@bb2a.fr> Berton Anthony <anthony.berton@bb2a.fr>
Anthony Berton <anthony.berton@bb2a.fr> BB2A-Anthony <anthony.berton@bb2a.fr>
Anthony Berton <anthony.berton@bb2a.fr> Anthony Berton <bertonanthony@gmail.com>
Anthony Berton <anthony.berton@bb2a.fr> Berton Anthony <bertonanthony@gmail.com>
Anthony Berton <anthony.berton@bb2a.fr> BB2A-Anthony <bertonanthony@gmail.com>

View File

@@ -1,63 +0,0 @@
<?php
/* PHP 7.0 */
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude([
'core/includes',
'custom',
'documents',
'doctemplates',
'vendor',
'install/doctemplates',
'htdocs/custom',
'htdocs/includes',
'htdocs/install/doctemplates',
])
->notPath('vendor');
/* PHP 7.4+ */
/*
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude([
'custom',
'documents',
'htdocs/custom',
'htdocs/includes',
])
->notPath([
'vendor',
]);
*/
return (new PhpCsFixer\Config())
->setRules([
// Apply PSR-12 as per https://wiki.dolibarr.org/index.php?title=Langages_et_normes#PHP:~:text=utiliser%20est%20le-,PSR%2D12,-(https%3A//www
'@PSR12' => true, // Disabled for now to limit number of changes
// 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 compatiblity with this target for the moment.
// So we use target PHP70 for the moment.
'@PHP70Migration' => true,
//'@PHP71Migration' => true,
// Avoid adding public to const (incompatible with PHP 7.0):
'visibility_required' => ['elements'=>['property', 'method']],
//'strict_param' => true,
//'array_syntax' => ['syntax' => 'short'],
//'list_syntax' => false,
//'visibility_required' => false,
'array_syntax' => false,
'ternary_to_null_coalescing' => false
])
->setFinder($finder)
// TAB Indent violates PSR-12 "must" rule, but used in code
// (See https://www.php-fig.org/psr/psr-12/#24-indenting )
->setIndent("\t")
// All files MUST use the Unix LF line ending only
// https://www.php-fig.org/psr/psr-12/#22-files
->setLineEnding("\n")
;

View File

@@ -1,13 +0,0 @@
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="phpcs.xsd">
<!--
Documentation:
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset
-->
<rule ref="dev/setup/codesniffer/ruleset.xml"/>
<arg value="p"/>
<arg name="colors"/>
<arg name="extensions" value="php,inc" />
</ruleset>

View File

@@ -1,171 +0,0 @@
---
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:
- id: no-commit-to-branch
args: [--branch, develop, --pattern, \d+.0]
- id: check-yaml
args: [--unsafe]
- id: check-json
- id: mixed-line-ending
exclude: (?x)^(htdocs/includes/tecnickcom/tcpdf/fonts/.*)$
- id: trailing-whitespace
exclude_types: [markdown]
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-executables-have-shebangs
- 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 )$
- id: fix-byte-order-marker
- id: check-case-conflict
# Beautify shell scripts
- repo: https://github.com/lovesegfault/beautysh.git
rev: v6.2.1
hooks:
- id: beautysh
exclude: (?x)^(dev/setup/git/hooks/pre-commit)$
args: [--tab]
# Run local script
#
# For instance to update the license in edited files, you could add to local.sh:
#
# ```shell
# #!/bin/bash
# MYDIR=$(dirname "$0")
# CHANGED_INTERNALS=$(git diff --name-only | grep -v includes)
# "$MYDIR/dev/tools/updatelicense.php" $CHANGED_INTERNALS
# ```
- repo: local
hooks:
- 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
# Check PHP syntax
- repo: https://github.com/mdeweerd/pre-commit-php
rev: v1.6.5
hooks:
- id: php-cbf
files: \.(php)$
args: [--standard=dev/setup/codesniffer/ruleset.xml]
- id: php-cs
files: \.(php)$
args:
[
--standard=dev/setup/codesniffer/ruleset.xml,
--report=emacs,
--severity=5,
]
- alias: php-cs-with-cache
id: php-cs
# Configuration for ci - run on all files with cache
stages: [manual]
args:
[
--standard=dev/setup/codesniffer/ruleset.xml,
--report=emacs,
--severity=5,
--cache=.cache/pre-commit/dolibarr-php-cs.cache,
.,
]
pass_filenames: false # Run on all files
- id: php-lint
- id: php-stan
stages: [manual]
files: \.(php)$
# Prettier (format code, only for non common files)
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
stages: [manual]
exclude:
(?x)^( .*\.(phar |min\.css |lock) |htdocs/(includes|theme/common)/.*
)$
exclude_types:
- php
- executable
- binary
- shell
- javascript
- markdown
- html
- less
- plain-text
- scss
- css
- yaml
# Check format of yaml files
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.33.0
hooks:
- id: yamllint
args:
- --no-warnings
- -d
- "{extends: relaxed, rules: {line-length: {max: 120}}}"
# Execute codespell to fix typo errors (setup of codespell into dev/tools/codespell/)
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
# Due to a current limitation of configuration files,
# we can specify two dicts only on the CLI.
# You can update the contents of the exclude-file codespell-lines-ignore with the script
# dev/tools/codespell/addCodespellIgnores.sh
args:
- -D
- "-"
- -D
- dev/tools/codespell/codespell-dict.txt
- -I
- 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]
- alias: codespell-lang-en_US
# Only for translations with specialised exceptions
# -D contains predefined conversion dictionaries
# -L is to ignore some words
id: codespell
files: ^htdocs/langs/en_US/.*$
args:
- -D
- "-"
- -D
- dev/tools/codespell/codespell-dict.txt
- -L
- informations,medias,uptodate,reenable,crypted,developpers
- -L
- creat,unitl,alltime,datas,referers
- -I
- dev/tools/codespell/codespell-ignore.txt
- -x
- dev/tools/codespell/codespell-lines-ignore.txt
- --uri-ignore-words-list
- ned
# Check some shell scripts
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.6
hooks:
- id: shellcheck
args: [-W, "100"]

219
.scrutinizer.yml Normal file
View File

@@ -0,0 +1,219 @@
# .scrutinizer.yml
#build:
# - php-scrutinizer-run
build:
nodes:
analysis:
tests:
override:
- php-scrutinizer-run
imports:
- javascript
- php
filter:
excluded_paths:
- build/*
- dev/*
- doc/*
- test/*
- htdocs/includes/*
paths:
- htdocs/*
- scripts/*
tools:
# php_analyzer. Doc on https://scrutinizer-ci.com/docs/tools/php/php-analyzer/
php_analyzer:
enabled: true
extensions:
- php
dependency_paths:
- htdocs/includes/
filter:
excluded_paths:
- build/*
- dev/*
- doc/*
- test/*
- htdocs/includes/*
- htdocs/core/class/lessc.class.php
paths:
- htdocs/
- scripts/
config:
parameter_reference_check:
enabled: true
checkstyle:
enabled: false
no_trailing_whitespace: true
naming:
enabled: true
local_variable: ^[a-z][a-zA-Z0-9]*$
abstract_class_name: ^Abstract|Factory$
utility_class_name: Utils?$
constant_name: ^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$
property_name: ^[a-z][a-zA-Z0-9]*$
method_name: ^(?:[a-z]|__)[a-zA-Z0-9]*$
parameter_name: ^[a-z][a-zA-Z0-9]*$
interface_name: ^[A-Z][a-zA-Z0-9]*Interface$
type_name: ^[A-Z][a-zA-Z0-9]*$
exception_name: ^[A-Z][a-zA-Z0-9]*Exception$
isser_method_name: ^(?:is|has|should|may|supports)
unreachable_code:
enabled: true
check_access_control:
enabled: true
typo_checks:
enabled: true
check_variables:
enabled: true
check_calls:
enabled: true
too_many_arguments: true
missing_argument: true
argument_type_checks: lenient # Allowed Values: "disabled", "lenient", "strict"
suspicious_code:
enabled: true
overriding_parameter: false
overriding_closure_use: true
parameter_closure_use_conflict: true
parameter_multiple_times: true
non_existent_class_in_instanceof_check: true
non_existent_class_in_catch_clause: true
assignment_of_null_return: true
non_commented_switch_fallthrough: true
non_commented_empty_catch_block: true
overriding_private_members: true
use_statement_alias_conflict: true
precedence_in_condition_assignment: true
dead_assignments:
enabled: true
verify_php_doc_comments:
enabled: false
parameters: true
return: true
suggest_more_specific_types: true
ask_for_return_if_not_inferrable: true
ask_for_param_type_annotation: true
loops_must_use_braces:
enabled: true
check_usage_context:
enabled: true
simplify_boolean_return:
enabled: false
phpunit_checks:
enabled: false
reflection_checks:
enabled: true
# Checks Common Precedence Mistakes
precedence_checks:
enabled: true
assignment_in_condition: true
comparison_of_bit_result: true
basic_semantic_checks:
enabled: true
# Disabled unused code. In most cases, we want to keep it.
unused_code:
enabled: false
deprecation_checks:
enabled: true
useless_function_calls:
enabled: true
metrics_lack_of_cohesion_methods:
enabled: true
metrics_coupling:
enabled: true
stable_code:
namespace_prefixes: []
classes: []
doctrine_parameter_binding:
enabled: false
doctrine_entity_manager_injection:
enabled: false
symfony_request_injection:
enabled: false
doc_comment_fixes:
enabled: true
reflection_fixes:
enabled: false
use_statement_fixes:
enabled: true
remove_unused: true
# Whether you would like multiple imports in one USE statement to be preserved, e.g. ``use A, B;``.
preserve_multiple: false
# Whether you would like to preserve blank lines between use statements.
preserve_blanklines: false
order_alphabetically: false
# To use specific config for a specific path, use path_configs: (see example on page https://scrutinizer-ci.com/docs/configuration/tool_config_structure)
# php_depend
php_pdepend:
enabled: false
configuration_file: null
suffixes:
- php
excluded_dirs: { }
filter:
excluded_paths:
- 'build/*'
- 'dev/*'
- 'doc/*'
- 'test/*'
- 'htdocs/includes/*'
paths: { }
# change tracking
php_changetracking:
enabled: false
bug_patterns:
- '\bfix(?:es|ed)?\b'
feature_patterns:
- '\badd(?:s|ed)?\b'
- '\bimplement(?:s|ed)?\b'
filter:
excluded_paths:
- 'build/*'
- 'dev/*'
- 'doc/*'
- 'test/*'
- 'htdocs/includes/*'
paths: { }
# Similar code detection
php_sim:
enabled: false
min_mass: 30
filter:
excluded_paths:
- 'build/*'
- 'dev/*'
- 'doc/*'
- 'test/*'
- 'htdocs/includes/*'
paths: { }
# Coding-Style / Bug Detection
js_hint:
enabled: false
use_native_config: true
extensions:
- js
filter:
excluded_paths:
- 'build/*'
- 'dev/*'
- 'doc/*'
- 'test/*'
- 'htdocs/includes/*'
paths: { }
config: { }
path_configs: { }
before_commands: { }
after_commands: { }
artifacts: { }
build_failure_conditions: { }

14
.stickler.yml Normal file
View File

@@ -0,0 +1,14 @@
---
linters:
phpcs:
standard: 'dev/setup/codesniffer/ruleset.xml'
extensions: 'php'
tab_width: 4
fixer: true
fixers:
enable: true
files:
ignore:
- 'htdocs/includes/*'

View File

@@ -1,57 +1,55 @@
# This script is used by Travis CI to run automatically Continuous test integration # This script is used by Travis CI to run automatically Continuous test integration
# from Dolibarr GitHub repository. # from Dolibarr GitHub repository.
# For syntax, see https://docs.travis-ci.com/user/languages/php/ # For syntax, see http://about.travis-ci.org/docs/user/languages/php/
# We use dist: bionic = 18.04, focal = 20.04 # We use dist: xenial to have php 5.6+ available
os: linux os: linux
dist: focal dist: xenial
#dist: bionic
language: generic language: php
#scan_logs: false
git:
depth: 1
# Start on every boot # Start on every boot
services: services:
- memcached - memcached
#- mysql - mysql
- postgresql - postgresql
addons: addons:
mariadb: '10.5' # Force postgresql to 9.4 (the oldest availablable on xenial)
postgresql: '9.4'
apt:
sources:
# To use the last version of pgloader, we add repo of postgresql with a name available in http://apt.postgresql.org/pub/repos/apt/
- pgdg-xenial
packages:
# We need a webserver to test the webservices
# Let's install Apache with.
- apache2
# mod_php is not supported by Travis. Add fcgi. We install FPM later on.
- libapache2-mod-fastcgi
# We need pgloader for import mysql database into pgsql
- pgloader
env: env:
global: global:
# Set to true for very verbose output # Set to true for very verbose output
- DEBUG=true - DEBUG=false
jobs: jobs:
fast_finish: true fast_finish: true
allow_failures: allow_failures:
- php: '8.3' - php: nightly
include: include:
- stage: PHP min and max - if: type = push
if: type = push php: '5.6'
php: '7.1' env: DB=postgresql
env: - if: type = pull_request OR type = push
- DB=postgresql php: '7.4'
- TRAVIS_PHP_VERSION=7.1 env: DB=mysql
- stage: PHP min and max - if: type = push AND branch = develop
if: type = pull_request OR type = push php: nightly
php: '8.2' env: DB=mysql
env:
- DB=mysql
- TRAVIS_PHP_VERSION=8.2
- stage: PHP 8.3
if: type = push AND branch = develop
php: '8.3'
env:
- DB=mysql
- TRAVIS_PHP_VERSION=8.3
notifications: notifications:
email: email:
@@ -64,119 +62,61 @@ notifications:
on_failure: always on_failure: always
use_notice: true use_notice: true
before_install: before_install:
- | - |
echo "Remove awful phpenv and install packages" echo "Disabling Xdebug for composer"
sudo rm -fr ~/.phpenv export PHP_VERSION_NAME=$(phpenv version-name)
sudo rm -fr /root/.phpenv cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/conf.d/xdebug.ini /tmp/xdebug.ini
sudo add-apt-repository -y ppa:ondrej/php phpenv config-rm xdebug.ini
sudo apt-get update echo
echo TRAVIS_PHP_VERSION=$TRAVIS_PHP_VERSION
- | - |
echo Install packages for PHP
sudo apt-get install -y pgloader memcached
if [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then
sudo apt install unzip apache2 php7.1 php7.1-cli php7.1-curl php7.1-mysql php7.1-pgsql php7.1-gd php7.1-imap php7.1-intl php7.1-ldap php7.1-xml php7.1-mbstring php7.1-xml php7.1-zip libapache2-mod-php7.1
fi
if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then
sudo apt install unzip apache2 php8.1 php8.1-cli php8.1-curl php8.1-mysql php8.1-pgsql php8.1-gd php8.1-imap php8.1-intl php8.1-ldap php8.1-xml php8.1-mbstring php8.1-xml php8.1-zip libapache2-mod-php8.1
fi
if [ "$TRAVIS_PHP_VERSION" = '8.2' ]; then
sudo apt install unzip apache2 php8.2 php8.2-cli php8.2-curl php8.2-mysql php8.2-pgsql php8.2-gd php8.2-imap php8.2-intl php8.2-ldap php8.2-xml php8.2-mbstring php8.2-xml php8.2-zip libapache2-mod-php8.2
fi
if [ "$TRAVIS_PHP_VERSION" = '8.3' ]; then
sudo apt install unzip apache2 php8.3 php8.3-cli php8.3-curl php8.3-mysql php8.3-pgsql php8.3-gd php8.3-imap php8.3-intl php8.3-ldap php8.3-xml php8.3-mbstring php8.3-xml php8.3-zip libapache2-mod-php8.3
fi
- |
echo Install pgsql if run is for pgsql
if [ "$DB" = 'postgresql' ]; then if [ "$DB" = 'postgresql' ]; then
echo "Check pgloader version" echo "Check pgloader version"
pgloader --version pgloader --version
#ps fauxww | grep postgres echo
ls /etc/postgresql/13/main/
sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/13/main/pg_hba.conf
sudo cat /etc/postgresql/13/main/pg_hba.conf
sudo service postgresql restart
psql postgresql://postgres:postgres@127.0.0.1:5432 -l -A
psql postgresql://postgres:postgres@127.0.0.1:5432 -c 'create database travis;'
psql postgresql://postgres:postgres@127.0.0.1:5432 -c "CREATE USER travis WITH ENCRYPTED PASSWORD 'travis';"
psql postgresql://postgres:postgres@127.0.0.1:5432 -c 'GRANT ALL PRIVILEGES ON DATABASE travis TO travis;'
psql postgresql://postgres:postgres@127.0.0.1:5432 -l -A
fi fi
install: install:
- | - |
if [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then echo "Updating Composer"
sudo update-alternatives --set php /usr/bin/php7.1 rm $TRAVIS_BUILD_DIR/composer.json
fi rm $TRAVIS_BUILD_DIR/composer.lock
if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then
sudo update-alternatives --set php /usr/bin/php8.1
fi
if [ "$TRAVIS_PHP_VERSION" = '8.2' ]; then
sudo update-alternatives --set php /usr/bin/php8.2
fi
php -i | head -
- |
echo "Updating Composer config"
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
HASH=`curl -sS https://composer.github.io/installer.sig`
echo $HASH
php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
sudo chmod -R a+rwx /usr/local/bin/composer
#sudo apt install composer
composer -V composer -V
composer self-update
composer -n init
composer -n config vendor-dir htdocs/includes
composer -n config -g vendor-dir htdocs/includes composer -n config -g vendor-dir htdocs/includes
echo echo
- | - |
echo "Update Composer version and Install tools - PHP Unit, Parallel Lint, PHP CodeSniffer, PHP Vardump check - for $TRAVIS_PHP_VERSION" echo "Installing Composer dependencies (PHP Unit, Parallel Lint & PHP CodeSniffer"
echo "(composer version 2.5 is bugged and generate phpunit error Exception: Serialization of 'Closure' is not allowed)" if [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then
if [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then composer -n require phpunit/phpunit ^4 \
sudo composer self-update 2.2.18 jakub-onderka/php-parallel-lint ^0 \
composer -n require phpunit/phpunit ^7.5 \ jakub-onderka/php-console-highlighter ^0 \
php-parallel-lint/php-parallel-lint ^1 \
php-parallel-lint/php-console-highlighter ^0 \
php-parallel-lint/php-var-dump-check ~0.4 \
squizlabs/php_codesniffer ^3 squizlabs/php_codesniffer ^3
fi fi
if [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ]; then if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] \
sudo composer self-update 2.2.18 [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ]; then
composer -n require phpunit/phpunit ^7.5 \ composer -n require phpunit/phpunit ^5 \
php-parallel-lint/php-parallel-lint ^1.2 \ jakub-onderka/php-parallel-lint ^0 \
php-parallel-lint/php-console-highlighter ^0 \ jakub-onderka/php-console-highlighter ^0 \
php-parallel-lint/php-var-dump-check ~0.4 \
squizlabs/php_codesniffer ^3 squizlabs/php_codesniffer ^3
fi fi
# phpunit 9 is required for php 8 if [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
if [ "$TRAVIS_PHP_VERSION" = '8.0' ] || [ "$TRAVIS_PHP_VERSION" = '8.1' ] || [ "$TRAVIS_PHP_VERSION" = '8.2' ] || [ "$TRAVIS_PHP_VERSION" = '8.3' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then composer -n require --ignore-platform-reqs phpunit/phpunit ^5 \
sudo composer self-update 2.4.4 jakub-onderka/php-parallel-lint ^0 \
composer -n require --ignore-platform-reqs phpunit/phpunit ^8 \ jakub-onderka/php-console-highlighter ^0 \
php-parallel-lint/php-parallel-lint ^1.2 \
php-parallel-lint/php-console-highlighter ^0 \
php-parallel-lint/php-var-dump-check ~0.4 \
squizlabs/php_codesniffer ^3 squizlabs/php_codesniffer ^3
fi fi
# Remove non expected files
rm -fr /home/travis/build/Dolibarr/dolibarr/htdocs/includes/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js
echo echo
- | - |
echo "Adding path of binaries tools installed by composer to the PATH" echo "Adding path of binaries tools installed by composer to the PATH"
export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH" export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH"
echo $PATH echo $PATH
ls $TRAVIS_BUILD_DIR/htdocs/includes ls $TRAVIS_BUILD_DIR/vendor
ls $TRAVIS_BUILD_DIR/htdocs/includes/bin ls $TRAVIS_BUILD_DIR/htdocs/includes/bin
echo echo
@@ -184,11 +124,24 @@ install:
before_script: before_script:
- | - |
echo Start before_script echo Start travis
echo Current dir is `pwd` echo Current dir is `pwd`
echo Home dir is `echo ~` echo Home dir is `echo ~`
echo TRAVIS_BUILD_DIR is $TRAVIS_BUILD_DIR echo TRAVIS_BUILD_DIR is $TRAVIS_BUILD_DIR
- |
echo "Re-enabling Xdebug for PHP CodeSniffer and PHP Unit"
phpenv config-add /tmp/xdebug.ini
echo
- |
echo "Setting up PHP"
echo
echo "Set timezone"
echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
phpenv rehash
echo
- | - |
echo "Versions information" echo "Versions information"
echo echo
@@ -204,10 +157,6 @@ before_script:
which phpcs which phpcs
phpcs --version | head - phpcs --version | head -
phpcs -i | head - phpcs -i | head -
# Check PHP Vardump check version
echo "PHP Vardump check version"
which var_dump_check
var_dump_check --version
# Check PHPUnit version # Check PHPUnit version
echo "PHPUnit version" echo "PHPUnit version"
which phpunit which phpunit
@@ -218,76 +167,49 @@ before_script:
# Check Database # Check Database
echo "Database version" echo "Database version"
mysql --version | head - mysql --version | head -
mysql -e "SELECT VERSION();" | head -
psql --version psql --version
echo
- | - |
echo "Setting up database" echo "Setting up database"
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then
echo "MySQL stop" echo "MySQL"
sudo systemctl stop mariadb.service mysql -u root -e 'DROP DATABASE IF EXISTS travis;'
echo "MySQL restart without pass" mysql -u root -e 'CREATE DATABASE IF NOT EXISTS travis;'
#sudo mysqld_safe --skip-grant-tables --socket=/tmp/aaa mysql -u root -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
sudo mysqld_safe --skip-grant-tables --socket=/tmp/aaa & mysql -u root -e 'FLUSH PRIVILEGES;'
sleep 3 mysql -u root -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
sudo ps fauxww
echo "MySQL set root password"
sudo mysql -u root -h 127.0.0.1 -e "FLUSH PRIVILEGES; CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8'; ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'; CREATE USER 'root'@'127.0.0.1' IDENTIFIED BY 'password'; CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON travis.* TO root@127.0.0.1; GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1; FLUSH PRIVILEGES;"
echo "MySQL grant"
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'FLUSH PRIVILEGES; GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1; FLUSH PRIVILEGES;'
echo "MySQL list current users"
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'use mysql; select * from user;'
echo "List pid file"
sudo mysql -u root -h 127.0.0.1 -ppassword -e "show variables like '%pid%';"
#sudo kill `cat /var/lib/mysqld/mysqld.pid`
#sudo systemctl start mariadb
echo "MySQL grant"
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
echo "MySQL flush"
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'FLUSH PRIVILEGES;'
echo "MySQL load sql"
sudo mysql -u root -h 127.0.0.1 -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
fi fi
if [ "$DB" = 'postgresql' ]; then if [ "$DB" = 'postgresql' ]; then
echo "PGSQL" #psql -c 'create database travis;' -U postgres
sudo mkdir -p /tmp/pgloader #psql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
sudo chmod -R a+rwx /tmp/pgloader/ #pgloader mysql://root:pass@127.0.0.1/dolibarr_src postgresql://dolibarrowner:dolibarrownerpass@127.0.0.1/dolibarr_dest
sudo pgloader 'mysql://root:password@127.0.0.1/travis' 'postgresql://postgres:postgres@127.0.0.1:5432/travis' echo pgloader mysql://root@127.0.0.1/travis postgresql://postgres@/travis
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis' pgloader mysql://root@127.0.0.1/travis postgresql://postgres@/travis
echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis' echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql -U postgres travis
echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql -U postgres travis
#echo '\d llx_adherent' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
#echo '\d llx_c_country' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
# Create pgsql compatibility functions
psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis' < htdocs/install/pgsql/functions/functions.sql
fi fi
echo echo
- | - |
export CONF_FILE=htdocs/conf/conf.php export CONF_FILE=htdocs/conf/conf.php
echo "Setting up Dolibarr '$CONF_FILE'" echo "Setting up Dolibarr $CONF_FILE"
echo '<?php' > $CONF_FILE echo '<?php' > $CONF_FILE
echo 'error_reporting(E_ALL);' >> $CONF_FILE
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE
echo '$'dolibarr_main_document_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $CONF_FILE echo '$'dolibarr_main_document_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $CONF_FILE
echo '$'dolibarr_main_data_root=\'$TRAVIS_BUILD_DIR/documents\'';' >> $CONF_FILE echo '$'dolibarr_main_data_root=\'$TRAVIS_BUILD_DIR/documents\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_user=\'travis\'';' >> $CONF_FILE
echo '$'dolibarr_main_instance_unique_id=\'travis1234567890\'';' >> $CONF_FILE echo '$'dolibarr_main_instance_unique_id=\'travis1234567890\'';' >> $CONF_FILE
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_port=3306';' >> $CONF_FILE echo '$'dolibarr_main_db_port=\'3306\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_user=\'root\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_pass=\'password\'';' >> $CONF_FILE
fi fi
if [ "$DB" = 'postgresql' ]; then if [ "$DB" = 'postgresql' ]; then
echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_port=5432';' >> $CONF_FILE echo '$'dolibarr_main_db_port=\'5432\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_user=\'postgres\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_pass=\'postgres\'';' >> $CONF_FILE
fi fi
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
cat $CONF_FILE cat $CONF_FILE
@@ -295,132 +217,133 @@ before_script:
- | - |
echo "Create documents directory and set permissions" echo "Create documents directory and set permissions"
# Add admin/temp subdirectory needed for unit tests # and admin/temp subdirectory needed for unit tests
mkdir -p $TRAVIS_BUILD_DIR/documents/admin/temp mkdir -p $TRAVIS_BUILD_DIR/documents/admin/temp
sudo chmod -R a+rwx $TRAVIS_BUILD_DIR/documents sudo chmod -R a+rwx $TRAVIS_BUILD_DIR/documents
echo "***** First line of dolibarr.log" > $TRAVIS_BUILD_DIR/documents/dolibarr.log echo "***** First line of dolibarr.log" > $TRAVIS_BUILD_DIR/documents/dolibarr.log
echo echo
- echo "Setting up Apache + FPM"
# enable php-fpm
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- | - |
echo "Setting up Apache" if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars # Copy the included pool
sudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/000-default.conf sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf fi
sudo cat /etc/apache2/sites-available/000-default.conf - sudo a2enmod rewrite actions fastcgi alias
sudo service apache2 restart - echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
- sudo chown -R travis:travis /var/lib/apache2/fastcgi
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
# configure apache virtual hosts
- sudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/000-default.conf
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
- sudo cat /etc/apache2/sites-available/000-default.conf
- sudo service apache2 restart
script: script:
- | - |
echo "Checking webserver availability by a wget -O - --debug http://127.0.0.1" echo "Checking webserver availability by a wget -O - http://127.0.0.1"
# Ensure we stop on error with set -e # Ensure we stop on error with set -e
set +e set +e
# The wget should return a page with line '<meta name="generator" content="Dolibarr installer"> # The wget should return a page with line '<meta name="generator" content="Dolibarr installer">
wget -O - --debug http://127.0.0.1 > test.html wget -O - http://127.0.0.1 > test.html
head -n 200 test.html head test.html
sudo cat /var/log/apache2/travis_error_log sudo cat /var/log/apache2/travis_error_log
set +e set +e
echo echo
- | - |
echo "Checking PHP syntax errors (only 1 version to not overload travis and avoid duplicate tests)" echo "Checking PHP syntax errors"
# Ensure we catch errors # Ensure we catch errors
set -e set -e
# Exclusions are defined in the ruleset.xml file #parallel-lint --exclude htdocs/includes --blame .
if [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/webmozart --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/ --exclude htdocs/includes/composer/autoload_static.php --blame .
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
fi
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
fi
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
fi
set +e set +e
echo echo
- | - |
echo "Checking coding style (only for 1 version to not overload travis and avoid duplicate tests)" echo "Checking coding style (excluding Pull Requests builds to not overload travis, excluding also some jobs to avoid duplicate tests)"
# Ensure we catch errors # Ensure we catch errors
set -e set -e
# Exclusions are defined in the ruleset.xml file # Exclusions are defined in the ruleset.xml file
#if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4" ] && [ "$DB" = "mysql" ]; 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 --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 --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 --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 fi
set +e set +e
echo echo
- | - |
echo "Checking missing debug (only for 1 version to not overload travis and avoid duplicate tests)"
# Ensure we catch errors
set -e
# 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
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
fi
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
fi
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
fi
set +e
echo
- |
export INSTALL_FORCED_FILE=htdocs/install/install.forced.php export INSTALL_FORCED_FILE=htdocs/install/install.forced.php
echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation" echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation"
# Ensure we catch errors # Ensure we catch errors
set +e set +e
echo '<?php ' > $INSTALL_FORCED_FILE echo '<?php ' > $INSTALL_FORCED_FILE
echo 'error_reporting(E_ALL);' >> $INSTALL_FORCED_FILE
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_port=3306';' >> $INSTALL_FORCED_FILE
fi fi
if [ "$DB" = 'postgresql' ]; then if [ "$DB" = 'postgresql' ]; then
echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_port=5432';' >> $INSTALL_FORCED_FILE
fi fi
echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_databaselogin=\'travis\'';' >> $INSTALL_FORCED_FILE echo '$'force_install_databaselogin=\'travis\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_databasepass=\'\'';' >> $INSTALL_FORCED_FILE echo '$'force_install_databasepass=\'\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_port=\'5432\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE
echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE
echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE
#cat $INSTALL_FORCED_FILE #cat $INSTALL_FORCED_FILE
#- |
# echo "Installing Dolibarr"
# cd htdocs/install
# php step1.php $TRAVIS_BUILD_DIR/htdocs > $TRAVIS_BUILD_DIR/install.log
# php step2.php set >> $TRAVIS_BUILD_DIR/install.log
# if [ "$?" -ne "0" ]; then
# echo "SORRY, AN ERROR OCCURED DURING INSTALLATION PROCESS"
# cat $TRAVIS_BUILD_DIR/install.log
# exit 1
# fi
# cd ../..
# rm $INSTALL_FORCED_FILE
# #cat $TRAVIS_BUILD_DIR/install.log
# set +e
# echo
- |
echo "Setting up database to test migrations"
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then
echo "MySQL"
mysql -e 'DROP DATABASE IF EXISTS travis;'
mysql -e 'CREATE DATABASE IF NOT EXISTS travis;'
mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
mysql -e 'FLUSH PRIVILEGES;'
mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
fi
if [ "$DB" = 'postgresql' ]; then
#pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
#pgloader mysql://root:pass@127.0.0.1/base postgresql://dolibarrowner@127.0.0.1/dolibarr
echo pgloader mysql://root@127.0.0.1/travis postgresql:///travis
pgloader mysql://root@127.0.0.1/travis postgresql:///travis
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql travis
echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql travis
#echo 'select * from INFORMATION_SCHEMA.COLUMNS where table_name = 'llx_accountingaccount' | psql travis
#echo 'select * from information_schema.table_constraints;' | psql travis
#echo 'ALTER TABLE "llx_accounting_account" DROP CONSTRAINT "idx_16390_primary"' | psql travis
fi
echo echo
- | - |
echo "Upgrading Dolibarr" echo "Upgrading Dolibarr"
# Ensure we catch errors with -e. Set this to +e if you want to go to the end to see log files. # Ensure we catch errors. Set this to +e if you want to go to the end to see log files.
# Note: We keep +e because with pgsql, one of upgrade process fails even if migration seems ok, so
# I disable stop on error to be able to continue.
set +e set +e
cd htdocs/install cd htdocs/install
php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log
@@ -462,104 +385,56 @@ script:
php upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log php upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log
php upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log php upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log
php step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log php step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log
php upgrade.php 12.0.0 13.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade12001300.log
php upgrade2.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-2.log
php step5.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-3.log
php upgrade.php 13.0.0 14.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade13001400.log
php upgrade2.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-2.log
php step5.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-3.log
php upgrade.php 14.0.0 15.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade14001500.log
php upgrade2.php 14.0.0 15.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-2.log
php step5.php 14.0.0 15.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-3.log
php upgrade.php 15.0.0 16.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade15001600.log
php upgrade2.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-2.log
php step5.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-3.log
php upgrade.php 16.0.0 17.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade16001700.log
php upgrade2.php 16.0.0 17.0.0 > $TRAVIS_BUILD_DIR/upgrade16001700-2.log
php step5.php 16.0.0 17.0.0 > $TRAVIS_BUILD_DIR/upgrade16001700-3.log
php upgrade.php 17.0.0 18.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade17001800.log
php upgrade2.php 17.0.0 18.0.0 > $TRAVIS_BUILD_DIR/upgrade17001800-2.log
php step5.php 17.0.0 18.0.0 > $TRAVIS_BUILD_DIR/upgrade17001800-3.log
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
set +e
echo
- |
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
echo
- |
echo Result of migration scripts
ls -alrt $TRAVIS_BUILD_DIR/
echo Show content of last file
cat $TRAVIS_BUILD_DIR/"$(ls -rt $TRAVIS_BUILD_DIR/ | tail -n1)"
- |
echo "Enabling new modules"
# Enable modules not enabled into original dump # Enable modules not enabled into original dump
set -e php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKETSUP,MAIN_MODULE_ACCOUNTING > $TRAVIS_BUILD_DIR/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_ProductBatch,MAIN_MODULE_SupplierProposal,MAIN_MODULE_STRIPE,MAIN_MODULE_ExpenseReport > $TRAVIS_BUILD_DIR/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP >> $TRAVIS_BUILD_DIR/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT >> $TRAVIS_BUILD_DIR/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_KnowledgeManagement,MAIN_MODULE_EventOrganization,MAIN_MODULE_PARTNERSHIP >> $TRAVIS_BUILD_DIR/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_EmailCollector >> $TRAVIS_BUILD_DIR/enablemodule.log
echo $? echo $?
cd - cd -
set +e set +e
echo echo
#cat /tmp/dolibarr_install.log #cat /tmp/dolibarr_install.log
cat $TRAVIS_BUILD_DIR/enablemodule.log cat $TRAVIS_BUILD_DIR/enablemodule.log
echo
- | - |
echo "Unit testing" echo "Unit testing"
# 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. # Ensure we catch errors. Set this to +e if you want to go to the end to see dolibarr.log file.
set -e set -e
phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php
phpunitresult=$? phpunitresult=$?
echo "Phpunit return code = $phpunitresult" echo "Phpunit return code = $phpunitresult"
set +e set +e
echo
after_script: after_script:
- | - |
echo "After script - Output last lines of dolibarr.log" echo "After script - Output last lines of dolibarr.log"
ls $TRAVIS_BUILD_DIR/documents ls $TRAVIS_BUILD_DIR/documents
#cat $TRAVIS_BUILD_DIR/documents/dolibarr.log #cat $TRAVIS_BUILD_DIR/documents/dolibarr.log
sudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log sudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
echo "After script - Output last lines of apache error.log"
sudo ls /var/log/apache2
sudo tail -n 200 /var/log/apache2/travis_error_log
after_success: after_success:
- | - |
echo Success echo Success
after_failure: after_failure:
- | - |
echo Failure detected, so we show samples of log to help diagnose echo Failure detected, so we show samples of log to help diagnose
# This part of code is executed only if the command that fails are enclosed with set +e # This part of code is executed only if previous command that fails are enclosed with set +e
# Show upgrade log files # Upgrade log files
#for ficlog in `ls $TRAVIS_BUILD_DIR/*.log` for ficlog in `ls $TRAVIS_BUILD_DIR/*.log`
#do do
#echo "Debugging informations for file $ficlog" echo "Debugging informations for file $ficlog"
#cat $ficlog #cat $ficlog
#done done
# Show Apache log file # Apache log file
echo "Debugging informations for file apache error.log" echo "Debugging informations for file apache error.log"
sudo tail -n 200 /var/log/apache2/travis_error_log sudo cat /var/log/apache2/travis_error_log
if [ "$DEBUG" = true ]; then if [ "$DEBUG" = true ]; then
# Dolibarr log file # Dolibarr log file
echo "Debugging informations 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 tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
# Database log file # Database log file
echo "Debugging informations for file mysql error.log" echo "Debugging informations for file mysql error.log"
sudo tail -n 200 /var/log/mysql/error.log sudo tail -n 50 /var/log/mysql/error.log
# TODO: PostgreSQL log file # TODO: PostgreSQL log file
echo echo
fi fi

View File

@@ -2,433 +2,415 @@
host = https://www.transifex.com host = https://www.transifex.com
lang_map = uz: uz_UZ, sw: sw_SW, sr@latin: sr_RS lang_map = uz: uz_UZ, sw: sw_SW, sr@latin: sr_RS
[o:dolibarr-association:p:dolibarr:r:accountancy] [dolibarr.accountancy]
file_filter = htdocs/langs/<lang>/accountancy.lang file_filter = htdocs/langs/<lang>/accountancy.lang
source_file = htdocs/langs/en_US/accountancy.lang source_file = htdocs/langs/en_US/accountancy.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:admin] [dolibarr.admin]
file_filter = htdocs/langs/<lang>/admin.lang file_filter = htdocs/langs/<lang>/admin.lang
source_file = htdocs/langs/en_US/admin.lang source_file = htdocs/langs/en_US/admin.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:agenda] [dolibarr.agenda]
file_filter = htdocs/langs/<lang>/agenda.lang file_filter = htdocs/langs/<lang>/agenda.lang
source_file = htdocs/langs/en_US/agenda.lang source_file = htdocs/langs/en_US/agenda.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:assets] [dolibarr.assets]
file_filter = htdocs/langs/<lang>/assets.lang file_filter = htdocs/langs/<lang>/assets.lang
source_file = htdocs/langs/en_US/assets.lang source_file = htdocs/langs/en_US/assets.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:banks] [dolibarr.banks]
file_filter = htdocs/langs/<lang>/banks.lang file_filter = htdocs/langs/<lang>/banks.lang
source_file = htdocs/langs/en_US/banks.lang source_file = htdocs/langs/en_US/banks.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:bills] [dolibarr.bills]
file_filter = htdocs/langs/<lang>/bills.lang file_filter = htdocs/langs/<lang>/bills.lang
source_file = htdocs/langs/en_US/bills.lang source_file = htdocs/langs/en_US/bills.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:blockedlog] [dolibarr.blockedlog]
file_filter = htdocs/langs/<lang>/blockedlog.lang file_filter = htdocs/langs/<lang>/blockedlog.lang
source_file = htdocs/langs/en_US/blockedlog.lang source_file = htdocs/langs/en_US/blockedlog.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:bookmarks] [dolibarr.bookmarks]
file_filter = htdocs/langs/<lang>/bookmarks.lang file_filter = htdocs/langs/<lang>/bookmarks.lang
source_file = htdocs/langs/en_US/bookmarks.lang source_file = htdocs/langs/en_US/bookmarks.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:boxes] [dolibarr.boxes]
file_filter = htdocs/langs/<lang>/boxes.lang file_filter = htdocs/langs/<lang>/boxes.lang
source_file = htdocs/langs/en_US/boxes.lang source_file = htdocs/langs/en_US/boxes.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:cashdesk] [dolibarr.cashdesk]
file_filter = htdocs/langs/<lang>/cashdesk.lang file_filter = htdocs/langs/<lang>/cashdesk.lang
source_file = htdocs/langs/en_US/cashdesk.lang source_file = htdocs/langs/en_US/cashdesk.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:categories] [dolibarr.categories]
file_filter = htdocs/langs/<lang>/categories.lang file_filter = htdocs/langs/<lang>/categories.lang
source_file = htdocs/langs/en_US/categories.lang source_file = htdocs/langs/en_US/categories.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:commercial] [dolibarr.commercial]
file_filter = htdocs/langs/<lang>/commercial.lang file_filter = htdocs/langs/<lang>/commercial.lang
source_file = htdocs/langs/en_US/commercial.lang source_file = htdocs/langs/en_US/commercial.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:companies] [dolibarr.companies]
file_filter = htdocs/langs/<lang>/companies.lang file_filter = htdocs/langs/<lang>/companies.lang
source_file = htdocs/langs/en_US/companies.lang source_file = htdocs/langs/en_US/companies.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:compta] [dolibarr.compta]
file_filter = htdocs/langs/<lang>/compta.lang file_filter = htdocs/langs/<lang>/compta.lang
source_file = htdocs/langs/en_US/compta.lang source_file = htdocs/langs/en_US/compta.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:contracts] [dolibarr.contracts]
file_filter = htdocs/langs/<lang>/contracts.lang file_filter = htdocs/langs/<lang>/contracts.lang
source_file = htdocs/langs/en_US/contracts.lang source_file = htdocs/langs/en_US/contracts.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:cron] [dolibarr.cron]
file_filter = htdocs/langs/<lang>/cron.lang file_filter = htdocs/langs/<lang>/cron.lang
source_file = htdocs/langs/en_US/cron.lang source_file = htdocs/langs/en_US/cron.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:datapolicy] [dolibarr.deliveries]
file_filter = htdocs/langs/<lang>/datapolicy.lang
source_file = htdocs/langs/en_US/datapolicy.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:deliveries]
file_filter = htdocs/langs/<lang>/deliveries.lang file_filter = htdocs/langs/<lang>/deliveries.lang
source_file = htdocs/langs/en_US/deliveries.lang source_file = htdocs/langs/en_US/deliveries.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:dict] [dolibarr.dict]
file_filter = htdocs/langs/<lang>/dict.lang file_filter = htdocs/langs/<lang>/dict.lang
source_file = htdocs/langs/en_US/dict.lang source_file = htdocs/langs/en_US/dict.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:donations] [dolibarr.donations]
file_filter = htdocs/langs/<lang>/donations.lang file_filter = htdocs/langs/<lang>/donations.lang
source_file = htdocs/langs/en_US/donations.lang source_file = htdocs/langs/en_US/donations.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:ecm] [dolibarr.ecm]
file_filter = htdocs/langs/<lang>/ecm.lang file_filter = htdocs/langs/<lang>/ecm.lang
source_file = htdocs/langs/en_US/ecm.lang source_file = htdocs/langs/en_US/ecm.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:errors] [dolibarr.errors]
file_filter = htdocs/langs/<lang>/errors.lang file_filter = htdocs/langs/<lang>/errors.lang
source_file = htdocs/langs/en_US/errors.lang source_file = htdocs/langs/en_US/errors.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:eventorganization] [dolibarr.exports]
file_filter = htdocs/langs/<lang>/eventorganization.lang
source_file = htdocs/langs/en_US/eventorganization.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:exports]
file_filter = htdocs/langs/<lang>/exports.lang file_filter = htdocs/langs/<lang>/exports.lang
source_file = htdocs/langs/en_US/exports.lang source_file = htdocs/langs/en_US/exports.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:help] [dolibarr.externalsite]
file_filter = htdocs/langs/<lang>/externalsite.lang
source_file = htdocs/langs/en_US/externalsite.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.ftp]
file_filter = htdocs/langs/<lang>/ftp.lang
source_file = htdocs/langs/en_US/ftp.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.help]
file_filter = htdocs/langs/<lang>/help.lang file_filter = htdocs/langs/<lang>/help.lang
source_file = htdocs/langs/en_US/help.lang source_file = htdocs/langs/en_US/help.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:holiday] [dolibarr.holiday]
file_filter = htdocs/langs/<lang>/holiday.lang file_filter = htdocs/langs/<lang>/holiday.lang
source_file = htdocs/langs/en_US/holiday.lang source_file = htdocs/langs/en_US/holiday.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:hrm] [dolibarr.hrm]
file_filter = htdocs/langs/<lang>/hrm.lang file_filter = htdocs/langs/<lang>/hrm.lang
source_file = htdocs/langs/en_US/hrm.lang source_file = htdocs/langs/en_US/hrm.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:install] [dolibarr.install]
file_filter = htdocs/langs/<lang>/install.lang file_filter = htdocs/langs/<lang>/install.lang
source_file = htdocs/langs/en_US/install.lang source_file = htdocs/langs/en_US/install.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:interventions] [dolibarr.interventions]
file_filter = htdocs/langs/<lang>/interventions.lang file_filter = htdocs/langs/<lang>/interventions.lang
source_file = htdocs/langs/en_US/interventions.lang source_file = htdocs/langs/en_US/interventions.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:intracommreport] [dolibarr.languages-not-res]
file_filter = htdocs/langs/<lang>/intracommreport.lang
source_file = htdocs/langs/en_US/intracommreport.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:knowledgemanagement]
file_filter = htdocs/langs/<lang>/knowledgemanagement.lang
source_file = htdocs/langs/en_US/knowledgemanagement.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:languages-not-res]
file_filter = htdocs/langs/<lang>/languages.lang file_filter = htdocs/langs/<lang>/languages.lang
source_file = htdocs/langs/en_US/languages.lang source_file = htdocs/langs/en_US/languages.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:ldap] [dolibarr.ldap]
file_filter = htdocs/langs/<lang>/ldap.lang file_filter = htdocs/langs/<lang>/ldap.lang
source_file = htdocs/langs/en_US/ldap.lang source_file = htdocs/langs/en_US/ldap.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:loan] [dolibarr.link]
file_filter = htdocs/langs/<lang>/link.lang
source_file = htdocs/langs/en_US/link.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.loan]
file_filter = htdocs/langs/<lang>/loan.lang file_filter = htdocs/langs/<lang>/loan.lang
source_file = htdocs/langs/en_US/loan.lang source_file = htdocs/langs/en_US/loan.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:mailmanspip] [dolibarr.mailmanspip]
file_filter = htdocs/langs/<lang>/mailmanspip.lang file_filter = htdocs/langs/<lang>/mailmanspip.lang
source_file = htdocs/langs/en_US/mailmanspip.lang source_file = htdocs/langs/en_US/mailmanspip.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:mails] [dolibarr.mails]
file_filter = htdocs/langs/<lang>/mails.lang file_filter = htdocs/langs/<lang>/mails.lang
source_file = htdocs/langs/en_US/mails.lang source_file = htdocs/langs/en_US/mails.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:main] [dolibarr.main]
file_filter = htdocs/langs/<lang>/main.lang file_filter = htdocs/langs/<lang>/main.lang
source_file = htdocs/langs/en_US/main.lang source_file = htdocs/langs/en_US/main.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:margins] [dolibarr.margins]
file_filter = htdocs/langs/<lang>/margins.lang file_filter = htdocs/langs/<lang>/margins.lang
source_file = htdocs/langs/en_US/margins.lang source_file = htdocs/langs/en_US/margins.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:members] [dolibarr.members]
file_filter = htdocs/langs/<lang>/members.lang file_filter = htdocs/langs/<lang>/members.lang
source_file = htdocs/langs/en_US/members.lang source_file = htdocs/langs/en_US/members.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:modulebuilder] [dolibarr.modulebuilder]
file_filter = htdocs/langs/<lang>/modulebuilder.lang file_filter = htdocs/langs/<lang>/modulebuilder.lang
source_file = htdocs/langs/en_US/modulebuilder.lang source_file = htdocs/langs/en_US/modulebuilder.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:mrp] [dolibarr.mrp]
file_filter = htdocs/langs/<lang>/mrp.lang file_filter = htdocs/langs/<lang>/mrp.lang
source_file = htdocs/langs/en_US/mrp.lang source_file = htdocs/langs/en_US/mrp.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:multicurrency] [dolibarr.multicurrency]
file_filter = htdocs/langs/<lang>/multicurrency.lang file_filter = htdocs/langs/<lang>/multicurrency.lang
source_file = htdocs/langs/en_US/multicurrency.lang source_file = htdocs/langs/en_US/multicurrency.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:oauth] [dolibarr.oauth]
file_filter = htdocs/langs/<lang>/oauth.lang file_filter = htdocs/langs/<lang>/oauth.lang
source_file = htdocs/langs/en_US/oauth.lang source_file = htdocs/langs/en_US/oauth.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:opensurvey] [dolibarr.opensurvey]
file_filter = htdocs/langs/<lang>/opensurvey.lang file_filter = htdocs/langs/<lang>/opensurvey.lang
source_file = htdocs/langs/en_US/opensurvey.lang source_file = htdocs/langs/en_US/opensurvey.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:orders] [dolibarr.orders]
file_filter = htdocs/langs/<lang>/orders.lang file_filter = htdocs/langs/<lang>/orders.lang
source_file = htdocs/langs/en_US/orders.lang source_file = htdocs/langs/en_US/orders.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:other] [dolibarr.other]
file_filter = htdocs/langs/<lang>/other.lang file_filter = htdocs/langs/<lang>/other.lang
source_file = htdocs/langs/en_US/other.lang source_file = htdocs/langs/en_US/other.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:partnership] [dolibarr.paybox]
file_filter = htdocs/langs/<lang>/partnership.lang
source_file = htdocs/langs/en_US/partnership.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:paybox]
file_filter = htdocs/langs/<lang>/paybox.lang file_filter = htdocs/langs/<lang>/paybox.lang
source_file = htdocs/langs/en_US/paybox.lang source_file = htdocs/langs/en_US/paybox.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:paypal] [dolibarr.paypal]
file_filter = htdocs/langs/<lang>/paypal.lang file_filter = htdocs/langs/<lang>/paypal.lang
source_file = htdocs/langs/en_US/paypal.lang source_file = htdocs/langs/en_US/paypal.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:printing] [dolibarr.printing]
file_filter = htdocs/langs/<lang>/printing.lang file_filter = htdocs/langs/<lang>/printing.lang
source_file = htdocs/langs/en_US/printing.lang source_file = htdocs/langs/en_US/printing.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:productbatch] [dolibarr.productbatch]
file_filter = htdocs/langs/<lang>/productbatch.lang file_filter = htdocs/langs/<lang>/productbatch.lang
source_file = htdocs/langs/en_US/productbatch.lang source_file = htdocs/langs/en_US/productbatch.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:products] [dolibarr.products]
file_filter = htdocs/langs/<lang>/products.lang file_filter = htdocs/langs/<lang>/products.lang
source_file = htdocs/langs/en_US/products.lang source_file = htdocs/langs/en_US/products.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:projects] [dolibarr.projects]
file_filter = htdocs/langs/<lang>/projects.lang file_filter = htdocs/langs/<lang>/projects.lang
source_file = htdocs/langs/en_US/projects.lang source_file = htdocs/langs/en_US/projects.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:propal] [dolibarr.propal]
file_filter = htdocs/langs/<lang>/propal.lang file_filter = htdocs/langs/<lang>/propal.lang
source_file = htdocs/langs/en_US/propal.lang source_file = htdocs/langs/en_US/propal.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:receiptprinter] [dolibarr.receiptprinter]
file_filter = htdocs/langs/<lang>/receiptprinter.lang file_filter = htdocs/langs/<lang>/receiptprinter.lang
source_file = htdocs/langs/en_US/receiptprinter.lang source_file = htdocs/langs/en_US/receiptprinter.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:receptions] [dolibarr.receptions]
file_filter = htdocs/langs/<lang>/receptions.lang file_filter = htdocs/langs/<lang>/receptions.lang
source_file = htdocs/langs/en_US/receptions.lang source_file = htdocs/langs/en_US/receptions.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:recruitment] [dolibarr.resource]
file_filter = htdocs/langs/<lang>/recruitment.lang
source_file = htdocs/langs/en_US/recruitment.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:resource]
file_filter = htdocs/langs/<lang>/resource.lang file_filter = htdocs/langs/<lang>/resource.lang
source_file = htdocs/langs/en_US/resource.lang source_file = htdocs/langs/en_US/resource.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:salaries] [dolibarr.salaries]
file_filter = htdocs/langs/<lang>/salaries.lang file_filter = htdocs/langs/<lang>/salaries.lang
source_file = htdocs/langs/en_US/salaries.lang source_file = htdocs/langs/en_US/salaries.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:sendings] [dolibarr.sendings]
file_filter = htdocs/langs/<lang>/sendings.lang file_filter = htdocs/langs/<lang>/sendings.lang
source_file = htdocs/langs/en_US/sendings.lang source_file = htdocs/langs/en_US/sendings.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:sms] [dolibarr.sms]
file_filter = htdocs/langs/<lang>/sms.lang file_filter = htdocs/langs/<lang>/sms.lang
source_file = htdocs/langs/en_US/sms.lang source_file = htdocs/langs/en_US/sms.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:stocks] [dolibarr.stocks]
file_filter = htdocs/langs/<lang>/stocks.lang file_filter = htdocs/langs/<lang>/stocks.lang
source_file = htdocs/langs/en_US/stocks.lang source_file = htdocs/langs/en_US/stocks.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:stripe] [dolibarr.stripe]
file_filter = htdocs/langs/<lang>/stripe.lang file_filter = htdocs/langs/<lang>/stripe.lang
source_file = htdocs/langs/en_US/stripe.lang source_file = htdocs/langs/en_US/stripe.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:supplier_proposal] [dolibarr.suppliers]
file_filter = htdocs/langs/<lang>/supplier_proposal.lang
source_file = htdocs/langs/en_US/supplier_proposal.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:suppliers]
file_filter = htdocs/langs/<lang>/suppliers.lang file_filter = htdocs/langs/<lang>/suppliers.lang
source_file = htdocs/langs/en_US/suppliers.lang source_file = htdocs/langs/en_US/suppliers.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:ticket] [dolibarr.supplier_proposal]
file_filter = htdocs/langs/<lang>/supplier_proposal.lang
source_file = htdocs/langs/en_US/supplier_proposal.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.ticket]
file_filter = htdocs/langs/<lang>/ticket.lang file_filter = htdocs/langs/<lang>/ticket.lang
source_file = htdocs/langs/en_US/ticket.lang source_file = htdocs/langs/en_US/ticket.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:trips] [dolibarr.trips]
file_filter = htdocs/langs/<lang>/trips.lang file_filter = htdocs/langs/<lang>/trips.lang
source_file = htdocs/langs/en_US/trips.lang source_file = htdocs/langs/en_US/trips.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:users] [dolibarr.users]
file_filter = htdocs/langs/<lang>/users.lang file_filter = htdocs/langs/<lang>/users.lang
source_file = htdocs/langs/en_US/users.lang source_file = htdocs/langs/en_US/users.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:website] [dolibarr.website]
file_filter = htdocs/langs/<lang>/website.lang file_filter = htdocs/langs/<lang>/website.lang
source_file = htdocs/langs/en_US/website.lang source_file = htdocs/langs/en_US/website.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:withdrawals] [dolibarr.withdrawals]
file_filter = htdocs/langs/<lang>/withdrawals.lang file_filter = htdocs/langs/<lang>/withdrawals.lang
source_file = htdocs/langs/en_US/withdrawals.lang source_file = htdocs/langs/en_US/withdrawals.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:workflow] [dolibarr.workflow]
file_filter = htdocs/langs/<lang>/workflow.lang file_filter = htdocs/langs/<lang>/workflow.lang
source_file = htdocs/langs/en_US/workflow.lang source_file = htdocs/langs/en_US/workflow.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[o:dolibarr-association:p:dolibarr:r:zapier] [dolibarr.zapier]
file_filter = htdocs/langs/<lang>/zapier.lang file_filter = htdocs/langs/<lang>/zapier.lang
source_file = htdocs/langs/en_US/zapier.lang source_file = htdocs/langs/en_US/zapier.lang
source_lang = en_US source_lang = en_US

View File

@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007 Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.

View File

@@ -1,88 +1,73 @@
Copyright and license License
---------------------- -------
The Dolibarr software as a whole is distributed under the GNU General Public License as published by the Free Software Foundation; Dolibarr is released under the terms of the GNU General Public License as
either version 3 of the License, or (at your option) any later version (GPL-3+). More information: https://www.gnu.org/licenses/gpl-3.0.txt. published by the Free Software Foundation; either version 3 of the License,
A copy of this license is available in the COPYING file. or (at your option) any later version (GPL-3+).
Dolibarr depends on third-party components and code snippets released under their own license (obviously, all compatible with the one of Dolibarr). More information: https://www.gnu.org/licenses/gpl-3.0.txt
These dependencies are listed in the bottom of this file.
Dolibarr uses some external libraries released under different licenses. This is compatibility summary:
The Dolibarr images resources (available in the doc directory) is distributed under the Creative Commons Attribution 4.0 International license (CC BY 4.0).
The name Dolibarr is a trademark initially registered by Laurent Destailleur and ceased to the Dolibarr foundation. You can use the name Dolibarr
for your own need as long as you follow the rules defined on the page https://wiki.dolibarr.org/index.php/Rules_to_use_the_brand_name_%22Dolibarr%22
The use of the name DoliStore is also restricted to the same rules defined on https://wiki.dolibarr.org/index.php/Rules_to_use_the_brand_name_%22Dolibarr%22
Licence of dependencies of third-party components used by Dolibarr (all compatible with the Licence of Dolibarr):
Component Version License GPL Compatible Usage Component Version License GPL Compatible Usage
------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------
PHP libraries: PHP libraries:
EvalMath 1.0 BSD Yes Safe math expressions evaluation. Used by dynamic price only. TODO Replace with dol_eval ? AdoDb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package)
Escpos-php 3.0 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers CKEditor 4.12.1 LGPL-2.1+ Yes Editor WYSIWYG
GeoIP2 0.2.0 Apache License 2.0 Yes Lib to make geoip convert EvalMath 1.0 BSD Yes Safe math expressions evaluation
MathPHP 2.8.1 MIT License Yes Modern math library for PHP (only few files) Escpos-php 2.2 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
Mobiledetect 2.8.41 MIT License Yes Detect mobile devices browsers GeoIP2 0.2.0 LGPL-2.1+ Yes Lib to make geoip convert
NuSoap 0.9.16 LGPL 2.1+ Yes Library to develop SOAP Web services. From https://github.com/f00b4r/nusoap/tree/v0.9.16 Mobiledetect 2.8.34 MIT License Yes Detect mobile devices browsers
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
ParseDown 1.7.4 MIT License Yes Markdown parser ParseDown 1.6 MIT License Yes Markdown parser
PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files PHPDebugBar 1.15.0 MIT License Yes Used only by the module "debugbar" for developers
PHPDebugBar 1.18.2 MIT License Yes Used only by the module "debugbar" for developers PHPExcel 1.8.1 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
PHPSpreadSheet 1.12.0 LGPL-2.1+ Yes Read/Write XLS files, read ODS files PHPSpreadSheet ? LGPL-2.1+ Yes Read/Write XLS files, read ODS files
PHP-Iban 4.1.1 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
PHP-Imap 2.7.2 MIT License Yes Library to use IMAP with OAuth
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
PrestaShop-WS-Lib 94feb5f OSL-3.0 No Library providing API client for Prestashop. PSR/Logs 1.0 Library for logs (used by DebugBar)
PSR/Logs 1.0 MIT License Yes Library for logs (used by DebugBar) PSR/simple-cache ? Library for cache (used by PHPSpreadSheet)
PSR/simple-cache ? MIT License Yes Library for cache (used by PHPSpreadSheet) Restler 3.0.0RC6 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
Restler 3.1.1 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer) Sabre 3.2.2 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
Swift Mailer 5.4.2-DEV MIT License Yes Comprehensive mailing tools for PHP Stripe 6.43.1 MIT licence Yes Library for Stripe module
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
TCPDF 6.3.2 LGPL-3+ Yes PDF generation TCPDF 6.3.2 LGPL-3+ Yes PDF generation
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
bacon, dasprid, swiss-qr-bill, kmukku, symfony/validator
JS libraries: JS libraries:
Ace 1.4.14 BSD Yes JS library to get code syntaxique coloration in a textarea. Ace 1.4.8 BSD Yes JS library to get code syntaxique coloration in a textarea.
ChartJS 3.7.1 MIT License Yes JS library for graph ChartJS 2.9.3 MIT License Yes JS library for graph
CKEditor 4.22.1 LGPL-2.1+ Yes Editor WYSIWYG jQuery 3.4.1 MIT License Yes JS library
jQuery 3.6.4 MIT License Yes JS library jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI
jQuery UI 1.13.2 GPL and MIT License Yes JS library plugin UI
jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups) jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
jQuery JCrop 0.9.8 GPL and MIT License Yes JS library plugin Crop (to crop images) jQuery JCrop 0.9.8 GPL and MIT License Yes JS library plugin Crop (to crop images)
jQuery Jeditable 1.7.1 GPL and MIT License Yes JS library plugin jeditable (to edit in place) jQuery Jeditable 1.7.1 GPL and MIT License Yes JS library plugin jeditable (to edit in place)
jQuery jNotify 1.1.00 Apache License 2.0 Yes JS library plugin jNotify (to use ajax popups) jQuery jNotify 1.1.00 Apache Software License 2.0 Yes JS library plugin jNotify (to use ajax popups)
jQuery jPicker 1.1.6 GPL and MIT License Yes JS library for color picker with not defined list of colors jQuery jPicker 1.1.6 GPL and MIT License Yes JS library for color picker with not defined list of colors
jQuery jqueryFileTree 1.0.1 GPL and MIT License Yes JS library for filetree jQuery jqueryFileTree 1.0.1 GPL and MIT License Yes JS library for filetree
jQuery jquerytreeview 1.4.1 MIT License Yes JS library for filetree 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 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 jQuery Timepicker 1.1.0 GPL and MIT License Yes JS library Timepicker addon for Datepicker
jsGanttImproved 2.7.3 BSD License Yes JS library (to build Gantt reports) jsGanttImproved 1.7.5.4 BSD License Yes JS library (to build Gantt reports)
JsTimezoneDetect 1.0.6 MIT License Yes JS library to detect user timezone 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 SwaggerUI 2.0.24 GPL-2+ Yes JS library to offer the REST API explorer
Image libraries: Image libraries:
Octicons 8.1 MIT Yes Octicons 8.1 MIT Yes
Font libraries: Font libraries:
Fontawesome 5.13 Font Awesome Free Licence Yes Fontawesome 5.13 Font Awesome Free licence Yes
For more licenses compatibility informations: https://www.gnu.org/licenses/licenses.en.html For licenses compatibility informations:
https://www.gnu.org/licenses/licenses.en.html
Authors Copyright / Authors
------------------- -------------------
See page https://github.com/Dolibarr/dolibarr/graphs/contributors See page https://github.com/Dolibarr/dolibarr/graphs/contributors

3313
ChangeLog

File diff suppressed because it is too large Load Diff

34
DCO
View File

@@ -1,34 +0,0 @@
Developer Certificate of Origin
Version 1.1
Copyright (C) 2002 - Today, The Dolibarr team and its contributors.
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

6
INSTALL Normal file
View File

@@ -0,0 +1,6 @@
INSTALL
-------
English: See README.md file.
French: Voir fichier README-FR.md.

View File

@@ -6,7 +6,7 @@
Dolibarr ERP & CRM est un logiciel moderne pour gérer votre activité (société, association, auto-entrepreneurs, artisans). 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, ...). 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, ...).
![ScreenShot](https://www.dolibarr.org/medias/dolibarr_screenshot1_1920x1080.jpg) ![ScreenShot](https://www.dolibarr.org/images/dolibarr_screenshot1_1920x1080.jpg)
## LICENCE ## LICENCE
@@ -56,21 +56,17 @@ Vous pouvez aussi utiliser un serveur Web et une base de données prise en charg
Pour mettre à jour Dolibarr depuis une vieille version vers celle ci: Pour mettre à jour Dolibarr depuis une vieille version vers celle ci:
- Faites une sauvegarde de votre instance [voir ce tutorial](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr)
- Vérifiez que la nouvelle version est compatible avec la version PHP de votre serveur [voir PHP support](https://wiki.dolibarr.org/index.php/Releases).
- Ecrasez les vieux fichiers dans le vieux répertoire 'dolibarr' par les fichiers - Ecrasez les vieux fichiers dans le vieux répertoire 'dolibarr' par les fichiers
fournis dans ce nouveau package. fournis dans ce nouveau package.
- Au prochain accès, Dolibarr proposera la page de "mise à jour" des données (si nécessaire). - Au prochain accès, Dolibarr proposera la page de "mise à jour" des données (si nécessaire).
Si un fichier install.lock existe pour verrouiller le processus de mise à jour, il sera demandé de le supprimer manuellement (vous devriez trouver le fichier install.lock dans le répertoire utilisé pour stocker les documents générés ou transférés sur le serveur. Dans la plupart des cas, c'est le répertoire appelé "documents") Si un fichier install.lock existe pour verrouiller le processus de mise à jour, il sera demandé de le supprimer manuellement (vous devriez trouver le fichier install.lock dans le répertoire utilisé pour stocker les documents générés ou transférés sur le serveur. Dans la plupart des cas, c'est le répertoire appelé "documents")
Note: *Le processus de migration peut être lancé manuellement et plusieurs fois, sans risque, en appelant la page /install/* *Note: Le processus de migration peut être lancé manuellement et plusieurs fois, sans risque, en appelant la page /install/*
## CE QUI EST NOUVEAU ## CE QUI EST NOUVEAU
Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog). Voir fichier ChangeLog.
## CE QUE DOLIBARR PEUT FAIRE ## CE QUE DOLIBARR PEUT FAIRE
@@ -86,17 +82,15 @@ Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/Ch
- Calendrier/Agenda partagé (avec export ical, vcal) - Calendrier/Agenda partagé (avec export ical, vcal)
- Suivi des opportunités et/ou projets (suivi de rentabilité incluant les factures, notes de frais, temps consommé valorisé, ...) - Suivi des opportunités et/ou projets (suivi de rentabilité incluant les factures, notes de frais, temps consommé valorisé, ...)
- Gestion de contrats de services - Gestion de contrats de services
- Gestion de stock et inventaires - Gestion de stock
- Gestion des expéditions - Gestion des expéditions
- Gestion des demandes de congés - Gestion des demandes de congès
- Gestion des notes de frais - Gestion des notes de frais
- Gestion de recrutement
- GED (Gestion Electronique de Documents) - GED (Gestion Electronique de Documents)
- E-Mailings de masse - EMailings de masse
- Réalisation de sondages - Réalisation de sondages
- Gestion d'adhérents
- Point de vente/Caisse enregistreuse - Point de vente/Caisse enregistreuse
- (près de 100 modules disponibles en standard, près de 1000 autre sur la place de marché d'extensions) -
### Autres modules ### Autres modules
@@ -107,27 +101,27 @@ Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/Ch
- Support des codes barres - Support des codes barres
- Calcul des marges - Calcul des marges
- Connectivité LDAP - Connectivité LDAP
- Intégration de ClickToDial - Intégratn de ClickToDial
- Intégration RSS - Intégration RSS
- Intégration Skype - Intégation Skype
- Intégration de système de paiements (PayPal, Stripe, Paybox...) - Intégration de système de paiements (Paypal, Stripe, Paybox...)
- -
### Divers ### Divers
- Multi-langue. - Multi-langue.
- Multi-utilisateurs avec différents niveaux de permissions par module. - Multi-utilisateurs avec différents niveaux de permissions par module.
- Multidevise. - Multi-devise.
- Peux être multi-société par ajout du module externe multi-société. - Peux être multi-société par ajout du module externe multi-société.
- Plusieurs thèmes visuels. - Plusieurs thèmes visuels.
- Application simple à utiliser. - Application simple à utiliser.
- Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur [https://wiki.dolibarr.org/index.php/Prérequis](https://wiki.dolibarr.org/index.php/Prérequis)). - Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur https://wiki.dolibarr.org/index.php/Prérequis).
- Compatible avec toutes les offres Cloud du marché respectant les prérequis de base de données et PHP. - Compatible avec toutes les offres Cloud du marché respectant les prérequis de base de données et PHP.
- APIs. - APIs.
- Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...) - Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
- Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers). - Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers).
- Support natif de nombreuses fonctions spécifiques aux pays comme: - Support natif de nombreuses fonctions spécifiques aux pays comme:
- La taxe espagnole TE et ISPF - La tax espagnole TE et ISPF
- Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM) - Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM)
- La loi française Finance 2016 et logiciels de caisse - La loi française Finance 2016 et logiciels de caisse
- La double taxe canadienne - La double taxe canadienne
@@ -139,13 +133,13 @@ Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/Ch
### Extension ### Extension
Dolibarr peut aussi être étendu à volonté avec l'ajout de modules/applications externes développées par des développeurs tiers, disponible sur [DoliStore](https://www.dolistore.com). Dolibarr peut aussi être étendu à volonté avec l'ajout de module/applications externes développées par des développeus tiers, disponible sur [DoliStore](https://www.dolistore.com).
## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE ## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE
Voici un liste de fonctionnalités pas encore gérées par Dolibarr: Voici un liste de fonctionnalités pas encore gérées par Dolibarr:
- Dolibarr ne contient pas de module de génération de feuille de paie. - Dolibarr ne contient pas de module de Gestion de la paie.
- Les tâches du module de gestion de projets n'ont pas de dépendances entre elle. - Les tâches du module de gestion de projets n'ont pas de dépendances entre elle.
- Dolibarr n'embarque pas de Webmail intégré nativement. - Dolibarr n'embarque pas de Webmail intégré nativement.
- Dolibarr ne fait pas le café (pas encore). - Dolibarr ne fait pas le café (pas encore).
@@ -158,7 +152,7 @@ La documentation utilisateur, développeur et traducteur est disponible sous for
Ce projet existe grâce à ses nombreux contributeurs [[Contribuer](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]. Ce projet existe grâce à ses nombreux contributeurs [[Contribuer](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)].
[![Dolibarr](https://opencollective.com/dolibarr/contributors.svg?width=890&button=false)](https://github.com/Dolibarr/dolibarr/graphs/contributors) <a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" /></a>
## CREDITS ## CREDITS
@@ -168,15 +162,15 @@ Voir le fichier [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/CO
## ACTUALITES ET RESEAUX SOCIAUX ## ACTUALITES ET RESEAUX SOCIAUX
Suivez le projet Dolibarr sur les réseaux francophones Suivez le projet Dolibarr project sur les réseaux francophones
- [Facebook](https://www.facebook.com/dolibarr.fr) - [Facebook](https://www.facebook.com/dolibarr.fr)
- [X](https://www.twitter.com/dolibarr_france) - [Twitter](https://www.twitter.com/dolibarr_france)
ou sur les réseaux anglophones ou sur les réseaux anglophones
- [Facebook](https://www.facebook.com/dolibarr) - [Facebook](https://www.facebook.com/dolibarr)
- [X](https://www.twitter.com/dolibarr) - [Twitter](https://www.twitter.com/dolibarr)
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr) - [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM) - [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
- [GitHub](https://github.com/Dolibarr/dolibarr) - [GitHub](https://github.com/Dolibarr/dolibarr)

192
README.md
View File

@@ -1,21 +1,17 @@
# DOLIBARR ERP & CRM # DOLIBARR ERP & CRM
![Downloads per day](https://img.shields.io/sourceforge/dw/dolibarr.svg) ![Downloads per day](https://img.shields.io/sourceforge/dw/dolibarr.svg)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.1-8892BF.svg?style=flat-square)](https://php.net/) ![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/develop.svg)
[![GitHub release](https://img.shields.io/github/v/release/Dolibarr/dolibarr)](https://github.com/Dolibarr/dolibarr)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5521/badge)](https://bestpractices.coreinfrastructure.org/projects/5521)
Dolibarr ERP & CRM is a modern software package that helps manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…). Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
It's an Open Source Software suite (written in PHP with optional JavaScript enhancements) designed for small, medium or large companies, foundations and freelancers. It's an Open Source Software (written in PHP language) 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 freely use, study, modify or distribute it according to its Free Software licence.
You can use it as a standalone application or as a web application to access it from the Internet or a LAN. You can use it as a standalone application or as a web application to be able 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) ![ScreenShot](https://www.dolibarr.org/images/dolibarr_screenshot1_1920x1080.jpg)
![ScreenShot](https://www.dolibarr.org/medias/dolibarr_screenshot1_1920x1080.jpg)
## LICENSE ## LICENSE
@@ -31,25 +27,21 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git
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: 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)) - [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) - [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian
- DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia - DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia
Releases can be downloaded from [official website](https://www.dolibarr.org/). Releases can be downloaded from [official website](https://www.dolibarr.org/).
### Advanced setup ### Advanced setup
You can use a web server 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. - Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Versions).
#### Generic install steps - 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 (recommanded if you known git):
- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases). `git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is main version like 3.6, 9.0, ...)
- 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 3.6, 9.0, ...)
- 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. - 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.
@@ -57,7 +49,7 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
- From your browser, go to the dolibarr "install/" page - From your browser, go to the dolibarr "install/" page
The URL will depends on how your web setup was set up to point to your dolibarr installation. It may look like: The URL will depends on how you web setup was setup to point to your dolibarr installation. It may looks like:
`http://localhost/dolibarr/htdocs/install/` `http://localhost/dolibarr/htdocs/install/`
@@ -71,19 +63,20 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
- Follow the installer instructions - Follow the installer instructions
### SaaS/Cloud setup ### Saas/Cloud setup
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). However, this third solution is not free.
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 ## 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! - At first make a backup of your Dolibarr files & than see https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr
- Check that your installed PHP version is supported by the new version [see PHP support](./doc/phpmatrix.md).
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
- At first next access, Dolibarr will redirect your 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 into the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").
- At first make a backup of your Dolibarr files & then [see](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr) *Note: migration process can be safely done multiple times by calling the `/install/index.php` page*
- 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 ## WHAT'S NEW
@@ -93,121 +86,80 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
### Main application/modules (all optional) ### Main application/modules (all optional)
- Third-Parties Management: Customers, Prospects (Leads) and/or Suppliers + Contacts - Customers, Prospects (Leads) and/or Suppliers directory + Contacts
- Members/Membership/Foundation management - Members management
- Products and/or Services catalog
Product Management - Commercial proposals management
- Customer & Supplier Orders management
- Products and/or Services catalogue - Invoices and payment management
- Stock / Warehouse management + Inventory
- Barcodes
- Batches / Lots / Serials
- Product Variants
- Bill of Materials (BOM)
- Manufacturing Orders (MO)
Customer/Sales Management
- Customers/Prospects + Contacts management
- Opportunities or Leads management
- Commercial proposals management (online signing)
- Customer Orders management
- Contracts/Subscription management
- Interventions management
- Ticket System (+ Knowledge management)
- Partnership management
- Shipping management - Shipping management
- Customer Invoices/Credit notes and payment management - Warehouse/Stock management
- Point of Sale (POS) - Manufacturing Orders
Supplier/Purchase Management
- Suppliers/Vendors + Contacts
- Supplier (price) requests
- Purchase Orders management
- Delivery/Reception
- Supplier Invoices/credit notes and payment management
- INCOTERMS
Finance/Accounting
- Invoices/Payments
- Bank accounts management - Bank accounts management
- Direct debit and Credit transfer management (European SEPA) - Direct debit orders management (European SEPA)
- Accounting management - Accounting management
- Donations management - Shared calendar/agenda (with ical and vcal export for third party tools integration)
- Loan management - Opportunities or Leads management
- Margins
- Reports
Collaboration
- Shared calendar/agenda (with ical and vcal import/export for third-party tools integration)
- Projects & Tasks management - Projects & Tasks management
- Event organization - Contracts management
- Ticket System - Interventions management
- Surveys - Employee's leave requests management
HR - Human Resources Management
- Employee's leaves management
- Expense reports - Expense reports
- Recruitment management
- Employee/staff management
- Timesheets - Timesheets
- Electronic Document Management (EDM)
- Foundations members management
- Point of Sale (POS)
-
### Other application/modules ### Other application/modules
- Electronic Document Management (EDM) - Bookmarks management
- Bookmarks - Donations management
- Reporting - Reporting
- Surveys
- Data export/import - Data export/import
- Barcodes - Barcodes support
- Margin calculations
- LDAP connectivity - LDAP connectivity
- ClickToDial integration - ClickToDial integration
- Mass emailing - Mass emailing
- RSS integration - RSS integration
- Social platforms linking - Skype integration
- Payment platforms integration (PayPal, Stripe, Paybox...) - Payment platforms integration (PayPal, Stripe, Paybox...)
- Email-Collector -
(around 100 modules available by default, 1000+ addons at the official marketplace Dolistore.com)
### Other general features ### Other general features
- Multi-Language Support (Localization in most major languages) - Localization in most major languages
- Multi-users and groups with finely-grained rights - Multi-Users and groups with finely grained rights
- Multi-Currency - Multi-currency
- Multi-Company (by adding of an external module) - Multi-company by adding of an external module
- Very user-friendly and easy to use - Very user friendly and easy to use
- Customizable dashboards - customizable Dashboard
- 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) - 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) - APIs
- Support a lot of country-specific features: - An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture)
- Support a lot of country specific features:
- Spanish Tax RE and ISPF - Spanish Tax RE and ISPF
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM) - 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 - Canadian double taxes (federal/province) and other countries using cumulative VAT
- Tunisian tax stamp - Tunisian tax stamp
- Argentina invoice numbering using A,B,C... - Argentina invoice numbering using A,B,C...
- ZATCA e-invoicing QR-Code - Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
- Compatible with [European directives](https://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE) - Compatible with European GDPR rules
- Compatible with data privacy rules (Europe GDPR, ...)
- ... - ...
- Flexible PDF & ODT generation for invoices, proposals, orders... - PDF or ODT generation for invoice, proposals, orders...
- ... -
### System Environment / Requirements ### System Environment / Requirements
- PHP - Works with PHP 5.5+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
- MariaDB, MySQL or PostgreSQL - Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
- Compatible with all Cloud solutions that match PHP & MySQL or PostgreSQL prerequisites.
See exact requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite)
### Extending ### Extending
Dolibarr can be extended with a lot of other external applications or modules from third-party developers available at the [DoliStore](https://www.dolistore.com). Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com).
## WHAT DOLIBARR CAN'T DO YET ## WHAT DOLIBARR CAN'T DO YET
@@ -215,25 +167,22 @@ These are features that Dolibarr does **not** yet fully support:
- Tasks dependencies in projects - Tasks dependencies in projects
- Payroll module - Payroll module
- No native embedded Webmail, but you can send emails to contacts in Dolibarr with e.g. offers, invoices, etc. - No native embedded Webmail
- Dolibarr can't do coffee (yet) - Dolibarr can't do coffee (yet)
## DOCUMENTATION ## DOCUMENTATION
Administrator, user, developer and translator's documentation are available along with other community resources in the [Wiki](https://wiki.dolibarr.org). Administrator, user, developer and translator's documentations are available along with other community resources on the [Wiki](https://wiki.dolibarr.org).
## CONTRIBUTING ## CONTRIBUTING
This project exists thanks to all the people who contribute. This project exists thanks to all the people who contribute. [[Contribute](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: <a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" /></a>
[![Dolibarr](https://opencollective.com/dolibarr/contributors.svg?width=890&button=false)](https://github.com/Dolibarr/dolibarr/graphs/contributors)
## CREDITS ## CREDITS
Dolibarr is the work of many contributors over the years and uses some fine PHP libraries. Dolibarr is the work of many contributors over the years and uses some fine libraries.
See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) file. See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) file.
@@ -242,9 +191,8 @@ See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) fil
Follow Dolibarr project on: Follow Dolibarr project on:
- [Facebook](https://www.facebook.com/dolibarr) - [Facebook](https://www.facebook.com/dolibarr)
- [X](https://x.com/dolibarr) - [Twitter](https://www.twitter.com/dolibarr)
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr) - [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
- [Reddit](https://www.reddit.com/r/Dolibarr_ERP_CRM/)
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM) - [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
- [GitHub](https://github.com/Dolibarr/dolibarr) - [GitHub](https://github.com/Dolibarr/dolibarr)

View File

@@ -1,100 +1,13 @@
# Security Policy # Security Policy
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
## Supported Versions for security reports | Version | Supported |
| -------- | ------------------ |
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). | <= 8.0.* | :x: |
| >= 9.0.* | :white_check_mark: |
## Reporting a Vulnerability ## Reporting a Vulnerability
To report a vulnerability, for a private report, you can: To report a vulnerability, please send an email to security@dolibarr.org
In most cases, after fixing the security, we make an answer by email to say the issue has been fixed.
- 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 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
We believe that the future of software is online SaaS. This means software are more and more critical and no technology is perfect. Working with skilled security researchers is crucial in identifying weaknesses in our technology.
If you believe you've found a security bug in our service, we are happy to work with you to resolve the issue promptly and ensure you are fairly rewarded for your discovery.
Any type of denial-of-service attack is strictly forbidden, as well as any interference with network equipment and Dolibarr infrastructure.
We recommend to install Dolibarr ERP CRM on your own server (as most Open Source software, download and use is free: [https://www.dolibarr.org/download](https://www.dolibarr.org/download)) to get access on every side of application.
### User Agent
If you try to find bug on Dolibarr, we recommend to append to your user-agent header the following value: '-securitytest-for-dolibarr'.
### Account access
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):
You must be the first reporter of the vulnerability (duplicate reports are closed).
You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommend to install software on your own platform.
You must not leak, manipulate, or destroy any user data of third parties to find your vulnerability.
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":
* The version to analyze must be the last version available in the "develop" branch. Reports on vulnerabilities already fixed (so already reported) in the develop branch will not be validated.
* $dolibarr_main_prod must be set to 1 in conf.php
* $dolibarr_nocsrfcheck must be kept to the value 0 in conf.php (this is the default value)
* $dolibarr_main_force_https must be set to something else than 0.
* Some constant must be set in the backoffice menu Home - Setup - Other
- MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 3
- MAIN_RESTRICTHTML_ONLY_VALID_HTML = 1
- MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = 1
- MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES = 1
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. 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 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
* Insecure direct object references (IDOR)
* Cross-Origin Resource Sharing (CORS) with real security impact
* Horizontal and vertical privilege escalation
* "HTTP Host Header" XSS
* Software version disclosure (for non-admin users only)
* Stack traces or path disclosure (for non-admin users only)
## Examples of vulnerabilities that are Non-qualified for reporting.
* "Self" XSS
* Clickjacking/UI redressing
* Presence of autocomplete attribute on web forms
* Logout and other instances of low-severity Cross-Site Request Forgery
* 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 victims computer/device

102
build.xml Normal file
View File

@@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Script build for hudson CI -->
<project name="dolibarr" default="hudson" basedir=".">
<!-- Exclude/ignore paths -->
<property name="ignorepaths" value="${basedir}/htdocs/conf,${basedir}/htdocs/core/filemanagerdol,${basedir}/htdocs/includes" />
<property name="ignoreregexp" value="**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*" />
<target name="clean">
<!-- Clean up -->
<delete dir="${basedir}/hudson"/>
<delete dir="${basedir}/generatedJUnitFiles"/>
<!-- Create build directories -->
<mkdir dir="${basedir}/hudson/doxygen"/>
<mkdir dir="${basedir}/hudson/logs"/>
<mkdir dir="${basedir}/hudson/coverage"/>
</target>
<!-- Run phpmd, phpcpd, phpcs, doxygen and phploc in parallel -->
<target name="parallelTasks">
<parallel>
<!-- <antcall target="phpmd"/> -->
<antcall target="phpcpd"/>
<!-- <antcall target="phpcs"/> -->
<antcall target="doxygen"/>
<antcall target="phploc"/>
</parallel>
</target>
<!-- Generate pmd.xml -->
<!--
<target name="phpmd">
<exec executable="phpmd">
<arg line="htdocs xml codesize,unusedcode
-\-reportfile '${basedir}/hudson/logs/pmd.xml'
-\-ignore=${ignorepaths}
" />
</exec>
</target>
-->
<!-- Generate pmd-cpd.xml -->
<target name="phpcpd">
<exec executable="phpcpd">
<arg line=" --log-pmd '${basedir}/hudson/logs/pmd-cpd.xml'
--exclude '${basedir}/htdocs/conf'
--exclude '${basedir}/htdocs/core/filemanagerdol'
--exclude '${basedir}/htdocs/includes'
--exclude '**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*'
--min-tokens 70
--min-lines 20
htdocs
" />
</exec>
</target>
<!-- Generate phploc.csv -->
<target name="phploc">
<exec executable="phploc">
<arg line=" --log-csv '${basedir}/hudson/logs/phploc.csv'
--exclude '${basedir}/htdocs/conf'
--exclude '${basedir}/htdocs/core/filemanagerdol'
--exclude '${basedir}/htdocs/includes'
--exclude '**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*'
htdocs
" />
</exec>
</target>
<!-- Generate checkstyle.xml -->
<target name="phpcs">
<exec executable="phpcs" dir="${basedir}">
<arg line=" --standard=${basedir}/dev/codesniffer/jenkins_ruleset.xml
--report=checkstyle
--report-file=${basedir}/hudson/logs/checkstyle.xml
--ignore=${ignorepaths},${ignoreregexp}
htdocs
"/>
</exec>
</target>
<!-- Run unit tests and generate junit.xml and clover.xml -->
<target name="phpunit">
<exec executable="phpunit" dir="${basedir}" failonerror="true">
<arg line=" --configuration ${basedir}/test/phpunit/phpunittest.xml
--log-junit ${basedir}/hudson/logs/junit.xml
--coverage-clover ${basedir}/hudson/coverage/clover.xml
--coverage-html ${basedir}/hudson/coverage/
test/phpunit/AllTests.php
"/>
</exec>
</target>
<!-- Generate Doxygen documentation -->
<target name="doxygen" description="Dolibarr documentation" >
<exec executable="doxygen" dir="${basedir}" failonerror="false">
<arg value="${basedir}/build/doxygen/jenkins_doxygen.doxyfile"/>
</exec>
</target>
<target name="hudson" depends="clean,phpunit,phpcs,parallelTasks"/>
</project>

View File

@@ -1,44 +1,48 @@
README (English) README (English)
Path: /dolibarr/build/README
################################################## ##################################################
Building packages Building packages
################################################## ##################################################
All sub-directories of "build" directory contains files (setup or binary tools) required to build automatically Dolibarr packages. All sub-directories of "build" directory contains files (setup or binary tools) required to build automatically Dolibarr packages.
The build directory and all its contents is absolutely not required to make Dolibarr working.
It is here only to build Dolibarr packages, and those generated packages will not contains this "build" directory.
There are several tools: There are several tools:
--------------------------------------------------------------------------------------------------
- To build full Dolibarr packages, launch the script - To build full Dolibarr packages, launch the script
> Launch command perl makepack-dolibarr.pl > Launch command perl makepack-dolibarr.pl
See makepack-howto.txt for prerequisites. Note: Prerequisites to build tgz, debian, rpm package
> apt-get install tar dpkg dpatch p7zip-full rpm zip
-------------------------------------------------------------------------------------------------- Note: Prerequisites to build autoexe DoliWamp package:
> apt-get install wine q4wine
> Launch "wine cmd" to check a drive Z: pointing to / exists.
> Install InnoSetup
For example by running isetup-5.3.9.exe (http://www.jrsoftware.org)
> Install WampServer into "C:\Program Files\Wamp"
For example by running wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe (http://www.wampserver.com)
> Install WampServer addon to have versions: Mysql5.0.45
For example by running WampServer2-MYSQL5045.exe (http://www.wampserver.com)
> To build 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.
> 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 a theme package, launch the script - To build a theme package, launch the script
> perl makepack-dolibarrtheme.pl > perl makepack-dolibarrtheme.pl
--------------------------------------------------------------------------------------------------
- To build a package for a module, launch the script - To build a package for a module, launch the script
> perl makepack-dolibarrmodule.pl > perl makepack-dolibarrmodule.pl
--------------------------------------------------------------------------------------------------
- To build developper documentation, launch the script - To build developper documentation, launch the script
> perl dolibarr-doxygen-build.pl > perl dolibarr-doxygen-build.pl
-------------------------------------------------------------------------------------------------- Note:
The build directory and all its contents is absolutely not required to make
Dolibarr working. It is here only to build Dolibarr packages, and those
generated packages will not contains this "build" directory.
You can find in "build", following sub-directories: You can find in "build", following sub-directories:
@@ -55,9 +59,6 @@ To build Mac OS package (not ready yet).
* doap: * doap:
To build Doap descriptor to promote/describe Dolibarr releases. To build Doap descriptor to promote/describe Dolibarr releases.
* docker:
To deploy Dolibarr with docker.
* doxygen: * doxygen:
Dir with config file to build doxygen documentation. Dir with config file to build doxygen documentation.
@@ -65,12 +66,12 @@ Dir with config file to build doxygen documentation.
To build exe package for Windows that distribute Dolibarr sources or To build exe package for Windows that distribute Dolibarr sources or
to build the complete DoliWamp package. to build the complete DoliWamp package.
* gource:
To build the video of history of git changes.
* launchpad: * launchpad:
Doc file to explain how to use launchpad. Doc file to explain how to use launchpad.
* live:
Doc file to explain how to create a demo live CD.
* obs: * obs:
Doc file to explain how to push release onto OBS. Doc file to explain how to push release onto OBS.
@@ -89,8 +90,5 @@ To build Redhat, Opensuse or Mandriva package.
* tgz: * tgz:
To build a tgz package. To build a tgz package.
* travis-ci:
Used by travis to make CI.
* zip: * zip:
To build a zip package. To build a zip package.

View File

@@ -51,17 +51,16 @@ export DEBEMAIL="eldy@destailleur.fr"
export QUILT_PATCHES=debian/patches export QUILT_PATCHES=debian/patches
# To use Alioth.debian.org
# Note: alioth.debian.org is outdated --> https://alioth-archive.debian.org/ --> https://salsa.debian.org/public * Create an account login
* Create an account login * Update your ~/.ssh/config file to add:
* Update your ~/.ssh/config file to add: Host svn.debian.org git.debian.org bzr.debian.org hg.debian.org darcs.debian.org arch.debian.org
Host svn.debian.org git.debian.org bzr.debian.org hg.debian.org darcs.debian.org arch.debian.org
User eldy-guest User eldy-guest
IdentityFile ~/.ssh/id_rsa IdentityFile ~/.ssh/id_rsa
* Check login on page https://alioth.debian.org/users/login * Check login on page https://alioth.debian.org/users/login
Ex: https://alioth.debian.org/users/eldy-guest Ex: https://alioth.debian.org/users/eldy-guest
* Setup your ssh as described into page: http://wiki.debian.org/Alioth/SSH * Setup your ssh as described into page: http://wiki.debian.org/Alioth/SSH
* Ask to be included into project collab-maint: http://alioth.debian.org/projects/collab-maint/ * Ask to be included into project collab-maint: http://alioth.debian.org/projects/collab-maint/
@@ -99,21 +98,21 @@ export QUILT_PATCHES=debian/patches
- Post an ITP with reportbugs : - Post an ITP with reportbugs :
> reportbug -B debian --email username@domain.tld wnpp > reportbug -B debian --email username@domain.tld wnpp
See page https://www.debian.org/devel/wnpp/#l1 for example of ITP requests contents. See page http://www.debian.org/devel/wnpp/#l1 for example of ITP requests contents.
- Wait until you received bug number. - Wait until you received bug number.
For first ITP submission of Dolibarr, bug id was 634783. For first ITP submission of Dolibarr, bug id was 634783.
- Check bug is into database by searching with id on - Check bug is into database by searching with id on
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634783 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634783
- Add a line for upstream into file changelog with bug number - Add a line for upstream into file changelog with bug number
- Call for a mentor on ML debian-mentors to upload packages - Call for a mentor on ML debian-mentors to upload packages
- Once package is uploaded, following URL are available: - Once package is uploaded, following URL are available:
https://packages.qa.debian.org/package.html http://packages.qa.debian.org/package.html
https://bugs.debian.org/package http://bugs.debian.org/package
##### Modify severity of a bug ticket ##### Modify severity of a bug ticket
@@ -307,7 +306,7 @@ If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VER
- htdocs/includes/jquery/plugins/datatables - htdocs/includes/jquery/plugins/datatables
- htdocs/includes/jszip - htdocs/includes/jszip
- htdocs/includes/mike42 - htdocs/includes/mike42
- htdocs/includes/phpoffice - htdocs/includes/phpexcel or htdocs/includes/phpoffice
- htdocs/includes/restler/framework/Luracast/Restler/explorer - htdocs/includes/restler/framework/Luracast/Restler/explorer
- htdocs/includes/swiftmailer - htdocs/includes/swiftmailer
- htdocs/includes/tcpdf or htdocs/includes/tecnickcom - htdocs/includes/tcpdf or htdocs/includes/tecnickcom

View File

@@ -1 +1 @@
10 7

View File

@@ -232,7 +232,7 @@ $dolibarr_main_prod='0';
# Examples: # Examples:
# $dolibarr_mailing_limit_sendbycli='0'; # $dolibarr_mailing_limit_sendbycli='0';
# dolibarr_main_distrib # dolibarr_distrib
# A key to identify the distribution used for first installation # A key to identify the distribution used for first installation
$dolibarr_main_distrib = 'debian'; $dolibarr_distrib = 'deb';

View File

@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Maintainer: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
# Uploaders: Laurent Destailleur (eldy) <eldy@users.sourceforge.net> # Only if differs from Maintainer # Uploaders: Laurent Destailleur (eldy) <eldy@users.sourceforge.net> # Only if differs from Maintainer
Standards-Version: 3.9.6 Standards-Version: 3.9.6
Homepage: https://www.dolibarr.org Homepage: http://www.dolibarr.org
Build-Depends: debhelper (>= 9), po-debconf Build-Depends: debhelper (>= 9), po-debconf
# This package need at least debian 7 or ubuntu 13.04 or any distribution based on this version # This package need at least debian 7 or ubuntu 13.04 or any distribution based on this version
@@ -19,6 +19,7 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
php-pear, php-mail-mime, php-pear, php-mail-mime,
# php-tcpdf, # php-tcpdf,
# libfpdf-tpl-php, php-fpdf, # libfpdf-tpl-php, php-fpdf,
# libphp-adodb,
# libnusoap-php, # libnusoap-php,
# libphp-pclzip, # libphp-pclzip,
# Required javascript libraries # Required javascript libraries
@@ -32,7 +33,7 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
Recommends: apache2 | lighttpd | httpd, Recommends: apache2 | lighttpd | httpd,
mariadb-server | virtual-mysql-server, mariadb-server | virtual-mysql-server,
# Required PHP extensions for debian 9 but we can't add them into a Depends, it does not exists on debian 7 and 8 # Required PHP extensions for debian 9 but we can't add them into a Depends, it does not exists on debian 7 and 8
php-xml, php-mbstring, php-intl php-xml, php-mbstring
Suggests: www-browser, php5-geoip Suggests: www-browser, php5-geoip
Description: Web based software to manage a company or foundation Description: Web based software to manage a company or foundation
Dolibarr ERP & CRM is an easy to use open source/free software package for Dolibarr ERP & CRM is an easy to use open source/free software package for

View File

@@ -1,4 +1,4 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Dolibarr Upstream-Name: Dolibarr
Upstream-Contact: Laurent Destailleur <eldy@users.sourceforge.net> Upstream-Contact: Laurent Destailleur <eldy@users.sourceforge.net>
Source: https://www.dolibarr.org/files/stable/standard/ Source: https://www.dolibarr.org/files/stable/standard/
@@ -38,7 +38,6 @@ Copyright: 2002-2009, Rodolphe Quiedeville <rodolphe@quiedeville.org>
2011, Herve Prot <herve.prot@symeos.com> 2011, Herve Prot <herve.prot@symeos.com>
2011, Remy Younes <ryounes@gmail.com> 2011, Remy Younes <ryounes@gmail.com>
2012-2013, Christophe Battarel <christophe.battarel@altairis.fr> 2012-2013, Christophe Battarel <christophe.battarel@altairis.fr>
License: GPL-3+ License: GPL-3+
This program is free software; you can redistribute it This program is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public and/or modify it under the terms of the GNU General Public
@@ -57,9 +56,29 @@ License: GPL-3+
. .
On Debian systems, the full text of the GNU General Public On Debian systems, the full text of the GNU General Public
License version 3 can be found in the file License version 3 can be found in the file
'/usr/share/common-licenses/GPL-3'. `/usr/share/common-licenses/GPL-3'.
------------------------------------------------------------ Files: htdocs/includes/adodbtime/*
Copyright: 2003-2005, John Lim
unknown, jackbbs
License: BSD-3-Clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
.
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
.
Neither the name of the John Lim nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.
Comment:
Those files are not shipped in the binary package since we use
the library as packaged in "libphp-adodb".
Files: htdocs/includes/ckeditor/* Files: htdocs/includes/ckeditor/*
Copyright: 2003-2012 CKSource - Frederico Knabben Copyright: 2003-2012 CKSource - Frederico Knabben
@@ -90,9 +109,6 @@ Comment:
Those files are not shipped in the binary package since we use the Those files are not shipped in the binary package since we use the
library as packaged in "ckeditor". library as packaged in "ckeditor".
------------------------------------------------------------
Files: htdocs/includes/fonts/* Files: htdocs/includes/fonts/*
Copyright: 2003, Bitstream Inc Copyright: 2003, Bitstream Inc
unknown, Gavin Graham unknown, Gavin Graham
@@ -143,9 +159,6 @@ Comments:
Those files are not shipped in the binary package as we Those files are not shipped in the binary package as we
configure Dolibarr to use Dejavu fonts from "fonts-dejavu-core". configure Dolibarr to use Dejavu fonts from "fonts-dejavu-core".
------------------------------------------------------------
Files: doc/images/* Files: doc/images/*
Copyright: Laurent Destailleur Copyright: Laurent Destailleur
License: CC-BY-SA-3.0 License: CC-BY-SA-3.0
@@ -161,15 +174,33 @@ License: CC-BY-SA-3.0
distribute the resulting work only under the same, similar or a compatible distribute the resulting work only under the same, similar or a compatible
license. license.
. .
For more information, see https://creativecommons.org/licenses/by-sa/3.0/ For more information, see http://creativecommons.org/licenses/by-sa/3.0/
Files: htdocs/includes/fpdfi/*
Copyright: 2004-2011 Setasign - Jan Slabon
License: GPL-2+
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 the Free Software Foundation; either
version 2 of the License, or (at your option) any later
version.
.
This program is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more
details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
.
On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file
`/usr/share/common-licenses/GPL-2'.
Files: htdocs/includes/geoip/*
------------------------------------------------------------
Files: htdocs/includes/geoip2/*
Copyright: 2007 MaxMind LLC Copyright: 2007 MaxMind LLC
License: CC-By-SA License: LGPL-2.1+
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
@@ -185,14 +216,10 @@ License: CC-By-SA
. .
On Debian systems, the full text of the GNU Lesser General Public On Debian systems, the full text of the GNU Lesser General Public
License version 2.1 can be found in the file License version 2.1 can be found in the file
'/usr/share/common-licenses/LGPL-2.1'. `/usr/share/common-licenses/LGPL-2.1'.
------------------------------------------------------------
Files: htdocs/includes/jquery/* Files: htdocs/includes/jquery/*
Copyright: JQuery team Copyright: JQuery team
https://www.jquery.com
License: GPL-2+ or MIT License: GPL-2+ or MIT
=== GPL-2+ LICENSE NOTICE === === GPL-2+ LICENSE NOTICE ===
. .
@@ -213,7 +240,7 @@ License: GPL-2+ or MIT
. .
On Debian systems, the full text of the GNU General Public On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file License version 2 can be found in the file
'/usr/share/common-licenses/GPL-2'. `/usr/share/common-licenses/GPL-2'.
. .
=== MIT LICENSE === === MIT LICENSE ===
. .
@@ -240,8 +267,6 @@ Comment:
"libjs-jquery-ui". Most of the plugins are shipped though. "libjs-jquery-ui". Most of the plugins are shipped though.
------------------------------------------------------------
Files: htdocs/includes/jquery/plugins/flot/* Files: htdocs/includes/jquery/plugins/flot/*
Copyright: Flot team Copyright: Flot team
License: Public-Domain License: Public-Domain
@@ -250,9 +275,6 @@ Comment:
Those files are not shipped in the binary package because we configure Those files are not shipped in the binary package because we configure
Dolibarr to use the files provided by "libjs-flot". Dolibarr to use the files provided by "libjs-flot".
------------------------------------------------------------
Files: htdocs/includes/jsgantt/* Files: htdocs/includes/jsgantt/*
Copyright: JSGantt team Copyright: JSGantt team
License: GPL-2+ License: GPL-2+
@@ -273,10 +295,7 @@ License: GPL-2+
. .
On Debian systems, the full text of the GNU General Public On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file License version 2 can be found in the file
'/usr/share/common-licenses/GPL-2'. `/usr/share/common-licenses/GPL-2'.
------------------------------------------------------------
Files: htdocs/includes/nusoap/* Files: htdocs/includes/nusoap/*
Copyright: 2002-2010 NuSphere Corporation Copyright: 2002-2010 NuSphere Corporation
@@ -296,14 +315,11 @@ License: LGPL-2.1+
. .
On Debian systems, the full text of the GNU Lesser General Public On Debian systems, the full text of the GNU Lesser General Public
License version 2.1 can be found in the file License version 2.1 can be found in the file
'/usr/share/common-licenses/LGPL-2.1'. `/usr/share/common-licenses/LGPL-2.1'.
Comment: Comment:
Those files are not shipped in the binary package since we Those files are not shipped in the binary package since we
configure Dolibarr to use the library provided in "libnusoap-php". configure Dolibarr to use the library provided in "libnusoap-php".
------------------------------------------------------------
Files: htdocs/includes/odtphp/* Files: htdocs/includes/odtphp/*
Copyright: 2008, Julien Pauli Copyright: 2008, Julien Pauli
2008, Cyril PIERRE de GEYER 2008, Cyril PIERRE de GEYER
@@ -326,12 +342,29 @@ License: GPL-2+
. .
On Debian systems, the full text of the GNU General Public On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file License version 2 can be found in the file
'/usr/share/common-licenses/GPL-2'. `/usr/share/common-licenses/GPL-2'.
Files: htdocs/includes/phpexcel/*
Copyright: 2006-2011 PHPExcel (http://www.codeplex.com/PHPExcel)
License: LGPL-2.1+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
.
On Debian systems, the full text of the GNU Lesser General Public
License version 2.1 can be found in the file
`/usr/share/common-licenses/LGPL-2.1'.
------------------------------------------------------------ Files: htdocs/includes/tcpdf/*
Files: htdocs/includes/tecnickcom/*
Copyright: 2002-2013 Nicola Asuni - Tecnick.com LTD Copyright: 2002-2013 Nicola Asuni - Tecnick.com LTD
License: LGPL-3.0+ License: LGPL-3.0+
TCPDF is free software: you can redistribute it and/or modify it TCPDF is free software: you can redistribute it and/or modify it

View File

@@ -23,7 +23,7 @@ setup_empty_conf() {
mkdir -p /etc/dolibarr mkdir -p /etc/dolibarr
touch /etc/dolibarr/conf.php touch /etc/dolibarr/conf.php
chown root:www-data /etc/dolibarr/conf.php chown root:www-data /etc/dolibarr/conf.php
chmod 660 /etc/dolibarr/conf.php chmod 664 /etc/dolibarr/conf.php
} }
is_new_upstream_version() { is_new_upstream_version() {
@@ -146,9 +146,11 @@ case "$1" in
#else #else
# File already exist. We add params not found. # File already exist. We add params not found.
#echo Add new params to overwrite path to use shared libraries/fonts #echo Add new params to overwrite path to use shared libraries/fonts
#grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
##grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config ##grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
#grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config #grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
#grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config #grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
##grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
##grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config ##grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
#grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config #grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
#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" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config

View File

@@ -24,16 +24,17 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
$force_install_dolibarrlogin='admin'; $force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1'; $force_install_nophpinfo='1';
$force_install_lockinstall='444'; $force_install_lockinstall='444';
$force_install_distrib='debian';
// Value to overwrite path to use shared libraries/fonts instead of embedded one. // Value to overwrite path to use shared libraries/fonts instead of embedded one.
// If during install, we enable/disable declaration to use non embedded libraries, we must also check they are // If during install, we enable/disable declaration to use non embedded libraries, we must also check they are
// - not removed from package (see rm in rules file), // - not removed from package (see rm in rules file),
// - declared into dependencies (see Depends in control file) // - declared into dependencies (see Depends in control file)
//$force_dolibarr_lib_TCPDF_PATH=''; //$force_dolibarr_lib_TCPDF_PATH='';
//$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
//$force_dolibarr_lib_GEOIP_PATH=''; //$force_dolibarr_lib_GEOIP_PATH='';
//$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; //$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
//$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; //$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
//$force_dolibarr_lib_PHPEXCEL_PATH=''; // Use '' or 'disabled'
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor'; // Use '/javascript/ckeditor' or 'disabled' //$force_dolibarr_js_CKEDITOR='/javascript/ckeditor'; // Use '/javascript/ckeditor' or 'disabled'
//$force_dolibarr_js_JQUERY='/javascript/jquery'; //$force_dolibarr_js_JQUERY='/javascript/jquery';
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; //$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';

View File

@@ -33,5 +33,5 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+$conffile = "/etc/dolibarr/conf.php"; +$conffile = "/etc/dolibarr/conf.php";
+$conffiletoshow = "/etc/dolibarr/conf.php"; +$conffiletoshow = "/etc/dolibarr/conf.php";
$short_options = "c:h";
$long_options = array( // Load conf file if it is already defined

View File

@@ -19,10 +19,6 @@ override_dh_auto_clean:
override_dh_auto_build: override_dh_auto_build:
# Do nothing. Added to disable launchpad to use bugged dh_auto_build search for ant # Do nothing. Added to disable launchpad to use bugged dh_auto_build search for ant
# Force the compression format for control files
override_dh_builddeb:
dh_builddeb -- -Zxz
#override_dh_compress: #override_dh_compress:
# dh_compress --no-act -X.png # dh_compress --no-act -X.png
@@ -93,6 +89,7 @@ override_dh_install:
rm -fr build/zip rm -fr build/zip
# clean from all PHP embedded libraries (we use package dependencies instead) # clean from all PHP embedded libraries (we use package dependencies instead)
# rm -fr htdocs/includes/adodbtime
# rm -fr htdocs/includes/geoip # rm -fr htdocs/includes/geoip
# rm -fr htdocs/includes/nusoap # rm -fr htdocs/includes/nusoap
# rm -fr htdocs/includes/odtphp/zip/pclzip # rm -fr htdocs/includes/odtphp/zip/pclzip
@@ -106,6 +103,8 @@ override_dh_install:
# clean from useless files # clean from useless files
rm -fr htdocs/includes/jquery/plugins/multiselect rm -fr htdocs/includes/jquery/plugins/multiselect
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PDF
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip
rm -fr htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.33 rm -fr htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.33
rm -fr htdocs/includes/tcpdf/fonts/freefont-20100919 rm -fr htdocs/includes/tcpdf/fonts/freefont-20100919
rm -fr htdocs/includes/tcpdf/fonts/utils rm -fr htdocs/includes/tcpdf/fonts/utils
@@ -114,6 +113,7 @@ override_dh_install:
# Licence files are already included into copyright file. # Licence files are already included into copyright file.
rm -f htdocs/includes/jquery/plugins/flot/LICENSE.txt rm -f htdocs/includes/jquery/plugins/flot/LICENSE.txt
rm -f htdocs/includes/phpexcel/license.txt
rm -f htdocs/includes/tcpdf/LICENSE.TXT rm -f htdocs/includes/tcpdf/LICENSE.TXT
# Drop unwanted executable permissions # Drop unwanted executable permissions

View File

@@ -0,0 +1,2 @@
htdocs/install/doctemplates/websites/website_template-corporate.zip
htdocs/install/doctemplates/websites/website_template-stellar.zip

View File

@@ -1,5 +0,0 @@
# Force use of gzip compression by dpkg-buildpackage for the tarball *.debian.tar.gz
# See also option --compression from command line of dpkg-buildpackage
# Format for the control files are defined into the rules file in override_dh_builddeb section
compression = "gzip"
#compression-level = 9

View File

@@ -1,17 +1,16 @@
<?php <?php
$force_install_message='KeepDefaultValuesMamp';
$force_install_message = 'KeepDefaultValuesMamp'; $force_install_main_data_root='/Applications/MAMP/dolibarr_documents';
$force_install_main_data_root = '/Applications/MAMP/dolibarr_documents'; $force_install_type='mysqli';
$force_install_type = 'mysqli'; $force_install_dbserver='localhost';
$force_install_dbserver = 'localhost'; $force_install_port='8889';
$force_install_port = '8889'; $force_install_database='dolibarr';
$force_install_database = 'dolibarr'; $force_install_createdatabase='1';
$force_install_createdatabase = '1'; $force_install_databaselogin='dolibarrmysql';
$force_install_databaselogin = 'dolibarrmysql'; $force_install_databasepass='root';
$force_install_databasepass = 'root'; $force_install_createuser='1';
$force_install_createuser = '1'; $force_install_databaserootlogin='root';
$force_install_databaserootlogin = 'root'; $force_install_databaserootpass='root';
$force_install_databaserootpass = 'root'; $force_install_dolibarrlogin='admin';
$force_install_dolibarrlogin = 'admin'; $force_install_nophpinfo='1';
$force_install_nophpinfo = '1'; $force_install_lockinstall='444';
$force_install_lockinstall = '444';

View File

@@ -1,60 +1,38 @@
FROM php:8.1-apache-bullseye FROM php:7.2-apache
ENV HOST_USER_ID 33
ENV PHP_INI_DATE_TIMEZONE 'UTC' ENV PHP_INI_DATE_TIMEZONE 'UTC'
ENV PHP_INI_MEMORY_LIMIT 256M
RUN apt-get update -y \ RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libldap2-dev libzip-dev zlib1g-dev libicu-dev g++\
&& 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/* \ && rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \ && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install -j$(nproc) calendar intl mysqli pdo_mysql gd soap zip \ && docker-php-ext-install gd \
&& docker-php-ext-install zip \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install -j$(nproc) ldap && \ && docker-php-ext-install ldap \
mv ${PHP_INI_DIR}/php.ini-development ${PHP_INI_DIR}/php.ini && docker-php-ext-install mysqli \
&& docker-php-ext-install calendar \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl \
&& apt-get autoremove --purge -y libjpeg-dev libldap2-dev zlib1g-dev libicu-dev g++
RUN mkdir /var/documents RUN mkdir /var/documents
RUN chown www-data:www-data /var/documents RUN chown www-data /var/documents
COPY docker-run.sh /usr/local/bin/ COPY docker-run.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-run.sh RUN chmod +x /usr/local/bin/docker-run.sh
RUN pecl install xdebug && docker-php-ext-enable xdebug 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 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.mode=debug' >> ${PHP_INI_DIR}/php.ini RUN echo 'xdebug.remote_autostart=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.start_with_request=yes' >> ${PHP_INI_DIR}/php.ini RUN echo 'xdebug.remote_enable=1' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.client_host=host.docker.internal' >> ${PHP_INI_DIR}/php.ini RUN echo 'xdebug.default_enable=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.client_port=9003' >> ${PHP_INI_DIR}/php.ini RUN echo 'xdebug.remote_host=docker.host' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.discover_client_host=true' >> ${PHP_INI_DIR}/php.ini RUN echo 'xdebug.remote_port=9000' >> /usr/local/etc/php/php.ini
#RUN echo 'xdebug.log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini RUN echo 'xdebug.remote_connect_back=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.idekey="netbeans-xdebug"' >> ${PHP_INI_DIR}/php.ini RUN echo 'xdebug.profiler_enable=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> /usr/local/etc/php/php.ini
# set up sendmail config, to use maildev RUN echo '172.17.0.1 docker.host' >> /etc/hosts
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 EXPOSE 80

View File

@@ -1,8 +1,6 @@
# How to use it ? # 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. The docker-compose.yml file is used to build and run Dolibarr in the current workspace.
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: Before build/run, define the variable HOST_USER_ID as following:
@@ -16,7 +14,7 @@ And then, you can run :
docker-compose up docker-compose up
This will run 4 containers Docker : Dolibarr, MariaDB, PhpMyAdmin and MailDev. This will run 3 container Docker : Dolibarr, MariaDB and PhpMyAdmin.
The URL to go to the Dolibarr is : The URL to go to the Dolibarr is :
@@ -26,9 +24,5 @@ The URL to go to PhpMyAdmin is (login/password is root/root) :
http://0.0.0.0:8080 http://0.0.0.0:8080
In Dolibarr configuration Email let PHP mail function, To see all mail send by Dolibarr go to maildev Setup the database connection during the installation process, please use mariad
b (name of the database container) as database host.
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

View File

@@ -1,62 +1,25 @@
version: '3' mariadb:
build: mariadb
networks:
internal-pod:
internal: true
external-pod:
internal: false
services:
mariadb:
image: mariadb:latest
environment: environment:
MYSQL_ROOT_PASSWORD: rootpassfordev MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: dolibarr MYSQL_DATABASE: dolibarr
ports:
- "3306:3306"
networks:
- internal-pod
- external-pod
phpmyadmin: phpmyadmin:
image: phpmyadmin/phpmyadmin image: phpmyadmin/phpmyadmin
environment: environment:
PMA_HOST: mariadb PMA_HOST: mariadb
depends_on: links:
- mariadb - mariadb
ports: ports:
- "8080:80" - "8080:80"
networks:
- internal-pod
- external-pod
web: web:
build: . build: .
environment: environment:
HOST_USER_ID: $HOST_USER_ID HOST_USER_ID: $HOST_USER_ID
PHP_INI_DATE_TIMEZONE: $PHP_INI_DATE_TIMEZONE
PHP_INI_MEMORY_LIMIT: $PHP_INI_MEMORY_LIMIT
volumes: volumes:
- ../../htdocs:/var/www/html/ - ../../htdocs:/var/www/html
- ../../documents:/var/documents links:
- mariadb
ports: ports:
- "80:80" - "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

View File

@@ -1,24 +1,16 @@
#!/bin/bash #!/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 usermod -u $HOST_USER_ID www-data
groupmod -g ${HOST_USER_ID} www-data groupmod -g $HOST_USER_ID www-data
chgrp -hR www-data /var/www/html chgrp -hR www-data /var/www/html
chmod g+rwx /var/www/html/conf chmod g+rwx /var/www/html/conf
if [ ! -d /var/documents ]; then if [ ! -f /usr/local/etc/php/php.ini ]; then
echo "[docker-run] => create volume directory /var/documents ..." cat <<EOF > /usr/local/etc/php/php.ini
mkdir -p /var/documents date.timezone = $PHP_INI_DATE_TIMEZONE
fi display_errors = On
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 EOF
fi
exec apache2-foreground exec apache2-foreground

View File

@@ -17,9 +17,9 @@ use Cwd;
my $dir = getcwd; my $dir = getcwd;
print "Current dir is: $dir\n"; print "Current dir is: $dir\n";
#print "Running dir for doxygen must be: $DIR\n"; print "Running dir for doxygen must be: $DIR\n";
if (! -s "build/doxygen/$CONFFILE") if (! -s $CONFFILE)
{ {
print "Error: current directory for building Dolibarr doxygen documentation is not correct.\n"; print "Error: current directory for building Dolibarr doxygen documentation is not correct.\n";
print "\n"; print "\n";
@@ -30,7 +30,7 @@ if (! -s "build/doxygen/$CONFFILE")
exit 1; exit 1;
} }
$SOURCE="."; $SOURCE="../..";
# Get version $MAJOR, $MINOR and $BUILD # Get version $MAJOR, $MINOR and $BUILD
$result = open( IN, "< " . $SOURCE . "/htdocs/filefunc.inc.php" ); $result = open( IN, "< " . $SOURCE . "/htdocs/filefunc.inc.php" );
@@ -47,8 +47,8 @@ $version=$MAJOR.".".$MINOR.".".$BUILD;
print "Running doxygen for version ".$version.", please wait...\n"; print "Running doxygen for version ".$version.", please wait...\n";
print "cat build/doxygen/$CONFFILE | sed -e 's/x\.y\.z/".$version."/' | doxygen $OPTIONS - 2>&1\n"; print "cat $CONFFILE | sed -e 's/x\.y\.z/".$version."/' | doxygen $OPTIONS - 2>&1\n";
$result=`cat build/doxygen/$CONFFILE | sed -e 's/x\.y\.z/$version/' | doxygen $OPTIONS - 2>&1`; $result=`cat $CONFFILE | sed -e 's/x\.y\.z/$version/' | doxygen $OPTIONS - 2>&1`;
print $result; print $result;

View File

@@ -1,17 +1,14 @@
# Doxyfile 1.8.16 # Doxyfile 1.7.3
# This file describes the settings to be used by the documentation system # This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project. # doxygen (www.doxygen.org) for a project
# #
# All text after a double hash (##) is considered a comment and is placed in # All text after a hash (#) is considered a comment and will be ignored
# front of the TAG it is preceding.
#
# All text after a single hash (#) is considered a comment and will be ignored.
# The format is: # The format is:
# TAG = value [value, ...] # TAG = value [value, ...]
# For lists, items can also be appended using: # For lists items can also be appended using:
# TAG += value [value, ...] # TAG += value [value, ...]
# Values that contain spaces should be placed between quotes (\" \"). # Values that contain spaces should be placed between quotes (" ")
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Project related configuration options # Project related configuration options
@@ -41,7 +38,7 @@ PROJECT_NUMBER = x.y.z
# If a relative path is entered, it will be relative to the location # If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used. # where doxygen was started. If left blank the current directory will be used.
OUTPUT_DIRECTORY = build OUTPUT_DIRECTORY = ../../build
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output # 4096 sub-directories (in 2 levels) under the output directory of each output
@@ -117,7 +114,7 @@ FULL_PATH_NAMES = YES
# If left blank the directory from which doxygen is run is used as the # If left blank the directory from which doxygen is run is used as the
# path to strip. # path to strip.
STRIP_FROM_PATH = "/home/dolibarr/doxygen.dolibarr.org/" STRIP_FROM_PATH = "../.."
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
# the path mentioned in the documentation of a class, which tells # the path mentioned in the documentation of a class, which tells
@@ -220,7 +217,6 @@ OPTIMIZE_OUTPUT_VHDL = NO
# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions # (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. # you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
#EXTENSION_MAPPING = example=PHP
EXTENSION_MAPPING = EXTENSION_MAPPING =
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
@@ -291,7 +287,7 @@ TYPEDEF_HIDES_STRUCT = NO
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # 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 # corresponding to a cache size of 2^16 = 65536 symbols
#SYMBOL_CACHE_SIZE = 0 SYMBOL_CACHE_SIZE = 0
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Build related configuration options # Build related configuration options
@@ -452,7 +448,7 @@ GENERATE_TODOLIST = NO
# disable (NO) the test list. This list is created by putting \test # disable (NO) the test list. This list is created by putting \test
# commands in the documentation. # commands in the documentation.
GENERATE_TESTLIST = NO GENERATE_TESTLIST = YES
# The GENERATE_BUGLIST tag can be used to enable (YES) or # The GENERATE_BUGLIST tag can be used to enable (YES) or
# disable (NO) the bug list. This list is created by putting \bug # disable (NO) the bug list. This list is created by putting \bug
@@ -491,7 +487,7 @@ SHOW_USED_FILES = YES
# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
# in the documentation. The default is NO. # in the documentation. The default is NO.
#SHOW_DIRECTORIES = YES SHOW_DIRECTORIES = YES
# Set the SHOW_FILES tag to NO to disable the generation of the Files page. # Set the SHOW_FILES tag to NO to disable the generation of the Files page.
# This will remove the Files entry from the Quick Index and from the # This will remove the Files entry from the Quick Index and from the
@@ -575,7 +571,7 @@ WARN_FORMAT = "$file:$line: $text"
# and error messages should be written. If left blank the output is written # and error messages should be written. If left blank the output is written
# to stderr. # to stderr.
WARN_LOGFILE = build/html/doxygen_warnings.log WARN_LOGFILE = doxygen_warnings.log
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to the input files # configuration options related to the input files
@@ -586,7 +582,7 @@ WARN_LOGFILE = build/html/doxygen_warnings.log
# directories like "/usr/src/myproject". Separate the files or directories # directories like "/usr/src/myproject". Separate the files or directories
# with spaces. # with spaces.
INPUT = htdocs scripts INPUT = ../../htdocs ../../scripts
# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
@@ -603,7 +599,6 @@ INPUT_ENCODING = UTF-8
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
#FILE_PATTERNS = *.php *.pl *.sql *.example
FILE_PATTERNS = *.php *.pl FILE_PATTERNS = *.php *.pl
# The RECURSIVE tag can be used to turn specify whether or not subdirectories # The RECURSIVE tag can be used to turn specify whether or not subdirectories
@@ -616,7 +611,7 @@ RECURSIVE = YES
# excluded from the INPUT source files. This way you can easily exclude a # excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag. # subdirectory from a directory tree whose root is specified with the INPUT tag.
EXCLUDE = build dev doc document documents htdocs/conf/conf.php htdocs/custom htdocs/document htdocs/documents htdocs/includes htdocs/install/doctemplates EXCLUDE = ../../build ../../dev ../../doc ../../document ../../documents ../../htdocs/conf/conf.php ../../htdocs/custom ../../htdocs/document ../../htdocs/documents ../../htdocs/includes
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or # The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded # directories that are symbolic links (a Unix filesystem feature) are excluded
@@ -630,7 +625,7 @@ EXCLUDE_SYMLINKS = YES
# against the file with absolute path, so to exclude all test directories # against the file with absolute path, so to exclude all test directories
# for example use the pattern */test/* # for example use the pattern */test/*
EXCLUDE_PATTERNS = */CVS/* EXCLUDE_PATTERNS = */CVS/* *google* *pibarcode*
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the # (namespaces, classes, functions, etc.) that should be excluded from the
@@ -644,27 +639,27 @@ EXCLUDE_SYMBOLS =
# directories that contain example code fragments that are included (see # directories that contain example code fragments that are included (see
# the \include command). # the \include command).
#EXAMPLE_PATH = htdocs/modulebuilder/template EXAMPLE_PATH = ../../htdocs/modulebuilder/template
# If the value of the EXAMPLE_PATH tag contains directories, you can use the # If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
# and *.h) to filter out the source-files in the directories. If left # and *.h) to filter out the source-files in the directories. If left
# blank all files are included. # blank all files are included.
#EXAMPLE_PATTERNS = *.php EXAMPLE_PATTERNS = *.php
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
# searched for input files to be used with the \include or \dontinclude # searched for input files to be used with the \include or \dontinclude
# commands irrespective of the value of the RECURSIVE tag. # commands irrespective of the value of the RECURSIVE tag.
# Possible values are YES and NO. If left blank NO is used. # Possible values are YES and NO. If left blank NO is used.
#EXAMPLE_RECURSIVE = NO EXAMPLE_RECURSIVE = NO
# The IMAGE_PATH tag can be used to specify one or more files or # The IMAGE_PATH tag can be used to specify one or more files or
# directories that contain image that are included in the documentation (see # directories that contain image that are included in the documentation (see
# the \image command). # the \image command).
IMAGE_PATH = doc/images IMAGE_PATH = ../../doc/images
# The INPUT_FILTER tag can be used to specify a program that doxygen should # The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program # invoke to filter for each input file. Doxygen will invoke the filter program
@@ -767,7 +762,7 @@ ALPHABETICAL_INDEX = YES
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
# in which this list will be split (can be a number in the range [1..20]) # in which this list will be split (can be a number in the range [1..20])
#COLS_IN_ALPHA_INDEX = 5 COLS_IN_ALPHA_INDEX = 5
# In case all classes in a project start with a common prefix, all # In case all classes in a project start with a common prefix, all
# classes will be put under the same header in the alphabetical index. # classes will be put under the same header in the alphabetical index.
@@ -780,16 +775,14 @@ IGNORE_PREFIX =
# configuration options related to the HTML output # configuration options related to the HTML output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # If the GENERATE_HTML tag is set to YES (the default) Doxygen will
# The default value is: YES. # generate HTML output.
GENERATE_HTML = YES GENERATE_HTML = YES
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # If a relative path is entered the value of OUTPUT_DIRECTORY will be
# it. # put in front of it. If left blank `html' will be used as the default path.
# The default directory is: html.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_OUTPUT = html HTML_OUTPUT = html
@@ -804,14 +797,14 @@ HTML_FILE_EXTENSION = .html
# standard header. # standard header.
# Does not work with 1.7.3 # Does not work with 1.7.3
#HTML_HEADER = build/doxygen/doxygen_header.html #HTML_HEADER = doxygen_header.html
# The HTML_FOOTER tag can be used to specify a personal HTML footer for # The HTML_FOOTER tag can be used to specify a personal HTML footer for
# each generated HTML page. If it is left blank doxygen will generate a # each generated HTML page. If it is left blank doxygen will generate a
# standard footer. # standard footer.
# Does not work with 1.7.3 # Does not work with 1.7.3
HTML_FOOTER = build/doxygen/doxygen_footer.html HTML_FOOTER = doxygen_footer.html
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading # The HTML_STYLESHEET tag can be used to specify a user-defined cascading
# style sheet that is used by each HTML page. It can be used to # style sheet that is used by each HTML page. It can be used to
@@ -857,18 +850,7 @@ HTML_TIMESTAMP = YES
# files or namespaces will be aligned in HTML using tables. If set to # files or namespaces will be aligned in HTML using tables. If set to
# NO a bullet list will be used. # NO a bullet list will be used.
#HTML_ALIGN_MEMBERS = YES HTML_ALIGN_MEMBERS = YES
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
# documentation will contain a main index with vertical navigation menus that
# are dynamically created via Javascript. If disabled, the navigation index will
# consists of multiple levels of tabs that are statically embedded in every HTML
# page. Disable this option to support browsers that do not have Javascript,
# like the Qt help browser.
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_DYNAMIC_MENUS = NO
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the # documentation will contain sections that can be hidden and shown after the
@@ -876,7 +858,7 @@ HTML_DYNAMIC_MENUS = NO
# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
HTML_DYNAMIC_SECTIONS = NO HTML_DYNAMIC_SECTIONS = YES
# If the GENERATE_DOCSET tag is set to YES, additional index files # If the GENERATE_DOCSET tag is set to YES, additional index files
# will be generated that can be used as input for Apple's Xcode 3 # will be generated that can be used as input for Apple's Xcode 3
@@ -1021,7 +1003,7 @@ QHG_LOCATION =
# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
# the help appears. # the help appears.
GENERATE_ECLIPSEHELP = NO GENERATE_ECLIPSEHELP = YES
# A unique identifier for the eclipse help plugin. When installing the plugin # A unique identifier for the eclipse help plugin. When installing the plugin
# the directory name containing the HTML and XML files should also have # the directory name containing the HTML and XML files should also have
@@ -1053,7 +1035,7 @@ GENERATE_TREEVIEW = NO
# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
# and Class Hierarchy pages using a tree view instead of an ordered list. # and Class Hierarchy pages using a tree view instead of an ordered list.
#USE_INLINE_TREES = NO USE_INLINE_TREES = NO
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
# used to set the initial width (in pixels) of the frame in which the tree # used to set the initial width (in pixels) of the frame in which the tree
@@ -1090,7 +1072,7 @@ FORMULA_TRANSPARENT = YES
# typically be disabled. For large projects the javascript based search engine # typically be disabled. For large projects the javascript based search engine
# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
SEARCHENGINE = YES SEARCHENGINE = NO
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be # When the SERVER_BASED_SEARCH tag is enabled the search engine will be
# implemented using a PHP enabled web server instead of at the web client # implemented using a PHP enabled web server instead of at the web client
@@ -1100,7 +1082,7 @@ SEARCHENGINE = YES
# full text search. The disadvances is that it is more difficult to setup # full text search. The disadvances is that it is more difficult to setup
# and does not have live searching capabilities. # and does not have live searching capabilities.
SERVER_BASED_SEARCH = YES SERVER_BASED_SEARCH = NO
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to the LaTeX output # configuration options related to the LaTeX output
@@ -1278,13 +1260,13 @@ XML_OUTPUT = xml
# which can be used by a validating XML parser to check the # which can be used by a validating XML parser to check the
# syntax of the XML files. # syntax of the XML files.
#XML_SCHEMA = XML_SCHEMA =
# The XML_DTD tag can be used to specify an XML DTD, # The XML_DTD tag can be used to specify an XML DTD,
# which can be used by a validating XML parser to check the # which can be used by a validating XML parser to check the
# syntax of the XML files. # syntax of the XML files.
#XML_DTD = XML_DTD =
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will # If the XML_PROGRAMLISTING tag is set to YES Doxygen will
# dump the program listings (including syntax highlighting # dump the program listings (including syntax highlighting
@@ -1449,7 +1431,7 @@ EXTERNAL_GROUPS = YES
# The PERL_PATH should be the absolute path and name of the perl script # The PERL_PATH should be the absolute path and name of the perl script
# interpreter (i.e. the result of `which perl'). # interpreter (i.e. the result of `which perl').
#PERL_PATH = /usr/bin/perl PERL_PATH = /usr/bin/perl
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the dot tool # Configuration options related to the dot tool
@@ -1471,7 +1453,7 @@ CLASS_DIAGRAMS = NO
# the mscgen tool resides. If left empty the tool is assumed to be found in the # the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path. # default search path.
#MSCGEN_PATH = MSCGEN_PATH =
# If set to YES, the inheritance and collaboration graphs will hide # If set to YES, the inheritance and collaboration graphs will hide
# inheritance and usage relations if the target is undocumented # inheritance and usage relations if the target is undocumented
@@ -1503,7 +1485,7 @@ DOT_NUM_THREADS = 0
# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory # DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
# containing the font. # containing the font.
#DOT_FONTNAME = FreeSans.ttf DOT_FONTNAME = FreeSans.ttf
# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
# The default size is 10pt. # The default size is 10pt.
@@ -1652,7 +1634,3 @@ GENERATE_LEGEND = YES
# the various graphs. # the various graphs.
DOT_CLEANUP = YES DOT_CLEANUP = YES
FULL_SIDEBAR = NO
HTML_EXTRA_STYLESHEET = build/doxygen/doxygen-awesome.css

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>Dolibarr source code documentation</title> <title>$title</title>
<!-- from dolibarr.org --> <!-- from dolibarr.org -->
<meta http-equiv="Content-Type" content="text/html" charset=utf-8 /> <meta http-equiv="Content-Type" content="text/html" charset=utf-8 />
<meta name="verify-v1" <meta name="verify-v1"

View File

@@ -1 +1 @@
/doliwamp.tmp.iss* /doliwamp.tmp.iss

View File

@@ -43,5 +43,5 @@ DoliWampWillStartApacheMysql=L'instal·lador DoliWamp intentarà iniciar o reini
OldVersionFoundAndMoveInNew=S'ha trobat una versió antiga de base de dades i ha estat moguda per a ser utilitzada per la nova versió de Dolibarr OldVersionFoundAndMoveInNew=S'ha trobat una versió antiga de base de dades i ha estat moguda per a ser utilitzada per la nova versió de Dolibarr
OldVersionFoundButFailedToMoveInNew=S'ha trobat una versió antiga de base de dades, però no es pot moure per a ser utilitzada per la nova versió de Dolibarr OldVersionFoundButFailedToMoveInNew=S'ha trobat una versió antiga de base de dades, però no es pot moure per a ser utilitzada per la nova versió de Dolibarr
DLLMissing=La teva instal·lació windows no té el component "Microsoft Visual C++ Redistributable for Visual Studio 2017". Instal·la primer la versió de 32-bit (vcredist_x86.exe) (pots trobar-la a https://www.microsoft.com/en-us/download/) i reiniciar després la instal·lació/actualització de DoliWamp. DLLMissing=La teva instal·lació windows no té el component "Microsoft Visual C++ Redistributable for Visual Studio 2012". Instal·la primer la versió de 32-bit (vcredist_x86.exe) (pots trobar-la a https://www.microsoft.com/en-us/download/) i reiniciar després la instal·lació/actualització de DoliWamp.
ContinueAnyway=Continua igualment (el procés d'instal·lació podria fallar sense aquest prerequisit) ContinueAnyway=Continua igualment (el procés d'instal·lació podria fallar sense aquest prerequisit)

View File

@@ -11,38 +11,38 @@ LaunchProgram=Launch %1
AssocFileExtension=&Associate %1 with the %2 file extension AssocFileExtension=&Associate %1 with the %2 file extension
AssocingFileExtension=Associating %1 with the %2 file extension... AssocingFileExtension=Associating %1 with the %2 file extension...
YouWillInstallDoliWamp=You will install DoliWamp (so Dolibarr plus all required third-party software like Apache, MySQL and PHP) on your computer. YouWillInstallDoliWamp=You will install DoliWamp (so Dolibarr + all required third party software like Apache, Mysql and PHP) on your computer.
ThisAssistantInstallOrUpgrade=WARNING: Using an ERP CRM installed on a local computer can be dangerous: if your computer breaks down, you can lose all your data. Do this if you are ready to manage backups yourself seriously. If not, use an installation in SaaS instead (see https://saas.dolibarr.org). ThisAssistantInstallOrUpgrade=WARNING: Using an ERP CRM installed on a local computer can be dangerous: if your computer break down, you can lose all your data. Do this if you are ready to manage backup yourself seriously. If not, use an installation in Saas instead (see https://saas.dolibarr.org).
IfYouHaveTechnicalKnowledge=Moreover, if you have technical knowledge and want to manage Apache, MySQL and PHP yourself, you should not use this assistant and instead make a manual installation of Dolibarr on your existing server with Apache, MySQL and PHP. IfYouHaveTechnicalKnowledge=Moreover, if you have technical knowledges and want to manage your Apache, Mysql and PHP yourself, you should not use this assistant and make a manual installation of Dolibarr on your existing server with Apache, Mysql and PHP.
ButIfYouLook=But if you are looking for an automatic setup on your local computer, you're on the right path... ButIfYouLook=But if you look for an automatic setup on your local computer, you''re on the good way...
DoYouWantToStart=Do you want to start the installation process? DoYouWantToStart=Do you want to start installation process ?
TechnicalParameters=Technical parameters TechnicalParameters=Technical parameters
IfFirstInstall=If this is the first install, please specify some technical parameters. If you don't understand, are not sure, or are doing an upgrade, just keep the default values. IfFirstInstall=If first install, please specify some technical parameters. If you don't understand, are not sure, or are doing an upgrade, just leave the default values.
; WARNING !!! STRINGS HERE MUST BE LOWER THAN 60 CHARACTERS ; WARNING !!! STRINGS HERE MUST BE LOWER THAN 60 CHARACTERS
SMTPServer=SMTP server (your own or ISP SMTP server, first install only): SMTPServer=SMTP server (your own or ISP SMTP server, first install only) :
ApachePort=Apache port (first install only, common choice is 80): ApachePort=Apache port (first install only, common choice is 80) :
MySqlPort=MySQL port (first install only, common choice is 3306): MySqlPort=MySql port (first install only, common choice is 3306) :
MySqlPassword=MySQL server and database password you want for root (first install only): MySqlPassword=MySql server and database password you want for root (first install only):
FailedToDeleteLock=Failed to delete the file %1/www/dolibarr/install.lock. You can ignore this warning but you may have to remove the file manually later when asked. Click OK to continue... FailedToDeleteLock=Failed to delete the file %1/www/dolibarr/install.lock. You can ignore warning but you may have to remove it manually later when asked. Click OK to continue...
PortAlreadyInUse=Port %1 seems to already be in use. You should cancel to go back and choose another value for %2 port. Cancel choice and choose another value? PortAlreadyInUse=Port %1 seems to be already in use. You should cancel to go back and choose another value for %2 port. Cancel choice and choose another value ?
FirefoxDetected=Firefox has been detected on your computer. Would you like to use it as the default browser for Dolibarr? FirefoxDetected=Firefox has been detected on your computer. Would you like to use it as the default browser for Dolibarr ?
ChromeDetected=Chrome has been detected on your computer. Would you like to use it as the default browser for Dolibarr? ChromeDetected=Chrome has been detected on your computer. Would you like to use it as the default browser for Dolibarr ?
MicrosoftEdgeDetected=Microsoft Edge has been detected on your computer. Would you like to use it as the default browser for Dolibarr? MicrosoftEdgeDetected=Microsoft Edge has been detected on your computer. Would you like to use it as the default browser for Dolibarr ?
ChooseDefaultBrowser=Please choose your default browser (iexplore.exe, firefox.exe, chrome.exe, MicrosoftEdge.exe...). If you are not sure, just click Open: ChooseDefaultBrowser=Please choose your default browser (iexplore.exe, firefox.exe, chrome.exe, MicrosoftEdge.exe...). If you are not sure, just click Open :
LaunchNow=Launch Dolibarr now LaunchNow=Launch Dolibarr now
ProgramHasBeenRemoved=Dolibarr's program files have been removed. However, all your data files are still in directory %1. You must remove this directory manually for a complete uninstall. ProgramHasBeenRemoved=Dolibarr program files have been removed. However, all your data files are still in directory %1. You must remove this directory manually for a complete uninstall.
DoliWampWillStartApacheMysql=DoliWamp installer will now start or restart Apache and MySQL. This may take from several seconds to one minute. Start to install or upgrade the web and database server required by Dolibarr? DoliWampWillStartApacheMysql=DoliWamp installer will now start or restart Apache and Mysql, this may last from several seconds to one minute after this confirmation. Start to install or upgrade the web and database server required by Dolibarr ?
OldVersionFoundAndMoveInNew=An old database version has been found and moved to be used by the new Dolibarr version OldVersionFoundAndMoveInNew=An old database version has been found and moved to be used by new Dolibarr version
OldVersionFoundButFailedToMoveInNew=An old database version has been found but could not be moved to be used with the new Dolibarr version OldVersionFoundButFailedToMoveInNew=An old database version has been found but could not be moved to be used with new Dolibarr version
DLLMissing=Your Windows installation is missing The "Microsoft Visual C++ Redistributable for Visual Studio 2017" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170) and restart DoliWamp installation/upgrade after. DLLMissing=Your Windows installation is missing The "Micrsoft Visual C++ Redistributable for Visual Studio 2012" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://www.microsoft.com/en-us/download/) and restart DoliWamp installation/upgrade after.
ContinueAnyway=Continue anyway (install process may fail without this prerequisite) ContinueAnyway=Continue anyway (install process may fails without this prerequisite)

View File

@@ -44,5 +44,5 @@ DoliWampWillStartApacheMysql=L'installeur DoliWamp va maintenant d
OldVersionFoundAndMoveInNew=Une ancienne version de base a <20>t<EFBFBD> trouv<75>e et d<>plac<61>e pour fonctionner avec la nouvelle version de Dolibarr. OldVersionFoundAndMoveInNew=Une ancienne version de base a <20>t<EFBFBD> trouv<75>e et d<>plac<61>e pour fonctionner avec la nouvelle version de Dolibarr.
OldVersionFoundButFailedToMoveInNew=Une ancienne version de base a <20>t<EFBFBD> trouv<75>e mais ne peut <20>tre d<>plac<61>e pour <20>tre utilis<69>e avec la nouvelle version de Dolibarr. OldVersionFoundButFailedToMoveInNew=Une ancienne version de base a <20>t<EFBFBD> trouv<75>e mais ne peut <20>tre d<>plac<61>e pour <20>tre utilis<69>e avec la nouvelle version de Dolibarr.
DLLMissing=L'installation de votre Windows est incompl<70>te. Il manque le composant "Micrsoft Visual C++ Redistributable for Visual Studio 2017". Installer la version 32-bit (vcredist_x86.exe) d'abord (vous pourrez le trouver <20> https://www.microsoft.com/fr-fr/download/) puis relancer l'installation de DoliWamp apr<70>s. DLLMissing=L'installation de votre Windows est incompl<70>te. Il manque le composant "Micrsoft Visual C++ Redistributable for Visual Studio 2012". Installer la version 32-bit (vcredist_x86.exe) d'abord (vous pourrez le trouver <20> https://www.microsoft.com/fr-fr/download/) puis relancer l'installation de DoliWamp apr<70>s.
ContinueAnyway=Continuer malgr<67> tout (le process d'installaton <20>chouera) ContinueAnyway=Continuer malgr<67> tout (le process d'installaton <20>chouera)

View File

@@ -43,5 +43,5 @@ DoliWampWillStartApacheMysql=Die DoliWamp-Installation wird nun starten oder Apa
OldVersionFoundAndMoveInNew=Eine alte Datenbankversion wurde gefunden und verschoben, um von der neuen Dolibarr-Version verwendet zu werden. OldVersionFoundAndMoveInNew=Eine alte Datenbankversion wurde gefunden und verschoben, um von der neuen Dolibarr-Version verwendet zu werden.
OldVersionFoundButFailedToMoveInNew=Eine alte Datenbankversion wurde gefunden, konnte jedoch nicht verschoben werden, um mit der neuen Dolibarr-Version verwendet zu werden. OldVersionFoundButFailedToMoveInNew=Eine alte Datenbankversion wurde gefunden, konnte jedoch nicht verschoben werden, um mit der neuen Dolibarr-Version verwendet zu werden.
DLLMissing=Your Windows installation is missing The "Micrsoft Visual C++ Redistributable for Visual Studio 2017" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://www.microsoft.com/en-us/download/) and restart DoliWamp installation/upgrade after. DLLMissing=Your Windows installation is missing The "Micrsoft Visual C++ Redistributable for Visual Studio 2012" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://www.microsoft.com/en-us/download/) and restart DoliWamp installation/upgrade after.
ContinueAnyway=Fahren Sie trotzdem fort (der Installationsvorgang kann ohne diese Voraussetzung fehlschlagen). ContinueAnyway=Fahren Sie trotzdem fort (der Installationsvorgang kann ohne diese Voraussetzung fehlschlagen).

View File

@@ -43,5 +43,5 @@ DoliWampWillStartApacheMysql=El instalador DoliWamp intentará iniciar o reinici
OldVersionFoundAndMoveInNew=Se ha encontrado una versión antigua de base de datos y ha sido movida para ser utilizada por la nueva versión de Dolibarr OldVersionFoundAndMoveInNew=Se ha encontrado una versión antigua de base de datos y ha sido movida para ser utilizada por la nueva versión de Dolibarr
OldVersionFoundButFailedToMoveInNew=Se ha encontrado una versión antigua de base de datos, pero no se pudo mover para ser utilizada por la nueva versión de Dolibarr OldVersionFoundButFailedToMoveInNew=Se ha encontrado una versión antigua de base de datos, pero no se pudo mover para ser utilizada por la nueva versión de Dolibarr
DLLMissing=Su instalación Windows no tiene el componente "Microsoft Visual C++ Redistributable for Visual Studio 2017". Instale primero la versión de 32-bit (vcredist_x86.exe) (puedes encontrarlo en https://www.microsoft.com/en-us/download/) y reiniciar después la instalación/actualización de DoliWamp. DLLMissing=Su instalación Windows no tiene el componente "Microsoft Visual C++ Redistributable for Visual Studio 2012". Instale primero la versión de 32-bit (vcredist_x86.exe) (puedes encontrarlo en https://www.microsoft.com/en-us/download/) y reiniciar después la instalación/actualización de DoliWamp.
ContinueAnyway=Continua igualmente (el proceso de instalación podría fallar sin este prerequisito) ContinueAnyway=Continua igualmente (el proceso de instalación podría fallar sin este prerequisito)

View File

@@ -1,5 +1,5 @@
#-------------------------------------------------------------------# #-------------------------------------------------------------------#
# Makefile to build UsedPort exe # Makefile
#-------------------------------------------------------------------# #-------------------------------------------------------------------#
# 1.0 Laurent Destailleur Creation # 1.0 Laurent Destailleur Creation
#-------------------------------------------------------------------# #-------------------------------------------------------------------#

View File

@@ -5,9 +5,6 @@ It's a dedicated Dolibarr version for Windows newbies with no technical knowledg
This directory contains files used by *makepack-dolibarr.pl* script to build the all-in-on .EXE package DoliWamp, ready This directory contains files used by *makepack-dolibarr.pl* script to build the all-in-on .EXE package DoliWamp, ready
to be distributed (for Windows). to be distributed (for Windows).
The build of .exe files need to have some windows executable files already installed (Apache, MariaDb). The package to install to get this files are defined into the file *doliwamp.iss* (searhc line starting with "; Value OK:")
If you have technical knowledge in web administration and plan to share your server instance (Apache, Mysql or PHP) with other projects than Dolibarr or want to use Dolibarr other components (PostgreSQL), you should not use this assistant and make a manual installation of Dolibarr on your existing server by downloading the standard package (.tgz or .zip file). If you have technical knowledge in web administration and plan to share your server instance (Apache, Mysql or PHP) with other projects than Dolibarr or want to use Dolibarr other components (PostgreSQL), you should not use this assistant and make a manual installation of Dolibarr on your existing server by downloading the standard package (.tgz or .zip file).
!!! See file ../makepack-howto.txt

View File

@@ -253,7 +253,6 @@ int main(int argc, char **argv)
//---------------- //----------------
int noarg,curseurarg,help=0,invalide=0; int noarg,curseurarg,help=0,invalide=0;
char option; char option;
char *endptr;
for (noarg=1;noarg<argc;noarg++) { for (noarg=1;noarg<argc;noarg++) {
if (((argv[noarg][0])=='/') || ((argv[noarg][0])=='-')) { if (((argv[noarg][0])=='/') || ((argv[noarg][0])=='-')) {
@@ -262,7 +261,7 @@ for (noarg=1;noarg<argc;noarg++) {
if (strlen(argv[noarg]) < 3) { ++noarg; curseurarg=0; } if (strlen(argv[noarg]) < 3) { ++noarg; curseurarg=0; }
switch (option) { switch (option) {
case 's': strncpy(Host,argv[noarg]+curseurarg,sizeof(Host)); break; case 's': strncpy(Host,argv[noarg]+curseurarg,sizeof(Host)); break;
case 'p': Port=strtol(argv[noarg] + curseurarg, &endptr, 10); break; // Get port from "-p80" (curseurarg = 2) or "-p 80" (curseurarg = 0) case 'p': Port=atoi(argv[noarg]+curseurarg); break;
case '?': help=-1;break; // Help case '?': help=-1;break; // Help
case 'h': help=-1;break; // Help case 'h': help=-1;break; // Help
case 'v': help=-1;break; // Help case 'v': help=-1;break; // Help
@@ -271,20 +270,6 @@ for (noarg=1;noarg<argc;noarg++) {
} }
} }
// Check for conversion errors
if (*endptr != '\0') {
// Handle error: Invalid input format
printf("Invalid port number format\n");
exit(-1);
}
// Check for overflow
if (Port < 0 || Port > INT_MAX) {
// Handle error: Port number out of range
printf("Port number out of range\n");
exit(-1);
}
help=!(Port > 0); help=!(Port > 0);
// Show usage // Show usage

View File

@@ -1,4 +1,5 @@
<?php <?php
/* !!! DO NOT EDIT THIS FILE, EDIT config.inc.php INSTEAD !!! */ /* !!! DO NOT EDIT THIS FILE, EDIT config.inc.php INSTEAD !!! */
// vim: expandtab sw=4 ts=4 sts=4: // vim: expandtab sw=4 ts=4 sts=4:

View File

@@ -24,14 +24,15 @@ OutputBaseFilename=__FILENAMEEXEDOLIWAMP__
;OutputManifestFile=build\doliwampbuild.log ;OutputManifestFile=build\doliwampbuild.log
; Define full path from which all relative path are defined ; Define full path from which all relative path are defined
; You must modify this to put here your dolibarr root directory ; You must modify this to put here your dolibarr root directory
;SourceDir=Z:\home\ldestailleur\git\dolibarrxxx
SourceDir=..\..\.. SourceDir=..\..\..
AppId=doliwamp AppId=doliwamp
AppPublisher=DoliCloud AppPublisher=NLTechno
AppPublisherURL=https://www.dolicloud.com AppPublisherURL=https://www.nltechno.com
AppSupportURL=https://www.dolibarr.org AppSupportURL=https://www.dolibarr.org
AppUpdatesURL=https://www.dolibarr.org AppUpdatesURL=https://www.dolibarr.org
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql software. AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql software.
AppCopyright=Copyright (C) 2008-2022 Laurent Destailleur (DoliCloud), Fabian Rodriguez (Le Goût du Libre) AppCopyright=Copyright (C) 2008-2020 Laurent Destailleur (NLTechno), Fabian Rodriguez (Le Goût du Libre)
DefaultDirName=c:\dolibarr DefaultDirName=c:\dolibarr
DefaultGroupName=Dolibarr DefaultGroupName=Dolibarr
;LicenseFile=COPYING ;LicenseFile=COPYING
@@ -80,7 +81,7 @@ Name: "desktopicon"; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:
Name: "{app}\logs" Name: "{app}\logs"
Name: "{app}\tmp" Name: "{app}\tmp"
Name: "{app}\dolibarr_documents" Name: "{app}\dolibarr_documents"
Name: "{app}\bin\apache\apache2.4.51\logs" Name: "{app}\bin\apache\apache2.4.41\logs"
[Files] [Files]
; Stop/start ; Stop/start
@@ -98,30 +99,41 @@ Source: "build\exe\doliwamp\startdoliwamp_manual_donotuse.bat.install"; DestDir:
Source: "build\exe\doliwamp\builddemosslfiles.bat.install"; DestDir: "{app}\"; Flags: ignoreversion; Source: "build\exe\doliwamp\builddemosslfiles.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversion; Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversion;
; Apache, Php, Mysql ; PhpMyAdmin, Apache, Php, Mysql
; Put here path of Wampserver applications ; Put here path of Wampserver applications
; Value OK: apache 2.4.51, php 7.4.26, mariadb10.6.5 (wampserver3.2.6_x64.exe) ; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45
Source: "C:\wamp64\bin\apache\apache2.4.51\*.*"; DestDir: "{app}\bin\apache\apache2.4.51"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log" ; Value OK: apache 2.2.11, php 5.3.0 (if no php_exif, php_pgsql, php_zip), mysql 5.0.45
Source: "C:\wamp64\bin\php\php7.4.26\*.*"; DestDir: "{app}\bin\php\php7.4.26"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log" ; Value OK: apache 2.4.9, php 5.5.12, mysql 5.0.45 instead of 5.6.17 (wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe)
Source: "C:\wamp64\bin\mariadb\mariadb10.6.5\*.*"; DestDir: "{app}\bin\mariadb\mariadb10.6.5"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe" ; Value OK: apache 2.4.41, php 7.3.12, mariadb10.4.10 (wampserver3.2.0_x64.exe)
Source: "C:\wamp64\apps\phpmyadmin4.9.2\*.*"; DestDir: "{app}\apps\phpmyadmin4.9.2"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange"
;Source: "C:\Program Files\Wamp\bin\apache\apache2.4.9\*.*"; DestDir: "{app}\bin\apache\apache2.4.9"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
Source: "C:\wamp64\bin\apache\apache2.4.41\*.*"; DestDir: "{app}\bin\apache\apache2.4.41"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
;Source: "C:\Program Files\Wamp\bin\php\php5.5.12\*.*"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
Source: "C:\wamp64\bin\php\php7.3.12\*.*"; DestDir: "{app}\bin\php\php7.3.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
;Source: "C:\Program Files\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
Source: "C:\wamp64\bin\mariadb\mariadb10.4.10\*.*"; DestDir: "{app}\bin\mariadb\mariadb10.4.10"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
; Mysql data files (does not overwrite if exists) ; Mysql data files (does not overwrite if exists)
; We must copy them because the tool mysql_install_db.exe to generate them at first install does not return to prompt so make install hang ; We must copy them because the tool mysql_install_db.exe to generate them at first install does not return to prompt so make install hang
;Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mariadb\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db" ;Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mariadb\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db"
; Dolibarr ; Dolibarr
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,documents\*,includes\ckeditor\_source\*,includes\savant\*,includes\phpmailer\*,jquery\plugins\template\*,nltechno*\*,sabre\sabre\*\tests,tcpdf\fonts\dejavu-fonts-ttf-2.33\*,tcpdf\fonts\freefont-20100919\*,tcpdf\fonts\utils\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\conf.php.sav,*\install.forced.php" Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,documents\*,includes\ckeditor\_source\*,includes\savant\*,includes\phpmailer\*,jquery\plugins\template\*,nltechno*\*,sabre\sabre\*\tests,PHPExcel\Shared\PDF\*,PHPExcel\Shared\PCLZip\*,tcpdf\fonts\dejavu-fonts-ttf-2.33\*,tcpdf\fonts\freefont-20100919\*,tcpdf\fonts\utils\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\conf.php.sav,*\install.forced.php"
Source: "dev\*.*"; DestDir: "{app}\www\dolibarr\dev"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,dbmodel\*,fpdf\*,initdata\*,initdemo\*,iso-normes\*,licence\*,phpcheckstyle\*,phpunit\*,samples\*,test\*,uml\*,vagrant\*,xdebug\*" Source: "dev\*.*"; DestDir: "{app}\www\dolibarr\dev"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,dbmodel\*,fpdf\*,initdata\*,initdemo\*,iso-normes\*,licence\*,phpcheckstyle\*,phpunit\*,samples\*,test\*,uml\*,vagrant\*,xdebug\*"
Source: "doc\*.*"; DestDir: "{app}\www\dolibarr\doc"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,wiki\*,plaquette\*,dev\*,images\dolibarr_screenshot2.png,images\dolibarr_screenshot3.png,images\dolibarr_screenshot4.png,images\dolibarr_screenshot5.png,images\dolibarr_screenshot6.png,images\dolibarr_screenshot7.png,images\dolibarr_screenshot8.png,images\dolibarr_screenshot9.png,images\dolibarr_screenshot10.png,images\dolibarr_screenshot11.png,images\dolibarr_screenshot12.png" Source: "doc\*.*"; DestDir: "{app}\www\dolibarr\doc"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,wiki\*,plaquette\*,dev\*,images\dolibarr_screenshot2.png,images\dolibarr_screenshot3.png,images\dolibarr_screenshot4.png,images\dolibarr_screenshot5.png,images\dolibarr_screenshot6.png,images\dolibarr_screenshot7.png,images\dolibarr_screenshot8.png,images\dolibarr_screenshot9.png,images\dolibarr_screenshot10.png,images\dolibarr_screenshot11.png,images\dolibarr_screenshot12.png"
Source: "scripts\*.*"; DestDir: "{app}\www\dolibarr\scripts"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,product\materiel.net.php,product\import-product.php" Source: "scripts\*.*"; DestDir: "{app}\www\dolibarr\scripts"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,product\materiel.net.php,product\import-product.php"
Source: "*.*"; DestDir: "{app}\www\dolibarr"; Flags: ignoreversion; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,default.properties,install.lock" Source: "*.*"; DestDir: "{app}\www\dolibarr"; Flags: ignoreversion; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,default.properties,install.lock"
; Config files ; Config files
Source: "build\exe\doliwamp\phpmyadmin.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion;
Source: "build\exe\doliwamp\dolibarr.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion; Source: "build\exe\doliwamp\dolibarr.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion;
Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.51\conf"; Flags: ignoreversion; Source: "build\exe\doliwamp\config.inc.php.install"; DestDir: "{app}\apps\phpmyadmin4.1.14"; Flags: ignoreversion;
;Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.9\conf"; Flags: ignoreversion;
Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.41\conf"; Flags: ignoreversion;
Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion; Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion;
Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mariadb\mariadb10.6.5"; Flags: ignoreversion; Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mariadb\mariadb10.4.10"; Flags: ignoreversion;
Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php7.4.26"; Flags: ignoreversion; ;Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion;
Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php7.3.12"; Flags: ignoreversion;
Source: "build\exe\doliwamp\index.php.install"; DestDir: "{app}\www"; Flags: ignoreversion; Source: "build\exe\doliwamp\index.php.install"; DestDir: "{app}\www"; Flags: ignoreversion;
Source: "build\exe\doliwamp\install.forced.php.install"; DestDir: "{app}\www\dolibarr\htdocs\install"; Flags: ignoreversion; Source: "build\exe\doliwamp\install.forced.php.install"; DestDir: "{app}\www\dolibarr\htdocs\install"; Flags: ignoreversion;
Source: "build\exe\doliwamp\openssl.conf"; DestDir: "{app}"; Flags: ignoreversion; Source: "build\exe\doliwamp\openssl.conf"; DestDir: "{app}"; Flags: ignoreversion;
@@ -184,6 +196,7 @@ var destFileA: String;
var srcContents: String; var srcContents: String;
var browser: String; var browser: String;
var mysqlVersion: String; var mysqlVersion: String;
var phpmyadminVersion: String;
var phpDllCopy: String; var phpDllCopy: String;
var batFile: String; var batFile: String;
@@ -227,9 +240,13 @@ procedure InitializeWizard();
begin begin
//version des applis, a modifier pour chaque version de WampServer 2 //version des applis, a modifier pour chaque version de WampServer 2
apacheVersion := '2.4.51'; //apacheVersion := '2.4.9';
phpVersion := '7.4.26' ; //phpVersion := '5.5.12' ;
mysqlVersion := '10.6.5'; apacheVersion := '2.4.41';
phpVersion := '7.3.12' ;
//mysqlVersion := '5.0.45';
mysqlVersion := '10.4.10';
phpmyadminVersion := '4.1.14';
smtpServer := 'localhost'; smtpServer := 'localhost';
apachePort := '80'; apachePort := '80';
@@ -363,9 +380,9 @@ begin
// Migration of database // Migration of database
// datadir := pathWithSlashes+'/bin/mariadb/mariadb10.6.5/data'; // datadir := pathWithSlashes+'/bin/mariadb/marradb10.4.10/data';
// exedirold := pathWithSlashes+'/bin/mariadb/mariadb10.6.5/'; // exedirold := pathWithSlashes+'/bin/mariadb/marradb10.4.10/';
// exedirnew := pathWithSlashes+'/bin/mariadb/mariadb10.6.5/'; // exedirnew := pathWithSlashes+'/bin/mariadb/marradb10.4.10/';
// If we have a new database version, we should only copy old my.ini file into new directory // If we have a new database version, we should only copy old my.ini file into new directory
// and change only all basedir= strings to use new version. Like this, data dir is still correct. // and change only all basedir= strings to use new version. Like this, data dir is still correct.
@@ -582,17 +599,6 @@ begin
end; end;
end; end;
if browser = 'iexplore.exe' then
begin
if FileExists (pfPath+'/Microsoft/Edge/Application/msedge.exe') then
begin
if MsgBox(CustomMessage('MicrosoftEdgeDetected'),mbConfirmation,MB_YESNO) = IDYES then
begin
browser := pfPath+'/Microsoft/Edge/Application/msedge.exe';
end;
end;
end;
if browser = 'iexplore.exe' then if browser = 'iexplore.exe' then
begin begin
if FileExists (pfPath+'/Internet Explorer/iexplore.exe') then if FileExists (pfPath+'/Internet Explorer/iexplore.exe') then
@@ -629,6 +635,27 @@ begin
begin begin
//----------------------------------------------
// Create file alias phpmyadmin (always)
//----------------------------------------------
destFile := pathWithSlashes+'/alias/phpmyadmin.conf';
srcFile := pathWithSlashes+'/alias/phpmyadmin.conf.install';
if FileExists(srcFile) then
begin
LoadStringFromFile (srcFile, srcContents);
//installDir et version de phpmyadmin
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
StringChangeEx (srcContents, 'WAMPPHPMYADMINVERSION', phpmyadminVersion, True);
SaveStringToFile(destFile,srcContents, False);
end;
DeleteFile(srcFile);
//---------------------------------------------- //----------------------------------------------
// Create file alias dolibarr (if not exists) // Create file alias dolibarr (if not exists)
//---------------------------------------------- //----------------------------------------------
@@ -664,6 +691,35 @@ begin
//----------------------------------------------
// Create file configuration for phpmyadmin (if not exists)
//----------------------------------------------
destFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php';
srcFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php.install';
if FileExists(srcFile) then
begin
if not FileExists (destFile) then
begin
LoadStringFromFile (srcFile, srcContents);
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
SaveStringToFile(destFile,srcContents, False);
end
else
begin
// We must replace to use format 2.4 of apache
DeleteFile(destFile);
LoadStringFromFile (srcFile, srcContents);
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
SaveStringToFile(destFile,srcContents, False);
end;
end;
//---------------------------------------------- //----------------------------------------------
// Create file httpd.conf (if not exists) // Create file httpd.conf (if not exists)
//---------------------------------------------- //----------------------------------------------
@@ -1026,7 +1082,7 @@ Filename: "{app}\rundoliwamp.bat"; Description: {cm:LaunchNow}; Flags: shellexec
[UninstallDelete] [UninstallDelete]
Type: files; Name: "{app}\*.*" Type: files; Name: "{app}\*.*"
Type: files; Name: "{app}\bin\mariadb\mariadb10.6.5\*.*" Type: files; Name: "{app}\bin\mariadb\mariadb10.4.10\*.*"
Type: filesandordirs; Name: "{app}\alias" Type: filesandordirs; Name: "{app}\alias"
Type: filesandordirs; Name: "{app}\apps" Type: filesandordirs; Name: "{app}\apps"
Type: filesandordirs; Name: "{app}\bin\apache" Type: filesandordirs; Name: "{app}\bin\apache"

View File

@@ -304,15 +304,22 @@ if (isset($_GET['img']))
// Definition of language and texts // Definition de la langue et des textes
if (isset ($_GET['lang'])) { if (isset ($_GET['lang']))
$langue = preg_replace('/[^a-z_]/i', '', $_GET['lang']); {
} elseif (preg_match("/^fr/", $_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $langue = $_GET['lang'];
}
elseif (preg_match("/^fr/", $_SERVER['HTTP_ACCEPT_LANGUAGE']))
{
$langue = 'fr'; $langue = 'fr';
} elseif (preg_match("/^es/", $_SERVER['HTTP_ACCEPT_LANGUAGE'])) { }
elseif (preg_match("/^es/", $_SERVER['HTTP_ACCEPT_LANGUAGE']))
{
$langue = 'es'; $langue = 'es';
} else { }
else
{
$langue = 'en'; $langue = 'en';
} }
@@ -320,25 +327,29 @@ if (isset ($_GET['lang'])) {
// Read PHP extensions // Read PHP extensions
$loaded_extensions = get_loaded_extensions(); $loaded_extensions = get_loaded_extensions();
$phpExtContents=''; $phpExtContents='';
foreach ($loaded_extensions as $extension) { foreach ($loaded_extensions as $extension)
$phpExtContents .= "<li>${extension}</li>"; $phpExtContents .= "<li>${extension}</li>";
}
// Read alias directory // Read alias directory
$listoffile=array(); $listoffile=array();
$aliasarray=array(); $aliasarray=array();
$aliasContents=''; $aliasContents='';
if (is_dir($aliasDir)) { if (is_dir($aliasDir))
{
$handle=opendir($aliasDir); $handle=opendir($aliasDir);
if (is_resource($handle)) { if (is_resource($handle))
while ($file = readdir($handle)) { {
while ($file = readdir($handle))
{
$listoffiles[]=$file; $listoffiles[]=$file;
} }
} }
sort($listoffiles); sort($listoffiles);
foreach($listoffiles as $file) { foreach($listoffiles as $file)
{
if (is_file($aliasDir.$file) && preg_match('/\.conf/',$file)) if (is_file($aliasDir.$file) && preg_match('/\.conf/',$file))
{ {
$msg = ''; $msg = '';
@@ -363,7 +374,8 @@ if (!isset($aliasContents))
// Read projects in www dir // Read projects in www dir
$listoffiles=array(); $listoffiles=array();
$handle=opendir("."); $handle=opendir(".");
if (is_resource($handle)) { if (is_resource($handle))
{
while ($file = readdir($handle)) while ($file = readdir($handle))
{ {
$listoffiles[]=$file; $listoffiles[]=$file;
@@ -371,7 +383,8 @@ if (is_resource($handle)) {
closedir($handle); closedir($handle);
} }
foreach($listoffiles as $file) { 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 .= '<tr><td><ul class="projects">';
@@ -384,9 +397,9 @@ foreach($listoffiles as $file) {
} }
} }
if (!isset($projectContents)) { if (!isset($projectContents))
$projectContents = '<tr><td colspan="3">'.$langues[$langue]['txtNoProjet'].'</td></tr>'; $projectContents = '<tr><td colspan="3">'.$langues[$langue]['txtNoProjet'].'</td></tr>';
}
$nameServer=getenv("COMPUTERNAME"); $nameServer=getenv("COMPUTERNAME");

View File

@@ -22,7 +22,6 @@ $force_install_databaserootpass='WAMPMYSQLNEWPASSWORD';
$force_install_dolibarrlogin='admin'; $force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1'; $force_install_nophpinfo='1';
$force_install_lockinstall='644'; $force_install_lockinstall='644';
$force_install_distrib='doliwamp';
$force_install_module=''; $force_install_module='';
?> ?>

View File

@@ -251,7 +251,7 @@ safe_mode_protected_env_vars = LD_LIBRARY_PATH
; and below. This directive makes most sense if used in a per-directory ; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is ; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off. ; *NOT* affected by whether Safe Mode is turned On or Off.
open_basedir = "WAMPROOT;C:\WINDOWS\TEMP" open_basedir = "WAMPROOT"
; This directive allows you to disable certain functions for security reasons. ; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names. This directive is ; It receives a comma-delimited list of function names. This directive is

View File

@@ -22,13 +22,11 @@
* \brief This script create a xml checksum file * \brief This script create a xml checksum file
*/ */
if (!defined('NOREQUIREDB')) { if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db
define('NOREQUIREDB', '1'); // Do not create database handler $db
}
$sapi_type = php_sapi_name(); $sapi_type = php_sapi_name();
$script_file = basename(__FILE__); $script_file = basename(__FILE__);
$path = dirname(__FILE__).'/'; $path=dirname(__FILE__).'/';
// Test if batch mode // Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') { if (substr($sapi_type, 0, 3) == 'cgi') {
@@ -44,39 +42,23 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
* Main * Main
*/ */
$includecustom = 0; $includecustom=0;
$includeconstants = array(); $includeconstants=array();
$buildzip = 0;
if (empty($argv[1])) { if (empty($argv[1])) {
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value] [buildzip=1]\n"; print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n"; print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
exit -1; exit -1;
} }
parse_str($argv[1]);
$i=0;
$i = 0;
$result = array();
while ($i < $argc) { while ($i < $argc) {
if (!empty($argv[$i])) { if (! empty($argv[$i])) parse_str($argv[$i]);
parse_str($argv[$i], $result); // set all params $release, $includecustom, $includeconstant, $buildzip ... if (preg_match('/includeconstant=/', $argv[$i])) {
} $tmp=explode(':', $includeconstant, 3);
if (!empty($result["release"])) {
$release = $result["release"];
}
if (!empty($result["includecustom"])) {
$includecustom = $result["includecustom"];
}
if (!empty($result["includeconstant"])) {
$includeconstants[$i] = $result["includeconstant"];
}
if (!empty($result["buildzip"])) {
$buildzip = 1;
}
if (preg_match('/includeconstant=/', strval($argv[$i]))) {
$tmp = explode(':', $result['includeconstant'], 3); // $includeconstant has been set with previous parse_str()
if (count($tmp) != 3) { if (count($tmp) != 3) {
print "Error: Bad parameter includeconstant=".$result['includeconstant'] ."\n"; print "Error: Bad parameter includeconstant ".$includeconstant."\n";
exit -1; exit -1;
} }
$includeconstants[$tmp[0]][$tmp[1]] = $tmp[2]; $includeconstants[$tmp[0]][$tmp[1]] = $tmp[2];
@@ -85,7 +67,7 @@ while ($i < $argc) {
} }
if (empty($release)) { if (empty($release)) {
print "Error: Missing release parameter\n"; print "Error: Missing release paramater\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1; exit -1;
} }
@@ -93,16 +75,14 @@ if (empty($release)) {
$savrelease = $release; $savrelease = $release;
// If release is auto, we take current version // If release is auto, we take current version
$tmpver = explode('-', $release, 2); $tmpver=explode('-', $release, 2);
if ($tmpver[0] == 'auto' || $tmpver[0] == 'autostable') { if ($tmpver[0] == 'auto' || $tmpver[0] == 'autostable') {
$release = DOL_VERSION; $release=DOL_VERSION;
if ($tmpver[1] && $tmpver[0] == 'auto') { if ($tmpver[1] && $tmpver[0] == 'auto') $release.='-'.$tmpver[1];
$release .= '-'.$tmpver[1];
}
} }
if (empty($includecustom)) { if (empty($includecustom)) {
$tmpverbis = explode('-', $release, 2); $tmpverbis=explode('-', $release, 2);
if (empty($tmpverbis[1]) || $tmpver[0] == 'autostable') { if (empty($tmpverbis[1]) || $tmpver[0] == 'autostable') {
if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto') { if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto') {
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n"; print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
@@ -110,7 +90,7 @@ if (empty($includecustom)) {
exit -1; exit -1;
} }
} else { } else {
$tmpverter = explode('-', DOL_VERSION, 2); $tmpverter=explode('-', DOL_VERSION, 2);
if ($tmpverter[0] != $tmpverbis[0]) { if ($tmpverter[0] != $tmpverbis[0]) {
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n"; print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
@@ -118,46 +98,41 @@ if (empty($includecustom)) {
} }
} }
} else { } else {
if (!preg_match('/'.preg_quote(DOL_VERSION, '/').'-/', $release)) { if (! preg_match('/'.preg_quote(DOL_VERSION, '/').'-/', $release)) {
print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n"; print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1; exit -1;
} }
} }
print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
print "Release : ".$release."\n"; print "Release : ".$release."\n";
print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
print "Include custom in signature : ".$includecustom."\n"; print "Include custom in signature : ".$includecustom."\n";
print "Include constants in signature : "; print "Include constants in signature : ";
foreach ($includeconstants as $countrycode => $tmp) { foreach ($includeconstants as $countrycode => $tmp) {
foreach ($tmp as $constname => $constvalue) { foreach($tmp as $constname => $constvalue) {
print $constname.'='.$constvalue." "; print $constname.'='.$constvalue." ";
} }
} }
print "\n"; print "\n";
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml'; //$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
$outputdir = dirname(dirname(__FILE__)).'/htdocs/install'; $outputdir=dirname(dirname(__FILE__)).'/htdocs/install';
print 'Delete current files '.$outputdir.'/filelist*.xml*'."\n"; print 'Delete current files '.$outputdir.'/filelist*.xml'."\n";
dol_delete_file($outputdir.'/filelist*.xml*', 0, 1, 1); dol_delete_file($outputdir.'/filelist*.xml', 0, 1, 1);
$checksumconcat = array(); $checksumconcat=array();
$outputfile = $outputdir.'/filelist-'.$release.'.xml'; $outputfile=$outputdir.'/filelist-'.$release.'.xml';
$fp = fopen($outputfile, 'w'); $fp = fopen($outputfile, 'w');
if (empty($fp)) {
print 'Failed to open file '.$outputfile."\n";
exit(-1);
}
fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n"); fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n");
fputs($fp, '<checksum_list version="'.$release.'" date="'.dol_print_date(dol_now(), 'dayhourrfc').'" generator="'.$script_file.'">'."\n"); fputs($fp, '<checksum_list version="'.$release.'" date="'.dol_print_date(dol_now(), 'dayhourrfc').'" generator="'.$script_file.'">'."\n");
foreach ($includeconstants as $countrycode => $tmp) { foreach ($includeconstants as $countrycode => $tmp) {
fputs($fp, '<dolibarr_constants country="'.$countrycode.'">'."\n"); fputs($fp, '<dolibarr_constants country="'.$countrycode.'">'."\n");
foreach ($tmp as $constname => $constvalue) { foreach($tmp as $constname => $constvalue) {
$valueforchecksum = (empty($constvalue) ? '0' : $constvalue); $valueforchecksum=(empty($constvalue)?'0':$constvalue);
$checksumconcat[] = $valueforchecksum; $checksumconcat[]=$valueforchecksum;
fputs($fp, ' <constant name="'.$constname.'">'.$valueforchecksum.'</constant>'."\n"); fputs($fp, ' <constant name="'.$constname.'">'.$valueforchecksum.'</constant>'."\n");
} }
fputs($fp, '</dolibarr_constants>'."\n"); fputs($fp, '</dolibarr_constants>'."\n");
@@ -170,28 +145,25 @@ $iterator1 = new RecursiveIteratorIterator($dir_iterator1);
// Need to ignore document custom etc. Note: this also ignore natively symbolic links. // Need to ignore document custom etc. Note: this also ignore natively symbolic links.
$files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i'); $files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
*/ */
// Define qualified files (must be same than into generate_filelist_xml.php and in api_setup.class.php) $regextoinclude='\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
$regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$'; $regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname'); $files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
$dir='';
$dir = ''; $needtoclose=0;
$needtoclose = 0;
foreach ($files as $filetmp) { foreach ($files as $filetmp) {
$file = $filetmp['fullname']; $file = $filetmp['fullname'];
//$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file)); //$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file));
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file)); $newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
if ($newdir != $dir) { if ($newdir!=$dir) {
if ($needtoclose) { if ($needtoclose)
fputs($fp, ' </dir>'."\n"); fputs($fp, ' </dir>'."\n");
} fputs($fp, ' <dir name="'.$newdir.'" >'."\n");
fputs($fp, ' <dir name="'.$newdir.'">'."\n");
$dir = $newdir; $dir = $newdir;
$needtoclose = 1; $needtoclose=1;
} }
if (filetype($file) == "file") { if (filetype($file)=="file") {
$md5 = md5_file($file); $md5=md5_file($file);
$checksumconcat[] = $md5; $checksumconcat[]=$md5;
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n"); fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
} }
} }
@@ -205,7 +177,7 @@ fputs($fp, md5(join(',', $checksumconcat))."\n");
fputs($fp, '</dolibarr_htdocs_dir_checksum>'."\n"); fputs($fp, '</dolibarr_htdocs_dir_checksum>'."\n");
$checksumconcat = array(); $checksumconcat=array();
fputs($fp, '<dolibarr_script_dir version="'.$release.'">'."\n"); fputs($fp, '<dolibarr_script_dir version="'.$release.'">'."\n");
@@ -215,27 +187,26 @@ $iterator2 = new RecursiveIteratorIterator($dir_iterator2);
// Need to ignore document custom etc. Note: this also ignore natively symbolic links. // Need to ignore document custom etc. Note: this also ignore natively symbolic links.
$files = new RegexIterator($iterator2, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i'); $files = new RegexIterator($iterator2, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
*/ */
$regextoinclude = '\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$'; $regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
$regextoexclude = '(custom|documents|conf|install)$'; // Exclude dirs $regextoexclude='(custom|documents|conf|install)$'; // Exclude dirs
$files = dol_dir_list(dirname(__FILE__).'/../scripts/', 'files', 1, $regextoinclude, $regextoexclude, 'fullname'); $files = dol_dir_list(dirname(__FILE__).'/../scripts/', 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
$dir = ''; $dir='';
$needtoclose = 0; $needtoclose=0;
foreach ($files as $filetmp) { foreach ($files as $filetmp) {
$file = $filetmp['fullname']; $file = $filetmp['fullname'];
//$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file)); //$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file)); $newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file)); $newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
if ($newdir != $dir) { if ($newdir!=$dir) {
if ($needtoclose) { if ($needtoclose)
fputs($fp, ' </dir>'."\n"); fputs($fp, ' </dir>'."\n");
}
fputs($fp, ' <dir name="'.$newdir.'" >'."\n"); fputs($fp, ' <dir name="'.$newdir.'" >'."\n");
$dir = $newdir; $dir = $newdir;
$needtoclose = 1; $needtoclose=1;
} }
if (filetype($file) == "file") { if (filetype($file)=="file") {
$md5 = md5_file($file); $md5=md5_file($file);
$checksumconcat[] = $md5; $checksumconcat[]=$md5;
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n"); fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
} }
} }
@@ -250,22 +221,6 @@ fputs($fp, '</dolibarr_script_dir_checksum>'."\n");
fputs($fp, '</checksum_list>'."\n"); fputs($fp, '</checksum_list>'."\n");
fclose($fp); fclose($fp);
if (empty($buildzip)) { print "File ".$outputfile." generated\n";
print "File ".$outputfile." generated\n";
} else {
if ($buildzip == '1' || $buildzip == 'zip') {
$result = dol_compress_file($outputfile, $outputfile.'.zip', 'zip');
if ($result > 0) {
dol_delete_file($outputfile);
print "File ".$outputfile.".zip generated\n";
}
} elseif ($buildzip == '2' || $buildzip == 'gz') {
$result = dol_compress_file($outputfile, $outputfile.'.gz', 'gz');
if ($result > 0) {
dol_delete_file($outputfile);
print "File ".$outputfile.".gz generated\n";
}
}
}
exit(0); exit(0);

View File

@@ -2,7 +2,7 @@
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# \file build/makepack-dolibarr.pl # \file build/makepack-dolibarr.pl
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps) # \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
# \author (c)2004-2023 Laurent Destailleur <eldy@users.sourceforge.net> # \author (c)2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
# #
# This is list of constant you can set to have generated packages moved into a specific dir: # This is list of constant you can set to have generated packages moved into a specific dir:
#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild' #DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'
@@ -65,7 +65,7 @@ $DIR||='.'; $DIR =~ s/([^\/\\])[\\\/]+$/$1/;
$SOURCE="$DIR/.."; $SOURCE="$DIR/..";
$DESTI="$SOURCE/build"; $DESTI="$SOURCE/build";
if ($SOURCE !~ /^\// && $SOURCE !~ /^[a-z]:/i) if ($SOURCE !~ /^\//)
{ {
print "Error: Launch the script $PROG.$Extension with its full path from /.\n"; print "Error: Launch the script $PROG.$Extension with its full path from /.\n";
print "$PROG.$Extension aborted.\n"; print "$PROG.$Extension aborted.\n";
@@ -76,23 +76,15 @@ if (! $ENV{"DESTIBETARC"} || ! $ENV{"DESTISTABLE"})
{ {
print "Error: Missing environment variables.\n"; print "Error: Missing environment variables.\n";
print "You must define the environment variable DESTIBETARC and DESTISTABLE to point to the\ndirectories where you want to save the generated packages.\n"; print "You must define the environment variable DESTIBETARC and DESTISTABLE to point to the\ndirectories where you want to save the generated packages.\n";
print "$PROG.$Extension aborted.\n";
print "\n";
print "You can set them with\n";
print "On Linux:\n";
print "export DESTIBETARC='/tmp'; export DESTISTABLE='/tmp';\n";
print "On Windows:\n";
print "set DESTIBETARC=c:/tmp\n";
print "set DESTISTABLE=c:/tmp\n";
print "\n";
print "Example: DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'\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"; print "Example: DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'\n";
print "$PROG.$Extension aborted.\n";
sleep 2; sleep 2;
exit 1; exit 1;
} }
if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"}) if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"})
{ {
print "Error: Directory of environment variable DESTIBETARC ($ENV{'DESTIBETARC'}) or DESTISTABLE ($ENV{'DESTISTABLE'}) does not exist.\n"; print "Error: Directory of environment variable DESTIBETARC or DESTISTABLE does not exist.\n";
print "$PROG.$Extension aborted.\n"; print "$PROG.$Extension aborted.\n";
sleep 2; sleep 2;
exit 1; exit 1;
@@ -102,7 +94,7 @@ if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"})
# -------------- # --------------
if ("$^O" =~ /linux/i || (-d "/etc" && -d "/var" && "$^O" !~ /cygwin/i)) { $OS='linux'; $CR=''; } if ("$^O" =~ /linux/i || (-d "/etc" && -d "/var" && "$^O" !~ /cygwin/i)) { $OS='linux'; $CR=''; }
elsif (-d "/etc" && -d "/Users") { $OS='macosx'; $CR=''; } elsif (-d "/etc" && -d "/Users") { $OS='macosx'; $CR=''; }
elsif ("$^O" =~ /cygwin/i || "$^O" =~ /win32/i || "$^O" =~ /msys/i) { $OS='windows'; $CR="\r"; } elsif ("$^O" =~ /cygwin/i || "$^O" =~ /win32/i) { $OS='windows'; $CR="\r"; }
if (! $OS) { if (! $OS) {
print "Error: Can't detect your OS.\n"; print "Error: Can't detect your OS.\n";
print "Can't continue.\n"; print "Can't continue.\n";
@@ -369,12 +361,12 @@ if ($nboftargetok) {
} }
if (! $BUILD || $BUILD eq '0-rc') # For a major version if (! $BUILD || $BUILD eq '0-rc') # For a major version
{ {
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|PERF\|SEC\|QUAL\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa'; print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
} }
else # For a maintenance release else # For a maintenance release
{ {
#print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|PERF\|SEC\|QUAL\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\'| sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa'; #print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-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/CLOSE/NEW/g\'| sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\|PERF\|SEC\|QUAL\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa'; print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
} }
print "\n"; print "\n";
if (! $ret) if (! $ret)
@@ -398,9 +390,6 @@ if ($nboftargetok) {
$olddir=getcwd(); $olddir=getcwd();
chdir("$SOURCE"); chdir("$SOURCE");
print "Clean $SOURCE/htdocs/includes/autoload.php\n";
$ret=`rm -f $SOURCE/htdocs/includes/autoload.php`;
$ret=`git ls-files . --exclude-standard --others`; $ret=`git ls-files . --exclude-standard --others`;
if ($ret) if ($ret)
{ {
@@ -487,7 +476,6 @@ if ($nboftargetok) {
$ret=`rm -f $BUILDROOT/$PROJECT/build.xml`; $ret=`rm -f $BUILDROOT/$PROJECT/build.xml`;
$ret=`rm -f $BUILDROOT/$PROJECT/phpstan.neon`; $ret=`rm -f $BUILDROOT/$PROJECT/phpstan.neon`;
$ret=`rm -f $BUILDROOT/$PROJECT/pom.xml`; $ret=`rm -f $BUILDROOT/$PROJECT/pom.xml`;
$ret=`rm -f $BUILDROOT/$PROJECT/README-*.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT/build/html`; $ret=`rm -fr $BUILDROOT/$PROJECT/build/html`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/Doli*-*`; $ret=`rm -f $BUILDROOT/$PROJECT/build/Doli*-*`;
@@ -507,9 +495,8 @@ if ($nboftargetok) {
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/cache.manifest`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/cache.manifest`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.mysql`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.mysql`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.nova*`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.old`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.old`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.pgsql`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.postgres`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf*sav*`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf*sav*`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/mssql/README`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/mssql/README`;
@@ -517,20 +504,16 @@ if ($nboftargetok) {
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/pgsql/README`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/pgsql/README`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/install/mssql`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/install/mssql`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/install/sqlite3`;
$ret=`rm -fr $BUILDROOT/$PROJECT/node_modules`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/ansible`; $ret=`rm -fr $BUILDROOT/$PROJECT/dev/ansible`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codesniffer`; $ret=`rm -fr $BUILDROOT/$PROJECT/dev/codesniffer`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codetemplates`; $ret=`rm -fr $BUILDROOT/$PROJECT/dev/codetemplates`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/examples/ldap`; $ret=`rm -fr $BUILDROOT/$PROJECT/dev/dbmodel`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/examples/zapier`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/initdata`; $ret=`rm -fr $BUILDROOT/$PROJECT/dev/initdata`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/initdemo`; $ret=`rm -fr $BUILDROOT/$PROJECT/dev/initdemo`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/resources/dbmodel`; $ret=`rm -fr $BUILDROOT/$PROJECT/dev/iso-normes`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/resources/iso-normes`; $ret=`rm -fr $BUILDROOT/$PROJECT/dev/ldap`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/resources/licence`; $ret=`rm -fr $BUILDROOT/$PROJECT/dev/licence`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/mail`; $ret=`rm -fr $BUILDROOT/$PROJECT/dev/mail`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/multitail`; $ret=`rm -fr $BUILDROOT/$PROJECT/dev/multitail`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/phpcheckstyle`; $ret=`rm -fr $BUILDROOT/$PROJECT/dev/phpcheckstyle`;
@@ -538,8 +521,6 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/security`; $ret=`rm -fr $BUILDROOT/$PROJECT/dev/security`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/spec`; $ret=`rm -fr $BUILDROOT/$PROJECT/dev/spec`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/dev/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/tools/php-cs-fixer/vendor`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/tools/rector/vendor`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/uml`; $ret=`rm -fr $BUILDROOT/$PROJECT/dev/uml`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/vagrant`; $ret=`rm -fr $BUILDROOT/$PROJECT/dev/vagrant`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/xdebug`; $ret=`rm -fr $BUILDROOT/$PROJECT/dev/xdebug`;
@@ -583,7 +564,6 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/factory*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/factory*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/forceproject*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/forceproject*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/lead*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/lead*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/langs/*/README.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ndf*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ndf*`;
@@ -595,56 +575,52 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/webmail*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/webmail*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/theme/common/fontawesome-5/svgs`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/workstation*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/allscreen*`;
# Removed other test files # Removed other test files
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`; $ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`; $ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`; $ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`;
# Removed files installed by the awful composer
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/bin`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/adapters`; # Keep this removal in case we embed libraries $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/adapters`; # Keep this removal in case we embed libraries
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/samples`; # Keep this removal in case we embed libraries $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/samples`; # Keep this removal in case we embed libraries
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball for official debian, not for the rest $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball for official debian, not for the rest
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/composer`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/doctrine`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/select2/release.sh`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/select2/release.sh`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/doc`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/doc`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/example`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/example`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mobiledetect/mobiledetectlib/.gitmodules`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mobiledetect/mobiledetectlib/.gitmodules`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mobiledetect/mobiledetectlib/docs`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/.github`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/docs`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/samples`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/scripts`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/src`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/parsedown/LICENSE.txt`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/php-iban/docs`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/php-iban/docs`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/.gitattributes`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/license.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared/PDF`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Examples`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/unitTests`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/license.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/tests`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/tests`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/tests`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/tests`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/LICENSE`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/LICENSE`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/ae_fonts_*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/examples`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/vendor`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/webmozart`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/theme/common/octicons/LICENSE`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/autoload.php`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/bin`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/bin`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/*/bin`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/*/*/bin`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/*/*/*/bin`;
} }
# Build package for each target # Build package for each target
@@ -1059,7 +1035,7 @@ if ($nboftargetok) {
print "Go into directory $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build\n"; print "Go into directory $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build\n";
chdir("$BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build"); chdir("$BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build");
#$cmd="dpkg-source -b $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build"; #$cmd="dpkg-source -b $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build";
$cmd="dpkg-buildpackage -us -uc --compression=gzip"; $cmd="dpkg-buildpackage -us -uc";
print "Launch DEB build ($cmd)\n"; print "Launch DEB build ($cmd)\n";
$ret=`$cmd 2>&1 3>&1`; $ret=`$cmd 2>&1 3>&1`;
print $ret."\n"; print $ret."\n";
@@ -1074,8 +1050,7 @@ if ($nboftargetok) {
$ret=`mv $BUILDROOT/*_all.deb "$NEWDESTI/"`; $ret=`mv $BUILDROOT/*_all.deb "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.dsc "$NEWDESTI/"`; $ret=`mv $BUILDROOT/*.dsc "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.orig.tar.gz "$NEWDESTI/"`; $ret=`mv $BUILDROOT/*.orig.tar.gz "$NEWDESTI/"`;
#$ret=`mv $BUILDROOT/*.debian.tar.xz "$NEWDESTI/"`; # xz file is generated when build/debian/sources/option $ret=`mv $BUILDROOT/*.debian.tar.xz "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.debian.tar.gz "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.changes "$NEWDESTI/"`; $ret=`mv $BUILDROOT/*.changes "$NEWDESTI/"`;
next; next;
} }
@@ -1092,52 +1067,28 @@ if ($nboftargetok) {
print "Remove target $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe...\n"; print "Remove target $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe...\n";
unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"; unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
if ($OS eq 'windows') {
print "Check that ISCC.exe is in your PATH.\n";
} else {
print "Check that in your Wine setup, you have created a Z: drive that point to your / directory.\n"; print "Check that in your Wine setup, you have created a Z: drive that point to your / directory.\n";
}
$SOURCEBACK=$SOURCE; $SOURCEBACK=$SOURCE;
$SOURCEBACK =~ s/\//\\/g; $SOURCEBACK =~ s/\//\\/g;
print "Prepare file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\" from \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n"; print "Prepare file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss from \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
$ret=`cat "$SOURCE/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
#$ret=`cat "$SOURCE/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`; print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"\n";
open(IN, '<' . $SOURCE."/build/exe/doliwamp/doliwamp.iss") or die $!; $cmd= "wine ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
open(OUT, '>' . "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss") or die $!;
while(<IN>)
{
$_ =~ s/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g;
print OUT $_;
}
close(IN);
close(OUT);
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\" on OS $OS\n";
if ($OS eq 'windows') {
$cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
} else {
#$cmd= "wine ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
}
print "$cmd\n"; print "$cmd\n";
$ret= `$cmd`; $ret= `$cmd`;
print "ret=$ret\n"; #print "$ret\n";
# Move to final dir # Move to final dir
print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n"; print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"); rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n"; print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
use File::Copy;
#$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
$ret=move("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe", "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
print "Remove tmp file $SOURCE/build/exe/doliwamp/doliwamp.tmp.iss\n"; print "Remove tmp file $SOURCE/build/exe/doliwamp/doliwamp.tmp.iss\n";
#$ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`; $ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
$ret=unlink("$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss");
next; next;
} }
@@ -1157,8 +1108,7 @@ if ($nboftargetok) {
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)', "$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'none', # none means it won't be published on SF "$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'none', # none means it won't be published on SF
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'none', # none means it won't be published on SF "$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'none', # none means it won't be published on SF
#"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'none', # none means it won't be published on SF "$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'none', # none means it won't be published on SF
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz"=>'none', # none means it won't be published on SF
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'none', # none means it won't be published on SF "$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'none', # none means it won't be published on SF
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)', "$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)',
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM', "$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
@@ -1285,7 +1235,7 @@ if ($nboftargetok) {
print "\n----- Summary -----\n"; print "\n----- Summary -----\n";
foreach my $target (sort keys %CHOOSEDTARGET) { foreach my $target (sort keys %CHOOSEDTARGET) {
if ($target eq '-CHKSUM') { print "Checksum was generated\n"; next; } if ($target eq '-CHKSUM') { print "Checksum was generated"; next; }
if ($CHOOSEDTARGET{$target} < 0) { if ($CHOOSEDTARGET{$target} < 0) {
print "Package $target not built (bad requirement).\n"; print "Package $target not built (bad requirement).\n";
} else { } else {

View File

@@ -293,7 +293,6 @@ foreach my $PROJECT (@PROJECTLIST) {
} }
print "Clean $BUILDROOT\n"; print "Clean $BUILDROOT\n";
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.cache`; $ret=`rm -fr $BUILDROOT/$PROJECTLC/.cache`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.git`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.project`; $ret=`rm -fr $BUILDROOT/$PROJECTLC/.project`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.settings`; $ret=`rm -fr $BUILDROOT/$PROJECTLC/.settings`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/index.php`; $ret=`rm -fr $BUILDROOT/$PROJECTLC/index.php`;

View File

@@ -1,61 +1,19 @@
----- Dolibarr Makepack How To ----- ----- Dolibarr Makepack How To -----
This documentation describe steps to build a BETA or RELEASE versions This documentation describe steps to build a BETA or RELEASE versions
of Dolibarr. There is a chapter for BETA version and a chapter for RELEASE version. of Dolibarr. There is a chapter for BETA version and a chapter for
RELEASE version.
***** Prerequisites For Linux *****
Prerequisites to build tgz, debian and rpm packages:
> apt-get install perl tar dpkg dpatch p7zip-full rpm zip php-cli
Prerequisites to build autoexe DoliWamp package from Linux (solution seems broken since Ubuntu 20.04):
> apt-get install wine q4wine
> Launch "wine cmd" to check a drive Z: pointing to / exists.
> Install InnoSetup
For example by running isetup-5.5.8.exe (https://www.jrsoftware.org) https://files.jrsoftware.org/is/5/
> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB
For example by running wampserver3.2.6_x64.exe (https://www.wampserver.com).
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 recommanded),
open file build/exe/doliwamp.iss and click on button "Compile".
The .exe file will be build into directory build.
***** Prerequisites For Windows *****
Prerequisites to build autoexe DoliWamp package from Windows:
> Install Perl for Windows (https://strawberryperl.com/)
> Install isetup-5.5.8.exe (https://www.jrsoftware.org)
> Install Microsoft Visual C++ Redistributable 2017 (https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170)
> Install WampServer-3.2.6-64.exe (Apache 2.4.51, PHP 7.4.26, MariaDB 10.6.5 for example. Version must match the values found into doliwamp.iss)
> Install GIT for Windows (https://git-scm.com/ => You must choose option "Add Git bash profile", "Git commit as-is")
> Install Dolibarr current version:
git clone https://github.com/dolibarr/dolibarr or git clone --branch X.Y https://github.com/dolibarr/dolibarr
> Add the path of PHP (C:\wamp64\bin\php\php7.4.26) and InnoSetup (C:\Program Files (x86)\Inno Setup 5) into the %PATH% of Windows.
> Create a config file c:\dolibarr\dolibarr\htdocs\conf\conf.php with content
<?php
$dolibarr_main_document_root="c:\dolibarr\dolibarr\htdocs";
$dolibarr_main_url_root='http://localhost';
***** Actions to do a BETA ***** ***** Actions to do a BETA *****
This files describe steps made by Dolibarr packaging team to make a This files describe steps made by Dolibarr packaging team to make a
beta version of Dolibarr, step by step. beta version of Dolibarr, step by step.
- Check all files are commited. - Check all files are commited.
- Update version/info in ChangeLog, for this you can: - Update version/info in ChangeLog.
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 develop repo), 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" To generate a changelog of a major new version x.y.0 (from 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"
To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-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 maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-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"
Recopy the content of the output file into the file ChangeLog. - To know number of lines changes: git diff --shortstat A B
- Note: To know number of lines changes: git diff --shortstat A B - Update version number with x.y.z-w in htdocs/filefunc.inc.php
- Update version number with x.y.z-w in file htdocs/filefunc.inc.php
- Commit all changes. - Commit all changes.
- Run makepack-dolibarr.pl to generate all packages. - Run makepack-dolibarr.pl to generate all packages.
@@ -66,21 +24,20 @@ Recopy the content of the output file into the file ChangeLog.
(/home/dolibarr/wwwroot/files/lastbuild). (/home/dolibarr/wwwroot/files/lastbuild).
- Post a news on dolibarr.org/dolibarr.fr + social networks - Post a news on dolibarr.org/dolibarr.fr + social networks
- Send mail on mailings-list
***** Actions to do a RELEASE ***** ***** Actions to do a RELEASE *****
This files describe steps made by Dolibarr packaging team to make a This files describe steps made by Dolibarr packaging team to make a
complete release of Dolibarr, step by step. complete release of Dolibarr, step by step.
- Check all files are commited. - Check all files are commited.
- Update version/info in ChangeLog, for this you can: - Update version/info in ChangeLog.
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 develop repo), 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" To generate a changelog of a major new version x.y.0 (from 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"
To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-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 maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-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"
Recopy the content of the output file into the file ChangeLog. - To know number of lines changes: git diff --shortstat A B
- Note: To know the number of lines changes: git diff --shortstat A B - Update version number with x.y.z in htdocs/filefunc.inc.php
- Update version number with x.y.z in file htdocs/filefunc.inc.php
- Commit all changes. - Commit all changes.
- Run makepack-dolibarr.pl to generate all packages. - Run makepack-dolibarr.pl to generate all packages.
@@ -95,3 +52,4 @@ Recopy the content of the output file into the file ChangeLog.
on server to point to new files (used by some web sites). on server to point to new files (used by some web sites).
- Post a news on dolibarr.org/dolibarr.fr + social networks - Post a news on dolibarr.org/dolibarr.fr + social networks
- Send mail on mailings-list

View File

@@ -1,7 +1,6 @@
README (English) README (English)
################################################## ##################################################
Building PAD files Building PAD files
http://pad.asp-software.org/padgen.php
################################################## ##################################################
This directory contains files and docs used to build This directory contains files and docs used to build

View File

@@ -3,7 +3,9 @@ README (English)
Building a Patch file Building a Patch file
################################################## ##################################################
This directory contains tools to build a patch after a developer has made changes on files in its Dolibarr tree. This directory contains tools to build a patch
The output patch file can then be submited on Dolibarr dev mailing-list, with explanation on its goal, for inclusion in main branch. after a developer has made changes on files in its
Dolibarr tree.
Using this tool is now deprecated. You must use git pull requests to submit contributions. The output patch file can then be submited on Dolibarr
dev mailing-list, with explanation on its goal, for
inclusion in main branch.

View File

@@ -1,10 +1,9 @@
To make htmldoc working from wiki.dolibarr.org, the wiki must be modified to have To make htmldoc working from wiki.dolibarr.org, them must be modified to have
To disable part of content, add:
class="htmldoc-ignore"
with css
.htmldoc-ignore { display: none; }
Note:
$_SERVER["HTTP_USER_AGENT"] is "HTMLDOC/x.y.z" $_SERVER["HTTP_USER_AGENT"] is "HTMLDOC/x.y.z"
$_COOKIE["htmldoc"] may also be defined if set on command line. $_COOKIE["htmldoc"] may also be defined if set on command line.
To disable part, add
class="htmldoc-ignore" with css
.htmldoc-ignore { display: none; }

View File

@@ -1,4 +1,4 @@
#HTMLDOC 1.8.27 #HTMLDOC 1.8.27
-t pdf14 -f "../../doc/dolibarr_en.pdf" --webpage --no-title --logoimage "../../doc/images/dolibarr_256x256.png" --linkcolor #2200c0 --linkstyle plain --size Universal --left 0.30in --right 0.30in --top 0.40in --bottom 0.30in --header ... --header1 ... --footer c/d --nup 1 --tocheader ... --tocfooter ... --portrait --color --no-pscommands --no-xrxcomments --compression=9 --jpeg=50 --fontsize 10.0 --fontspacing 1.0 --headingfont Helvetica --bodyfont Helvetica --headfootsize 9.0 --headfootfont Helvetica --charset iso-8859-1 --links --no-embedfonts --pagemode document --pagelayout single --firstpage p1 --pageeffect none --pageduration 10 --effectduration 1.0 --no-encryption --permissions all --owner-password "" --user-password "" --browserwidth 680 --no-strict --no-overflow -t pdf14 -f "../../doc/dolibarr_en.pdf" --webpage --no-title --logoimage "../../doc/images/dolibarr_256x256.png" --linkcolor #2200c0 --linkstyle plain --size Universal --left 0.30in --right 0.30in --top 0.40in --bottom 0.30in --header ... --header1 ... --footer c/d --nup 1 --tocheader ... --tocfooter ... --portrait --color --no-pscommands --no-xrxcomments --compression=9 --jpeg=50 --fontsize 10.0 --fontspacing 1.0 --headingfont Helvetica --bodyfont Helvetica --headfootsize 9.0 --headfootfont Helvetica --charset iso-8859-1 --links --no-embedfonts --pagemode document --pagelayout single --firstpage p1 --pageeffect none --pageduration 10 --effectduration 1.0 --no-encryption --permissions all --owner-password "" --user-password "" --browserwidth 680 --no-strict --no-overflow
https://wiki.dolibarr.org/index.php/Home http://wiki.dolibarr.org/index.php/Main_Page
https://wiki.dolibarr.org/index.php/What_Dolibarr_Does http://wiki.dolibarr.org/index.php/What_Dolibarr_Do

View File

@@ -1,7 +1,7 @@
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# \file dolibarr.pl # \file dolibarr.pl
# \brief Dolibarr script install for Virtualmin Pro # \brief Dolibarr script install for Virtualmin Pro
# \author (c)2009-2020 Regis Houssin <regis.houssin@inodbox.com> # \author (c)2009-2019 Regis Houssin <regis.houssin@inodbox.com>
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
@@ -30,7 +30,7 @@ return "Regis Houssin";
# script_dolibarr_versions() # script_dolibarr_versions()
sub script_dolibarr_versions sub script_dolibarr_versions
{ {
return ( "14.0.5", "13.0.5", "12.0.5", "11.0.5", "10.0.7", "9.0.4", "8.0.6", "7.0.5" ); return ( "10.0.0", "9.0.3", "8.0.5", "7.0.5", "6.0.8" );
} }
sub script_dolibarr_release sub script_dolibarr_release
@@ -77,16 +77,6 @@ if ($ver >= 3.6) {
push(@rv, "Dolibarr requires PHP version 5.3 or later"); push(@rv, "Dolibarr requires PHP version 5.3 or later");
} }
} }
if ($ver >= 12.0) {
# Check for PHP 5.6+
local $phpv = &get_php_version($phpver || 5, $d);
if (!$phpv) {
push(@rv, "Could not work out exact PHP version");
}
elsif ($phpv < 5.6) {
push(@rv, "Dolibarr requires PHP version 5.6 or later");
}
}
return @rv; return @rv;
} }
@@ -386,7 +376,7 @@ sub script_dolibarr_realversion
local ($d, $opts, $sinfo) = @_; local ($d, $opts, $sinfo) = @_;
local $lref = &read_file_lines("$opts->{'dir'}/filefunc.inc.php", 1); local $lref = &read_file_lines("$opts->{'dir'}/filefunc.inc.php", 1);
foreach my $l (@$lref) { foreach my $l (@$lref) {
if ($l =~ /'DOL_VERSION',\s?'([0-9a-z\.\-]+)'/) { if ($l =~ /'DOL_VERSION','([0-9a-z\.\-]+)'/) {
return $1; return $1;
} }
} }
@@ -400,10 +390,6 @@ sub script_dolibarr_check_latest
{ {
local ($ver) = @_; local ($ver) = @_;
local @vers = &osdn_package_versions("dolibarr", local @vers = &osdn_package_versions("dolibarr",
$ver >= 14.0 ? "dolibarr\\-(12\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 13.0 ? "dolibarr\\-(12\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 12.0 ? "dolibarr\\-(12\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 11.0 ? "dolibarr\\-(11\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 10.0 ? "dolibarr\\-(10\\.0\\.[0-9\\.]+)\\.tgz" : $ver >= 10.0 ? "dolibarr\\-(10\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 9.0 ? "dolibarr\\-(9\\.0\\.[0-9\\.]+)\\.tgz" : $ver >= 9.0 ? "dolibarr\\-(9\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 8.0 ? "dolibarr\\-(8\\.0\\.[0-9\\.]+)\\.tgz" : $ver >= 8.0 ? "dolibarr\\-(8\\.0\\.[0-9\\.]+)\\.tgz" :
@@ -424,7 +410,7 @@ return $ver eq $vers[0] ? undef : $vers[0];
sub script_dolibarr_site sub script_dolibarr_site
{ {
return 'https://www.dolibarr.org/'; return 'http://www.dolibarr.org/';
} }
sub script_dolibarr_passmode sub script_dolibarr_passmode

View File

@@ -1,22 +0,0 @@
PHPStan (https://phpstan.org)
-----------------------------
PHPStan requires PHP >= 7.1
Config File is: ./phpstan.neon
In dolibarr/build/phpstan
mkdir phpstan
cd phpstan
composer require --dev phpstan/phpstan
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
php build/phpstan/phpstan/vendor/bin/phpstan -v analyze -c ./phpstan.neon -a build/phpstan/bootstrap.php --memory-limit 4G --error-format=table htdocs/
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 -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

View File

@@ -1,16 +1,14 @@
<?php <?php
// Example to use PHPStan
// cd git/dolibarr
// /usr/bin/php7.2 ../phpstan.phar -l1 analyze htdocs/societe/website.php --memory-limit 2G
// Defined some constants and load Dolibarr env to reduce PHPStan bootstrap that fails to load a lot of things. // 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_DOCUMENT_ROOT', __DIR__ . '/../../htdocs');
//define('DOL_DATA_ROOT', __DIR__ . '/../../documents'); define('DOL_DATA_ROOT', __DIR__ . '/../../documents');
//define('DOL_URL_ROOT', '/'); define('DOL_URL_ROOT', '/');
// Load the main.inc.php file to have functions env defined // Load the main.inc.php file to have functions llx_Header and llx_Footer defined
if (!defined("NOLOGIN")) { if (! defined("NOLOGIN")) define("NOLOGIN", '1');
define("NOLOGIN", '1');
}
if (!defined("NOHTTPSREDIRECT")) {
define("NOHTTPSREDIRECT", '1');
}
global $conf, $langs, $user, $db; global $conf, $langs, $user, $db;
include_once __DIR__ . '/../../htdocs/main.inc.php'; include_once __DIR__ . '/../../htdocs/main.inc.php';

View File

@@ -3,54 +3,48 @@ README (English)
RPM Package tools RPM Package tools
################################################## ##################################################
This directory contains files used by makepack-dolibarr.pl script to build a package, This directory contains files used by makepack-dolibarr.pl
ready to be distributed with format RPM (https://rpm.org) script to build a package, ready to be distributed,
for Linux Distributions like Redhat, Fedora, CentOS, OpenSuse, OpenMandriva, Mageia ... with format RPM (for Redhat, OpenSuse, Mandriva, ...).
# This is standard command to work on RPM packaging: # This is standard command to work on RPM packaging:
#
# To install all packagers tools: # To install all packagers tools:
- Fedora: yum -y install rpmlint fedora-packager mock koji hunspell-en hunspell-es hunspell-fr hunspell-it # Fedora: yum -y install rpmlint fedora-packager mock koji hunspell-en hunspell-es hunspell-fr hunspell-it
- OpenSuse: yast --install update-desktop-files # OpenSuse: yast --install update-desktop-files
#
# rpmlint file.rpm Test a package # rpmlint file.rpm Test a package
# mock -r fedora-15-i386 --rebuild ../SRPMS/hello-2.7-1.fc15.src.rpm # mock -r fedora-15-i386 --rebuild ../SRPMS/hello-2.7-1.fc15.src.rpm
# On Fedora
# =========
# rpm -i --test dolibarr-...rpm to list dependencies of RPM
# yum -v install dolibarr-...rpm to install package and dependencies
# yum -v erase dolibarr to remove package
# chcon -R -h -t httpd_sys_script_rw_t /file to add temporary context rw for httpd on /file
# restorecon -R -v /file to restore values into files (cancel chcon, validate semanage)
# semanage fcontext -a -t httpd_sys_script_rw_t "/dir/(.*)?" to add persistent context rw for httpd on /dir (this add file_contexts.local)
# On OpenSuse
# ===========
# zypper install dolibarr-...rpm to install package and dependencies
# zypper remove dolibarr to remove package
# zypper search xxx to search a package
# On Mageia (after su - root)
# ===========================
# urpmi dolibarr-...rpm to install package and dependencies
# urpme dolibarr to remove package
# #
# On Fedora
# rpm -i --test dolibarr-...rpm To list dependencies of RPM
# yum -v install dolibarr-...rpm To install package and dependencies
# yum -v erase dolibarr To remove package
# chcon -R -h -t httpd_sys_script_rw_t /file To add temporary context rw for httpd on /file
# semanage fcontext -a -t httpd_sys_script_rw_t "/dir/(.*)?" To add persistent context rw for httpd on /dir (this add file_contexts.local)
# restorecon -R -v /file Restore values into files (cancel chcon, validate semanage)
#
# On OpenSuse
# zypper install dolibarr-...rpm To install package and dependencies
# zypper remove dolibarr To remove package
# zypper search xxx To search a package
#
# On Mageia (after su - root)
# urpmi dolibarr-...rpm To install package and dependencies
# urpme dolibarr To remove package
#
# More on rpm on page http://www.trustonme.net/didactels/273.html
To submit a package to Fedora: To submit a package to Fedora:
- Create account on https://bugzilla.redhat.com - Create account on bugzilla.redhat.com
- Create account on https://developer.fedoraproject.org/ - Create account on fedoraproject.org
- Create SRPMS package - Create SRPMS package.
- Upload package on https://fedorapeople.org - Upload package onf http://fedorapeople.org
- Create a bug with form https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&format=fedora-review - Create a bug with form https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&format=fedora-review
This is example of content of review field (used for Bug 723326 - https://bugzilla.redhat.com/show_bug.cgi?id=723326): This is example of content of review field (used for Bug 723326 - https://bugzilla.redhat.com/show_bug.cgi?id=723326):
SRPMS URL: https://www.dolibarr.org/files/fedora/dolibarr-x.y.z-xxx.src.rpm SRPMS URL: http://www.dolibarr.org/files/fedora/dolibarr-x.y.z-xxx.src.rpm
Description: Dolibarr ERP & CRM is an easy to use open source/free software Description: Dolibarr ERP & CRM is an easy to use open source/free software
for small and medium companies, foundations or freelances. It includes for small and medium companies, foundations or freelances. It includes
different features for Enterprise Resource Planning (ERP) and Customer different features for Enterprise Resource Planning (ERP) and Customer
@@ -62,4 +56,4 @@ is my first package to maintain myself. So i'm seeking a sponsor.
- Install fedora packager tools: yum install fedora-packager - Install fedora packager tools: yum install fedora-packager
- Setup fedora packagers tools: fedora-packager-setup - Setup fedora packagers tools: fedora-packager-setup
- Send your package: koji build --scratch f16 path_to_source_RPM - Send your package: koji build --scratch f16 path_to_source_RPM
- Check if package is available: https://koji.fedoraproject.org/koji/ - Check if package is available: http://koji.fedoraproject.org/koji/

View File

@@ -1,5 +1,4 @@
<?php <?php
// //
// Take a look at conf.php.example file for an example of conf.php file // Take a look at conf.php.example file for an example of conf.php file
// and explanations for all possibles parameters. // and explanations for all possibles parameters.

View File

@@ -24,5 +24,5 @@ diff -up htdocs/install/inc.php.patch htdocs/install/inc.php
+$conffile = "/etc/dolibarr/conf.php"; +$conffile = "/etc/dolibarr/conf.php";
+$conffiletoshow = "/etc/dolibarr/conf.php"; +$conffiletoshow = "/etc/dolibarr/conf.php";
$short_options = "c:h";
$long_options = array( // Load conf file if it is already defined

View File

@@ -25,8 +25,8 @@ BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: Applications/Productivity Group: Applications/Productivity
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-mysqli, php-nusoap, dejavu-sans-fonts Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysqli, php-adodb, php-nusoap, dejavu-sans-fonts
Requires: mariadb-server, mariadb Requires: mysql-server, mysql
#BuildRequires: desktop-file-utils #BuildRequires: desktop-file-utils
# Set yes to build test package, no for release (this disable need of /usr/bin/php not found by OpenSuse) # Set yes to build test package, no for release (this disable need of /usr/bin/php not found by OpenSuse)
@@ -104,6 +104,7 @@ cui hai bisogno ed essere facile da usare.
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name} %{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
%{__cp} -pr scripts $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/adodbtime
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/nusoap %{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/nusoap
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts %{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
@@ -164,8 +165,8 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog %_datadir/dolibarr/htdocs/blockedlog
%_datadir/dolibarr/htdocs/bookmarks %_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/bookcal
%_datadir/dolibarr/htdocs/bom %_datadir/dolibarr/htdocs/bom
%_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories %_datadir/dolibarr/htdocs/categories
%_datadir/dolibarr/htdocs/collab %_datadir/dolibarr/htdocs/collab
%_datadir/dolibarr/htdocs/comm %_datadir/dolibarr/htdocs/comm
@@ -180,11 +181,9 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/datapolicy %_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav %_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/debugbar %_datadir/dolibarr/htdocs/debugbar
%_datadir/dolibarr/htdocs/delivery
%_datadir/dolibarr/htdocs/don %_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm %_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/emailcollector %_datadir/dolibarr/htdocs/emailcollector
%_datadir/dolibarr/htdocs/eventorganization
%_datadir/dolibarr/htdocs/expedition %_datadir/dolibarr/htdocs/expedition
%_datadir/dolibarr/htdocs/expensereport %_datadir/dolibarr/htdocs/expensereport
%_datadir/dolibarr/htdocs/exports %_datadir/dolibarr/htdocs/exports
@@ -197,9 +196,8 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/imports %_datadir/dolibarr/htdocs/imports
%_datadir/dolibarr/htdocs/includes %_datadir/dolibarr/htdocs/includes
%_datadir/dolibarr/htdocs/install %_datadir/dolibarr/htdocs/install
%_datadir/dolibarr/htdocs/intracommreport
%_datadir/dolibarr/htdocs/knowledgemanagement
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt %_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
%_datadir/dolibarr/htdocs/livraison
%_datadir/dolibarr/htdocs/loan %_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip %_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin %_datadir/dolibarr/htdocs/margin
@@ -207,14 +205,12 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/mrp %_datadir/dolibarr/htdocs/mrp
%_datadir/dolibarr/htdocs/multicurrency %_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey %_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/partnership
%_datadir/dolibarr/htdocs/paybox %_datadir/dolibarr/htdocs/paybox
%_datadir/dolibarr/htdocs/paypal %_datadir/dolibarr/htdocs/paypal
%_datadir/dolibarr/htdocs/printing %_datadir/dolibarr/htdocs/printing
%_datadir/dolibarr/htdocs/product %_datadir/dolibarr/htdocs/product
%_datadir/dolibarr/htdocs/projet %_datadir/dolibarr/htdocs/projet
%_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/recruitment
%_datadir/dolibarr/htdocs/reception %_datadir/dolibarr/htdocs/reception
%_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/resource
%_datadir/dolibarr/htdocs/salaries %_datadir/dolibarr/htdocs/salaries
@@ -227,10 +223,8 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/ticket %_datadir/dolibarr/htdocs/ticket
%_datadir/dolibarr/htdocs/user %_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants %_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webhook
%_datadir/dolibarr/htdocs/webservices %_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/website %_datadir/dolibarr/htdocs/website
%_datadir/dolibarr/htdocs/workstation
%_datadir/dolibarr/htdocs/zapier %_datadir/dolibarr/htdocs/zapier
%_datadir/dolibarr/htdocs/*.ico %_datadir/dolibarr/htdocs/*.ico
%_datadir/dolibarr/htdocs/*.patch %_datadir/dolibarr/htdocs/*.patch
@@ -274,10 +268,12 @@ if [ -s $config ] && grep -q "File generated by" $config
then then
# File already exist. We add params not found. # File already exist. We add params not found.
echo Add new params to overwrite path to use shared libraries/fonts echo Add new params to overwrite path to use shared libraries/fonts
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
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" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config

View File

@@ -46,19 +46,19 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
Group: Applications/Productivity Group: Applications/Productivity
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-mysqli, php-nusoap, dejavu-sans-fonts, php-mbstring, php-xml Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysqli, php-adodb, php-nusoap, dejavu-sans-fonts, php-mbstring, php-xml
Requires: mariadb-server, mariadb Requires: mysql-server, mysql
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
%else %else
%if 0%{?mdkversion} %if 0%{?mdkversion}
Group: Applications/Productivity 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: 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: mysql, mysql-client
%else %else%_datadir/dolibarr/htdocs/datapolicy
%if 0%{?suse_version} %if 0%{?suse_version}
# Voir http://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros # Voir http://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros
Group: Productivity/Office/Management 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: apache2, apache2-mod_php5, php5 >= 5.3.0, php5-gd, php5-ldap, php5-imap, php5-mysql, php5-openssl, dejavu
Requires: mysql-community-server, mysql-community-server-client Requires: mysql-community-server, mysql-community-server-client
BuildRequires: update-desktop-files fdupes BuildRequires: update-desktop-files fdupes
%else %else
@@ -68,7 +68,6 @@ Requires: mysql-server, mysql
Requires: php-mysqli >= 4.1.0 Requires: php-mysqli >= 4.1.0
%endif %endif
%endif %endif
%endif %endif
# Set yes to build test package, no for release (this disable need of /usr/bin/php not found by OpenSuse) # Set yes to build test package, no for release (this disable need of /usr/bin/php not found by OpenSuse)
@@ -125,7 +124,7 @@ cui hai bisogno ed essere facile da usare.
%if 0%{?sles_version} %if 0%{?sles_version}
%{__rm} -rf $RPM_BUILD_ROOT %{__rm} -rf $RPM_BUILD_ROOT
%{__mkdir} $RPM_BUILD_ROOT% %{__mkdir} $RPM_BUILD_ROOT%_datadir/dolibarr/htdocs/datapolicy
%{__mkdir} $RPM_BUILD_ROOT%{_sysconfdir} %{__mkdir} $RPM_BUILD_ROOT%{_sysconfdir}
%{__mkdir} $RPM_BUILD_ROOT%{_sysconfdir}/%{name} %{__mkdir} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
%else %else
@@ -169,6 +168,7 @@ cui hai bisogno ed essere facile da usare.
%{__cp} -pr scripts $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} %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/adodbtime
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/nusoap %{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/nusoap
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts %{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
%else %else
@@ -245,8 +245,8 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog %_datadir/dolibarr/htdocs/blockedlog
%_datadir/dolibarr/htdocs/bookmarks %_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/bookcal
%_datadir/dolibarr/htdocs/bom %_datadir/dolibarr/htdocs/bom
%_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories %_datadir/dolibarr/htdocs/categories
%_datadir/dolibarr/htdocs/collab %_datadir/dolibarr/htdocs/collab
%_datadir/dolibarr/htdocs/comm %_datadir/dolibarr/htdocs/comm
@@ -261,11 +261,9 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/datapolicy %_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav %_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/debugbar %_datadir/dolibarr/htdocs/debugbar
%_datadir/dolibarr/htdocs/delivery
%_datadir/dolibarr/htdocs/don %_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm %_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/emailcollector %_datadir/dolibarr/htdocs/emailcollector
%_datadir/dolibarr/htdocs/eventorganization
%_datadir/dolibarr/htdocs/expedition %_datadir/dolibarr/htdocs/expedition
%_datadir/dolibarr/htdocs/expensereport %_datadir/dolibarr/htdocs/expensereport
%_datadir/dolibarr/htdocs/exports %_datadir/dolibarr/htdocs/exports
@@ -278,9 +276,8 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/imports %_datadir/dolibarr/htdocs/imports
%_datadir/dolibarr/htdocs/includes %_datadir/dolibarr/htdocs/includes
%_datadir/dolibarr/htdocs/install %_datadir/dolibarr/htdocs/install
%_datadir/dolibarr/htdocs/intracommreport
%_datadir/dolibarr/htdocs/knowledgemanagement
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt %_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
%_datadir/dolibarr/htdocs/livraison
%_datadir/dolibarr/htdocs/loan %_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip %_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin %_datadir/dolibarr/htdocs/margin
@@ -288,14 +285,12 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/mrp %_datadir/dolibarr/htdocs/mrp
%_datadir/dolibarr/htdocs/multicurrency %_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey %_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/partnership
%_datadir/dolibarr/htdocs/paybox %_datadir/dolibarr/htdocs/paybox
%_datadir/dolibarr/htdocs/paypal %_datadir/dolibarr/htdocs/paypal
%_datadir/dolibarr/htdocs/printing %_datadir/dolibarr/htdocs/printing
%_datadir/dolibarr/htdocs/product %_datadir/dolibarr/htdocs/product
%_datadir/dolibarr/htdocs/projet %_datadir/dolibarr/htdocs/projet
%_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/recruitment
%_datadir/dolibarr/htdocs/reception %_datadir/dolibarr/htdocs/reception
%_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/resource
%_datadir/dolibarr/htdocs/salaries %_datadir/dolibarr/htdocs/salaries
@@ -308,10 +303,8 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/ticket %_datadir/dolibarr/htdocs/ticket
%_datadir/dolibarr/htdocs/user %_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants %_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webhook
%_datadir/dolibarr/htdocs/webservices %_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/website %_datadir/dolibarr/htdocs/website
%_datadir/dolibarr/htdocs/workstation
%_datadir/dolibarr/htdocs/zapier %_datadir/dolibarr/htdocs/zapier
%_datadir/dolibarr/htdocs/*.ico %_datadir/dolibarr/htdocs/*.ico
%_datadir/dolibarr/htdocs/*.patch %_datadir/dolibarr/htdocs/*.patch
@@ -425,10 +418,12 @@ if [ -s $config ] && grep -q "File generated by" $config
then then
# File already exist. We add params not found. # File already exist. We add params not found.
echo Add new params to overwrite path to use shared libraries/fonts echo Add new params to overwrite path to use shared libraries/fonts
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
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" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config

View File

@@ -162,8 +162,8 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog %_datadir/dolibarr/htdocs/blockedlog
%_datadir/dolibarr/htdocs/bookmarks %_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/bookcal
%_datadir/dolibarr/htdocs/bom %_datadir/dolibarr/htdocs/bom
%_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories %_datadir/dolibarr/htdocs/categories
%_datadir/dolibarr/htdocs/collab %_datadir/dolibarr/htdocs/collab
%_datadir/dolibarr/htdocs/comm %_datadir/dolibarr/htdocs/comm
@@ -177,12 +177,10 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/custom %_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/datapolicy %_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav %_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/delivery
%_datadir/dolibarr/htdocs/debugbar %_datadir/dolibarr/htdocs/debugbar
%_datadir/dolibarr/htdocs/don %_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm %_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/emailcollector %_datadir/dolibarr/htdocs/emailcollector
%_datadir/dolibarr/htdocs/eventorganization
%_datadir/dolibarr/htdocs/expedition %_datadir/dolibarr/htdocs/expedition
%_datadir/dolibarr/htdocs/expensereport %_datadir/dolibarr/htdocs/expensereport
%_datadir/dolibarr/htdocs/exports %_datadir/dolibarr/htdocs/exports
@@ -195,9 +193,8 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/imports %_datadir/dolibarr/htdocs/imports
%_datadir/dolibarr/htdocs/includes %_datadir/dolibarr/htdocs/includes
%_datadir/dolibarr/htdocs/install %_datadir/dolibarr/htdocs/install
%_datadir/dolibarr/htdocs/intracommreport
%_datadir/dolibarr/htdocs/knowledgemanagement
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt %_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
%_datadir/dolibarr/htdocs/livraison
%_datadir/dolibarr/htdocs/loan %_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip %_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin %_datadir/dolibarr/htdocs/margin
@@ -205,14 +202,12 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/mrp %_datadir/dolibarr/htdocs/mrp
%_datadir/dolibarr/htdocs/multicurrency %_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey %_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/partnership
%_datadir/dolibarr/htdocs/paybox %_datadir/dolibarr/htdocs/paybox
%_datadir/dolibarr/htdocs/paypal %_datadir/dolibarr/htdocs/paypal
%_datadir/dolibarr/htdocs/printing %_datadir/dolibarr/htdocs/printing
%_datadir/dolibarr/htdocs/product %_datadir/dolibarr/htdocs/product
%_datadir/dolibarr/htdocs/projet %_datadir/dolibarr/htdocs/projet
%_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/recruitment
%_datadir/dolibarr/htdocs/reception %_datadir/dolibarr/htdocs/reception
%_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/resource
%_datadir/dolibarr/htdocs/salaries %_datadir/dolibarr/htdocs/salaries
@@ -225,10 +220,8 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/ticket %_datadir/dolibarr/htdocs/ticket
%_datadir/dolibarr/htdocs/user %_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants %_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webhook
%_datadir/dolibarr/htdocs/webservices %_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/website %_datadir/dolibarr/htdocs/website
%_datadir/dolibarr/htdocs/workstation
%_datadir/dolibarr/htdocs/zapier %_datadir/dolibarr/htdocs/zapier
%_datadir/dolibarr/htdocs/*.ico %_datadir/dolibarr/htdocs/*.ico
%_datadir/dolibarr/htdocs/*.patch %_datadir/dolibarr/htdocs/*.patch
@@ -272,10 +265,12 @@ if [ -s $config ] && grep -q "File generated by" $config
then then
# File already exist. We add params not found. # File already exist. We add params not found.
echo Add new params to overwrite path to use shared libraries/fonts echo Add new params to overwrite path to use shared libraries/fonts
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
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" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config

View File

@@ -25,7 +25,7 @@ BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: Productivity/Office/Management 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: apache2, apache2-mod_php5, php5 >= 5.3.0, php5-gd, php5-ldap, php5-imap, php5-mysql, php5-openssl, dejavu
Requires: mysql-community-server, mysql-community-server-client Requires: mysql-community-server, mysql-community-server-client
%if 0%{?suse_version} %if 0%{?suse_version}
BuildRequires: update-desktop-files fdupes BuildRequires: update-desktop-files fdupes
@@ -67,7 +67,8 @@ Programmo web, progettato per poter fornire solo ciò di
cui hai bisogno ed essere facile da usare. cui hai bisogno ed essere facile da usare.
#---- prepo
#---- prep
%prep %prep
%setup -q %setup -q
%patch0 -p0 -b .patch %patch0 -p0 -b .patch
@@ -172,8 +173,8 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog %_datadir/dolibarr/htdocs/blockedlog
%_datadir/dolibarr/htdocs/bookmarks %_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/bookcal
%_datadir/dolibarr/htdocs/bom %_datadir/dolibarr/htdocs/bom
%_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories %_datadir/dolibarr/htdocs/categories
%_datadir/dolibarr/htdocs/collab %_datadir/dolibarr/htdocs/collab
%_datadir/dolibarr/htdocs/comm %_datadir/dolibarr/htdocs/comm
@@ -188,11 +189,9 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/datapolicy %_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav %_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/debugbar %_datadir/dolibarr/htdocs/debugbar
%_datadir/dolibarr/htdocs/delivery
%_datadir/dolibarr/htdocs/don %_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm %_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/emailcollector %_datadir/dolibarr/htdocs/emailcollector
%_datadir/dolibarr/htdocs/eventorganization
%_datadir/dolibarr/htdocs/expedition %_datadir/dolibarr/htdocs/expedition
%_datadir/dolibarr/htdocs/expensereport %_datadir/dolibarr/htdocs/expensereport
%_datadir/dolibarr/htdocs/exports %_datadir/dolibarr/htdocs/exports
@@ -205,9 +204,8 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/imports %_datadir/dolibarr/htdocs/imports
%_datadir/dolibarr/htdocs/includes %_datadir/dolibarr/htdocs/includes
%_datadir/dolibarr/htdocs/install %_datadir/dolibarr/htdocs/install
%_datadir/dolibarr/htdocs/intracommreport
%_datadir/dolibarr/htdocs/knowledgemanagement
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt %_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
%_datadir/dolibarr/htdocs/livraison
%_datadir/dolibarr/htdocs/loan %_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip %_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin %_datadir/dolibarr/htdocs/margin
@@ -215,14 +213,12 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/mrp %_datadir/dolibarr/htdocs/mrp
%_datadir/dolibarr/htdocs/multicurrency %_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey %_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/partnership
%_datadir/dolibarr/htdocs/paybox %_datadir/dolibarr/htdocs/paybox
%_datadir/dolibarr/htdocs/paypal %_datadir/dolibarr/htdocs/paypal
%_datadir/dolibarr/htdocs/printing %_datadir/dolibarr/htdocs/printing
%_datadir/dolibarr/htdocs/product %_datadir/dolibarr/htdocs/product
%_datadir/dolibarr/htdocs/projet %_datadir/dolibarr/htdocs/projet
%_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/recruitment
%_datadir/dolibarr/htdocs/reception %_datadir/dolibarr/htdocs/reception
%_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/resource
%_datadir/dolibarr/htdocs/salaries %_datadir/dolibarr/htdocs/salaries
@@ -235,10 +231,8 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/ticket %_datadir/dolibarr/htdocs/ticket
%_datadir/dolibarr/htdocs/user %_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants %_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webhook
%_datadir/dolibarr/htdocs/webservices %_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/website %_datadir/dolibarr/htdocs/website
%_datadir/dolibarr/htdocs/workstation
%_datadir/dolibarr/htdocs/zapier %_datadir/dolibarr/htdocs/zapier
%_datadir/dolibarr/htdocs/*.ico %_datadir/dolibarr/htdocs/*.ico
%_datadir/dolibarr/htdocs/*.patch %_datadir/dolibarr/htdocs/*.patch
@@ -282,10 +276,12 @@ if [ -s $config ] && grep -q "File generated by" $config
then then
# File already exist. We add params not found. # File already exist. We add params not found.
echo Add new params to overwrite path to use shared libraries/fonts echo Add new params to overwrite path to use shared libraries/fonts
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
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" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config

View File

@@ -17,13 +17,14 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
$force_install_dolibarrlogin='admin'; $force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1'; $force_install_nophpinfo='1';
$force_install_lockinstall='444'; $force_install_lockinstall='444';
$force_install_distrib='rpmfedora';
// Value to overwrite path to use shared libraries/fonts instead of embedded one // Value to overwrite path to use shared libraries/fonts instead of embedded one
$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
//$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; //$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi';
//$force_dolibarr_lib_GEOIP_PATH=''; //$force_dolibarr_lib_GEOIP_PATH='';
$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; $force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
//$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; //$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
$force_dolibarr_lib_PHPEXCEL_PATH='';
$force_dolibarr_lib_TCPDF_PATH=''; $force_dolibarr_lib_TCPDF_PATH='';
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor'; //$force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
//$force_dolibarr_js_JQUERY='/javascript/jquery'; //$force_dolibarr_js_JQUERY='/javascript/jquery';

View File

@@ -17,7 +17,6 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
$force_install_dolibarrlogin='admin'; $force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1'; $force_install_nophpinfo='1';
$force_install_lockinstall='444'; $force_install_lockinstall='444';
$force_install_distrib='rpmgeneric';
// Value to overwrite path to use shared libraries/fonts instead of embedded one // Value to overwrite path to use shared libraries/fonts instead of embedded one
// We don't force any external lib with generic package // We don't force any external lib with generic package

View File

@@ -17,13 +17,14 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
$force_install_dolibarrlogin='admin'; $force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1'; $force_install_nophpinfo='1';
$force_install_lockinstall='444'; $force_install_lockinstall='444';
$force_install_distrib='rpmmandriva';
// Value to overwrite path to use shared libraries/fonts instead of embedded one // Value to overwrite path to use shared libraries/fonts instead of embedded one
$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
//$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; //$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi';
//$force_dolibarr_lib_GEOIP_PATH=''; //$force_dolibarr_lib_GEOIP_PATH='';
$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; $force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
//$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; //$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
$force_dolibarr_lib_PHPEXCEL_PATH='';
$force_dolibarr_lib_TCPDF_PATH=''; $force_dolibarr_lib_TCPDF_PATH='';
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor'; //$force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
//$force_dolibarr_js_JQUERY='/javascript/jquery'; //$force_dolibarr_js_JQUERY='/javascript/jquery';

View File

@@ -17,13 +17,14 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
$force_install_dolibarrlogin='admin'; $force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1'; $force_install_nophpinfo='1';
$force_install_lockinstall='444'; $force_install_lockinstall='444';
$force_install_distrib='rpmopensuse';
// Value to overwrite path to use shared libraries/fonts instead of embedded one // Value to overwrite path to use shared libraries/fonts instead of embedded one
//$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
//$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; //$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi';
//$force_dolibarr_lib_GEOIP_PATH=''; //$force_dolibarr_lib_GEOIP_PATH='';
//$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; //$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
//$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; //$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
$force_dolibarr_lib_PHPEXCEL_PATH='';
$force_dolibarr_lib_TCPDF_PATH=''; $force_dolibarr_lib_TCPDF_PATH='';
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor'; //$force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
//$force_dolibarr_js_JQUERY='/javascript/jquery'; //$force_dolibarr_js_JQUERY='/javascript/jquery';

View File

@@ -1,5 +1,5 @@
# Format of sitemap file is available at # Format of sitemap file is available at
# https://www.sitemaps.org/protocol.html # http://www.sitemaps.org/protocol.html
# To build a sitemap from urllist-bing.txt, run # To build a sitemap from urllist-bing.txt, run
# google-sitemapgen --config=config-bing.xml --testing # google-sitemapgen --config=config-bing.xml --testing

View File

@@ -1 +1 @@
https://wiki.dolibarr.org/ http://wiki.dolibarr.org/

View File

@@ -1,17 +1,15 @@
*~ *~
.#* .#*
.git
.gitignore
.scrutinizer.yml
Thumbs.db Thumbs.db
build/exe build/exe
build/html build/html
dev/examples/zapier dev/dbmodel
dev/fpdf
dev/initdemo dev/initdemo
dev/initdata dev/initdata
dev/resources/dbmodel dev/iso-normes
dev/resources/iso-normes dev/licence
dev/resources/licence dev/load
htdocs/conf/conf.php htdocs/conf/conf.php
htdocs/conf/conf.php.mysql htdocs/conf/conf.php.mysql
htdocs/conf/conf.php.old htdocs/conf/conf.php.old

View File

@@ -9,14 +9,14 @@
</Directory> </Directory>
# Wire up Apache to use Travis CI's php-fpm. # Wire up Apache to use Travis CI's php-fpm.
#<IfModule mod_fastcgi.c> <IfModule mod_fastcgi.c>
# AddHandler php5-fcgi .php AddHandler php5-fcgi .php
# Action php5-fcgi /php5-fcgi Action php5-fcgi /php5-fcgi
# Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
# FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization
#
#<Directory /usr/lib/cgi-bin> <Directory /usr/lib/cgi-bin>
# Require all granted Require all granted
#</Directory> </Directory>
#</IfModule> </IfModule>
</VirtualHost> </VirtualHost>

60
composer.json Normal file
View File

@@ -0,0 +1,60 @@
{
"name" : "dolibarr/dolibarr",
"type" : "project",
"description" : "Dolibarr ERP & CRM is a modern and easy to use web software to manage your business",
"keywords" : [
"erp",
"crm",
"invoice",
"sme",
"proposal",
"order",
"stock",
"agenda"
],
"homepage" : "https://www.dolibarr.org",
"license" : "GPL-3.0-or-later",
"support" : {
"issues" : "https://github.com/Dolibarr/dolibarr/issues",
"forum" : "https://www.dolibarr.org/forum",
"wiki" : "https://wiki.dolibarr.org",
"source" : "https://github.com/Dolibarr/dolibarr"
},
"config" : {
"vendor-dir" : "htdocs/includes"
},
"require" : {
"php" : ">=5.6.0",
"ext-curl" : "*",
"ckeditor/ckeditor" : "4.12.1",
"mike42/escpos-php" : "2.2",
"mobiledetect/mobiledetectlib" : "2.8.34",
"phpoffice/phpexcel" : "1.8.1",
"restler/framework" : "3.0.0-RC6",
"tecnickcom/tcpdf" : "6.3.2",
"nnnick/chartjs" : "^2.9",
"stripe/stripe-php" : "6.43.1"
},
"require-dev" : {
"jakub-onderka/php-parallel-lint" : "^0",
"jakub-onderka/php-console-highlighter" : "^0",
"phpunit/phpunit" : "^4",
"squizlabs/php_codesniffer" : "^2",
"phpunit/phpunit-selenium" : "^2"
},
"suggest" : {
"ext-mysqlnd" : "To use with MySQL or MariaDB",
"ext-mysqli" : "To use with MySQL or MariaDB",
"ext-pgsql" : "To use with PostgreSQL",
"ext-mssql" : "To use with MSSQL (experimental)",
"ext-pdo_sqlite" : "To use with SQLite (experimental)",
"ext-gd" : "Image manipulation (Required but maybe built-in PHP)",
"ext-imagick" : "Generation of thumbs from PDF",
"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",
"ext-zip" : "ODT, Excel and file compression support",
"ext-xml" : "Excel support"
}
}

Some files were not shown because too many files have changed in this diff Show More