Re: Mock build Fedora package on CentOS 7
On Sun, Jan 19, 2020 at 2:08 PM Pavel Raiskup wrote: > > On Thursday, January 16, 2020 4:50:09 PM CET Ian Pilcher wrote: > > On 1/16/20 9:39 AM, Miroslav Suchý wrote: > > > https://github.com/rpm-software-management/mock/wiki/Feature-container-for-bootstrap > > > > Right, but it still doesn't work. > > The latest mock/mock-core-configs packages have broken > --use-bootstrap-container > option, you'd have to step one release back to mock 1.4.20, because of this: > > https://github.com/rpm-software-management/mock/issues/394 > > It is also a good chance to try pre-release mock from, it contains many > fixes related to dnf/yum (non-)compatibility: > https://copr.fedorainfracloud.org/coprs/g/mock/mock/ > > Pavel Ian, you may want to borrow my mockrepo building tools to build a local copy of mock itself for version 1.4.20. ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Mock build Fedora package on CentOS 7
On Thursday, January 16, 2020 4:50:09 PM CET Ian Pilcher wrote: > On 1/16/20 9:39 AM, Miroslav Suchý wrote: > > https://github.com/rpm-software-management/mock/wiki/Feature-container-for-bootstrap > > Right, but it still doesn't work. The latest mock/mock-core-configs packages have broken --use-bootstrap-container option, you'd have to step one release back to mock 1.4.20, because of this: https://github.com/rpm-software-management/mock/issues/394 It is also a good chance to try pre-release mock from, it contains many fixes related to dnf/yum (non-)compatibility: https://copr.fedorainfracloud.org/coprs/g/mock/mock/ Pavel ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Mock build Fedora package on CentOS 7
On 1/18/20 12:57 PM, Nico Kadel-Garcia wrote: This is turning into a "debug mock on CentOS" discussion, not a Fedora discussion per se. Please let me know if it should be over in the mock github.com issues instead. Indeed. My original hope was that I was simply missing something that was obvious to folks who do this more often. (I only started on this path because the thunderbird RPM takes so painfully long to rebuild, and my CentOS 7 server is much more powerful than my Fedora workstation.) OTOH, this issue is probably(?) fairly specific to building Fedora packages. I think you're missing some of the options I've suggested for dnf based operating systems, or fedora-31.tmpl in particular in my published mock-core-configs.spec file. And is you "mock" up to the latest reason from EPEL I'll urge you to publish a diff between the RPM published fedora-31.tmpl and yours to isolate the issue. AFAIK, I have the latest version of mock: [root@breadbox templates]# rpm -q mock mock-core-configs mock-1.4.21-1.el7.noarch mock-core-configs-31.7-1.el7.noarch Here is the diff: [root@breadbox templates]# diff -u fedora-31.tpl.orig fedora-31.tpl --- fedora-31.tpl.orig 2019-11-01 09:17:14.0 -0500 +++ fedora-31.tpl 2020-01-18 16:49:47.973139724 -0600 @@ -9,6 +9,8 @@ config_opts['releasever'] = '31' config_opts['package_manager'] = 'dnf' config_opts['bootstrap_image'] = 'fedora:31' +config_opts['use_bootstrap_image'] = True +config_opts['use_bootstrap_container'] = True config_opts['yum.conf'] = """ [main] -- In Soviet Russia, Google searches you! ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Mock build Fedora package on CentOS 7
This is turning into a "debug mock on CentOS" discussion, not a Fedora discussion per se. Please let me know if it should be over in the mock github.com issues instead. On Sat, Jan 18, 2020 at 10:56 AM Ian Pilcher wrote: > > On 1/18/20 5:07 AM, Nico Kadel-Garcia wrote: > > The inserted arguments are order sensitive, and need to be in the > > right place in fedora-31.tmpl on the latest release of mock and > > mock-core-cnfigs. See my notes at: > > > > https://github.com/rpm-software-management/mock/issues/390 > > > > And use this in /etc/mock/templates/fedora-31.tmpl > > > > config_opts['bootstrap_image'] = 'fedora:31' > > config_opts['use_bootstrap_image'] = True > > config_opts['use_bootstrap_container'] = True > > > > This uses podman to download an OS image, installs that, uses that to > > run mock tools to build a new image, etc. It's a bootstrap process, > > it's slow, and I've found it to be burdensome and fragile, not > > allowing operation on certain host server filesystems. And no, I don't > > remember the list of forbidden filesystems. > > I was aware of that issue, but I wasn't aware that it affected the > command-line options. After editing fedora-31.tpl, I can now see mock > pulling the container image and rebuilding the root cache. I don't use the command line options for this. Since I found the selected options in the config files to be order sensitive and unstable unless inserted in certain order in certain places, I don't have complete confidence in the Python command line options and simply write my own config files. Since mock lets you select a locally edited and source controlled config file, this is much safer for me. > Unfortunately, I still get the same error in the end: > > Start: build phase for thunderbird-68.4.1-1.mzbz1526765.fc31.src.rpm > Start: build setup for thunderbird-68.4.1-1.mzbz1526765.fc31.src.rpm > warning: line 206: It's not recommended to have unversioned Obsoletes: > Obsoletes: thunderbird-lightning > warning: extra tokens at the end of %endif directive in line 625: > %endif # build_langpacks Yeah Fedora 31 rpmbuild is a lot nosier about these. > Building target platfms: x86_64 > Building for target x86_64 > setting SOURCE_DATE_EPOCH=157896 > Wrote: /builddir/build/SRPMS/thunderbird-68.4.1-1.mzbz1526765.fc31.src.rpm > Failed to set locale, defaulting to C.UTF-8 > No matches found for the following disable plugin patterns: local, > spacewalk > No such command: builddep. Please use /usr/bin/dnf --help > It could be a DNF plugin command, try: "dnf install > 'dnf-command(builddep)'" > Finish: build setup for thunderbird-68.4.1-1.mzbz1526765.fc31.src.rpm > Finish: build phase for thunderbird-68.4.1-1.mzbz1526765.fc31.src.rpm > ERROR: Exception(thunderbird-68.4.1-1.mzbz1526765.fc31.src.rpm) > Config(fedora-31-x86_64) 3 minutes 5 seconds > INFO: Results and/or logs in: /var/lib/mock/fedora-31-x86_64/result > ERROR: builddep command missing. > Please install package dnf-plugins-core. I think you're missing some of the options I've suggested for dnf based operating systems, or fedora-31.tmpl in particular in my published mock-core-configs.spec file. And is you "mock" up to the latest reason from EPEL I'll urge you to publish a diff between the RPM published fedora-31.tmpl and yours to isolate the issue. ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Mock build Fedora package on CentOS 7
On 1/18/20 5:07 AM, Nico Kadel-Garcia wrote: The inserted arguments are order sensitive, and need to be in the right place in fedora-31.tmpl on the latest release of mock and mock-core-cnfigs. See my notes at: https://github.com/rpm-software-management/mock/issues/390 And use this in /etc/mock/templates/fedora-31.tmpl config_opts['bootstrap_image'] = 'fedora:31' config_opts['use_bootstrap_image'] = True config_opts['use_bootstrap_container'] = True This uses podman to download an OS image, installs that, uses that to run mock tools to build a new image, etc. It's a bootstrap process, it's slow, and I've found it to be burdensome and fragile, not allowing operation on certain host server filesystems. And no, I don't remember the list of forbidden filesystems. I was aware of that issue, but I wasn't aware that it affected the command-line options. After editing fedora-31.tpl, I can now see mock pulling the container image and rebuilding the root cache. Unfortunately, I still get the same error in the end: Start: build phase for thunderbird-68.4.1-1.mzbz1526765.fc31.src.rpm Start: build setup for thunderbird-68.4.1-1.mzbz1526765.fc31.src.rpm warning: line 206: It's not recommended to have unversioned Obsoletes: Obsoletes: thunderbird-lightning warning: extra tokens at the end of %endif directive in line 625: %endif # build_langpacks Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=157896 Wrote: /builddir/build/SRPMS/thunderbird-68.4.1-1.mzbz1526765.fc31.src.rpm Failed to set locale, defaulting to C.UTF-8 No matches found for the following disable plugin patterns: local, spacewalk No such command: builddep. Please use /usr/bin/dnf --help It could be a DNF plugin command, try: "dnf install 'dnf-command(builddep)'" Finish: build setup for thunderbird-68.4.1-1.mzbz1526765.fc31.src.rpm Finish: build phase for thunderbird-68.4.1-1.mzbz1526765.fc31.src.rpm ERROR: Exception(thunderbird-68.4.1-1.mzbz1526765.fc31.src.rpm) Config(fedora-31-x86_64) 3 minutes 5 seconds INFO: Results and/or logs in: /var/lib/mock/fedora-31-x86_64/result ERROR: builddep command missing. Please install package dnf-plugins-core. -- In Soviet Russia, Google searches you! ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Mock build Fedora package on CentOS 7
On Thu, Jan 16, 2020 at 10:50 AM Ian Pilcher wrote: > > On 1/16/20 9:39 AM, Miroslav Suchý wrote: > > https://github.com/rpm-software-management/mock/wiki/Feature-container-for-bootstrap > > Right, but it still doesn't work. > > [pilcher@breadbox ~]$ cat /etc/centos-release > CentOS Linux release 7.7.1908 (Core) > > [pilcher@breadbox ~]$ cd /etc/mock/templates > [pilcher@breadbox templates]$ grep bootstrap_image fedora-31.tpl > config_opts['bootstrap_image'] = 'fedora:31' > > [pilcher@breadbox templates]$ cd > [pilcher@breadbox ~]$ mock --bootstrap-chroot --use-bootstrap-image -r > fedora-31-x86_64 thunderbird-68.4.1-1.mzbz1526765.fc31.src.rpm > INFO: mock.py version 1.4.21 starting (python version = 3.6.8)... The inserted arguments are order sensitive, and need to be in the right place in fedora-31.tmpl on the latest release of mock and mock-core-cnfigs. See my notes at: https://github.com/rpm-software-management/mock/issues/390 And use this in /etc/mock/templates/fedora-31.tmpl config_opts['bootstrap_image'] = 'fedora:31' config_opts['use_bootstrap_image'] = True config_opts['use_bootstrap_container'] = True This uses podman to download an OS image, installs that, uses that to run mock tools to build a new image, etc. It's a bootstrap process, it's slow, and I've found it to be burdensome and fragile, not allowing operation on certain host server filesystems. And no, I don't remember the list of forbidden filesystems. ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Mock build Fedora package on CentOS 7
On 1/16/20 9:39 AM, Miroslav Suchý wrote: https://github.com/rpm-software-management/mock/wiki/Feature-container-for-bootstrap Right, but it still doesn't work. [pilcher@breadbox ~]$ cat /etc/centos-release CentOS Linux release 7.7.1908 (Core) [pilcher@breadbox ~]$ cd /etc/mock/templates [pilcher@breadbox templates]$ grep bootstrap_image fedora-31.tpl config_opts['bootstrap_image'] = 'fedora:31' [pilcher@breadbox templates]$ cd [pilcher@breadbox ~]$ mock --bootstrap-chroot --use-bootstrap-image -r fedora-31-x86_64 thunderbird-68.4.1-1.mzbz1526765.fc31.src.rpm INFO: mock.py version 1.4.21 starting (python version = 3.6.8)... (...) No such command: builddep. Please use /usr/bin/dnf --help It could be a DNF plugin command, try: "dnf install 'dnf-command(builddep)'" Finish: build setup for thunderbird-68.4.1-1.mzbz1526765.fc31.src.rpm Finish: build phase for thunderbird-68.4.1-1.mzbz1526765.fc31.src.rpm ERROR: Exception(thunderbird-68.4.1-1.mzbz1526765.fc31.src.rpm) Config(fedora-31-x86_64) 1 minutes 21 seconds INFO: Results and/or logs in: /var/lib/mock/fedora-31-x86_64/result ERROR: builddep command missing. Please install package dnf-plugins-core. -- In Soviet Russia, Google searches you! ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Mock build Fedora package on CentOS 7
Dne 15. 01. 20 v 18:07 Ian Pilcher napsal(a): > Is $SUBJECT possible these days? > > I've tried with both --bootstrap-chroot and --use-bootstrap-image, but > the build is failing with: > > ERROR: builddep command missing. > Please install package dnf-plugins-core. > > This happens even when the dnf-plugins-core package is installed (from > EPEL) on the CentOS 7 host, probably because the Fedora 31 container > image doesn't include that package. > > Is there a secret incantation to make this work? > https://github.com/rpm-software-management/mock/wiki/Feature-container-for-bootstrap -- Miroslav Suchy, RHCA Red Hat, Associate Manager ABRT/Copr, #brno, #fedora-buildsys ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Mock build Fedora package on CentOS 7
On Thursday, January 16, 2020 6:12:42 AM CET Nico Kadel-Garcia wrote: > On Wed, Jan 15, 2020 at 12:08 PM Ian Pilcher wrote: > There are notes in the "mock" buglists > at:https://github.com/rpm-software-management/mock/issues/390 . The > short answer is "not very well". The dnf tools in RHEL 7 and 8 are > not sufficient to actually run dnf for "mock". There are options to > bootstrap Fedora 31 from a container using "podman" to install the > zstd compressed binary RPM, but it's slow and painful and unreliable > unless you build your entire toolchain from a collection of SRPM's. I have exactly opposite experience with the mock's bootstrap feature based on podman. We use it on our internal service to statically analyze Fedora packages on RHEL-7 hosts and it works perfectly. I am not sure about CentOS 7 though, bug fixes may land there with some delay... > My notes and patches aare available > at:https://github.com/nkadel/mockrep, especially the editing of I guess it should have been: https://github.com/nkadel/mockrepo Kamil > fedora-31.tmpl in the mock-core-configs.spec./ ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Mock build Fedora package on CentOS 7
On Wed, Jan 15, 2020 at 12:08 PM Ian Pilcher wrote: > > Is $SUBJECT possible these days? > > I've tried with both --bootstrap-chroot and --use-bootstrap-image, but > the build is failing with: > >ERROR: builddep command missing. >Please install package dnf-plugins-core. > > This happens even when the dnf-plugins-core package is installed (from > EPEL) on the CentOS 7 host, probably because the Fedora 31 container > image doesn't include that package. There are notes in the "mock" buglists at:https://github.com/rpm-software-management/mock/issues/390 . The short answer is "not very well". The dnf tools in RHEL 7 and 8 are not sufficient to actually run dnf for "mock". There are options to bootstrap Fedora 31 from a container using "podman" to install the zstd compressed binary RPM, but it's slow and painful and unreliable unless you build your entire toolchain from a collection of SRPM's. My notes and patches aare available at:https://github.com/nkadel/mockrep, especially the editing of fedora-31.tmpl in the mock-core-configs.spec./ > Is there a secret incantation to make this work? > > -- > > In Soviet Russia, Google searches you! > > ___ > devel mailing list -- devel@lists.fedoraproject.org > To unsubscribe send an email to devel-le...@lists.fedoraproject.org > Fedora Code of Conduct: > https://docs.fedoraproject.org/en-US/project/code-of-conduct/ > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > List Archives: > https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Mock build Fedora package on CentOS 7
On 1/15/20 1:26 PM, Stephen John Smoogen wrote: On Wed, 15 Jan 2020 at 12:08, Ian Pilcher wrote: Is $SUBJECT possible these days? I've tried with both --bootstrap-chroot and --use-bootstrap-image, but the build is failing with: ERROR: builddep command missing. Please install package dnf-plugins-core. This happens even when the dnf-plugins-core package is installed (from EPEL) on the CentOS 7 host, probably because the Fedora 31 container image doesn't include that package. Is there a secret incantation to make this work? I do not see a dnf-plugins-core in EPEL. I see a dnf-langpacks-conf and so I am not sure what is going on here. I messed up. dnf-plugins-core is actually in Extras. -- In Soviet Russia, Google searches you! ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Mock build Fedora package on CentOS 7
On Wed, 15 Jan 2020 at 12:08, Ian Pilcher wrote: > > Is $SUBJECT possible these days? > > I've tried with both --bootstrap-chroot and --use-bootstrap-image, but > the build is failing with: > >ERROR: builddep command missing. >Please install package dnf-plugins-core. > > This happens even when the dnf-plugins-core package is installed (from > EPEL) on the CentOS 7 host, probably because the Fedora 31 container > image doesn't include that package. > > Is there a secret incantation to make this work? > I do not see a dnf-plugins-core in EPEL. I see a dnf-langpacks-conf and so I am not sure what is going on here. -- Stephen J Smoogen. ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org