PDA

View Full Version : 2.5.0.p1 on SLES9 x86_64



charles
May 5th, 2006, 02:51 AM
Hi all,

I built a rpm from the sources for a x86_64 on SLES9 SP3.

Following changes in amanda.spec:

....
%define LIBDIR %{PREFIX}/lib64
....
CFLAGS="$RPM_OPT_FLAGS"
CXXFLAGS="$RPM_OPT_FLAGS"
...

When I used the original *.spec...I got many error's.
I don't know is that right what I done,but it works to build a rpm for x86_64

jdunn
July 13th, 2006, 08:45 PM
I had the following problems rebuilding from SRPM on Fedora Core 5 x86_64:

1) For some reason %packer wasn't defined after this

%define packer %(%{__id_u} -n)

I'm not sure if the macro is missing (didn't have time to investigate) but I replaced it with

%define packer %(/usr/bin/id -u -n)

2) LIBDIR is assumed to be /usr/lib so I had to fix it with:

-%define LIBDIR %{EPREFIX}/lib
+%define LIBDIR %{EPREFIX}/lib64

3) CFLAGS were hardcoded to produce 32-bit executables which I don't want to do (and anyway my gcc won't do that out of the box) so I had to apply this

-CFLAGS="%{optflags} -m32" CXXFLAGS="%{optflags} -m32" \
+CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" \

4) Manual pages are not gzipped after building but the packing list shows them as being gzipped, so I had to remove all the .gz extensions from the packing list

Also I am not sure what is the purpose of the rpm-Makefiles.patch.gz; it goes and makes patches like

for p in $$list; do \
pa=$(DESTDIR)$(libexecdir)/`echo $$p|sed '$(transform)'`; \
echo chown $(BINARY_OWNER) $$pa; \
chown $(BINARY_OWNER) $$pa; \
- echo chgrp $(SETUID_GROUP) $$pa; \
- chgrp $(SETUID_GROUP) $$pa; \
+ echo chgrp $(BINARY_OWNER) $$pa; \
+ chgrp $(BINARY_OWNER) $$pa; \
done

But that assumes that the packer's username also has a matching group, which isn't the case on my system, so the build failed (I had to add a cruft group matching my username to make the build work)

paddy
July 16th, 2006, 06:50 PM
Charles, Jdunn,

Thanks for the feedback on the amanda.spec file. So far, we have built
only 32 bit amanda binaries even for 64 bit platforms. I will incorporate the
amanda.spec changes and it will build 64 bit executables based on a
define.

rpm-Makefiles.patch patches the Makefiles.am so that the user does not have
to be superuser. This patch will allow any user to build rpms. It does make
an assumption that build user name matches the group name.

Paddy

jdunn
July 27th, 2006, 06:56 AM
rpm-Makefiles.patch patches the Makefiles.am so that the user does not have
to be superuser. This patch will allow any user to build rpms. It does make
an assumption that build user name matches the group name.

Couldn't you just patch the Makefile.am to stop trying to chown binaries at all? Since you [can] specify the ultimate owner/group through the RPM packing list, the UID/GID that the local build files have is irrelevant.

- Julian

paddy
July 27th, 2006, 07:12 AM
Julian,

Thanks for the suggestion. We will make the change to the patch in the
next release.

Paddy