Re: Removing perl from build root

2016-07-19 Thread Petr Pisar
On Thu, Mar 31, 2016 at 03:10:26PM +0200, Petr Pisar wrote:
> Fedora's minimal build root contains perl. There is a reasonable request
>  to
> remove the perl in order to minimize the build root. (The x86_64 F25 build
> root occupies 527 MB now, 20 MB of that are perl packages.)
> 
I removed perl from the minimal build root today. This is effective since
rpm-build-4.13.0-0.rc1.40.fc25 reached build root.

Because perl is not in the build root for creating source packages, spec
constructions like:

%if %(perl ...)
BuildRequires: ...
Requires: ...
%endif

will not work. rpmbuild will complain about invalid condition expression
(because it will be empty).

If you use it for controlling run-time dependencies, simply build-require
"perl" and change the condition so that it always returns a valid expreesion,
e.g.:

%if 0%(perl ...)
Requires: ...
%endif

If you use it for controlling build-time dependencies, you are out of luck and
you have to change the condition to depend on Fedora release:

%if 0%{?fedora} >= ...
BuildRequires: ...
%endif

Although perl-libs provides some useful RPM symbols (perl(:VERSION) etc.),
querying RPM database from rpm-build is considered harmful and you should
not do that.

I was thinking about exporting them as SRPM macros, but I'm not fully
persuaded it's worth doing it. Especially because it would impose keeping
perl-srpm-macros in synchronization to perl-libs. I can imagine the perl
version could be handy. Any opinions?

-- Petr


signature.asc
Description: PGP signature
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-06-23 Thread Petr Pisar
On Wed, Jun 22, 2016 at 02:29:32PM +0200, Petr Pisar wrote:
> On Fri, Jun 17, 2016 at 02:23:16PM +0200, Petr Pisar wrote:
> > On Tue, May 17, 2016 at 09:06:11AM +0200, Petr Pisar wrote:
> > > On Thu, Mar 31, 2016 at 03:10:26PM +0200, Petr Pisar wrote:
> > > > Fedora's minimal build root contains perl. There is a reasonable request
> > > >  to
> > > > remove the perl in order to minimize the build root.
> > > [...]
> > > 
> > > Once upgrading Perl to 5.24 finishes and I finish my spec editor, I will
> > > test some local scratch builds and then I publish the changes (injecting
> > > perl, perl-generators and perl-devel where appropriate) into dist-git.
> > > 
> [...]
> > I think pushing the changes will happen in the end of June.
> >
> I harnessed second computer into the test rebuild in order to have results
> sooner (this Tuesday or Friday).
> 
The test rebuild has finished. I will push the changes tomorrow. See
devel@fp.o announcement
.

-- Petr


signature.asc
Description: PGP signature
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-06-22 Thread Petr Pisar
On Fri, Jun 17, 2016 at 02:23:16PM +0200, Petr Pisar wrote:
> On Tue, May 17, 2016 at 09:06:11AM +0200, Petr Pisar wrote:
> > On Thu, Mar 31, 2016 at 03:10:26PM +0200, Petr Pisar wrote:
> > > Fedora's minimal build root contains perl. There is a reasonable request
> > >  to
> > > remove the perl in order to minimize the build root.
> > [...]
> > 
> > Once upgrading Perl to 5.24 finishes and I finish my spec editor, I will
> > test some local scratch builds and then I publish the changes (injecting
> > perl, perl-generators and perl-devel where appropriate) into dist-git.
> > 
[...]
> I think pushing the changes will happen in the end of June.
>
I harnessed second computer into the test rebuild in order to have results
sooner (this Tuesday or Friday).

Orion reminded me 
that it would be good idea to push an empty perl-generators into EPEL to make
porting Fedora packages easier.

I did it and the dummy perl-generators package that allows building spec files
with a dependency on perl-generators or perl-devel will emerge in testing EPEL
repositories soon.

-- Petr


signature.asc
Description: PGP signature
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-06-17 Thread Petr Pisar
On Tue, May 17, 2016 at 09:06:11AM +0200, Petr Pisar wrote:
> On Thu, Mar 31, 2016 at 03:10:26PM +0200, Petr Pisar wrote:
> > Fedora's minimal build root contains perl. There is a reasonable request
> >  to
> > remove the perl in order to minimize the build root.
> [...]
> 
> Once upgrading Perl to 5.24 finishes and I finish my spec editor, I will test
> some local scratch builds and then I publish the changes (injecting perl,
> perl-generators and perl-devel where appropriate) into dist-git.
> 
I finished my spec file editor and a dispatcher for calling it for thousands
of packages.

I also computed lists of package that should build-require the new
dependencies:

Packages requiring or providing a Perl module: 3292 packages
Packages requiring libperl.so: 491 packages

The first set should build-require perl-generators. The second set should
build-require perl-devel. After running the editor, it was discovered that
3129 packages must be edited to add missing dependency on perl-devel or
perl-generators.

I was pondering how to identify packages that should build-require perl and
I concluded that it's not easy (perl(:MODULE_COMPAT) constructor is easy,
%build section with /^perl / line feasible, but the rest is very fuzzy). At
the end, many packages depending on perl-generators will get perl into build
root either. So I decided to skip adding "perl" dependency automatically.

I reviewed some random packages and the edited changes are correct. But it's
not possible to review all them manually. To be sure the changes do not cause
any serious problems, I will rebuild the 3292 changed packages locally.

After that, I will reset the packages to current dist-git content, run the
editor on them again and push the changes.

I think pushing the changes will happen in the end of June.

-- Petr


signature.asc
Description: PGP signature
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-05-17 Thread Petr Pisar
On Thu, Mar 31, 2016 at 03:10:26PM +0200, Petr Pisar wrote:
> Fedora's minimal build root contains perl. There is a reasonable request
>  to
> remove the perl in order to minimize the build root.
[...]
> I'd like to hear if this approach (adding "BuildRequires: perl-generators"
> everywhere) is fine. For example, a spec file for architecture specific
> package would need:
> 
> BuildRequires: perl for "perl Makefile.PL"
> BuildRequires: perl-devel   for building XS code
> BuildRequires: perl-generators  for generating dependencies
> BuildRequires: perl-macros  for %?perl_default_filter
> 
For your information, FESCo approved the removal
 and FPC
approved the new Perl packaging guidelines
.

The new guidelines differ from the above mentioned proposal in the perl-macros
dependency. The perl-macros will be provided by installing perl-generators
_implicitly_. You will not have to declare this dependency explicitly.

Once upgrading Perl to 5.24 finishes and I finish my spec editor, I will test
some local scratch builds and then I publish the changes (injecting perl,
perl-generators and perl-devel where appropriate) into dist-git.

-- Petr


signature.asc
Description: PGP signature
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-04-14 Thread Petr Pisar
On Thu, Apr 14, 2016 at 01:58:03PM +0200, Petr Pisar wrote:
> On Thu, Apr 07, 2016 at 03:18:45PM +0200, Petr Pisar wrote:
> > Here are the proposed documents:
> > 
> > Fedora Change: 
> > 
> 
> I will post it to FESCo once Fedora Wiki will fix the editting block.
> 
Posted to FESCo wrangler.

-- Petr


signature.asc
Description: PGP signature
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-04-14 Thread Petr Pisar
On Thu, Apr 07, 2016 at 03:18:45PM +0200, Petr Pisar wrote:
> Here are the proposed documents:
> 
> Fedora Change: 
> 

I will post it to FESCo once Fedora Wiki will fix the editting block.

> Packaging Guidelines:
> 
> 
There were no other comments. I sent the guidelines draft to FPC
.

-- Petr


signature.asc
Description: PGP signature
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-04-07 Thread Petr Pisar
On Thu, Mar 31, 2016 at 03:10:26PM +0200, Petr Pisar wrote:
> This change will go through a Fedora system wide change process and Perl
> packaging guidelines update. I'd like to implement it in Fedora 25.
> 
Here are the proposed documents:

Fedora Change: 
Packaging Guidelines:


The updated guidelines were created as a copy of current guidelines. You see
the changes by comparing first version of the document against the lastest one
in he "history" function of the wiki. Basically, I added "Build-Requiers"
section
.

If the documents look good, I will submit them to FPC and FESCo.

-- Petr


signature.asc
Description: PGP signature
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-04-06 Thread Petr Pisar
On Wed, Apr 06, 2016 at 10:43:11AM +0100, Paul Howarth wrote:
> On 06/04/16 10:09, Petr Pisar wrote:
> >On Fri, Apr 01, 2016 at 12:14:43PM +0200, Petr Pisar wrote:
> >>On Thu, Mar 31, 2016 at 02:43:41PM +0100, Paul Howarth wrote:
> >>>Might it not be easier to use the newly-allowed boolean dependencies, e.g.
> >>>in rpm-build something like this:
> >>>
> >>>Requires: (perl-generators if perl-libs)
> >>>
> >>That's interesting idea. I only worry there could be cases when the
> >>perl-generators were unnecessarily installed. E.g. you install vim-enhanced,
> >>thus you have perl-libs, and you install rpm-build for building non-perl
> >>packages. Then you will have perl-generators. I'm not sure how much it
> >>would bother people.
> >>
> >Another issue: FESCo banned the rich dependencies
> >.
> 
> We were discussing this for F-25 and they're not banned for F-25, just F-24,
> at least so far.
>
They are.
.

-- Petr


signature.asc
Description: PGP signature
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-04-06 Thread Paul Howarth

On 06/04/16 10:09, Petr Pisar wrote:

On Fri, Apr 01, 2016 at 12:14:43PM +0200, Petr Pisar wrote:

On Thu, Mar 31, 2016 at 02:43:41PM +0100, Paul Howarth wrote:

Might it not be easier to use the newly-allowed boolean dependencies, e.g.
in rpm-build something like this:

Requires: (perl-generators if perl-libs)


That's interesting idea. I only worry there could be cases when the
perl-generators were unnecessarily installed. E.g. you install vim-enhanced,
thus you have perl-libs, and you install rpm-build for building non-perl
packages. Then you will have perl-generators. I'm not sure how much it
would bother people.


Another issue: FESCo banned the rich dependencies
.


We were discussing this for F-25 and they're not banned for F-25, just 
F-24, at least so far.



I'm not against adding the suggested conditional dependency to make the build
root more compatible. I only feel telling packagers "you don't have to
build-require perl-generators" and then adding "but you have sometimes"
a little bit confusing and hard to follow.


How about "if you ship a perl script or module, you must BR: perl"?

For the vast majority of packages, this would be needed anyway as perl 
is used in the build process. For those few exceptions you were talking 
about, this would pull in perl-generators via dependencies. All clear 
and problem solved.


Paul.
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-04-06 Thread Petr Pisar
On Fri, Apr 01, 2016 at 12:14:43PM +0200, Petr Pisar wrote:
> On Thu, Mar 31, 2016 at 02:43:41PM +0100, Paul Howarth wrote:
> > Might it not be easier to use the newly-allowed boolean dependencies, e.g.
> > in rpm-build something like this:
> > 
> > Requires: (perl-generators if perl-libs)
> > 
> That's interesting idea. I only worry there could be cases when the
> perl-generators were unnecessarily installed. E.g. you install vim-enhanced,
> thus you have perl-libs, and you install rpm-build for building non-perl
> packages. Then you will have perl-generators. I'm not sure how much it
> would bother people.
> 
Another issue: FESCo banned the rich dependencies
.

I'm not against adding the suggested conditional dependency to make the build
root more compatible. I only feel telling packagers "you don't have to
build-require perl-generators" and then adding "but you have sometimes"
a little bit confusing and hard to follow.

-- Petr


signature.asc
Description: PGP signature
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-04-04 Thread Ralf Corsepius

On 04/04/2016 09:46 AM, Petr Pisar wrote:

On Fri, Apr 01, 2016 at 05:00:14PM +0200, Ralf Corsepius wrote:

On 04/01/2016 03:46 PM, Petr Pisar wrote:

On Fri, Apr 01, 2016 at 12:14:43PM +0200, Petr Pisar wrote:

On Thu, Mar 31, 2016 at 02:43:41PM +0100, Paul Howarth wrote:

Requires: (perl-generators if perl-libs)


That's interesting idea. I only worry there could be cases when the
perl-generators were unnecessarily installed. E.g. you install vim-enhanced,
thus you have perl-libs, and you install rpm-build for building non-perl
packages. Then you will have perl-generators. I'm not sure how much it
would bother people.


One more issue. It would not work if you had a spec file that does not need
a perl for building. Spec that only installs a perl script into /usr/bin.
I know there are some.


These package should be considered broken.

We require run-time deps to be present as build-deps to make sure these
packages actually are runable and installable.


Oh, really?

Yes.


I know it's good to run tests, but still there are plenty of
packages without tests (covering the perl scipts), so besides knowing we had
all run-time dependencies on build-time, build-requiring them does not have
other benefits.

I wasn't referring to tests in particular.

I was talking about run-time deps, which are required for proper 
run-time operation, which are not used at build time and therefore not 
explicitly BuildRequired.


Classical example would be a package which installs a perl-script which 
is using some arbitrary perl modules to /usr/bin, but doesn't carry 
explicit checks for this scripts' requirements nor does a testsuite to 
exercise this scripts.


Such kind of run-time package's deps silently (and often unnoticed) get 
added additional deps, which either add deps to nonexisting packages or 
break if a package is removed from Fedora.


We've had quite a few such cases in Fedora's history. Most common case 
is perl packages, which after an package update require further 
perl-modules.



Ralf
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-04-01 Thread Ralf Corsepius

On 04/01/2016 03:46 PM, Petr Pisar wrote:

On Fri, Apr 01, 2016 at 12:14:43PM +0200, Petr Pisar wrote:

On Thu, Mar 31, 2016 at 02:43:41PM +0100, Paul Howarth wrote:

Requires: (perl-generators if perl-libs)


That's interesting idea. I only worry there could be cases when the
perl-generators were unnecessarily installed. E.g. you install vim-enhanced,
thus you have perl-libs, and you install rpm-build for building non-perl
packages. Then you will have perl-generators. I'm not sure how much it
would bother people.


One more issue. It would not work if you had a spec file that does not need
a perl for building. Spec that only installs a perl script into /usr/bin.
I know there are some.


These package should be considered broken.

We require run-time deps to be present as build-deps to make sure these 
packages actually are runable and installable.


Ralf

--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-04-01 Thread Paul Howarth

On 01/04/16 14:46, Petr Pisar wrote:

On Fri, Apr 01, 2016 at 12:14:43PM +0200, Petr Pisar wrote:

On Thu, Mar 31, 2016 at 02:43:41PM +0100, Paul Howarth wrote:

Requires: (perl-generators if perl-libs)


That's interesting idea. I only worry there could be cases when the
perl-generators were unnecessarily installed. E.g. you install vim-enhanced,
thus you have perl-libs, and you install rpm-build for building non-perl
packages. Then you will have perl-generators. I'm not sure how much it
would bother people.


One more issue. It would not work if you had a spec file that does not need
a perl for building. Spec that only installs a perl script into /usr/bin.
I know there are some.


True, but those few cases could be fixed by adding BR: perl-generators 
as per the original plan - it would save having to change thousands of 
specs for this purpose (though they would need changing for version 
normalization anyway at some point if that's going ahead).


Paul.
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-04-01 Thread Ralf Corsepius

On 04/01/2016 03:33 PM, Paul Howarth wrote:


I think people doing development work like that are less bothered about
pulling in a few deps than the cloud/embedded people, where every
megabyte is worth saving.


Sizes matter at run-time, but I fail to understand why they would matter 
much at build-time.


Ralf
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-04-01 Thread Petr Pisar
On Fri, Apr 01, 2016 at 12:14:43PM +0200, Petr Pisar wrote:
> On Thu, Mar 31, 2016 at 02:43:41PM +0100, Paul Howarth wrote:
> > Requires: (perl-generators if perl-libs)
> > 
> That's interesting idea. I only worry there could be cases when the
> perl-generators were unnecessarily installed. E.g. you install vim-enhanced,
> thus you have perl-libs, and you install rpm-build for building non-perl
> packages. Then you will have perl-generators. I'm not sure how much it
> would bother people.
> 
One more issue. It would not work if you had a spec file that does not need
a perl for building. Spec that only installs a perl script into /usr/bin.
I know there are some.

-- Petr


signature.asc
Description: PGP signature
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-04-01 Thread Paul Howarth

On 01/04/16 11:14, Petr Pisar wrote:

On Thu, Mar 31, 2016 at 02:43:41PM +0100, Paul Howarth wrote:

On 31/03/16 14:10, Petr Pisar wrote:

But the compatibility is important. Without perl-generators in a build root
no Perl dependencies are generated into binary packages. To fix it, every
Perl package must build-require perl-generators.


Might it not be easier to use the newly-allowed boolean dependencies, e.g.
in rpm-build something like this:

Requires: (perl-generators if perl-libs)


That's interesting idea. I only worry there could be cases when the
perl-generators were unnecessarily installed. E.g. you install vim-enhanced,
thus you have perl-libs, and you install rpm-build for building non-perl
packages. Then you will have perl-generators. I'm not sure how much it
would bother people.


I think people doing development work like that are less bothered about 
pulling in a few deps than the cloud/embedded people, where every 
megabyte is worth saving. Wouldn't most developers have perl anyway? 
Maybe not these days, I don't know.


Paul.
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-04-01 Thread Petr Pisar
On Thu, Mar 31, 2016 at 02:43:41PM +0100, Paul Howarth wrote:
> On 31/03/16 14:10, Petr Pisar wrote:
> >But the compatibility is important. Without perl-generators in a build root
> >no Perl dependencies are generated into binary packages. To fix it, every
> >Perl package must build-require perl-generators.
> 
> Might it not be easier to use the newly-allowed boolean dependencies, e.g.
> in rpm-build something like this:
> 
> Requires: (perl-generators if perl-libs)
> 
That's interesting idea. I only worry there could be cases when the
perl-generators were unnecessarily installed. E.g. you install vim-enhanced,
thus you have perl-libs, and you install rpm-build for building non-perl
packages. Then you will have perl-generators. I'm not sure how much it
would bother people.

-- Petr


signature.asc
Description: PGP signature
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-03-31 Thread Tim Orling
+1

Since I care about embedded and containers, having a smaller minimal build
root is high on my list.

As a perl module maintainer, I don't mind adding a few lines to my spec
files to achieve this. Especially since you are updating the guidelines to
provide clear guidance.


--Tim (Intel)

On Thu, Mar 31, 2016 at 6:43 AM, Paul Howarth  wrote:

> On 31/03/16 14:10, Petr Pisar wrote:
>
>> Fedora's minimal build root contains perl. There is a reasonable request
>>  to
>> remove the perl in order to minimize the build root. (The x86_64 F25 build
>> root occupies 527 MB now, 20 MB of that are perl packages.)
>>
>> The reason why perl is there is the rpm-build package. The Requires
>> dependency
>> tree looks like:
>>
>> rpm-build
>>  perl-generators
>>  perl(:MODULE_COMPAT_5.22.1)
>>  perl(Fedora::VSP)
>>  perl
>>  perl-macros
>>  system-rpm-config   (a Provide)
>>  redhat-rpm-config
>>  perl-srpm-macros
>>
>> While perl-srpm-macros's presence is intended, perl-generators' presence
>> is
>> unwanted.
>>
>> On technical level, the reason is the rpm-build binary package requires
>> perl-generators explicitely. It's there for backward compatibility. Simply
>> removing the dependency removes perl from minimal build root.
>>
>> But the compatibility is important. Without perl-generators in a build
>> root no
>> Perl dependencies are generated into binary packages. To fix it, every
>> Perl
>> package must build-require perl-generators.
>>
>
> Might it not be easier to use the newly-allowed boolean dependencies, e.g.
> in rpm-build something like this:
>
> Requires: (perl-generators if perl-libs)
>
> Paul.
> --
> Fedora Extras Perl SIG
> http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
> perl-devel mailing list
> perl-devel@lists.fedoraproject.org
>
> http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Re: Removing perl from build root

2016-03-31 Thread Paul Howarth

On 31/03/16 14:10, Petr Pisar wrote:

Fedora's minimal build root contains perl. There is a reasonable request
 to
remove the perl in order to minimize the build root. (The x86_64 F25 build
root occupies 527 MB now, 20 MB of that are perl packages.)

The reason why perl is there is the rpm-build package. The Requires dependency
tree looks like:

rpm-build
 perl-generators
 perl(:MODULE_COMPAT_5.22.1)
 perl(Fedora::VSP)
 perl
 perl-macros
 system-rpm-config   (a Provide)
 redhat-rpm-config
 perl-srpm-macros

While perl-srpm-macros's presence is intended, perl-generators' presence is
unwanted.

On technical level, the reason is the rpm-build binary package requires
perl-generators explicitely. It's there for backward compatibility. Simply
removing the dependency removes perl from minimal build root.

But the compatibility is important. Without perl-generators in a build root no
Perl dependencies are generated into binary packages. To fix it, every Perl
package must build-require perl-generators.


Might it not be easier to use the newly-allowed boolean dependencies, 
e.g. in rpm-build something like this:


Requires: (perl-generators if perl-libs)

Paul.
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Removing perl from build root

2016-03-31 Thread Petr Pisar
Fedora's minimal build root contains perl. There is a reasonable request
 to
remove the perl in order to minimize the build root. (The x86_64 F25 build
root occupies 527 MB now, 20 MB of that are perl packages.)

The reason why perl is there is the rpm-build package. The Requires dependency
tree looks like:

rpm-build
perl-generators
perl(:MODULE_COMPAT_5.22.1)
perl(Fedora::VSP)
perl
perl-macros
system-rpm-config   (a Provide)
redhat-rpm-config
perl-srpm-macros

While perl-srpm-macros's presence is intended, perl-generators' presence is
unwanted.

On technical level, the reason is the rpm-build binary package requires
perl-generators explicitely. It's there for backward compatibility. Simply
removing the dependency removes perl from minimal build root.

But the compatibility is important. Without perl-generators in a build root no
Perl dependencies are generated into binary packages. To fix it, every Perl
package must build-require perl-generators.

This change will go through a Fedora system wide change process and Perl
packaging guidelines update. I'd like to implement it in Fedora 25.

Few weeks ago, me, Contyk and Jitka were thinking about the new packaging
guidelines. We concluded that the guidelines should contain only the necessary
minimum and best practices should be documented on freely updatable wiki page.

We found these interesting packages:

perl-generators requires perl and some other modules
perl/usr/bin/perl
perl-libs   libperl.so and essencial modules and perl(:MODULE_COMPAT_)
perl-devel  requires gcc for header files
perl-macros requires perl(:MODULE_COMPAT_) now
perl-srpm-macrosno dependencies

Guidelines should describe that:

(1) You must build-require perl-generators if you install a Perl code to
ensure run-time depencies are automatically generated.

Then there are other rules that are actually implied by the generic guidelines
(require everything what you use) that could or could not go the the
guidelines as:

(2) You must build-require perl-macros if you use a macro provided by them.

(3) You must build-require perl if you execute the perl interpreter at
build-time.

(4) You must build-require perl-devel if you build XS code.

Questionable are %__perl and %perl_vendorlib-like macros, what macros are
provided by perl-srpm-macros and what macros are provided by perl-srpm-macros.

%__perl and %perl_vendorlib macros come from rpm. Former rpm Fedora
maintainer claimed he want to own the macros forever. But the truth is they
do not work without installed perl. And rpm does not require perl.

The division between perl-macros and perl-srpm-macros is, in my vision,
defined by requirement on perl interpreter. perl-srpm-macros will never
require perl. The question is where to put all the neat macros I published on
this mailing list in the previous month (the version normalization etc.).

The version normalization will go into perl-srpm-macros as it it necessary for
creating source RPM packages. If we implement normalization in F25, we should
mention it in the guidelines:

(5) Perl module versions must be normalized with %perl_v macro
like "BuildRequires: perl(Module) >= %{perl_v 1.2}".

We could also make the guidelines less how-to and more descriptive by
explaining the normalization algorithm and allowing packagers to do the
normalization manually (like listing run-time dependencies manually). But I'm
not sure if it were helpful.

Back to the build-requires. I can add "BuildRequires: perl-generators" into
all spec files that run-requires or provides perl(). This can be performed
even without mass rebuild.

I'd like to hear if this approach (adding "BuildRequires: perl-generators"
everywhere) is fine. For example, a spec file for architecture specific
package would need:

BuildRequires: perl for "perl Makefile.PL"
BuildRequires: perl-devel   for building XS code
BuildRequires: perl-generators  for generating dependencies
BuildRequires: perl-macros  for %?perl_default_filter

It looks like a lot of copy and paste code. On the other hand, It allows to
write spec files that do not need all the Perl packaging features. For
example, an package that only installs a perl script can be happy with only:

BuildRequires: perl-generators  for generating dependencies

-- Petr


signature.asc
Description: PGP signature
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org