Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Greg_Harewood
Contributor

At the risk of being told unsupported... how do I package our bash scripts info a compatible rpm?

Hi.

Using a suitable version of Linux (CentOS 7.7), I'm able to build an RPM that almost unpacks on Gaia.  This is just to make it easier to distribute our collection of bash scripts to new firewalls.  But I'm stuck.  Please help.

When I try to unpack I get

[Expert@MDS:0]# rpm -Uhv hw.rpm
error: Failed dependencies:
info is needed by helloworld-1.0-1.el7.x86_64
rpmlib(FileDigests) <= 4.6.0-1 is needed by helloworld-1.0-1.el7.x86_64
rpmlib(PayloadIsXz) <= 5.2-1 is needed by helloworld-1.0-1.el7.x86_64
[Expert@MDS:0]#

I made progress... I've flipped to older gzip and older hashing in my ~/.rpmmacros with

%_binary_payload w2.gzdio
%_source_filedigest_algorithm  1
%_binary_filedigest_algorithm  1

...and I now get just...

[Expert@MDS:0]# rpm -Uhv  hw.rpm
error: Failed dependencies:
        info is needed by helloworld-1.0-1.el7.x86_64
[Expert@MDS:0]#

 

I'm stuck.  What is the "info" module?  I have a hunch modern linux rpmbuild thinks it's a fundamental part of the core.  Or.... can I turn the info feature off with another flag?  I might be better of asking this on a generic linux forum, but I do think that the answer would be of interest to other Check Point scripters.

Thanks!

0 Kudos
6 Replies
John_Fleming
Advisor

I don't know if this is still the case but i think the upgrade system will freak if it finds an unknown rpm.

0 Kudos
PhoneBoy
Admin
Admin

What about ye olde --force in the rpm command?

That said, I'm with @John_Fleming, I suspect this will cause issues down the road.
Proceed with caution.

0 Kudos
G_W_Albrecht
Legend Legend
Legend

Why use rpm instead of tgz  to distribute the collection of bash scripts to new firewalls ? I would assume that you do not need really need dependencies for a script collection...

CCSE / CCTE / CTPS / CCME / CCSM Elite / SMB Specialist
0 Kudos
Greg_Harewood
Contributor

Mostly just to automate some installation scripts... add directories to the PATH, set some preferred clish settings, that sort of thing.  An RPM guarantees correct location and an install process.

0 Kudos
Danny
Champion Champion
Champion

I suggest writing an installer bash script that sets your settings and unpacks the included bash scripts. You can pack bash scripts via base64 into other bash scripts.

0 Kudos
John_Fleming
Advisor

I don't think modeling this on Centos 7.7 is a very close match also. It think Centos 6 is a closer match seeing as that ships with a 3.10 kernel as well. I would check for common rpm versions to get an even better match up (6.?). Once there you can start doing things like spinning up a vm and dump compiles and whatnot rpms on a checkpoint vm to really customize. 

--force would ignore the depency check like @PhoneBoy said though.

I'm guessing you built the RPM on the 7.7 box based on the dependency of a el7 rpm? Might be the root of your issue.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events