You are not logged in.
Hello,
git push to the AUR fails with the followings:
Counting objects: 242, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (241/241), done.
Writing objects: 100% (242/242), 89.69 KiB | 0 bytes/s, done.
Total 242 (delta 151), reused 0 (delta 0)
remote: error: The following error occurred when parsing commit
remote: error: 24b8653c88cd24792ced9524dab76bd6c1f2d25e:
remote: error: invalid pkgbase: CoreFreq
remote: error: hook declined to update refs/heads/master
To ssh://aur@aur.archlinux.org/corefreq.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'ssh://aur@aur.archlinux.org/corefreq.git'
Config looks OK because I can get remote help with:
ssh aur@aur4.archlinux.org help
My source code has been initially push to GitHub as the origin remote and I would like to make it available in the AUR. So I have added a new remote with:
git remote add aur ssh://aur@aur.archlinux.org/corefreq.git
I'm now stuck with the above error whenever I run:
git push aur
Thanks for any help
Regards
CyrIng
Last edited by CyrIng (2015-09-13 12:56:42)
Offline
You're trying to push the whole source repo to the AUR? Don't do that - this is not what the AUR is for. I'm not sure if this is what caused this particular error, but it is definitely an abuse of the AUR. You upload only the the PKGBUILD and .SRCINFO files to the AUR (and the occasional patch file) never all the sources.
EDIT: also, the package name should have -git at the end as this is a git-sourced package.
EDIT2: you've written the PKGBUILD like a split package, but it is not a split package. Further the pkgbase differs from the pkgname, why? Please follow the instructions.
EDIT3: your pushd and popd commands in the package function are harmless, but also pointless.
Last edited by Trilby (2015-09-07 00:38:01)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Thanks for helping
I've fixed PKGBUILD according to the instructions, however a remote error is now looping about missing my dkms install file 'intelfreq.install' (which is well added & committed before push)
$ git push origin master
Enter passphrase for key '/somedir/arch':
X11 forwarding request failed on channel 0
Counting objects: 11, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 1.57 KiB | 0 bytes/s, done.
Total 11 (delta 3), reused 0 (delta 0)
remote: error: The following error occurred when parsing commit
remote: error: 8fa8c46c191fcd75fb8cfcf2a44f490ffc3930dd:
remote: error: missing install file: intelfreq.install
remote: error: hook declined to update refs/heads/master
To ssh+git://aur@aur.archlinux.org/corefreq-git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'ssh+git://aur@aur.archlinux.org/corefreq-git'
EDIT:
By the way, when I ask for a status I got this below, and I don't understand what 'the upstream is gone' is supposed to mean.
$ 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
You're trying to push the whole source repo to the AUR? Don't do that - this is not what the AUR is for. I'm not sure if this is what caused this particular error, but it is definitely an abuse of the AUR. You upload only the the PKGBUILD and .SRCINFO files to the AUR (and the occasional patch file) never all the sources.
EDIT: also, the package name should have -git at the end as this is a git-sourced package.
EDIT2: you've written the PKGBUILD like a split package, but it is not a split package. Further the pkgbase differs from the pkgname, why? Please follow the instructions.
EDIT3: your pushd and popd commands in the package function are harmless, but also pointless.
Last edited by CyrIng (2015-09-07 01:44:04)
Offline
Hello,
Here are the last fixed packaging files
PKGBUILD
# Maintainer: CyrIng <labs[at]cyring[dot]fr>
# Contributor: CyrIng <labs[at]cyring[dot]fr>
pkgbase=corefreq
pkgname=corefreq-git
pkgver=1.0.0
pkgrel=1
pkgdesc='Processor Core Monitoring'
arch=('x86_64')
url='http://github.com/cyring/CoreFreq'
license=('GPL2')
makedepends=('git' 'linux-headers')
source=('git+https://github.com/cyring/CoreFreq.git')
md5sums=('SKIP')
install=${pkgname}.install
_gitname=CoreFreq
build() {
cd ${srcdir}/${_gitname}
make -w -j1
}
package() {
pkgdesc='IntelFreq kernel module sources'
depends=('dkms' 'gcc' 'make')
install -dm755 "${pkgdir}/usr/src"
cd ${srcdir}/${_gitname}
install -Dm755 corefreqd "${pkgdir}/usr/bin/corefreqd"
install -Dm644 corefreqd.service "${pkgdir}/usr/lib/systemd/system/corefreqd.service"
install -m755 corefreq-cli "${pkgdir}/usr/bin/corefreq-cli"
mkdir "${pkgdir}/usr/src/${pkgbase}-${pkgver}/"
install -Dm644 dkms.conf "${pkgdir}/usr/src/${pkgbase}-${pkgver}/dkms.conf"
cp --no-preserve=ownership Makefile *.h *.c dkms.conf *.install \
"${pkgdir}/usr/src/${pkgbase}-${pkgver}/"
}
corefreq-git.install
post_install() {
dkms install corefreq/${1%%-*}
echo 'modprobe or insmod the kernel module intelfreq.ko prior to start corefreqd.service and'
echo 'use systemd to start corefreqd.service prior to running corefreq-cli'
}
pre_upgrade() {
pre_remove ${2%%-*}
}
post_upgrade() {
post_install ${1%%-*}
}
pre_remove() {
dkms remove corefreq/${1%%-*} --all
}
A git push ends up with this remote error:
remote: error: The following error occurred when parsing commit
remote: error: cadc03e51bd74a8117d634f368d23374f958c66f:
remote: error: missing install file: corefreq-git.install
remote: error: hook declined to update refs/heads/master
Thanks for any help
Last edited by CyrIng (2015-09-10 03:44:36)
Offline
So does the referenced commit include the install file?
Offline
Both, and only these 2 files PKGBUILD and corefreq-git.install are referenced into commit
Offline
Your reply doesn't make sense, probably a language issue .
Each commit is verified. so if the first commit in the repo didn't include the install file, then you committed it later, it will not work.
Offline
Thank you, but I'm still stuck
Because this is the initial upload of my program to a fresh new AUR repo, what do you suggest me to do ?
Offline
If you don't care about the Git history, just start with a fresh repo.
Offline
Ok, I'll will try that solution however I want to keep the program name (and the package stuffs should be coherent, such as pkgname, repo name, etc)
Can't we just delete/ erase/remove a repo in AUR to start again ?
Offline
If you haven't uploaded it, there's nothing there. Just clone it again, add your current files, commit, and push.
Offline
YES !
Thanks a lot
pkgbase has to be = to pkgname and so must be post_install()
PKGBUILD
# Maintainer: CyrIng <labs[at]cyring[dot]fr>
# Contributor: CyrIng <labs[at]cyring[dot]fr>
pkgbase=corefreq-git
pkgname=corefreq-git
pkgver=1.0.0
pkgrel=1
pkgdesc='Processor Core Monitoring'
arch=('x86_64')
url='http://github.com/cyring/CoreFreq'
license=('GPL2')
makedepends=('git' 'linux-headers')
source=('git+https://github.com/cyring/CoreFreq.git')
md5sums=('SKIP')
install=${pkgname}.install
_gitname=CoreFreq
build() {
cd ${srcdir}/${_gitname}
make -w -j1
}
package() {
pkgdesc='IntelFreq kernel module sources'
depends=('dkms' 'gcc' 'make')
install -dm755 "${pkgdir}/usr/src"
cd ${srcdir}/${_gitname}
install -Dm755 corefreqd "${pkgdir}/usr/bin/corefreqd"
install -Dm644 corefreqd.service "${pkgdir}/usr/lib/systemd/system/corefreqd.service"
install -m755 corefreq-cli "${pkgdir}/usr/bin/corefreq-cli"
mkdir "${pkgdir}/usr/src/${pkgbase}-${pkgver}/"
install -Dm644 dkms.conf "${pkgdir}/usr/src/${pkgbase}-${pkgver}/dkms.conf"
cp --no-preserve=ownership Makefile *.h *.c dkms.conf \
"${pkgdir}/usr/src/${pkgbase}-${pkgver}/"
}
corefreq-git.install
post_install() {
dkms install corefreq-git/${1%%-*}
echo 'modprobe or insmod the kernel module intelfreq.ko prior to start corefreqd.service and'
echo 'use systemd to start corefreqd.service prior to running corefreq-cli'
}
pre_upgrade() {
pre_remove ${2%%-*}
}
post_upgrade() {
post_install ${1%%-*}
}
pre_remove() {
dkms remove corefreq-git/${1%%-*} --all
}
Offline
As Trilby said, it is not a split package, so you don't need pkgbase and you can move the depends and pkgdesc out of the package() function. And I assume you have gcc and make as dependencies for the dkms stuff, but dkms already lists those packages as dependencies, so that seems unnecessary.
Offline
Gcc and make are also in base-devel and are not supposed to be listed in PKBGUILDs, though this is a minor detail as it shouldn't do any harm.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Totally true, and I will correct that as soon as possible
Regards
As Trilby said, it is not a split package, so you don't need pkgbase and you can move the depends and pkgdesc out of the package() function. And I assume you have gcc and make as dependencies for the dkms stuff, but dkms already lists those packages as dependencies, so that seems unnecessary.
Offline
Because I took virtualbox as an example but now it is more clear.
Appreciated your support
Thank you
Gcc and make are also in base-devel and are not supposed to be listed in PKBGUILDs, though this is a minor detail as it shouldn't do any harm.
Offline
Gcc and make are also in base-devel and are not supposed to be listed in PKBGUILDs, though this is a minor detail as it shouldn't do any harm.
I figured that was only true for makedepends. dkms needs them as normal (runtime) dependencies.
Offline
I've also left a repository named "corefreq" which I would like to remove from AUR.
Can we do that ? Or should I used the previous mailing list to request this action ?
CyrIng
Offline
I figured that was only true for makedepends. dkms needs them as normal (runtime) dependencies.
Oops! My appologies - if those are needed after the package is installed then yes they should be listed as dependencies.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
I'm closed to commit a fixed package according to your recommendations. Does it seem right to you ?
PKGBUILD
# Maintainer: CyrIng <labs[at]cyring[dot]fr>
# Contributor: CyrIng <labs[at]cyring[dot]fr>
pkgname=corefreq-git
pkgver=1.0.0
pkgrel=2
pkgdesc="Intel Processor Core Monitoring"
arch=('x86_64')
url='http://github.com/cyring/CoreFreq'
license=('GPL2')
depends=('dkms')
makedepends=('git')
source=('git+https://github.com/cyring/CoreFreq.git')
md5sums=('SKIP')
install=${pkgname}.install
_gitname=CoreFreq
build() {
cd ${srcdir}/${_gitname}
make -w -j1
}
package() {
install -dm755 "${pkgdir}/usr/src"
cd ${srcdir}/${_gitname}
install -Dm755 corefreqd "${pkgdir}/usr/bin/corefreqd"
install -Dm644 corefreqd.service "${pkgdir}/usr/lib/systemd/system/corefreqd.service"
install -m755 corefreq-cli "${pkgdir}/usr/bin/corefreq-cli"
mkdir "${pkgdir}/usr/src/${pkgname}-${pkgver}/"
install -Dm644 dkms.conf "${pkgdir}/usr/src/${pkgname}-${pkgver}/dkms.conf"
cp --no-preserve=ownership Makefile *.h *.c dkms.conf \
"${pkgdir}/usr/src/${pkgname}-${pkgver}/"
}
.SRCINFO
pkgbase = corefreq-git
pkgdesc = Intel Processor Core Monitoring
pkgver = 1.0.0
pkgrel = 2
url = http://github.com/cyring/CoreFreq
install = corefreq-git.install
arch = x86_64
license = GPL2
makedepends = git
depends = dkms
source = git+https://github.com/cyring/CoreFreq.git
md5sums = SKIP
pkgname = corefreq-git
Regards
CyrIng
Last edited by CyrIng (2015-09-11 10:29:57)
Offline