Re: building RPMs locally

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 5, 2020 at 1:23 AM Deepika Upadhyay <dupadhya@xxxxxxxxxx> wrote:
>
> Hey Yuval,
>
> Centos 8 might be most stable for rpmbuild, according to my observation in recent trials.

Sorry you'll get this twice Deepika.

I'd also suggest using mock to build rpms for Centos, rhel, and
opensuse since it should be more consistent in the long run and should
also be the simplest solution.

We may need to tweak some profiles and fix the odd build issue that
turns up but that sounds much more appealing than tracking down build
issues on individual's custom machines.

For example, I tested a centos8 build and I needed to create the
following file that combines use of the stream and epel repos to be
able to access all of the required build dependencies.

$ cat << EOF > centos-8-ceph.build.cfg
include('templates/centos-8.tpl')
include('templates/centos-stream.tpl')
include('templates/epel-8.tpl')

config_opts['root'] = 'epel-8-x86_64'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
EOF

$ mock -r centos-8-ceph.build.cfg --rootdir=~/working/scratch/mock
--rebuild ceph-16.0.0-6854.g718f1f97317.fc32.src.rpm


>
> On Wed, Nov 4, 2020 at 8:16 PM Yuval Lifshitz <ylifshit@xxxxxxxxxx> wrote:
>>
>> got it. Is this a fedora specific issue?
>> should I try doing that on ubuntu?
>>
>> On Tue, Nov 3, 2020 at 11:35 PM Brad Hubbard <bhubbard@xxxxxxxxxx> wrote:
>>>
>>> On Wed, Nov 4, 2020 at 1:03 AM Yuval Lifshitz <ylifshit@xxxxxxxxxx> wrote:
>>> >
>>> > Hi Brad,
>>> > Thanks for the help!
>>> > but now i ran into this issue: https://tracker.ceph.com/issues/48078 as cmake is now failing with:
>>> > "
>>> > CMake Error at cmake/modules/CephChecks.cmake:140 (message):
>>> >   Unaligned access is required
>>> > "
>>> > in the ticket you mention that this is not happening with "in tree" rpmbuild. How do I perform that?
>>>
>>> An "in tree" build is a normal build in the source tree (as opposed to
>>> building using rpmbuild). There is something about the rpmbuild
>>> environment that is contributing to the issue but I haven't been able
>>> to work out what exactly the problem is so far.
>>>
>>> >
>>> > Yuval
>>> >
>>> > On Tue, Nov 3, 2020 at 2:45 AM Brad Hubbard <bhubbard@xxxxxxxxxx> wrote:
>>> >>
>>> >> On Tue, Nov 3, 2020 at 2:20 AM Yuval Lifshitz <ylifshit@xxxxxxxxxx> wrote:
>>> >> >
>>> >> > Dear Community,
>>> >>
>>> >> Hi Yuval,
>>> >>
>>> >> > As part of the work to add AWS endpoints to RGW bucket notifications [1], I'm trying to figure out how to package the AWS libraries that we generate in the submodule.
>>> >> >
>>> >> > So, my first step is to try and see how packaging works regardless of the AWS PR (just on master). I'm trying to follow the instructions from our docs [2], but these instructions seem to indicate that the code tarball needs to be downloaded from our official location (although the instructions also ask to clone ceph locally). Instead I used the "make-dist" script to generate the tarball locally, and continued with the instructions using that tarball instead of the downloaded one.
>>> >> >
>>> >> > This worked to some point, but I started receiving 2 kinds of issues:
>>> >> > One (seems like a warning):
>>> >> > "
>>> >> > /usr/bin/gdb.minimal: warning: Could not complete Guile gdb module initialization from: /usr/share/gdb/guile/gdb/boot.scm.
>>> >>
>>> >> If it's complaining about not being able to find
>>> >> /usr/share/gdb/guile/gdb/boot.scm (as in the BZ) you could try
>>> >> installing gdb-headlessbut it looks like a bit of a harmless warning
>>> >> AFAICT.
>>> >>
>>> >> > "
>>> >> > Probably related to this BZ [3], but could not figure out what to do to solve it
>>> >> >
>>> >> > The other is an error with rpath causign the process to fail:
>>> >> > "
>>> >> > ERROR   0002: file '/app/lib64/ceph/libceph-common.so.2' contains an invalid rpath '/app/lib64/ceph' in [/app/lib64/ceph]
>>> >> > ERROR   0002: file '/app/lib64/ceph/librbd/libceph_librbd_parent_cache.so.1.0.0' contains an invalid rpath '/app/lib64/ceph' in [/app/lib64/ceph]
>>> >> > ERROR   0002: file '/app/lib64/libcephfs.so.2.0.0' contains an invalid rpath '/app/lib64/ceph' in [/app/lib64/ceph]
>>> >> > ...
>>> >> > "
>>> >> >
>>> >> > Would appreciate any advice on that.
>>> >>
>>> >> This is due to the following.
>>> >>
>>> >> $ rpm --eval "%{_prefix}"
>>> >> /app
>>> >>
>>> >> $ rpm --showrc | grep "^Macro path:"
>>> >> Macro path: /usr/lib/rpm/macros:/usr/lib/rpm/macros.d/macros.*:/usr/lib/rpm/platform/%{_target}/macros:/usr/lib/rpm/fileattrs/*.attr:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros
>>> >>
>>> >> $ ag "%_prefix.*app" /usr/lib/rpm/ /etc/rpm/
>>> >> /etc/rpm/macros.flatpak
>>> >> 2:%_prefix      /app
>>> >>
>>> >> $ rpm -qf /etc/rpm/macros.flatpak
>>> >> flatpak-rpm-macros-32-2.fc32.x86_64
>>> >>
>>> >> So you could uninstall flatpak-rpm-macros or you can add the following
>>> >> line to ~/.rpmmacros to override the definition.
>>> >>
>>> >> %_prefix             /usr
>>> >>
>>> >> The way I normally create rpms is by running the following.
>>> >>
>>> >> $ rpmdev-wipetree
>>> >> $ ./make-srpm.sh
>>> >> $ rpm -ivh ceph-15.0.0-19449.g161b7e118b4.fc32.src.rpm
>>> >> $ rpmbuild -ba ~/working/rpmbuild/SPECS/ceph.spec
>>> >>
>>> >> There are other options available as well such as using mock profiles
>>> >> [0] to build the srpm and/or uploading to copr [1] or similar to allow
>>> >> the rpms to be built there. Of course you could also do these builds
>>> >> in containers.
>>> >>
>>> >> Let me know if I can be of any further help.
>>> >>
>>> >> [0] https://fedoraproject.org/wiki/Using_Mock_to_test_package_builds
>>> >> [1] https://copr.fedorainfracloud.org/coprs/badone/
>>> >>
>>> >> >
>>> >> > Yuval
>>> >> >
>>> >> > [1] https://github.com/ceph/ceph/pull/36062
>>> >> > [2] https://docs.ceph.com/en/latest/install/build-ceph/?highlight=rpmbuild#rpm-package-manager
>>> >> > [3] https://bugzilla.redhat.com/show_bug.cgi?id=1801144
>>> >> > _______________________________________________
>>> >> > Dev mailing list -- dev@xxxxxxx
>>> >> > To unsubscribe send an email to dev-leave@xxxxxxx
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Cheers,
>>> >> Brad
>>> >>
>>>
>>>
>>> --
>>> Cheers,
>>> Brad
>>>
>> _______________________________________________
>> Dev mailing list -- dev@xxxxxxx
>> To unsubscribe send an email to dev-leave@xxxxxxx



--
Cheers,
Brad
_______________________________________________
Dev mailing list -- dev@xxxxxxx
To unsubscribe send an email to dev-leave@xxxxxxx



[Index of Archives]     [CEPH Users]     [Ceph Devel]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux