Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #1627 #2053

Merged
merged 5 commits into from
Dec 9, 2024
Merged

Fix for #1627 #2053

merged 5 commits into from
Dec 9, 2024

Conversation

JordanStopford
Copy link
Contributor

@JordanStopford JordanStopford commented Mar 8, 2024

When packaging a deb sometimes the architecture comes through as part of the provides (not sure why) but this causes problems with the deb package as it seems to only ever expect one set of round brackets which is the version indicator
Also fixed another issue where ppc64le packages from RPM wouldn't install properly on DEB based systems as they use ppc64el.
Also fixed another issue where invalid dependencies were being put in the control file (rpmlib dependencies and file path dependencies i.e. RPMs that depend on /bin/sh)

This has got fpm working for RPMs->DEBs on our systems for ppc64le packages. Appreciate that this fix might not be "complete" or comprehensive in any way, shape or form so any feedback is welcome.

When packaging a deb sometimes the architecture comes through as part of the provides (not sure why) but this causes problems with the deb package as it seems to only ever expect one set of round brackets which is the version indicator
JordanStopford and others added 4 commits April 17, 2024 16:31
When packaging a deb sometimes a path to a binary comes into the requires field i.e. /bin/sh but this isn't valid for control files. Strip this out
When packaging a deb sometimes a path to a binary comes into the requires field i.e. /bin/sh but this isn't valid for control files. Strip this out
Strip rpmlib dependencies
@jordansissel
Copy link
Owner

I haven’t tested this, but the change seems like it’s a good solution. @JordanStopford you ok with me merging?

@JordanStopford
Copy link
Contributor Author

JordanStopford commented Apr 23, 2024 via email

@jordansissel
Copy link
Owner

It’s ok 👍 to include multiple changes in a single PR. My request for keeping this one PR is to update the PR description to refer to the things you improve.

Otherwise, yes, all changes look like good improvements :)

@JordanStopford
Copy link
Contributor Author

@jordansissel I've amended the PR description above. Thanks for your feedback!

@jordansissel
Copy link
Owner

I tested manually with the example from #1627 (smartmontools from OpenSUSE, and I confirmed the error without this patch:

Invalid relationship field for debian package: config(smartmontools) = 7.4-2.3 {:level=>:error}
Invalid package configuration: Found invalid Provides field values ("config(smartmontools) = 7.4-2.3"). This is not valid in a Debian package. {:level=>:error}

Testing your patch looks good:

% bundle exec bin/fpm -s rpm -t deb smartmontools-7.4-2.3.x86_64.rpm
...
Created package {:path=>"smartmontools_7.4-2.3_amd64.deb"}

# Check the `Provides` field in the resulting 'deb' file:
% ar p smartmontools_7.4-2.3_amd64.deb control.tar.gz | tar -zxO ./control | grep Provides:
Provides: smartmontools (= 7.4-2.3)

@jordansissel jordansissel merged commit e7e7449 into jordansissel:main Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants