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

[Bug]: Missed detection of bad ebuild syntax (URL in global scope) #725

Open
1 task done
thesamesam opened this issue Jan 16, 2025 · 2 comments
Open
1 task done
Labels

Comments

@thesamesam
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

$ git rev-parse HEAD
54fd3650e550eee4bcdbb6b3683c1e2fa326b859

$ pkgcheck scan
gentoo -- updating git cache: commit date: 2025-01-16
app-containers/lxc-templates
  VariableOrderWrong: version 3.0.4: variable LICENSE should occur before KEYWORDS
  VariableOrderWrong: version 3.0.4_p20240917: variable LICENSE should occur before KEYWORDS
  VariableOrderWrong: version 3.0.4_p20240917: variable S should occur before SLOT

The ebuild has a top-level URL ("https://..."):

[...]
MY_COMMIT="da14466ce09afa3b39adb2b324be20084b776eb7"
https://github.com/lxc/lxc-templates/archive/da14466ce09afa3b39adb2b324be20084b776eb7.zip
DESCRIPTION="Old style template scripts for LXC"
HOMEPAGE="https://linuxcontainers.org/ https://github.com/lxc/lxc-templates"
SRC_URI="https://github.com/lxc/lxc-templates/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"

When running ebuild ... clean install, I see:

 * lxc-templates-3.0.4_p20240917.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                                                [ ok ]
/home/sam/git/gentoo/app-containers/lxc-templates/lxc-templates-3.0.4_p20240917.ebuild: line 9: https://github.com/lxc/lxc-templates/archive/da14466ce09afa3b39adb2b324be20084b776eb7.zip: No such file or directory
/home/sam/git/gentoo/app-containers/lxc-templates/lxc-templates-3.0.4_p20240917.ebuild: line 9: https://github.com/lxc/lxc-templates/archive/da14466ce09afa3b39adb2b324be20084b776eb7.zip: No such file or directory
>>> Unpacking source...
 * The following distfiles lack detached signatures:
 *   lxc-templates-3.0.4_p20240917.tar.gz
 * ERROR: app-containers/lxc-templates-3.0.4_p20240917::gentoo failed (unpack phase):
 *   Unsigned distfiles found

Expected Behavior

pkgcheck to detect it somehow (it's not quite a SourcingError though...)

pkgcheck version

pkgcheck 0.10.33

pkgcore version

pkgcore 0.12.28

@thesamesam thesamesam added the bug label Jan 16, 2025
@thesamesam
Copy link
Member Author

Reminds me a bit of #481 but the cause is quite different there (see mgorny's analysis).

@leio
Copy link

leio commented Jan 16, 2025

pkgcraft catches this as follows:

ERROR invalid pkg: app-containers/lxc-templates-3.0.4_p20240917::/home/leio/gentoo/gentoo: line 9: https://github.com/lxc/lxc-templates/archive/da14466ce09afa3b39adb2b324be20084b776eb7.zip: restricted: cannot specify `/' in command names

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants