[Frugalware-darcs] pacman: makepkg: drop md5 support
VMiklos
vmiklos at frugalware.org
Thu Oct 12 16:21:45 CEST 2006
Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=pacman;a=darcs_commitdiff;h=20061012142044-e2957-d7cc6332bedb794c8b59fd06c1ec73bc008517a9.gz;
[makepkg: drop md5 support
VMiklos <vmiklos at frugalware.org>**20061012142044] {
hunk ./doc/makepkg.8 56
-.TP
-.B "\-G, \-\-genmd5"
-Download all source files (if required) and use \fImd5sum\fP to generate md5 hashes
-for each of them. You can then redirect the output into your FrugalBuild for source
-validation (makepkg -G >>FrugalBuild).
hunk ./scripts/makepkg 42
-GENMD5=0
hunk ./scripts/makepkg 276
- echo " -G, --genmd5 Generate MD5sums for source files"
hunk ./scripts/makepkg 578
- --genmd5) GENMD5=1 ;;
hunk ./scripts/makepkg 605
- G) GENMD5=1 ;;
hunk ./scripts/makepkg 693
-unset pkgname pkgver pkgrel pkgdesc url license groups provides md5sums force
+unset pkgname pkgver pkgrel pkgdesc url license groups provides force
hunk ./scripts/makepkg 789
-if [ -f $PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}.fpm -a "$FORCE" = "0" -a "$GENMD5" = "0" -a "$GENSHA1" = "0" ]; then
+if [ -f $PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}.fpm -a "$FORCE" = "0" -a "$GENSHA1" = "0" ]; then
hunk ./scripts/makepkg 800
-if darcs --commands 2>&1|grep -q add && [ "$GENMD5" = "0" -a "$GENSHA1" = "0" -a "$NOBUILD" = "0" ]; then
+if darcs --commands 2>&1|grep -q add && [ "$GENSHA1" = "0" -a "$NOBUILD" = "0" ]; then
hunk ./scripts/makepkg 1117
-if [ "$GENMD5" = "0" -a "$GENSHA1" = "0" ]; then
+if [ "$GENSHA1" = "0" ]; then
hunk ./scripts/makepkg 1148
- # MD5 validation
- elif [ ${#md5sums[@]} -eq ${#source[@]} ]; then
- if [ `type -p md5sum` ]; then
- msg "Validating source files with MD5sums"
- errors=0
- idx=0
- for netfile in "${source[@]}"; do
- file=`strip_url "$netfile"`
- echo -n " $file ... " >&2
- echo "${md5sums[$idx]} $file" | md5sum -c - >/dev/null 2>&1
- if [ $? -ne 0 ]; then
- echo "FAILED" >&2
- errors=1
- else
- echo "Passed" >&2
- fi
- idx=$(($idx+1))
- done
- if [ $errors -gt 0 ]; then
- error "One or more files did not pass the validity check!"
- exit 1
- fi
- else
- warning "The md5sum program is missing. Cannot verify source files!"
- sleep 1
- fi
hunk ./scripts/makepkg 1149
- warning "MD5sums, SHA1sums and signatures are missing or incomplete."
+ warning "SHA1sums and signatures are missing or incomplete."
hunk ./scripts/makepkg 1230
-# generate md5 hashes
- if [ "$GENMD5" = "1" ]; then
- if [ ! `type -p md5sum` ]; then
- error "Cannot find the md5sum program."
- exit 1
- fi
- msg "Generating MD5sums for source files"
- plain ""
- ct=0
- newline=0
- numsrc=${#source[@]}
- for netfile in "${source[@]}"; do
- file=`strip_url $netfile`
- sum=`md5sum $file | cut -d' ' -f 1`
- if [ $ct -eq 0 ]; then
- echo -n "md5sums=("
- else
- if [ $newline -eq 0 ]; then
- echo -n " "
- fi
- fi
- echo -n "'$sum'"
- ct=$(($ct+1))
- if [ $ct -eq $numsrc ]; then
- echo ')'
- else
- if [ $newline -eq 1 ]; then
- echo '\'
- newline=0
- else
- echo -n ' '
- newline=1
- fi
- fi
- done
- plain ""
- exit 0
- # generate sha1 hashes
- elif [ "$GENSHA1" = "1" ]; then
+ # this condition is always true, but leave it here in case in the
+ # future we want to add support for other hash algorithms
+ if [ "$GENSHA1" = "1" ]; then
hunk ./scripts/makepkg 1261
- fi
+ fi
}
More information about the Frugalware-darcs
mailing list