Dan Track a écrit : > Hi > > I hope someone can help. Basically I want to access an environment > variable and place it in my macro in my spec file. > > If I try to define a macro like the following: > > %define oracle_home $ORACLE_HOME > > and then try to build it "rpmbuild -ba perl-DBD-Oracle" > > I get the following error: > error: line 18: Dependency tokens must begin with alpha-numeric, '_' > or '/': BuildRequires: $ORACLE_HOME/lib/libclntsh.so > > On line 18 I have the following: > BuildRequires: %{oracle_home}/lib/libclntsh.so BuildRequires are only evaluate at build time, so i don't think this is really a usefull BR. Oracle provides several RPM (oracle-xe, oracle-xe-client, oracle-instantclient, ...) where ORACLE_HOME is not defined and not used. More, this official RPM doesn't provide anything usefull : $ rpm -qp --provides oracle-xe-client-10.2.0.1-1.0.i386.rpm oracle-xe-client = 10.2.0.1-1.0 So you'll also have to define : AutoReq: 0 To avoid creating a RPM which require something not provided by anything Even more, most Oracle admin doesn't use RPM to install it. I'm used to add, in my spec : %define oraclever 10.2.0.3 BuildRequires = oracle-instantclient-devel = %{oraclever} > > Any ideas how I can resolve this? > > Thanks in advance > Dan Hopes that help. >