jkavx
asked on
Set package.spec %attr with environment variable
I have a rpm file that will be installed in different environments. In package.spec, the filelist has %attr(755, xuser, somegroup) where xuser will vary between environments. I'm able in preinstall to execute a script that sets environment variables.
So I want to be able to pick up an environment variable when using %attr. This does not work:
%attr(755, ${ENV_USER}, someGroup)
Does anyone know what might work here?
So I want to be able to pick up an environment variable when using %attr. This does not work:
%attr(755, ${ENV_USER}, someGroup)
Does anyone know what might work here?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The problem is that the functional id differs between uat and prod.If it's only about two generic environments (here the Id should not differ in the first place IMHO but) you could easily create two packages and use a %define (you drive from the 'rpmbuild' commandline) for %if-%else switching between user Ids BTW.
ASKER
This is a corporate environment, with a package that needs to be deployed in both Uat and Prod environments. The problem is that the functional id differs between uat and prod.
I'm new to this, so thx for the heads up about the % verify.