You are not logged in.

#1 2009-08-05 10:03:06

tadzik
Member
From: &tadzik
Registered: 2009-07-17
Posts: 91

How to ignore missing md5sums

Hello,
after a new pacman upgrade (3.3.0) makepkg now stops building when the md5sums are missing. This is a bit annoying if you have PKGBUILD which is fetching the pkgver via some command, like in my chromium PKGBUILD:

pkgname=chromium-snapshot
_realname=chromium-browser
pkgver=`curl http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/LATEST`

I know it's not correct with Arch Packaging Standards blah blah blah, but I think there should be some option to ignore it, especially when some packages (again, chromium as an example) don't publish any md5sums, which means you never really now if they are correct ;)

Is there any way to ignore this md5sum checking? I've looked through the man page, but found nothing.
Regards
Ted

Offline

#2 2009-08-05 10:10:03

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: How to ignore missing md5sums

blah blah blah


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#3 2009-08-05 11:01:14

jelly
Administrator
From: /dev/null
Registered: 2008-06-10
Posts: 714

Re: How to ignore missing md5sums

shouldnt you look for the guide  svn packaging for AUR ?

Offline

#4 2009-08-05 11:15:34

tadzik
Member
From: &tadzik
Registered: 2009-07-17
Posts: 91

Re: How to ignore missing md5sums

From SVN I'll get only the source code, which is not my point. Anyway, I was only curious if there's any other possibility in this case besides running makepkg -g, and from Veteran Programmer Extraordinare's attitude I can clearly see that there isn't any, so I guess case is closed.

Offline

#5 2009-08-05 11:29:41

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: How to ignore missing md5sums

I believe there should be a command line option to skip the integrity checks. They 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.

Does anyone have any compelling arguments against such an option? If not, I'll post a feature request.

Offline

#6 2009-08-05 13:16:08

ugkbunb
Member
Registered: 2009-02-26
Posts: 227

Re: How to ignore missing md5sums

lucke wrote:

I believe there should be a command line option to skip the integrity checks.

+1 I am missing this functionality as well. Just as there is a command line option to ignore dependencies... there should be one to ignore integrity checks.

Offline

#7 2009-08-06 05:17:48

lpjhjdh
Member
Registered: 2008-11-29
Posts: 8

Re: How to ignore missing md5sums

I agree, I see no reason I shouldn't be able to give such an override.

Offline

#8 2009-08-06 05:37:10

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: How to ignore missing md5sums

A simple solution is to create some sort of .desktop file and use the md5sums for that. Those can be useful if you have a menu with icons. Alternatively, you can create an install file.

Offline

#9 2009-08-06 07:37:35

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: How to ignore missing md5sums

skottish wrote:

Alternatively, you can create an install file.

.install files should not be included in the source array. So it won't help you in this situation.

Offline

#10 2009-08-06 07:59:06

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: How to ignore missing md5sums

ugkbunb wrote:
lucke wrote:

I believe there should be a command line option to skip the integrity checks.

+1 I am missing this functionality as well. Just as there is a command line option to ignore dependencies... there should be one to ignore integrity checks.

+1. I agree.

Offline

#11 2009-08-06 12:00:19

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: How to ignore missing md5sums

please open a feature request : http://bugs.archlinux.org/toplevel/proj3
we have to discuss there whether to revert to old behavior (just a warning), or a an option (which one?) or do nothing.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#12 2009-08-06 12:51:37

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: How to ignore missing md5sums

Offline

#13 2009-08-06 13:58:57

Ghost1227
Forum Fellow
From: Omaha, NE, USA
Registered: 2008-04-21
Posts: 1,422
Website

Re: How to ignore missing md5sums

Here you go! Patch to add a -n|--nohash switch to ignore integrity checks.

--- makepkg.orig    2009-08-06 09:39:33.117013144 -0400
+++ /usr/bin/makepkg    2009-08-06 09:44:51.446636563 -0400
@@ -62,6 +62,7 @@
 NOBUILD=0
 NODEPS=0
 NOEXTRACT=0
+NOHASH=0
 RMDEPS=0
 REPKG=0
 LOGGING=0
@@ -1023,7 +1024,12 @@
     cd "$srcdir"
     download_sources
     # We can only check checksums if we have all files.
-    check_checksums
+    # Fix for flyspray bug #15830
+    if [ "$NOHASH" -eq 1 ]; then
+        warning "$(gettext "Skipping integrity checks.")"
+    else
+        check_checksums
+    fi
     cd "$startdir"
 
     msg "$(gettext "Creating source package...")"
@@ -1400,6 +1406,7 @@
     echo "$(gettext "  -f, --force      Overwrite existing package")"
     echo "$(gettext "  -g, --geninteg   Generate integrity checks for source files")"
     echo "$(gettext "  -h, --help       This help")"
+    echo "$(gettext "  -n, --nohash     Skip all integrity checks")"
     echo "$(gettext "  -i, --install    Install package after successful build")"
     echo "$(gettext "  -L, --log        Log package build process")"
     echo "$(gettext "  -m, --nocolor    Disable colorized output messages")"
@@ -1444,9 +1451,9 @@
 ARGLIST=$@
 
 # Parse Command Line Options.
-OPT_SHORT="AbcCdefFghiLmop:rRsV"
+OPT_SHORT="AbcCdefFghiLmnop:rRsV"
 OPT_LONG="allsource,asroot,ignorearch,builddeps,clean,cleancache,nodeps"
-OPT_LONG="$OPT_LONG,noextract,force,forcever:,geninteg,help,holdver"
+OPT_LONG="$OPT_LONG,noextract,nohash,force,forcever:,geninteg,help,holdver"
 OPT_LONG="$OPT_LONG,install,log,nocolor,nobuild,rmdeps,repackage,source"
 OPT_LONG="$OPT_LONG,syncdeps,version,config:"
 # Pacman Options
@@ -1483,6 +1490,7 @@
         -i|--install)     INSTALL=1 ;;
         -L|--log)         LOGGING=1 ;;
         -m|--nocolor)     USE_COLOR='n' ;;
+        -n|--nohash)      NOHASH=1 ;;
         -o|--nobuild)     NOBUILD=1 ;;
         -p)               shift; BUILDFILE=$1 ;;
         -r|--rmdeps)      RMDEPS=1 ;;
@@ -1801,7 +1809,11 @@
     fi
 else
     download_sources
-    check_checksums
+    if [ "$NOHASH" -eq 1 ]; then
+        warning "$(gettext "Skipping integrity checks.")"
+    else
+        check_checksums
+    fi
     extract_sources
 fi

.:[My Blog] || [My GitHub]:.

Offline

#14 2009-08-06 14:03:15

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: How to ignore missing md5sums

I also submitted a patch at the bugreport...

Offline

#15 2009-08-06 14:04:56

Ghost1227
Forum Fellow
From: Omaha, NE, USA
Registered: 2008-04-21
Posts: 1,422
Website

Re: How to ignore missing md5sums

Me too... lol tongue


.:[My Blog] || [My GitHub]:.

Offline

#16 2009-08-06 16:13:55

Paramvir
Member
Registered: 2009-08-06
Posts: 135
Website

Re: How to ignore missing md5sums

There is a way to get the md5sums - by using the -g option in makepkg.

I have used a file named integ in this case.

"makepkg -g -f -p PKGBUILDdeb >> integ"

This gives the required md5sum which can then be added to your PKGBUILD file and it works fine there on...

cheers

Offline

#17 2009-08-06 17:01:08

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: How to ignore missing md5sums

Thanks Paramvir, I think the other commenters are aware of that...it's because this is so easy (you can even ">> PKGBUILD" and skip the intermediate file) that some devs think this is a non-issue. But some commenters have pointed out reasons why it's inconvenient to do this, and would be easier to have an option to build without the checks.

While making the patch I mentioned above, I noticed that makepkg has some options (-b and --builddeps) that seem not to be implemented. They're in the options strings but not handled by the case statement. What's going on there? Are these old options being phased out? New options being phased in but not yet implemented? A bug?

EDIT: Looks like it's an old option no longer implemented (as of 3.2, see http://www.mail-archive.com/pacman-dev@ … 02514/NEWS). But the switches are still present in OPT_SHORT and OPT_LONG.

Last edited by Profjim (2009-08-06 17:04:07)

Offline

#18 2009-08-07 01:17:16

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,482
Website

Re: How to ignore missing md5sums

Profjim wrote:

While making the patch I mentioned above, I noticed that makepkg has some options (-b and --builddeps) that seem not to be implemented. They're in the options strings but not handled by the case statement. What's going on there? Are these old options being phased out? New options being phased in but not yet implemented? A bug?

EDIT: Looks like it's an old option no longer implemented (as of 3.2, see http://www.mail-archive.com/pacman-dev@ … 02514/NEWS). But the switches are still present in OPT_SHORT and OPT_LONG.

Oops....  nice catch.  Will be fixed in 3.3.1.

Offline

#19 2009-08-12 22:25:54

wankel
Member
From: Iowa, USA
Registered: 2008-05-30
Posts: 218
Website

Re: How to ignore missing md5sums

Is there a reason -builddeps is removed from makepkg?

Offline

#20 2009-08-13 06:20:58

doorknob60
Member
Registered: 2008-09-29
Posts: 404

Re: How to ignore missing md5sums

+1000

I can't build newer versions of packages nearly as easily with yaourt -Sb anymore. If I needed an updated piece of software I used to just update the pkgver and delete the md5sum...not anymore hmm Do something about this please?

Offline

#21 2009-08-13 06:36:34

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,482
Website

Re: How to ignore missing md5sums

wankel wrote:

Is there a reason -builddeps is removed from makepkg?

That was done pre pacman-3.2.  See http://projects.archlinux.org/?p=pacman … h=ae5ef3b9

Offline

#22 2009-08-13 06:38:04

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,482
Website

Re: How to ignore missing md5sums

Here is the patch that will most likely be applied to allow you to skip md5sum checks in pacman-3.3.1:
http://bugs.archlinux.org/task/15830#comment48420

Offline

Board footer

Powered by FluxBB