FS#15830 - add a command line option to skip the integrity checks

Attached to Project: Pacman
Opened by Łukasz Fibinger (lucke) - Thursday, 06 August 2009, 12:51 GMT
Last edited by Xavier (shining) - Monday, 07 September 2009, 10:52 GMT
Task Type Feature Request
Category makepkg
Status Closed
Assigned To Xavier (shining)
Architecture All
Severity Low
Priority Normal
Reported Version 3.3.0
Due in Version 3.3.1
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

makepkg should have a command line option to skip the integrity checks. Lack of it gets in the way of some users. pacman 3.3 has only aggravated the issue (by demanding md5sums, not just printing a warning).

Use cases and discussion at: http://bbs.archlinux.org/viewtopic.php?pid=596034

To quote myself from the bbs: "They [md5sums] get in my way when I build packages for myself (usually just bumping pkgver). pacman 3.3 added one additional step for me to perform (comment out the old ones, add the new ones). I build those packages only once, so md5sums are clearly useless in this case".

This task depends upon

Closed by  Xavier (shining)
Monday, 07 September 2009, 10:52 GMT
Reason for closing:  Fixed
Additional comments about closing:  fixed by commit 82522dd8c1 which adds --skipinteg option
Comment by Dan McGee (toofishes) - Thursday, 06 August 2009, 12:58 GMT
The curl example in the BBS post is rediculous; just download the source yourself in the build() function if you are going to do that and then no md5sums are necessary.

The md5sum stuff getting in your way? Are you kidding me?
makepkg -g >> PKGBUILD && makepkg

Done.
Comment by Allan McRae (Allan) - Thursday, 06 August 2009, 13:09 GMT
I am not sure about this... as you point out, the "curl source" example is not great and actually adding md5sums is easy. But we do have an option to skip dependency checks and I think something similar could be done for checksums.

In the end, it is not on my to fix list but I would consider a patch.
Comment by Łukasz Fibinger (lucke) - Thursday, 06 August 2009, 13:22 GMT
To be honest, I have always resorted to commenting out the md5sums when bumping pkgver, because I had presupposed that adding another md5sum array at the end (with >>) would baffle makepkg. It appears that indeed it is not the case. Still, I believe adding such an option doesn't hurt anyone and makes things just a tad easier to handle for the end user.
Comment by Łukasz Fibinger (lucke) - Thursday, 06 August 2009, 13:31 GMT
And when you bump and bump and bump one PKGBUILD using makepkg -g >> PKGBUILD, you finally get a PKGBUILD with a lot of md5sums arrays. My PKGBUILDs for nvidia or opera-snapshot would have hundreds of lines ;-) All in all, just skipping checks seems a nicer option.
Comment by Jim Pryor (Profjim) - Thursday, 06 August 2009, 13:34 GMT
How's this? Adds option "-G/--warninteg" to only emit a warning if integrity checks are incomplete or missing. I changed the usage() function too, but not the manpage.
Comment by Dan Griffiths (Ghost1227) - Thursday, 06 August 2009, 13:48 GMT
Here you go! Patched to add -n|--nohash option which bypasses integrity checks with warning if they are incomplete or missing.
Comment by Xavier (shining) - Thursday, 06 August 2009, 14:47 GMT
lucke : if  FS#15051  was implemented, you wouldnt need to skip checks?

I prefer Profjim's patch, except I would keep the error in case of incomplete (whats the point of letting an incomplete checksums array in a pkgbuild...)
And -G option was mentioned for  FS#15051  so I don't know.
Comment by Łukasz Fibinger (lucke) - Thursday, 06 August 2009, 15:05 GMT
 FS#15051  would scratch my itch, indeed. Can't judge about other use cases, though.
Comment by Jim Pryor (Profjim) - Thursday, 06 August 2009, 17:48 GMT
I often have incomplete checksums in my own abs-based PKGBUILDS. What usually happens is I grab a PKGBUILD from abs, modify it in various ways, sometimes involving adding some of my own patches to the sources line, or adding some urls for extra documentation to the sources line, then go from there. I like to keep the PKGBUILDs as close to the originals as possible, hence I want to leave the old checksums there, and not to be ignored. At the same time, I might be tweaking my patches a lot, or I might not care if the checksums on the FAQ file I added to the sources change, so I usually leave the checksums off of these.

If my own mods are small enough, I can automate them using aur/customizepkg. It's a special pain to try to add in extra checksums using that tool; much easier just to add your own files to the end of the sources line (by default this tool adds new entries to the start of the sources line, but one can work around that).
Comment by Jim Pryor (Profjim) - Thursday, 06 August 2009, 18:54 GMT
The nice thing about customizepkg, for those who don't use it, is that any mods you've scripted through it are automatically detected and applied by yaourt the next time you install or upgrade that package (it will always force a mod-the-PKGBUILD-then-build-from-source).
Comment by Xavier (shining) - Monday, 10 August 2009, 19:15 GMT
here is my favorite version of this patch (and normally Dan's too)
Comment by Allan McRae (Allan) - Tuesday, 11 August 2009, 03:41 GMT
That patch looks good to me. But it needs added to the manpage too.
Comment by Xavier (shining) - Saturday, 15 August 2009, 10:59 GMT Comment by Allan McRae (Allan) - Saturday, 15 August 2009, 13:11 GMT
Looks good to me.

Loading...