Skip to content

Commit 634ea3f

Browse files
author
Vladimir Kotal
committed
Merge pull request #804 from tulinkry/master
create.sh fix
2 parents 043ddc7 + 8bdb629 commit 634ea3f

File tree

4 files changed

+282
-73
lines changed

4 files changed

+282
-73
lines changed

README.txt

Lines changed: 63 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
33
#
44

55

@@ -9,14 +9,15 @@ OpenGrok - a wicked fast source browser
99
1. Introduction
1010
2. Requirements
1111
3. Usage
12-
4. OpenGrok setup
13-
5. Optional Command Line Interface Usage
14-
6. Change web application properties or name
15-
7. OpenGrok systray
16-
8. Information for developers
17-
9. Tuning OpenGrok for large code bases
18-
10. Authors
19-
11. Contact us
12+
4. OpenGrok install
13+
5. OpenGrok setup
14+
6. Optional Command Line Interface Usage
15+
7. Change web application properties or name
16+
8. OpenGrok systray
17+
9. Information for developers
18+
10. Tuning OpenGrok for large code bases
19+
11. Authors
20+
12. Contact us
2021

2122

2223
1. Introduction
@@ -89,13 +90,36 @@ Each of these directories was created with 'cvs checkout' command (with
8990
appropriate arguments to get given branch) and will be treated by OpenGrok
9091
as a project.
9192

92-
4. OpenGrok setup
93+
94+
4. OpenGrok install
95+
-----------------
96+
97+
4.1 Installing on Solaris from *.p5p file
98+
-----------------
99+
100+
4.1.0 Install
101+
-----------------
102+
103+
The file <package_name>.p5p you can easily use as a new publisher for the pkg command.
104+
105+
# pkg install --no-refresh -g /path/to/file/<package_name>.p5p opengrok
106+
107+
108+
4.1.1 Update
109+
-----------------
110+
111+
You can also update OpenGrok software with the *.p5p file by running a command
112+
113+
# pkg update --no-refresh -g /path/to/file/<package_name>.p5p 'pkg://<publisher>/*'
114+
115+
116+
5. OpenGrok setup
93117
-----------------
94118

95119
To setup OpenGrok it is needed to prepare the source code, let OpenGrok index
96120
it and start the web application.
97121

98-
4.1 Setting up the sources
122+
5.1 Setting up the sources
99123
--------------------------
100124

101125
Source base should be available locally for OpenGrok to work efficiently.
@@ -123,13 +147,13 @@ If you want to skip indexing the history of a particular directory
123147
at the root of that directory.
124148

125149

126-
4.2 Using Opengrok wrapper script to create indexes
150+
5.2 Using Opengrok wrapper script to create indexes
127151
---------------------------------------------------
128152

129153
For *nix systems there is a shell script called OpenGrok which simplifies most
130154
of the tasks. It has been tested on Solaris and Linux distributions.
131155

132-
4.2.1 - Deploy the web application
156+
5.2.1 - Deploy the web application
133157
----------------------------------
134158

135159
First please change to opengrok directory where the OpenGrok shell script is
@@ -157,7 +181,7 @@ available to user running opengrok with all permissions. In root user case
157181
it will create all the directories needed, otherwise you have to manually
158182
create the directory and grant all permissions to the user used.
159183

160-
4.2.2 - Populate DATA_ROOT Directory
184+
5.2.2 - Populate DATA_ROOT Directory
161185
------------------------------------
162186

163187
During this process the indexer will generate OpenGrok XML configuration file
@@ -221,7 +245,7 @@ OPENGROK_CONFIGURATION environment variable to point to it. Obviously such
221245
setups can be used for nightly cron job updates of index or other automated
222246
purposes.
223247

224-
4.3 Using SMF service (Solaris) to maintain OpenGrok indexes
248+
5.3 Using SMF service (Solaris) to maintain OpenGrok indexes
225249
------------------------------------------------------------
226250

227251
If you installed OpenGrok from the OSOLopengrok package, it will work out of
@@ -260,12 +284,12 @@ Note: before removing the package please disable the service.
260284
If you don't do it, it will not be removed automatically.
261285
In such case please remove it manually.
262286

263-
4.4 Using command line interface to create indexes
287+
5.4 Using command line interface to create indexes
264288
--------------------------------------------------
265289

266290
There are 2 (or 3) steps needed for this task.
267291

268-
4.4.1 - Populate DATA_ROOT Directory
292+
5.4.1 - Populate DATA_ROOT Directory
269293
------------------------------------
270294

271295
Option 1. OpenGrok: There is a sample shell script OpenGrok that is suitable
@@ -281,7 +305,7 @@ hypertext files generated by OpenGrok are to be stored in DATA_ROOT, run
281305

282306
See opengrok.jar manual below for more details.
283307

284-
4.4.2 - Configure and Deploy source.war Webapp
308+
5.4.2 - Configure and Deploy source.war Webapp
285309
----------------------------------------------
286310

287311
To configure the webapp source.war, look into the parameters defined in
@@ -299,7 +323,7 @@ web.xml of source.war file and change them (see note1) appropriately.
299323
The contents of this file file will be appended to the footer of each
300324
web page after the information about last index update.
301325

302-
4.4.3 - Path Descriptions (optional)
326+
5.4.3 - Path Descriptions (optional)
303327
------------------------------------
304328

305329
OpenGrok can use path descriptions in various places (e.g. while showing
@@ -330,7 +354,7 @@ then the paths.tsv file contents can look like this:
330354

331355
Note that only some paths can have a description.
332356

333-
4.4.4 - Changing webapp parameters (optional)
357+
5.4.4 - Changing webapp parameters (optional)
334358
---------------------------------------------
335359

336360
web.xml is the deployment descriptor for the web application. It is in a Jar
@@ -379,7 +403,7 @@ file named source.war, you can change it as follows:
379403

380404
This file will contain something like the Context described above.
381405

382-
4.4.5 Custom ctags configuration
406+
5.4.5 Custom ctags configuration
383407
--------------------------------
384408

385409
To make ctags recognize additional symbols/definitions/etc. it is possible to
@@ -394,7 +418,7 @@ the full path to the file will be /var/opengrok/etc/ctags.config).
394418
Sample configuration file for Solaris code base is delivered in the doc/
395419
directory.
396420

397-
4.5 Using Java DB for history cache
421+
5.5 Using Java DB for history cache
398422
-----------------------------------
399423

400424
By default OpenGrok stores history indexes in gzipped xml files. An alternative
@@ -486,7 +510,7 @@ the JavaDB data directory and add this line to it:
486510
/var/lib/javadb/data/derby.properties
487511

488512

489-
5. Optional Command Line Interface Usage
513+
6. Optional Command Line Interface Usage
490514
----------------------------------------
491515

492516
You need to pass location of project file + the query to Search class, e.g.
@@ -500,7 +524,7 @@ do:
500524

501525
$ java -cp ./opengrok.jar org.opensolaris.opengrok.search.Search
502526

503-
6. Change web application properties or name
527+
7. Change web application properties or name
504528
--------------------------------------------
505529

506530
You might need to modify the web application if you don't store the
@@ -546,7 +570,7 @@ Deploy the modified .war file in tomcat:
546570

547571
* just copy the source.war file to TOMCAT_INSTALL/webapps directory.
548572

549-
7. OpenGrok systray
573+
8. OpenGrok systray
550574
-------------------
551575

552576
The indexer can be setup with agent and systray GUI control application.
@@ -572,10 +596,10 @@ localhost, but rather on a physical network interface).
572596

573597
This agent is work in progress, so it might not fully work.
574598

575-
8. Information for developers
599+
9. Information for developers
576600
-----------------------------
577601

578-
8.0 Building
602+
9.0 Building
579603
------------
580604

581605
Just run 'ant' from command line in the top-level directory or use build
@@ -585,13 +609,13 @@ Note: in case you are behind http proxy, use ANT_OPTS to download jflex, lucene
585609
E.g. $ ANT_OPTS="-Dhttp.proxyHost=?.? -Dhttp.proxyPort=80" ant
586610

587611

588-
8.0.1 Package build
612+
9.0.1 Package build
589613
-------------------
590614

591615
Run 'ant package' to create package (specific for the operating system this is
592616
being executed on) under the dist/ directory.
593617

594-
8.1 Unit testing
618+
9.1 Unit testing
595619
----------------
596620

597621
Note: For full coverage report your system has to provide proper junit test
@@ -620,7 +644,7 @@ The tests are then run as follows:
620644
To check if the test completed without error look for AssertionFailedError
621645
occurences in the TESTS-TestSuites.xml file produced by the test run.
622646

623-
8.2 Using Findbugs
647+
9.2 Using Findbugs
624648
------------------
625649

626650
If you want to run Findbugs (http://findbugs.sourceforge.net/) on OpenGrok,
@@ -655,7 +679,7 @@ under the lib directory):
655679
There is also a findbugs-xml ant target that can be used to generate XML files
656680
that can later be parsed, e.g. by Jenkins.
657681

658-
8.3 Using Emma
682+
9.3 Using Emma
659683
--------------
660684

661685
If you want to check test coverage on OpenGrok, download Emma from
@@ -706,7 +730,7 @@ To generate reports, run ant again:
706730
Look at coverage/coverage.txt, coverage/coverage.xml and
707731
coverage/coverage.html to see how complete your tests are.
708732

709-
8.4 Using Checkstyle
733+
9.4 Using Checkstyle
710734
--------------------
711735

712736
To check that your code follows the standard coding conventions,
@@ -740,7 +764,7 @@ checkstyle under the lib directory):
740764

741765
$ ant checkstyle -Dcheckstyle.home=lib/checkstyle
742766

743-
8.5 Using PMD and CPD
767+
9.5 Using PMD and CPD
744768
---------------------
745769

746770
To check the quality of the OpenGrok code you can also use PMD
@@ -784,7 +808,7 @@ Which will result in:
784808
$ ls pmd
785809
cpd_report.xml cpd_report.txt
786810

787-
8.6 Using JDepend
811+
9.6 Using JDepend
788812
-----------------
789813

790814
To see dependencies in the source code, you can use JDepend from
@@ -807,7 +831,7 @@ Output is stored in the jdepend directory:
807831
$ ls jdepend/
808832
report.txt report.xml
809833

810-
8.7 Using SonarQube
834+
9.7 Using SonarQube
811835
-------------------
812836

813837
Use a sonar runner with included sonar-project.properties properties,
@@ -820,15 +844,15 @@ e.g. using bash:
820844
-Dsonar.host.url=http://${SERVERIP}:9000
821845
-Dsonar.jdbc.url=jdbc:h2:tcp://${SERVERIP}:9092/sonar
822846

823-
8.8 Using Travis CI
847+
9.8 Using Travis CI
824848
-------------------
825849

826850
Please see .travis.yml, if your branch has this file,
827851
you should be able to connect your Github to Travis CI.
828852
OpenGroks Travis is here: https://travis-ci.org/OpenGrok/OpenGrok
829853

830854

831-
9. Tuning OpenGrok for large code bases
855+
10. Tuning OpenGrok for large code bases
832856
---------------------------------------
833857

834858
While indexing big source repos you might consider using ZFS filesystem to give
@@ -886,7 +910,7 @@ the project list when requesting search results):
886910
Refer to docs of other containers for more info on how to achieve the same.
887911

888912

889-
10. Authors
913+
11. Authors
890914
-----------
891915

892916
The project has been originally conceived in Sun Microsystems by Chandan B.N.
@@ -899,7 +923,7 @@ Knut Anders Hatlen, Oracle. http://blogs.oracle.com/kah/
899923
Lubos Kosco, Oracle. http://blogs.oracle.com/taz/
900924
Vladimir Kotal, Oracle. http://blogs.oracle.com/vlad/
901925

902-
11. Contact us
926+
12. Contact us
903927
--------------
904928

905929
Feel free to participate in discussion on [email protected].

build.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,9 @@ Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
394394
<exec os="SunOS" executable="/usr/bin/pkgtrans" failonerror="true">
395395
<arg line="-s build ../dist/OSOLopengrok-${version}.pkg OSOLopengrok"/>
396396
</exec>
397+
<exec os="SunOS" executable="platform/solaris/ips/create.sh" failonerror="true">
398+
<arg line="-v ${version}"/>
399+
</exec>
397400
</target>
398401

399402
<target name="dist" depends="jar">

doc/release.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,29 @@ to produce the archive
4141

4242
ant dist
4343
ant package
44+
45+
The command above creates both formats of package .pkg and .p5p into the directory dist
46+
47+
48+
Note that for the IPS package *.p5p the version names are translated this way:
49+
0.12 ~ 0.12.0.1.0
50+
0.<n> ~ 0.<n>.0.1.0
51+
...
52+
53+
0.12-rc1 ~ 0.12.0.0.1
54+
0.12-rc<i> ~ 0.12.0.0.<i>
55+
...
56+
57+
(Note that the release candidate must follow imediately after the basic version number (0.12))
58+
59+
60+
0.12.1 ~ 0.12.1.0.0
61+
0.12.<j> ~ 0.12.<j>.0.0
62+
...
63+
64+
0.12.0.1 ~ 0.12.0.1.1
65+
0.12.0.<k> ~ 0.12.0.1.<k>
66+
...
4467

4568
5) Upload them using https://github.com/OpenGrok/OpenGrok/releases
4669

0 commit comments

Comments
 (0)