You are not logged in.

#1 2007-11-25 21:05:56

simon1tan
Member
Registered: 2007-02-07
Posts: 5

newbie question about uploading package

I've build a package:  "makepkg PKGBUILD" which creates foo-i686.pkg.tar.gz

I was reading the Arch Packing Standards and it says I have to create a separate tar file containing:
foo/PKGBUILD
foo/foo.install
foo/foo_bar.diff
foo/foo.rc.conf

Now I'm supposed to upload both files? How come makepkg doesn't just include PKGBUILD and the other files into foo-i686.pkg.tar.gz.  There must be a reason.  How about makepkg create the tar file for me at least.

Offline

#2 2007-11-26 13:47:17

djscholl
Member
From: Michigan, USA
Registered: 2006-05-24
Posts: 56

Re: newbie question about uploading package

Don't worry, this is part of the usual learning curve for Arch. There are three different tarballs related to the AUR, and you have not yet recognized this distinction.

1. The tarball that you upload to the AUR. This tarball contains the PKGBUILD, the install file, and any other small files that you add as packager, such as desktop files, patches, etc. The contents of this tarball must be human-readable (you can try searching the forums for extended threads on the precise meaning of that phrase). In practice, it means that a TU needs to be able to read the contents and be confident that they will not harm someone's system. All of the contents of this tarball must be reflected in the PKGBUILD in some way. This tarball does not contain any compiled binaries, and it does not contain the official source code for the package. Its name is foo.tar.gz, with no version number and no architecture.

2. The official source code tarball to be downloaded from the author's or project's home page.

3. The tarball that you create with makepkg. This is a binary package ready to be installed by pacman. Its contents are compiled and ready to be copied into place on your system. Its name includes a version number, (in some cases) an architecture, and the abbreviation "pkg".

To summarize, you start by unpacking foo.tar.gz (tarball 1). makepkg reads the unpacked contents of foo.tar.gz (tarball 1), downloads foo-1.1.tar.gz (tarball 2), compiles the source code, and creates foo-1.1-i686.pkg.tar.gz (tarball 3). Note that 64-bit binary packages will have "x86-64" instead of "i686". pacman reads tarball 3 and copies the contents onto your system where they can be run.

I don't know of an automated method for creating foo.tar.gz (tarball 1). I just put the files I want to upload in directory foo and run "tar -zcf foo.tar.gz ./foo". The information needed to do this automatically can, in principle, be extracted from the PKGBUILD, so maybe someone else knows of such a tool. I'm not prepared to speculate whether the maintainers of makepkg would consider such functionality a useful addition to makepkg or a violation of the keep-it-simple principle. There may have already been a discussion of this possibility, so you might search the bug tracker for feature requests, search the forums, or search the mailing lists.

Feel free to post your PKGBUILD and ask for help if you're not confident about the contents.

Offline

#3 2007-11-26 14:17:19

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: newbie question about uploading package

djscholl: That's a very clear and well-written post, well done! Perhaps you should add it to one of the ABS or AUR pages on the wiki.

Dusty

Offline

#4 2007-11-26 15:04:12

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: newbie question about uploading package

Not all packages are destined for the AUR, so automated AUR tarball creation by makepkg would be overkill. There are various user-contributed tools for interacting with the AUR - you'll find them in the AUR (of course smile ). Perhaps one of them provides this functionality.

Offline

#5 2007-11-26 16:50:18

simon1tan
Member
Registered: 2007-02-07
Posts: 5

Re: newbie question about uploading package

Ok, then I think I did it right. I got everything compiled alright, generated foo.pkg.tar.gz.  I was able to pack and upload the PKGBUILD tar file.  The thing that confused me was where I upload the compiled
binary. I guess using the PKGBUILD file, people can automatically download and compile for themselves.

I just realized that only Trusted Users can upload binaries.  Ooo., how about an automated compilation solution where a Trusted User checks/verifies an uploaded PKGBUILD package, sends it to be compiled and stores it in community repository to be shared.  I guess you've heard that one before smile

Thanks all.

Offline

#6 2007-11-27 10:25:27

ReaphSharc
Member
From: the Netherlands
Registered: 2007-11-05
Posts: 138
Website

Re: newbie question about uploading package

simon1tan wrote:

I just realized that only Trusted Users can upload binaries.  Ooo., how about an automated compilation solution where a Trusted User checks/verifies an uploaded PKGBUILD package, sends it to be compiled and stores it in community repository to be shared.  I guess you've heard that one before smile

I'm also quite new to ARch, so I can't truthfully say I have, but if Arch would implement your plan, they'll need a hell of a lot more Trusted Users with too much spare time. big_smile


Do you want a Bubble Icon? Feel free to submit your requests or personal creations to be included in future releases.
I'm 100% Linux!

Offline

#7 2007-11-30 20:55:35

simon1tan
Member
Registered: 2007-02-07
Posts: 5

Re: newbie question about uploading package

I'm assuming Trusted Users are already verifying packages now.  I'm NOT saying Trusted Users should verify more than what they are already doing now.  Just the packages that have been verified should be sent to be compiled.  Even if only one package is verified for the month and is ready to be compiled, then compile it so the rest of the community can benefit.

With packages that are marked verified by the Trusted Users, a script can get the build file, download source, compile, store binary in community.

Offline

Board footer

Powered by FluxBB