diff options
28 files changed, 190 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b99211bd4..bf61fbc48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,7 +65,6 @@ macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source buil # add macros include(MacroCopyFile) include(Java) -include(UseJava) file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/classes) file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/dist) @@ -170,4 +169,3 @@ elseif (APPLICATION_FLAVOR_DOGTAG_PKI_THEME) elseif (APPLICATION_FLAVOR_REDHAT_PKI_THEME) add_subdirectory(redhat) endif () - diff --git a/base/CMakeLists.txt b/base/CMakeLists.txt index 734057374..310a3e3c8 100644 --- a/base/CMakeLists.txt +++ b/base/CMakeLists.txt @@ -16,20 +16,35 @@ if (APPLICATION_FLAVOR_PKI_CORE) add_subdirectory(ocsp) add_subdirectory(tks) add_subdirectory(silent) + if(WITH_JAVADOC) add_subdirectory(javadoc) endif(WITH_JAVADOC) + + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/VERSION ${APPLICATION_VERSION}) + + install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/VERSION + DESTINATION + ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME} + ) + endif (APPLICATION_FLAVOR_PKI_CORE) + if (APPLICATION_FLAVOR_PKI_RA) add_subdirectory(ra) endif (APPLICATION_FLAVOR_PKI_RA) + if (APPLICATION_FLAVOR_PKI_TPS) add_subdirectory(tps) endif (APPLICATION_FLAVOR_PKI_TPS) + if (APPLICATION_FLAVOR_PKI_CONSOLE) add_subdirectory(test) add_subdirectory(console) endif (APPLICATION_FLAVOR_PKI_CONSOLE) + if (APPLICATION_FLAVOR_PKI_MIGRATE) add_subdirectory(test) add_subdirectory(migrate) diff --git a/base/ca/src/CMakeLists.txt b/base/ca/src/CMakeLists.txt index 09cea8ac2..9bfbb23a2 100644 --- a/base/ca/src/CMakeLists.txt +++ b/base/ca/src/CMakeLists.txt @@ -46,9 +46,18 @@ javac(pki-ca-classes symkey pki-nsutil pki-cmsutil pki-certsrv pki-cms pki-cmscore ) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/pki-ca.mf + ${CMAKE_CURRENT_BINARY_DIR}/pki-ca.mf +) + jar(pki-ca-jar CREATE ${CMAKE_BINARY_DIR}/dist/pki-ca-${APPLICATION_VERSION}.jar + OPTIONS + m + PARAMS + ${CMAKE_CURRENT_BINARY_DIR}/pki-ca.mf INPUT_DIR ${CMAKE_BINARY_DIR}/classes FILES diff --git a/base/ca/src/pki-ca.mf b/base/ca/src/pki-ca.mf new file mode 100644 index 000000000..056f7bc08 --- /dev/null +++ b/base/ca/src/pki-ca.mf @@ -0,0 +1,2 @@ +Name: pki-ca +Implementation-Version: ${APPLICATION_VERSION}
\ No newline at end of file diff --git a/base/common/src/CMakeLists.txt b/base/common/src/CMakeLists.txt index fb4f5675e..516c7ad2d 100644 --- a/base/common/src/CMakeLists.txt +++ b/base/common/src/CMakeLists.txt @@ -136,9 +136,18 @@ javac(pki-certsrv-classes pki-nsutil pki-cmsutil ) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/pki-certsrv.mf + ${CMAKE_CURRENT_BINARY_DIR}/pki-certsrv.mf +) + jar(pki-certsrv-jar CREATE ${CMAKE_BINARY_DIR}/dist/pki-certsrv-${APPLICATION_VERSION}.jar + OPTIONS + m + PARAMS + ${CMAKE_CURRENT_BINARY_DIR}/pki-certsrv.mf INPUT_DIR ${CMAKE_BINARY_DIR}/classes FILES @@ -187,9 +196,18 @@ javac(pki-cms-classes pki-nsutil pki-cmsutil pki-certsrv ) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/pki-cms.mf + ${CMAKE_CURRENT_BINARY_DIR}/pki-cms.mf +) + jar(pki-cms-jar CREATE ${CMAKE_BINARY_DIR}/dist/pki-cms-${APPLICATION_VERSION}.jar + OPTIONS + m + PARAMS + ${CMAKE_CURRENT_BINARY_DIR}/pki-cms.mf INPUT_DIR ${CMAKE_BINARY_DIR}/classes FILES @@ -232,9 +250,18 @@ javac(pki-tomcat-classes pki-cms ) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/pki-tomcat.mf + ${CMAKE_CURRENT_BINARY_DIR}/pki-tomcat.mf +) + jar(pki-tomcat-jar CREATE ${CMAKE_BINARY_DIR}/dist/pki-tomcat-${APPLICATION_VERSION}.jar + OPTIONS + m + PARAMS + ${CMAKE_CURRENT_BINARY_DIR}/pki-tomcat.mf INPUT_DIR ${CMAKE_BINARY_DIR}/classes FILES @@ -281,9 +308,18 @@ javac(pki-cmscore-classes pki-nsutil pki-cmsutil pki-certsrv pki-cms pki-tomcat ) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/pki-cmscore.mf + ${CMAKE_CURRENT_BINARY_DIR}/pki-cmscore.mf +) + jar(pki-cmscore-jar CREATE ${CMAKE_BINARY_DIR}/dist/pki-cmscore-${APPLICATION_VERSION}.jar + OPTIONS + m + PARAMS + ${CMAKE_CURRENT_BINARY_DIR}/pki-cmscore.mf INPUT_DIR ${CMAKE_BINARY_DIR}/classes FILES @@ -313,9 +349,18 @@ set(PKI_CMSCORE_JAR ${CMAKE_BINARY_DIR}/dist/pki-cmscore.jar CACHE INTERNAL "pki # build pki-cmsbundle +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/pki-cmsbundle.mf + ${CMAKE_CURRENT_BINARY_DIR}/pki-cmsbundle.mf +) + jar(pki-cmsbundle-jar CREATE ${CMAKE_BINARY_DIR}/dist/pki-cmsbundle-${APPLICATION_VERSION}.jar + OPTIONS + m + PARAMS + ${CMAKE_CURRENT_BINARY_DIR}/pki-cmsbundle.mf FILES LogMessages.properties UserMessages.properties diff --git a/base/common/src/pki-certsrv.mf b/base/common/src/pki-certsrv.mf new file mode 100644 index 000000000..fe2ed1ffe --- /dev/null +++ b/base/common/src/pki-certsrv.mf @@ -0,0 +1,2 @@ +Name: pki-certsrv +Implementation-Version: ${APPLICATION_VERSION}
\ No newline at end of file diff --git a/base/common/src/pki-cms.mf b/base/common/src/pki-cms.mf new file mode 100644 index 000000000..2c6f8010f --- /dev/null +++ b/base/common/src/pki-cms.mf @@ -0,0 +1,2 @@ +Name: pki-cms +Implementation-Version: ${APPLICATION_VERSION}
\ No newline at end of file diff --git a/base/common/src/pki-cmsbundle.mf b/base/common/src/pki-cmsbundle.mf new file mode 100644 index 000000000..84d6f0e7a --- /dev/null +++ b/base/common/src/pki-cmsbundle.mf @@ -0,0 +1,2 @@ +Name: pki-cmsbundle +Implementation-Version: ${APPLICATION_VERSION}
\ No newline at end of file diff --git a/base/common/src/pki-cmscore.mf b/base/common/src/pki-cmscore.mf new file mode 100644 index 000000000..1b1a03f50 --- /dev/null +++ b/base/common/src/pki-cmscore.mf @@ -0,0 +1,2 @@ +Name: pki-cmscore +Implementation-Version: ${APPLICATION_VERSION}
\ No newline at end of file diff --git a/base/common/src/pki-tomcat.mf b/base/common/src/pki-tomcat.mf new file mode 100644 index 000000000..a6e4889b8 --- /dev/null +++ b/base/common/src/pki-tomcat.mf @@ -0,0 +1,2 @@ +Name: pki-tomcat +Implementation-Version: ${APPLICATION_VERSION}
\ No newline at end of file diff --git a/base/console/src/CMakeLists.txt b/base/console/src/CMakeLists.txt index 335411e39..f53f2ddd7 100644 --- a/base/console/src/CMakeLists.txt +++ b/base/console/src/CMakeLists.txt @@ -98,10 +98,19 @@ javac(pki-console-classes ${CMAKE_BINARY_DIR}/classes ) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/pki-console.mf + ${CMAKE_CURRENT_BINARY_DIR}/pki-console.mf +) + # package console classes and resources jar(pki-console-jar CREATE ${CMAKE_BINARY_DIR}/dist/pki-console-${APPLICATION_VERSION}.jar + OPTIONS + m + PARAMS + ${CMAKE_CURRENT_BINARY_DIR}/pki-console.mf INPUT_DIR ${CMAKE_BINARY_DIR}/classes FILES diff --git a/base/console/src/pki-console.mf b/base/console/src/pki-console.mf new file mode 100644 index 000000000..91ec08905 --- /dev/null +++ b/base/console/src/pki-console.mf @@ -0,0 +1,2 @@ +Name: pki-console +Implementation-Version: ${APPLICATION_VERSION}
\ No newline at end of file diff --git a/base/java-tools/src/CMakeLists.txt b/base/java-tools/src/CMakeLists.txt index c01b425a6..d2169e1c2 100644 --- a/base/java-tools/src/CMakeLists.txt +++ b/base/java-tools/src/CMakeLists.txt @@ -97,9 +97,18 @@ javac(pki-tools-classes pki-nsutil pki-cmsutil pki-certsrv ) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/pki-tools.mf + ${CMAKE_CURRENT_BINARY_DIR}/pki-tools.mf +) + jar(pki-tools-jar CREATE ${CMAKE_BINARY_DIR}/dist/pki-tools-${APPLICATION_VERSION}.jar + OPTIONS + m + PARAMS + ${CMAKE_CURRENT_BINARY_DIR}/pki-tools.mf INPUT_DIR ${CMAKE_BINARY_DIR}/classes FILES diff --git a/base/java-tools/src/com/netscape/cmstools/cli/MainCLI.java b/base/java-tools/src/com/netscape/cmstools/cli/MainCLI.java index a6350e5d8..44ccf9511 100644 --- a/base/java-tools/src/com/netscape/cmstools/cli/MainCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/cli/MainCLI.java @@ -50,6 +50,11 @@ public class MainCLI extends CLI { addModule(new UserCLI(this)); } + public void printVersion() { + Package pkg = MainCLI.class.getPackage(); + System.out.println("PKI Command-Line Interface "+pkg.getImplementationVersion()); + } + public void printHelp() { formatter.printHelp(name+" [OPTIONS..] <command> [ARGS..]", options); @@ -118,6 +123,7 @@ public class MainCLI extends CLI { options.addOption("v", false, "Verbose"); options.addOption(null, "help", false, "Help"); + options.addOption(null, "version", false, "Version"); } public void parseOptions(CommandLine cmd) throws URISyntaxException { @@ -170,6 +176,11 @@ public class MainCLI extends CLI { String[] cmdArgs = cmd.getArgs(); + if (cmd.hasOption("version")) { + printVersion(); + System.exit(1); + } + if (cmdArgs.length == 0 || cmd.hasOption("help")) { printHelp(); System.exit(1); diff --git a/base/java-tools/src/pki-tools.mf b/base/java-tools/src/pki-tools.mf new file mode 100644 index 000000000..3cf1821aa --- /dev/null +++ b/base/java-tools/src/pki-tools.mf @@ -0,0 +1,2 @@ +Name: pki-tools +Implementation-Version: ${APPLICATION_VERSION}
\ No newline at end of file diff --git a/base/kra/src/CMakeLists.txt b/base/kra/src/CMakeLists.txt index 5f5e3f016..1d4f75b69 100644 --- a/base/kra/src/CMakeLists.txt +++ b/base/kra/src/CMakeLists.txt @@ -91,9 +91,18 @@ javac(pki-kra-classes symkey pki-nsutil pki-cmsutil pki-certsrv pki-cms pki-cmscore ) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/pki-kra.mf + ${CMAKE_CURRENT_BINARY_DIR}/pki-kra.mf +) + jar(pki-kra-jar CREATE ${CMAKE_BINARY_DIR}/dist/pki-kra-${APPLICATION_VERSION}.jar + OPTIONS + m + PARAMS + ${CMAKE_CURRENT_BINARY_DIR}/pki-kra.mf INPUT_DIR ${CMAKE_BINARY_DIR}/classes FILES diff --git a/base/kra/src/pki-kra.mf b/base/kra/src/pki-kra.mf new file mode 100644 index 000000000..3234421e7 --- /dev/null +++ b/base/kra/src/pki-kra.mf @@ -0,0 +1,2 @@ +Name: pki-kra +Implementation-Version: ${APPLICATION_VERSION}
\ No newline at end of file diff --git a/base/ocsp/src/CMakeLists.txt b/base/ocsp/src/CMakeLists.txt index 34b1ec4c2..2ea6a1536 100644 --- a/base/ocsp/src/CMakeLists.txt +++ b/base/ocsp/src/CMakeLists.txt @@ -91,9 +91,18 @@ javac(pki-ocsp-classes symkey pki-nsutil pki-cmsutil pki-certsrv pki-cms pki-cmscore ) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/pki-ocsp.mf + ${CMAKE_CURRENT_BINARY_DIR}/pki-ocsp.mf +) + jar(pki-ocsp-jar CREATE ${CMAKE_BINARY_DIR}/dist/pki-ocsp-${APPLICATION_VERSION}.jar + OPTIONS + m + PARAMS + ${CMAKE_CURRENT_BINARY_DIR}/pki-ocsp.mf INPUT_DIR ${CMAKE_BINARY_DIR}/classes FILES diff --git a/base/ocsp/src/pki-ocsp.mf b/base/ocsp/src/pki-ocsp.mf new file mode 100644 index 000000000..999e7d992 --- /dev/null +++ b/base/ocsp/src/pki-ocsp.mf @@ -0,0 +1,2 @@ +Name: pki-ocsp +Implementation-Version: ${APPLICATION_VERSION}
\ No newline at end of file diff --git a/base/silent/src/CMakeLists.txt b/base/silent/src/CMakeLists.txt index 0240439ce..00e1c4e46 100644 --- a/base/silent/src/CMakeLists.txt +++ b/base/silent/src/CMakeLists.txt @@ -39,9 +39,18 @@ javac(pki-silent-classes symkey pki-cmsutil pki-nsutil pki-certsrv pki-cms ) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/pki-silent.mf + ${CMAKE_CURRENT_BINARY_DIR}/pki-silent.mf +) + jar(pki-silent-jar CREATE ${CMAKE_BINARY_DIR}/dist/pki-silent-${APPLICATION_VERSION}.jar + OPTIONS + m + PARAMS + ${CMAKE_CURRENT_BINARY_DIR}/pki-silent.mf INPUT_DIR ${CMAKE_BINARY_DIR}/classes FILES diff --git a/base/silent/src/pki-silent.mf b/base/silent/src/pki-silent.mf new file mode 100644 index 000000000..5b66b7ffc --- /dev/null +++ b/base/silent/src/pki-silent.mf @@ -0,0 +1,2 @@ +Name: pki-silent +Implementation-Version: ${APPLICATION_VERSION}
\ No newline at end of file diff --git a/base/tks/src/CMakeLists.txt b/base/tks/src/CMakeLists.txt index 10660f511..cb901c446 100644 --- a/base/tks/src/CMakeLists.txt +++ b/base/tks/src/CMakeLists.txt @@ -92,9 +92,18 @@ javac(pki-tks-classes symkey pki-nsutil pki-cmsutil pki-certsrv pki-cms pki-cmscore ) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/pki-tks.mf + ${CMAKE_CURRENT_BINARY_DIR}/pki-tks.mf +) + jar(pki-tks-jar CREATE ${CMAKE_BINARY_DIR}/dist/pki-tks-${APPLICATION_VERSION}.jar + OPTIONS + m + PARAMS + ${CMAKE_CURRENT_BINARY_DIR}/pki-tks.mf INPUT_DIR ${CMAKE_BINARY_DIR}/classes FILES diff --git a/base/tks/src/pki-tks.mf b/base/tks/src/pki-tks.mf new file mode 100644 index 000000000..a9f3a3e50 --- /dev/null +++ b/base/tks/src/pki-tks.mf @@ -0,0 +1,2 @@ +Name: pki-tks +Implementation-Version: ${APPLICATION_VERSION}
\ No newline at end of file diff --git a/base/util/src/CMakeLists.txt b/base/util/src/CMakeLists.txt index 0f8eb496f..a39d9d828 100644 --- a/base/util/src/CMakeLists.txt +++ b/base/util/src/CMakeLists.txt @@ -57,9 +57,18 @@ javac(pki-nsutil-classes ${CMAKE_BINARY_DIR}/classes ) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/pki-nsutil.mf + ${CMAKE_CURRENT_BINARY_DIR}/pki-nsutil.mf +) + jar(pki-nsutil-jar CREATE ${CMAKE_BINARY_DIR}/dist/pki-nsutil-${APPLICATION_VERSION}.jar + OPTIONS + m + PARAMS + ${CMAKE_CURRENT_BINARY_DIR}/pki-nsutil.mf INPUT_DIR ${CMAKE_BINARY_DIR}/classes FILES @@ -101,9 +110,18 @@ javac(pki-cmsutil-classes pki-nsutil ) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/pki-cmsutil.mf + ${CMAKE_CURRENT_BINARY_DIR}/pki-cmsutil.mf +) + jar(pki-cmsutil-jar CREATE ${CMAKE_BINARY_DIR}/dist/pki-cmsutil-${APPLICATION_VERSION}.jar + OPTIONS + m + PARAMS + ${CMAKE_CURRENT_BINARY_DIR}/pki-cmsutil.mf INPUT_DIR ${CMAKE_BINARY_DIR}/classes FILES diff --git a/base/util/src/pki-cmsutil.mf b/base/util/src/pki-cmsutil.mf new file mode 100644 index 000000000..87382b9aa --- /dev/null +++ b/base/util/src/pki-cmsutil.mf @@ -0,0 +1,2 @@ +Name: pki-cmsutil +Implementation-Version: ${APPLICATION_VERSION}
\ No newline at end of file diff --git a/base/util/src/pki-nsutil.mf b/base/util/src/pki-nsutil.mf new file mode 100644 index 000000000..272200d67 --- /dev/null +++ b/base/util/src/pki-nsutil.mf @@ -0,0 +1,2 @@ +Name: pki-nsutil +Implementation-Version: ${APPLICATION_VERSION}
\ No newline at end of file diff --git a/cmake/Modules/Java.cmake b/cmake/Modules/Java.cmake index b0e561a2c..ea74df74b 100644 --- a/cmake/Modules/Java.cmake +++ b/cmake/Modules/Java.cmake @@ -177,7 +177,7 @@ function(jar target) -Dexclude="${exclude_${i}}" -P ${CMAKE_MODULE_PATH}/JavaFileList.cmake COMMAND ${CMAKE_Java_ARCHIVE} - -${operation}${options} ${params} + ${operation}${options} ${params} @${file_list_${i}} WORKING_DIRECTORY ${input_dir_${i}} ) @@ -227,7 +227,7 @@ function(javadoc target) endif(param STREQUAL "SOURCEPATH") - endif(arg MATCHES "(SOURCEPATH|CLASSPATH|FILES|PACKAGES|SUBPACKAGES|EXCLUDE|DEST|DEPENDS)") + endif(arg MATCHES "(SOURCEPATH|CLASSPATH|FILES|PACKAGES|SUBPACKAGES|EXCLUDE|OPTIONS|DEST|DEPENDS)") endforeach(arg) @@ -243,7 +243,7 @@ function(javadoc target) foreach (option ${options}) set(command ${command} ${option}) endforeach(option ${options}) - endif(sourcepath) + endif(options) if (sourcepath) set(tmp) @@ -265,7 +265,7 @@ function(javadoc target) set(tmp) foreach (package ${subpackages}) set(tmp "${tmp}:${package}") - endforeach(path) + endforeach(package) set(command ${command} -subpackages ${tmp}) endif(subpackages) diff --git a/specs/pki-core.spec b/specs/pki-core.spec index cddb0ebcf..feef82ab2 100644 --- a/specs/pki-core.spec +++ b/specs/pki-core.spec @@ -14,7 +14,7 @@ distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} Name: pki-core Version: 10.0.0 -Release: %{?relprefix}34%{?prerel}%{?dist} +Release: %{?relprefix}35%{?prerel}%{?dist} Summary: Certificate System - PKI Core Components URL: http://pki.fedoraproject.org/ License: GPLv2 @@ -1039,6 +1039,8 @@ fi %files -n pki-base %defattr(-,root,root,-) %doc base/common/LICENSE +%dir %{_datadir}/pki +%{_datadir}/pki/VERSION %dir %{_javadir}/pki %{_javadir}/pki/pki-cmsutil-%{version}.jar %{_javadir}/pki/pki-cmsutil.jar @@ -1056,7 +1058,6 @@ fi %{_bindir}/setpin %{_bindir}/sslget %{_bindir}/tkstool -%dir %{_datadir}/pki %{_datadir}/pki/native-tools/ %{_bindir}/AtoB %{_bindir}/AuditVerify @@ -1092,7 +1093,6 @@ fi %dir %{python_sitelib}/pki %{python_sitelib}/pki/_* %{python_sitelib}/pki/deployment/ -%dir %{_datadir}/pki %dir %{_datadir}/pki/deployment %{_datadir}/pki/deployment/config/ %dir %{_datadir}/pki/deployment/spawn @@ -1134,7 +1134,6 @@ fi %{_bindir}/pkicreate %{_bindir}/pkiremove %{_bindir}/pki-setup-proxy -%dir %{_datadir}/pki %dir %{_datadir}/pki/scripts %{_datadir}/pki/scripts/pkicommon.pm %{_datadir}/pki/scripts/functions @@ -1299,6 +1298,9 @@ fi %changelog +* Tue Sep 25 2012 Endi S. Dewata <edewata@redhat.com> 10.0.0-0.35.a1 +- Added VERSION file + * Mon Sep 24 2012 Endi S. Dewata <edewata@redhat.com> 10.0.0-0.34.a1 - Merged pki-setup into pki-server |