Author Topic: unexpected filenames in triddefs_xml.7z produce rpm build errors.  (Read 4640 times)

jenderek

  • Sr. Member
  • ****
  • Posts: 375
Hello,

when i tried to build rpm package of trid utilities i get error message
like:
RPM build errors:
    File must begin with "/": .trid.xml

Unfortunately in that situation no error line number was printed.  So i
waste some time to find the error. In rpm %files macro after legal line
like:
%attr(664,trid,trid) /usr/lib/trid/defs/m/material-ogre.trid.xml
a line with space character inside file name occur in my case like
%attr(664,trid,trid) /usr/lib/trid/defs/m/mcm-mednafen .trid.xml

Of course space characters are not forbidden, and there may exist ways to
escape this string problem, but i think that filename should become like
mcm-mednafen.trid.xml because it was the only example with space character
among the other 10 thousand trid definitions. So user does not expect that
suddenly file name with spaces occur. After removing space character in that
file name observed error vanish.

Now i got another error like
   RPM build errors:
   Installed (but unpackaged) file(s) found:
   /usr/lib/trid/defs/a/ark-rar-winsfx-4x-5x.xml

That happens because i used find utility to build explicitly file list with
trid definitions by looking for files of form like *.trid.xml. So that
example with only ".xml" file name extension breaks my search pattern and
does not occur in my file list and also later not in rpm package.

".trid.xml" file name extension is not explicitly mentioned as strict
requirement. But same argumentation as above can be used. It is the only
example with that extension pattern among the other 10 thousand definitions.
So user does not expect that suddenly file name with that file name ending
occur. To distinguish trid definitions from other "normal" xml files it makes
sense to use a unique extension like ".trid.xml".

Maybe for other Linux rpm packager that errors do not occur. That is the
case if defs directory is recursive included in package or a wild card pattern
is used for trid definition's.

But i do not prefer this methods. Why? Sometimes i update a trid definition
by tridscan or emacs editor. Then previous version is kept with name
extension like ".bak" or "~". Or by some file utilities system files with
meta information like "Desktop.ini" or "descript.ion" are created inside
directory tree. If i do not think at such cases it can easily happen that
such "junk" is also packed in archives.

I hope that my proposals can be used in future version of TrID XML defs.

With best wishes
J?rg Jenderek

Mark0

  • Administrator
  • Hero Member
  • *****
  • Posts: 2743
    • Mark0's Home Page
Re: unexpected filenames in triddefs_xml.7z produce rpm build errors.
« Reply #1 on: November 22, 2017, 12:36:58 PM »
Quote
To distinguish trid definitions from other "normal" xml files it makes
sense to use a unique extension like ".trid.xml".

Of course! That and the space in the other filenames must have just slipped somehow.
Thanks for noticing, will fix.

Bye!