#14 Automatic adjustment of package-names for Sun's packages

Mikhail Teterin


We are trying to build Sun packages and Linux RPMs from the same specs. The single major hurdle is the naming. We are using our own prefix to distinguish packages build in-house from those supplied by 3rd parties and our existing set of Linux-tested specs uses the names like: example_foo.

On Sun, however, these are "illegal" -- after successful build, pkgbuild invokes pkgmk to wrap-up the package and gets:

pkgmk: ERROR: invalid package abbreviation <example_foo>

There is got to be some way to automatically change those into EXAMPLEfoo -- without inserting an %if into each spec...


  • When I added SUNW_Pkg tag to the spec, packages began to build on Solaris. Unfortunately, the tag chokes rpmbuild on Linux.

    Perhaps, when the value of sunw_pkg is derived from name, some automatic renaming ought to apply. If the proper name can not always be automatically determined, maybe, the renaming regexp can be supplied on command-line.