updated some files

This commit is contained in:
hyung-hwan 2020-12-20 08:03:07 +00:00
parent e3185fce1a
commit b4d1ad3319
3 changed files with 131 additions and 102 deletions

View File

@ -1,5 +1,4 @@
# CODEPOT
CODEPOT
Codepot is a simple web-based source code manager. It incorporates the Codepot is a simple web-based source code manager. It incorporates the
subversion revision control system and wiki-based documentation, and supports subversion revision control system and wiki-based documentation, and supports
@ -7,37 +6,34 @@ CODEPOT
multiple subversion repositories independent of each other. Going beyond it, multiple subversion repositories independent of each other. Going beyond it,
you can track issues, write documents, and upload release files. you can track issues, write documents, and upload release files.
UPGRADING FROM 0.2.0 ## DOCKER CONTAINER
You must make the following changes to your existing database manually The easiest wasy to get codepot up and running is to run it in docker.
if you are upgrading from 0.2.0. You may pull the image from the Docker Hub and run a container from the image.
mysql> ALTER TABLE user_settings CHANGE code_hide_details code_hide_metadata CHAR(1) NOT NULL; For example,
mysql> ALTER TABLE site ADD COLUMN(summary VARCHAR(255) NOT NULL);
mysql> RENAME TABLE user TO user_account;
mysql> ALTER TABLE file DROP INDEX encname;
mysql> create the file_list table according to the definition found in codepot.mysql
mysql> INSERT INTO file_list (projectid, name, filename, encname, md5sum, description) SELECT projectid, name, name, encname, md5sum, summary FROM file WHERE md5sum != '';
mysql> ALTER TABLE file DROP COLUMN summary;
mysql> ALTER TABLE file DROP COLUMN md5sum;
mysql> ALTER TABLE file DROP COLUMN encname;
mysql> ALTER TABLE project ADD COLUMN (codecharset VARCHAR(32));
mysql> DROP TABLE issue_attachment;
mysql> create the issue_file_list table according to the definition found in codepot.mysql
mysql> ALTER TABLE issue_change ADD COLUMN(createdon datetime not null, createdby varchar(32) not null);
mysql> UPDATE issue_change SET createdby=updatedby, createdon=updatedon;
mysql> create the issue_coderev table according to the definition found in codepot.mysql
mysql> ALTER TABLE user_settings ADD COLUMN(user_summary VARCHAR(255) NULL);
mysql> CREATE INDEX projectid_index on project_membership(projectid);
mysql> CREATE INDEX userid_index on project_membership(userid);
INSTALLATION ON CENTOS ```
$ docker pull hyunghwan/codepot:ubnt20.04
$ docker run -dit --restart unless-stopped --name codepot -p 7000:80 hyunghwan/codepot:ubnt20.04
```
The image runs the apache2 server in the foreground by default. You may open
a shell session to configure various aspects of codepot.
```
$ docker exec -it codepot /bin/bash
```
# INSTALLATION ON CENTOS
A RPM package is provided for RedHat/CentOS Linux. The RPM package specifies A RPM package is provided for RedHat/CentOS Linux. The RPM package specifies
dependency which must be met prior to or at the same time as the installation dependency which must be met prior to or at the same time as the installation
of the rpm package. of the rpm package.
```
$ rpm -ivh codepot-X.X.X-Y.Y.Y.Y.rpm $ rpm -ivh codepot-X.X.X-Y.Y.Y.Y.rpm
```
You can use the yum utility to be hassle-free instead. However, some required You can use the yum utility to be hassle-free instead. However, some required
packages are not available in the base CentOS repository but in the RPMforge packages are not available in the base CentOS repository but in the RPMforge
@ -45,7 +41,9 @@ INSTALLATION ON CENTOS
View http://wiki.centos.org/AdditionalResources/Repositories/RPMForge for View http://wiki.centos.org/AdditionalResources/Repositories/RPMForge for
RPMforge set-up. RPMforge set-up.
```
$ yum localinstall --nogpgcheck codepot-X.X.X-Y.Y.Y.Y.rpm $ yum localinstall --nogpgcheck codepot-X.X.X-Y.Y.Y.Y.rpm
```
Once you have all required package installed, you can proceed to configure Once you have all required package installed, you can proceed to configure
the system. The following steps shown assume the default installation of the system. The following steps shown assume the default installation of
@ -55,6 +53,7 @@ INSTALLATION ON CENTOS
to install Codepot 0.2.0 for a 32-bit x86 CentOS 5 server running PHP 5.3, to install Codepot 0.2.0 for a 32-bit x86 CentOS 5 server running PHP 5.3,
you should get the RPM package file - codepot-0.2.0-php53.1.el5.i686.rpm. you should get the RPM package file - codepot-0.2.0-php53.1.el5.i686.rpm.
```
1. Add the following line to /etc/httpd/conf.d/perl.conf. It must be placed 1. Add the following line to /etc/httpd/conf.d/perl.conf. It must be placed
after 'LoadModule perl_module modules/mod_perl.so'. after 'LoadModule perl_module modules/mod_perl.so'.
@ -165,12 +164,13 @@ INSTALLATION ON CENTOS
$ service httpd restart $ service httpd restart
12. Access http://your-server/codepot/ 12. Access http://your-server/codepot/
```
## INSTALLATION ON DEBIAN
INSTALLATION ON DEBIAN
Here is how to install Codepot into the standard locations under Debian Linux. Here is how to install Codepot into the standard locations under Debian Linux.
```
* Install required packages. * Install required packages.
$ sudo apt-get install subversion $ sudo apt-get install subversion
$ sudo apt-get install apache2-mpm-prefork $ sudo apt-get install apache2-mpm-prefork
@ -218,15 +218,17 @@ INSTALLATION ON DEBIAN
$ sudo make-ssl-cert generate-default-snakeoil --force-overwrite $ sudo make-ssl-cert generate-default-snakeoil --force-overwrite
$ sudo hostname ${HOSTNAME} $ sudo hostname ${HOSTNAME}
$ sudo /etc/init.d/apache2 restart $ sudo /etc/init.d/apache2 restart
```
Note that make-ssl-cert is provided by the ssl-cert package. Note that make-ssl-cert is provided by the ssl-cert package.
INSTALLATION WITH SOURCE CODE ## INSTALLATION WITH SOURCE CODE
Codepot uses the standard autoconf & automake build system. You can execute Codepot uses the standard autoconf & automake build system. You can execute
'configure' followed by 'make' and 'make install' in principle. However, there 'configure' followed by 'make' and 'make install' in principle. However, there
are some key options you should be aware of. See this sample run below. are some key options you should be aware of. See this sample run below.
```
$ ./configure --prefix=/usr \ $ ./configure --prefix=/usr \
--libdir=/usr/lib64 \ --libdir=/usr/lib64 \
--sysconfdir=/etc \ --sysconfdir=/etc \
@ -239,28 +241,51 @@ INSTALLATION WITH SOURCE CODE
--with-phpextinidir=/etc/php.d --with-phpextinidir=/etc/php.d
$ make $ make
$ make install $ make install
```
You should take note of the following key directory options: You should take note of the following key directory options:
- wwwdir: The directory where most of the codepot program files are - wwwdir: The directory where most of the codepot program files are installed.
installed. - cfgdir: The directory where the codepot configuration file(codepot.ini) and other supporting files are stored.
- cfgdir: The directory where the codepot configuration file(codepot.ini) - depotdir: Subversion repostiories and various files uploaded are stored under this directory.
and other supporting files are stored.
- depotdir: Subversion repostiories and various files uploaded are stored
under this directory.
- cachedir: Cache directory. - cachedir: Cache directory.
- phpextdir: PHP extension directory. The peclsvn extension(svn.so) goes - phpextdir: PHP extension directory. The peclsvn extension(svn.so) goes here.
here. - phpextinidir: The configuration file(svn.ini) to enable the extension goes here.
- phpextinidir: The configuration file(svn.ini) to enable the extension goes
here.
You should customize the value of these directories according to your system You should customize the value of these directories according to your system
configuration. configuration.
LICENSE ## UPGRADING FROM 0.2.0
You must make the following changes to your existing database manually
if you are upgrading from 0.2.0.
```
mysql> ALTER TABLE user_settings CHANGE code_hide_details code_hide_metadata CHAR(1) NOT NULL;
mysql> ALTER TABLE site ADD COLUMN(summary VARCHAR(255) NOT NULL);
mysql> RENAME TABLE user TO user_account;
mysql> ALTER TABLE file DROP INDEX encname;
mysql> create the file_list table according to the definition found in codepot.mysql
mysql> INSERT INTO file_list (projectid, name, filename, encname, md5sum, description) SELECT projectid, name, name, encname, md5sum, summary FROM file WHERE md5sum != '';
mysql> ALTER TABLE file DROP COLUMN summary;
mysql> ALTER TABLE file DROP COLUMN md5sum;
mysql> ALTER TABLE file DROP COLUMN encname;
mysql> ALTER TABLE project ADD COLUMN (codecharset VARCHAR(32));
mysql> DROP TABLE issue_attachment;
mysql> create the issue_file_list table according to the definition found in codepot.mysql
mysql> ALTER TABLE issue_change ADD COLUMN(createdon datetime not null, createdby varchar(32) not null);
mysql> UPDATE issue_change SET createdby=updatedby, createdon=updatedon;
mysql> create the issue_coderev table according to the definition found in codepot.mysql
mysql> ALTER TABLE user_settings ADD COLUMN(user_summary VARCHAR(255) NULL);
mysql> CREATE INDEX projectid_index on project_membership(projectid);
mysql> CREATE INDEX userid_index on project_membership(userid);
```
## LICENSE
This software is licensed under the GNU General Public License. This software is licensed under the GNU General Public License.
```
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
@ -273,9 +298,11 @@ LICENSE
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
```
This software contains the following third-party components. This software contains the following third-party components.
```
------------------------------------------------------------------------ ------------------------------------------------------------------------
Name License Name License
------------------------------------------------------------------------ ------------------------------------------------------------------------
@ -297,4 +324,4 @@ LICENSE
WebODF http://webodf.org/ WebODF http://webodf.org/
ICONMONSTR Icons https://iconmonstr.com/ ICONMONSTR Icons https://iconmonstr.com/
------------------------------------------------------------------------ ------------------------------------------------------------------------
```

View File

@ -46,5 +46,7 @@ cp -pf /etc/codepot/codepot.httpd /etc/apache2/conf-enabled/codepot.conf && \
echo "PerlSwitches -Mlib=/etc/codepot/perl" >> /etc/apache2/conf-enabled/perl.conf echo "PerlSwitches -Mlib=/etc/codepot/perl" >> /etc/apache2/conf-enabled/perl.conf
apt-get remove -y php-dev libsvn-dev make && \ apt-get remove --purge -y php-dev libsvn-dev make libfdisk1 && \
apt-get auto-remove -y && rm -rf /var/lib/apt/lists/* apt-get auto-remove -y && rm -rf /var/lib/apt/lists/*
rm -rf /root/.subversion

View File

@ -1,5 +1,5 @@
Run the service Run the service
docker run rm -dit --restart unless-stopped --name codepot -p 7000:80 codepot:ubnt20.04 docker run -dit --restart unless-stopped --name codepot -p 7000:80 codepot:ubnt20.04
Run the shell on the existing container Run the shell on the existing container
docker exec -it codepot /bin/bash docker exec -it codepot /bin/bash