7 Commits

Author SHA1 Message Date
Davlet Panech
3ef97d279c centos7: delete yum.pid after yum-builddep
Pre-dnf yum-builddep leaves a stale yum.pid file behind with its own
process ID. If that PID happens to be reused and match an existing
process, a subsequent yum & co invocation hangs.

Solution: create a wrapper script that deletes the pid file if
necessary.

Change-Id: I821643f576645d78ab1c29cdccefa12740bbc12f
Closes-Bug: 1920805
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
2021-03-25 18:25:23 -04:00
Davlet Panech
290b3ea8d2 Revert "centos7: delete yum.lock after yum-builddep"
This reverts commit 90aa450e427e21e6dbe3fc230c089e909ad19f29.

The original commit breaks the build-iso script.

Change-Id: I73c9bc8e502c8401922d107b0b78cd88511a2a4b
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
2021-03-25 09:58:26 -04:00
Davlet Panech
90aa450e42 centos7: delete yum.lock after yum-builddep
Pre-dnf yum-builddep leaves a stale yum.pid file behind with its own
process ID. If that PID happens to be reused and match an existing
process, a subsequent yum & co invocation hangs.

Solution: create a wrapper script that deletes the pid file if
necessary.

Change-Id: Iee5c6a092835103a5dc52979345fa84e8a36c084
Closes-Bug: 1920805
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
2021-03-23 11:52:13 -04:00
Scott Little
0972ffe246 mock 2.7 requires additional config options
Mock 2.7 defaults to using dnf.

The centos 7 mock config must provide additional
arguements to ensure a sane yum environment.  With
out them it will try to use dnf.

Closes-Bug: 1916275
Signed-off-by: Scott Little <scott.little@windriver.com>
Change-Id: I4801accf05b68e1e0bdf8975d1b4d989fd0a303f
2021-02-25 10:41:20 -05:00
Scott Little
77576b7207 Add support CentOS-8/dnf/mock-2.6 based builds
This update will retain support for CentOS-7/yum/mock-1.4 based builds.
The build environment will be queried to discover which environment
it is building in, and modify the commands we issue accordingly.

In CentOS 8, DNF replaces both YUM and REPOQUERY.
While DNF tries to be a transparent replacement of the old tools,
there are also subtle changes to the supported arguments.

I will provide independent mock.cfg.prototypes for centos7 vs centos8.
Changes in generate-centos-repo.sh under stx-tools will be required to
select the correct prototype.

Add support for mock 2.6. Mock 2.6 is python 3, and it processes the
'root' and 'rootdir' arguments slightly differently.

Also change the order of arguments to tar within default_build_srpm.
The latest tar only honors '--exclude' if it precedes other arguments.

Story: 2006729
Depends-On: https://review.opendev.org/762700
Signed-off-by: Scott Little <scott.little@windriver.com>
Change-Id: I826be2051e535e6a4c08ad17124f453b04210668
2020-12-08 14:13:28 -05:00
Scott Little
09c66cd0d7 Revert "Add support CentOS-8/dnf/mock-2.6 based builds"
This reverts commit c34d5f4b2ebc175c6d271ecf4f748267a6af364b.

Change-Id: I70735e6571d5699fcfff34afef3aa0a31c089c56
Signed-off-by: Scott Little <scott.little@windriver.com>
2020-12-02 13:42:56 -05:00
Scott Little
c34d5f4b2e Add support CentOS-8/dnf/mock-2.6 based builds
This update will retain support for CentOS-7/yum/mock-1.4 based builds.
The build environment will be queried to discover which environment
it is building in, and modify the commands we issue accordingly.

In CentOS 8, DNF replaces both YUM and REPOQUERY.
While DNF tries to be a transparent replacement of the old tools,
there are also subtle changes to the supported arguments.

I will provide independent mock.cfg.prototypes for centos7 vs centos8.
Changes in generate-centos-repo.sh under stx-tools will be required to
select the correct prototype.

Add support for mock 2.6. Mock 2.6 is python 3, and it processes the
'root' and 'rootdir' arguments slightly differently.

Also change the order of arguments to tar within default_build_srpm.
The latest tar only honors '--exclude' if it precedes other arguments.

Story: 2006729
Depends-On: https://review.opendev.org/762700
Change-Id: Ib9b8fe149a405c3b83557c41650175c579a5bb30
Signed-off-by: Scott Little <scott.little@windriver.com>
2020-11-27 13:11:57 -05:00