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
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 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 [cid:7f95ea41-6e18-45b6-b530-ea611709ec0f] 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
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
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
On 9/21/21 5:38 AM, Erico Mendonca wrote:
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
There are a couple of problems with that. First, there are about 140 of these files. Second, the exact directories created depend on configuration, so that'd be hard to codify in a SPEC file. Third, I see no reason that empty files can't be included. Would it help if we put one byte in them? :O
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> <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 <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
On Tuesday 2021-09-21 18:32, Lee Duncan wrote:
On 9/21/21 5:38 AM, Erico Mendonca wrote:
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
There are a couple of problems with that.
First, there are about 140 of these files. Second, the exact directories created depend on configuration, so that'd be hard to codify in a SPEC file. Third, I see no reason that empty files can't be included. Would it help if we put one byte in them? :O
If you do, rpmlint will instead complain that you should use fdupes ;-)
On 9/21/21 10:34 AM, Jan Engelhardt wrote:
On Tuesday 2021-09-21 18:32, Lee Duncan wrote:
On 9/21/21 5:38 AM, Erico Mendonca wrote:
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
There are a couple of problems with that.
First, there are about 140 of these files. Second, the exact directories created depend on configuration, so that'd be hard to codify in a SPEC file. Third, I see no reason that empty files can't be included. Would it help if we put one byte in them? :O
If you do, rpmlint will instead complain that you should use fdupes ;-)
That's sadly funny. When bots run the world ... -- Lee
Does the location vary too much, or does it have a base directory? If it has multiple directories under /var/cache/my_program, you could do something like this with wildcards: %ghost /var/cache/my_program/* Or if they have a common extension: %ghost /var/cache/my_program/*ext Repeat for the desired number of levels down the tree: %ghost /var/cache/my_program/*/*/*/*ext Premium Services Engineer SUSE On Sep 21, 2021 13:32, Lee Duncan <LDuncan@suse.com> wrote: On 9/21/21 5:38 AM, Erico Mendonca wrote:
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
There are a couple of problems with that. First, there are about 140 of these files. Second, the exact directories created depend on configuration, so that'd be hard to codify in a SPEC file. Third, I see no reason that empty files can't be included. Would it help if we put one byte in them? :O
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> <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 <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
On 9/21/21 1:49 PM, Erico Mendonca wrote:
Does the location vary too much, or does it have a base directory?
If it has multiple directories under /var/cache/my_program, you could do something like this with wildcards:
%ghost /var/cache/my_program/*
Or if they have a common extension:
%ghost /var/cache/my_program/*ext
Repeat for the desired number of levels down the tree:
%ghost /var/cache/my_program/*/*/*/*ext
Interesting. I will try that. Thanks.
Premium Services Engineer SUSE
On Sep 21, 2021 13:32, Lee Duncan <LDuncan@suse.com> wrote: On 9/21/21 5:38 AM, Erico Mendonca wrote:
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
There are a couple of problems with that.
First, there are about 140 of these files. Second, the exact directories created depend on configuration, so that'd be hard to codify in a SPEC file. Third, I see no reason that empty files can't be included. Would it help if we put one byte in them? :O
Premium Services Engineer SUSE
On 9/20/21 7:51 PM, Erico Mendonca wrote:
Maybe you could try marking these files as %ghost in the %files section?
(partly off-topic): This is interesting. Is this something that I should be using for handling generated files or symlinks? In my spec I am packaging things under /usr/lib/openfoam/openfoam2106 and using a post trigger to generate A wrapper %{_bindir}/openfoam2106 to execute /usr/lib/openfoam/openfoam2106/etc/openfoam I wish to generate this /usr/bin/openfoam2106 as a trigger, since the RPM is relocatable (even if hardly anyone does that). This does mean however, that although the preun trigger will remove it, there isn't any rpm ownership of the file. If I use a %ghost to mark that file, it sounds like I can drop the preun trigger. Have I got this properly? Cheers, /mark
On Monday 2021-09-20 19:41, Lee Duncan wrote:
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
Status? If mhvtl edits these files, that alone is an argument not to ship those files (because you'd get conflicts on every upgrade). Other than that, if it can work with zero-sized files, then it had better support absent files as well.
On 9/20/21 10:53 AM, Jan Engelhardt wrote:
On Monday 2021-09-20 19:41, Lee Duncan wrote:
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
Status? If mhvtl edits these files, that alone is an argument not to ship those files (because you'd get conflicts on every upgrade). Other than that, if it can work with zero-sized files, then it had better support absent files as well.
An absent file means "hardware not supported". An empty file means the hardware is supported but not yet used. This all works fine. We do not own upstream projects. We can either use them or not. I can suggest upstream changes, but here I don't see an easy simple solution (or I would have suggested it). -- lee
participants (4)
-
Erico Mendonca
-
Jan Engelhardt
-
Lee Duncan
-
Mark Olesen