You are not logged in.

#1 2009-06-02 00:47:19

Mr.Cat
Member
Registered: 2008-09-27
Posts: 79

PKGBUILD for svn /w username and blank pasword

There is an svn repo with username "anonymous" and blank password: http://galinha.ucpel.tche.br/svn/chicke … cken/trunk (this is chicken scheme http://www.call-with-current-continuation.org/). How should I set them up in a PKGBUILD? At archlinux aur irc channel I was offered a workaround:

_svnuser=anonymous
_svnpass="\"\""
_SVN="svn --username ${_svnuser} --password ${_svnpass}"

But makepkg still asks for password (the username is identified correctly) when getting last svn revision.

When working with command line by hand this works fine (with no password asked)

svn --username anonymous --password "" ...

Offline

#2 2009-06-02 00:57:50

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,644
Website

Re: PKGBUILD for svn /w username and blank pasword

Why are you creating variables for this? Why not just use that line directly in the build function?

build() {
  ...
  svn --username anonymous --password "" ...
  ...
}

Offline

#3 2009-06-02 01:14:02

Mr.Cat
Member
Registered: 2008-09-27
Posts: 79

Re: PKGBUILD for svn /w username and blank pasword

Xyne wrote:

Why are you creating variables for this? Why not just use that line directly in the build function?

Because makepkg tries to get last rev. number before executing build function. And if I don't provide makepkg with username and password it will prompt the user when building the package.

Offline

#4 2009-06-02 01:38:24

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,644
Website

Re: PKGBUILD for svn /w username and blank pasword

Can you post the current PKGBUILD?

Offline

#5 2009-06-02 02:02:09

foutrelis
Developer/TU
From: Athens, Greece
Registered: 2008-07-28
Posts: 675
Website

Re: PKGBUILD for svn /w username and blank pasword

Mr.Cat wrote:
Xyne wrote:

Why are you creating variables for this? Why not just use that line directly in the build function?

Because makepkg tries to get last rev. number before executing build function. And if I don't provide makepkg with username and password it will prompt the user when building the package.

Right, I totally forgot that makepkg determines the latest svn revision by calling `svn info'. The variables I suggested to you on IRC and you list in your opening message are pretty much useless (i.e.: not used anywhere in makepkg). :3

So, I guess the solutions to your issue are quite limited:

1) Write a patch for makepkg to include support for variables like _svnuser and _svnpass. This patch may never be accepted and merged, though. If it does, then you would need to wait for a new pacman release.

2) Ask the person in charge of the repository to remove the username and password requirement.

3) Bypass the automatic revision bump by altering the names of _svntrunk and _svnmod variables (makepkg specifically checks if both these variables are set and only then bumps pkgver). I'm not sure how you would go about to build a package with the correct pkgver/pkgrel after that.

1 & 2 are the more straight-forward solutions.

Offline

Board footer

Powered by FluxBB