Binaries generated by perl's PAR::Packer break when packaged in RPMProblem when installing package using...
Fixing conmutation for high voltage switching with power mosfet
Motivation for Zeta Function of an Algebraic Variety
Do I really need to have a scientific explanation for my premise?
Do f-stop and exposure time perfectly cancel?
Why doesn't this Google Translate ad use the word "Translation" instead of "Translate"?
Error during using callback start_page_number in lualatex
Reverse string, can I make it faster?
Single word request: Harming the benefactor
Accountant/ lawyer will not return my call
Is it "Vierergruppe" or "Viergruppe", or is there a distinction?
Declaring and defining template, and specialising them
Does "Until when" sound natural for native speakers?
Does this video of collapsing warehouse shelves show a real incident?
How can The Temple of Elementary Evil reliably protect itself against kinetic bombardment?
Books that are narrated using various points of view of the main characters
Can you reject a postdoc offer after the PI has paid a large sum for flights/accommodation for your visit?
Why would one plane in this picture not have gear down yet?
Latex does not go to next line
Is "conspicuously missing" or "conspicuously" the subject of this sentence?
What are actual Tesla M60 models used by AWS?
Word for a person who has no opinion about whether god exists
Does the nature of the Apocalypse in The Umbrella Academy change from the first to the last episode?
How to detect if C code (which needs 'extern C') is compiled in C++
When a wind turbine does not produce enough electricity how does the power company compensate for the loss?
Binaries generated by perl's PAR::Packer break when packaged in RPM
Problem when installing package using RPMCreating symlink in /usr/bin when creating an RPMRPM Build IssueGetting Segmentation fault when installing my RPM trough another RPM requirementInstall software on CentOS: binaries or rpm?Mapping between RPM file names and metadata names generated by mavenWhen debuginfo rpm is generated?Library Dependency is different when checked via yum vs. rpmWhen does rpm -V not verify md5sums?How to distinguish rpm package files from files generated by make install
I have a perl script that I want to be usable on systems with no perl interpreter installed (like a linux container, for example). I generate a binary with PAR::Packer and everything appears to work great.
[0] [ishpeck@centbox03 /tmp/examply]$ file ./perlthing/scripts/hello.pl
./perlthing/scripts/hello.pl: Perl script, ASCII text executable
[0] [ishpeck@centbox03 /tmp/examply]$ cat ./perlthing/scripts/hello.pl
#!/usr/bin/perl
use strict;
use warnings;
use File::Basename;
print "Hello, world!n"
[0] [ishpeck@centbox03 /tmp/examply]$ cat Makefile
CURDIR=/tmp/examply
TOPDIR=$(CURDIR)/packaging
rpm: perlbin
sh -c 'for x in packaging/BUILD packaging/RPMS/x86_64 packaging/RPMS/x86 packaging/RPMS/arm packaging/SOURCES packaging/SPECS packaging/SRPMS; do mkdir -p $$x; done'
rpmbuild --target x86_64 -bb $(TOPDIR)/SPECS/mypackage.spec --define '_topdir $(TOPDIR)' --define '_arch x86_64' --define '_working_dir $(CURDIR)'
perlbin: perlthing/binaries/hello.pl
perlthing/binaries/hello.pl: perlthing/scripts/hello.pl Makefile
/usr/local/bin/pp -M File::** -M PAR:: --clean --verbose=2 --output=$@ $<
clean:
rm perlthing/binaries/hello.pl
[0] [ishpeck@centbox03 /tmp/examply]$ make perlbin >/dev/null ; echo $?
0
[0] [ishpeck@centbox03 /tmp/examply]$ file perlthing/binaries/hello.pl
perlthing/binaries/hello.pl: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=7d5b38a792018d0202a96ce8645b00591e7ea7c5, stripped
[0] [ishpeck@centbox03 /tmp/examply]$ ./perlthing/binaries/hello.pl
Hello, world!
So far, so good. It even works when I copy the binary to a machine with no perl interpreter:
core@CoreOS-1 ~ $ which perl
which: no perl in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/bin)
core@CoreOS-1 ~ $ ./hello.pl
Hello, world!
I want to package this in an RPM:
[0] [ishpeck@centbox03 /tmp/examply]$ cat packaging/SPECS/mypackage.spec
Name: ishy-mypackage
Version: 0.1
Release: 1%{?dist}
Summary: My example package
License: MIT
URL: http://ishpeck.net
%description
This is my example package that includes a perl script bundled as a binary via PAR::Packer
%prep
echo "Prepare scriptlet is empty"
%build
echo "Nothing really to do"
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/local/bin/
cp %{_working_dir}/perlthing/binaries/hello.pl $RPM_BUILD_ROOT/usr/local/bin/
%files
/usr/local/bin/hello.pl
[0] [ishpeck@centbox03 /tmp/examply]$ grep rpmbuild Makefile
rpmbuild --target x86_64 -bb $(TOPDIR)/SPECS/mypackage.spec --define '_topdir $(TOPDIR)' --define '_arch x86_64' --define '_working_dir $(CURDIR)'
[0] [ishpeck@centbox03 /tmp/examply]$ make
But when I install the package, the perl binary doesn't work anymore!
[0] [ishpeck@centbox03 /tmp/examply]$ sudo rpm -i ./packaging/RPMS/x86_64/ishy-mypackage-0.1-1.el7.x86_64.rpm
[0] [ishpeck@centbox03 /tmp/examply]$ which hello.pl
/usr/local/bin/hello.pl
[0] [ishpeck@centbox03 /tmp/examply]$ hello.pl
Usage: /usr/local/bin/hello.pl [ -Alib.par ] [ -Idir ] [ -Mmodule ] [ src.par ] [ program.pl ]
/usr/local/bin/hello.pl [ -B|-b ] [-Ooutfile] src.par
Removing files in "/tmp/par-6973687065636b/temp-51174"
Undefined subroutine &File::Find::finddepth called at -e line 11.
END failed--call queue aborted at -e line 616.
I don't assume this is a problem with the way I'm using pp to generate the binary because it seems to work everywhere if I just copy it directly. My brain wants to place the blame on (how I use) rpmbuild but I don't even know where to begin with this.
Is there some arcane detail about rpmbuild that I'm missing here?
rpm perl
add a comment |
I have a perl script that I want to be usable on systems with no perl interpreter installed (like a linux container, for example). I generate a binary with PAR::Packer and everything appears to work great.
[0] [ishpeck@centbox03 /tmp/examply]$ file ./perlthing/scripts/hello.pl
./perlthing/scripts/hello.pl: Perl script, ASCII text executable
[0] [ishpeck@centbox03 /tmp/examply]$ cat ./perlthing/scripts/hello.pl
#!/usr/bin/perl
use strict;
use warnings;
use File::Basename;
print "Hello, world!n"
[0] [ishpeck@centbox03 /tmp/examply]$ cat Makefile
CURDIR=/tmp/examply
TOPDIR=$(CURDIR)/packaging
rpm: perlbin
sh -c 'for x in packaging/BUILD packaging/RPMS/x86_64 packaging/RPMS/x86 packaging/RPMS/arm packaging/SOURCES packaging/SPECS packaging/SRPMS; do mkdir -p $$x; done'
rpmbuild --target x86_64 -bb $(TOPDIR)/SPECS/mypackage.spec --define '_topdir $(TOPDIR)' --define '_arch x86_64' --define '_working_dir $(CURDIR)'
perlbin: perlthing/binaries/hello.pl
perlthing/binaries/hello.pl: perlthing/scripts/hello.pl Makefile
/usr/local/bin/pp -M File::** -M PAR:: --clean --verbose=2 --output=$@ $<
clean:
rm perlthing/binaries/hello.pl
[0] [ishpeck@centbox03 /tmp/examply]$ make perlbin >/dev/null ; echo $?
0
[0] [ishpeck@centbox03 /tmp/examply]$ file perlthing/binaries/hello.pl
perlthing/binaries/hello.pl: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=7d5b38a792018d0202a96ce8645b00591e7ea7c5, stripped
[0] [ishpeck@centbox03 /tmp/examply]$ ./perlthing/binaries/hello.pl
Hello, world!
So far, so good. It even works when I copy the binary to a machine with no perl interpreter:
core@CoreOS-1 ~ $ which perl
which: no perl in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/bin)
core@CoreOS-1 ~ $ ./hello.pl
Hello, world!
I want to package this in an RPM:
[0] [ishpeck@centbox03 /tmp/examply]$ cat packaging/SPECS/mypackage.spec
Name: ishy-mypackage
Version: 0.1
Release: 1%{?dist}
Summary: My example package
License: MIT
URL: http://ishpeck.net
%description
This is my example package that includes a perl script bundled as a binary via PAR::Packer
%prep
echo "Prepare scriptlet is empty"
%build
echo "Nothing really to do"
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/local/bin/
cp %{_working_dir}/perlthing/binaries/hello.pl $RPM_BUILD_ROOT/usr/local/bin/
%files
/usr/local/bin/hello.pl
[0] [ishpeck@centbox03 /tmp/examply]$ grep rpmbuild Makefile
rpmbuild --target x86_64 -bb $(TOPDIR)/SPECS/mypackage.spec --define '_topdir $(TOPDIR)' --define '_arch x86_64' --define '_working_dir $(CURDIR)'
[0] [ishpeck@centbox03 /tmp/examply]$ make
But when I install the package, the perl binary doesn't work anymore!
[0] [ishpeck@centbox03 /tmp/examply]$ sudo rpm -i ./packaging/RPMS/x86_64/ishy-mypackage-0.1-1.el7.x86_64.rpm
[0] [ishpeck@centbox03 /tmp/examply]$ which hello.pl
/usr/local/bin/hello.pl
[0] [ishpeck@centbox03 /tmp/examply]$ hello.pl
Usage: /usr/local/bin/hello.pl [ -Alib.par ] [ -Idir ] [ -Mmodule ] [ src.par ] [ program.pl ]
/usr/local/bin/hello.pl [ -B|-b ] [-Ooutfile] src.par
Removing files in "/tmp/par-6973687065636b/temp-51174"
Undefined subroutine &File::Find::finddepth called at -e line 11.
END failed--call queue aborted at -e line 616.
I don't assume this is a problem with the way I'm using pp to generate the binary because it seems to work everywhere if I just copy it directly. My brain wants to place the blame on (how I use) rpmbuild but I don't even know where to begin with this.
Is there some arcane detail about rpmbuild that I'm missing here?
rpm perl
add a comment |
I have a perl script that I want to be usable on systems with no perl interpreter installed (like a linux container, for example). I generate a binary with PAR::Packer and everything appears to work great.
[0] [ishpeck@centbox03 /tmp/examply]$ file ./perlthing/scripts/hello.pl
./perlthing/scripts/hello.pl: Perl script, ASCII text executable
[0] [ishpeck@centbox03 /tmp/examply]$ cat ./perlthing/scripts/hello.pl
#!/usr/bin/perl
use strict;
use warnings;
use File::Basename;
print "Hello, world!n"
[0] [ishpeck@centbox03 /tmp/examply]$ cat Makefile
CURDIR=/tmp/examply
TOPDIR=$(CURDIR)/packaging
rpm: perlbin
sh -c 'for x in packaging/BUILD packaging/RPMS/x86_64 packaging/RPMS/x86 packaging/RPMS/arm packaging/SOURCES packaging/SPECS packaging/SRPMS; do mkdir -p $$x; done'
rpmbuild --target x86_64 -bb $(TOPDIR)/SPECS/mypackage.spec --define '_topdir $(TOPDIR)' --define '_arch x86_64' --define '_working_dir $(CURDIR)'
perlbin: perlthing/binaries/hello.pl
perlthing/binaries/hello.pl: perlthing/scripts/hello.pl Makefile
/usr/local/bin/pp -M File::** -M PAR:: --clean --verbose=2 --output=$@ $<
clean:
rm perlthing/binaries/hello.pl
[0] [ishpeck@centbox03 /tmp/examply]$ make perlbin >/dev/null ; echo $?
0
[0] [ishpeck@centbox03 /tmp/examply]$ file perlthing/binaries/hello.pl
perlthing/binaries/hello.pl: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=7d5b38a792018d0202a96ce8645b00591e7ea7c5, stripped
[0] [ishpeck@centbox03 /tmp/examply]$ ./perlthing/binaries/hello.pl
Hello, world!
So far, so good. It even works when I copy the binary to a machine with no perl interpreter:
core@CoreOS-1 ~ $ which perl
which: no perl in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/bin)
core@CoreOS-1 ~ $ ./hello.pl
Hello, world!
I want to package this in an RPM:
[0] [ishpeck@centbox03 /tmp/examply]$ cat packaging/SPECS/mypackage.spec
Name: ishy-mypackage
Version: 0.1
Release: 1%{?dist}
Summary: My example package
License: MIT
URL: http://ishpeck.net
%description
This is my example package that includes a perl script bundled as a binary via PAR::Packer
%prep
echo "Prepare scriptlet is empty"
%build
echo "Nothing really to do"
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/local/bin/
cp %{_working_dir}/perlthing/binaries/hello.pl $RPM_BUILD_ROOT/usr/local/bin/
%files
/usr/local/bin/hello.pl
[0] [ishpeck@centbox03 /tmp/examply]$ grep rpmbuild Makefile
rpmbuild --target x86_64 -bb $(TOPDIR)/SPECS/mypackage.spec --define '_topdir $(TOPDIR)' --define '_arch x86_64' --define '_working_dir $(CURDIR)'
[0] [ishpeck@centbox03 /tmp/examply]$ make
But when I install the package, the perl binary doesn't work anymore!
[0] [ishpeck@centbox03 /tmp/examply]$ sudo rpm -i ./packaging/RPMS/x86_64/ishy-mypackage-0.1-1.el7.x86_64.rpm
[0] [ishpeck@centbox03 /tmp/examply]$ which hello.pl
/usr/local/bin/hello.pl
[0] [ishpeck@centbox03 /tmp/examply]$ hello.pl
Usage: /usr/local/bin/hello.pl [ -Alib.par ] [ -Idir ] [ -Mmodule ] [ src.par ] [ program.pl ]
/usr/local/bin/hello.pl [ -B|-b ] [-Ooutfile] src.par
Removing files in "/tmp/par-6973687065636b/temp-51174"
Undefined subroutine &File::Find::finddepth called at -e line 11.
END failed--call queue aborted at -e line 616.
I don't assume this is a problem with the way I'm using pp to generate the binary because it seems to work everywhere if I just copy it directly. My brain wants to place the blame on (how I use) rpmbuild but I don't even know where to begin with this.
Is there some arcane detail about rpmbuild that I'm missing here?
rpm perl
I have a perl script that I want to be usable on systems with no perl interpreter installed (like a linux container, for example). I generate a binary with PAR::Packer and everything appears to work great.
[0] [ishpeck@centbox03 /tmp/examply]$ file ./perlthing/scripts/hello.pl
./perlthing/scripts/hello.pl: Perl script, ASCII text executable
[0] [ishpeck@centbox03 /tmp/examply]$ cat ./perlthing/scripts/hello.pl
#!/usr/bin/perl
use strict;
use warnings;
use File::Basename;
print "Hello, world!n"
[0] [ishpeck@centbox03 /tmp/examply]$ cat Makefile
CURDIR=/tmp/examply
TOPDIR=$(CURDIR)/packaging
rpm: perlbin
sh -c 'for x in packaging/BUILD packaging/RPMS/x86_64 packaging/RPMS/x86 packaging/RPMS/arm packaging/SOURCES packaging/SPECS packaging/SRPMS; do mkdir -p $$x; done'
rpmbuild --target x86_64 -bb $(TOPDIR)/SPECS/mypackage.spec --define '_topdir $(TOPDIR)' --define '_arch x86_64' --define '_working_dir $(CURDIR)'
perlbin: perlthing/binaries/hello.pl
perlthing/binaries/hello.pl: perlthing/scripts/hello.pl Makefile
/usr/local/bin/pp -M File::** -M PAR:: --clean --verbose=2 --output=$@ $<
clean:
rm perlthing/binaries/hello.pl
[0] [ishpeck@centbox03 /tmp/examply]$ make perlbin >/dev/null ; echo $?
0
[0] [ishpeck@centbox03 /tmp/examply]$ file perlthing/binaries/hello.pl
perlthing/binaries/hello.pl: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=7d5b38a792018d0202a96ce8645b00591e7ea7c5, stripped
[0] [ishpeck@centbox03 /tmp/examply]$ ./perlthing/binaries/hello.pl
Hello, world!
So far, so good. It even works when I copy the binary to a machine with no perl interpreter:
core@CoreOS-1 ~ $ which perl
which: no perl in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/bin)
core@CoreOS-1 ~ $ ./hello.pl
Hello, world!
I want to package this in an RPM:
[0] [ishpeck@centbox03 /tmp/examply]$ cat packaging/SPECS/mypackage.spec
Name: ishy-mypackage
Version: 0.1
Release: 1%{?dist}
Summary: My example package
License: MIT
URL: http://ishpeck.net
%description
This is my example package that includes a perl script bundled as a binary via PAR::Packer
%prep
echo "Prepare scriptlet is empty"
%build
echo "Nothing really to do"
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/local/bin/
cp %{_working_dir}/perlthing/binaries/hello.pl $RPM_BUILD_ROOT/usr/local/bin/
%files
/usr/local/bin/hello.pl
[0] [ishpeck@centbox03 /tmp/examply]$ grep rpmbuild Makefile
rpmbuild --target x86_64 -bb $(TOPDIR)/SPECS/mypackage.spec --define '_topdir $(TOPDIR)' --define '_arch x86_64' --define '_working_dir $(CURDIR)'
[0] [ishpeck@centbox03 /tmp/examply]$ make
But when I install the package, the perl binary doesn't work anymore!
[0] [ishpeck@centbox03 /tmp/examply]$ sudo rpm -i ./packaging/RPMS/x86_64/ishy-mypackage-0.1-1.el7.x86_64.rpm
[0] [ishpeck@centbox03 /tmp/examply]$ which hello.pl
/usr/local/bin/hello.pl
[0] [ishpeck@centbox03 /tmp/examply]$ hello.pl
Usage: /usr/local/bin/hello.pl [ -Alib.par ] [ -Idir ] [ -Mmodule ] [ src.par ] [ program.pl ]
/usr/local/bin/hello.pl [ -B|-b ] [-Ooutfile] src.par
Removing files in "/tmp/par-6973687065636b/temp-51174"
Undefined subroutine &File::Find::finddepth called at -e line 11.
END failed--call queue aborted at -e line 616.
I don't assume this is a problem with the way I'm using pp to generate the binary because it seems to work everywhere if I just copy it directly. My brain wants to place the blame on (how I use) rpmbuild but I don't even know where to begin with this.
Is there some arcane detail about rpmbuild that I'm missing here?
rpm perl
rpm perl
asked 5 mins ago
IshpeckIshpeck
1084
1084
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f957839%2fbinaries-generated-by-perls-parpacker-break-when-packaged-in-rpm%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f957839%2fbinaries-generated-by-perls-parpacker-break-when-packaged-in-rpm%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown