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

Allow setting platform macro settings externally #2585

Merged

Conversation

zboszor
Copy link
Contributor

@zboszor zboszor commented Jul 26, 2023

By default, rpm installs a series of default platforms based on the CPU architecture names in subdirectories called /usr/lib/platform/<arch>-linux.

This is enough for regular Linux distributions. However, some distributions may use more specific platform names that refer to particular computer systems, like SBCs or specific CPU tuning when compiling.

If the platform subdirectory does not exist in /usr/lib/platform then rpmbuild does not work.

Allow creating such custom platform subdirectory with feeding the necessary data using external variables: RPM_CUSTOM_ARCH, RPM_CUSTOM_ISANAME, RPM_CUSTOM_ISABITS, RPM_CUSTOM_CANONARCH and RPM_CUSTOM_CANONCOLOR

Fixes #2578

INSTALL Outdated
Comment on lines 151 to 154
This is enough for regular Linux distributions, except Yocto. Yocto has
so called Board Support Packages (BSPs) that cover more than the CPU
architectures. These BSPs cover specific single board computer systems.
Examples of such BSP names:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you reword this to not require knowing what Yocto is? That is, if Yocto disappeared tomorrow, we wouldn't have a good reference for the need for this feature.

While we want to serve and support distributions, we try to ensure our features aren't "distro-dependant", so if the documentation on this can be made compelling without singling out or requiring to know Yocto, that would significantly help.

INSTALL Outdated
Comment on lines 151 to 154
This is enough for regular Linux distributions, except Yocto. Yocto has
so called Board Support Packages (BSPs) that cover more than the CPU
architectures. These BSPs cover specific single board computer systems.
Examples of such BSP names:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you reword this to not require knowing what Yocto is? That is, if Yocto disappeared tomorrow, we wouldn't have a good reference for the need for this feature.

While we want to serve and support distributions, we try to ensure our features aren't "distro-dependant", so if the documentation on this can be made compelling without singling out or requiring to know Yocto, that would significantly help.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I refreshed the commit message and INSTALL. Please re-read it. Thanks.

INSTALL Outdated
Comment on lines 172 to 174
To allow creating the macros file for such a custom platform (only one
needed for a specific BSP build in Yocto), the shell variables listed below
must be set. If RPM_CUSTOM_ARCH is not set, the rest is ignored.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto here.

By default, rpm installs a series of default platforms based on
the CPU architecture names in subdirectories called

    /usr/lib/platform/<arch>-linux

This is enough for regular Linux distributions. However, some
distributions may use more specific platform names that refer to
particular computer systems, like SBCs or specific CPU tuning when
compiling.

If the platform subdirectory does not exist in /usr/lib/platform
then rpmbuild does not work.

Allow creating such custom platform subdirectory with feeding
the necessary data using external variables: RPM_CUSTOM_ARCH,
RPM_CUSTOM_ISANAME, RPM_CUSTOM_ISABITS, RPM_CUSTOM_CANONARCH
and RPM_CUSTOM_CANONCOLOR

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Copy link
Member

@Conan-Kudo Conan-Kudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is weird, but I can't find anything overwhelmingly wrong with it

Don't present "linux" as the only possible value of OS
@ffesti ffesti merged commit fde03ae into rpm-software-management:master Jul 28, 2023
1 check passed
@ffesti
Copy link
Contributor

ffesti commented Jul 28, 2023

Adjusted the docs a bit to not assume platform is always "linux" - even if it is for many people.

kraj pushed a commit to YoeDistro/poky that referenced this pull request Jul 28, 2023
Feed platform settings to installplatform externally. Based on the patch
submitted under rpm-software-management/rpm#2585

Patch against INSTALL was backported for rpm 4.18.1

(From OE-Core rev: 29b568878d6094afd93bdd90f6f68dc3a6db439c)

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
dmnks pushed a commit to dmnks/rpm that referenced this pull request Aug 1, 2023
…ment#2585)

* Allow setting platform macro settings externally

By default, rpm installs a series of default platforms based on
the CPU architecture names in subdirectories called

    /usr/lib/platform/<arch>-<os>

This is enough for regular Linux distributions. However, some
distributions may use more specific platform names that refer to
particular computer systems, like SBCs or specific CPU tuning when
compiling.

If the platform subdirectory does not exist in /usr/lib/platform
then rpmbuild does not work.

Allow creating such custom platform subdirectory with feeding
the necessary data using external variables: RPM_CUSTOM_ARCH,
RPM_CUSTOM_ISANAME, RPM_CUSTOM_ISABITS, RPM_CUSTOM_CANONARCH
and RPM_CUSTOM_CANONCOLOR

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>

---------

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Co-authored-by: Florian Festi <ffesti@redhat.com>
(cherry picked from commit fde03ae)
dmnks pushed a commit that referenced this pull request Aug 1, 2023
* Allow setting platform macro settings externally

By default, rpm installs a series of default platforms based on
the CPU architecture names in subdirectories called

    /usr/lib/platform/<arch>-<os>

This is enough for regular Linux distributions. However, some
distributions may use more specific platform names that refer to
particular computer systems, like SBCs or specific CPU tuning when
compiling.

If the platform subdirectory does not exist in /usr/lib/platform
then rpmbuild does not work.

Allow creating such custom platform subdirectory with feeding
the necessary data using external variables: RPM_CUSTOM_ARCH,
RPM_CUSTOM_ISANAME, RPM_CUSTOM_ISABITS, RPM_CUSTOM_CANONARCH
and RPM_CUSTOM_CANONCOLOR

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>

---------

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Co-authored-by: Florian Festi <ffesti@redhat.com>
(cherry picked from commit fde03ae)
kraj pushed a commit to YoeDistro/poky that referenced this pull request Aug 1, 2023
Feed platform settings to installplatform externally. Based on the patch
submitted under rpm-software-management/rpm#2585

Patch against INSTALL was backported for rpm 4.18.1

(From OE-Core rev: 1c3b7f610645363d073d7c2f165d4f56eeab1ad8)

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
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.

rpm/rpmbuild vs Yocto BSP platform names
3 participants