Codeberg/Community
54
325
Fork
You've already forked Community
12

Zips from Codeberg do not respect case sensitivity of folder names #1671

Open
opened 2024年10月13日 17:26:39 +02:00 by RainerBielefeld · 6 comments

I checked 2 Plugin .zip and .tar

for Plugins Calendar and SubtaskDescription Here I will tell my experience with Calendar; was all the same for SubtaskDescription

  1. download .zip or .tar from Repository using ˋWeitere Optionen → ZIP herunterladenˊ
  2. Unzip
    » Result contains folder calendar
  3. Compare folder names with your KANBOARD installation in Folder plugins,
    » Surprise: The folder name in Installation is Calendar
    That means that the Plugin folder names in the download.zip do not respect case sensitivity of Plugin Folder names 😥

I did some additional research

a) For Comparison I downloaded the linked .zip which I reach from KANBOARD installation's Plugin Controller.
I did my test with Calendar Plugin. The Hyperlink behind "Install" is

http://<MyInstallation>/?controller=PluginController&action=install&archive_url=https%253A%252F%252Fcodeberg.org%252Fapi%252Fpackages%252Fabu%252Fgeneric%252FCalendar%252F1.5.0%252FCalendar-1.5.0.zip&csrf_token=5397e25423aceb67e2fb2c39c4f12afa14f317e8351fcf275b3c9390127ffb01

I extracted the link to the file in Repository:

https://codeberg.org/api/packages/abu/generic/calendar/1.5.0/calendar-1.5.0.zip/

Click on that link starts download of a file Calendar-1.5.0.zip
I unzipped that file and found the correct Plugin folder file name Calendar 👍

b) And now I see the hint on the Repository page:

Good Grief! How can someone who downloaded the plugin know the Case of the folder names? If the installation .zip does it right it should not be too difficult to do that right also for the download .zip

c) I also tried a KANBOARD plugin on github: MarkdownPlus:

  1. Visit Releases Repository
  2. download MarkdownPlus-1.1.5.zip
  3. Unzip (to "MarkdownPlus-1.1.5"!)
  4. Check folders below "MarkdownPlus-1.1.5"
    » Contains Plugin Folder with correct name MarkdownPlus – respecting Case Sensivity.

Looks like a Codeberg Bug.

Libelle/Libelle might also suffer from that problem / bug.

## I checked 2 Plugin .zip and .tar for Plugins _[Calendar](https://codeberg.org/abu/Calendar/)_ and _[SubtaskDescription](https://codeberg.org/abu/SubtaskDescription)_ Here I will tell my experience with _Calendar_; was all the same for SubtaskDescription 1. download .zip or .tar from [Repository](https://codeberg.org/abu/Calendar/) using ˋWeitere Optionen → ZIP herunterladenˊ 2. Unzip » Result contains folder _calendar_ 3. Compare folder names with your KANBOARD installation in Folder _plugins_, » **Surprise**: The folder name in Installation is _**C**alendar_ That means that the Plugin folder names in the download.zip do not respect case sensitivity of Plugin Folder names 😥 ## I did some additional research a) For Comparison I downloaded the linked .zip which I reach from KANBOARD installation's Plugin Controller. I did my test with Calendar Plugin. The Hyperlink behind "Install" is ``` http://<MyInstallation>/?controller=PluginController&action=install&archive_url=https%253A%252F%252Fcodeberg.org%252Fapi%252Fpackages%252Fabu%252Fgeneric%252FCalendar%252F1.5.0%252FCalendar-1.5.0.zip&csrf_token=5397e25423aceb67e2fb2c39c4f12afa14f317e8351fcf275b3c9390127ffb01 ``` I extracted the link to the file in Repository: ``` https://codeberg.org/api/packages/abu/generic/calendar/1.5.0/calendar-1.5.0.zip/ ``` Click on [that link](https://codeberg.org/api/packages/abu/generic/calendar/1.5.0/calendar-1.5.0.zip/) starts download of a file _Calendar-1.5.0.zip_ I unzipped that file and found the correct Plugin folder file name _**C**alendar_ 👍 b) And now I see the hint on the Repository page: ![](https://imgur.com/21e8fNz.png!) Good Grief! How can someone who downloaded the plugin know the Case of the folder names? If the installation .zip does it right it should not be too difficult to do that right also for the download .zip c) I also tried a KANBOARD plugin on github: [MarkdownPlus](https://github.com/creecros/MarkdownPlus/releases): 1. Visit [Releases Repository](https://github.com/creecros/MarkdownPlus/releases) 2. download _[MarkdownPlus-1.1.5.zip](https://github.com/creecros/MarkdownPlus/releases/download/1.1.5/MarkdownPlus-1.1.5.zip)_ 3. Unzip (to "MarkdownPlus-1.1.5"!) 4. Check folders below "MarkdownPlus-1.1.5" » Contains Plugin Folder with correct name MarkdownPlus – respecting Case Sensivity. ## **Looks like a Codeberg Bug.** _[Libelle/Libelle](https://codeberg.org/Libelle/Libelle)_ might also suffer from that problem / bug.

Hm!

Hm!

No survivors here?

No survivors here?

I think this is a more general problem. It seems the folder contained in the archive downloads that should be the repository name is always converted to lowercase. This is quite unexpected! I had assumed it would retain the exact same case as the canonical repository name, including the exact casing...

Example: download https://codeberg.org/Codeberg/Documentation/archive/main.tar.gz and notice then when you extract it, it is extracted in documentation folder, and NOT the expected Documentation folder.

I think this is a more general problem. It seems the folder contained in the archive downloads that should be the repository name is always converted to lowercase. This is quite unexpected! I had assumed it would retain the exact same case as the canonical repository name, *including* the exact casing... Example: download https://codeberg.org/Codeberg/Documentation/archive/main.tar.gz and notice then when you extract it, it is extracted in `documentation` folder, and NOT the expected `Documentation` folder.

I briefly discussed this, we are quite hesitant on making changes to how archives are generated, such changes breaks checksums and scripts. We could could add a new condition that every repository that was created after a specific date gets the capitalized naming, but that will not fix it for repositories that already have been created.

I briefly discussed this, we are quite hesitant on making changes to how archives are generated, such changes breaks checksums and scripts. We could could add a new condition that every repository that was created after a specific date gets the capitalized naming, but that will not fix it for repositories that already have been created.

Yes, that makes sense. I triggered this when migrating from SourceHut. I quick checked: GitHub retains the capitalization in the archives, I thought this lower casing was perhaps a GitHub idiosyncrasy that Gitea/Forgejo simply copied.

It might also be strange to have repo A behave different from repo B on the same server and confuse people... A simpler approach might be to only fix this on completely new Forgejo installations and/or when explicitly requested in the repo settings for example, but that would add another toggle 😢

There's might not be good solutions here.

Yes, that makes sense. I triggered this when migrating from SourceHut. I quick checked: GitHub retains the capitalization in the archives, I thought this lower casing was perhaps a GitHub idiosyncrasy that Gitea/Forgejo simply copied. It might also be strange to have repo A behave different from repo B on the same server and confuse people... A simpler approach might be to only fix this on completely new Forgejo installations and/or when explicitly requested in the repo settings for example, but that would add another toggle 😢 There's might not be good solutions here.

Related issue over at forgejo/forgejo#800

Related issue over at forgejo/forgejo#800
Sign in to join this conversation.
No Branch/Tag specified
main
No results found.
Labels
Clear labels
accessibility

Reduces accessibility and is thus a "bug" for certain user groups on Codeberg.
bug

Something is not working the way it should. Does not concern outages.
bug
infrastructure

Errors evidently caused by infrastructure malfunctions or outages
Codeberg

This issue involves Codeberg's downstream modifications and settings and/or Codeberg's structures.
contributions welcome

Please join the discussion and consider contributing a PR!
docs

No bug, but an improvement to the docs or UI description will help
duplicate

This issue or pull request already exists
enhancement

New feature
infrastructure

Involves changes to the server setups, use `bug/infrastructure` for infrastructure-related user errors.
legal

An issue directly involving legal compliance
licence / ToS

involving questions about the ToS, especially licencing compliance
please chill
we are volunteers

Please consider editing your posts and remember that there is a human on the other side. We get that you are frustrated, but it's harder for us to help you this way.
public relations

Things related to Codeberg's external communication
question

More information is needed
question
user support

This issue contains a clearly stated problem. However, it is not clear whether we have to fix anything on Codeberg's end, but we're helping them fix it and/or find the cause.
s/Forgejo

Related to Forgejo. Please also check Forgejo's issue tracker.
s/Forgejo/migration

Migration related issues in Forgejo
s/Pages

Issues related to the Codeberg Pages feature
s/Weblate

Issue is related to the Weblate instance at https://translate.codeberg.org
s/Woodpecker

Woodpecker CI related issue
security

involves improvements to the sites security
service

Add a new service to the Codeberg ecosystem (instead of implementing into Gitea)
upstream

An open issue or pull request to an upstream repository to fix this issue (partially or completely) exists (i.e. Gitea, Forgejo, etc.)
wontfix

Codeberg's current set of contributors are not planning to spend time on delegating this issue.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg/Community#1671
Reference in a new issue
Codeberg/Community
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?