Re: How to build rpm Krita from krita.spec ?
On Mon, Feb 08, 2021 at 07:37:28PM -, Cătălin George Feștilă wrote: > Thanks to everyone for all the information. It is quite difficult to > create packages from the source code for Fedora, I tried with this > software. It seems that the Fedora team is keeping its distance in > teaching users to create new packages. Creating packages takes some skill, and particularly that skill builds on a lot of other basic knowledge about building code in general. If you are starting from scratch, yes, that's a daunting level of difficulty to dive into. As for keeping our distance — we certainly _want_ to help community members learn skills, including packaging. We have a number of resources available which I hope you've been able to find, starting from: https://docs.fedoraproject.org/en-US/quick-docs/creating-rpm-packages/ and https://developer.fedoraproject.org/deployment/rpm/about.html We've also run workshops on packaging, like https://www.youtube.com/watch?v=H4vxkuoimzc and hope to be able to do in-person things like that again soon! -- Matthew Miller Fedora Project Leader ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-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/users@lists.fedoraproject.org
Re: How to build rpm Krita from krita.spec ?
On Mon, 2021-02-08 at 19:37 +, Cătălin George Feștilă wrote: > Thanks to everyone for all the information. It is quite difficult to create > packages from the source code for Fedora, I tried with this software. It > seems that the Fedora team is keeping its distance in teaching users to > create new packages. *Please* quote at least some context when replying on HyperKitty. This message is utterly incomprehensible on its own (what does "this software" refer to?). Bear in mind that most people here are using the mailing list, not the web interface. poc ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-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/users@lists.fedoraproject.org
Re: How to build rpm Krita from krita.spec ?
Thanks to everyone for all the information. It is quite difficult to create packages from the source code for Fedora, I tried with this software. It seems that the Fedora team is keeping its distance in teaching users to create new packages. ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-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/users@lists.fedoraproject.org
Re: How to build rpm Krita from krita.spec ?
I wrote: > I'll try it again with fedpkg local now that I know the > package builds cleanly for Fedora 33. But I think that's > likely to work. That built fine for me as well. Here are the steps I took on a freshly installed and fully updated Fedora 33 VM: fedpkg clone -a krita cd krita fedpkg srpm sudo dnf builddep krita-4.4.2-3.fc34.src.rpm fedpkg --release f33 local -- Todd signature.asc Description: PGP signature ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-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/users@lists.fedoraproject.org
Re: How to build rpm Krita from krita.spec ?
Cătălin George Feștilă wrote: > not working ... > the command fedpkg --release f33 local don't find files... > > RPM build errors: > Macro expanded in comment on line 12: %{version} > > File not found: > /home/mythcat/rpmbuild/BUILDROOT/krita-4.4.2-3.fc33.x86_64/usr/bin/kritarunner > Directory not found: > /home/mythcat/rpmbuild/BUILDROOT/krita-4.4.2-3.fc33.x86_64/usr/lib64/krita-python-libs Hmm. Did you modify the krita.spec file after cloning it in any way? Or do you have an ~/.rpmmacros file in place which might be affecting the rpmbuild command? That's a long package build. It took about 75 minutes in a temporary VM I setup (on a rather old laptop, to be fair). I started to run it via fedpkg local and ran into some odd errors. Eventually, I determined the errors were due to the VM having only 4G of memory. In the process of narrowing down the problem, I also began testing with fedpkg mockbuild rather than fedpkg local. I'll try it again with fedpkg local now that I know the package builds cleanly for Fedora 33. But I think that's likely to work. If you're curious, here's a scratch build in the Fedora build system: https://koji.fedoraproject.org/koji/taskinfo?taskID=61000832 -- Todd signature.asc Description: PGP signature ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-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/users@lists.fedoraproject.org
Re: How to build rpm Krita from krita.spec ?
not working ... the command fedpkg --release f33 local don't find files... RPM build errors: Macro expanded in comment on line 12: %{version} File not found: /home/mythcat/rpmbuild/BUILDROOT/krita-4.4.2-3.fc33.x86_64/usr/bin/kritarunner Directory not found: /home/mythcat/rpmbuild/BUILDROOT/krita-4.4.2-3.fc33.x86_64/usr/lib64/krita-python-libs [mythcat@desk krita]$ ls krita-4.4.2 krita-4.4.2.tar.xz krita-gcc11.patch krita.spec sources ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-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/users@lists.fedoraproject.org
Re: How to build rpm Krita from krita.spec ?
On 1/24/21 12:39 PM, Cătălin George Feștilă wrote: Is my first time when I try to build rpm. I start with Krita source code to test this feature. I don't know all tools involved into build rpm actions and all outputs errors ... Maybe my file krita.spec is wrong. Why the Fedora team don't have good tutorials and examples about how to build rpm files? Version 4.4.2 has just been built for all Fedora releases (although rawhide didn't work). So you can get it from koji or it might even be in updates-testing now. https://koji.fedoraproject.org/koji/packageinfo?packageID=22465 If you pick a specific build, e.g. https://koji.fedoraproject.org/koji/buildinfo?buildID=1673094 you can download the src rpm from the top of the RPMS list. Then you run rpmbuild on that, or "install" that rpm using "rpm -i" (as your user) which will put all the files in your rpmbuild directory and you can edit or tweak it there before building. ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-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/users@lists.fedoraproject.org
Re: How to build rpm Krita from krita.spec ?
On Sun, 24 Jan 2021 at 16:39, Cătălin George Feștilă < myth...@fedoraproject.org> wrote: > Is my first time when I try to build rpm. > I start with Krita source code to test this feature. > I don't know all tools involved into build rpm actions and all outputs > errors ... > Most people who build rpms have prior experience experience compiling and linking programs, building libraries, etc. Learning generally goes better if you start with simpler tasks and build up to your objective. The best programmers I know are very skillful at breaking complex projects into relatively small simple steps. > Maybe my file krita.spec is wrong. > Why the Fedora team don't have good tutorials and examples about how to > build rpm files? > Adding to Todd's very helpful post: unless you get a spec from a current Fedora package there is a good chance it will need some simple tweaks. There are many distributions that use rpm packages, so you can also look for tutorials and examples outside the Fedora documentation. Furthermore, the demand for Linux developers greatly exceeds the supply, so the people who are skillful at building rpms have more work than they can handle. -- George N. White III ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-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/users@lists.fedoraproject.org
Re: How to build rpm Krita from krita.spec ?
Hi, Cătălin George Feștilă wrote: > I don't know all tools involved into build rpm actions and > all outputs errors ... I've been doing it for a long time and I still learn new ways for packages to break as well as tools to make life easier. :) > Maybe my file krita.spec is wrong. I think it's missing a number of things, yes. The one causing the error you reported earlier is due to the Source0 tag pointing to version 4.4.2, while the Version tag is set to 4.2.2. Ideally, the Version tag would be the only place which sets the version and other tags, like Source0 would reference that via the %{version} macro. But read below, as I think you'll be better off starting from the existing Fedora krita package. > Why the Fedora team don't have good tutorials and examples > about how to build rpm files? Have you read "Creating RPM packages" at: https://docs.fedoraproject.org/en-US/quick-docs/creating-rpm-packages/ and the various additional documentation it links to yet? Package building encompasses a number of skills and it takes time to learn. It's hard to have short tutorials on the subject without skipping a lot of information that is likely necessary for building various software that isn't already packaged. Plus, by the time most people have the hang of it, they're no longer in a good position to write introductory docmentation. It may be worth noting that krita is packaged for Fedora, so you might be better of starting from the Fedora package and bumping the version there (or trying to build the f34 branch which is at 4.4.1 for your current release). You can view the Fedora packaging sources at: https://src.fedoraproject.org/rpms/krita If you follow the quick-docs guide from above, you'll have the fedpkg command, which will allow you to clone those sources locally via: fedpkg clone -a krita Then you could try to build that for your current Fedora: fedpkg --release f33 local You'll likely need to install some dependencies for that to work. And the better way to do that is to use mock, which installs those dependencies automatically in an isolated chroot, so you don't affect the host system. Using mock is covered in the quick-docs as well. Once setup, you'd just replace the 'local' command with 'mockbuild' as in: fedpkg --release f33 mockbuild Then you see where it fails and adjust the spec file as needed. It's an iterative process. But the more you do it, the easier it becomes. Hope this helps, -- Todd signature.asc Description: PGP signature ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-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/users@lists.fedoraproject.org
Re: How to build rpm Krita from krita.spec ?
Is my first time when I try to build rpm. I start with Krita source code to test this feature. I don't know all tools involved into build rpm actions and all outputs errors ... Maybe my file krita.spec is wrong. Why the Fedora team don't have good tutorials and examples about how to build rpm files? ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-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/users@lists.fedoraproject.org
Re: How to build rpm Krita from krita.spec ?
Cătălin George Feștilă 于2021年1月24日周日 上午2:44写道: > [mythcat@desk SPECS]$ sudo rpmbuild --undefine=_disable_source_fetch -ba > krita.spec > Don't do that, you do not need root permission to build a rpm package. > [sudo] password for mythcat: > warning: Downloading > https://download.kde.org/stable/krita/4.4.2/krita-4.4.2.tar.gz to > /root/rpmbuild/SOURCES/krita-4.4.2.tar.gz > curl: (23) Failure writing output to destination > I don't know the reason for this failure, just retry without sudo? > error: Couldn't download > https://download.kde.org/stable/krita/4.4.2/krita-4.4.2.tar.gz > [mythcat@desk SPECS]$ rpmbuild --undefine=_disable_source_fetch -ba > krita.spec > setting SOURCE_DATE_EPOCH=161136 > Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.Z7ah5Y > + umask 022 > + cd /home/mythcat/rpmbuild/BUILD > + cd /home/mythcat/rpmbuild/BUILD > + rm -rf krita-4.2.2 > + /usr/bin/gzip -dc /home/mythcat/rpmbuild/SOURCES/krita-4.4.2.tar.gz > + /usr/bin/tar -xof - > + STATUS=0 > + '[' 0 -ne 0 ']' > + cd krita-4.2.2 > /var/tmp/rpm-tmp.Z7ah5Y: line 39: cd: krita-4.2.2: No such file or > directory > error: Bad exit status from /var/tmp/rpm-tmp.Z7ah5Y (%prep) > > > RPM build errors: > Bad exit status from /var/tmp/rpm-tmp.Z7ah5Y (%prep) > ___ > users mailing list -- users@lists.fedoraproject.org > To unsubscribe send an email to users-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/users@lists.fedoraproject.org > ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-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/users@lists.fedoraproject.org
Re: How to build rpm Krita from krita.spec ?
On 1/23/21 10:44 AM, Cătălin George Feștilă wrote: [mythcat@desk SPECS]$ rpmbuild --undefine=_disable_source_fetch -ba krita.spec setting SOURCE_DATE_EPOCH=161136 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.Z7ah5Y + umask 022 + cd /home/mythcat/rpmbuild/BUILD + cd /home/mythcat/rpmbuild/BUILD + rm -rf krita-4.2.2 + /usr/bin/gzip -dc /home/mythcat/rpmbuild/SOURCES/krita-4.4.2.tar.gz + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + cd krita-4.2.2 /var/tmp/rpm-tmp.Z7ah5Y: line 39: cd: krita-4.2.2: No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.Z7ah5Y (%prep) I'm guessing that you have modified that spec file to compile a newer version. However, you didn't change the version numbers in all the places. Usually, spec files use defines for that, but apparently not in this one. ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-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/users@lists.fedoraproject.org
Re: How to build rpm Krita from krita.spec ?
On 1/23/21 6:21 AM, Cătălin George Feștilă wrote: I used this tutorial to build the Krita from sources: https://docs.krita.org/en/untranslatable_pages/building_krita.html#preparing-your-development-environment. This is the result of the rpmlint tool: rpmlint krita.spec ../SRPMS/krita* ../RPMS/*/krita* (none): E: no installed packages by name ../SRPMS/krita* (none): E: no installed packages by name ../RPMS/*/krita* 0 packages and 1 specfiles checked; 0 errors, 0 warnings. Any idea what is wrong ? Why do you think there's something wrong? You tried to run rpmlint on files that don't exist. ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-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/users@lists.fedoraproject.org
Re: How to build rpm Krita from krita.spec ?
[mythcat@desk SPECS]$ sudo rpmbuild --undefine=_disable_source_fetch -ba krita.spec [sudo] password for mythcat: warning: Downloading https://download.kde.org/stable/krita/4.4.2/krita-4.4.2.tar.gz to /root/rpmbuild/SOURCES/krita-4.4.2.tar.gz curl: (23) Failure writing output to destination error: Couldn't download https://download.kde.org/stable/krita/4.4.2/krita-4.4.2.tar.gz [mythcat@desk SPECS]$ rpmbuild --undefine=_disable_source_fetch -ba krita.spec setting SOURCE_DATE_EPOCH=161136 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.Z7ah5Y + umask 022 + cd /home/mythcat/rpmbuild/BUILD + cd /home/mythcat/rpmbuild/BUILD + rm -rf krita-4.2.2 + /usr/bin/gzip -dc /home/mythcat/rpmbuild/SOURCES/krita-4.4.2.tar.gz + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + cd krita-4.2.2 /var/tmp/rpm-tmp.Z7ah5Y: line 39: cd: krita-4.2.2: No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.Z7ah5Y (%prep) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.Z7ah5Y (%prep) ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-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/users@lists.fedoraproject.org
Re: How to build rpm Krita from krita.spec ?
Basically, you could build this spec file via rpmbuild --undefine=_disable_source_fetch -ba /path/to/specfile Cătălin George Feștilă 于 2021年1月23日周六 下午10:21写道: > I used this tutorial to build the Krita from sources: > https://docs.krita.org/en/untranslatable_pages/building_krita.html#preparing-your-development-environment > . > > This is the result of the rpmlint tool: > > rpmlint krita.spec ../SRPMS/krita* ../RPMS/*/krita* > (none): E: no installed packages by name ../SRPMS/krita* > (none): E: no installed packages by name ../RPMS/*/krita* > 0 packages and 1 specfiles checked; 0 errors, 0 warnings. > > the krita.spec has this content: > > Name: krita > Version:4.2.2 > Release:1%{?dist} > Summary:Krita software version 4.2.2 > > License:GPLv3+ > URL:https://krita.org/ > Source0: > https://download.kde.org/stable/krita/4.4.2/krita-4.4.2.tar.gz > > BuildRequires: bash > Requires: info > > %description > Krita software version 4.2.2 > > > %prep > %autosetup > > > %build > cmake ../krita \ > -DCMAKE_INSTALL_PREFIX=$HOME/kritadev/install \ > -DCMAKE_BUILD_TYPE=Debug \ > -DKRITA_DEVS=ON > %configure > %make_build > make > make install > > %install > rm -rf $RPM_BUILD_ROOT > %make_install > ../install/bin/krita > > %files > %license add-license-file-here > %doc add-docs-here > > > > %changelog > * Sat Jan 23 2021 catafest > > Any idea what is wrong ? > ___ > users mailing list -- users@lists.fedoraproject.org > To unsubscribe send an email to users-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/users@lists.fedoraproject.org > ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-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/users@lists.fedoraproject.org