diff options
Diffstat (limited to 'pki')
52 files changed, 2901 insertions, 210 deletions
diff --git a/pki/CMakeLists.txt b/pki/CMakeLists.txt index 2b2a0009f..eca6e681d 100644 --- a/pki/CMakeLists.txt +++ b/pki/CMakeLists.txt @@ -5,15 +5,44 @@ cmake_minimum_required(VERSION 2.6.0) # global needed variables set(APPLICATION_NAME ${PROJECT_NAME}) -if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/dogtag") +if (BUILD_OSUTIL) + set(APPLICATION_FLAVOUR_OSUTIL TRUE) +elseif (BUILD_CORE) + set(APPLICATION_FLAVOUR_CORE TRUE) +elseif (BUILD_DOGTAG) + set(APPLICATION_FLAVOUR_CORE TRUE) set(APPLICATION_FLAVOUR_DOGTAG TRUE) -endif (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/dogtag") -if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rhcs") - set(APPLICATION_FLAVOUR_RHCS TRUE) -endif (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rhcs") +elseif (BUILD_REDHAT) + set(APPLICATION_FLAVOUR_CORE TRUE) + set(APPLICATION_FLAVOUR_DOGTAG TRUE) + set(APPLICATION_FLAVOUR_REDHAT TRUE) +elseif (BUILD_NULL_THEME) + set(APPLICATION_FLAVOUR_NULL_THEME TRUE) +elseif (BUILD_DOGTAG_THEME) + set(APPLICATION_FLAVOUR_DOGTAG_THEME TRUE) +elseif (BUILD_REDHAT_THEME) + set(APPLICATION_FLAVOUR_REDHAT_THEME TRUE) +elseif (BUILD_CORE_COMPLETE) + set(APPLICATION_FLAVOUR_CORE TRUE) + set(APPLICATION_FLAVOUR_NULL_THEME TRUE) +elseif (BUILD_DOGTAG_COMPLETE) + set(APPLICATION_FLAVOUR_CORE TRUE) + set(APPLICATION_FLAVOUR_DOGTAG TRUE) + set(APPLICATION_FLAVOUR_DOGTAG_THEME TRUE) +elseif (BUILD_REDHAT_COMPLETE) + set(APPLICATION_FLAVOUR_CORE TRUE) + set(APPLICATION_FLAVOUR_DOGTAG TRUE) + set(APPLICATION_FLAVOUR_REDHAT TRUE) + set(APPLICATION_FLAVOUR_REDHAT_THEME TRUE) +else () + # By default, build complete Dogtag + set(APPLICATION_FLAVOUR_CORE TRUE) + set(APPLICATION_FLAVOUR_DOGTAG TRUE) + set(APPLICATION_FLAVOUR_DOGTAG_THEME TRUE) +endif () -set(APPLICATION_VERSION_MAJOR "1") -set(APPLICATION_VERSION_MINOR "3") +set(APPLICATION_VERSION_MAJOR "9") +set(APPLICATION_VERSION_MINOR "0") set(APPLICATION_VERSION_PATCH "0") set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}") @@ -44,7 +73,7 @@ find_package(Java REQUIRED) find_package(JNI REQUIRED) find_package(NSPR REQUIRED) find_package(NSS REQUIRED) -find_package(MozLDAP REQUIRED) +find_package(Ldap REQUIRED) find_package(APR REQUIRED) # Find out if we have threading available @@ -68,7 +97,19 @@ add_custom_target(uninstall # check subdirectories -add_subdirectory(base) -if (APPLICATION_FLAVOUR_DOGTAG) +if (APPLICATION_FLAVOUR_OSUTIL) + add_subdirectory(base) +endif (APPLICATION_FLAVOUR_OSUTIL) +if (APPLICATION_FLAVOUR_CORE) + add_subdirectory(base) +endif (APPLICATION_FLAVOUR_CORE) + +# 'themes' must be mutually exclusive! +if (APPLICATION_FLAVOUR_NULL_THEME) + add_subdirectory(dogtag) +elseif (APPLICATION_FLAVOUR_DOGTAG_THEME) add_subdirectory(dogtag) -endif (APPLICATION_FLAVOUR_DOGTAG) +elseif (APPLICATION_FLAVOUR_REDHAT_THEME) + add_subdirectory(redhat) +endif (APPLICATION_FLAVOUR_NULL_THEME) + diff --git a/pki/CPackConfig.cmake b/pki/CPackConfig.cmake index 1f3a40867..1bf370d7c 100644 --- a/pki/CPackConfig.cmake +++ b/pki/CPackConfig.cmake @@ -10,7 +10,7 @@ set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}) set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING") ### versions -set(CPACK_PACKAGE_VERSION_MAJOR "1") +set(CPACK_PACKAGE_VERSION_MAJOR "9") set(CPACK_PACKAGE_VERSION_MINOR "0") set(CPACK_PACKAGE_VERSION_PATCH "0") set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") diff --git a/pki/base/CMakeLists.txt b/pki/base/CMakeLists.txt index ae14313b7..fc96f785e 100644 --- a/pki/base/CMakeLists.txt +++ b/pki/base/CMakeLists.txt @@ -1,23 +1,29 @@ project(base) -# The oder is important! -add_subdirectory(osutil) -add_subdirectory(symkey) -add_subdirectory(native-tools) -add_subdirectory(util) -add_subdirectory(setup) -add_subdirectory(common) -add_subdirectory(java-tools) -add_subdirectory(console) -add_subdirectory(selinux) -add_subdirectory(silent) -add_subdirectory(ca) -add_subdirectory(kra) -add_subdirectory(ocsp) -add_subdirectory(tks) -add_subdirectory(ra) -add_subdirectory(tps) -add_subdirectory(manage) -if (APPLICATION_FLAVOUR_RHCS) +# The order is important! +# add_subdirectory(osutil) +if (APPLICATION_FLAVOUR_OSUTIL) + add_subdirectory(osutil) +endif (APPLICATION_FLAVOUR_OSUTIL) +if (APPLICATION_FLAVOUR_CORE) + add_subdirectory(setup) + add_subdirectory(symkey) + add_subdirectory(native-tools) + add_subdirectory(util) + add_subdirectory(java-tools) + add_subdirectory(common) + add_subdirectory(selinux) + add_subdirectory(ca) + add_subdirectory(silent) +endif (APPLICATION_FLAVOUR_CORE) +if (APPLICATION_FLAVOUR_DOGTAG) + add_subdirectory(kra) + add_subdirectory(ocsp) + add_subdirectory(tks) + add_subdirectory(tps) + add_subdirectory(ra) + add_subdirectory(console) +endif (APPLICATION_FLAVOUR_DOGTAG) +if (APPLICATION_FLAVOUR_REDHAT) add_subdirectory(migrate) -endif (APPLICATION_FLAVOUR_RHCS) +endif (APPLICATION_FLAVOUR_REDHAT) diff --git a/pki/base/ca/CMakeLists.txt b/pki/base/ca/CMakeLists.txt index 9917d2a1f..bab50004e 100644 --- a/pki/base/ca/CMakeLists.txt +++ b/pki/base/ca/CMakeLists.txt @@ -8,18 +8,7 @@ install( FILES shared/etc/init.d/pki-cad DESTINATION - ${SYSCONF_INSTALL_DIR}/init.d - PERMISSIONS - OWNER_EXECUTE OWNER_WRITE OWNER_READ - GROUP_EXECUTE GROUP_READ - WORLD_EXECUTE WORLD_READ -) - -install( - FILES - shared/conf/dtomcat5 - DESTINATION - ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME} + ${SYSCONF_INSTALL_DIR}/rc.d/init.d PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ @@ -33,7 +22,20 @@ install( DESTINATION ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME} PATTERN - "shared/conf/dtomcat5" EXCLUDE + "CMakeLists.txt" EXCLUDE PATTERN "etc/*" EXCLUDE ) + +# install empty directories +install( + DIRECTORY + DESTINATION + ${VAR_INSTALL_DIR}/lock/pki/ca +) + +install( + DIRECTORY + DESTINATION + ${VAR_INSTALL_DIR}/run/pki/ca +) diff --git a/pki/base/ca/setup/CMakeLists.txt b/pki/base/ca/setup/CMakeLists.txt index 9c8713a7f..25ea20ffe 100644 --- a/pki/base/ca/setup/CMakeLists.txt +++ b/pki/base/ca/setup/CMakeLists.txt @@ -5,6 +5,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.desktop.in ${CMAKE_CURRENT_BIN install( FILES ${CMAKE_CURRENT_BINARY_DIR}/config.desktop + registry_instance DESTINATION ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/setup ) diff --git a/pki/base/ca/src/CMakeLists.txt b/pki/base/ca/src/CMakeLists.txt index f55e06e75..ab40e63b7 100644 --- a/pki/base/ca/src/CMakeLists.txt +++ b/pki/base/ca/src/CMakeLists.txt @@ -34,5 +34,5 @@ set(CMAKE_JAVA_TARGET_VERSION ${APPLICATION_VERSION}) add_jar(ca ${ca_java_SRCS}) add_dependencies(ca nsutil cmsutil osutil symkey cms cmscore certsrv) -install_jar(ca ${JAVA_JAR_INSTALL_DIR}/pki) +install_jar(ca ${JAVA_JAR_INSTALL_DIR}) set(CA_JAR ${ca_JAR_FILE} CACHE INTERNAL "ca jar file") diff --git a/pki/base/common/CMakeLists.txt b/pki/base/common/CMakeLists.txt index ae7bdcd36..1e00cb172 100644 --- a/pki/base/common/CMakeLists.txt +++ b/pki/base/common/CMakeLists.txt @@ -1,3 +1,28 @@ project(common Java) +install( + FILES + scripts/functions + scripts/pki_apache_initscript + DESTINATION + ${DATA_INSTALL_DIR}/scripts/ + PERMISSIONS + OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ + WORLD_EXECUTE WORLD_READ +) + +install( + FILES + setup/CertServer.directory + setup/menu.xml + setup/web-app_2_3.dtd + DESTINATION + ${DATA_INSTALL_DIR}/setup/ + PERMISSIONS + OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ + WORLD_EXECUTE WORLD_READ +) + add_subdirectory(src) diff --git a/pki/base/common/src/CMakeLists.txt b/pki/base/common/src/CMakeLists.txt index 09321e624..cce4d3a80 100644 --- a/pki/base/common/src/CMakeLists.txt +++ b/pki/base/common/src/CMakeLists.txt @@ -16,6 +16,14 @@ find_file(XERCES_JAR /usr/share/java ) +find_file(OSUTIL_JAR + NAMES + osutil.jar + PATHS + /usr/lib/java + /usr/share/java +) + find_file(JSS_JAR NAMES jss4.jar @@ -434,7 +442,6 @@ set(cms_java_SRCS com/netscape/cms/policy/extensions/PrivateKeyUsagePeriodExt.java com/netscape/cms/policy/extensions/KeyUsageExt.java com/netscape/cms/policy/extensions/NSCertTypeExt.java - com/netscape/cms/servlet/filter/PassThroughRequestFilter.java com/netscape/cms/servlet/filter/AdminRequestFilter.java com/netscape/cms/servlet/filter/EEClientAuthRequestFilter.java com/netscape/cms/servlet/filter/EERequestFilter.java @@ -673,6 +680,7 @@ set(cms_java_SRCS com/netscape/cms/selftests/tks/TKSKnownSessionKey.java com/netscape/cms/selftests/ca/CAPresence.java com/netscape/cms/selftests/ca/CAValidity.java + com/netscape/cms/selftests/common/SystemCertsVerification.java com/netscape/cms/selftests/ocsp/OCSPValidity.java com/netscape/cms/selftests/ocsp/OCSPPresence.java com/netscape/cms/request/RequestScheduler.java @@ -970,7 +978,7 @@ set(cmscore_java_SRCS com/netscape/cmscore/time/SimpleTimeSource.java ) -set(cmsbundle_RCS +set(cmsbundle_SRCS LogMessages.properties UserMessages.properties ) @@ -1013,6 +1021,6 @@ set(CMAKE_JAVA_INCLUDE_PATH ${NSUTIL_JAR} ${CMSUTIL_JAR} ${SERVLET_JAR} ${VELOCITY_JAR} ${SYMKEY_JAR} ${XERCES_JAR}) set(CMAKE_JAVA_TARGET_VERSION ${APPLICATION_VERSION}) -add_jar(cmsbundle ${certserv_java_SRCS} ${cms_java_SRCS} ${cmscore_java_SRCS} ${cmsbundle_RCS}) +add_jar(cmsbundle ${certserv_java_SRCS} ${cms_java_SRCS} ${cmscore_java_SRCS} ${cmsbundle_SRCS}) add_dependencies(cmsbundle osutil nsutil cmsutil) install_jar(cmsbundle ${JAVA_JAR_INSTALL_DIR}/pki) diff --git a/pki/base/java-tools/src/CMakeLists.txt b/pki/base/java-tools/src/CMakeLists.txt index c635c757f..aed40fb16 100644 --- a/pki/base/java-tools/src/CMakeLists.txt +++ b/pki/base/java-tools/src/CMakeLists.txt @@ -1,4 +1,12 @@ -project(cmstools_java Java) +project(pkitools_java Java) + +find_file(OSUTIL_JAR + NAMES + osutil.jar + PATHS + /usr/lib/java + /usr/share/java +) find_file(JSS_JAR NAMES @@ -8,7 +16,7 @@ find_file(JSS_JAR /usr/share/java ) -set(cmstools_java_SRCS +set(pkitools_java_SRCS com/netscape/cmstools/PrettyPrintCrl.java com/netscape/cmstools/BtoA.java com/netscape/cmstools/PasswordCache.java @@ -35,7 +43,7 @@ set(cmstools_java_SRCS set(CMAKE_JAVA_INCLUDE_PATH ${JSS_JAR} ${OSUTIL_JAR} ${NSUTIL_JAR} ${CMSUTIL_JAR} ${CMS_JAR}) set(CMAKE_JAVA_TARGET_VERSION ${APPLICATION_VERSION}) -add_jar(cmstools ${netscape_java_SRCS} ${cmstools_java_SRCS}) -add_dependencies(cmstools osutil nsutil cmsutil cms) -install_jar(cmstools ${JAVA_JAR_INSTALL_DIR}/pki) -set(CMSTOOLS_JAR ${cmstools_JAR_FILE} CACHE INTERNAL "cmstools jar file") +add_jar(pkitools ${netscape_java_SRCS} ${pkitools_java_SRCS}) +add_dependencies(pkitools osutil nsutil cmsutil cms) +install_jar(pkitools ${JAVA_JAR_INSTALL_DIR}) +set(CMSTOOLS_JAR ${pkitools_JAR_FILE} CACHE INTERNAL "pkitools jar file") diff --git a/pki/base/kra/CMakeLists.txt b/pki/base/kra/CMakeLists.txt index 6d9524ddf..5155a84ef 100644 --- a/pki/base/kra/CMakeLists.txt +++ b/pki/base/kra/CMakeLists.txt @@ -8,18 +8,7 @@ install( FILES shared/etc/init.d/pki-krad DESTINATION - ${SYSCONF_INSTALL_DIR}/init.d - PERMISSIONS - OWNER_EXECUTE OWNER_WRITE OWNER_READ - GROUP_EXECUTE GROUP_READ - WORLD_EXECUTE WORLD_READ -) - -install( - FILES - shared/conf/dtomcat5 - DESTINATION - ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME} + ${SYSCONF_INSTALL_DIR}/rc.d/init.d PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ @@ -33,7 +22,20 @@ install( DESTINATION ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME} PATTERN - "shared/conf/dtomcat5" EXCLUDE + "CMakeLists.txt" EXCLUDE PATTERN "etc/*" EXCLUDE ) + +# install empty directories +install( + DIRECTORY + DESTINATION + ${VAR_INSTALL_DIR}/lock/pki/kra +) + +install( + DIRECTORY + DESTINATION + ${VAR_INSTALL_DIR}/run/pki/kra +) diff --git a/pki/base/kra/setup/CMakeLists.txt b/pki/base/kra/setup/CMakeLists.txt index 9c8713a7f..25ea20ffe 100644 --- a/pki/base/kra/setup/CMakeLists.txt +++ b/pki/base/kra/setup/CMakeLists.txt @@ -5,6 +5,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.desktop.in ${CMAKE_CURRENT_BIN install( FILES ${CMAKE_CURRENT_BINARY_DIR}/config.desktop + registry_instance DESTINATION ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/setup ) diff --git a/pki/base/kra/src/CMakeLists.txt b/pki/base/kra/src/CMakeLists.txt index caea1495b..d483a0a3a 100644 --- a/pki/base/kra/src/CMakeLists.txt +++ b/pki/base/kra/src/CMakeLists.txt @@ -38,5 +38,5 @@ set(CMAKE_JAVA_TARGET_VERSION ${APPLICATION_VERSION}) add_jar(kra ${kra_java_SRCS}) add_dependencies(kra nsutil cmsutil osutil symkey cms cmscore certsrv) -install_jar(kra ${JAVA_JAR_INSTALL_DIR}/pki) +install_jar(kra ${JAVA_JAR_INSTALL_DIR}) set(KRA_JAR ${kra_JAR_FILE} CACHE INTERNAL "kra jar file") diff --git a/pki/base/native-tools/src/bulkissuance/CMakeLists.txt b/pki/base/native-tools/src/bulkissuance/CMakeLists.txt index 365cd601b..31df27306 100644 --- a/pki/base/native-tools/src/bulkissuance/CMakeLists.txt +++ b/pki/base/native-tools/src/bulkissuance/CMakeLists.txt @@ -33,5 +33,5 @@ install( FILES bulkissuance.data DESTINATION - ${LIB_INSTALL_DIR}/pki/native-tools/ + ${SHARE_INSTALL_PREFIX}/pki/native-tools/ ) diff --git a/pki/base/native-tools/src/setpin/CMakeLists.txt b/pki/base/native-tools/src/setpin/CMakeLists.txt index 10ae4236e..b32e12b22 100644 --- a/pki/base/native-tools/src/setpin/CMakeLists.txt +++ b/pki/base/native-tools/src/setpin/CMakeLists.txt @@ -1,16 +1,18 @@ project(setpin C) +find_package(Ldap REQUIRED) + set(SETPIN_PRIVATE_INCLUDE_DIRS ${CMAKE_BINARY_DIR} ${NSPR_INCLUDE_DIRS} ${NSS_INCLUDE_DIRS} - ${MOZLDAP_INCLUDE_DIRS} + ${LDAP_INCLUDE_DIRS} ) set(SETPIN_LINK_LIBRARIES ${NSPR_LIBRARIES} ${NSS_LIBRARIES} - ${MOZLDAP_LIBRARIES} + ${LDAP_LIBRARIES} ) set(setpin_SRCS @@ -37,5 +39,5 @@ install( FILES setpin.conf DESTINATION - ${LIB_INSTALL_DIR}/pki/native-tools/ + ${SHARE_INSTALL_PREFIX}/pki/native-tools/ ) diff --git a/pki/base/native-tools/src/tkstool/CMakeLists.txt b/pki/base/native-tools/src/tkstool/CMakeLists.txt index 5d58d0554..8b07950eb 100644 --- a/pki/base/native-tools/src/tkstool/CMakeLists.txt +++ b/pki/base/native-tools/src/tkstool/CMakeLists.txt @@ -1,7 +1,5 @@ project(tkstool C) -find_package(MozLDAP REQUIRED) - set(TKSTOOL_PRIVATE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR} diff --git a/pki/base/ocsp/CMakeLists.txt b/pki/base/ocsp/CMakeLists.txt index 93fabbb5a..373fb4d18 100644 --- a/pki/base/ocsp/CMakeLists.txt +++ b/pki/base/ocsp/CMakeLists.txt @@ -8,18 +8,7 @@ install( FILES shared/etc/init.d/pki-ocspd DESTINATION - ${SYSCONF_INSTALL_DIR}/init.d - PERMISSIONS - OWNER_EXECUTE OWNER_WRITE OWNER_READ - GROUP_EXECUTE GROUP_READ - WORLD_EXECUTE WORLD_READ -) - -install( - FILES - shared/conf/dtomcat5 - DESTINATION - ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME} + ${SYSCONF_INSTALL_DIR}/rc.d/init.d PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ @@ -33,7 +22,20 @@ install( DESTINATION ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME} PATTERN - "shared/conf/dtomcat5" EXCLUDE + "CMakeLists.txt" EXCLUDE PATTERN "etc/*" EXCLUDE ) + +# install empty directories +install( + DIRECTORY + DESTINATION + ${VAR_INSTALL_DIR}/lock/pki/ocsp +) + +install( + DIRECTORY + DESTINATION + ${VAR_INSTALL_DIR}/run/pki/ocsp +) diff --git a/pki/base/ocsp/setup/CMakeLists.txt b/pki/base/ocsp/setup/CMakeLists.txt index 9c8713a7f..25ea20ffe 100644 --- a/pki/base/ocsp/setup/CMakeLists.txt +++ b/pki/base/ocsp/setup/CMakeLists.txt @@ -5,6 +5,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.desktop.in ${CMAKE_CURRENT_BIN install( FILES ${CMAKE_CURRENT_BINARY_DIR}/config.desktop + registry_instance DESTINATION ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/setup ) diff --git a/pki/base/ocsp/src/CMakeLists.txt b/pki/base/ocsp/src/CMakeLists.txt index 71effa61e..53f2dc58a 100644 --- a/pki/base/ocsp/src/CMakeLists.txt +++ b/pki/base/ocsp/src/CMakeLists.txt @@ -31,5 +31,5 @@ set(CMAKE_JAVA_TARGET_VERSION ${APPLICATION_VERSION}) add_jar(ocsp ${ocsp_java_SRCS}) add_dependencies(ocsp nsutil cmsutil osutil symkey cms cmscore certsrv) -install_jar(ocsp ${JAVA_JAR_INSTALL_DIR}/pki) +install_jar(ocsp ${JAVA_JAR_INSTALL_DIR}) set(OCSP_JAR ${ocsp_JAR_FILE} CACHE INTERNAL "ocsp jar file") diff --git a/pki/base/osutil/CMakeLists.txt b/pki/base/osutil/CMakeLists.txt index 9fbb5ae59..0967d373e 100644 --- a/pki/base/osutil/CMakeLists.txt +++ b/pki/base/osutil/CMakeLists.txt @@ -1,7 +1,7 @@ project(osutil) -set(OSUTIL_LIBRARY_VERSION 1.2.0) -set(OSUTIL_LIBRARY_SOVERSION 1) +set(OSUTIL_LIBRARY_VERSION 9.0.0) +set(OSUTIL_LIBRARY_SOVERSION 9) add_subdirectory(src) add_subdirectory(src/com/netscape/osutil) diff --git a/pki/base/osutil/src/CMakeLists.txt b/pki/base/osutil/src/CMakeLists.txt index 660cb6d22..16f906523 100644 --- a/pki/base/osutil/src/CMakeLists.txt +++ b/pki/base/osutil/src/CMakeLists.txt @@ -10,9 +10,11 @@ set(osutil_java_SRCS com/netscape/osutil/UserID.java ) +set(CMAKE_JNI_TARGET TRUE) set(CMAKE_JAVA_TARGET_VERSION ${OSUTIL_LIBRARY_VERSION}) add_jar(osutil ${osutil_java_SRCS}) -install_jar(osutil ${JAVA_LIB_INSTALL_DIR}) +install_jar(osutil ${LIB_INSTALL_DIR}/osutil) +install_jni_symlink(osutil ${JAVA_LIB_INSTALL_DIR}) set(OSUTIL_JAVA_OBJECT_DIR ${osutil_CLASS_DIR} PARENT_SCOPE) set(OSUTIL_JAR ${osutil_JAR_FILE} CACHE INTERNAL "osutil jar file") diff --git a/pki/base/osutil/src/com/netscape/osutil/CMakeLists.txt b/pki/base/osutil/src/com/netscape/osutil/CMakeLists.txt index 40cc674b8..b86d212fc 100644 --- a/pki/base/osutil/src/com/netscape/osutil/CMakeLists.txt +++ b/pki/base/osutil/src/com/netscape/osutil/CMakeLists.txt @@ -22,7 +22,6 @@ set(OSUTIL_SHARED_LIBRARY set(OSUTIL_LINK_LIBRARIES ${NSPR_LIBRARIES} ${NSS_LIBRARIES} - ${JNI_LIBRARIES} ) set(osutil_library_HDRS @@ -74,5 +73,5 @@ set_target_properties(${OSUTIL_SHARED_LIBRARY} install( TARGETS ${OSUTIL_SHARED_LIBRARY} - LIBRARY DESTINATION ${LIB_INSTALL_DIR} + LIBRARY DESTINATION ${LIB_INSTALL_DIR}/osutil ) diff --git a/pki/base/ra/CMakeLists.txt b/pki/base/ra/CMakeLists.txt index 12c97e467..f5aaa1479 100644 --- a/pki/base/ra/CMakeLists.txt +++ b/pki/base/ra/CMakeLists.txt @@ -8,11 +8,13 @@ install( FILES etc/init.d/pki-rad DESTINATION - ${SYSCONF_INSTALL_DIR}/init.d + ${SYSCONF_INSTALL_DIR}/rc.d/init.d PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ + PATTERN + "CMakeLists.txt" EXCLUDE ) install( @@ -75,3 +77,16 @@ install( DESTINATION ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/conf/apache/conf ) + +# install empty directories +install( + DIRECTORY + DESTINATION + ${VAR_INSTALL_DIR}/lock/pki/ra +) + +install( + DIRECTORY + DESTINATION + ${VAR_INSTALL_DIR}/run/pki/ra +) diff --git a/pki/base/ra/setup/CMakeLists.txt b/pki/base/ra/setup/CMakeLists.txt index 9c8713a7f..25ea20ffe 100644 --- a/pki/base/ra/setup/CMakeLists.txt +++ b/pki/base/ra/setup/CMakeLists.txt @@ -5,6 +5,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.desktop.in ${CMAKE_CURRENT_BIN install( FILES ${CMAKE_CURRENT_BINARY_DIR}/config.desktop + registry_instance DESTINATION ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/setup ) diff --git a/pki/base/selinux/CMakeLists.txt b/pki/base/selinux/CMakeLists.txt index a64ad5da3..a9ef0707f 100644 --- a/pki/base/selinux/CMakeLists.txt +++ b/pki/base/selinux/CMakeLists.txt @@ -1,3 +1,11 @@ project(selinux) add_subdirectory(src) + +# install empty directories +install( + DIRECTORY + DESTINATION + ${SHARE_INSTALL_PREFIX}/selinux/modules +) + diff --git a/pki/base/selinux/src/CMakeLists.txt b/pki/base/selinux/src/CMakeLists.txt index 9022d2ebd..146ab1348 100644 --- a/pki/base/selinux/src/CMakeLists.txt +++ b/pki/base/selinux/src/CMakeLists.txt @@ -22,7 +22,7 @@ if (LINUX) FILES ${CMAKE_CURRENT_BINARY_DIR}/pki.pp DESTINATION - ${SHARE_INSTALL_PREFIX}/selinux/targeted + ${SHARE_INSTALL_PREFIX}/selinux/modules ) endif (EXISTS ${POLICY_MAKEFILE}) endif (LINUX) diff --git a/pki/base/setup/CMakeLists.txt b/pki/base/setup/CMakeLists.txt index d46b22f28..457ceaf5c 100644 --- a/pki/base/setup/CMakeLists.txt +++ b/pki/base/setup/CMakeLists.txt @@ -3,7 +3,6 @@ project(setup) install( FILES pkicreate - pkihost pkiremove DESTINATION ${BIN_INSTALL_DIR} @@ -23,3 +22,16 @@ install( GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ ) + +# install empty directories +install( + DIRECTORY + DESTINATION + ${VAR_INSTALL_DIR}/lock/pki +) + +install( + DIRECTORY + DESTINATION + ${VAR_INSTALL_DIR}/run/pki +) diff --git a/pki/base/setup/pkicreate b/pki/base/setup/pkicreate index f9adb1d76..b95e4e969 100755 --- a/pki/base/setup/pkicreate +++ b/pki/base/setup/pkicreate @@ -122,22 +122,16 @@ $suppress = $install_info_basename; # Base subsystem directory names my $acl_base_subsystem_dir = "acl"; # CA, KRA, OCSP, TKS -my $alias_base_subsystem_dir = "alias"; # CA, KRA, OCSP, TKS, RA, TPS my $applets_base_subsystem_dir = "applets"; # TPS my $cgibin_base_subsystem_dir = "cgi-bin"; # TPS (Apache) my $conf_base_subsystem_dir = "conf"; # CA, KRA, OCSP, TKS, RA, TPS my $docroot_base_subsystem_dir = "docroot"; # RA, TPS (Apache) my $emails_base_subsystem_dir = "emails"; # CA -my $etc_base_subsystem_dir = "etc"; # CA, KRA, OCSP, TKS, RA, TPS my $lib_base_subsystem_dir = "lib"; # RA, TPS -my $logs_base_subsystem_dir = "logs"; # CA, KRA, OCSP, TKS, RA, TPS my $profiles_base_subsystem_dir = "profiles"; # CA, KRA, OCSP, TKS my $samples_base_subsystem_dir = "samples"; # TPS my $scripts_base_subsystem_dir = "scripts"; # RA, TPS -my $shared_base_subsystem_dir = "shared"; # CA, KRA, OCSP, TKS (Tomcat) -my $temp_base_subsystem_dir = "temp"; # CA, KRA, OCSP, TKS (Tomcat) my $webapps_base_subsystem_dir = "webapps"; # CA, KRA, OCSP, TKS -my $work_base_subsystem_dir = "work"; # CA, KRA, OCSP, TKS (Tomcat) # Base instance directory names my $acl_base_instance_dir = "acl"; # CA, KRA, OCSP, TKS @@ -194,7 +188,6 @@ my $catalina_properties_base_name = "catalina.properties"; # CA, KRA, OCSP, TKS my $httpd_conf_base_name = "httpd.conf"; # RA, TPS my $index_jsp_base_name = "index.jsp"; # CA, KRA, OCSP, TKS -my $logs_base_name = "logs"; # CA, KRA, OCSP, TKS, # RA, TPS my $magic_base_name = "magic"; # RA, TPS my $mime_types_base_name = "mime.types"; # RA, TPS @@ -382,25 +375,19 @@ my $redirected_logs_path = undef; # Base subsystem directory paths my $pki_subsystem_path = undef; # CA, KRA, OCSP, TKS, RA, TPS my $acl_subsystem_path = undef; # CA, KRA, OCSP, TKS -my $alias_subsystem_path = undef; # CA, KRA, OCSP, TKS, RA, TPS my $applets_subsystem_path = undef; # TPS my $bin_subsystem_path = undef; # TPS my $cgibin_subsystem_path = undef; # TPS (Apache) my $conf_subsystem_path = undef; # CA, KRA, OCSP, TKS, RA, TPS my $docroot_subsystem_path = undef; # RA, TPS (Apache) my $emails_subsystem_path = undef; # CA -my $etc_subsystem_path = undef; # CA, KRA, OCSP, TKS, RA, TPS my $lib_subsystem_path = undef; # RA, TPS -my $logs_subsystem_path = undef; # CA, KRA, OCSP, TKS, RA, TPS my $profiles_subsystem_path = undef; # CA, KRA, OCSP, TKS my $samples_subsystem_path = undef; # TPS my $scripts_subsystem_path = undef; # RA, TPS -my $shared_subsystem_path = undef; # CA, KRA, OCSP, TKS (Tomcat) -my $temp_subsystem_path = undef; # CA, KRA, OCSP, TKS (Tomcat) my $webapps_subsystem_path = undef; # CA, KRA, OCSP, TKS my $common_ui_subsystem_path = undef; # CA, KRA, OCSP, TKS, RA, TPS my $ui_subsystem_path = undef; # CA, KRA, OCSP, TKS, RA, TPS -my $work_subsystem_path = undef; # CA, KRA, OCSP, TKS (Tomcat) # Base instance directory paths my $pki_instance_path = undef; # CA, KRA, OCSP, TKS, RA, TPS @@ -1358,14 +1345,8 @@ ASK_CONTINUE_NONSTD_INSTANCE_ROOT: sub initialize_subsystem_paths { ## Initialize subsystem directory paths (subsystem independent) - $alias_subsystem_path = $pki_subsystem_path - . "/" . $alias_base_subsystem_dir; $conf_subsystem_path = $pki_subsystem_path . "/" . $conf_base_subsystem_dir; - $etc_subsystem_path = $pki_subsystem_path - . "/" . $etc_base_subsystem_dir; - $logs_subsystem_path = $pki_subsystem_path - . "/" . $logs_base_subsystem_dir; $setup_subsystem_path = $pki_subsystem_path . "/" . $setup_base_subsystem_dir; @@ -1422,14 +1403,6 @@ sub initialize_subsystem_paths . "/" . $profiles_base_subsystem_dir; $webapps_subsystem_path = $pki_subsystem_path . "/" . $webapps_base_subsystem_dir; - - # Tomcat Specific - $shared_subsystem_path = $pki_subsystem_path - . "/" . $shared_base_subsystem_dir; - $temp_subsystem_path = $pki_subsystem_path - . "/" . $temp_base_subsystem_dir; - $work_subsystem_path = $pki_subsystem_path - . "/" . $work_base_subsystem_dir; } return; @@ -1815,9 +1788,8 @@ sub process_pki_directories emit("Processing PKI directories for '$pki_instance_path' ...\n"); ## Populate instance directory paths (instance independent) - return 0 if !copy_directory($alias_subsystem_path, $alias_instance_path, - $default_dir_permissions, $default_file_permissions, - $pki_user, $pki_group); + return 0 if !create_directory($alias_instance_path, + $default_dir_permissions, $pki_user, $pki_group); # Check for an optionally redirected "conf" directory path ... if ($redirected_conf_path eq "") { @@ -1925,36 +1897,23 @@ sub process_pki_directories # Check for an optionally redirected "logs" directory path ... if ($redirected_logs_path eq "") { - if ($subsystem_type eq $RA || $subsystem_type eq $TPS) { - # create instance directory - return 0 if !create_directory($logs_instance_path, - $default_dir_permissions, $pki_user, $pki_group); - } - - return 0 if !copy_directory($logs_subsystem_path, $logs_instance_path, - $default_dir_permissions, $default_file_permissions, - $pki_user, $pki_group); + # create instance directory + return 0 if !create_directory(${logs_instance_path}, + $default_dir_permissions, $pki_user, $pki_group); - ## (CA, KRA, OCSP, TKS instances) + ## (CA, KRA, OCSP, TKS, TPS instances) if ($subsystem_type ne $RA) { ## Create a "signedAudit" directory return 0 if !create_directory("${logs_instance_path}/${signed_audit_base_instance_dir}", $default_dir_permissions, $pki_user, $pki_group); } } else { - if ($subsystem_type eq $RA || $subsystem_type eq $TPS) { - # create redirected instance directory - return 0 if !create_directory($redirected_logs_path, - $default_dir_permissions, $pki_user, $pki_group); - } - - # Populate optionally redirected instance directory path + # create redirected instance directory # and setup a symlink in the standard area - return 0 if !copy_directory($logs_subsystem_path, $redirected_logs_path, - $default_dir_permissions, $default_file_permissions, - $pki_user, $pki_group); + return 0 if !create_directory($redirected_logs_path, + $default_dir_permissions, $pki_user, $pki_group); - ## (CA, KRA, OCSP, TKS instances) + ## (CA, KRA, OCSP, TKS, TPS instances) if ($subsystem_type ne $RA) { ## Create a "signedAudit" directory return 0 if !create_directory("${redirected_logs_path}/${signed_audit_base_instance_dir}", @@ -2055,9 +2014,14 @@ sub process_pki_directories $pki_user, $pki_group); ## Tomcat Specific - return 0 if !copy_directory($shared_subsystem_path, $shared_instance_path, - $default_dir_permissions, $default_file_permissions, - $pki_user, $pki_group); + return 0 if !create_directory($shared_instance_path, + $default_dir_permissions, $pki_user, $pki_group); + + return 0 if !create_directory("$shared_instance_path/classes", + $default_dir_permissions, $pki_user, $pki_group); + + return 0 if !create_directory("$shared_instance_path/lib", + $default_dir_permissions, $pki_user, $pki_group); return 0 if !create_directory($tomcat_instance_common_lib_path, $default_dir_permissions, $pki_user, $pki_group); diff --git a/pki/base/silent/CMakeLists.txt b/pki/base/silent/CMakeLists.txt index 1055e0747..8f71375dc 100644 --- a/pki/base/silent/CMakeLists.txt +++ b/pki/base/silent/CMakeLists.txt @@ -2,3 +2,16 @@ project(silent Java) add_subdirectory(src) add_subdirectory(scripts) + +install( + FILES + templates/pki_silent.template + templates/subca_silent.template + DESTINATION + ${DATA_INSTALL_DIR}/silent/ + PERMISSIONS + OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ + WORLD_EXECUTE WORLD_READ +) + diff --git a/pki/base/silent/src/CMakeLists.txt b/pki/base/silent/src/CMakeLists.txt index 5342e77c1..45644e676 100644 --- a/pki/base/silent/src/CMakeLists.txt +++ b/pki/base/silent/src/CMakeLists.txt @@ -79,5 +79,5 @@ set(CMAKE_JAVA_TARGET_VERSION ${APPLICATION_VERSION}) add_jar(silent ${silent_java_SRCS}) add_dependencies(silent osutil symkey certsrv cms cmsutil nsutil) -install_jar(silent ${JAVA_JAR_INSTALL_DIR}/pki) +install_jar(silent ${JAVA_JAR_INSTALL_DIR}) set(SILENT_JAR ${silent_JAR_FILE} CACHE INTERNAL "silent jar file") diff --git a/pki/base/symkey/CMakeLists.txt b/pki/base/symkey/CMakeLists.txt index 32792d1d3..d44ec1c6a 100644 --- a/pki/base/symkey/CMakeLists.txt +++ b/pki/base/symkey/CMakeLists.txt @@ -1,7 +1,7 @@ project(symkey) -set(SYMKEY_LIBRARY_VERSION 1.2.0) -set(SYMKEY_LIBRARY_SOVERSION 1) +set(SYMKEY_LIBRARY_VERSION 9.0.0) +set(SYMKEY_LIBRARY_SOVERSION 9) add_subdirectory(src) add_subdirectory(src/com/netscape/symkey) diff --git a/pki/base/symkey/src/CMakeLists.txt b/pki/base/symkey/src/CMakeLists.txt index 2272121a1..723e59bb3 100644 --- a/pki/base/symkey/src/CMakeLists.txt +++ b/pki/base/symkey/src/CMakeLists.txt @@ -12,11 +12,13 @@ set(symkey_java_SRCS com/netscape/symkey/SessionKey.java ) +set(CMAKE_JNI_TARGET TRUE) set(CMAKE_JAVA_INCLUDE_PATH ${JSS_JAR}) set(CMAKE_JAVA_TARGET_VERSION ${SYMKEY_LIBRARY_VERSION}) add_jar(symkey ${symkey_java_SRCS}) -install_jar(symkey ${JAVA_LIB_INSTALL_DIR}) +install_jar(symkey ${LIB_INSTALL_DIR}/symkey) +install_jni_symlink(symkey ${JAVA_LIB_INSTALL_DIR}) set(SYMKEY_JAVA_OBJECT_DIR ${symkey_CLASS_DIR} PARENT_SCOPE) set(SYMKEY_JAR ${symkey_JAR_FILE} CACHE INTERNAL "symkey jar file") diff --git a/pki/base/symkey/src/com/netscape/symkey/CMakeLists.txt b/pki/base/symkey/src/com/netscape/symkey/CMakeLists.txt index d320ad58f..7149b1de7 100644 --- a/pki/base/symkey/src/com/netscape/symkey/CMakeLists.txt +++ b/pki/base/symkey/src/com/netscape/symkey/CMakeLists.txt @@ -21,7 +21,6 @@ set(SYMKEY_SHARED_LIBRARY set(SYMKEY_LINK_LIBRARIES ${NSPR_LIBRARIES} ${NSS_LIBRARIES} - ${JNI_LIBRARIES} ) set(symkey_library_HDRS @@ -64,5 +63,5 @@ set_target_properties(${SYMKEY_SHARED_LIBRARY} install( TARGETS ${SYMKEY_SHARED_LIBRARY} - LIBRARY DESTINATION ${LIB_INSTALL_DIR} + LIBRARY DESTINATION ${LIB_INSTALL_DIR}/symkey ) diff --git a/pki/base/tks/CMakeLists.txt b/pki/base/tks/CMakeLists.txt index 195833c08..023aaa020 100644 --- a/pki/base/tks/CMakeLists.txt +++ b/pki/base/tks/CMakeLists.txt @@ -8,18 +8,7 @@ install( FILES shared/etc/init.d/pki-tksd DESTINATION - ${SYSCONF_INSTALL_DIR}/init.d - PERMISSIONS - OWNER_EXECUTE OWNER_WRITE OWNER_READ - GROUP_EXECUTE GROUP_READ - WORLD_EXECUTE WORLD_READ -) - -install( - FILES - shared/conf/dtomcat5 - DESTINATION - ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME} + ${SYSCONF_INSTALL_DIR}/rc.d/init.d PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ @@ -33,7 +22,20 @@ install( DESTINATION ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME} PATTERN - "shared/conf/dtomcat5" EXCLUDE + "CMakeLists.txt" EXCLUDE PATTERN "etc/*" EXCLUDE ) + +# install empty directories +install( + DIRECTORY + DESTINATION + ${VAR_INSTALL_DIR}/lock/pki/tks +) + +install( + DIRECTORY + DESTINATION + ${VAR_INSTALL_DIR}/run/pki/tks +) diff --git a/pki/base/tks/setup/CMakeLists.txt b/pki/base/tks/setup/CMakeLists.txt index 9c8713a7f..25ea20ffe 100644 --- a/pki/base/tks/setup/CMakeLists.txt +++ b/pki/base/tks/setup/CMakeLists.txt @@ -5,6 +5,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.desktop.in ${CMAKE_CURRENT_BIN install( FILES ${CMAKE_CURRENT_BINARY_DIR}/config.desktop + registry_instance DESTINATION ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/setup ) diff --git a/pki/base/tks/src/CMakeLists.txt b/pki/base/tks/src/CMakeLists.txt index 8fc8a6864..ac7acb885 100644 --- a/pki/base/tks/src/CMakeLists.txt +++ b/pki/base/tks/src/CMakeLists.txt @@ -28,5 +28,5 @@ set(CMAKE_JAVA_TARGET_VERSION ${APPLICATION_VERSION}) add_jar(tks ${tks_java_SRCS}) add_dependencies(tks nsutil cmsutil osutil symkey cms cmscore certsrv) -install_jar(tks ${JAVA_JAR_INSTALL_DIR}/pki) +install_jar(tks ${JAVA_JAR_INSTALL_DIR}) set(TKS_JAR ${tks_JAR_FILE} CACHE INTERNAL "tks jar file") diff --git a/pki/base/tps/CMakeLists.txt b/pki/base/tps/CMakeLists.txt index 04859aaa3..05c3a0ac0 100644 --- a/pki/base/tps/CMakeLists.txt +++ b/pki/base/tps/CMakeLists.txt @@ -17,6 +17,8 @@ install( OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ + PATTERN + "CMakeLists.txt" EXCLUDE ) install( @@ -67,3 +69,16 @@ foreach(INSTALL_DIR ${INSTALL_DIRS}) ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/${INSTALL_DIR} ) endforeach(INSTALL_DIR ${INSTALL_DIRS}) + +# install empty directories +install( + DIRECTORY + DESTINATION + ${VAR_INSTALL_DIR}/lock/pki/tps +) + +install( + DIRECTORY + DESTINATION + ${VAR_INSTALL_DIR}/run/pki/tps +) diff --git a/pki/base/tps/setup/CMakeLists.txt b/pki/base/tps/setup/CMakeLists.txt index 9c8713a7f..25ea20ffe 100644 --- a/pki/base/tps/setup/CMakeLists.txt +++ b/pki/base/tps/setup/CMakeLists.txt @@ -5,6 +5,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.desktop.in ${CMAKE_CURRENT_BIN install( FILES ${CMAKE_CURRENT_BINARY_DIR}/config.desktop + registry_instance DESTINATION ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/setup ) diff --git a/pki/base/util/src/CMakeLists.txt b/pki/base/util/src/CMakeLists.txt index 81ac96c9a..64fd28001 100644 --- a/pki/base/util/src/CMakeLists.txt +++ b/pki/base/util/src/CMakeLists.txt @@ -16,6 +16,14 @@ find_file(XERCES_JAR /usr/share/java ) +find_file(OSUTIL_JAR + NAMES + osutil.jar + PATHS + /usr/lib/java + /usr/share/java +) + find_file(JSS_JAR NAMES jss4.jar diff --git a/pki/cmake/Modules/FindLdap.cmake b/pki/cmake/Modules/FindLdap.cmake new file mode 100644 index 000000000..93634525a --- /dev/null +++ b/pki/cmake/Modules/FindLdap.cmake @@ -0,0 +1,46 @@ +# - Try to find the LDAP client libraries +# Once done this will define +# +# LDAP_FOUND - system has libldap +# LDAP_INCLUDE_DIR - the ldap include directory +# LDAP_LIBRARIES - libldap + liblber (if found) library +# LBER_LIBRARIES - liblber library + +if(LDAP_INCLUDE_DIR AND LDAP_LIBRARIES) + # Already in cache, be silent + set(Ldap_FIND_QUIETLY TRUE) +endif(LDAP_INCLUDE_DIR AND LDAP_LIBRARIES) + + +FIND_PATH(LDAP_INCLUDE_DIR ldap.h) + +if(APPLE) + FIND_LIBRARY(LDAP_LIBRARIES NAMES LDAP + PATHS + /System/Library/Frameworks + /Library/Frameworks + ) +else(APPLE) + FIND_LIBRARY(LDAP_LIBRARIES NAMES ldap) + + FIND_LIBRARY(LBER_LIBRARIES NAMES lber) +endif(APPLE) + +if(LDAP_INCLUDE_DIR AND LDAP_LIBRARIES) + set(LDAP_FOUND TRUE) + if(LBER_LIBRARIES) + set(LDAP_LIBRARIES ${LDAP_LIBRARIES} ${LBER_LIBRARIES}) + endif(LBER_LIBRARIES) +endif(LDAP_INCLUDE_DIR AND LDAP_LIBRARIES) + +if(LDAP_FOUND) + if(NOT Ldap_FIND_QUIETLY) + message(STATUS "Found ldap: ${LDAP_LIBRARIES}") + endif(NOT Ldap_FIND_QUIETLY) +else(LDAP_FOUND) + if (Ldap_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find ldap") + endif (Ldap_FIND_REQUIRED) +endif(LDAP_FOUND) + +MARK_AS_ADVANCED(LDAP_INCLUDE_DIR LDAP_LIBRARIES LBER_LIBRARIES) diff --git a/pki/cmake/Modules/FindNSS.cmake b/pki/cmake/Modules/FindNSS.cmake index 186efef0f..9b89c08a2 100644 --- a/pki/cmake/Modules/FindNSS.cmake +++ b/pki/cmake/Modules/FindNSS.cmake @@ -69,6 +69,17 @@ else (NSS_LIBRARIES AND NSS_INCLUDE_DIRS) /sw/lib ) + find_library(NSSUTIL3_LIBRARY + NAMES + nssutil3 + PATHS + ${_NSS_LIBDIR} + /usr/lib + /usr/local/lib + /opt/local/lib + /sw/lib + ) + set(NSS_INCLUDE_DIRS ${NSS_INCLUDE_DIR} ) @@ -94,6 +105,13 @@ else (NSS_LIBRARIES AND NSS_INCLUDE_DIRS) ) endif (NSS3_LIBRARY) + if (NSSUTIL3_LIBRARY) + set(NSS_LIBRARIES + ${NSS_LIBRARIES} + ${NSSUTIL3_LIBRARY} + ) + endif (NSSUTIL3_LIBRARY) + include(FindPackageHandleStandardArgs) find_package_handle_standard_args(NSS DEFAULT_MSG NSS_LIBRARIES NSS_INCLUDE_DIRS) diff --git a/pki/cmake/Modules/UseJava.cmake b/pki/cmake/Modules/UseJava.cmake index e11b2da95..a9699285f 100644 --- a/pki/cmake/Modules/UseJava.cmake +++ b/pki/cmake/Modules/UseJava.cmake @@ -26,7 +26,7 @@ # add_jar(foobar foobar.java) # # To add a VERSION to the target output name you can set it using -# CMAKE_JAVA_TARGET_NAME. This will create a jar file with the name +# CMAKE_JAVA_TARGET_VERSION. This will create a jar file with the name # shibboleet-1.0.0.jar and will create a symlink shibboleet.jar pointing # to the jar with the version information. # @@ -39,6 +39,8 @@ # # <target>_INSTALL_FILES The files which should be installed. This # is used by install_jar(). +# <target>_JNI_SYMLINK The JNI symlink which should be installed. +# This is used by install_jni_symlink(). # <target>_JAR_FILE The location of the jar file so that you # can include it. # <target>_CLASS_DIR The directory where the class files can be @@ -50,6 +52,12 @@ # This command installs the TARGET_NAME files to the given DESTINATION. It # should be called in the same scope as add_jar() or it will fail. # +# +# install_symlink(TARGET_NAME DESTINATION) +# +# This command installs the TARGET_NAME symlinks to the given DESTINATION. It +# should be called in the same scope as add_jar() or it will fail. +# #============================================================================= # Copyright 2010 Andreas schneider <asn@redhat.com> # @@ -179,29 +187,49 @@ function(ADD_JAR _TARGET_NAME) endif (_JAVA_COMPILE_FILES) # create the jar file - add_custom_command( - TARGET ${_TARGET_NAME} - COMMAND ${CMAKE_Java_ARCHIVE} - -cf ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_NAME} - ${_JAVA_RESOURCE_FILES} @java_class_filelist - COMMAND ${CMAKE_COMMAND} - -D_JAVA_TARGET_DIR=${CMAKE_CURRENT_BINARY_DIR} - -D_JAVA_TARGET_OUTPUT_NAME=${_JAVA_TARGET_OUTPUT_NAME} - -D_JAVA_TARGET_OUTPUT_LINK=${_JAVA_TARGET_OUTPUT_LINK} - -P ${_JAVA_SYMLINK_SCRIPT} - WORKING_DIRECTORY ${CMAKE_JAVA_CLASS_OUTPUT_PATH} - COMMENT "Creating Java archive ${_JAVA_TARGET_OUTPUT_NAME}" - ) + if (CMAKE_JNI_TARGET) + add_custom_command( + TARGET ${_TARGET_NAME} + COMMAND ${CMAKE_Java_ARCHIVE} + -cf ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_NAME} + ${_JAVA_RESOURCE_FILES} @java_class_filelist + COMMAND ${CMAKE_COMMAND} + -D_JAVA_TARGET_DIR=${CMAKE_CURRENT_BINARY_DIR} + -D_JAVA_TARGET_OUTPUT_NAME=${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_NAME} + -D_JAVA_TARGET_OUTPUT_LINK=${_JAVA_TARGET_OUTPUT_LINK} + -P ${_JAVA_SYMLINK_SCRIPT} + WORKING_DIRECTORY ${CMAKE_JAVA_CLASS_OUTPUT_PATH} + COMMENT "Creating Java archive ${_JAVA_TARGET_OUTPUT_NAME}" + ) + else () + add_custom_command( + TARGET ${_TARGET_NAME} + COMMAND ${CMAKE_Java_ARCHIVE} + -cf ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_NAME} + ${_JAVA_RESOURCE_FILES} @java_class_filelist + COMMAND ${CMAKE_COMMAND} + -D_JAVA_TARGET_DIR=${CMAKE_CURRENT_BINARY_DIR} + -D_JAVA_TARGET_OUTPUT_NAME=${_JAVA_TARGET_OUTPUT_NAME} + -D_JAVA_TARGET_OUTPUT_LINK=${_JAVA_TARGET_OUTPUT_LINK} + -P ${_JAVA_SYMLINK_SCRIPT} + WORKING_DIRECTORY ${CMAKE_JAVA_CLASS_OUTPUT_PATH} + COMMENT "Creating Java archive ${_JAVA_TARGET_OUTPUT_NAME}" + ) + endif (CMAKE_JNI_TARGET) set(${_TARGET_NAME}_INSTALL_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_NAME} PARENT_SCOPE) - if (_JAVA_TARGET_OUTPUT_LINK) + if (CMAKE_JNI_TARGET AND _JAVA_TARGET_OUTPUT_LINK) + set(${_TARGET_NAME}_JNI_SYMLINK + ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_LINK} + PARENT_SCOPE) + elseif (_JAVA_TARGET_OUTPUT_LINK ) set(${_TARGET_NAME}_INSTALL_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_NAME} ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_LINK} PARENT_SCOPE) - endif (_JAVA_TARGET_OUTPUT_LINK) + endif (CMAKE_JNI_TARGET AND _JAVA_TARGET_OUTPUT_LINK) set(${_TARGET_NAME}_JAR_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_NAME} PARENT_SCOPE) set(${_TARGET_NAME}_CLASS_DIR @@ -221,3 +249,17 @@ function(INSTALL_JAR _TARGET_NAME _DESTINATION) message(SEND_ERROR "The target ${_TARGET_NAME} is not known in this scope.") endif (${_TARGET_NAME}_INSTALL_FILES) endfunction(INSTALL_JAR _TARGET_NAME _DESTINATION) + +function(INSTALL_JNI_SYMLINK _TARGET_NAME _DESTINATION) + if (${_TARGET_NAME}_JNI_SYMLINK) + install( + FILES + ${${_TARGET_NAME}_JNI_SYMLINK} + DESTINATION + ${_DESTINATION} + ) + else (${_TARGET_NAME}_JNI_SYMLINK) + message(SEND_ERROR "The target ${_TARGET_NAME} is not known in this scope.") + endif (${_TARGET_NAME}_JNI_SYMLINK) +endfunction(INSTALL_JNI_SYMLINK _TARGET_NAME _DESTINATION) + diff --git a/pki/dogtag/CMakeLists.txt b/pki/dogtag/CMakeLists.txt index 823a57485..fd04debf9 100644 --- a/pki/dogtag/CMakeLists.txt +++ b/pki/dogtag/CMakeLists.txt @@ -1,10 +1,16 @@ project(dogtag) -add_subdirectory(ca-ui) -add_subdirectory(common-ui) -add_subdirectory(console-ui) -add_subdirectory(kra-ui) -add_subdirectory(ocsp-ui) -add_subdirectory(ra-ui) -add_subdirectory(tks-ui) -add_subdirectory(tps-ui) +if (APPLICATION_FLAVOUR_NULL_THEME) + add_subdirectory(common-ui) + add_subdirectory(ca-ui) +endif (APPLICATION_FLAVOUR_NULL_THEME) +if (APPLICATION_FLAVOUR_DOGTAG_THEME) + add_subdirectory(common-ui) + add_subdirectory(ca-ui) + add_subdirectory(kra-ui) + add_subdirectory(ocsp-ui) + add_subdirectory(ra-ui) + add_subdirectory(tks-ui) + add_subdirectory(tps-ui) + add_subdirectory(console-ui) +endif (APPLICATION_FLAVOUR_DOGTAG_THEME) diff --git a/pki/dogtag/console-ui/CMakeLists.txt b/pki/dogtag/console-ui/CMakeLists.txt index 40dbab6ec..fcb7bf40e 100644 --- a/pki/dogtag/console-ui/CMakeLists.txt +++ b/pki/dogtag/console-ui/CMakeLists.txt @@ -1,5 +1,3 @@ -project(console-ui) - -set(CONSOLE_UI_VERSION ${APPLICATION_VERSION}) +project(console-ui Java) add_subdirectory(src) diff --git a/pki/dogtag/console-ui/src/CMakeLists.txt b/pki/dogtag/console-ui/src/CMakeLists.txt index a1d656549..e13ced8e9 100644 --- a/pki/dogtag/console-ui/src/CMakeLists.txt +++ b/pki/dogtag/console-ui/src/CMakeLists.txt @@ -1,10 +1,7 @@ set(console_ui_java Java) -set(CONSOLE_UI_TARGET pki-console-theme-${CONSOLE_UI_VERSION}) -set(CONSOLE_UI_JAR "${CMAKE_CURRENT_BINARY_DIR}/${CONSOLE_UI_TARGET}.jar" CACHE INTERNAL "console-ui jar file") - -set(console_ui_RCS - CMSAdminRS.properties +set(console_ui_java_SRCS + ../CMSAdminRS.properties com/netscape/management/client/theme/theme.properties com/netscape/management/client/theme/images/login.gif com/netscape/management/client/theme/images/ConsoleBanner.gif @@ -13,11 +10,10 @@ set(console_ui_RCS com/netscape/admin/certsrv/theme/certmgmt.gif ) -add_jar(${CONSOLE_UI_TARGET} ${console_ui_RCS}) +set(CMAKE_JAVA_TARGET_VERSION ${APPLICATION_VERSION}) + +add_jar(pki-console-theme ${console_ui_java_SRCS}) +install_jar(pki-console-theme ${JAVA_JAR_INSTALL_DIR}) + +set(CONSOLE_UI_JAR ${pki-console-theme_JAR_FILE} CACHE INTERNAL "console-ui jar file") -install( - FILES - ${CONSOLE_JAR} - DESTINATION - ${JAVA_JAR_INSTALL_DIR}/pki -) diff --git a/pki/scripts/compose_dogtag_pki_theme_packages b/pki/scripts/compose_dogtag_pki_theme_packages new file mode 100755 index 000000000..d7c8084d8 --- /dev/null +++ b/pki/scripts/compose_dogtag_pki_theme_packages @@ -0,0 +1,189 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# (C) 2010 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +## Always switch into the base directory three levels +## above this shell script prior to executing it so +## that all of its output is written to this directory + +cd `dirname $0`/../.. + + +## +## Retrieve the name of this base directory +## + +PKI_PWD=`pwd` + + +## +## Establish the 'dogtag-pki' name and version information +## + +DOGTAG_PKI_THEME="dogtag-pki-theme" +DOGTAG_PKI_THEME_VERSION="9.0.0" + + +## +## Establish the SOURCE files/directories of the 'dogtag-pki' source directory +## + +PKI_DIR="pki" +PKI_DOGTAG_DIR="${PKI_DIR}/dogtag" +PKI_SPECS_FILE="${PKI_DIR}/specs/${DOGTAG_PKI_THEME}.spec" +PKI_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake" +PKI_CMAKE_DIR="cmake" +PKI_DOGTAG_MANIFEST="CMakeLists.txt" +PKI_COMPONENT_LIST="common-ui ca-ui kra-ui ocsp-ui tks-ui ra-ui tps-ui console-ui" + + +## +## Establish the TARGET files/directories of the 'dogtag-pki' source/spec files +## + +PKI_PACKAGES="${PKI_PWD}/packages" +DOGTAG_PKI_THEME_BUILD_DIR="${PKI_PACKAGES}/BUILD" +DOGTAG_PKI_THEME_RPMS_DIR="${PKI_PACKAGES}/RPMS" +DOGTAG_PKI_THEME_SOURCES_DIR="${PKI_PACKAGES}/SOURCES" +DOGTAG_PKI_THEME_SPECS_DIR="${PKI_PACKAGES}/SPECS" +DOGTAG_PKI_THEME_SRPMS_DIR="${PKI_PACKAGES}/SRPMS" + +DOGTAG_PKI_THEME_TARBALL="${DOGTAG_PKI_THEME}-${DOGTAG_PKI_THEME_VERSION}.tar.gz" +DOGTAG_PKI_THEME_SPEC_FILE="${DOGTAG_PKI_THEME_SPECS_DIR}/${DOGTAG_PKI_THEME}.spec" +DOGTAG_PKI_THEME_PACKAGE_SCRIPT="${PKI_PACKAGES}/package_${DOGTAG_PKI_THEME}" +DOGTAG_PKI_THEME_PACKAGE_COMMAND="rpmbuild --define \"_topdir \`pwd\`\" -ba SPECS/${DOGTAG_PKI_THEME}.spec" + +DOGTAG_PKI_THEME_STAGING_DIR="${PKI_PACKAGES}/staging" +DOGTAG_PKI_THEME_DIR="${DOGTAG_PKI_THEME_STAGING_DIR}/${DOGTAG_PKI_THEME}-${DOGTAG_PKI_THEME_VERSION}" +DOGTAG_PKI_THEME_DOGTAG_DIR="${DOGTAG_PKI_THEME_DIR}/dogtag" + + +## +## Always create a top-level 'packages' directory +## + +mkdir -p ${PKI_PACKAGES} + + +## +## Always create 'dogtag-pki' package directories +## + +mkdir -p ${DOGTAG_PKI_THEME_BUILD_DIR} +mkdir -p ${DOGTAG_PKI_THEME_RPMS_DIR} +mkdir -p ${DOGTAG_PKI_THEME_SOURCES_DIR} +mkdir -p ${DOGTAG_PKI_THEME_SPECS_DIR} +mkdir -p ${DOGTAG_PKI_THEME_SRPMS_DIR} + + +## +## Always start with new 'dogtag-pki' package files +## + +rm -rf ${DOGTAG_PKI_THEME_BUILD_DIR}/${DOGTAG_PKI_THEME}-${DOGTAG_PKI_THEME_VERSION} +rm -f ${DOGTAG_PKI_THEME_RPMS_DIR}/${DOGTAG_PKI_THEME}-${DOGTAG_PKI_THEME_VERSION}*.rpm +rm -f ${DOGTAG_PKI_THEME_SOURCES_DIR}/${DOGTAG_PKI_THEME_TARBALL} +rm -f ${DOGTAG_PKI_THEME_SPEC_FILE} +rm -f ${DOGTAG_PKI_THEME_SRPMS_DIR}/${DOGTAG_PKI_THEME}-${DOGTAG_PKI_THEME_VERSION}*.rpm + + +## +## Copy a new 'dogtag-pki' spec file from the +## current contents of the PKI working repository +## + +cp -p ${PKI_SPECS_FILE} ${DOGTAG_PKI_THEME_SPECS_DIR} + + +## +## Always start with a new 'dogtag-pki' staging directory +## + +rm -rf ${DOGTAG_PKI_THEME_STAGING_DIR} + + +## +## To generate the 'dogtag-pki' tarball, construct a staging area +## consisting of the 'dogtag-pki' source components from the +## current contents of the PKI working repository +## + +mkdir -p ${DOGTAG_PKI_THEME_DIR} +cd ${PKI_DIR} +for file in "${PKI_FILE_LIST}" ; +do + cp -p ${file} ${DOGTAG_PKI_THEME_DIR} +done +find ${PKI_CMAKE_DIR} \ + -name .svn -prune -o \ + -name *.swp -prune -o \ + -print | cpio -pdum ${DOGTAG_PKI_THEME_DIR} > /dev/null 2>&1 +cd - > /dev/null 2>&1 + +mkdir -p ${DOGTAG_PKI_THEME_DOGTAG_DIR} +cd ${PKI_DOGTAG_DIR} +cp -p ${PKI_DOGTAG_MANIFEST} ${DOGTAG_PKI_THEME_DOGTAG_DIR} +for component in "${PKI_COMPONENT_LIST}" ; +do + find ${component} \ + -name .svn -prune -o \ + -name config-ext -prune -o \ + -name *.spec -prune -o \ + -name *.swp -prune -o \ + -name build.xml -prune -o \ + -name build_dogtag -prune -o \ + -print | cpio -pdum ${DOGTAG_PKI_THEME_DOGTAG_DIR} > /dev/null 2>&1 +done +cd - > /dev/null 2>&1 + + +## +## Due to the following lower-level 'config' subdirectories, +## INDEPENDENTLY remove ALL top-level 'config' directories: +## +## * ./common-ui/shared/admin/console/config +## * ./ra-ui/shared/docroot/ra/admin/console/config +## * ./tps-ui/shared/docroot/tps/admin/console/config +## + +rm -rf ${DOGTAG_PKI_THEME_DOGTAG_DIR}/*/config + + +## +## Create the 'dogtag-pki' tarball +## + +mkdir -p ${DOGTAG_PKI_THEME_SOURCES_DIR} +cd ${DOGTAG_PKI_THEME_STAGING_DIR} +gtar -zcvf ${DOGTAG_PKI_THEME_TARBALL} \ + "${DOGTAG_PKI_THEME}-${DOGTAG_PKI_THEME_VERSION}" > /dev/null 2>&1 +mv ${DOGTAG_PKI_THEME_TARBALL} ${DOGTAG_PKI_THEME_SOURCES_DIR} +cd - > /dev/null 2>&1 + + +## +## Always remove the PKI staging area +## + +rm -rf ${DOGTAG_PKI_THEME_STAGING_DIR} + + +## +## Always generate a fresh 'dogtag-pki' package script +## + +rm -rf ${DOGTAG_PKI_THEME_PACKAGE_SCRIPT} +printf "#!/bin/bash\n\n" > ${DOGTAG_PKI_THEME_PACKAGE_SCRIPT} +printf "${DOGTAG_PKI_THEME_PACKAGE_COMMAND}\n\n" >> ${DOGTAG_PKI_THEME_PACKAGE_SCRIPT} +chmod 775 ${DOGTAG_PKI_THEME_PACKAGE_SCRIPT} + + +## +## Automatically invoke RPM/SRPM creation +## + +cd ${PKI_PACKAGES} ; +script -c package_${DOGTAG_PKI_THEME} package_${DOGTAG_PKI_THEME}.log + diff --git a/pki/scripts/compose_ipa_pki_theme_packages b/pki/scripts/compose_ipa_pki_theme_packages new file mode 100755 index 000000000..e78b9eac2 --- /dev/null +++ b/pki/scripts/compose_ipa_pki_theme_packages @@ -0,0 +1,211 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# (C) 2010 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +## Always switch into the base directory three levels +## above this shell script prior to executing it so +## that all of its output is written to this directory + +cd `dirname $0`/../.. + + +## +## Retrieve the name of this base directory +## + +PKI_PWD=`pwd` + + +## +## Establish the 'ipa-pki' name and version information +## + +IPA_PKI_THEME="ipa-pki-theme" +IPA_PKI_THEME_VERSION="9.0.0" + + +## +## Establish the SOURCE files/directories of the 'ipa-pki' source directory +## + +PKI_DIR="pki" +PKI_DOGTAG_DIR="${PKI_DIR}/dogtag" +PKI_SPECS_FILE="${PKI_DIR}/specs/${IPA_PKI_THEME}.spec" +PKI_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake" +PKI_CMAKE_DIR="cmake" +PKI_DOGTAG_MANIFEST="CMakeLists.txt" +PKI_COMPONENT_LIST="common-ui ca-ui" + + +## +## Establish the TARGET files/directories of the 'ipa-pki' source/spec files +## + +PKI_PACKAGES="${PKI_PWD}/packages" +IPA_PKI_THEME_BUILD_DIR="${PKI_PACKAGES}/BUILD" +IPA_PKI_THEME_RPMS_DIR="${PKI_PACKAGES}/RPMS" +IPA_PKI_THEME_SOURCES_DIR="${PKI_PACKAGES}/SOURCES" +IPA_PKI_THEME_SPECS_DIR="${PKI_PACKAGES}/SPECS" +IPA_PKI_THEME_SRPMS_DIR="${PKI_PACKAGES}/SRPMS" + +IPA_PKI_THEME_TARBALL="${IPA_PKI_THEME}-${IPA_PKI_THEME_VERSION}.tar.gz" +IPA_PKI_THEME_SPEC_FILE="${IPA_PKI_THEME_SPECS_DIR}/${IPA_PKI_THEME}.spec" +IPA_PKI_THEME_PACKAGE_SCRIPT="${PKI_PACKAGES}/package_${IPA_PKI_THEME}" +IPA_PKI_THEME_PACKAGE_COMMAND="rpmbuild --define \"_topdir \`pwd\`\" -ba SPECS/${IPA_PKI_THEME}.spec" + +IPA_PKI_THEME_STAGING_DIR="${PKI_PACKAGES}/staging" +IPA_PKI_THEME_DIR="${IPA_PKI_THEME_STAGING_DIR}/${IPA_PKI_THEME}-${IPA_PKI_THEME_VERSION}" +IPA_PKI_THEME_DOGTAG_DIR="${IPA_PKI_THEME_DIR}/dogtag" +IPA_PKI_THEME_DOGTAG_SUBDIR="${IPA_PKI_THEME}-${IPA_PKI_THEME_VERSION}/dogtag" + + +## +## Always create a top-level 'packages' directory +## + +mkdir -p ${PKI_PACKAGES} + + +## +## Always create 'ipa-pki' package directories +## + +mkdir -p ${IPA_PKI_THEME_BUILD_DIR} +mkdir -p ${IPA_PKI_THEME_RPMS_DIR} +mkdir -p ${IPA_PKI_THEME_SOURCES_DIR} +mkdir -p ${IPA_PKI_THEME_SPECS_DIR} +mkdir -p ${IPA_PKI_THEME_SRPMS_DIR} + + +## +## Always start with new 'ipa-pki' package files +## + +rm -rf ${IPA_PKI_THEME_BUILD_DIR}/${IPA_PKI_THEME}-${IPA_PKI_THEME_VERSION} +rm -f ${IPA_PKI_THEME_RPMS_DIR}/${IPA_PKI_THEME}-${IPA_PKI_THEME_VERSION}*.rpm +rm -f ${IPA_PKI_THEME_SOURCES_DIR}/${IPA_PKI_THEME_TARBALL} +rm -f ${IPA_PKI_THEME_SPEC_FILE} +rm -f ${IPA_PKI_THEME_SRPMS_DIR}/${IPA_PKI_THEME}-${IPA_PKI_THEME_VERSION}*.rpm + + +## +## Copy a new 'ipa-pki' spec file from the +## current contents of the PKI working repository +## + +cp -p ${PKI_SPECS_FILE} ${IPA_PKI_THEME_SPECS_DIR} + + +## +## Always start with a new 'ipa-pki' staging directory +## + +rm -rf ${IPA_PKI_THEME_STAGING_DIR} + + +## +## To generate the 'ipa-pki' tarball, construct a staging area +## consisting of the 'ipa-pki' source components from the +## current contents of the PKI working repository +## + +mkdir -p ${IPA_PKI_THEME_DIR} +cd ${PKI_DIR} +for file in "${PKI_FILE_LIST}" ; +do + cp -p ${file} ${IPA_PKI_THEME_DIR} +done +find ${PKI_CMAKE_DIR} \ + -name .svn -prune -o \ + -name *.swp -prune -o \ + -print | cpio -pdum ${IPA_PKI_THEME_DIR} > /dev/null 2>&1 +cd - > /dev/null 2>&1 + +mkdir -p ${IPA_PKI_THEME_DOGTAG_DIR} +cd ${PKI_DOGTAG_DIR} +cp -p ${PKI_DOGTAG_MANIFEST} ${IPA_PKI_THEME_DOGTAG_DIR} +for component in "${PKI_COMPONENT_LIST}" ; +do + find ${component} \ + -name .svn -prune -o \ + -name config-ext -prune -o \ + -name *.spec -prune -o \ + -name *.swp -prune -o \ + -name build.xml -prune -o \ + -name build_dogtag -prune -o \ + -print | cpio -pdum ${IPA_PKI_THEME_DOGTAG_DIR} > /dev/null 2>&1 +done +cd - > /dev/null 2>&1 + + +## +## Due to the following lower-level 'config' subdirectories, +## INDEPENDENTLY remove ALL top-level 'config' directories: +## +## * ./common-ui/shared/admin/console/config +## * ./ra-ui/shared/docroot/ra/admin/console/config (N/A 'ipa-pki') +## * ./tps-ui/shared/docroot/tps/admin/console/config (N/A 'ipa-pki') +## + +rm -rf ${IPA_PKI_THEME_DOGTAG_DIR}/*/config + + +## +## Create the 'ipa-pki' tarball +## + +mkdir -p ${IPA_PKI_THEME_SOURCES_DIR} +cd ${IPA_PKI_THEME_STAGING_DIR} +# Remove all '*.htm*' web pages and 'Dogtag-specific' graphics +# Map 'Dogtag' color '#225580' to black +# Map 'Dogtag' color '#4f52b5' to black +# Map 'DCS' text to 'XXX' +# Map 'dogtag' text to 'XXXXXX' +# Map 'Dogtag' text to 'XXXXXX' +# Map 'DOGTAG' text to 'XXXXXX' +# Map 'Fedora' text to 'XXXXXX' +# Map 'FEDORA' text to 'XXXXXX' +find ${IPA_PKI_THEME_DOGTAG_SUBDIR} -name "favicon.ico" -print -or \ + -name "*.htm" -print -or \ + -name "*.html" -print -or \ + -name "logo_header.gif" -print | xargs rm ; +find ${IPA_PKI_THEME_DOGTAG_SUBDIR} -type f -exec sed -i 's/#225580/#000000/g' {} \; ; +find ${IPA_PKI_THEME_DOGTAG_SUBDIR} -type f -exec sed -i 's/#4f52b5/#000000/g' {} \; ; +find ${IPA_PKI_THEME_DOGTAG_SUBDIR} -type f -exec sed -i 's/DCS/XXX/g' {} \; ; +find ${IPA_PKI_THEME_DOGTAG_SUBDIR} -type f -exec sed -i 's/dogtag/XXXXXX/g' {} \; ; +find ${IPA_PKI_THEME_DOGTAG_SUBDIR} -type f -exec sed -i 's/Dogtag/XXXXXX/g' {} \; ; +find ${IPA_PKI_THEME_DOGTAG_SUBDIR} -type f -exec sed -i 's/DOGTAG/XXXXXX/g' {} \; ; +find ${IPA_PKI_THEME_DOGTAG_SUBDIR} -type f -exec sed -i 's/Fedora/XXXXXX/g' {} \; ; +find ${IPA_PKI_THEME_DOGTAG_SUBDIR} -type f -exec sed -i 's/FEDORA/XXXXXX/g' {} \; +gtar -zcvf ${IPA_PKI_THEME_TARBALL} \ + "${IPA_PKI_THEME}-${IPA_PKI_THEME_VERSION}" > /dev/null 2>&1 +mv ${IPA_PKI_THEME_TARBALL} ${IPA_PKI_THEME_SOURCES_DIR} +cd - > /dev/null 2>&1 + + +## +## Always remove the PKI staging area +## + +rm -rf ${IPA_PKI_THEME_STAGING_DIR} + + +## +## Always generate a fresh 'ipa-pki' package script +## + +rm -rf ${IPA_PKI_THEME_PACKAGE_SCRIPT} +printf "#!/bin/bash\n\n" > ${IPA_PKI_THEME_PACKAGE_SCRIPT} +printf "${IPA_PKI_THEME_PACKAGE_COMMAND}\n\n" >> ${IPA_PKI_THEME_PACKAGE_SCRIPT} +chmod 775 ${IPA_PKI_THEME_PACKAGE_SCRIPT} + + +## +## Automatically invoke RPM/SRPM creation +## + +cd ${PKI_PACKAGES} ; +script -c package_${IPA_PKI_THEME} package_${IPA_PKI_THEME}.log + diff --git a/pki/scripts/compose_osutil_packages b/pki/scripts/compose_osutil_packages new file mode 100755 index 000000000..7813cffde --- /dev/null +++ b/pki/scripts/compose_osutil_packages @@ -0,0 +1,197 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# (C) 2010 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +## Always switch into the base directory three levels +## above this shell script prior to executing it so +## that all of its output is written to this directory + +cd `dirname $0`/../.. + + +## +## Retrieve the name of this base directory +## + +OSUTIL_PWD=`pwd` + + +## +## Establish the 'osutil' name and version information +## + +OSUTIL="osutil" +OSUTIL_VERSION="9.0.0" + + +## +## Establish the SOURCE files/directories of the 'osutil' source directory +## + +PKI_DIR="pki" +PKI_BASE_DIR="${PKI_DIR}/base" +OSUTIL_SPECS_FILE="${PKI_DIR}/specs/${OSUTIL}.spec" +OSUTIL_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake" +PKI_CMAKE_DIR="cmake" +PKI_BASE_MANIFEST="CMakeLists.txt" + + +## +## Establish the TARGET files/directories of the 'osutil' source/spec files +## + +OSUTIL_PACKAGES="${OSUTIL_PWD}/packages" +OSUTIL_BUILD_DIR="${OSUTIL_PACKAGES}/BUILD" +OSUTIL_RPMS_DIR="${OSUTIL_PACKAGES}/RPMS" +OSUTIL_SOURCES_DIR="${OSUTIL_PACKAGES}/SOURCES" +OSUTIL_SPECS_DIR="${OSUTIL_PACKAGES}/SPECS" +OSUTIL_SRPMS_DIR="${OSUTIL_PACKAGES}/SRPMS" + +OSUTIL_TARBALL="${OSUTIL}-${OSUTIL_VERSION}.tar.gz" +OSUTIL_SPEC_FILE="${OSUTIL_SPECS_DIR}/${OSUTIL}.spec" +OSUTIL_PACKAGE_SCRIPT="${OSUTIL_PACKAGES}/package_${OSUTIL}" +OSUTIL_PACKAGE_COMMAND="rpmbuild --define \"_topdir \`pwd\`\" -ba SPECS/${OSUTIL}.spec" + +OSUTIL_STAGING_DIR="${OSUTIL_PACKAGES}/staging" +OSUTIL_DIR="${OSUTIL_STAGING_DIR}/${OSUTIL}-${OSUTIL_VERSION}" +OSUTIL_BASE_DIR="${OSUTIL_DIR}/base" + + +## +## Always create a top-level 'packages' directory +## + +mkdir -p ${OSUTIL_PACKAGES} + + +## +## Always create 'osutil' package directories +## + +mkdir -p ${OSUTIL_BUILD_DIR} +mkdir -p ${OSUTIL_RPMS_DIR} +mkdir -p ${OSUTIL_SOURCES_DIR} +mkdir -p ${OSUTIL_SPECS_DIR} +mkdir -p ${OSUTIL_SRPMS_DIR} + + +## +## Always start with new 'osutil' package files +## + +rm -rf ${OSUTIL_BUILD_DIR}/${OSUTIL}-${OSUTIL_VERSION} +rm -f ${OSUTIL_RPMS_DIR}/${OSUTIL}-${OSUTIL_VERSION}*.rpm +rm -f ${OSUTIL_SOURCES_DIR}/${OSUTIL_TARBALL} +rm -f ${OSUTIL_SPEC_FILE} +rm -f ${OSUTIL_SRPMS_DIR}/${OSUTIL}-${OSUTIL_VERSION}*.rpm + + +## +## Copy a new 'osutil' spec file from the +## current contents of the OSUTIL working repository +## + +cp -p ${OSUTIL_SPECS_FILE} ${OSUTIL_SPECS_DIR} + + +## +## Always start with a new 'osutil' staging directory +## + +rm -rf ${OSUTIL_STAGING_DIR} + + +## +## To generate the 'osutil' tarball, construct a staging area +## consisting of the 'osutil' source components from the +## current contents of the OSUTIL working repository +## + +mkdir -p ${OSUTIL_DIR} +cd ${PKI_DIR} +for file in "${OSUTIL_FILE_LIST}" ; +do + cp -p ${file} ${OSUTIL_DIR} +done +find ${PKI_CMAKE_DIR} \ + -name .svn -prune -o \ + -name *.swp -prune -o \ + -print | cpio -pdum ${OSUTIL_DIR} > /dev/null 2>&1 +cd - > /dev/null 2>&1 + +mkdir -p ${OSUTIL_BASE_DIR} +cd ${PKI_BASE_DIR} +cp -p ${PKI_BASE_MANIFEST} ${OSUTIL_BASE_DIR} +find osutil \ +-name .svn -prune -o \ +-name *.swp -prune -o \ +-name Makefile.am -prune -o \ +-name Makefile.in -prune -o \ +-name aclocal.m4 -prune -o \ +-name autogen.sh -prune -o \ +-name build.xml -prune -o \ +-name compile -prune -o \ +-name config.guess -prune -o \ +-name config.h.in -prune -o \ +-name config.sub -prune -o \ +-name configure -prune -o \ +-name configure.ac -prune -o \ +-name depcomp -prune -o \ +-name install-sh -prune -o \ +-name ltmain.sh -prune -o \ +-name m4 -prune -o \ +-name missing -prune -o \ +-name setup_package -prune -o \ +-print | cpio -pdum ${OSUTIL_BASE_DIR} > /dev/null 2>&1 +cd - > /dev/null 2>&1 + + +## +## Due to the following lower-level 'config' subdirectories, +## INDEPENDENTLY remove ALL top-level 'config' directories: +## +## * ./console/src/com/netscape/admin/certsrv/config (N/A 'osutil') +## * ./tps/forms/tps/admin/console/config (N/A 'osutil') +## + +rm -rf ${OSUTIL_BASE_DIR}/*/config + + +## +## Create the 'osutil' tarball +## + +mkdir -p ${OSUTIL_SOURCES_DIR} +cd ${OSUTIL_STAGING_DIR} +gtar -zcvf ${OSUTIL_TARBALL} \ + "${OSUTIL}-${OSUTIL_VERSION}" > /dev/null 2>&1 +mv ${OSUTIL_TARBALL} ${OSUTIL_SOURCES_DIR} +cd - > /dev/null 2>&1 + + +## +## Always remove the OSUTIL staging area +## + +rm -rf ${OSUTIL_STAGING_DIR} + + +## +## Always generate a fresh 'osutil' package script +## + +rm -rf ${OSUTIL_PACKAGE_SCRIPT} +printf "#!/bin/bash\n\n" > ${OSUTIL_PACKAGE_SCRIPT} +printf "${OSUTIL_PACKAGE_COMMAND}\n\n" >> ${OSUTIL_PACKAGE_SCRIPT} +chmod 775 ${OSUTIL_PACKAGE_SCRIPT} + + +## +## Automatically invoke RPM/SRPM creation +## + +cd ${OSUTIL_PACKAGES} ; +script -c package_${OSUTIL} package_${OSUTIL}.log + diff --git a/pki/scripts/compose_pki_core_packages b/pki/scripts/compose_pki_core_packages new file mode 100755 index 000000000..2ce30c7fa --- /dev/null +++ b/pki/scripts/compose_pki_core_packages @@ -0,0 +1,201 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# (C) 2010 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +## Always switch into the base directory three levels +## above this shell script prior to executing it so +## that all of its output is written to this directory + +cd `dirname $0`/../.. + + +## +## Retrieve the name of this base directory +## + +PKI_PWD=`pwd` + + +## +## Establish the 'pki-core' name and version information +## + +PKI_CORE="pki-core" +PKI_CORE_VERSION="9.0.0" + + +## +## Establish the SOURCE files/directories of the 'pki-core' source directory +## + +PKI_DIR="pki" +PKI_BASE_DIR="${PKI_DIR}/base" +PKI_SPECS_FILE="${PKI_DIR}/specs/${PKI_CORE}.spec" +PKI_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake" +PKI_CMAKE_DIR="cmake" +PKI_BASE_MANIFEST="CMakeLists.txt" +PKI_COMPONENT_LIST="setup symkey native-tools util java-tools common selinux ca silent" + + +## +## Establish the TARGET files/directories of the 'pki-core' source/spec files +## + +PKI_PACKAGES="${PKI_PWD}/packages" +PKI_CORE_BUILD_DIR="${PKI_PACKAGES}/BUILD" +PKI_CORE_RPMS_DIR="${PKI_PACKAGES}/RPMS" +PKI_CORE_SOURCES_DIR="${PKI_PACKAGES}/SOURCES" +PKI_CORE_SPECS_DIR="${PKI_PACKAGES}/SPECS" +PKI_CORE_SRPMS_DIR="${PKI_PACKAGES}/SRPMS" + +PKI_CORE_TARBALL="${PKI_CORE}-${PKI_CORE_VERSION}.tar.gz" +PKI_CORE_SPEC_FILE="${PKI_CORE_SPECS_DIR}/${PKI_CORE}.spec" +PKI_CORE_PACKAGE_SCRIPT="${PKI_PACKAGES}/package_${PKI_CORE}" +PKI_CORE_PACKAGE_COMMAND="rpmbuild --define \"_topdir \`pwd\`\" -ba SPECS/${PKI_CORE}.spec" + +PKI_CORE_STAGING_DIR="${PKI_PACKAGES}/staging" +PKI_CORE_DIR="${PKI_CORE_STAGING_DIR}/${PKI_CORE}-${PKI_CORE_VERSION}" +PKI_CORE_BASE_DIR="${PKI_CORE_DIR}/base" + + +## +## Always create a top-level 'packages' directory +## + +mkdir -p ${PKI_PACKAGES} + + +## +## Always create 'pki-core' package directories +## + +mkdir -p ${PKI_CORE_BUILD_DIR} +mkdir -p ${PKI_CORE_RPMS_DIR} +mkdir -p ${PKI_CORE_SOURCES_DIR} +mkdir -p ${PKI_CORE_SPECS_DIR} +mkdir -p ${PKI_CORE_SRPMS_DIR} + + +## +## Always start with new 'pki-core' package files +## + +rm -rf ${PKI_CORE_BUILD_DIR}/${PKI_CORE}-${PKI_CORE_VERSION} +rm -f ${PKI_CORE_RPMS_DIR}/${PKI_CORE}-${PKI_CORE_VERSION}*.rpm +rm -f ${PKI_CORE_SOURCES_DIR}/${PKI_CORE_TARBALL} +rm -f ${PKI_CORE_SPEC_FILE} +rm -f ${PKI_CORE_SRPMS_DIR}/${PKI_CORE}-${PKI_CORE_VERSION}*.rpm + + +## +## Copy a new 'pki-core' spec file from the +## current contents of the PKI working repository +## + +cp -p ${PKI_SPECS_FILE} ${PKI_CORE_SPECS_DIR} + + +## +## Always start with a new 'pki-core' staging directory +## + +rm -rf ${PKI_CORE_STAGING_DIR} + + +## +## To generate the 'pki-core' tarball, construct a staging area +## consisting of the 'pki-core' source components from the +## current contents of the PKI working repository +## + +mkdir -p ${PKI_CORE_DIR} +cd ${PKI_DIR} +for file in "${PKI_FILE_LIST}" ; +do + cp -p ${file} ${PKI_CORE_DIR} +done +find ${PKI_CMAKE_DIR} \ + -name .svn -prune -o \ + -name *.swp -prune -o \ + -print | cpio -pdum ${PKI_CORE_DIR} > /dev/null 2>&1 +cd - > /dev/null 2>&1 + +mkdir -p ${PKI_CORE_BASE_DIR} +cd ${PKI_BASE_DIR} +cp -p ${PKI_BASE_MANIFEST} ${PKI_CORE_BASE_DIR} +for component in "${PKI_COMPONENT_LIST}" ; +do + find ${component} \ + -name .svn -prune -o \ + -name *.swp -prune -o \ + -name Makefile.am -prune -o \ + -name Makefile.in -prune -o \ + -name aclocal.m4 -prune -o \ + -name autogen.sh -prune -o \ + -name build.xml -prune -o \ + -name compile -prune -o \ + -name config.guess -prune -o \ + -name config.h.in -prune -o \ + -name config.sub -prune -o \ + -name configure -prune -o \ + -name configure.ac -prune -o \ + -name depcomp -prune -o \ + -name install-sh -prune -o \ + -name ltmain.sh -prune -o \ + -name m4 -prune -o \ + -name missing -prune -o \ + -name setup_package -prune -o \ + -print | cpio -pdum ${PKI_CORE_BASE_DIR} > /dev/null 2>&1 +done +cd - > /dev/null 2>&1 + + +## +## Due to the following lower-level 'config' subdirectories, +## INDEPENDENTLY remove ALL top-level 'config' directories: +## +## * ./console/src/com/netscape/admin/certsrv/config (N/A 'pki-core') +## * ./tps/forms/tps/admin/console/config (N/A 'pki-core') +## + +rm -rf ${PKI_CORE_BASE_DIR}/*/config + + +## +## Create the 'pki-core' tarball +## + +mkdir -p ${PKI_CORE_SOURCES_DIR} +cd ${PKI_CORE_STAGING_DIR} +gtar -zcvf ${PKI_CORE_TARBALL} \ + "${PKI_CORE}-${PKI_CORE_VERSION}" > /dev/null 2>&1 +mv ${PKI_CORE_TARBALL} ${PKI_CORE_SOURCES_DIR} +cd - > /dev/null 2>&1 + + +## +## Always remove the PKI staging area +## + +rm -rf ${PKI_CORE_STAGING_DIR} + + +## +## Always generate a fresh 'pki-core' package script +## + +rm -rf ${PKI_CORE_PACKAGE_SCRIPT} +printf "#!/bin/bash\n\n" > ${PKI_CORE_PACKAGE_SCRIPT} +printf "${PKI_CORE_PACKAGE_COMMAND}\n\n" >> ${PKI_CORE_PACKAGE_SCRIPT} +chmod 775 ${PKI_CORE_PACKAGE_SCRIPT} + + +## +## Automatically invoke RPM/SRPM creation +## + +cd ${PKI_PACKAGES} ; +script -c package_${PKI_CORE} package_${PKI_CORE}.log + diff --git a/pki/specs/dogtag-pki-theme.spec b/pki/specs/dogtag-pki-theme.spec new file mode 100644 index 000000000..9c5cf0ecd --- /dev/null +++ b/pki/specs/dogtag-pki-theme.spec @@ -0,0 +1,584 @@ +# 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; version 2 of the License. +# +# 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, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2010 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + + +############################################################################### +### P A C K A G E H E A D E R ### +############################################################################### + +Name: dogtag-pki-theme +Version: 9.0.0 +Release: 1%{?dist} +Summary: Certificate System - Dogtag PKI Theme Components +URL: http://pki.fedoraproject.org/ +License: GPLv2 +Group: System Environment/Base + +BuildArch: noarch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: cmake + +Source0: http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}.tar.gz + +%define overview \ +========================================= \ +|| ABOUT "DOGTAG CERTIFICATE SYSTEM" || \ +========================================= \ + \ +Dogtag Certificate System (DCS) is an enterprise software system designed \ +to manage enterprise Public Key Infrastructure (PKI) deployments. \ + \ +The Dogtag PKI Suite is comprised of the following six subsystems \ +and a client (for use by a Token Management System): \ + \ + * Certificate Authority (CA) \ + * Data Recovery Manager (DRM) \ + * Online Certificate Status Protocol (OCSP) Manager \ + * Registration Authority (RA) \ + * Token Key Service (TKS) \ + * Token Processing System (TPS) \ + * Enterprise Security Client (ESC) \ + \ +Additionally, it provides a console GUI application used for \ +server and user/group administration of CA, DRM, OCSP, and TKS, \ +javadocs on portions of the Dogtag API, as well as various \ +command-line tools used to assist with a Dogtag PKI deployment. \ + \ +To successfully deploy instances of a CA, DRM, OCSP, or TKS, a \ +Tomcat Web Server must be up and running locally on this machine. \ + \ +To successfully deploy instances of an RA, or TPS, an \ +Apache Web Server must be up and running locally on this machine. \ + \ +To meet the database storage requirements of each CA, DRM, OCSP, \ +TKS, or TPS instance, a 389 Directory Server must be up and \ +running either locally on this machine, or remotely over the \ +attached network connection. \ + \ +To meet the database storage requirements of an RA, an SQLite \ +database will be created locally on this machine each time a \ +new RA instance is created. \ + \ +Dogtag utilizes the 'pkicreate' utility to install a PKI subsystem; \ +always use the 'pkicreate' and 'pkiremove' utilities to respectively \ +create and remove PKI instances. \ + \ +Finally, to become operational, each PKI subsystem instance must be \ +configured either manually via a Firefox browser, or by virtue of \ +the batch configuration utility called 'pkisilent'. \ + \ +For deployment purposes, Dogtag PKI requires ALL of the subpackages \ +defined by the "pki-core" package. Additionally, if an instance of \ +a DRM ('pki-kra'), OCSP ('pki-ocsp'), RA ('pki-ra'), TKS ('pki-tks'), \ +TPS ('pki-tps'), and/or ESC ('esc') is to be deployed, the associated \ +package(s) will also need to be installed (and configured). \ + \ +%{nil} + +%description %{overview} + + +############################################################################### +### S U B P A C K A G E H E A D E R S ### +############################################################################### + +################################ +## dogtag-pki-common-theme ## +################################ + +%package -n dogtag-pki-common-theme +Summary: Certificate System - PKI Common Framework User Interface +Group: System Environment/Base + +# NOTE: Several PKI packages require a "virtual" Theme component. These +# "virtual" Theme components are "Provided" by various Theme "flavors" +# including "dogtag", "redhat", and "null". Consequently, +# all "dogtag", "redhat", and "null" Theme components MUST be +# mutually exclusive! +Conflicts: null-pki-common-theme +Conflicts: null-pki-common-ui +Conflicts: redhat-pki-common-theme +Conflicts: redhat-pki-common-ui + +Obsoletes: dogtag-pki-common-theme < %{version}-%{release} +Obsoletes: dogtag-pki-common-ui + +Provides: pki-common-theme = %{version}-%{release} +Provides: pki-common-ui = %{version}-%{release} + +%description -n dogtag-pki-common-theme +This PKI Common Framework User Interface contains +the Dogtag textual and graphical user interface for the PKI Common Framework. + +This package is used by the Dogtag Certificate System. + +%{overview} + + +################################ +## dogtag-pki-ca-theme ## +################################ + +%package -n dogtag-pki-ca-theme +Summary: Certificate System - Certificate Authority User Interface +Group: System Environment/Base + +# NOTE: Several PKI packages require a "virtual" Theme component. These +# "virtual" Theme components are "Provided" by various Theme "flavors" +# including "dogtag", "redhat", and "null". Consequently, +# all "dogtag", "redhat", and "null" Theme components MUST be +# mutually exclusive! +Conflicts: null-pki-ca-theme +Conflicts: null-pki-ca-ui +Conflicts: redhat-pki-ca-theme +Conflicts: redhat-pki-ca-ui + +Obsoletes: dogtag-pki-ca-theme < %{version}-%{release} +Obsoletes: dogtag-pki-ca-ui + +Provides: pki-ca-theme = %{version}-%{release} +Provides: pki-ca-ui = %{version}-%{release} + +%description -n dogtag-pki-ca-theme +This Certificate Authority (CA) User Interface contains +the Dogtag textual and graphical user interface for the CA. + +This package is used by the Dogtag Certificate System. + +%{overview} + + +################################ +## dogtag-pki-kra-theme ## +################################ + +%package -n dogtag-pki-kra-theme +Summary: Certificate System - Data Recovery Manager User Interface +Group: System Environment/Base + +# NOTE: Several PKI packages require a "virtual" Theme component. These +# "virtual" Theme components are "Provided" by various Theme "flavors" +# including "dogtag", "redhat", and "null". Consequently, +# all "dogtag", "redhat", and "null" Theme components MUST be +# mutually exclusive! +#Conflicts: null-pki-kra-theme +#Conflicts: null-pki-kra-ui +Conflicts: redhat-pki-kra-theme +Conflicts: redhat-pki-kra-ui + +Obsoletes: dogtag-pki-kra-theme < %{version}-%{release} +Obsoletes: dogtag-pki-kra-ui + +Provides: pki-kra-theme = %{version}-%{release} +Provides: pki-kra-ui = %{version}-%{release} + +%description -n dogtag-pki-kra-theme +This Data Recovery Manager (DRM) User Interface contains +the Dogtag textual and graphical user interface for the DRM. + +This package is used by the Dogtag Certificate System. + +%{overview} + + +################################ +## dogtag-pki-ocsp-theme ## +################################ + +%package -n dogtag-pki-ocsp-theme +Summary: Certificate System - Online Certificate Status Protocol Manager User Interface +Group: System Environment/Base + +# NOTE: Several PKI packages require a "virtual" Theme component. These +# "virtual" Theme components are "Provided" by various Theme "flavors" +# including "dogtag", "redhat", and "null". Consequently, +# all "dogtag", "redhat", and "null" Theme components MUST be +# mutually exclusive! +#Conflicts: null-pki-ocsp-theme +#Conflicts: null-pki-ocsp-ui +Conflicts: redhat-pki-ocsp-theme +Conflicts: redhat-pki-ocsp-ui + +Obsoletes: dogtag-pki-ocsp-theme < %{version}-%{release} +Obsoletes: dogtag-pki-ocsp-ui + +Provides: pki-ocsp-theme = %{version}-%{release} +Provides: pki-ocsp-ui = %{version}-%{release} + +%description -n dogtag-pki-ocsp-theme +This Online Certificate Status Protocol (OCSP) Manager User Interface contains +the Dogtag textual and graphical user interface for the OCSP Manager. + +This package is used by the Dogtag Certificate System. + +%{overview} + + +################################ +## dogtag-pki-ra-theme ## +################################ + +%package -n dogtag-pki-ra-theme +Summary: Certificate System - Registration Authority User Interface +Group: System Environment/Base + +# NOTE: Several PKI packages require a "virtual" Theme component. These +# "virtual" Theme components are "Provided" by various Theme "flavors" +# including "dogtag", "redhat", and "null". Consequently, +# all "dogtag", "redhat", and "null" Theme components MUST be +# mutually exclusive! +#Conflicts: null-pki-ra-theme +#Conflicts: null-pki-ra-ui +Conflicts: redhat-pki-ra-theme +Conflicts: redhat-pki-ra-ui + +Obsoletes: dogtag-pki-ra-theme < %{version}-%{release} +Obsoletes: dogtag-pki-ra-ui + +Provides: pki-ra-theme = %{version}-%{release} +Provides: pki-ra-ui = %{version}-%{release} + +%description -n dogtag-pki-ra-theme +This Registration Authority (RA) User Interface contains +the Dogtag textual and graphical user interface for the RA. + +This package is used by the Dogtag Certificate System. + +%{overview} + + +################################ +## dogtag-pki-tks-theme ## +################################ + +%package -n dogtag-pki-tks-theme +Summary: Certificate System - Token Key Service User Interface +Group: System Environment/Base + +# NOTE: Several PKI packages require a "virtual" Theme component. These +# "virtual" Theme components are "Provided" by various Theme "flavors" +# including "dogtag", "redhat", and "null". Consequently, +# all "dogtag", "redhat", and "null" Theme components MUST be +# mutually exclusive! +#Conflicts: null-pki-tks-theme +#Conflicts: null-pki-tks-ui +Conflicts: redhat-pki-tks-theme +Conflicts: redhat-pki-tks-ui + +Obsoletes: dogtag-pki-tks-theme < %{version}-%{release} +Obsoletes: dogtag-pki-tks-ui + +Provides: pki-tks-theme = %{version}-%{release} +Provides: pki-tks-ui = %{version}-%{release} + +%description -n dogtag-pki-tks-theme +This Token Key Service (TKS) User Interface contains +the Dogtag textual and graphical user interface for the TKS. + +This package is used by the Dogtag Certificate System. + +%{overview} + + +################################ +## dogtag-pki-tps-theme ## +################################ + +%package -n dogtag-pki-tps-theme +Summary: Certificate System - Token Processing System User Interface +Group: System Environment/Base + +# NOTE: Several PKI packages require a "virtual" Theme component. These +# "virtual" Theme components are "Provided" by various Theme "flavors" +# including "dogtag", "redhat", and "null". Consequently, +# all "dogtag", "redhat", and "null" Theme components MUST be +# mutually exclusive! +#Conflicts: null-pki-tps-theme +#Conflicts: null-pki-tps-ui +Conflicts: redhat-pki-tps-theme +Conflicts: redhat-pki-tps-ui + +Obsoletes: dogtag-pki-tps-theme < %{version}-%{release} +Obsoletes: dogtag-pki-tps-ui + +Provides: pki-tps-theme = %{version}-%{release} +Provides: pki-tps-ui = %{version}-%{release} + +%description -n dogtag-pki-tps-theme +This Token Processing System (TPS) User Interface contains +the Dogtag textual and graphical user interface for the TPS. + +This package is used by the Dogtag Certificate System. + +%{overview} + + +################################ +## dogtag-pki-console-theme ## +################################ + +%package -n dogtag-pki-console-theme +Summary: Certificate System - PKI Console User Interface +Group: System Environment/Base + +# NOTE: Several PKI packages require a "virtual" Theme component. These +# "virtual" Theme components are "Provided" by various Theme "flavors" +# including "dogtag", "redhat", and "null". Consequently, +# all "dogtag", "redhat", and "null" Theme components MUST be +# mutually exclusive! +#Conflicts: null-pki-console-theme +#Conflicts: null-pki-console-ui +Conflicts: redhat-pki-console-theme +Conflicts: redhat-pki-console-ui + +Obsoletes: dogtag-pki-console-theme < %{version}-%{release} +Obsoletes: dogtag-pki-console-ui + +Provides: pki-console-theme = %{version}-%{release} +Provides: pki-console-ui = %{version}-%{release} + +%description -n dogtag-pki-console-theme +This PKI Console User Interface contains +the Dogtag textual and graphical user interface for the PKI Console. + +This package is used by the Dogtag Certificate System. + +%{overview} + + +############################################################################### +### P A C K A G E P R O C E S S I N G ### +############################################################################### + +%prep + + +%setup -q + + +%clean +%{__rm} -rf %{buildroot} + + +%build +%{__mkdir_p} build +cd build +%cmake -DBUILD_DOGTAG_THEME:BOOL=ON .. +%{__make} VERBOSE=1 %{?_smp_mflags} + + +############################################################################### +### P A C K A G E I N S T A L L A T I O N ### +############################################################################### + +%install +%{__rm} -rf %{buildroot} +cd build +%{__make} install DESTDIR=%{buildroot} + + +############################################################################### +### S U B P A C K A G E I N S T A L L A T I O N ### +############################################################################### + +################################ +## dogtag-pki-common-theme ## +################################ + + +################################ +## dogtag-pki-ca-theme ## +################################ + + +################################ +## dogtag-pki-kra-theme ## +################################ + + +################################ +## dogtag-pki-ocsp-theme ## +################################ + + +################################ +## dogtag-pki-ra-theme ## +################################ + + +################################ +## dogtag-pki-tks-theme ## +################################ + + +################################ +## dogtag-pki-tps-theme ## +################################ + + +################################ +## dogtag-pki-console-theme ## +################################ + + +############################################################################### +### P R E & P O S T I N S T A L L / U N I N S T A L L S C R I P T S ### +############################################################################### + +################################ +## dogtag-pki-common-theme ## +################################ + + +################################ +## dogtag-pki-ca-theme ## +################################ + + +################################ +## dogtag-pki-kra-theme ## +################################ + + +################################ +## dogtag-pki-ocsp-theme ## +################################ + + +################################ +## dogtag-pki-ra-theme ## +################################ + + +################################ +## dogtag-pki-tks-theme ## +################################ + + +################################ +## dogtag-pki-tps-theme ## +################################ + + +################################ +## dogtag-pki-console-theme ## +################################ + + +############################################################################### +### I N V E N T O R Y O F F I L E S A N D D I R E C T O R I E S ### +############################################################################### + +################################ +## dogtag-pki-common-theme ## +################################ + +%files -n dogtag-pki-common-theme +%defattr(-,root,root,-) +%doc dogtag/common-ui/LICENSE +%dir %{_datadir}/pki +%dir %{_datadir}/pki/common-ui +%{_datadir}/pki/common-ui/* + + +################################ +## dogtag-pki-ca-theme ## +################################ + +%files -n dogtag-pki-ca-theme +%defattr(-,root,root,-) +%doc dogtag/ca-ui/LICENSE +%dir %{_datadir}/pki/ca-ui +%{_datadir}/pki/ca-ui/* + + +################################ +## dogtag-pki-kra-theme ## +################################ + +%files -n dogtag-pki-kra-theme +%defattr(-,root,root,-) +%doc dogtag/kra-ui/LICENSE +%dir %{_datadir}/pki/kra-ui +%{_datadir}/pki/kra-ui/* + + +################################ +## dogtag-pki-ocsp-theme ## +################################ + +%files -n dogtag-pki-ocsp-theme +%defattr(-,root,root,-) +%doc dogtag/ocsp-ui/LICENSE +%dir %{_datadir}/pki/ocsp-ui +%{_datadir}/pki/ocsp-ui/* + + +################################ +## dogtag-pki-ra-theme ## +################################ + +%files -n dogtag-pki-ra-theme +%defattr(-,root,root,-) +%doc dogtag/ra-ui/LICENSE +%dir %{_datadir}/pki/ra-ui +%{_datadir}/pki/ra-ui/* + + +################################ +## dogtag-pki-tks-theme ## +################################ + +%files -n dogtag-pki-tks-theme +%defattr(-,root,root,-) +%doc dogtag/tks-ui/LICENSE +%dir %{_datadir}/pki/tks-ui +%{_datadir}/pki/tks-ui/* + + +################################ +## dogtag-pki-tps-theme ## +################################ + +%files -n dogtag-pki-tps-theme +%defattr(-,root,root,-) +%doc dogtag/tps-ui/LICENSE +%dir %{_datadir}/pki/tps-ui +%{_datadir}/pki/tps-ui/* + + +################################ +## dogtag-pki-console-theme ## +################################ + +%files -n dogtag-pki-console-theme +%defattr(-,root,root,-) +%doc dogtag/console-ui/LICENSE +%{_javadir}/* +#%{_javadir}/pki/* + + +############################################################################### +### C H A N G E L O G ### +############################################################################### + +%changelog +* Wed Dec 1 2010 Matthew Harmsen <mharmsen@redhat.com> 9.0.0-1 +- Initial revision. (kwright@redhat.com & mharmsen@redhat.com) + diff --git a/pki/specs/ipa-pki-theme.spec b/pki/specs/ipa-pki-theme.spec new file mode 100644 index 000000000..12ad3947b --- /dev/null +++ b/pki/specs/ipa-pki-theme.spec @@ -0,0 +1,239 @@ +# 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; version 2 of the License. +# +# 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, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2010 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + + +############################################################################### +### P A C K A G E H E A D E R ### +############################################################################### + +Name: ipa-pki-theme +Version: 9.0.0 +Release: 1%{?dist} +Summary: Certificate System - Null PKI Theme Components +URL: http://pki.fedoraproject.org/ +License: GPLv2 +Group: System Environment/Base + +BuildArch: noarch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: cmake + +Source0: http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}.tar.gz + +%define overview \ +================================== \ +|| ABOUT "CERTIFICATE SYSTEM" || \ +================================== \ + \ +Certificate System (CS) is an enterprise software system designed \ +to manage enterprise Public Key Infrastructure (PKI) deployments. \ + \ +The IPA PKI Suite is comprised of the following subsystems: \ + \ + * Certificate Authority (CA) \ + \ +Additionally, it provides javadocs on portions of the API, as well as \ +various command-line tools used to assist with an IPA deployment. \ + \ +To successfully deploy instances of a CA, \ +a Tomcat Web Server must be up and running locally on this machine. \ + \ +To meet the database storage requirements of each CA \ +instance, a 389 Directory Server must be up and running either locally \ +on this machine, or remotely over the attached network connection. \ + \ +IPA utilizes the 'pkicreate' utility to install a PKI subsystem, and \ +the 'pkisilent' utility to perform a batch configuration of this PKI \ +subsystem. \ + \ +After installation of this package, IPA utilizes the 'pkicreate' and \ +'pkiremove' utilities to respectively create and remove PKI instances. \ + \ +For deployment purposes, IPA PKI requires ALL of the subpackages \ +defined by the "pki-core" package. \ + \ +%{nil} + +%description %{overview} + + +############################################################################### +### S U B P A C K A G E H E A D E R S ### +############################################################################### + +############################## +## null-pki-common-theme ## +############################## + +%package -n null-pki-common-theme +Summary: Certificate System - PKI Common Framework User Interface +Group: System Environment/Base + +# NOTE: Several PKI packages require a "virtual" Theme component. These +# "virtual" Theme components are "Provided" by various Theme "flavors" +# including "dogtag", "redhat", and "null". Consequently, +# all "dogtag", "redhat", and "null" Theme components MUST be +# mutually exclusive! +Conflicts: dogtag-pki-common-theme +Conflicts: dogtag-pki-common-ui +Conflicts: redhat-pki-common-theme +Conflicts: redhat-pki-common-ui + +Obsoletes: null-pki-common-theme < %{version}-%{release} +Obsoletes: null-pki-common-ui + +Provides: pki-common-theme = %{version}-%{release} +Provides: pki-common-ui = %{version}-%{release} + +%description -n null-pki-common-theme +This PKI Common Framework User Interface contains +NO textual or graphical user interface for the PKI Common Framework. + +This package is used by the Certificate System utilized by IPA. + +%{overview} + + +############################## +## null-pki-ca-theme ## +############################## + +%package -n null-pki-ca-theme +Summary: Certificate System - Certificate Authority User Interface +Group: System Environment/Base + +# NOTE: Several PKI packages require a "virtual" Theme component. These +# "virtual" Theme components are "Provided" by various Theme "flavors" +# including "dogtag", "redhat", and "null". Consequently, +# all "dogtag", "redhat", and "null" Theme components MUST be +# mutually exclusive! +Conflicts: dogtag-pki-ca-theme +Conflicts: dogtag-pki-ca-ui +Conflicts: redhat-pki-ca-theme +Conflicts: redhat-pki-ca-ui + +Obsoletes: null-pki-ca-theme < %{version}-%{release} +Obsoletes: null-pki-ca-ui + +Provides: pki-ca-theme = %{version}-%{release} +Provides: pki-ca-ui = %{version}-%{release} + +%description -n null-pki-ca-theme +This Certificate Authority (CA) User Interface contains +NO textual or graphical user interface for the CA. + +This package is used by the Certificate System utilized by IPA. + +%{overview} + + +############################################################################### +### P A C K A G E P R O C E S S I N G ### +############################################################################### + +%prep + + +%setup -q + + +%clean +%{__rm} -rf %{buildroot} + + +%build +%{__mkdir_p} build +cd build +%cmake -DBUILD_NULL_THEME:BOOL=ON .. +%{__make} VERBOSE=1 %{?_smp_mflags} + + +############################################################################### +### P A C K A G E I N S T A L L A T I O N ### +############################################################################### + +%install +%{__rm} -rf %{buildroot} +cd build +%{__make} install DESTDIR=%{buildroot} + + +############################################################################### +### S U B P A C K A G E I N S T A L L A T I O N ### +############################################################################### + +############################## +## null-pki-common-theme ## +############################## + + +############################## +## null-pki-ca-theme ## +############################## + + +############################################################################### +### P R E & P O S T I N S T A L L / U N I N S T A L L S C R I P T S ### +############################################################################### + +############################## +## null-pki-common-theme ## +############################## + + +############################## +## null-pki-ca-theme ## +############################## + + +############################################################################### +### I N V E N T O R Y O F F I L E S A N D D I R E C T O R I E S ### +############################################################################### + +############################## +## null-pki-common-theme ## +############################## + +%files -n null-pki-common-theme +%defattr(-,root,root,-) +%doc dogtag/common-ui/LICENSE +%dir %{_datadir}/pki +%dir %{_datadir}/pki/common-ui +%{_datadir}/pki/common-ui/* + + +############################## +## null-pki-ca-theme ## +############################## + +%files -n null-pki-ca-theme +%defattr(-,root,root,-) +%doc dogtag/ca-ui/LICENSE +%dir %{_datadir}/pki/ca-ui +%{_datadir}/pki/ca-ui/* + + +############################################################################### +### C H A N G E L O G ### +############################################################################### + +%changelog +* Wed Dec 1 2010 Matthew Harmsen <mharmsen@redhat.com> 9.0.0-1 +- Initial revision. (kwright@redhat.com & mharmsen@redhat.com) + diff --git a/pki/specs/osutil.spec b/pki/specs/osutil.spec new file mode 100644 index 000000000..2cb41f21f --- /dev/null +++ b/pki/specs/osutil.spec @@ -0,0 +1,84 @@ +# 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; version 2 of the License. +# +# 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, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2010 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +Name: osutil +Version: 9.0.0 +Release: 1%{?dist} +Summary: Operating System Utilities JNI Package +URL: http://pki.fedoraproject.org/ +License: GPLv2 +Group: System Environment/Libraries + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: cmake +BuildRequires: java-devel >= 1:1.6.0 +BuildRequires: jpackage-utils +BuildRequires: nspr-devel >= 4.6.99 +BuildRequires: nss-devel >= 3.12.3.99 +BuildRequires: pkgconfig + +Requires: java >= 1:1.6.0 +Requires: jpackage-utils +Requires: nss >= 3.12.3.99 + +Source0: http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}.tar.gz + +%description +The Operating System Utilities Java Native Interface (JNI) package +supplies various native operating system operations to Java programs. + + +%prep + + +%setup -q + + +%clean +%{__rm} -rf %{buildroot} + + +%build +%{__mkdir_p} build +cd build +%cmake -DBUILD_OSUTIL:BOOL=ON .. +%{__make} VERBOSE=1 %{?_smp_mflags} + + +%install +%{__rm} -rf %{buildroot} +cd build +%{__make} install DESTDIR=%{buildroot} + +cd %{buildroot}%{_jnidir} +%{__rm} osutil.jar +%{__ln_s} %{_libdir}/osutil/osutil-%{version}.jar osutil.jar + + +%files +%defattr(-,root,root,-) +%doc base/osutil/LICENSE +%{_jnidir}/osutil.jar +%dir %{_libdir}/osutil +%{_libdir}/osutil/* + + +%changelog +* Wed Dec 1 2010 Matthew Harmsen <mharmsen@redhat.com> 9.0.0-1 +- Initial revision. (kwright@redhat.com & mharmsen@redhat.com) + diff --git a/pki/specs/pki-core.spec b/pki/specs/pki-core.spec new file mode 100644 index 000000000..f0115aab6 --- /dev/null +++ b/pki/specs/pki-core.spec @@ -0,0 +1,741 @@ +# 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; version 2 of the License. +# +# 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, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2010 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + + +############################################################################### +### P A C K A G E H E A D E R ### +############################################################################### + +Name: pki-core +Version: 9.0.0 +Release: 1%{?dist} +Summary: Certificate System - PKI Core Components +URL: http://pki.fedoraproject.org/ +License: GPLv2 +Group: System Environment/Daemons + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: cmake +BuildRequires: java-devel >= 1:1.6.0 +BuildRequires: jpackage-utils +BuildRequires: jss >= 4.2.6 +BuildRequires: tomcatjss +BuildRequires: osutil + +Source0: http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}.tar.gz + +%define major_version %(echo `echo %{version} | awk -F. '{ print $1 }'`) +%define minor_version %(echo `echo %{version} | awk -F. '{ print $2 }'`) +%define patch_version %(echo `echo %{version} | awk -F. '{ print $3 }'`) + +%define overview \ +================================== \ +|| ABOUT "CERTIFICATE SYSTEM" || \ +================================== \ + \ +Certificate System (CS) is an enterprise software system designed \ +to manage enterprise Public Key Infrastructure (PKI) deployments. \ + \ +PKI Core contains fundamental packages required by Certificate System, \ +and consists of the following components: \ + \ + * pki-setup \ + * pki-symkey \ + * pki-native-tools \ + * pki-util \ + * pki-util-javadoc \ + * pki-java-tools \ + * pki-java-tools-javadoc \ + * pki-common \ + * pki-common-javadoc \ + * pki-selinux \ + * pki-ca \ + * pki-silent \ + \ +which comprise the following PKI subsystems: \ + \ + * Certificate Authority (CA) \ + \ +For deployment purposes, Certificate System requires ONE AND ONLY ONE \ +of the following "Mutually-Exclusive" PKI Theme packages: \ + \ + * ipa-pki-theme (IPA deployments - Null Theme) \ + * dogtag-pki-theme (Dogtag Certificate System deployments) \ + * redhat-pki-theme (Red Hat Certificate System deployments) \ + \ +%{nil} + +%description %{overview} + + +############################################################################### +### S U B P A C K A G E H E A D E R S ### +############################################################################### + +######################## +## pki-setup ## +######################## + +%package -n pki-setup +Summary: Certificate System - PKI Instance Creation & Removal Scripts +Group: System Environment/Base + +BuildArch: noarch + +Requires: perl-Crypt-SSLeay +Requires: policycoreutils +Requires: openldap-clients + +%description -n pki-setup +PKI setup scripts are used to create and remove instances from PKI deployments. + +This package is a part of the PKI Core used by the Certificate System. + +%{overview} + + +######################## +## pki-symkey ## +######################## + +%package -n pki-symkey +Summary: Symmetric Key JNI Package +Group: System Environment/Libraries + +Requires: java >= 1:1.6.0 +Requires: jpackage-utils +Requires: jss >= 4.2.6 +Requires: nss >= 3.12.3.99 + +Provides: symkey = %{version}-%{release} + +Obsoletes: symkey < %{version}-%{release} + +%description -n pki-symkey +The Symmetric Key Java Native Interface (JNI) package supplies various native +symmetric key operations to Java programs. + +This package is a part of the PKI Core used by the Certificate System. + +%{overview} + + +######################## +## pki-native-tools ## +######################## + +%package -n pki-native-tools +Summary: Certificate System - Native Tools +Group: System Environment/Base + +Requires: openldap-clients +Requires: nss >= 3.12.3.99 +Requires: nss-tools >= 3.12.3.99 + +%description -n pki-native-tools +These platform-dependent PKI executables are used to help make +Certificate System into a more complete and robust PKI solution. + +This package is a part of the PKI Core used by the Certificate System. + +%{overview} + + +######################## +## pki-util ## +######################## + +%package -n pki-util +Summary: Certificate System - PKI Utility Framework +Group: System Environment/Base + +BuildArch: noarch + +Requires: java >= 1:1.6.0 +Requires: jpackage-utils +Requires: jss >= 4.2.6 +Requires: ldapjdk + +%description -n pki-util +The PKI Utility Framework is required by the following four PKI subsystems: + + the Certificate Authority (CA), + the Data Recovery Manager (DRM), + the Online Certificate Status Protocol (OCSP) Manager, and + the Token Key Service (TKS). + +This package is a part of the PKI Core used by the Certificate System. + +%{overview} + + +#%package -n pki-util-javadoc +#Summary: Certificate System - PKI Utility Framework Javadocs +#Group: Documentation + +#BuildArch: noarch + +#Requires: pki-util = %{version}-%{release} + +#%description -n pki-util-javadoc +#This documentation pertains exclusively to version %{version} of +#the PKI Utility Framework. +# +#This package is a part of the PKI Core used by the Certificate System. +# + + +######################## +## pki-java-tools ## +######################## + +%package -n pki-java-tools +Summary: Certificate System - PKI Java-Based Tools +Group: System Environment/Base + +BuildArch: noarch + +Requires: java >= 1:1.6.0 +Requires: pki-native-tools = %{version}-%{release} +Requires: pki-util = %{version}-%{release} + +%description -n pki-java-tools +These platform-independent PKI executables are used to help make +Certificate System into a more complete and robust PKI solution. + +This package is a part of the PKI Core used by the Certificate System. + +%{overview} + + +#%package -n pki-java-tools-javadoc +#Summary: Certificate System - PKI Java-Based Tools Javadocs +#Group: Documentation + +#BuildArch: noarch + +#Requires: pki-java-tools = %{version}-%{release} + +#%description -n pki-java-tools-javadoc +#This documentation pertains exclusively to version %{version} of +#the PKI Java-Based Tools. +# +#This package is a part of the PKI Core used by the Certificate System. +# + + +######################## +## pki-common ## +######################## + +%package -n pki-common +Summary: Certificate System - PKI Common Framework +Group: System Environment/Base + +BuildArch: noarch + +Requires: java >= 1:1.6.0 +Requires: jss >= 4.2.6 +Requires: osutil +Requires: pki-common-theme +Requires: pki-java-tools = %{version}-%{release} +Requires: pki-setup = %{version}-%{release} +Requires: pki-symkey = %{version}-%{release} +Requires: tomcatjss +Requires: %{_javadir}/ldapjdk.jar +Requires: %{_javadir}/velocity.jar +Requires: %{_javadir}/xalan-j2.jar +Requires: %{_javadir}/xalan-j2-serializer.jar +Requires: %{_javadir}/xerces-j2.jar +Requires: velocity + +%description -n pki-common +The PKI Common Framework is required by the following four PKI subsystems: + + the Certificate Authority (CA), + the Data Recovery Manager (DRM), + the Online Certificate Status Protocol (OCSP) Manager, and + the Token Key Service (TKS). + +This package is a part of the PKI Core used by the Certificate System. + +%{overview} + + +#%package -n pki-common-javadoc +#Summary: Certificate System - PKI Common Framework Javadocs +#Group: Documentation + +#BuildArch: noarch + +#Requires: pki-common = %{version}-%{release} + +#%description -n pki-common-javadoc +#This documentation pertains exclusively to version %{version} of +#the PKI Common Framework. +# +#This package is a part of the PKI Core used by the Certificate System. +# + + +######################## +## pki-selinux ## +######################## + +%package -n pki-selinux +Summary: Certificate System - PKI Selinux Policies +Group: System Environment/Base + +BuildArch: noarch + +Requires: policycoreutils +Requires: selinux-policy-targeted + +%description -n pki-selinux +Selinux policies for the PKI components. + +This package is a part of the PKI Core used by the Certificate System. + +%{overview} + + +######################## +## pki-ca ## +######################## + +%package -n pki-ca +Summary: Certificate System - Certificate Authority +Group: System Environment/Daemons + +BuildArch: noarch + +Requires: java >= 1:1.6.0 +Requires: pki-ca-theme +Requires: pki-common = %{version}-%{release} +Requires: pki-selinux = %{version}-%{release} +Requires(post): chkconfig +Requires(preun): chkconfig +Requires(preun): initscripts +Requires(postun): initscripts + +%description -n pki-ca +The Certificate Authority (CA) is a required PKI subsystem which issues, +renews, revokes, and publishes certificates as well as compiling and +publishing Certificate Revocation Lists (CRLs). + +The Certificate Authority can be configured as a self-signing Certificate +Authority, where it is the root CA, or it can act as a subordinate CA, +where it obtains its own signing certificate from a public CA. + +This package is a part of the PKI Core used by the Certificate System. + +%{overview} + + +######################## +## pki-silent ## +######################## + +%package -n pki-silent +Summary: Certificate System - Silent Installer +Group: System Environment/Base + +BuildArch: noarch + +Requires: java >= 1:1.6.0 +Requires: pki-common = %{version}-%{release} + +%description -n pki-silent +The PKI Silent Installer may be used to "automatically" configure +the following PKI subsystems in a non-graphical (batch) fashion +including: + + the Certificate Authority (CA), + the Data Recovery Manager (DRM), + the Online Certificate Status Protocol (OCSP) Manager, + the Registration Authority (RA), + the Token Key Service (TKS), and/or + the Token Processing System (TPS). + +This package is a part of the PKI Core used by the Certificate System. + +%{overview} + + +############################################################################### +### P A C K A G E P R O C E S S I N G ### +############################################################################### + +%prep + + +%setup -q + + +%clean +%{__rm} -rf %{buildroot} + + +%build +%{__mkdir_p} build +cd build +%cmake -DVAR_INSTALL_DIR:PATH=/var -DBUILD_CORE:BOOL=ON .. +%{__make} VERBOSE=1 %{?_smp_mflags} + + +############################################################################### +### P A C K A G E I N S T A L L A T I O N ### +############################################################################### + +%install +%{__rm} -rf %{buildroot} +cd build +%{__make} install DESTDIR=%{buildroot} + + +############################################################################### +### S U B P A C K A G E I N S T A L L A T I O N ### +############################################################################### + +######################## +## pki-setup ## +######################## + + +######################## +## pki-symkey ## +######################## + +cd %{buildroot}%{_jnidir} +%{__rm} symkey.jar +%{__ln_s} %{_libdir}/symkey/symkey-%{version}.jar symkey.jar + + +######################## +## pki-native-tools ## +######################## + + +######################## +## pki-util ## +######################## + + +######################## +## pki-java-tools ## +######################## + +#cd %{buildroot}%{_javadir} +#%{__ln_s} pkitools.jar cstools.jar +#cd %{buildroot}%{_javadir}/pki +#%{__ln_s} pkitools.jar cstools.jar +#cd %{buildroot}%{_javadir}/pki +#%{__ln_s} ../pkitools.jar cstools.jar + + +######################## +## pki-common ## +######################## + + +######################## +## pki-selinux ## +######################## + + +######################## +## pki-ca ## +######################## + +%{__sed} -i 's/^preop.product.version=.*$/preop.product.version=%{version}/' %{buildroot}%{_datadir}/pki/ca/conf/CS.cfg +%{__sed} -i 's/^cms.version=.*$/cms.version=%{major_version}.%{minor_version}/' %{buildroot}%{_datadir}/pki/ca/conf/CS.cfg + + +######################## +## pki-silent ## +######################## + + +############################################################################### +### P R E & P O S T I N S T A L L / U N I N S T A L L S C R I P T S ### +############################################################################### + +######################## +## pki-setup ## +######################## + + +######################## +## pki-symkey ## +######################## + + +######################## +## pki-native-tools ## +######################## + + +######################## +## pki-util ## +######################## + + +######################## +## pki-java-tools ## +######################## + + +######################## +## pki-common ## +######################## + + +######################## +## pki-selinux ## +######################## + + +######################## +## pki-ca ## +######################## + +%pre -n pki-ca + + +%post -n pki-ca +# This adds the proper /etc/rc*.d links for the script +/sbin/chkconfig --add pki-cad || : + + +%preun -n pki-ca +if [ $1 = 0 ] ; then + /sbin/service pki-cad stop >/dev/null 2>&1 + /sbin/chkconfig --del pki-cad || : +fi + + +%postun -n pki-ca +if [ "$1" -ge "1" ] ; then + /sbin/service pki-cad condrestart >/dev/null 2>&1 || : +fi + + +######################## +## pki-silent ## +######################## + + +############################################################################### +### I N V E N T O R Y O F F I L E S A N D D I R E C T O R I E S ### +############################################################################### + +######################## +## pki-setup ## +######################## + +%files -n pki-setup +%defattr(-,root,root,-) +%doc base/setup/LICENSE +%{_bindir}/pkicreate +%{_bindir}/pkiremove +%dir %{_datadir}/pki +%dir %{_datadir}/pki/scripts +%{_datadir}/pki/scripts/pkicommon.pm +%dir %{_localstatedir}/lock/pki +%dir %{_localstatedir}/run/pki + + +######################## +## pki-symkey ## +######################## + +%files -n pki-symkey +%defattr(-,root,root,-) +%doc base/symkey/LICENSE +%{_jnidir}/symkey.jar +%dir %{_libdir}/symkey +%{_libdir}/symkey/* + + +######################## +## pki-native-tools ## +######################## + +%files -n pki-native-tools +%defattr(-,root,root,-) +%doc base/native-tools/LICENSE base/native-tools/doc/README +%{_bindir}/bulkissuance +%{_bindir}/p7tool +%{_bindir}/revoker +%{_bindir}/setpin +%{_bindir}/sslget +%{_bindir}/tkstool +%dir %{_datadir}/pki/native-tools +%{_datadir}/pki/native-tools/* + + +######################## +## pki-util ## +######################## + +%files -n pki-util +%defattr(-,root,root,-) +%doc base/util/LICENSE +%dir %{_javadir}/pki +%{_javadir}/pki/cmsutil-%{version}.jar +%{_javadir}/pki/cmsutil.jar +%{_javadir}/pki/nsutil-%{version}.jar +%{_javadir}/pki/nsutil.jar + +#%files -n pki-util-javadoc +#%defattr(-,root,root,-) +#%dir %{_javadocdir}/pki-util-%{version} +#%{_javadocdir}/pki-util-%{version}/* + + +######################## +## pki-java-tools ## +######################## + +%files -n pki-java-tools +%defattr(-,root,root,-) +%doc base/java-tools/LICENSE +%{_bindir}/AtoB +%{_bindir}/AuditVerify +%{_bindir}/BtoA +%{_bindir}/CMCEnroll +%{_bindir}/CMCRequest +%{_bindir}/CMCResponse +%{_bindir}/CMCRevoke +%{_bindir}/CRMFPopClient +%{_bindir}/ExtJoiner +%{_bindir}/GenExtKeyUsage +%{_bindir}/GenIssuerAltNameExt +%{_bindir}/GenSubjectAltNameExt +%{_bindir}/HttpClient +%{_bindir}/OCSPClient +%{_bindir}/PKCS10Client +%{_bindir}/PKCS12Export +%{_bindir}/PrettyPrintCert +%{_bindir}/PrettyPrintCrl +%{_bindir}/TokenInfo +%{_javadir}/pkitools-%{version}.jar +%{_javadir}/pkitools.jar +#%{_javadir}/cstools.jar +#%{_javadir}/pki/pkitools-%{version}.jar +#%{_javadir}/pki/pkitools.jar +#%{_javadir}/pki/cstools.jar + +#%files -n pki-java-tools-javadoc +#%defattr(-,root,root,-) +#%dir %{_javadocdir}/pki-java-tools-%{version} +#%{_javadocdir}/pki-java-tools-%{version}/* + + +######################## +## pki-common ## +######################## + +%files -n pki-common +%defattr(-,root,root,-) +%doc base/common/LICENSE +%{_javadir}/pki/certsrv-%{version}.jar +%{_javadir}/pki/certsrv.jar +%{_javadir}/pki/cms-%{version}.jar +%{_javadir}/pki/cms.jar +%{_javadir}/pki/cmsbundle-%{version}.jar +%{_javadir}/pki/cmsbundle.jar +%{_javadir}/pki/cmscore-%{version}.jar +%{_javadir}/pki/cmscore.jar +%{_datadir}/pki/scripts/functions +%{_datadir}/pki/scripts/pki_apache_initscript +%dir %{_datadir}/pki/setup +%{_datadir}/pki/setup/CertServer.directory +%{_datadir}/pki/setup/menu.xml +%{_datadir}/pki/setup/web-app_2_3.dtd + +#%files -n pki-common-javadoc +#%defattr(-,root,root,-) +#%dir %{_javadocdir}/pki-common-%{version} +#%{_javadocdir}/pki-common-%{version}/* + + +######################## +## pki-selinux ## +######################## + +%files -n pki-selinux +%defattr(-,root,root,-) +%doc base/selinux/LICENSE +%{_datadir}/selinux/modules/pki.pp + + +######################## +## pki-ca ## +######################## + +%files -n pki-ca +%defattr(-,root,root,-) +%doc base/ca/LICENSE +%{_initrddir}/pki-cad +%{_javadir}/ca-%{version}.jar +%{_javadir}/ca.jar +#%{_javadir}/pki/ca-%{version}.jar +#%{_javadir}/pki/ca/ca.jar +%dir %{_datadir}/pki/ca +%dir %{_datadir}/pki/ca/acl +%{_datadir}/pki/ca/acl/* +%dir %{_datadir}/pki/ca/conf +%{_datadir}/pki/ca/conf/* +%dir %{_datadir}/pki/ca/emails +%{_datadir}/pki/ca/emails/* +%dir %{_datadir}/pki/ca/profiles +%dir %{_datadir}/pki/ca/profiles/ca +%{_datadir}/pki/ca/profiles/ca/* +%dir %{_datadir}/pki/ca/webapps +%{_datadir}/pki/ca/webapps/* +%dir %{_datadir}/pki/ca/setup +%{_datadir}/pki/ca/setup/* +%dir %{_localstatedir}/lock/pki/ca +%dir %{_localstatedir}/run/pki/ca + + +######################## +## pki-silent ## +######################## + +%files -n pki-silent +%defattr(-,root,root,-) +%doc base/silent/LICENSE +%{_bindir}/pkisilent +%{_javadir}/silent-%{version}.jar +%{_javadir}/silent.jar +#%{_javadir}/pki/silent-%{version}.jar +#%{_javadir}/pki/silent.jar +%dir %{_datadir}/pki/silent +%{_datadir}/pki/silent/* + + +############################################################################### +### C H A N G E L O G ### +############################################################################### + +%changelog +* Wed Dec 1 2010 Matthew Harmsen <mharmsen@redhat.com> 9.0.0-1 +- Initial revision. (kwright@redhat.com & mharmsen@redhat.com) + |