Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use postgres extensions dblink and pgcrypto #9367

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions schema/reportdb/postgres/start.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@
-- in this software or its documentation.
--

create extension dblink;

-- This file is currently intentionally left blank.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP EXTENSION IF EXISTS dblink;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Do not use postgres extension dblink
2 changes: 1 addition & 1 deletion schema/sm-specific-schema-patches/scopy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function find_source () {
local db=""

local imp_packages=(rhn_entitlements.pkb rhn_channel.pks rhn_channel.pkb rhn_server.pkb)
local imp_procs=(pg_dblink_exec create_first_org create_new_org)
local imp_procs=(create_first_org create_new_org)

if [[ "$s" == *oracle ]]; then
db="oracle"
Comment on lines 32 to 33
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we kick those 2 lines out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whole schema/sm-specific-schema-patches seems to be obsolete and can be dropped, IMHO. It has not been touched since 2018. But that is for another PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this was needed when spacewalk had incompatible changes compared to SUMA and we had to copy them again and again over. We can remove this

Expand Down

This file was deleted.

35 changes: 0 additions & 35 deletions schema/spacewalk/postgres/procs/pg_dblink_exec.sql

This file was deleted.

37 changes: 15 additions & 22 deletions schema/spacewalk/postgres/procs/procs.deps
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ create_new_org :: web_customer rhnUserGroupType rhnUserGroup
create_new_user :: web_contact web_user_contact_permission \
web_user_personal_info web_user_site_info \
rhnUserInfo
create_pxt_session :: pg_dblink_exec \
PXTSessions
create_pxt_session :: PXTSessions
delete_server :: rhn_channel.pks rhn_config.pks \
rhn_config.pks rhn_server.pks rhn_entitlements.pks \
rhn_server.pks \
Expand Down Expand Up @@ -58,13 +57,11 @@ does_user_have_role :: rhnUserGroup rhnUserGroupMembers rhnUserGroup
lookup_arch_type :: data/rhnArchType rhn_exception.pks
lookup_channel_arch :: rhn_exception.pks data/rhnException rhnChannelArch \
data/rhnChannelArch
lookup_client_capability :: rhnClientCapabilityName pg_dblink_exec
lookup_client_capability :: rhnClientCapabilityName
lookup_cf_state :: rhnConfigFileState
lookup_config_filename :: pg_dblink_exec
lookup_config_info :: pg_dblink_exec
lookup_cve :: rhnCVE pg_dblink_exec
lookup_cve :: rhnCVE
lookup_erratafile_type :: rhnErrataFileType data/rhnErrataFileType
lookup_evr :: rhnPackageEVR pg_dblink_exec
lookup_evr :: rhnPackageEVR
lookup_feature_type :: rhnFeature
lookup_first_matching_cf :: rhnConfigFile rhnConfigChannel \
rhnServerConfigChannel lookup_cf_state \
Expand All @@ -78,34 +75,30 @@ lookup_functions :: lookup_evr lookup_package_name \
lookup_snapshot_invalid_reason \
lookup_tag_name lookup_sg_type \
lookup_tag lookup_arch_type
lookup_checksum :: pg_dblink_exec
lookup_md_keyword :: pg_dblink_exec suseMdKeyword
lookup_md_keyword :: suseMdKeyword
lookup_package_arch :: rhn_exception.pks data/rhnException rhnPackageArch \
data/rhnPackageArch
lookup_package_capability :: rhnPackageCapability
lookup_package_delta :: rhnPackageDelta
lookup_package_name :: rhnPackageName pg_dblink_exec
lookup_package_name :: rhnPackageName
lookup_package_provider :: rhnPackageProvider
lookup_package_key_type :: rhnPackageKeyType
lookup_package_nevra :: rhnPackageNEVRA pg_dblink_exec
lookup_package_group :: rhnPackageGroup pg_dblink_exec
lookup_package_nevra :: rhnPackageNEVRA
lookup_package_group :: rhnPackageGroup
lookup_server_arch :: rhn_exception.pks data/rhnException rhnServerArch \
data/rhnServerArch
lookup_sg_type :: rhnServerGroupType
lookup_snapshot_invalid_reason :: rhnSnapshotInvalidReason
lookup_source_name :: rhnSourceRPM pg_dblink_exec
lookup_tag :: rhnTag lookup_tag_name pg_dblink_exec
lookup_tag_name :: rhnTagName pg_dblink_exec
lookup_source_name :: rhnSourceRPM
lookup_tag :: rhnTag lookup_tag_name
lookup_tag_name :: rhnTagName
lookup_transaction_package :: rhnTransactionOperation lookup_package_name \
lookup_evr lookup_package_arch \
rhnTransactionPackage rhn_exception.pks \
pg_dblink_exec
lookup_xccdf_benchmark :: rhnXccdfBenchmark pg_dblink_exec
rhnTransactionPackage rhn_exception.pks
lookup_xccdf_benchmark :: rhnXccdfBenchmark
lookup_xccdf_ident :: rhnXccdfIdentSystem \
rhnXccdfIdent \
pg_dblink_exec
lookup_xccdf_profile :: rhnXccdfProfile \
pg_dblink_exec
rhnXccdfIdent
lookup_xccdf_profile :: rhnXccdfProfile
queue_server :: rhnTaskQueue rhnServer \
rhn_server.update_needed_cache
queue_image :: rhnTaskQueue suseImageInfo \
Expand Down
3 changes: 1 addition & 2 deletions schema/spacewalk/postgres/start.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@
-- in this software or its documentation.
--

create extension dblink;
CREATE EXTENSION pgcrypto;
rjmateus marked this conversation as resolved.
Show resolved Hide resolved
-- This file is currently intentionally left blank.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Do not use postgres extensions dblink and pgcrypto
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DROP EXTENSION IF EXISTS dblink;
DROP EXTENSION IF EXISTS pgcrypto;
Loading