You are not logged in.

#1 2015-06-10 22:49:14

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,456

[SOLVED] AUR4: missing mandatory field: pkgver

Similar to https://bbs.archlinux.org/viewtopic.php?id=198440, I get the same error pushing to AUR4, but in my case, the pkgver is present in both my PKGBUILD and .SRCINFO. What am I doing wrong?

PKGBUILD:

pkgname=broadcom-wl-dkms
_pkgname=broadcom-wl
pkgver=6.30.223.248
pkgrel=6
pkgdesc="Broadcom 802.11 Linux STA wireless driver"
url='http://www.broadcom.com/support/802.11/linux_sta.php'
arch=('i686' 'x86_64')
license=('custom')
depends=('dkms')
optdepends=('linux-headers: If running standard kernel, otherwise find matching headers for your kernel')
install=broadcom-wl-dkms.install
conflicts=('broadcom-wl')
[[ $CARCH = x86_64 ]] && _arch=_64 || _arch=
source=("http://www.broadcom.com/docs/linux_sta/hybrid-v35${_arch}-nodebug-pcoem-${pkgver//./_}.tar.gz"
	'broadcom-wl-dkms.conf'
	'dkms.conf'
	'license.patch'
	'linux-recent.patch'
	'gcc.patch')
sha256sums=('b196543a429c22b2b8d75d0c1d9e6e7ff212c3d3e1f42cc6fd9e4858f01da1ad'
	'b97bc588420d1542f73279e71975ccb5d81d75e534e7b5717e01d6e6adf6a283'
	'4e719f9c8468f7c802bb0e52939f2680abb1287d3817d91252958f0ae82f983b'
	'2f70be509aac743bec2cc3a19377be311a60a1c0e4a70ddd63ea89fae5df08ac'
	'ea2da813f890aa029d41b117f1b78d4379720c108101aef46aeb54df3c261f66'
	'b07ce80f2e079cce08c8ec006dda091f6f73f158c8a62df5bac2fbabb6989849')
[[ $CARCH = x86_64 ]] && sha256sums[0]='3d994cc6c05198f4b6f07a213ac1e9e45a45159899e6c4a7feca5e6c395c3022'

backup=('etc/modprobe.d/broadcom-wl-dkms.conf')

build() {
	cd "${srcdir}"

	patch -p1 -i linux-recent.patch
	patch -p1 -i license.patch
	patch -p1 -i gcc.patch

	sed -e "/BRCM_WLAN_IFNAME/s:eth:wlan:" \
		-i src/wl/sys/wl_linux.c

	# delete files not needed for packaging
	rm hybrid-v35${_arch}-nodebug-pcoem-${pkgver//./_}.tar.gz
}

package() {
	cd "${srcdir}"
	
	mkdir -p ${pkgdir}/usr/src/${_pkgname}-${pkgver}

	cp -RL * ${pkgdir}/usr/src/${_pkgname}-${pkgver}
	install -D -m 644 lib/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	install -D -m 644 broadcom-wl-dkms.conf "${pkgdir}"/etc/modprobe.d/broadcom-wl-dkms.conf
}

.SRCINFO:

pkgbase = broadcom-wl-dkms
pkgdesc = Broadcom 802.11 Linux STA wireless driver
pkgver = 6.30.223.248
pkgrel = 6
url = http://www.broadcom.com/support/802.11/linux_sta.php
install = broadcom-wl-dkms.install
arch = i686
arch = x86_64
license = custom
depends = dkms
source = http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-6_30_223_248.tar.gz
source = broadcom-wl-dkms.conf
source = dkms.conf
source = license.patch
source = linux-recent.patch
source = gcc.patch
sha256sums = b196543a429c22b2b8d75d0c1d9e6e7ff212c3d3e1f42cc6fd9e4858f01da1ad
sha256sums = b97bc588420d1542f73279e71975ccb5d81d75e534e7b5717e01d6e6adf6a283
sha256sums = 4e719f9c8468f7c802bb0e52939f2680abb1287d3817d91252958f0ae82f983b
sha256sums = 2f70be509aac743bec2cc3a19377be311a60a1c0e4a70ddd63ea89fae5df08ac
sha256sums = ea2da813f890aa029d41b117f1b78d4379720c108101aef46aeb54df3c261f66
sha256sums = b07ce80f2e079cce08c8ec006dda091f6f73f158c8a62df5bac2fbabb6989849

pkgname = broadcom-wl-dkms

Last edited by twelveeighty (2015-06-11 16:37:42)

Offline

#2 2015-06-10 22:54:14

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,649
Website

Re: [SOLVED] AUR4: missing mandatory field: pkgver

Do any of your other commits not have a pkgver in the PKGBUILD/.SRCINFO?

That's a very hack PKGBUILD though -- you should be using source_x86_64= and source_i686= arrays (and equivalent sha sum arrays) instead of bash conditional overrides.

EDIT: It'll probably help if you post the exact output from the git push.

Last edited by WorMzy (2015-06-10 22:55:46)


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

#3 2015-06-10 23:27:10

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] AUR4: missing mandatory field: pkgver

Offline

#4 2015-06-11 01:13:38

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,456

Re: [SOLVED] AUR4: missing mandatory field: pkgver

Do any of your other commits not have a pkgver in the PKGBUILD/.SRCINFO?

This is the very first push after the initial commit. As per https://bbs.archlinux.org/viewtopic.php?id=198500, I started over again from scratch, but still fails, unfortunately.

Here are the relevant commands with output:

$ git add .
$ git status
On branch master

Initial commit

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)

        new file:   .SRCINFO
        new file:   PKGBUILD
        new file:   broadcom-wl-dkms.conf
        new file:   broadcom-wl-dkms.install
        new file:   dkms.conf
        new file:   gcc.patch
        new file:   license.patch
        new file:   linux-recent.patch

$ git commit -m "initial commit"
[master (root-commit) 3c8729f] initial commit
 8 files changed, 537 insertions(+)
 create mode 100644 .SRCINFO
 create mode 100644 PKGBUILD
 create mode 100644 broadcom-wl-dkms.conf
 create mode 100644 broadcom-wl-dkms.install
 create mode 100644 dkms.conf
 create mode 100644 gcc.patch
 create mode 100644 license.patch
 create mode 100644 linux-recent.patch
$ git status
On branch master
Your branch is based on 'origin/master', but the upstream is gone.
  (use "git branch --unset-upstream" to fixup)
nothing to commit, working directory clean
$ git push origin master
Enter passphrase for key '/home/twelveeighty/.ssh/id_rsa-aur': 
Counting objects: 10, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 6.86 KiB | 0 bytes/s, done.
Total 10 (delta 0), reused 0 (delta 0)
remote: error: The following error occurred when parsing commit
remote: error: 3c8729fe419e4ae4306a969719316b01e6361b10:
remote: error: missing mandatory field: pkgver
remote: error: hook declined to update refs/heads/master
To ssh://aur@aur4.archlinux.org/broadcom-wl-dkms.git
 ! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'ssh://aur@aur4.archlinux.org/broadcom-wl-dkms.git'

That's a very hack PKGBUILD though -- you should be using source_x86_64= and source_i686= arrays (and equivalent sha sum arrays) instead of bash conditional overrides.

Noted. I'll fix that. I stole most of this PKGBUILD from broadcom-wl a long time ago and never really looked at the source array.

Offline

#5 2015-06-11 16:37:18

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,456

Re: [SOLVED] AUR4: missing mandatory field: pkgver

Latest update: I'll mark this as SOLVED, but the only way I could get this package to push to AUR4 is to first strip out all files and start with a almost empty PKGBUILD / .SRCINFO and push that up. Then I added the "real" files and PKGBUILD config and commit/push those changes.   Since all history is visible in Git I would be interested to know if any of you see why this worked and not committing all those files from the start.

Offline

Board footer

Powered by FluxBB