You are not logged in.
How to skip intigrity check when Installing an AUR package that requires source code from Github?
I want to edit makepkg.conf for disable intigrity check,but I don't know how,I tried commenting INTIGRITY_CHECK=(sha256) in makepkg.conf,but it did not work.
#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
INTEGRITY_CHECK=(sha256)Last edited by nurali (2022-11-16 02:40:06)
Offline
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I wan to do something to disable intigrity check for all AUR packages that requires sha256sum check for good....I thought about editing PKGBUILD too,but it is not the most effective solution.....
Use SKIP in the *sums array for the corresponding source in the PKGBUILD.
Offline
I want to do something to disable intigrity check for all AUR packages that requires sha256sum check
No, you don't.
Why do you think you want?
Online
And you expect people to help you do something dumb without explaining why you want to do it?
Offline
Here is the thing,this city,or I say this place I live,have a very unfriendly network environment,I can not reach to github direcly,so I used proxy,but download speed is too slow,anyway,it solved my AUR-installing problem,then someone told me about a new kind of proxy,I tried it,my download speed came to 30mb/s,but the proxy has a problem,It can change sha256sum of fetch file randomly,sometimes sha256 check passes,sometimes doesn't,if PKGBUID needs two files(for example:7z file and LICENSE),one of them can pass the check,one can not,so I want to disable intigrity check until developer fix that bug(bacause of local law,I can not use VPN)
I want to do something to disable intigrity check for all AUR packages that requires sha256sum check
No, you don't.
Why do you think you want?
Offline
Of course I exactly clear about what am I doing,this is why:
Here is the thing,this city,or I say this place I live,have a very unfriendly network environment,I can not reach to github direcly,so I used proxy,but download speed is too slow,anyway,it solved my AUR-installing problem,then someone told me about a new kind of proxy,I tried it,my download speed came to 30mb/s,but the proxy has a problem,It can change sha256sum of fetch file randomly,sometimes sha256 check passes,sometimes doesn't,if PKGBUID needs two files(for example:7z file and LICENSE),one of them can pass the check,one can not,so I want to disable intigrity check until developer fix that bug(bacause of local law,I can not use VPN)
And you expect people to help you do something dumb without explaining why you want to do it?
Offline
the proxy has a problem,It can change sha256sum of fetch file randomly,sometimes sha256 check passes,sometimes doesn't
Is this a thing? I wouldn't trust it...
Didn't know such things could happen with proxies...
<49,17,III,I> Fama di loro il mondo esser non lassa;
<50,17,III,I> misericordia e giustizia li sdegna:
<51,17,III,I> non ragioniam di lor, ma guarda e passa.
Offline
It can change sha256sum of fetch file randomly
You do understand the purpose of those checksums, do you?
It's precisely to prevent such shenanigans - if the checksum doesn't fit, somebody has tampered w/ the files. They compromised and under no circumstances should you trust them.
The most benign scenario is that the packages got corrupted by transmission noise, worst case is that you're being spied on.
Avoiding the integrity checks is not a good way to deal with this at all.
Edit: this is a thing if you live in a place where the local dicKtator thinks he needs to supervise your thoughts and privacy.
Last edited by seth (2022-11-15 15:16:31)
Online
https://aya1.eu.org/https/github.com/netptop/siteproxy
You can try it.....I wrote an sh,and put it into the dlagent in the makepkg.conf,it can recognize the url,if url points at github,then use proxy and generate new url and give it to curl to fetch,something like that....
nurali wrote:the proxy has a problem,It can change sha256sum of fetch file randomly,sometimes sha256 check passes,sometimes doesn't
Is this a thing? I wouldn't trust it...
Didn't know such things could happen with proxies...
Offline
This seems to work:
# cp /usr/{,local/}bin/makepkg
# sed -i 's/check_source_integrity/#&/' /usr/local/bin/makepkgReally not a good idea though. Delete /usr/local/bin/makepkg to return to sanity.
Jin, Jîyan, Azadî
Offline
Thank you for reminding,I think I have to reconsider my thoughts now.....
https://github.com/netptop/siteproxy
this is the sorce page of that proxy....
It can change sha256sum of fetch file randomly
You do understand the purpose of those checksums, do you?
It's precisely to prevent such shenanigans - if the checksum doesn't fit, somebody has tampered w/ the files. They compromised and under no circumstances should you trust them.
The most benign scenario is that the packages got corrupted by transmission noise, worst case is that you're being spied on.
Avoiding the integrity checks is not a good way to deal with this at all.Edit: this is a thing if you live in a place where the local dicKtator thinks he needs to supervise your thoughts and privacy.
Offline
There's a makepkg.conf key that will allow you to skip the checks, but again: AB·SO·LUTE·LY wrong approach to deal w/ the situation.
Online
if url points at github,then use proxy and generate new url and give it to curl to fetch
Assuming that the proxy is benign, you maybe want to share that script.
Online
Thank you again....Can I know what the key is?I am not prepare to use it,I have read makepkg.conf again and again,I wat to now what is the answer to my question
There's a makepkg.conf key that will allow you to skip the checks, but again: AB·SO·LUTE·LY wrong approach to deal w/ the situation.
Offline
Can I know what the key is?
I think seth is referring to: https://wiki.archlinux.org/title/Makepk … e_checking
<49,17,III,I> Fama di loro il mondo esser non lassa;
<50,17,III,I> misericordia e giustizia li sdegna:
<51,17,III,I> non ragioniam di lor, ma guarda e passa.
Offline
I think it's
SKIPCHECKSUMS=1EDIT: I really should have read check_source_integrity() before mauling it...
Last edited by Head_on_a_Stick (2022-11-15 15:40:59)
Jin, Jîyan, Azadî
Offline
https://man.archlinux.org/man/core/pacm … .conf.5.en look for BUILDENV
Online
Of course,here is the script:
#!/bin/bash
DOMAIN=`echo $2 | cut -f3 -d'/'`;
OTHERS=`echo $2 | cut -f3- -d'/'`;
case "$DOMAIN" in
"github.com")
url="aya1.eu.org:443/https/"$OTHERS;
/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o $1 $url;
;;
"raw.githubusercontent.com")
url="aya1.eu.org:443/https/"$OTHERS;
/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o $1 $url;
;;
*)
url=$2;
echo "正在龟速下载 $url";
/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o $1 $url;
;;
esacif url points at github,then use proxy and generate new url and give it to curl to fetch
Assuming that the proxy is benign, you maybe want to share that script.
Offline
Isn't it about PGP check?
nurali wrote:Can I know what the key is?
I think seth is referring to: https://wiki.archlinux.org/title/Makepk … e_checking
Offline
I've tried editing it into
BUILDENV=(!distcc !color !ccache !check !sign)It didn't work:D
https://man.archlinux.org/man/core/pacm … .conf.5.en look for BUILDENV
Offline
Time to sleep,thanks man,goodnight
https://man.archlinux.org/man/core/pacm … .conf.5.en look for BUILDENV
Offline
-gqb "" -fLC -Why is that there?
-f, --fail
(HTTP) Fail fast with no output at all on server errors. This is useful to enable
scripts and users to better deal with failed attempts. In normal cases when an HTTP
server fails to deliver a document, it returns an HTML document stating so (which
often also describes why and more). This flag will prevent curl from outputting
that and return error 22.This method is not fail-safe and there are occasions where non-successful response
codes will slip through, especially when authentication is involved (response codes
401 and 407).
The check parameter is apparently strictly limited to the explicit check funtion, sorry.
Online
Nurali, you said this is specifically an issue in retrieving source code from github, right? But any -git PKGBUILD should already SKIP the checksum. So does this only apply to packages that download versioned tarballs from github? There certainly are a number of such packages, but they are small minority of AUR packages. How many of these are you working with? Why do you need a general solution (of disabling *all* checksums, which has lots of negative side-effects) to a problem that is specific to very few packages?
Last edited by Trilby (2022-11-15 16:59:20)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline