You are not logged in.

#1 2019-04-24 11:30:22

throbscottle
Member
Registered: 2011-11-05
Posts: 55

cloned source dir is not a clone of git...

Afternoon, good people. I wonder if somebody can help me?
I'm trying to install LinuxCNC from the AUR.
First I installed all the dependencies, so it's happy with that.
Next I had to learn that I needed to do

$ git clone https://aur.archlinux.org/linuxcnc.git

so that worked ok.
Next I did

$ cd linuxcrc
$ makepkg

But what it tells me is:

==> Making package: linuxcnc 2.7.14-2 (Wed 24 Apr 2019 12:17:56 BST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
==> ERROR: /home/throbscottle/Packages/linuxcnc/ is not a clone of git://github.com/LinuxCNC/linuxcnc.git
    Aborting...

Searching for the problem gets me a couple of possible solutions which don't seem to apply.
I have the default makepkg.conf, never had any reason to change it. Never done anything with git, don't really know anything about it, never needed it for any other AUR package. The linuxcnc directory is the one created by the cloning process, it contains the PKGBUILD, a script and a patch.
Here's the PKGBUILD:

# Maintainer: Peter Ivanov <ivanovp@gmail.com>
# Contributor: Alec Ari <neotheuser@ymail.com>

pkgname=linuxcnc
pkgver=2.7.14
pkgrel=2
pkgdesc="It can interpret G-code and simulate a CNC machine (formerly EMC2)."
arch=('i686' 'x86_64')
license=('GPL2')
url="http://linuxcnc.org/"
depends=('bc' 'bwidget' 'tcl' 'tk' 'xorg-server' 'python2-imaging' 'tkimg' 'python2-gtkglext' 'tclx' 'boost' 'boost-libs' 'libtirpc' 'procps-ng' 'psmisc')
source=($_gitname::"git://github.com/LinuxCNC/linuxcnc.git#tag=v$pkgver" 'linuxcnc.sh' 'libtirpc.patch')
sha256sums=('72e4dad9c929b00d2a73d125d86f18600dc1c852abadcd3947fa0a7cbc28c88e'
            'c0f1ea0d8c20baa5d69d89a1d6eb3549bc57cc56ff1a0af3d5b9917cbc6211a7'
            '92f63a3f58173fa9463329f74cff7365bfefd937729a70bbdc52684d9252333f')
makedepends=('git' 'intltool')
PKGEXT='.pkg.tar'

build () {
  find . -iname fixpaths.py -o -iname checkglade -o -iname update_ini|xargs perl -p -i -e "s/python/python2/"
  cd $srcdir/$_gitname/src

  patch -Np2 -i $srcdir/libtirpc.patch

  ./autogen.sh
  ./configure --with-realtime=uspace --without-libmodbus --prefix=/usr --with-python=/usr/bin/python2.7 --enable-non-distributable=yes
  make
}

package() {
  cd $srcdir/linuxcnc/src
  make install DESTDIR=${pkgdir} || return 1
  #Stop hiding it from GNOME
  cp -PR $srcdir/linuxcnc/share/applications $pkgdir/usr/share/
  mkdir -p $pkgdir/etc/xdg
#  echo To avoid conflict with linux-manpages...
#  mv -v $pkgdir/usr/share/man/man9/abs.9.gz $pkgdir/usr/share/man/man9/linuxcnc_abs.9.gz
  cp -PR $srcdir/linuxcnc/share/menus $pkgdir/etc/xdg/
  install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/etc/profile.d/${pkgname}.sh"
  ln -s /usr/bin/linuxcnc ~/Desktop/linuxcnc
}

I would really be very grateful if somebody can help with this smile

Offline

#2 2019-04-24 12:03:06

loqs
Member
Registered: 2014-03-06
Posts: 17,369

Re: cloned source dir is not a clone of git...

The same issue is noted on https://aur.archlinux.org/packages/linuxcnc/ see aquilarubra commented on 2018-11-25 20:19.  The submitter abandoned the package without addressing the issue.

source=($_gitname::"git://github.com/LinuxCNC/linuxcnc.git#tag=v$pkgver" 'linuxcnc.sh' 'libtirpc.patch')

_gitname is not defined

sha256sums=('72e4dad9c929b00d2a73d125d86f18600dc1c852abadcd3947fa0a7cbc28c88e'

git repositories need to use 'SKIP' in checksums

PKGEXT='.pkg.tar'

This choice should be left to user.

I gave up reading the PKGBUILD at this point.

Offline

#3 2019-04-24 12:03:25

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

Re: cloned source dir is not a clone of git...

I've not done any testing to explicitly confirm, but the fact that "_gitname" is used in two important places, but never defined, is a glaringly obvious problem with the PKGBUILD which I would expect to result in an error along the lines of what you are getting.

Report it to the package maintainer.

EDIT: too slow on the main point.  @loqs, a checksum should be used here though as the source is a specific git tag.

Last edited by Trilby (2019-04-24 12:04:25)


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

Offline

#4 2019-04-24 12:11:21

loqs
Member
Registered: 2014-03-06
Posts: 17,369

Re: cloned source dir is not a clone of git...

@Trilby the tag should produce an identical working tree but the bare repository as cloned by git could be different due to new commits etc.

Offline

#5 2019-04-24 12:12:33

Awebb
Member
Registered: 2010-05-06
Posts: 6,286

Re: cloned source dir is not a clone of git...

Trilby wrote:

Report it to the package maintainer.

That dude None is so annoying. Doesn't take care of his packages!

Offline

#6 2019-04-24 17:42:23

throbscottle
Member
Registered: 2011-11-05
Posts: 55

Re: cloned source dir is not a clone of git...

Thanks for the heads up about the _gitname variable. I added in the line:

_gitname='linuxcnc'

So now it actually starts properly, failing at sha256sums instead.
I guess I have to just find updated checksums....

Offline

#7 2019-04-24 17:52:19

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

Re: cloned source dir is not a clone of git...

If loqs is right, you should not update the checksums but remove them.

An OT, to Awebb, yes he is.  I wonder if he's related to a prolific composer I learned about as a kid, Anonymous.


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

Offline

#8 2019-04-24 18:00:36

loqs
Member
Registered: 2014-03-06
Posts: 17,369

Re: cloned source dir is not a clone of git...

_commit='098ef6ef59201c445fbb1a370d4063da313614b2' #v2.7.14
source=($_gitname::"git://github.com/LinuxCNC/linuxcnc.git#commit=$_commit" 'linuxcnc.sh' 'libtirpc.patch')
sha256sums=('SKIP'
            'c0f1ea0d8c20baa5d69d89a1d6eb3549bc57cc56ff1a0af3d5b9917cbc6211a7'
            '92f63a3f58173fa9463329f74cff7365bfefd937729a70bbdc52684d9252333f')

The tag is not signed so switch to the commit of that tag and skip that entry in the checksums array.
Edit:
fix sha256sums skip first entry not last to match source array

Last edited by loqs (2019-04-24 18:11:49)

Offline

#9 2019-04-24 19:18:56

throbscottle
Member
Registered: 2011-11-05
Posts: 55

Re: cloned source dir is not a clone of git...

Hey it worked!
Thanks a quadrillion, people!
I left a comment on the AUR page about the problem, so hope they get round to sorting it out.

Offline

#10 2019-04-24 19:22:52

loqs
Member
Registered: 2014-03-06
Posts: 17,369

Re: cloned source dir is not a clone of git...

If you adopt the package you could make the change.

Offline

#11 2019-04-26 06:05:40

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: cloned source dir is not a clone of git...

Awebb wrote:
Trilby wrote:

Report it to the package maintainer.

That dude None is so annoying. Doesn't take care of his packages!

AFAIK he has been banned, so he cannot.

throbscottle wrote:

Hey it worked!
Thanks a quadrillion, people!
I left a comment on the AUR page about the problem, so hope they get round to sorting it out.

You really should upload your working PKGBUILD.

Offline

#12 2019-04-26 06:30:55

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: cloned source dir is not a clone of git...

throbscottle wrote:

so hope they get round to sorting it out.

There is no 'they' in this situation. That's not how open source works.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

Board footer

Powered by FluxBB