-
Notifications
You must be signed in to change notification settings - Fork 35
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
--devel should not skip prepare and dependencies #245
Comments
That shouldn't be a problem though, since --skipinteg is only used to generate a new devel version, but the package should still be built afresh later, and do full integrity checks. This is only used for the internal, hidden preprocessing which does not need to check integrity. I'd say --noprepare should still be avoided though as it is possible -- and permitted -- for the |
True that they will be verified during during the build proper. But prepare is just a bash function so in theory anything could be in there. For example if the upstream code was compromised and Better safe than sorry I think. The only downside to not having |
I guess |
see: 2.17.2...5904421 |
Excluding those packages is not a good idea, it is possible that one still needs to know the exact current version, not only, that there is a newer version. Think about the following: |
Ah didn't realise aurman did that. I thought it was rpc only. Anyway 2/3 points fixed ain't too bad, thanks. |
That's the only exception, because it really is needed to implement fetching of current versions for development packages, in order to provide a non-useless AUR helper. |
Can anyone think of a sensible solution for the not yet fulfilled point out of those three? The case, that one executes e.g. |
Here I try to instil an -svn package without snv installed. Pkgver fails but it continues on. This ends up generating a different pkgver to what it should. |
Interesting... But what could I do about this, if |
Don't pass -d. Let makepkg bail out due to missing deps and have your new warning tell the user to install the deps themselves? |
In that case it comes down to installing all dependencies again :( Otherwise |
Eh well. You could just wait for somebody to actually have this problem. I just wanted to show it's possible, but who knows how rare it is for this to happen. |
I have an idea, on how to implement this in a way I'd be fine with. You should also be fine with it, because it fulfills the point you criticized. Will let you know here, when I have done it |
see: 2f2e93c |
The all in all changes are as of now: 2.17.2...1a1b26d What do you think, @Morganamilo ? |
If I were to handle this (which I wouldn't, since imo this problematic is the user's problem), I'd simply install VCS clients with --asdeps and potentially remove them again after. You can get the list from VCSAGENTS in libmakepkg, iirc. |
I think it looks good, not that I've had a change to actually run it though. @AladW VCS clients sre the most common case, but a pkgbuild does expect all its depends installed before prepare is ran. It is not just due to missing VCS clients that pkgver/prepare may fail. |
I guess the real issue is that makepkg considers errors in source/pkgver as non-fatal.
|
Yeah, that really is weird. Maybe @eli-schwartz knows more about this? If the user does not specify |
Fixed: https://lists.archlinux.org/pipermail/pacman-dev/2018-August/022765.html |
Description
The
--devel
feature checks for updates by running pkgver and comparing the new version to the currently installed version. This is done viamakepkg -odc --noprepare --skipinteg
. Then parsingmakepkg --printsrcinfo
The problem here is that pkgver expects that prepare has been run and all deps have been installed. You can't exactly run
git describe
without the git dependency installed.The dependency issue is not that big of a deal as --devel works with already installed packages, although a new pkgbuild may gain new dependencies.
I also have problems with using --skipinteg. Checksums ensure the correct flles were downloaded and PGP keys are a security measure. When I read a pkgbuild and see these keys, it gives me trust that the sources it downloads truly come from the upstream developers. With these disabled it is possible, that if upstream were compromised, using --devel would lead to untrusted code being ran.
It is true that this attack vector is small and practically impossible to pull off (most devel packages use SKIP even). But I would prefer it if aurman did not pass --skipinteg unless I explicitly say so.
Expected Behavior
I think I explained above but I just noticed "behavior" is typo'd here ;)
Possible Solution
Use
makepkg -oc
Although then you would have to handle any new dependencies that a pkgbuild gains. And I can see how doing this so early could be quite annoying.
Although if a pkgbuild changes then so should the pkgver. So perhaps you could exclude any packages that have a higher pkgver from the --devel check. This would actually speed things up too, since you're checking less packages. These skipped packages would then get pulled in by the normal update checker.
Version of aurman you are using
2.17.2.r0.gd857951-1
Steps to Reproduce
For an example of the --noprepare issue there is
chromium-widevine
. This is not a devel package but it is one of the few out there that will fail the pkgver is prepare has not been run. I added it to[devel_packages]
as I can't think of any actual devel packages right now.Read the README
Yep
Running linux distribution
Arch
The text was updated successfully, but these errors were encountered: