You are not logged in.

#1 2008-10-23 21:13:26

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

[solved]packages and architectures

How do you make a package from a PKGBUILD that specifies "any" in the architecture field so that the same pkg tarball can be installed on any system. I.e. how do you get makepkg to create "any.pkg.tar.gz" instead of "local_architecture.pkg.tar.gz"?

I didn't find anything in the makepkg man page or the wiki, but I'm sure that I've seen some doc pkgs that had this in the pkg file name. If I've imagined this, how do you create an i686 pkg from an x86_64 machine and vice versa when the pkg itself is architecture-independent?

EDIT
Rephrased the question to make it clearer.

EDIT 2
The behavior is exactly as one would logically expect...
"arch=('any')" generates an "-any.pkg.tar.gz" pkg
"arch=('i686' 'x86_64')" generates an "-<architecture>.pkg.tar.gz" pkg

I was so sure that the PKGBUILD specified 'any' that I didn't bother to double-check, hence my confused and stupid question.

Last edited by Xyne (2008-10-24 22:57:39)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#2 2008-10-23 22:31:42

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: [solved]packages and architectures

Xyne wrote:

How do you make a package that supports "any" architecture, i.e. get a makepkg to create "pkg.any.tar.gz" instead of "pkg.local_architecture.tar.gz"?

You put
arch=('any')
in the PKGBUILD.

Xyne wrote:

If I've imagined this, how do you create an i686 pkg from an x86_64 machine and vice versa when the pkg itself is architecture-independent?

The 'package' is just a tarred bunch of files. If they are arch independent, then it's just about the filename, and about the file with the name .PKGINFO in the root of the tarball - you can edit that and change the "arch= ..." line. So although it's possible, why would you want to do that?

Offline

#3 2008-10-23 22:39:09

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [solved]packages and architectures

I already have 'any' in the PKGBUILD. The reason would be simplify pkg distribution. I know that the files are architecture-agnostic, which is why I figured there would be a less tedious way than opening the tarball and manually editing the .PKGINFO file. It would be simple enough to write a quick script to do it, but I still suspect that there's some cleaner way.

Thanks for the reply all the same.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#4 2008-10-23 22:42:33

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: [solved]packages and architectures

I guess I didn't get your question then. I don't know of any cleaner way of cross-creating packages. Maybe someone does. I need to get some sleep instead of bothering you with useless posts...

Offline

#5 2008-10-23 22:45:28

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [solved]packages and architectures

That was my fault. I just edited the OP after I reread my question. Sorry about that. Your reply was valid for the way my question was phrased.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#6 2008-10-24 20:15:32

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: [solved]packages and architectures

If the architecture is set to 'any', you should be able to -U the package on any system? Does this not work?

Offline

#7 2008-10-24 21:46:04

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [solved]packages and architectures

I don't know. I haven't tried it because I only have Arch on one system here. If that's the case though, then all I should need to change is the pkg tarball file name, correct? I'll try to get around to testing this soon by creating a minirepo for powerpill and maybe a few other scripts (which are all architecture-independent). *

Would it be worth filing a feature request for makepkg to create "any.tar.gz" packages? From what I've seen, packages which compile to architecture-dependent binaries tend to have "(i686 x86_64)" rather than "any", so there shouldn't be any problem with such behavior.

Thoughts?

*edit: which would only be cosmetic

Last edited by Xyne (2008-10-24 21:46:51)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#8 2008-10-24 22:37:39

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [solved]packages and architectures

A package tarball that's built with the architecture specified as 'any' comes out in the form of $pkgname-$pkgver-$pkgrel-any.pkg.tar.gz, so it already works the way you want (if I'm understanding you correctly).


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#9 2008-10-24 22:50:19

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [solved]packages and architectures

Hi, my name is Xyne, and apparently I'm an idiot.
*facepalms*

I posted this thread because I noticed that my powerpill PKGBUILD always generated an x86_64 package while I knew it should be 'any'. Of course, having been so sure that it was 'any', I didn't actually bother to double-check that the line said ('any'). It turns out that it was specified as ('i686' 'x86_64'), so the behavior is exactly what one would logically expect.

In my defence though, that PKGBUILD was orignally created by someone else for powerpill and I've only changed a few things for each update... but yeah, I'm completely absent-minded sometimes.

Sorry for wasting the time of anyone who read this thread.

Last edited by Xyne (2008-10-24 22:58:03)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#10 2008-10-24 22:59:17

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [solved]packages and architectures

Xyne wrote:

... but yeah, I'm completely absent-minded sometimes.

aren't we all wink


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#11 2008-10-24 23:01:25

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [solved]packages and architectures

creslin wrote:

aren't we all wink

Sure, but luckily most of us avoid committing evidence of it to threads that will last for years. hmm


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB