Hello,
I am trying to build rpm that will be installed in two different hardware devices.
For each hardware , there are different files and commands that need to be done, I want the rpm to auto-detect the hw according to its main-board type.
The changes are in install, post and files sections.
I am trying to set one global variable that will check the main board at the beginning and all the other sections use this variable in if statements to determine what to install.
I am aware that variables are normally not passed between sections , but I like think there is a workaround.
What I tried:
Set the variable from pre section with %global , the value doesn't pass to other section.
Set macro at the beginning of the spec file to read the main board (cat /sys/devices/virtual/dmi/id/board_name) but it appears empty in the other sections.
Thanks,