[SSSD] [RFC] Add basic support for CI test execution

Lukas Slebodnik lslebodn at redhat.com
Fri Jun 13 12:14:04 UTC 2014


On (13/06/14 14:50), Nikolai Kondrashov wrote:
>On 06/13/2014 02:00 PM, Lukas Slebodnik wrote:
>>On (13/06/14 13:40), Nikolai Kondrashov wrote:
>>>On 06/13/2014 10:48 AM, Lukas Slebodnik wrote:
>>>>On (11/06/14 17:29), Nikolai Kondrashov wrote:
>>>>>On 06/11/2014 05:28 PM, Nikolai Kondrashov wrote:
>>>>>>>>A package missing from CI dependencies would be immediately obvious as CI
>>>>>>>>builds would fail and it would be easy to then update the lists.
>>>>>>>RPM dependencies are subset of CI dependencies.
>>>>>>>
>>>>>>>you can install CI dependencies with yum install and sssd dependencies with
>>>>>>>yum-builddep
>>>>>>
>>>>>>Sure, but this will be more complicated than just installing them with
>>>>>>yum-builddep.
>>>>>
>>>>>I meant "yum install" here, of course, sorry.
>>>>
>>>>I asked developers from FreeIPA how they install build dependencies in CI.
>>>>They extract build depdendencies from spec file.
>>>>yub-builddep was not used just simple parsing of spec with grep and awk.
>>>>https://github.com/tbabej/labtool/blob/master/ipa-fun-install-build-dependencies.sh
>>>
>>>Thank you, Lukas.
>>>
>>>This is somewhat better, because it doesn't need trusting "yum-builddep", but
>>>it ignores the .spec file conditionals and possible macro expansion, is
>>>somewhat fragile, still creates additional dependency list source and still
>>>requires duplicating autoconf substitution code, all just for one distribution
>>>family.
>>>
>>My idea was to show that they do not maintain two different source of build
>>dependencies. Situation on FreeIPA is different because they do not need to
>>care about older distribution.
>
>Understood.
>
>However, the fact that someone (who has different situation) does something,
>doesn't mean that it's an efficient thing to do. Could you please provide the
>rationale for your solution, so we can compare benefits and drawbacks and make
>a rational decision? Perhaps I'm biased, or am missing something.
>
I wrote it few times. I do not want to maintain two different list of build
dependencies. The referential and only source should be spec files in contrib
directory. I already proposed few solutionswhich will solve  problem for you
    * yum-builddep
    * obtaining dependencies from src.rpm with rpm.

>>This discussion bring to my mind another test which is missing.
>>You should also test building sssd from src.rpm. Kevin Wright runs
>>nightly builds of sssd master on rhel6. It should be part of CI.
>
>Yes. I'll try adding that to the "DEBUG" build, "full" set, using the
>"prerelease-rpms" and "prerelease-srpm" targets on Red Hat distros.
>
I would prefer to rebuild src.rpm with mock. It will rebuild src.rpm in chroot
with minimal set of dependencies from spec file. I use it for testing very
often.

$ mock --root epel-6-x86_64  --resultdir . --rebuild sssd-1.11.92-0.fc20.src.rpm
$ mock --root fedora-20-x86_64 --resultdir . --rebuild sssd-1.11.92-0.fc20.src.rpm

https://fedoraproject.org/wiki/Using_Mock_to_test_package_builds?rd=Extras/MockTricks

You can create src.rpm without executing configure script
and thus without make srpm. (contrib/fedora/make_srpm.sh)

>>You will be able to extract build dependencies from src.rpm with rpm command
>>and install dependencies with yum. (it will solve your problem with
>>yum-builddep)
>>     e.g. rpm -q -p --requires rpmbuild/SRPMS/sssd-1.11.92-0.fc20.src.rpm
>
>This doesn't produce output which can be used by yum. For example, yum doesn't
>know what to do with "rpmlib(CompressedFileNames)", or with "libdhash-devel >=
>0.4.2", which is a shame, really.
>
that isn't true

[root at host ~]# yum install "libdhash-devel >= 0.4.2"
Loaded plugins: auto-update-debuginfo, langpacks
Package matching libdhash-devel-0.4.3-20.fc20.x86_64 already installed.
Checking for update.
Nothing to do

[root at host ~]# yum install "pkgconfig(ini_config)"
Loaded plugins: auto-update-debuginfo, langpacks
Package matching libini_config-devel-1.0.0.1-20.fc20.x86_64 already installed.
Checking for update.
Nothing to do

and "rpmlib(*)" can be filtered out.
It is more difficult way than yum-builddep but it is doable.

LS



More information about the sssd-devel mailing list