rpmbuild :error: Could not generate output filename for package myApp: unknown tag

2.1k Views Asked by At

I'm trying to build rpm and getting error :

rpmbuild :error: Could not generate output filename for package myApp: unknown tag

I tried to add a client name to a name of the rpm file . Before I inserted changes everything worked fine .

What I made in build.csh to get a client name :

 CLIENT=

 case:
 -c)CLIENT=$2
   shift 2
    ;;


rpmbuild -bb -vv \ 
   --define "client ${CLIENT}" \
   --define "_build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}-%%{CLIENT}.%%{ARCH}.rpm" \

Thanks in advance

1

There are 1 best solutions below

0
On

The rpmbuild error is saying that one of your %%{TAG}'s is unknown. In this case it is %%{CLIENT}

The %% are names that appear inside your spec file. E.g.,

Name: My_great_software

Version: 1.2.3

To fix this you have 2 options.

Either define client inside of your spec file:

Client: "client-name"

Or use the shell variable in your rpmbuild command:

--define "_build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}-$(CLIENT).%%{ARCH}.rpm"