Re: Packaging pre-release version
- Original Message - > From: "Pavel Valena" <pval...@redhat.com> > To: "Vít Ondruch" <vondr...@redhat.com> > Cc: "Ruby SIG mailing list" <ruby-sig@lists.fedoraproject.org> > Sent: Tuesday, December 6, 2016 1:12:05 PM > Subject: Re: Packaging pre-release version > > > > - Original Message - > > > From: "Vít Ondruch" <vondr...@redhat.com> > > > To: "Ruby SIG mailing list" <ruby-sig@lists.fedoraproject.org> > > > Sent: Tuesday, December 6, 2016 10:45:01 AM > > > Subject: Packaging pre-release version > > > > > > Hi all, > > > > > > I am working on rubygem-asciidoctor-mallard review [1] and since there > > > was not released stable version yet, the pre-release version (actually > > > git snapshot) needs to be packaged. And now I realized it is more PITA > > > then it should be. > > > > > > The main issue is with the way, how pre-release packages are versioned. > > > E.g. in rubygem-asciidoctor-mallard case, the upstream version is > > > "0.1.0.dev" which transforms in Fedora into "0.1.0-0.1.dev" and > > > subsequently, no standard macro works. > > I wonder what would happen when you try to `dnf update` from 0.1.0.dev to > 0.1.0? Will it behave correctly? > > Additionally, like you said, the correct version in fedora is > '0.1.0-0.1.dev'[1], to which you will not conform to, or is there something > that I missed? Sorry, please disregard the questions, as I have after an offline inquiry realized that only macros for rubygems are to be changed, and not the package version itself. > > [1] https://fedoraproject.org/wiki/Packaging:Versioning#Pre-Release_packages > Pavel Valena Associate Software Engineer Brno, Czech Republic RED HAT | TRIED. TESTED. TRUSTED. All of the airlines in the Fortune Global 500 rely on Red Hat. Find out why at Trusted | Red Hat <http://www.redhat.com/en/about/trusted> ___ ruby-sig mailing list -- ruby-sig@lists.fedoraproject.org To unsubscribe send an email to ruby-sig-le...@lists.fedoraproject.org
Re: Packaging pre-release version
- Original Message - > From: "Jun Aruga" <jar...@redhat.com> > To: "Ruby SIG mailing list" <ruby-sig@lists.fedoraproject.org> > Sent: Tuesday, December 6, 2016 11:40:38 AM > Subject: Re: Packaging pre-release version > > +1 > I will agree with this if it is inspired from nokogiri's way. > The macro helps people to packaging pre-release version. > > Jun Aruga > > - Original Message - > > From: "Vít Ondruch" <vondr...@redhat.com> > > To: "Ruby SIG mailing list" <ruby-sig@lists.fedoraproject.org> > > Sent: Tuesday, December 6, 2016 10:45:01 AM > > Subject: Packaging pre-release version > > > > Hi all, > > > > I am working on rubygem-asciidoctor-mallard review [1] and since there > > was not released stable version yet, the pre-release version (actually > > git snapshot) needs to be packaged. And now I realized it is more PITA > > then it should be. > > > > The main issue is with the way, how pre-release packages are versioned. > > E.g. in rubygem-asciidoctor-mallard case, the upstream version is > > "0.1.0.dev" which transforms in Fedora into "0.1.0-0.1.dev" and > > subsequently, no standard macro works. I wonder what would happen when you try to `dnf update` from 0.1.0.dev to 0.1.0? Will it behave correctly? Additionally, like you said, the correct version in fedora is '0.1.0-0.1.dev'[1], to which you will not conform to, or is there something that I missed? [1] https://fedoraproject.org/wiki/Packaging:Versioning#Pre-Release_packages > > > > But the remedy could be quite simple. With this change: > > > > ``` > > > > $ git diff > > diff --git a/macros.rubygems b/macros.rubygems > > index 45c59c4..0652ec6 100644 > > --- a/macros.rubygems > > +++ b/macros.rubygems > > @@ -3,12 +3,12 @@ > > %gem_archdir %{_libdir}/gems > > > > # Common gem locations and files. > > -%gem_instdir %{gem_dir}/gems/%{gem_name}-%{version} > > -%gem_extdir_mri %{gem_archdir}/%{name}/%{gem_name}-%{version} > > +%gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}%{?prerelease} > > +%gem_extdir_mri > > %{gem_archdir}/%{name}/%{gem_name}-%{version}%{?prerelease} > > %gem_libdir %{gem_instdir}/lib > > -%gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem > > -%gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec > > -%gem_docdir %{gem_dir}/doc/%{gem_name}-%{version} > > +%gem_cache %{gem_dir}/cache/%{gem_name}-%{version}%{?prerelease}.gem > > +%gem_spec > > %{gem_dir}/specifications/%{gem_name}-%{version}%{?prerelease}.gemspec > > +%gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}%{?prerelease} > > > > > > # %gem_install - Install gem into appropriate directory. > > @@ -28,7 +28,7 @@ gem install \\\ > > --build-root %{-d*}%{!?-d:.} \\\ > > --force \\\ > > --document=ri,rdoc \\\ > > -%{-n*}%{!?-n:%{gem_name}-%{version}.gem} \ > > +%{-n*}%{!?-n:%{gem_name}-%{version}%{?prerelease}.gem} \ > > %{nil} > > > > > > > > ``` > > > > It would be enough to specify: > > > > > > ``` > > > > %globalprerelease.dev > > > > ``` > > > > > > in your .spec file and half of the lines I needed to add into the > > pre-release package could be removed. > > > > Please note that this is inspired by macros Mamoru is using for ages in > > some of his packages (Nokogiri for example [2]). > > > > (Actually, now I realized that the proposal in the review is more > > complex then it should be, but that is a different story ...) > > > > Any thoughts? > > > > > > Vít > > > > > > [1] https://bugzilla.redhat.com/show_bug.cgi?id=1343977#add_comment > > > > [2] > > http://pkgs.fedoraproject.org/cgit/rpms/rubygem-nokogiri.git/tree/rubygem-nokogiri.spec?id=7f3b8d1685a6069868a83bbc412b176d43c70fb5 > > > > ___ > > ruby-sig mailing list -- ruby-sig@lists.fedoraproject.org > > To unsubscribe send an email to ruby-sig-le...@lists.fedoraproject.org > > > ___ > ruby-sig mailing list -- ruby-sig@lists.fedoraproject.org > To unsubscribe send an email to ruby-sig-le...@lists.fedoraproject.org > ___ ruby-sig mailing list -- ruby-sig@lists.fedoraproject.org To unsubscribe send an email to ruby-sig-le...@lists.fedoraproject.org
Re: Packaging pre-release version
+1 I will agree with this if it is inspired from nokogiri's way. The macro helps people to packaging pre-release version. Jun Aruga - Original Message - > From: "Vít Ondruch"> To: "Ruby SIG mailing list" > Sent: Tuesday, December 6, 2016 10:45:01 AM > Subject: Packaging pre-release version > > Hi all, > > I am working on rubygem-asciidoctor-mallard review [1] and since there > was not released stable version yet, the pre-release version (actually > git snapshot) needs to be packaged. And now I realized it is more PITA > then it should be. > > The main issue is with the way, how pre-release packages are versioned. > E.g. in rubygem-asciidoctor-mallard case, the upstream version is > "0.1.0.dev" which transforms in Fedora into "0.1.0-0.1.dev" and > subsequently, no standard macro works. > > But the remedy could be quite simple. With this change: > > ``` > > $ git diff > diff --git a/macros.rubygems b/macros.rubygems > index 45c59c4..0652ec6 100644 > --- a/macros.rubygems > +++ b/macros.rubygems > @@ -3,12 +3,12 @@ > %gem_archdir %{_libdir}/gems > > # Common gem locations and files. > -%gem_instdir %{gem_dir}/gems/%{gem_name}-%{version} > -%gem_extdir_mri %{gem_archdir}/%{name}/%{gem_name}-%{version} > +%gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}%{?prerelease} > +%gem_extdir_mri %{gem_archdir}/%{name}/%{gem_name}-%{version}%{?prerelease} > %gem_libdir %{gem_instdir}/lib > -%gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem > -%gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec > -%gem_docdir %{gem_dir}/doc/%{gem_name}-%{version} > +%gem_cache %{gem_dir}/cache/%{gem_name}-%{version}%{?prerelease}.gem > +%gem_spec > %{gem_dir}/specifications/%{gem_name}-%{version}%{?prerelease}.gemspec > +%gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}%{?prerelease} > > > # %gem_install - Install gem into appropriate directory. > @@ -28,7 +28,7 @@ gem install \\\ > --build-root %{-d*}%{!?-d:.} \\\ > --force \\\ > --document=ri,rdoc \\\ > -%{-n*}%{!?-n:%{gem_name}-%{version}.gem} \ > +%{-n*}%{!?-n:%{gem_name}-%{version}%{?prerelease}.gem} \ > %{nil} > > > > ``` > > It would be enough to specify: > > > ``` > > %globalprerelease.dev > > ``` > > > in your .spec file and half of the lines I needed to add into the > pre-release package could be removed. > > Please note that this is inspired by macros Mamoru is using for ages in > some of his packages (Nokogiri for example [2]). > > (Actually, now I realized that the proposal in the review is more > complex then it should be, but that is a different story ...) > > Any thoughts? > > > Vít > > > [1] https://bugzilla.redhat.com/show_bug.cgi?id=1343977#add_comment > > [2] > http://pkgs.fedoraproject.org/cgit/rpms/rubygem-nokogiri.git/tree/rubygem-nokogiri.spec?id=7f3b8d1685a6069868a83bbc412b176d43c70fb5 > > ___ > ruby-sig mailing list -- ruby-sig@lists.fedoraproject.org > To unsubscribe send an email to ruby-sig-le...@lists.fedoraproject.org > ___ ruby-sig mailing list -- ruby-sig@lists.fedoraproject.org To unsubscribe send an email to ruby-sig-le...@lists.fedoraproject.org