Add support for building packages of another arch
Closed this issue · 11 comments
i686 only packages cannot be built or installed on x86_64. This poses a few problems for programs that are 32 bit only (games, Skype, etc.)
Taking skype as the example: Have you the correct rpmbuild options to unconditionally build a i686 package at hand? My basic idea is that we should find a way to specify the rpmbuild options in the lpf package. Basically the, rest of the code should work out of the box, it just looks on what's in the results directory and tries to install it.
I have started a work to add a config file to the lpf package to specifu e. g. rpmbuild options. The tricky point is to avoid breaking the old cli syntax for lpf-setup-package, and that I need to fix some lunch. Basically, be prepared to a new way to invoke lpf-setup-pkg
Could you make an additional parameter for the lpf-setup-pkg and not an additional file? This way we could pass in the spec file which architecture it should be built for.
Loose example; from:
%install
# lpf-setup-pkg [eula] <topdir> <specfile> [sources...]
/usr/share/lpf/scripts/lpf-setup-pkg %{buildroot} %{SOURCE0}
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
To:
# lpf-setup-pkg [eula] <topdir> <specfile> [sources...] [arch,arch..]
/usr/share/lpf/scripts/lpf-setup-pkg %{buildroot} %{SOURCE0} x86_64,i686
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
Or something like that.
Doable. I have just the gut feeling that this is not the last example of something which is needed to configure the build. For now exploring the config fiel path, which gives some more flexibility. But perhaps you're right, just adding an option to lpf-setup-pkg would be better, together with sanitizing the cli syntax.
Question on the latest commits in the i686 branch. Do you think that specifying rpmbuild_opts is a feasible solution when adding support for building both i686 and x86_64 at the same time? Otherwise you have to review all of this later.
Regarding rpmbuild_opts="-bb --target i686-linux-i686-linux"; what is "i686-linux-i686-linux"? I usually pass "i686" only if needed.
On 2013-11-21 15:35, scaronni wrote:
Question on the latest commits in the i686 branch. Do you think that
specifying rpmbuild_opts is a feasible solution when adding support
for building both i686 and x86_64 at the same time? Otherwise you have
to review all of this later.Well, anything can be specified in the config file. And anything could
be tested and acted upon in lpf-install. So basically, this is an
open-ended solution which should be possible to extend (?)
BTW, it might be possibe to hide the config file completely behind a
lpf-setup-package option. That's probably the way we should walk, it's a
cleaner interface.
Regarding rpmbuild_opts="-bb --target i686-linux-i686-linux"; what is
"i686-linux-i686-linux"? I usually pass "i686" only if needed.—
Reply to this email directly or view it on GitHub
#3 (comment).I tried to read the rpmbuild manpage really hard, and this is what i
got. Are you saying that 'rpmbuild -bb --target i686' is enough?
--a
BTW, it might be possibe to hide the config file completely behind a lpf-setup-package option. That's probably the way we should walk, it's a cleaner interface.
I would prefer, it would make the lpf recipe much more readable and easier to mantain.
I tried to read the rpmbuild manpage really hard, and this is what i got. Are you saying that 'rpmbuild -bb --target i686' is enough?
Yes, it is, I use it daily. Actually it was quite handy when Fedora was switching from i386 to i586, RHEL5 was still at i386 and later Fedora and RHEL switched to i686. You can specify any arch that is valid in packages (like i586, armv7hl, x86_64, etc.)
Sorry for closing and reopening (damn touchpad).
Pushed some commits on i686: use parameter to lpf-setup-pkg, use only i386. Updated lpf-skype in examples. More thoughts?
Seems fine to me! I think you added back the skype CONFIG file by mistake in the latest commit.
Let me know when you build in Koji so I can download the package and test skype and the others.
Will do. However, we need fix some other issues before actaully sending this downstream :) Closing this when i686 is merged into master.
Merged, closing