Re: rpmbuild

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/12/19 1:43 PM, Patrick Dupre wrote:
cpanspec --add-buildrequires perl-generators Tk-JBrowseEntry-5.22.tar.gz

only add:
BuildRequires:  perl-generators
in the .spec file

which does not help.


Sure, it does.  The purpose of the "perl-generators" package is to include information about what a perl package "provides" and "requires" automaticaly, so that you don't have to.  If I build Tk-JBrowseEntry with BuildRequires: perl-generators, then I get this on the resulting package:

# rpm -q --provides perl-Tk-JBrowseEntry-5.22-1.fc30.noarch
perl(Tk::JBrowseEntry) = 5.22
perl-Tk-JBrowseEntry = 5.22-1.fc30

If I run the command you included above, there are several changes we'd want to make to the spec to bring it more in line with Fedora's packaging guidelines.  "Group" and "BuildRoot" aren't used in Fedora, so those lines can be removed.  The "make" command can be replaced with "%{make_build}".  The %install section should not remove the build root.  The %clean section should be removed.  We need to add "PERL5LIB=%{buildroot}%{perl_vendorlib}" to the "make test" command in order for it to find the modules it installed in the build root (although some tests don't work without an X11 connection).  "%defattr" isn't required in Fedora.  Finally, we need to add "%{_bindir}/*" or "%{_bindir}/JBrowseTest.pl" to the %files section (or, alternatively, remove that file in the %install section if it should not be included in the package).  A patch is attached with those changes, for a more literal specification of the changes.

I can use that modified spec to build a package, and move on to building the other package you mentioned, perl-Tk-JFileDialog. That package requires very similar changes, with the exception that "make test" actually fails, so I removed that rather than resolve the issue because I'm not working on pushing this through formal review.  :)

After making the same changes to perl-Tk-JFileDialog, and building the package, both packages can be installed:

# rpm -q perl-Tk-JFileDialog perl-Tk-JBrowseEntry
perl-Tk-JFileDialog-2.20-1.fc30.noarch
perl-Tk-JBrowseEntry-5.22-1.fc30.noarch


On 6/10/19 1:10 AM, Patrick Dupre wrote:
Same issue with Tk-JFileDialog.spec
In addition, I get:
rpmbuild -bb perl-Tk-JFileDialog.spec
error: Failed build dependencies:
	perl(Tk::JBrowseEntry) >= 4.63 is needed by perl-Tk-JFileDialog-2.20-1.fc30.noarch

while the installed version is 5.22


I believe you got this because your build environment did not include the perl-generator package.  Once you add that to your BuildRequires, then the perl-Tk-JBrowseEntry package will automatically provide "perl(Tk::JBrowseEntry)", and resolve the dependency reported in this error message.

--- /root/perl-Tk-JBrowseEntry.spec.2	2019-06-14 15:41:06.202279307 +0000
+++ perl-Tk-JBrowseEntry.spec	2019-06-14 16:03:23.610542942 +0000
@@ -3,10 +3,8 @@
 Release:        1%{?dist}
 Summary:        Full-featured "Combo-box" (Text-entry combined with drop-down listbox) derived from Tk::BrowseEntry with many additional features and options
 License:        GPL+ or Artistic
-Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Tk-JBrowseEntry/
 Source0:        http://www.cpan.org/modules/by-module/Tk/Tk-JBrowseEntry-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 BuildRequires:  perl(ExtUtils::MakeMaker)
 BuildRequires:  perl(Tk)
@@ -29,11 +27,9 @@
 
 %build
 %{__perl} Makefile.PL INSTALLDIRS=vendor
-make %{?_smp_mflags}
+%{make_build}
 
 %install
-rm -rf $RPM_BUILD_ROOT
-
 make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
 
 find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
@@ -42,16 +38,14 @@
 %{_fixperms} $RPM_BUILD_ROOT/*
 
 %check
-make test
-
-%clean
-rm -rf $RPM_BUILD_ROOT
+PERL5LIB=%{buildroot}%{perl_vendorlib} \
+  make test
 
 %files
-%defattr(-,root,root,-)
 %doc Changes META.json README
 %{perl_vendorlib}/*
 %{_mandir}/man3/*
+%{_bindir}/*
 
 %changelog
 * Fri Jun 14 2019 Gordon Messmer <gordon@xxxxxxxxxxxxxxx> 5.22-1

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux