From f55ece0db484df5d065e0a7c689bf7c23eaa172b Mon Sep 17 00:00:00 2001
From: Matthew Harmsen <mharmsen@redhat.com>
Date: Tue, 6 Mar 2012 14:03:11 -0800
Subject: [PATCH] Remove PKI desktop icons

Bugzilla Bug #767800 - Firefox Launcher on Panel being modified for all users.
---
 pki/base/ca/setup/CMakeLists.txt      |    3 ---
 pki/base/ca/setup/config.desktop.in   |   31 -------------------------------
 pki/base/kra/setup/CMakeLists.txt     |    3 ---
 pki/base/kra/setup/config.desktop.in  |   31 -------------------------------
 pki/base/ocsp/setup/CMakeLists.txt    |    3 ---
 pki/base/ocsp/setup/config.desktop.in |   31 -------------------------------
 pki/base/ra/setup/CMakeLists.txt      |    3 ---
 pki/base/ra/setup/config.desktop.in   |   31 -------------------------------
 pki/base/setup/pkicreate              |   22 ----------------------
 pki/base/tks/setup/CMakeLists.txt     |    3 ---
 pki/base/tks/setup/config.desktop.in  |   31 -------------------------------
 pki/base/tps/setup/CMakeLists.txt     |    3 ---
 pki/base/tps/setup/config.desktop.in  |   33 ---------------------------------
 13 files changed, 0 insertions(+), 228 deletions(-)
 delete mode 100644 pki/base/ca/setup/config.desktop.in
 delete mode 100644 pki/base/kra/setup/config.desktop.in
 delete mode 100644 pki/base/ocsp/setup/config.desktop.in
 delete mode 100644 pki/base/ra/setup/config.desktop.in
 delete mode 100644 pki/base/tks/setup/config.desktop.in
 delete mode 100644 pki/base/tps/setup/config.desktop.in

diff --git a/pki/base/ca/setup/CMakeLists.txt b/pki/base/ca/setup/CMakeLists.txt
index 25ea20f..f5f069c 100644
--- a/pki/base/ca/setup/CMakeLists.txt
+++ b/pki/base/ca/setup/CMakeLists.txt
@@ -1,10 +1,7 @@
 set(VERSION ${APPLICATION_VERSION})
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/config.desktop @ONLY)
-
 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/setup/config.desktop.in b/pki/base/ca/setup/config.desktop.in
deleted file mode 100644
index 646c2e9..0000000
--- a/pki/base/ca/setup/config.desktop.in
+++ /dev/null
@@ -1,31 +0,0 @@
-# --- BEGIN COPYRIGHT BLOCK ---
-# 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.
-#
-# Copyright (C) 2007 Red Hat, Inc.
-# All rights reserved.
-# --- END COPYRIGHT BLOCK ---
-#
-[Desktop Entry]
-Version=@VERSION@
-Encoding=UTF-8
-Name=Certificate Authority Configuration - [PKI_INSTANCE_ID]
-GenericName=Certificate Authority Configuration
-Comment=Configure Certificate Authority
-Exec=firefox https://[PKI_MACHINE_NAME]:[PKI_SECURE_PORT]/ca/admin/console/config/login?pin=[PKI_RANDOM_NUMBER]
-Icon=firefox.png
-Terminal=false
-Type=Application
-MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;
-X-Desktop-File-Install-Version=0.9
-Categories=Application;CertServer;
diff --git a/pki/base/kra/setup/CMakeLists.txt b/pki/base/kra/setup/CMakeLists.txt
index 25ea20f..f5f069c 100644
--- a/pki/base/kra/setup/CMakeLists.txt
+++ b/pki/base/kra/setup/CMakeLists.txt
@@ -1,10 +1,7 @@
 set(VERSION ${APPLICATION_VERSION})
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/config.desktop @ONLY)
-
 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/setup/config.desktop.in b/pki/base/kra/setup/config.desktop.in
deleted file mode 100644
index 3ca4378..0000000
--- a/pki/base/kra/setup/config.desktop.in
+++ /dev/null
@@ -1,31 +0,0 @@
-# --- BEGIN COPYRIGHT BLOCK ---
-# 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.
-#
-# Copyright (C) 2007 Red Hat, Inc.
-# All rights reserved.
-# --- END COPYRIGHT BLOCK ---
-#
-[Desktop Entry]
-Version=@VERSION@
-Encoding=UTF-8
-Name=Data Recovery Manager Configuration - [PKI_INSTANCE_ID]
-GenericName=Data Recovery Manager Configuration
-Comment=Configure Data Recovery Manager
-Exec=firefox https://[PKI_MACHINE_NAME]:[PKI_SECURE_PORT]/kra/admin/console/config/login?pin=[PKI_RANDOM_NUMBER]
-Icon=firefox.png
-Terminal=false
-Type=Application
-MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;
-X-Desktop-File-Install-Version=0.9
-Categories=Application;CertServer;
diff --git a/pki/base/ocsp/setup/CMakeLists.txt b/pki/base/ocsp/setup/CMakeLists.txt
index 25ea20f..f5f069c 100644
--- a/pki/base/ocsp/setup/CMakeLists.txt
+++ b/pki/base/ocsp/setup/CMakeLists.txt
@@ -1,10 +1,7 @@
 set(VERSION ${APPLICATION_VERSION})
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/config.desktop @ONLY)
-
 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/setup/config.desktop.in b/pki/base/ocsp/setup/config.desktop.in
deleted file mode 100644
index be5f5cf..0000000
--- a/pki/base/ocsp/setup/config.desktop.in
+++ /dev/null
@@ -1,31 +0,0 @@
-# --- BEGIN COPYRIGHT BLOCK ---
-# 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.
-#
-# Copyright (C) 2007 Red Hat, Inc.
-# All rights reserved.
-# --- END COPYRIGHT BLOCK ---
-#
-[Desktop Entry]
-Version=@VERSION@
-Encoding=UTF-8
-Name=Online Certificate Status Protocol Manager Configuration - [PKI_INSTANCE_ID]
-GenericName=Online Certificate Status Protocol Manager Configuration
-Comment=Configure Online Certificate Status Protocol Manager
-Exec=firefox https://[PKI_MACHINE_NAME]:[PKI_SECURE_PORT]/ocsp/admin/console/config/login?pin=[PKI_RANDOM_NUMBER]
-Icon=firefox.png
-Terminal=false
-Type=Application
-MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;
-X-Desktop-File-Install-Version=0.9
-Categories=Application;CertServer;
diff --git a/pki/base/ra/setup/CMakeLists.txt b/pki/base/ra/setup/CMakeLists.txt
index 25ea20f..f5f069c 100644
--- a/pki/base/ra/setup/CMakeLists.txt
+++ b/pki/base/ra/setup/CMakeLists.txt
@@ -1,10 +1,7 @@
 set(VERSION ${APPLICATION_VERSION})
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/config.desktop @ONLY)
-
 install(
     FILES
-        ${CMAKE_CURRENT_BINARY_DIR}/config.desktop
         registry_instance
     DESTINATION
         ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/setup
diff --git a/pki/base/ra/setup/config.desktop.in b/pki/base/ra/setup/config.desktop.in
deleted file mode 100644
index 241f89b..0000000
--- a/pki/base/ra/setup/config.desktop.in
+++ /dev/null
@@ -1,31 +0,0 @@
-# --- BEGIN COPYRIGHT BLOCK ---
-# 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.
-#
-# Copyright (C) 2007 Red Hat, Inc.
-# All rights reserved.
-# --- END COPYRIGHT BLOCK ---
-#
-[Desktop Entry]
-Version=@VERSION@
-Encoding=UTF-8
-Name=Registration Authority Configuration - [PKI_INSTANCE_ID]
-GenericName=Registration Authority Configuration
-Comment=Configure Registration Authority
-Exec=firefox https://[SERVER_NAME]:[SECURE_PORT]/ra/admin/console/config/login?pin=[PKI_RANDOM_NUMBER]
-Icon=firefox.png
-Terminal=false
-Type=Application
-MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;
-X-Desktop-File-Install-Version=0.9
-Categories=Application;CertServer;
diff --git a/pki/base/setup/pkicreate b/pki/base/setup/pkicreate
index e8e1b12..edde86e 100755
--- a/pki/base/setup/pkicreate
+++ b/pki/base/setup/pkicreate
@@ -581,10 +581,6 @@ my $random      = undef;
 # Linux specific variables
 my $setup_base_subsystem_dir         = "setup";
 my $setup_subsystem_path             = undef;
-my $setup_config_instance_file_path  = undef;
-my $setup_config_subsystem_file_path = undef;
-my $setup_config_area                = undef;
-my $setup_config_name                = undef;
 my $tomcat6_initscript_path          = undef;
 my $tomcat6_instance_config_path     = undef;
 my $root_user                        = undef;
@@ -603,10 +599,6 @@ my $pki_instance_systemd_service_name  = undef;
 ##############################################################
 
 if ($^O eq "linux") {
-    # Linux required desktop files
-    $setup_config_area = "/usr/share/applications";
-    $setup_config_name = "config.desktop";
-
     if (is_Fedora() && (fedora_release() >= 16)) {
         $use_systemd = 1;
     }
@@ -1630,11 +1622,6 @@ sub initialize_subdirectory_paths
     ## Initialize subdirectory paths (subsystem independent)
     $pki_cfg_subsystem_file_path      = $conf_subsystem_path
                                       . "/" . $pki_cfg_base_name;
-    $setup_config_instance_file_path  = $setup_config_area
-                                      . "/" . $pki_instance_name
-                                      . "-" . $setup_config_name;
-    $setup_config_subsystem_file_path = $setup_subsystem_path
-                                      . "/" . $setup_config_name;
     $pki_piddir_path                  = $default_apache_pids_path
                                       . "/" . $subsystem_type;
 
@@ -2639,15 +2626,6 @@ LoadModule nss_module  /opt/fortitude/modules.local/libmodnss.so
     return 0 if !set_file_props($pki_cfg_instance_file_path,
                                 $default_file_permissions, $pki_user, $pki_group);
 
-    if ($^O eq "linux") {
-        # process "config.desktop" template
-        return 0 if !process_file_template("setup_config",
-                                           $setup_config_subsystem_file_path,
-                                           $setup_config_instance_file_path,
-                                           \%slot_hash);
-        }
-
-
     ## Process registry instance template
     return 0 if !process_file_template("pki_registry_template",
                                        $pki_registry_subsystem_file_path,
diff --git a/pki/base/tks/setup/CMakeLists.txt b/pki/base/tks/setup/CMakeLists.txt
index 25ea20f..f5f069c 100644
--- a/pki/base/tks/setup/CMakeLists.txt
+++ b/pki/base/tks/setup/CMakeLists.txt
@@ -1,10 +1,7 @@
 set(VERSION ${APPLICATION_VERSION})
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/config.desktop @ONLY)
-
 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/setup/config.desktop.in b/pki/base/tks/setup/config.desktop.in
deleted file mode 100644
index d056dad..0000000
--- a/pki/base/tks/setup/config.desktop.in
+++ /dev/null
@@ -1,31 +0,0 @@
-# --- BEGIN COPYRIGHT BLOCK ---
-# 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.
-#
-# Copyright (C) 2007 Red Hat, Inc.
-# All rights reserved.
-# --- END COPYRIGHT BLOCK ---
-#
-[Desktop Entry]
-Version=@VERSION@
-Encoding=UTF-8
-Name=Token Key Service Configuration - [PKI_INSTANCE_ID]
-GenericName=Token Key Service Configuration
-Comment=Configure Token Key Service
-Exec=firefox https://[PKI_MACHINE_NAME]:[PKI_SECURE_PORT]/tks/admin/console/config/login?pin=[PKI_RANDOM_NUMBER]
-Icon=firefox.png
-Terminal=false
-Type=Application
-MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;
-X-Desktop-File-Install-Version=0.9
-Categories=Application;CertServer;
diff --git a/pki/base/tps/setup/CMakeLists.txt b/pki/base/tps/setup/CMakeLists.txt
index 25ea20f..f5f069c 100644
--- a/pki/base/tps/setup/CMakeLists.txt
+++ b/pki/base/tps/setup/CMakeLists.txt
@@ -1,10 +1,7 @@
 set(VERSION ${APPLICATION_VERSION})
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/config.desktop @ONLY)
-
 install(
     FILES
-        ${CMAKE_CURRENT_BINARY_DIR}/config.desktop
         registry_instance
     DESTINATION
         ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/setup
diff --git a/pki/base/tps/setup/config.desktop.in b/pki/base/tps/setup/config.desktop.in
deleted file mode 100644
index 9ce641b..0000000
--- a/pki/base/tps/setup/config.desktop.in
+++ /dev/null
@@ -1,33 +0,0 @@
-# --- BEGIN COPYRIGHT BLOCK ---
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation;
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor,
-# Boston, MA  02110-1301  USA
-#
-# Copyright (C) 2007 Red Hat, Inc.
-# All rights reserved.
-# --- END COPYRIGHT BLOCK ---
-#
-[Desktop Entry]
-Version=@VERSION@
-Encoding=UTF-8
-Name=Token Processing System Configuration - [PKI_INSTANCE_ID]
-GenericName=Token Processing System Configuration
-Comment=Configure Token Processing System
-Exec=firefox https://[SERVER_NAME]:[SECURE_PORT]/tps/admin/console/config/login?pin=[PKI_RANDOM_NUMBER]
-Icon=firefox.png
-Terminal=false
-Type=Application
-MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;
-X-Desktop-File-Install-Version=0.9
-Categories=Application;CertServer;
-- 
1.7.7.6

