jordansissel / fpm

Effing package management! Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.
http://fpm.readthedocs.io/en/latest/
Other
11.16k stars 1.07k forks source link

How to include external deb files as dependencies? #1958

Open ukreddy-erwin opened 1 year ago

ukreddy-erwin commented 1 year ago

With below command, I can create an empty deb package with a post installation script and few apt packages as dependencies.

fpm -s empty -t deb -n test -d python3 -d python3-pip -d vim --after-install ./postinst

Above, we are able to set apt packages available in the apt repository as dependencies. But, how to reference apt deb packages which are available as .deb files as dependencies?

ukreddy-erwin commented 1 year ago

I am trying to use fpm for the package management.

     apt-get install -y ruby-dev build-essential
     gem install fpm

After installing fpm, With below command, I can create an empty deb package with a post installation script and few apt packages as dependencies.

fpm -s empty -t deb -n test -d python3 -d python3-pip -d vim --after-install ./postinst

Above, we are able to set apt packages available in the apt repository as dependencies. But, how to reference apt deb packages which are available as .deb files as dependencies?

I tried including those deb files in the source to package and run them in post/pre install script, but getting error as apt process is locked, which I guess the current deb package created will be using, so this way is not useful.

Please suggest.

jordansissel commented 1 year ago

To the best of my knowledge, apt-get cannot do this, or at least, I can't remember a time when I've seen it done.

As you found in your example, you get an error 'apt process locked' (or similar) if you attempt to invoke apt-get install from a post install script. This is a feature of apt-get trying to protect itself from conflicting installation activities.

Can you tell me more about your goals? Can you show me (or describe) the ./postinst file contents?

ukreddy-erwin commented 1 year ago

My goal is to include two other Deb files(which are in public S3 bucket now shared) as dependencies, so it should install them before installing the fpm package create by me.

Regards, Uday


From: Jordan Sissel @.> Sent: Sunday, November 13, 2022 1:26:50 PM To: jordansissel/fpm @.> Cc: Uday Kiran Reddy (ureddy) @.>; Author @.> Subject: Re: [jordansissel/fpm] How to include external deb files as dependencies? (Issue #1958)

CAUTION: This email originated from outside of the organization. Do not follow guidance, click links, or open attachments unless you recognize the sender and know the content is safe.

To the best of my knowledge, apt-get cannot do this, or at least, I can't remember a time when I've seen it done.

As you found in your example, you get an error 'apt process locked' (or similar) if you attempt to invoke apt-get install from a post install script. This is a feature of apt-get trying to protect itself from conflicting installation activities.

Can you tell me more about your goals? Can you show me (or describe) the ./postinst file contents?

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjordansissel%2Ffpm%2Fissues%2F1958%23issuecomment-1312663953&data=05%7C01%7Cukreddy%40erwin.com%7C30628b0ba6c54ef015a608dac54c9fa3%7C91c369b51c9e439c989c1867ec606603%7C0%7C0%7C638039230227152204%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=UiqYsaQWkoG7xkMVyo9DSZT8iaCBWMYE5bhLgo2J5iU%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAFCBXBKDT3UVHNRNLUJMWLLWICNMFANCNFSM6AAAAAAR2FJOUE&data=05%7C01%7Cukreddy%40erwin.com%7C30628b0ba6c54ef015a608dac54c9fa3%7C91c369b51c9e439c989c1867ec606603%7C0%7C0%7C638039230227152204%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=sg6uyLenw0GCzm4KED93hficHdRdX9NaLv36N52gF6g%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>