[Bug 1517249] New: perl-homedir is incompatible with rpmbuild -ba perl-*.spec

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

 



https://bugzilla.redhat.com/show_bug.cgi?id=1517249

            Bug ID: 1517249
           Summary: perl-homedir is incompatible with rpmbuild -ba
                    perl-*.spec
           Product: Fedora
           Version: 26
         Component: perl-local-lib
          Severity: medium
          Assignee: jplesnik@xxxxxxxxxx
          Reporter: mzalewsk@xxxxxxxxxx
        QA Contact: extras-qa@xxxxxxxxxxxxxxxxx
                CC: iarnell@xxxxxxxxx, jplesnik@xxxxxxxxxx,
                    perl-devel@xxxxxxxxxxxxxxxxxxxxxxx



When perl-homedir is installed and enabled, `rpmbuild -ba` will fail for
majority (all?) of perl packages. The reason is that perl build will put files
in different locations than when RPM expects them (see below for all the
details).

That was found on one of machines that sanity-checks RPM packages (rebuilds
them and tries to install them). After perl-homedir was installed, subsequent
checks for other perl package failed. In this particular case perl-homedir
could be removed (or disabled for system user doing rebuilds), but I don't
think that users should have to decide between perl-homedir and rpmbuild
working as expected.

The root cause is INSTALL_BASE set to ~/perl5 in Makefile generated by perl. It
comes from $PERL_MB_OPT and/or $PERL_MM_OPT environmental variables set by
perl-homedir. Maybe perl RPM macro could filter/unset these variables on one of
early setup stages?

Version-Release number of selected component (if applicable):
perl-local-lib-2.000023-1.fc26.src.rpm


How reproducible:
100%

Steps to Reproduce:
1. Ensure that you have environment for building RPM packages (install
rpmdevtools and rpm-build, run rpmdev-setuptree) and that perl-homedir package
is installed and enabled (spawn new shell after installation)
2. Pick up noarch perl package for reproducing (e.g. perl-Getopt-Long)
3. Download source RPM of package (`dnf download --source perl-Getopt-Long`)
4. Install source RPM package (`rpm -i *.src.rpm`)
5. Install build-dependencies of source RPM package (`dnf builddep
perl-Getopt-Long`)
6. Try to build package (`rpmbuild -ba ~/rpmbuild/SPECS/perl-Getopt-Long.spec`)

Actual results:
Build fails with message about missing files:
RPM build errors:
    File not found:
/home/mzalewsk/rpmbuild/BUILDROOT/perl-Getopt-Long-2.40-3.fc26.x86_64/usr/share/perl5/vendor_perl/*
    File not found:
/home/mzalewsk/rpmbuild/BUILDROOT/perl-Getopt-Long-2.40-3.fc26.x86_64/usr/share/man/man3/*

Expected results:
Build succeeds.


Additional info:
As shown by directory trees, perl-homedir causes perl build system to put files
in home directory of user even inside build root:

tree -d ~/rpmbuild/BUILDROOT/perl-Getopt-Long-2.40-3.fc26.x86_64/
BUILDROOT/perl-Getopt-Long-2.40-3.fc26.x86_64/
├── home
│   └── mzalewsk
│       └── perl5
│           ├── lib
│           │   └── perl5
│           │       ├── Getopt
│           │       └── x86_64-linux-thread-multi
│           │           └── auto
│           │               └── Getopt
│           │                   └── Long
│           └── man
│               └── man3
└── usr
    └── share
        └── doc
            └── perl-Getopt-Long
                └── examples

Directory tree without perl-homedir, for comparison:
/home/mzalewsk/rpmbuild/BUILDROOT/perl-Getopt-Long-2.40-3.fc26.x86_64/
└── usr
    ├── lib64
    │   └── perl5
    │       └── vendor_perl
    │           └── auto
    │               └── Getopt
    │                   └── Long
    └── share
        ├── doc
        │   └── perl-Getopt-Long
        │       └── examples
        ├── man
        │   └── man3
        └── perl5
            └── vendor_perl
                └── Getopt

%{perl_vendorlib} and %{_mandir} RPM macros support only second directory
structure (and rightfully so), which causes them to resolve to non-existing
paths if first tree was created.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
perl-devel mailing list -- perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to perl-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]

  Powered by Linux