[aur-general] makepkg patch for git@bitbucket.org urls
Hi, Either I am using makepkg or wrong (how?) or I have a patch that might be useful. I was having trouble using this source line: sources=(dolfin::git://git@bitbucket.org:mylese/dolfin.git) which leads to this git command: $ git clone --mirror git://git@bitbucket.org:mylese/dolfin.git /home/myles/tmp/sources/dolfin and this error: "fatal: Unable to look up git@bitbucket.org (port mylese) (Servname not supported for ai_socktype)" Omitting the "git://" protocol, i.e.: sources=(dolfin::git@bitbucket.org:mylese/dolfin.git) leads to the "local" protocol being used and then "==> ERROR: dolfin was not found in the build directory and is not a URL" Changing makepkg like this: diff --git a/makepkg b/makepkg index 45a702e..310e5ef 100755 --- a/makepkg +++ b/makepkg @@ -269,6 +269,10 @@ get_protocol() { # strip leading filename local proto="${1##*::}" printf "%s\n" "${proto%%://*}" + elif [[ $1 = *@bitbucket* ]]; then + # strip leading filename + local proto="${1##*::}" + printf "%s\n" "${proto%%@bitbucket*}" else printf "%s\n" local fi allows this sources line to be used: sources=(dolfin::git@bitbucket.org:mylese/dolfin.git) Myles
On May 3, 2013 5:17 PM, "Myles English" <mylesenglish@gmail.com> wrote:
Hi,
Either I am using makepkg or wrong (how?) or I have a patch that might be useful.
I was having trouble using this source line:
sources=(dolfin::git://git@bitbucket.org:mylese/dolfin.git)
which leads to this git command:
$ git clone --mirror git://git@bitbucket.org:mylese/dolfin.git
/home/myles/tmp/sources/dolfin
and this error:
"fatal: Unable to look up git@bitbucket.org (port mylese) (Servname not supported for ai_socktype)"
Cloning from a private repo doesn't make a whole lot of sense here.
Omitting the "git://" protocol, i.e.:
sources=(dolfin::git@bitbucket.org:mylese/dolfin.git)
leads to the "local" protocol being used and then
"==> ERROR: dolfin was not found in the build directory and is not a URL"
Changing makepkg like this:
diff --git a/makepkg b/makepkg index 45a702e..310e5ef 100755 --- a/makepkg +++ b/makepkg @@ -269,6 +269,10 @@ get_protocol() { # strip leading filename local proto="${1##*::}" printf "%s\n" "${proto%%://*}" + elif [[ $1 = *@bitbucket* ]]; then + # strip leading filename + local proto="${1##*::}" + printf "%s\n" "${proto%%@bitbucket*}"
I really don't think special casing bitbucket is the right "solution" here. Just clone from a public repo.
else printf "%s\n" local fi
allows this sources line to be used:
sources=(dolfin::git@bitbucket.org:mylese/dolfin.git)
Myles
Dave Reisner writes:
On May 3, 2013 5:17 PM, "Myles English" <mylesenglish@gmail.com> wrote:
diff --git a/makepkg b/makepkg index 45a702e..310e5ef 100755 --- a/makepkg +++ b/makepkg @@ -269,6 +269,10 @@ get_protocol() { # strip leading filename local proto="${1##*::}" printf "%s\n" "${proto%%://*}" + elif [[ $1 = *@bitbucket* ]]; then + # strip leading filename + local proto="${1##*::}" + printf "%s\n" "${proto%%@bitbucket*}"
I really don't think special casing bitbucket is the right "solution" here. Just clone from a public repo.
Thanks, yes quite right. Myles
On 05/03/13 at 05:33pm, Dave Reisner wrote:
On May 3, 2013 5:17 PM, "Myles English" <mylesenglish@gmail.com> wrote:
Hi,
Either I am using makepkg or wrong (how?) or I have a patch that might be useful.
I was having trouble using this source line:
sources=(dolfin::git://git@bitbucket.org:mylese/dolfin.git)
which leads to this git command:
$ git clone --mirror git://git@bitbucket.org:mylese/dolfin.git
/home/myles/tmp/sources/dolfin
and this error:
"fatal: Unable to look up git@bitbucket.org (port mylese) (Servname not supported for ai_socktype)"
Cloning from a private repo doesn't make a whole lot of sense here.
Omitting the "git://" protocol, i.e.:
sources=(dolfin::git@bitbucket.org:mylese/dolfin.git)
leads to the "local" protocol being used and then
"==> ERROR: dolfin was not found in the build directory and is not a URL"
Changing makepkg like this:
diff --git a/makepkg b/makepkg index 45a702e..310e5ef 100755 --- a/makepkg +++ b/makepkg @@ -269,6 +269,10 @@ get_protocol() { # strip leading filename local proto="${1##*::}" printf "%s\n" "${proto%%://*}" + elif [[ $1 = *@bitbucket* ]]; then + # strip leading filename + local proto="${1##*::}" + printf "%s\n" "${proto%%@bitbucket*}"
I really don't think special casing bitbucket is the right "solution" here. Just clone from a public repo.
Special casing is definitely not the right solution. We already support private repos through ssh. Just use git+ssh: git+ssh://git@bitbucket.org/andrewgregory/dwm.git
else printf "%s\n" local fi
allows this sources line to be used:
sources=(dolfin::git@bitbucket.org:mylese/dolfin.git)
Myles
Andrew Gregory writes:
Special casing is definitely not the right solution. We already support private repos through ssh. Just use git+ssh:
git+ssh://git@bitbucket.org/andrewgregory/dwm.git
Thanks, that is useful too. Myles
participants (3)
-
Andrew Gregory
-
Dave Reisner
-
Myles English