Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

[FEATURE]: Install PKGBUILD's from local paths #87

Open
fries1234 opened this issue Oct 4, 2022 · 21 comments
Open

[FEATURE]: Install PKGBUILD's from local paths #87

fries1234 opened this issue Oct 4, 2022 · 21 comments

Comments

@fries1234
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Like if you have a local copy of a PKGBUILD, you could use Amethyst to install them. Thinking about how to implement something like this, maybe we could uh copy the files to a cache folder or something?

Describe the solution you'd like

Something like ame ins --path . (like cargo install --path).

Describe alternatives you've considered

I don't really know any alternate solutions of how you could implement this into amethyst. I guess you could use makepkg -si.

Additional context

No response

@fries1234
Copy link
Contributor Author

@mrshmllow what do you think?

@SomethingGeneric
Copy link
Member

This similar to #73 and I totally agree with the need for both c:

@axtloss
Copy link
Member

axtloss commented Oct 4, 2022

I don't see why this should be implemented into amethyst when the user could just run makepkg

@mrshmllow
Copy link
Contributor

they have differing behaviours from my experimenting last night

@axtloss
Copy link
Member

axtloss commented Oct 4, 2022

then that's a bug that should be reported, not a new feature

@Trivernis
Copy link
Member

The advantage would be that ame is also able to handle aur dependencies while makepkg is not

@fries1234
Copy link
Contributor Author

yeah that would be an advantage

@axtloss
Copy link
Member

axtloss commented Oct 4, 2022

The advantage would be that ame is also able to handle aur dependencies while makepkg is not

that's true, although how many would actually use that feature? it may not be worth the effort to implement and maintain it

@fries1234
Copy link
Contributor Author

im pretty sure some people might use it. ngl i prob would use it as resolving dependencies for local aur packages can be annoying af.

@axtloss
Copy link
Member

axtloss commented Oct 4, 2022

But why have locally cloned aur packages when you can just use amethyst to directly install it? amethyst is an aur helper, not a makepkg replacement

@fries1234
Copy link
Contributor Author

well there could be pkgbuilds that arent published to the aur or that are out of date on the aur

@axtloss
Copy link
Member

axtloss commented Oct 4, 2022

well that's that that makepkg is for

@fries1234
Copy link
Contributor Author

but it doesnt install aur deps. if your pkgbuild has aur deps, it will just tell you to install those manually.

@axtloss
Copy link
Member

axtloss commented Oct 4, 2022

is there any issues with manually installing dependencies?
I still don't believe that many would actually use the feature since it's very rare to find a pkgbuild that's not in the aur

@Trivernis
Copy link
Member

The thing is that this would be quite challenging to implement as we'd need to parse the PKGBUILD ourselves and I'm not sure if it would be worth the effort

@mrshmllow
Copy link
Contributor

it is hard to test how helpers would handle the pkgbuild

@axtloss
Copy link
Member

axtloss commented Oct 4, 2022

it is hard to test how helpers would handle the pkgbuild

why would it be needed to test how helpers handle pkgbuilds? they all would be handled the same way as makepkg. If an aur helper doesn't, then it's a bug that should be reported

@mrshmllow
Copy link
Contributor

that is how you find bugs

@SomethingGeneric
Copy link
Member

The thing is that this would be quite challenging to implement as we'd need to parse the PKGBUILD ourselves and I'm not sure if it would be worth the effort

What am I missing that prevents you from using the same approach as an AUR package? Aren't you still parsing the PKGBUILD to get dependencies normally?

And if you do the rewrite for this, then a git spec shouldn't be hard either.

@ihatethefrench
Copy link
Member

The thing is that this would be quite challenging to implement as we'd need to parse the PKGBUILD ourselves and I'm not sure if it would be worth the effort

What am I missing that prevents you from using the same approach as an AUR package? Aren't you still parsing the PKGBUILD to get dependencies normally?

And if you do the rewrite for this, then a git spec shouldn't be hard either.

We parse dependencies through the AUR's RPC, rather than the PKGBUILD directly, which is generally what is recommended as attempting to parse any depends directly by source-ing the PKGBUILD could allow for arbitrary code execution in the case of a malicious PKGBUILD

@SomethingGeneric
Copy link
Member

The thing is that this would be quite challenging to implement as we'd need to parse the PKGBUILD ourselves and I'm not sure if it would be worth the effort

What am I missing that prevents you from using the same approach as an AUR package? Aren't you still parsing the PKGBUILD to get dependencies normally?
And if you do the rewrite for this, then a git spec shouldn't be hard either.

We parse dependencies through the AUR's RPC, rather than the PKGBUILD directly, which is generally what is recommended as attempting to parse any depends directly by source-ing the PKGBUILD could allow for arbitrary code execution in the case of a malicious PKGBUILD

Perhaps then you could have an unsafe confirm flag? If it's a local path or git repo it's more likely the user looked over it, after

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

No branches or pull requests

7 participants
@SomethingGeneric @Trivernis @ihatethefrench @mrshmllow @axtloss @fries1234 and others