You are not logged in.

#1 2015-09-07 00:29:21

CyrIng
Member
From: France
Registered: 2010-07-17
Posts: 106
Website

[SOLVED] Failed to push

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

#2 2015-09-07 00:34:23

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

Re: [SOLVED] Failed to push

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

#3 2015-09-07 01:39:40

CyrIng
Member
From: France
Registered: 2010-07-17
Posts: 106
Website

Re: [SOLVED] Failed to push

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
Trilby wrote:

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

#4 2015-09-10 03:39:51

CyrIng
Member
From: France
Registered: 2010-07-17
Posts: 106
Website

Re: [SOLVED] Failed to push

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

#5 2015-09-10 04:02:05

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,599

Re: [SOLVED] Failed to push

So does the referenced commit include the install file?

Offline

#6 2015-09-10 04:18:20

CyrIng
Member
From: France
Registered: 2010-07-17
Posts: 106
Website

Re: [SOLVED] Failed to push

Both, and only these 2 files PKGBUILD and corefreq-git.install are referenced into commit

Offline

#7 2015-09-10 04:21:56

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,599

Re: [SOLVED] Failed to push

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

#8 2015-09-10 04:28:38

CyrIng
Member
From: France
Registered: 2010-07-17
Posts: 106
Website

Re: [SOLVED] Failed to push

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

#9 2015-09-10 04:31:18

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,599

Re: [SOLVED] Failed to push

If you don't care about the Git history, just start with a fresh repo.

Offline

#10 2015-09-10 04:49:39

CyrIng
Member
From: France
Registered: 2010-07-17
Posts: 106
Website

Re: [SOLVED] Failed to push

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

#11 2015-09-10 05:18:30

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,599

Re: [SOLVED] Failed to push

If you haven't uploaded it, there's nothing there. Just clone it again, add your current files, commit, and push.

Offline

#12 2015-09-10 05:57:32

CyrIng
Member
From: France
Registered: 2010-07-17
Posts: 106
Website

Re: [SOLVED] Failed to push

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

#13 2015-09-10 10:37:05

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] Failed to push

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

#14 2015-09-10 11:37:14

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

Re: [SOLVED] Failed to push

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

#15 2015-09-10 12:11:38

CyrIng
Member
From: France
Registered: 2010-07-17
Posts: 106
Website

Re: [SOLVED] Failed to push

Totally true, and I will correct that as soon as possible

Regards

Raynman wrote:

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

#16 2015-09-10 12:16:11

CyrIng
Member
From: France
Registered: 2010-07-17
Posts: 106
Website

Re: [SOLVED] Failed to push

Because I took virtualbox as an example but now it is more clear.

Appreciated your support
Thank you

Trilby wrote:

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

#17 2015-09-10 12:31:42

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] Failed to push

Trilby wrote:

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

#18 2015-09-10 12:57:24

CyrIng
Member
From: France
Registered: 2010-07-17
Posts: 106
Website

Re: [SOLVED] Failed to push

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

#19 2015-09-10 13:13:56

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

Re: [SOLVED] Failed to push

Raynman wrote:

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

#20 2015-09-11 09:00:18

CyrIng
Member
From: France
Registered: 2010-07-17
Posts: 106
Website

Re: [SOLVED] Failed to push

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

Board footer

Powered by FluxBB