Re: Differences between Fakeroot and Mock Suggested method
On Mon, 2013-10-28 at 04:37 +0100, Jan Kratochvil wrote: On Fri, 25 Oct 2013 01:07:15 +0200, Adam Williamson wrote: generate the SRPM and do 'koji build --scratch fXX blah.src.rpm' , where You would have to rpmbuild -bs *.spec first to get blash.src.rpm. Yes. That's what 'generate the SRPM' means. It is done all by: fedpkg build --scratch --srpm But you can only really do that with a package that actually exists in the SCM tree; I'm quite often working with one that doesn't. The problem is that it uploads the whole multi-MB .src.rpm which is too slow on common ADSL lines (mine has 256kbit/s upload, some have 512kbit/s upload). Hrm, that's a point; for many packages it's not that big, but for some it is significant, and I am a bit spoiled by my 5Mb/sec upload pipe... -- Adam Williamson Fedora QA Community Monkey IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net http://www.happyassassin.net -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: Differences between Fakeroot and Mock Suggested method
On Fri, 25 Oct 2013 01:07:15 +0200, Adam Williamson wrote: generate the SRPM and do 'koji build --scratch fXX blah.src.rpm' , where You would have to rpmbuild -bs *.spec first to get blash.src.rpm. It is done all by: fedpkg build --scratch --srpm The problem is that it uploads the whole multi-MB .src.rpm which is too slow on common ADSL lines (mine has 256kbit/s upload, some have 512kbit/s upload). This is why I have to 'git diff' the changes to a server on backbone and run fedpkg from there. Which is no longer so much convenient / easy. fedpkg could do some such diff against the repository state on its own but that would sure needed also appropriate support on the Koji server side. Jan -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: Differences between Fakeroot and Mock Suggested method
On Fri, Oct 25, 2013 at 2:07 AM, Adam Williamson awill...@redhat.com wrote: The koji builders are usually faster than your system anyway Maybe, if building only a specific arch (e.g. koji build --arch-override=x86_64). The arm builders tend to be quite slow in the first place, and I don't think it helps that for some reason they end up doing most if not all noarch builds entirely as well as a lot of buildSRPMFromSCM and tagBuild tasks for arch specific builds. I suppose the reason has something to do with alphabetic ordering of arches or builder names, at least that's IIRC what the explanation was when ppc builders were in the mix, the slowest ones in the first place, and they ended up doing the extra tasks that arm ones do now... -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: Differences between Fakeroot and Mock Suggested method
On Fri, 2013-10-25 at 11:24 +0300, Ville Skyttä wrote: On Fri, Oct 25, 2013 at 2:07 AM, Adam Williamson awill...@redhat.com wrote: The koji builders are usually faster than your system anyway Maybe, if building only a specific arch (e.g. koji build --arch-override=x86_64). The arm builders tend to be quite slow in the first place, You can download the RPMs from any arch as soon as it completes; you don't have to wait for ARM to finish. -- Adam Williamson Fedora QA Community Monkey IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net http://www.happyassassin.net -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: Differences between Fakeroot and Mock Suggested method
On Thu, 2013-10-10 at 16:31 +0100, Richard W.M. Jones wrote: You don't really need to use mock either. Just use 'rpmbuild -ba' directly or 'fedpkg local' which is a wrapper. You don't need to, but there are a few reasons it's superior: 1) Your local environment is almost certainly dirty in multiple ways. You likely have far more -devel packages installed than would be installed for a 'clean' build of the package. This can, for instance, hide the fact that you're missing BuildRequires in your spec, if you happen to have the missing BRs installed. You may also have non-stock versions of some packages installed that you've forgotten about, packages from third-party repos etc, all of which may result in builds working differently than they would in a 'proper' build. 2) Having a whole RPM build environment and all the -devels you'll build up over a few months/years of package builds installed sure wastes your disk space and makes your 'yum updates' needlessly intensive on time, space and bandwidth. I stopped doing local package builds entirely years ago; these days I rarely even bother using mock, as that still results in considerable use of local bandwidth and storage (though less than maintaining a dirty, persistent local build environment). I just do koji scratch builds in most cases. The koji builders are usually faster than your system anyway, so you often get your builds back faster than you would doing them locally, and it's very very easy to fire a scratch build. Just generate the SRPM and do 'koji build --scratch fXX blah.src.rpm' , where XX is the Fedora you want to build for (or use 'rawhide' for a Rawhide build, IIRC). There's only a few times a scratch build isn't practical: if you're doing a set of chained builds, you can't use scratch builds, as you can't have one scratch build build against another scratch build. In this case I use mock: copy the mock .cfg file for the release you want to build against to create a variant mock definition, add in a repository definition for a side repo containing the package(s) you need to build against to the variant .cfg, and run mock against that .cfg. Also, it's against policy to build anything 'forbidden' as a scratch build (e.g. patent-encumbered / non-free stuff), though it's fine to build something which isn't a part of Fedora but doesn't violate any Fedora policies AIUI. Using mock and scratch builds is really pretty easy and painless, and will result in far less 'crap, it built for me, why isn't it building in Koji?'-type situations. -- Adam Williamson Fedora QA Community Monkey IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net http://www.happyassassin.net -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: Differences between Fakeroot and Mock Suggested method
On Thu, 2013-10-24 at 16:07 -0700, Adam Williamson wrote: There's only a few times a scratch build isn't practical: if you're doing a set of chained builds, you can't use scratch builds, as you can't have one scratch build build against another scratch build. In this case I use mock: copy the mock .cfg file for the release you want Oh, there's also the case where a build is failing and you can't quite figure out why from the logs a scratch build provides. In this case I use mock in 'interactive' mode: you can pass mock a parameter which gives you a shell inside the mock chroot, so you can poke around within the build environment for a build that failed and figure out what's wrong. Doesn't happen often, though. -- Adam Williamson Fedora QA Community Monkey IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net http://www.happyassassin.net -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: Differences between Fakeroot and Mock Suggested method
Rich, Matthew, and Richard Thanks for your guys' input. It's good to know that I can turn here, when I have to and not have it seem that I'm asking a silly question. I will try to keep everyone abreast of progress and once I'm ready for review, I'll let you all know. Thanks again. M -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: Differences between Fakeroot and Mock Suggested method
Hi Matt, I believe this is the easiest way to setup your build host: sudo yum group install Fedora Packager sudo yum install fedora-review I personally use rpmbuild and then mock before submitting the packages. Best Regards, Dridi On Thu, Oct 10, 2013 at 4:31 PM, Richard W.M. Jones rjo...@redhat.com wrote: On Wed, Oct 09, 2013 at 12:32:08PM -0700, Matt Eskes wrote: It's taking a bit of time, but I plan to start packaging a couple of packages that are not currently available for either Red Hat nor Fedora. The main reason for it taking a bit longer really has to do with personal infrastructure and setting up my build host, etc. However, that doesn't really pertain to the question at hand. I come from a Debian centric environment, and have come back to Red Hat and Fedora after more than a decade. As such, I have quite a bit more experience building my packages with fakeroot, than I do with mock, and I'm wondering what the differences between the two packages/processes are. Will using mock in this environment be more beneficial to using fakeroot? Will it be harder for lack of a better word, to build from within the build system using fakeroot , once I get to that point or, is Koji flexible enough so that it really wouldn't matter from an infrastructure point of view as to whether or not I use one or the other? As I am more familiar with fakeroot, I'd like to keep using that, but at the same time, I'd like to do it the Red Hat way to ensure that the package conforms to both Red Hat and Fedora packaging standards. [Incidentally to this, I was the co-maintainer of fakeroot fakechroot in some branches of Fedora (not any longer).] I would highly recommend *not* trying to use fakeroot. It's not necessary to build RPMs either as root or emulating root (as is done in Debian). There should be no step that requires root. The two common things you would think might require root would be: (1) 'make install' (2) Setting setuid bits on binaries. (1) -- make install -- does not need to be run as root by rpmbuild because we use a DESTDIR to put the files into a buildroot under your $HOME, ie: make install DESTDIR=%{buildroot} RPM does the magic of turning the buildroot into the package. (2) -- setuid -- does not need to be done because you can set attributes on files in the %files section. RPM turns these into setuid bits at package install time (which does happen as root). So, forget about fakeroot. Not needed. Don't run rpmbuild as real root either. You don't really need to use mock either. Just use 'rpmbuild -ba' directly or 'fedpkg local' which is a wrapper. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: Differences between Fakeroot and Mock Suggested method
On Wed, Oct 09, 2013 at 12:32:08PM -0700, Matt Eskes wrote: It's taking a bit of time, but I plan to start packaging a couple of packages that are not currently available for either Red Hat nor Fedora. The main reason for it taking a bit longer really has to do with personal infrastructure and setting up my build host, etc. However, that doesn't really pertain to the question at hand. I come from a Debian centric environment, and have come back to Red Hat and Fedora after more than a decade. As such, I have quite a bit more experience building my packages with fakeroot, than I do with mock, and I'm wondering what the differences between the two packages/processes are. Will using mock in this environment be more beneficial to using fakeroot? Will it be harder for lack of a better word, to build from within the build system using fakeroot , once I get to that point or, is Koji flexible enough so that it really wouldn't matter from an infrastructure point of view as to whether or not I use one or the other? As I am more familiar with fakeroot, I'd like to keep using that, but at the same time, I'd like to do it the Red Hat way to ensure that the package conforms to both Red Hat and Fedora packaging standards. [Incidentally to this, I was the co-maintainer of fakeroot fakechroot in some branches of Fedora (not any longer).] I would highly recommend *not* trying to use fakeroot. It's not necessary to build RPMs either as root or emulating root (as is done in Debian). There should be no step that requires root. The two common things you would think might require root would be: (1) 'make install' (2) Setting setuid bits on binaries. (1) -- make install -- does not need to be run as root by rpmbuild because we use a DESTDIR to put the files into a buildroot under your $HOME, ie: make install DESTDIR=%{buildroot} RPM does the magic of turning the buildroot into the package. (2) -- setuid -- does not need to be done because you can set attributes on files in the %files section. RPM turns these into setuid bits at package install time (which does happen as root). So, forget about fakeroot. Not needed. Don't run rpmbuild as real root either. You don't really need to use mock either. Just use 'rpmbuild -ba' directly or 'fedpkg local' which is a wrapper. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Differences between Fakeroot and Mock Suggested method
Hi folks. It's taking a bit of time, but I plan to start packaging a couple of packages that are not currently available for either Red Hat nor Fedora. The main reason for it taking a bit longer really has to do with personal infrastructure and setting up my build host, etc. However, that doesn't really pertain to the question at hand. I come from a Debian centric environment, and have come back to Red Hat and Fedora after more than a decade. As such, I have quite a bit more experience building my packages with fakeroot, than I do with mock, and I'm wondering what the differences between the two packages/processes are. Will using mock in this environment be more beneficial to using fakeroot? Will it be harder for lack of a better word, to build from within the build system using fakeroot , once I get to that point or, is Koji flexible enough so that it really wouldn't matter from an infrastructure point of view as to whether or not I use one or the other? As I am more familiar with fakeroot, I'd like to keep using that, but at the same time, I'd like to do it the Red Hat way to ensure that the package conforms to both Red Hat and Fedora packaging standards. Thanks in advance for your guidance. M -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: Differences between Fakeroot and Mock Suggested method
On Wed, Oct 09, 2013 at 12:32:08PM -0700, Matt Eskes wrote: Will using mock in this environment be more beneficial to using fakeroot? Will it be harder for lack of a better word, to build from within the build system using fakeroot , once I get to that point or, is Koji flexible enough so that it really wouldn't matter from an infrastructure point of view as to whether or not I use one or the other? Koji is going to use mock whatever you do. So there's that. :) I usually build my packages in my home directory with neither mock nor fakeroot until I'm satisifed that they're basically right (because this is fastest) and then use mock to do a test build before pushing to koji for the real build. -- Matthew Miller ☁☁☁ Fedora Cloud Architect ☁☁☁ mat...@fedoraproject.org -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: Differences between Fakeroot and Mock Suggested method
On Wed, Oct 9, 2013 at 2:32 PM, Matt Eskes mes...@gmail.com wrote: As I am more familiar with fakeroot, I'd like to keep using that, but at the same time, I'd like to do it the Red Hat way to ensure that the package conforms to both Red Hat and Fedora packaging standards. Mock would be recommended as it's the way packages are built on koji... Mock is really just a python wrapper that allows you to build packages for different versions of Fedora in a clean chroot with just the build requirements specified in the spec file installed (and some standard ones). It caches packages to make building the chroot faster and that way you only start with a clean chroot unless your specify otherwise. I'm not familiar with fakeroot but I assume you set it up and leave the fake root installed? Check out the following links and it should get you started: http://fedoraproject.org/wiki/Projects/Mock http://fedoraproject.org/wiki/Using_Mock_to_test_package_builds Richard -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct