-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Description
The --devel feature checks for updates by running pkgver and comparing the new version to the currently installed version. This is done via makepkg -odc --noprepare --skipinteg. Then parsing makepkg --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.
morganamilo@Octavia ~ % aurman -Su --do_everything --devel
~~ initializing aurman...
~~ the following packages are neither in known repos nor in the aur
:: saur-git-r81.8759745-1
~~ looking for new pkgbuilds of devel packages and fetching them...
>>>> makepkg -odc --noprepare --skipinteg
==> Making package: aurman-git 2.17.2.r0.gd857951-1 (Mon 13 Aug 2018 01:37:35 BST)
==> WARNING: Skipping dependency checks.
==> Retrieving sources...
-> Updating aurman_sources git repo...
Fetching origin
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
-> Creating working copy of aurman_sources git repo...
Cloning into 'aurman_sources'...
done.
Switched to a new branch 'makepkg'
==> Starting pkgver()...
==> Sources are ready.
==> Cleaning up...
>>>> makepkg --printsrcinfo
>>>> makepkg -odc --noprepare --skipinteg
==> Making package: aurutils-git 1.5.3.r761.g8fe42a3-1 (Mon 13 Aug 2018 01:37:37 BST)
==> WARNING: Skipping dependency checks.
==> Retrieving sources...
-> Updating aurutils git repo...
Fetching origin
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
-> Creating working copy of aurutils git repo...
Cloning into 'aurutils'...
done.
==> Starting pkgver()...
==> Sources are ready.
==> Cleaning up...
>>>> makepkg --printsrcinfo
>>>> makepkg -odc --noprepare --skipinteg
==> Making package: chromium-widevine 1:4.10.1146.0-3 (Mon 13 Aug 2018 01:37:38 BST)
==> WARNING: Skipping dependency checks.
==> Retrieving sources...
-> Found chrome-eula_text-20180809.html
-> Found google-chrome-stable_68.0.3440.106-1_amd64.deb
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
-> Extracting google-chrome-stable_68.0.3440.106-1_amd64.deb with bsdtar
==> Starting pkgver()...
awk: fatal: cannot open file `libwidevinecdm.so' for reading (No such file or directory)
==> ERROR: pkgver is not allowed to be empty.
==> ERROR: pkgver() generated an invalid version:
2018-08-13 01:37:39,126 - wrappers - makepkg - ERROR - makepkg query ['makepkg', '-odc', '--noprepare', '--skipinteg'] failed in directory /home/morganamilo/.cache/aurman/chromium-widevine
2018-08-13 01:37:39,126 - main - main - ERROR -
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/aurman/main.py", line 1245, in main
process(argv[1:])
File "/usr/lib/python3.7/site-packages/aurman/main.py", line 965, in process
package.get_devel_version(ignore_arch)
File "/usr/lib/python3.7/site-packages/aurman/classes.py", line 1179, in get_devel_version
makepkg(["-odc", "--noprepare", "--skipinteg"], False, package_dir)
File "/usr/lib/python3.7/site-packages/aurman/wrappers.py", line 137, in makepkg
raise InvalidInput("makepkg query {} failed in directory {}".format(makepkg_query, dir_to_execute))
aurman.own_exceptions.InvalidInput: makepkg query ['makepkg', '-odc', '--noprepare', '--skipinteg'] failed in directory /home/morganamilo/.cache/aurman/chromium-widevine
Read the README
Yep
Running linux distribution
Arch