You are not logged in.
The idea is the following:
The actual PKGBUILD for the project is hosted on github where people can fork and edit it.
This would mean that the maintainer of the pkgbuild would have to sync it to aur everytime it has been updated.
To solve this, I thought about a pkgbuild which updates itself:
UPDATE
pkgname=(test)
pkgver=1
pkgrel=1
arch=('any')
url='http://www.example.com/'
license=('GPL')
build() {
cd ../
curl http://aur.archlinux.org/packages/al/alsi/PKGBUILD > PKGBUILD
echo "# above you can see the PKGBUILD which is goint go be build" >> PKGBUILD
echo "# press q to continue" >> PKGBUILD
echo "# press ctrl + c and then q to abort" >> PKGBUILD
cat PKGBUILD | less || exit
makepkg
true
exit
}
package() {
true
exit
}My question is if this is allowed or if the pkgbuild would be removed from aur due to violation of some terms or whatever.
Any comments?
Old version:
pkgname=(test)
pkgver=1
pkgrel=1
arch=('any')
url='http://www.example.com/'
license=('GPL')
build() {
cd ../
#destination to upstream PKGBUILD, chose that one as an example
curl http://aur.archlinux.org/packages/al/alsi/PKGBUILD > PKGBUILD
makepkg
true
exit
}
package() {
true
exit
}Last edited by matthiaskrgr (2012-04-08 20:37:15)
Offline
The actual PKGBUILD for the project is hosted on github where people can fork and edit it.
Why can't the other, forked projects upload their own PKGBUILDs?
What edits to the PKGBUILD are we talking about?
Offline
I don't think matthiaskrgr wasn't talking about updating the PKGBUILD because of the forks. I think the OP only named a github feature, in the way you introduce something completely new to an audience. The PKGBUILD updates itself the moment the project changes on github and requires an update to the PKGBUILD, or better: The PKGBUILD in the AUR is only a dummy that fetches the PKGBUILD from the github page and installs it.
I'm not sure if I like this.
Offline
I would hope these didn't become common. How many levels of makepkg recursion would be allowed? How would you know if you were about to try to run makepkg on an infinitely recursive PKGBUILD?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
So it's all because someone wants to automate updating PKGBUILDs in the AUR?
Offline
Guess it might work for -git packages that don't really have version numbers but rather users are expected to track them as they wish.
For ordinary packages, however -- how would the version number of the PKGBUILD in AUR ever get changed? Imagine the author releases a new version of the package, the PKGBUILD on Github gets updated, but the AUR one stays the same -- users won't even notice the update unless they explicitely track the Github PKGBUILD. AUR helpers won't notice as the AUR PKGBUILD still lists exactly the same version. So to fix this, you'd have to bump the AUR PKGBUILD each time a new version is released. But then you can just upload the whole PKGBUILD from Github to AUR since you're already messing with it anyway.
Offline
My thoughts exactly.
You should also inspect the PKGBUILD before using it. How would that work in this scenario?
Offline
Guess it might work for -git packages that don't really have version numbers but rather users are expected to track them as they wish.
For ordinary packages, however -- how would the version number of the PKGBUILD in AUR ever get changed? Imagine the author releases a new version of the package, the PKGBUILD on Github gets updated, but the AUR one stays the same -- users won't even notice the update unless they explicitely track the Github PKGBUILD. AUR helpers won't notice as the AUR PKGBUILD still lists exactly the same version. So to fix this, you'd have to bump the AUR PKGBUILD each time a new version is released. But then you can just upload the whole PKGBUILD from Github to AUR since you're already messing with it anyway.
Indeed, I only had the -git (or -svn) packages in mind as usecase. For packages with "regular" release-cycles, this won't make much sense.
Offline
In that case, it doesn't seem very useful either. These -git/-svn PKGBUILDs generally only do a git pull and then launch the build script. There's not much surface for a change to justify this in my opinion. Especially since the build script itself is going to be pulled from the repo.
Are you trying to solve some concrete problem or are you just toying around with ideas here?
Offline
My thoughts exactly.
You should also inspect the PKGBUILD before using it. How would that work in this scenario?
pkgname=(test)
pkgver=1
pkgrel=1
arch=('any')
url='http://www.example.com/'
license=('GPL')
build() {
cd ../
curl http://aur.archlinux.org/packages/al/alsi/PKGBUILD > PKGBUILD
echo "# above you can see the PKGBUILD which is goint go be build" >> PKGBUILD
echo "# press q to continue" >> PKGBUILD
echo "# press ctrl + c and then q to abort" >> PKGBUILD
cat PKGBUILD | less || exit
makepkg
true
exit
}
package() {
true
exit
}Offline
OK, but why not just update the PKGBUILD the usual way?
I see a useless cat instead of an $EDITOR and calling makepkg from inside the PKGBUILD ... hmmmm.
I know what does 'cd ../' do, but why??
Oh, I think it's not a complete PKGBUILD but one that deals with my question about viewing the final PKGBUILD. OK then.
Last edited by karol (2012-04-08 19:34:29)
Offline
I think it defeats the purpose of the AUR.
Best place to ask is the AUR mailing list.
Last edited by .:B:. (2012-04-08 19:45:31)
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
In that case, it doesn't seem very useful either. These -git/-svn PKGBUILDs generally only do a git pull and then launch the build script. There's not much surface for a change to justify this in my opinion. Especially since the build script itself is going to be pulled from the repo.
Mmhh.
Well, there could be some pkgbuild which first pulls the git repo, then moves the cd's itself into the the location of the pkgbuild, cp's the .git dir of the original pulled repo into the current dir (so we don't need to download the entire repo again) and then runs makepkg.
But this would be a makepkg within a makepkg again.
Are you trying to solve some concrete problem or are you just toying around with ideas here?
Well, I think it ends up to be more like playing around now. ![]()
Offline
OK, but why not just update the PKGBUILD the usual way?
I see a useless cat instead of an $EDITOR and calling makepkg from inside the PKGBUILD ... hmmmm.
I know what does 'cd ../' do, but why??
Oh, I think it's not a complete PKGBUILD but one that deals with my question about viewing the final PKGBUILD. OK then.
Mmh, the $EDITOR is a nice idea but I don't seem to be able to easily terminate the process using nano.
Without the second makepkg, the "new" pkgbuild isn't build.
Offline
I got as far as
build() {
cd ../
#destination to upstream PKGBUILD, chose that one as an example
curl http://aur.archlinux.org/packages/al/alsi/PKGBUILD > PKGBUILD
makepkg
true
exit
}but couldn't read any further, as a result of mental and physical incapacitation caused by excessive lol'ing, rofl'ing, and lmao'ing.
Offline
That's all fine and dandy until I go postal and commit 'rm -rf /' in the PKGBUILD.
Offline
That's all fine and dandy until I go postal and commit 'rm -rf /' in the PKGBUILD.
quote from the aur page
"Unsupported packages are user produced content. Any use of the provided files is at your own risk."
Also one should never run makepkg as su... ![]()
Offline
And normally people can look at the PKGBUILD before trying to build it, while your pkgbuild passes off to another pkgbuild at a different location. Yes people should then look at that other pkgbuild, but then why would they use the one you upload to the AUR in that case?
If all you're trying to do is keep things synced with a git you can use the standard git pkgbuild that already exists and downloads the latest changes before building.
Offline
No no no no and no. PKGBUILDs should never change as they're being built with the exception of packages that track development branches (subversion, git, etc.)
Offline