From 41a96519608b307fa73326b1254d3a2fb3c9e24f Mon Sep 17 00:00:00 2001 From: Thomas Schmidt Date: Mon, 26 Aug 2024 09:52:06 +0200 Subject: [PATCH 1/4] Revert "Revert "Use text instead of string as it can be very limiting for paths lenght"" --- db/migrate/20240821114908_change_local_path_type.rb | 13 +++++++++++++ db/schema.rb | 6 +++--- package/obs/rmt-server.changes | 1 + 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20240821114908_change_local_path_type.rb diff --git a/db/migrate/20240821114908_change_local_path_type.rb b/db/migrate/20240821114908_change_local_path_type.rb new file mode 100644 index 000000000..83e0789e9 --- /dev/null +++ b/db/migrate/20240821114908_change_local_path_type.rb @@ -0,0 +1,13 @@ +class ChangeLocalPathType < ActiveRecord::Migration[6.1] + def up + safety_assured do + change_column :repositories, :local_path, :text + change_column :downloaded_files, :local_path, :text + end + end + + def down + change_column :repositories, :local_path, :string + change_column :downloaded_files, :local_path, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 9607b8f9a..bf4ce342e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2024_07_29_103525) do +ActiveRecord::Schema.define(version: 2024_08_21_114908) do create_table "activations", charset: "utf8", force: :cascade do |t| t.bigint "service_id", null: false @@ -34,7 +34,7 @@ create_table "downloaded_files", charset: "utf8", force: :cascade do |t| t.string "checksum_type" t.string "checksum" - t.string "local_path" + t.text "local_path" t.bigint "file_size", unsigned: true t.index ["checksum_type", "checksum"], name: "index_downloaded_files_on_checksum_type_and_checksum" t.index ["local_path"], name: "index_downloaded_files_on_local_path", unique: true @@ -104,7 +104,7 @@ t.string "auth_token" t.boolean "installer_updates", default: false, null: false t.boolean "mirroring_enabled", default: false, null: false - t.string "local_path", null: false + t.text "local_path", null: false t.datetime "last_mirrored_at" t.string "friendly_id" t.index ["external_url"], name: "index_repositories_on_external_url", unique: true diff --git a/package/obs/rmt-server.changes b/package/obs/rmt-server.changes index febce557b..71ad51f29 100644 --- a/package/obs/rmt-server.changes +++ b/package/obs/rmt-server.changes @@ -3,6 +3,7 @@ Wed Aug 21 15:28:43 UTC 2024 - Jesús Bermúdez Velázquez - Version 2.19 * Fix for mirroring products that contain special characters (eg.: '$') in their path + * Fix for packages with path longer 255 characters (bsc#1229152) * rmt-server-pubcloud: * Support registration of extensions in BYOS mode on top of a PAYG system (hybrid mode) (jsc#PCT-400) * Validate repository and registy access for hybrid systems From bfc5a922930f09cd6c713b87fc9b64a9e81962d7 Mon Sep 17 00:00:00 2001 From: Adnilson Delgado Date: Fri, 20 Sep 2024 12:54:21 +0100 Subject: [PATCH 2/4] Use a limit of 512 --- db/migrate/20240821114908_change_local_path_type.rb | 4 ++-- db/schema.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/db/migrate/20240821114908_change_local_path_type.rb b/db/migrate/20240821114908_change_local_path_type.rb index 83e0789e9..5c2f53cce 100644 --- a/db/migrate/20240821114908_change_local_path_type.rb +++ b/db/migrate/20240821114908_change_local_path_type.rb @@ -1,8 +1,8 @@ class ChangeLocalPathType < ActiveRecord::Migration[6.1] def up safety_assured do - change_column :repositories, :local_path, :text - change_column :downloaded_files, :local_path, :text + change_column :repositories, :local_path, :string, limit: 512 + change_column :downloaded_files, :local_path, :string, limit: 512 end end diff --git a/db/schema.rb b/db/schema.rb index bf4ce342e..70a68e684 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -34,7 +34,7 @@ create_table "downloaded_files", charset: "utf8", force: :cascade do |t| t.string "checksum_type" t.string "checksum" - t.text "local_path" + t.text "local_path", limit: 512 t.bigint "file_size", unsigned: true t.index ["checksum_type", "checksum"], name: "index_downloaded_files_on_checksum_type_and_checksum" t.index ["local_path"], name: "index_downloaded_files_on_local_path", unique: true @@ -104,7 +104,7 @@ t.string "auth_token" t.boolean "installer_updates", default: false, null: false t.boolean "mirroring_enabled", default: false, null: false - t.text "local_path", null: false + t.text "local_path", limit: 512, null: false t.datetime "last_mirrored_at" t.string "friendly_id" t.index ["external_url"], name: "index_repositories_on_external_url", unique: true From 1af565ec6bc4ffe2d67a95eb44307b389756e402 Mon Sep 17 00:00:00 2001 From: Adnilson Delgado Date: Fri, 20 Sep 2024 12:54:21 +0100 Subject: [PATCH 3/4] Use a limit of 512 --- db/schema.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index 70a68e684..1584f1814 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -34,7 +34,7 @@ create_table "downloaded_files", charset: "utf8", force: :cascade do |t| t.string "checksum_type" t.string "checksum" - t.text "local_path", limit: 512 + t.string "local_path", limit: 512 t.bigint "file_size", unsigned: true t.index ["checksum_type", "checksum"], name: "index_downloaded_files_on_checksum_type_and_checksum" t.index ["local_path"], name: "index_downloaded_files_on_local_path", unique: true @@ -104,7 +104,7 @@ t.string "auth_token" t.boolean "installer_updates", default: false, null: false t.boolean "mirroring_enabled", default: false, null: false - t.text "local_path", limit: 512, null: false + t.string "local_path", limit: 512, null: false t.datetime "last_mirrored_at" t.string "friendly_id" t.index ["external_url"], name: "index_repositories_on_external_url", unique: true From 9a617a0754672bd57fb2f3ddd2658952de66ee3d Mon Sep 17 00:00:00 2001 From: Adnilson Delgado Date: Tue, 29 Oct 2024 19:41:27 +0000 Subject: [PATCH 4/4] Trigger Build