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

Tarbomb in release src tarball file #19066

Closed
eleksir opened this issue Mar 12, 2022 · 5 comments · Fixed by #19396
Closed

Tarbomb in release src tarball file #19066

eleksir opened this issue Mar 12, 2022 · 5 comments · Fixed by #19396
Labels
good first issue Likely to be an easy fix hacktoberfest issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/distribution This PR changes something about the packaging of Gitea

Comments

@eleksir
Copy link

eleksir commented Mar 12, 2022

Gitea Version

1.16.3

Git Version

N/A

Operating System

N/A

How are you running Gitea?

tar xf gitea-src-1.16.3.tar.gz

Database

No response

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

N/A

Description

Gitea official src, gitea-src-1.16.3.tar.gz, (from releases page at github, particulary at release of 1.16.3) contains tarbomb. Such behavior is considered bad etiquette on the part of the archive's creator.

Expected behavior is (after untarring) to find this pile of files in subdir named gitea-src-1.16.3 or even better in subdir named gitea-1.16.3.

Screenshots

N/A

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf
Copy link
Contributor

fair point, IMO, this shouldn't be hard to fix.
what I usually tend to do anyway is automaticaly create a folder for pretty much any archive I am untarring, then use tar with -C newfolder. those times I forget to prepare a folder hurt, though.

@lunny
Copy link
Member

lunny commented Mar 14, 2022

That's generated by Github I think, maybe you should submit an issue to them?

@eleksir
Copy link
Author

eleksir commented Mar 15, 2022

twpayne/chezmoi#1576

absolutely same thing but it was resolved without Github intervention.

@techknowlogick
Copy link
Member

gitea-src-1.16.3.tar.gz (and similar) is a custom tar that we create in the make-release step of CI, so it would need to be updated in our CI.

@techknowlogick techknowlogick added topic/distribution This PR changes something about the packaging of Gitea issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented labels Mar 15, 2022
@zeripath
Copy link
Contributor

zeripath commented Mar 16, 2022

We'd need to use --transform or --xform option in the tar within the release-sources target in the Makefile here:

gitea/Makefile

Line 648 in ed1d95c

tar $(addprefix $(EXCL),$(TAR_EXCLUDES)) -czf $(DIST)/release/gitea-src-$(VERSION).tar.gz .

@eleksir would you like to test and propose a PR?


documentation for the tar command and the --transform option can be found here:

https://www.gnu.org/software/tar/manual/html_section/transform.html

wxiaoguang pushed a commit that referenced this issue Apr 25, 2022
Use a directory prefix instead on creating the tar file. Fixes: #19066
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this issue Aug 24, 2022
…tea#19396)

Use a directory prefix instead on creating the tar file. Fixes: go-gitea#19066
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Likely to be an easy fix hacktoberfest issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/distribution This PR changes something about the packaging of Gitea
Projects
None yet
5 participants