You are not logged in.

#1 2019-02-01 15:06:41

major9989
Member
Registered: 2019-02-01
Posts: 10

[SOLVED] Integrity checks in PKGBUILD.

Hello Everyone.

I was writing a PKGBUILD for a package, and I had to generate the integrity checks (MD5SUMS).

Now, in all my previous PKGBUILDs

makepkg -g >> PKGBUILD

used to create and append a MD5SUM in the PKGBUILD. In this package, however, it appends the line:

MD5SUMS("SKIP")

Now, I want to know why it is skipping the integrity checks and not generating one.

Last edited by major9989 (2019-02-01 16:22:17)

Offline

#2 2019-02-01 15:08:38

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Integrity checks in PKGBUILD.

Is this a VCS package?

Post the PKGBUILD.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2019-02-01 15:26:34

major9989
Member
Registered: 2019-02-01
Posts: 10

Re: [SOLVED] Integrity checks in PKGBUILD.

Yes. It is a VCS package.

PKGBUILD:

# Maintainer: Aniket Pradhan <aniket17133@iiitd.ac.in>
# Owner/Cofntributer: Xinzhao Xu <z2d@jifangcheng.com>

pkgname=annie
pkgver=0.9.1
pkgrel=1
arch=('x86_64' 'i686')
pkgdesc="A fast, simple and clean video downloader written in Go"
url="https://github.com/iawia002/annie"
license=("MIT")
makedepends=('go' 'dep')
depends=("ffmpeg")
conflicts=("annie")
options=('!strip' '!emptydirs')
source=("git+https://github.com/iawia002/annie#tag=0.9.1")

prepare(){
	mkdir -p gopath/src/github.com
	ln -rTsf $pkgname $srcdir/gopath/src/github.com/$pkgname
	export GOPATH="$srcdir"/gopath
	cd $GOPATH/src/github.com/$pkgname
	#dep init
	dep ensure
}

build(){
	export GOPATH=$srcdir/gopath
	cd gopath/src/github.com/$pkgname
	go install \
		-gcflags "all=-trimpath=$GOPATH" \
		-asmflags "all=-trimpath=$GOPATH" \
		-ldflags "-extldflags $LDFLAGS" \
		-v ./...
}

package() {
	install -Dm755 gopath/bin/$pkgname "$pkgdir"/usr/bin/$pkgname

	for f in LICENSE COPYING LICENSE.* COPYING.*; do
		if [ -e "$srcdir/src/$_gourl/$f" ]; then
		install -Dm644 "$srcdir/src/$_gourl/$f" \
		"$pkgdir/usr/share/licenses/$pkgname/$f"
	fi
	done
}
md5sums=('SKIP')

Offline

#4 2019-02-01 15:28:26

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [SOLVED] Integrity checks in PKGBUILD.

That (what was in the first post) somewhat resembles the result that would be expected for a VCS PKGBUILD ... somewhat.  But please do not paraphrase, if that is indeed exactly what was added to the PKGBUILD, then something is very wrong.

(edit: cross posted with the above, and edited to remove ambiguity).

Last edited by Trilby (2019-02-01 15:29:08)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2019-02-01 15:34:38

major9989
Member
Registered: 2019-02-01
Posts: 10

Re: [SOLVED] Integrity checks in PKGBUILD.

It's still ambiguous to me.

But please do not paraphrase, if that is indeed exactly what was added to the PKGBUILD, then something is very wrong.

I don't quite get this part.

I am able to make out that the "SKIP" option is added for VCS sources.

Can you clarify if I am correct or not?

Offline

#6 2019-02-01 15:50:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [SOLVED] Integrity checks in PKGBUILD.

My comment on paraphrasing is what you put in code tags in your first post is very different from what was actually added to the PKGBUILD as shown in your second post.

But on the topic at hand, yes, checksums are skipped for VCS sources, they must be as they will constantly be changing.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2019-02-01 15:51:42

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: [SOLVED] Integrity checks in PKGBUILD.

The source is not a file, it is a git repository. It doesn't have a md5sum, therefore you tell makepkg to 'skip' checking that source.

Aside: as this is a VCS package, please follow the VCS packaging guidelines: https://wiki.archlinux.org/index.php/VC … guidelines

EDIT: on second glance, this PKGBUILD fetches a tag, so most of the VCS packaging guidelines don't apply. You are still missing git as a makedepends, however.

Last edited by WorMzy (2019-02-01 16:00:08)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#8 2019-02-01 15:55:17

major9989
Member
Registered: 2019-02-01
Posts: 10

Re: [SOLVED] Integrity checks in PKGBUILD.

Excuse me, I still don't understand what you are implying by paraphrasing here.

makepkg -g >> PKGBUILD

This generates and appends to the PKGBUILD:

md5sums('SKIP')

Are you saying that there is a difference between:

md5sums('SKIP')

MD5SUMS("SKIP")

Last edited by major9989 (2019-02-01 15:55:52)

Offline

#9 2019-02-01 16:00:25

major9989
Member
Registered: 2019-02-01
Posts: 10

Re: [SOLVED] Integrity checks in PKGBUILD.

Thanks a lot for your help, @Slithery @Trilby and @WorMzy for your replies.

@WorMzy, I have updated the PKGBUILD as per the guidelines now. Thanks for pointing that out. ^>^

Offline

#10 2019-02-01 16:06:32

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: [SOLVED] Integrity checks in PKGBUILD.

Please note I updated my post. wink

Yes, there is a difference between md5sums and MD5SUMS -- the latter is not an internal variable used by makepkg, so if 'makepkg -g' is printing that, you are not using /usr/bin/makepkg as provided by the pacman package.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#11 2019-02-01 16:19:51

major9989
Member
Registered: 2019-02-01
Posts: 10

Re: [SOLVED] Integrity checks in PKGBUILD.

Ohh. Thanks for this information. big_smile

`makepkg -g` is printing ''md5sums=('SKIP')". Hence I guess I am using the correct makepkg.

Thanks for your help on this.

Cheers. ^>^

Offline

#12 2019-02-01 17:52:00

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [SOLVED] Integrity checks in PKGBUILD.

major9989 wrote:

Are you saying that there is a difference between:

md5sums('SKIP')

MD5SUMS("SKIP")

There is a difference between those, but still neither one of those is actually what makepkg appends to the PKGBUILD:

# all three of these are different
MD5SUMS("SKIP")
md5sums("SKIP")
md5sums=('SKIP')

Only the third will work, and only the third is what makepkg actually generates.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB