Hi,

What I mean is:

- create the empty files in the build root on %install;
- list each file in %files with a %ghost prefix, like:

%ghost /var/lib/my_empty_file



Premium Services Engineer
SUSE

On Sep 20, 2021 20:19, Lee Duncan <LDuncan@suse.com> wrote:
Thank you for your reply, but I'm not sure what point you are making.

I looked through the linked information (which I've read before), but I
didn't see anything about allowing zero-length files.

On 9/20/21 10:51 AM, Erico Mendonca wrote:
> Maybe you could try marking these files as %ghost in the %files section?
>
> http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html
> <http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html>
> Directives For the %files list
> <http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html>
> Directives For the %files list. The %files list may contain a number of
> different directives. They are used to: Identify documentation and
> configuration files. Ensure that a file has the correct permissions and
> ownership set.
> ftp.rpm.org
>
>
>
>
> *
> *
> *Erico Mendonca*
> Premium Services
> SUSE
>
> ------------------------------------------------------------------------
> *From:* Lee Duncan <lduncan@suse.com>
> *Sent:* Monday, September 20, 2021 2:41 PM
> *To:* opensuse-buildservice@opensuse.org
> <opensuse-buildservice@opensuse.org>
> *Subject:* How to allow zero-length files in a package?
>  
> Hi:
>
> I manage a package called mhvtl. It is a tape robot simulation package.
> It can simulate a single tape drive in a tape robot, or several drives
> at once.
>
> It keeps a "library" (database?) of each type of tape drive and it's
> status in /var/lib/mhvtl/*. Each of the files starts out empty, i.e.
> zero length, zero bytes.
>
> The build service used to complain about this, giving 150 warnings
> (there are 150 empty files), but now it considers these all errors,
> failing the build.
>
> How can I tell the build service to stop complaining about these
> zero-length files, short of making the upstream project redesign its
> database to make our build service happy?
>
> Thanks in advance.
> --
> Lee Duncan
>