Discussion:
File listed twice
Jeffrey Sherwin
2008-09-01 00:24:43 UTC
Permalink
Hi,



I am trying to build RPM files for my software, and keep seeing warnings
during the rpmbuild process:



warning: File listed twice: [file name]



I see this repeatedly for each file (and there are many). I recognize
this may be the result of testing my build spec over and over again, but
how do I clear those errors out? Where are the files being listed twice?
These files are not listed twice in the %files list.



I am working on i386 Redhat 5ES.



Thanks,



Jeff.
Stanley, Jon
2008-09-01 01:37:02 UTC
Permalink
Are you listing files twice? Maybe specifically and captured by a glob?

________________________________

From: rpm-list-***@redhat.com
To: rpm-***@redhat.com
Sent: Sun Aug 31 19:24:43 2008
Subject: File listed twice


Hi,



I am trying to build RPM files for my software, and keep seeing warnings during the rpmbuild process:



warning: File listed twice: [file name]



I see this repeatedly for each file (and there are many). I recognize this may be the result of testing my build spec over and over again, but how do I clear those errors out? Where are the files being listed twice? These files are not listed twice in the %files list.



I am working on i386 Redhat 5ES.



Thanks,



Jeff.




______________________________________________________________________
This message contains information which may be confidential and/or privileged. Unless you are the intended recipient (or authorized to receive for the intended recipient), you may not read, use, copy or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail and delete the message and any attachment(s) thereto without retaining any copies.
______________________________________________________________________
Bob Proulx
2008-09-01 01:44:05 UTC
Permalink
Post by Jeffrey Sherwin
warning: File listed twice: [file name]
I see this repeatedly for each file (and there are many). I recognize
this may be the result of testing my build spec over and over again, but
how do I clear those errors out?
State isn't saved and so there isn't anything to clear out. Building
twice shouldn't be a problem.
Post by Jeffrey Sherwin
Where are the files being listed twice?
In the %files section.
Post by Jeffrey Sherwin
These files are not listed twice in the %files list.
I believe you. But can you post your spec file so that we can inspect
it? If you want a second set of eyes on it then we will need to be
able to see it. It is probably too large for the mailing list (4k
message limit) in which case posting it to one of the free pastebins
and then posting the URL to it would be best.

Bob
Jeffrey Sherwin
2008-09-01 01:59:51 UTC
Permalink
Nope.

I'm on an isolated machine, did the install manually and a find * from the app root directory afterwards, and pumped that list into the %files section of the spec.

No file is listed twice in that listing, and the warning messages come for a single file in groups of 2-5.

There is no makefile and no installation script for this, just a untar and a bunch of file moves.

Jeff.



________________________________

From: rpm-list-***@redhat.com
To: rpm-***@redhat.com
Sent: Sun Aug 31 21:37:02 2008
Subject: Re: File listed twice


Are you listing files twice? Maybe specifically and captured by a glob?

________________________________

From: rpm-list-***@redhat.com
To: rpm-***@redhat.com
Sent: Sun Aug 31 19:24:43 2008
Subject: File listed twice


Hi,



I am trying to build RPM files for my software, and keep seeing warnings during the rpmbuild process:



warning: File listed twice: [file name]



I see this repeatedly for each file (and there are many). I recognize this may be the result of testing my build spec over and over again, but how do I clear those errors out? Where are the files being listed twice? These files are not listed twice in the %files list.



I am working on i386 Redhat 5ES.



Thanks,



Jeff.




______________________________________________________________________
This message contains information which may be confidential and/or privileged. Unless you are the intended recipient (or authorized to receive for the intended recipient), you may not read, use, copy or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail and delete the message and any attachment(s) thereto without retaining any copies.
______________________________________________________________________
Valery Reznic
2008-09-01 03:26:50 UTC
Permalink
Post by Jeffrey Sherwin
Subject: Re: File listed twice
Date: Monday, September 1, 2008, 4:59 AM
Nope.
I'm on an isolated machine, did the install manually
and a find * from the app root directory afterwards, and
pumped that list into the %files section of the spec.
If you did 'find *' then your filelist contains both files and directories.
But if you specify directory in the %files than rpmbuild by itself added all files under this dir. And they are found by find too. Her you go - files found twice. In order to avoid it you have to specify directories with %dir attribute.
Or don't list files under any directory.
i.e instead of 'find *' you can use 'ls -1'

Valery
Post by Jeffrey Sherwin
No file is listed twice in that listing, and the warning
messages come for a single file in groups of 2-5.
There is no makefile and no installation script for this,
just a untar and a bunch of file moves.
Jeff.
________________________________
Sent: Sun Aug 31 21:37:02 2008
Subject: Re: File listed twice
Are you listing files twice? Maybe specifically and
captured by a glob?
________________________________
Sent: Sun Aug 31 19:24:43 2008
Subject: File listed twice
Hi,
I am trying to build RPM files for my software, and keep
warning: File listed twice: [file name]
I see this repeatedly for each file (and there are many). I
recognize this may be the result of testing my build spec
over and over again, but how do I clear those errors out?
Where are the files being listed twice? These files are not
listed twice in the %files list.
I am working on i386 Redhat 5ES.
Thanks,
Jeff.
______________________________________________________________________
This message contains information which may be confidential
and/or privileged. Unless you are the intended recipient (or
authorized to receive for the intended recipient), you may
not read, use, copy or disclose to anyone the message or any
information contained in the message. If you have received
the message in error, please advise the sender by reply
e-mail and delete the message and any attachment(s) thereto
without retaining any copies.
______________________________________________________________________
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
Jeffrey Sherwin
2008-09-01 04:54:21 UTC
Permalink
Interesting. I think that's the answer. I have directories in the file
list. So I need to pull them out.

If I have a big tree (that the entire installation is contained within),
with a 900 or so files, what is the easiest way to accomplish a
comprehensive and proper file list?

Thanks again for all the help.

Jeff.

-----Original Message-----
From: rpm-list-***@redhat.com [mailto:rpm-list-***@redhat.com]
On Behalf Of Valery Reznic
Sent: Sunday, August 31, 2008 11:27 PM
To: RPM Package Manager
Subject: Re: File listed twice
Post by Jeffrey Sherwin
Subject: Re: File listed twice
Date: Monday, September 1, 2008, 4:59 AM
Nope.
I'm on an isolated machine, did the install manually
and a find * from the app root directory afterwards, and
pumped that list into the %files section of the spec.
If you did 'find *' then your filelist contains both files and
directories.
But if you specify directory in the %files than rpmbuild by itself added
all files under this dir. And they are found by find too. Her you go -
files found twice. In order to avoid it you have to specify directories
with %dir attribute.
Or don't list files under any directory.
i.e instead of 'find *' you can use 'ls -1'

Valery
Post by Jeffrey Sherwin
No file is listed twice in that listing, and the warning
messages come for a single file in groups of 2-5.
There is no makefile and no installation script for this,
just a untar and a bunch of file moves.
Jeff.
________________________________
Sent: Sun Aug 31 21:37:02 2008
Subject: Re: File listed twice
Are you listing files twice? Maybe specifically and
captured by a glob?
________________________________
Sent: Sun Aug 31 19:24:43 2008
Subject: File listed twice
Hi,
I am trying to build RPM files for my software, and keep
warning: File listed twice: [file name]
I see this repeatedly for each file (and there are many). I
recognize this may be the result of testing my build spec
over and over again, but how do I clear those errors out?
Where are the files being listed twice? These files are not
listed twice in the %files list.
I am working on i386 Redhat 5ES.
Thanks,
Jeff.
______________________________________________________________________
This message contains information which may be confidential
and/or privileged. Unless you are the intended recipient (or
authorized to receive for the intended recipient), you may
not read, use, copy or disclose to anyone the message or any
information contained in the message. If you have received
the message in error, please advise the sender by reply
e-mail and delete the message and any attachment(s) thereto
without retaining any copies.
______________________________________________________________________
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
Michael Jennings
2008-09-01 04:59:35 UTC
Permalink
On Monday, 01 September 2008, at 00:54:21 (-0400),
Post by Jeffrey Sherwin
Interesting. I think that's the answer. I have directories in the file
list. So I need to pull them out.
If I have a big tree (that the entire installation is contained within),
with a 900 or so files, what is the easiest way to accomplish a
comprehensive and proper file list?
Thanks again for all the help.
List only the top-level files and directories your package should
own. For example, list %{_datadir}/yourapp/ as a directory, not all
its contents. That way your package will own the directory *and* the
contents. List files in system directories (e.g., %{_bindir}/yourapp)
individually. This technique properly delegates file/directory
ownership.

Michael
--
Michael Jennings (a.k.a. KainX) http://www.kainx.org/ <***@kainx.org>
Linux Server/Cluster Admin, LBL.gov Author, Eterm (www.eterm.org)
-----------------------------------------------------------------------
"I've been looking for a Savior in these dirty streets,
Looking for a Savior beneath these dirty sheets."
-- Tori Amos, "Crucify"
Jeffrey Sherwin
2008-09-01 05:05:16 UTC
Permalink
That makes sense. Thanks. The warnings are now all gone.

I appreciate all of the help.


-----Original Message-----
From: rpm-list-***@redhat.com [mailto:rpm-list-***@redhat.com]
On Behalf Of Michael Jennings
Sent: Monday, September 01, 2008 1:00 AM
To: rpm-***@redhat.com
Subject: Re: File listed twice

On Monday, 01 September 2008, at 00:54:21 (-0400),
Post by Jeffrey Sherwin
Interesting. I think that's the answer. I have directories in the file
list. So I need to pull them out.
If I have a big tree (that the entire installation is contained within),
with a 900 or so files, what is the easiest way to accomplish a
comprehensive and proper file list?
Thanks again for all the help.
List only the top-level files and directories your package should
own. For example, list %{_datadir}/yourapp/ as a directory, not all
its contents. That way your package will own the directory *and* the
contents. List files in system directories (e.g., %{_bindir}/yourapp)
individually. This technique properly delegates file/directory
ownership.

Michael
--
Michael Jennings (a.k.a. KainX) http://www.kainx.org/ <***@kainx.org>
Linux Server/Cluster Admin, LBL.gov Author, Eterm (www.eterm.org)
-----------------------------------------------------------------------
"I've been looking for a Savior in these dirty streets,
Looking for a Savior beneath these dirty sheets."
-- Tori Amos, "Crucify"
Jeffrey Sherwin
2008-09-01 19:21:10 UTC
Permalink
One more question:

How come when I list the following directory under %files:

/usr/local/foo

RPM starts looking for those files under the $RPM_BUILD_DIR? Because of
this, I have actually had to modify my script to build everything in
$RPM_BUILD_DIR/usr/local/foo and then copy it all over to /usr/local/foo
at the end of $install.

That can't be correct.

-----Original Message-----
From: rpm-list-***@redhat.com [mailto:rpm-list-***@redhat.com]
On Behalf Of Jeffrey Sherwin
Sent: Monday, September 01, 2008 1:05 AM
To: RPM Package Manager
Subject: RE: File listed twice

That makes sense. Thanks. The warnings are now all gone.

I appreciate all of the help.


-----Original Message-----
From: rpm-list-***@redhat.com [mailto:rpm-list-***@redhat.com]
On Behalf Of Michael Jennings
Sent: Monday, September 01, 2008 1:00 AM
To: rpm-***@redhat.com
Subject: Re: File listed twice

On Monday, 01 September 2008, at 00:54:21 (-0400),
Post by Jeffrey Sherwin
Interesting. I think that's the answer. I have directories in the file
list. So I need to pull them out.
If I have a big tree (that the entire installation is contained within),
with a 900 or so files, what is the easiest way to accomplish a
comprehensive and proper file list?
Thanks again for all the help.
List only the top-level files and directories your package should
own. For example, list %{_datadir}/yourapp/ as a directory, not all
its contents. That way your package will own the directory *and* the
contents. List files in system directories (e.g., %{_bindir}/yourapp)
individually. This technique properly delegates file/directory
ownership.

Michael
--
Michael Jennings (a.k.a. KainX) http://www.kainx.org/ <***@kainx.org>
Linux Server/Cluster Admin, LBL.gov Author, Eterm (www.eterm.org)
-----------------------------------------------------------------------
"I've been looking for a Savior in these dirty streets,
Looking for a Savior beneath these dirty sheets."
-- Tori Amos, "Crucify"
Bob Proulx
2008-09-01 19:55:05 UTC
Permalink
Post by Jeffrey Sherwin
/usr/local/foo
RPM starts looking for those files under the $RPM_BUILD_DIR?
The idea is that you always build in an image area. The goal is to
facilitate reproducible builds. Therefore by default rpm will always
pull files from the $RPM_BUILD_ROOT area. You should always start out
with an empty one and then because it is only populated with files
from your build you can ensure that only files that you want to put
there are put there.

If you were to pull files from your system area then it could
accidentally package files that are not part of your build.
Post by Jeffrey Sherwin
Because of this, I have actually had to modify my script to build
everything in $RPM_BUILD_DIR/usr/local/foo and then copy it all over
to /usr/local/foo at the end of $install.
That can't be correct.
You are right. It isn't correct. Did you forget to set BuildRoot in
your specfile? Make sure you have BuildRoot set in the top header
area of your specfile. Something like the following is typical. The
exact name isn't important because it is a temporary location.

BuildRoot: %{_tmppath}/%{name}-%{version}-build

And with that in place you should clean the build area too. Verify
the setting of $RPM_BUILD_ROOT before cleaning it!

%clean
rm -rf $RPM_BUILD_ROOT

Note that newer versions of rpm handle this differently. Therefore
this is somewhat version specific. But by your questions I assume
that the version of rpm that you are using uses the above convention.
An assumption that may be incorrect.

Bob
Jeffrey Sherwin
2008-09-01 22:50:01 UTC
Permalink
Bob,

BuildRoot is set, set to: BuildRoot:
%{_tmppath}/%{name}-%{version}-%release-build, using it everywhere.

I'm building everything there and copying over, but I get errors that
the files are not in $RPM_BUILD_ROOT/usr/local/foo as files are listed
under /usr/local/foo.

Clean is also set properly. Any other ideas?

Jeff.

-----Original Message-----
From: rpm-list-***@redhat.com [mailto:rpm-list-***@redhat.com]
On Behalf Of Bob Proulx
Sent: Monday, September 01, 2008 3:55 PM
To: rpm-***@redhat.com
Subject: Re: File listed twice
Post by Jeffrey Sherwin
/usr/local/foo
RPM starts looking for those files under the $RPM_BUILD_DIR?
The idea is that you always build in an image area. The goal is to
facilitate reproducible builds. Therefore by default rpm will always
pull files from the $RPM_BUILD_ROOT area. You should always start out
with an empty one and then because it is only populated with files
from your build you can ensure that only files that you want to put
there are put there.

If you were to pull files from your system area then it could
accidentally package files that are not part of your build.
Post by Jeffrey Sherwin
Because of this, I have actually had to modify my script to build
everything in $RPM_BUILD_DIR/usr/local/foo and then copy it all over
to /usr/local/foo at the end of $install.
That can't be correct.
You are right. It isn't correct. Did you forget to set BuildRoot in
your specfile? Make sure you have BuildRoot set in the top header
area of your specfile. Something like the following is typical. The
exact name isn't important because it is a temporary location.

BuildRoot: %{_tmppath}/%{name}-%{version}-build

And with that in place you should clean the build area too. Verify
the setting of $RPM_BUILD_ROOT before cleaning it!

%clean
rm -rf $RPM_BUILD_ROOT

Note that newer versions of rpm handle this differently. Therefore
this is somewhat version specific. But by your questions I assume
that the version of rpm that you are using uses the above convention.
An assumption that may be incorrect.

Bob
Mikael Fridh
2008-09-02 07:45:10 UTC
Permalink
Post by Jeffrey Sherwin
Bob,
%{_tmppath}/%{name}-%{version}-%release-build, using it everywhere.
I'm building everything there and copying over, but I get errors that
the files are not in $RPM_BUILD_ROOT/usr/local/foo as files are listed
under /usr/local/foo.
Clean is also set properly. Any other ideas?
You mentioned $RPM_BUILD_DIR earlier, are you sure that you didn't
confuse something in the spec file?

Post your spec file or atleast the relevant sections and I bet someone
will determine the error pretty quickly.

--
Fridh
Jeffrey Sherwin
2008-09-02 22:59:24 UTC
Permalink
I have attached the file as is. Please have a look.

I understand that I am not supposed to build as root, but I am not sure
how I create the relevant symlinks if I don't.

Jeff.

-----Original Message-----
From: rpm-list-***@redhat.com [mailto:rpm-list-***@redhat.com]
On Behalf Of Mikael Fridh
Sent: Tuesday, September 02, 2008 3:45 AM
To: RPM Package Manager
Subject: Re: File listed twice
Post by Jeffrey Sherwin
Bob,
%{_tmppath}/%{name}-%{version}-%release-build, using it everywhere.
I'm building everything there and copying over, but I get errors that
the files are not in $RPM_BUILD_ROOT/usr/local/foo as files are listed
under /usr/local/foo.
Clean is also set properly. Any other ideas?
You mentioned $RPM_BUILD_DIR earlier, are you sure that you didn't
confuse something in the spec file?

Post your spec file or atleast the relevant sections and I bet someone
will determine the error pretty quickly.

--
Fridh
Mikael Fridh
2008-09-03 08:37:31 UTC
Permalink
Post by Jeffrey Sherwin
I have attached the file as is. Please have a look.
I understand that I am not supposed to build as root, but I am not sure
how I create the relevant symlinks if I don't.
A symlink is just a file. Create the symlink in your %install section
and reference it in your %files section. Getting the links right
requires some careful thinking though.


%install
ln -s foo.so.1 $RPM_BUILD_ROOT/usr/local/foo.so

%files
/usr/local/foo.so.1
/usr/local/foo.so


Result:
/usr/local:
foo.so -> foo.so.1

Regarding your other issues, I think if you read what we all sent you
privately earlier, you will understand that you've misunderstood rpm
completely, especially what %install means.

You're better off just writing a script, because that's what you're
using your specfile for right now.

--
Fridh

Jeffrey Sherwin
2008-09-01 02:03:06 UTC
Permalink
I'd rather not post the whole thing, but ill send it to you directly or post a redacted version. I'm afraid that the redacted version will not have all the details you may need to see the problem.

Please advise best next steps. Thank you for the quick response.

Jeff.



----- Original Message -----
From: rpm-list-***@redhat.com <rpm-list-***@redhat.com>
To: rpm-***@redhat.com <rpm-***@redhat.com>
Sent: Sun Aug 31 21:44:05 2008
Subject: Re: File listed twice
Post by Jeffrey Sherwin
warning: File listed twice: [file name]
I see this repeatedly for each file (and there are many). I recognize
this may be the result of testing my build spec over and over again, but
how do I clear those errors out?
State isn't saved and so there isn't anything to clear out. Building
twice shouldn't be a problem.
Post by Jeffrey Sherwin
Where are the files being listed twice?
In the %files section.
Post by Jeffrey Sherwin
These files are not listed twice in the %files list.
I believe you. But can you post your spec file so that we can inspect
it? If you want a second set of eyes on it then we will need to be
able to see it. It is probably too large for the mailing list (4k
message limit) in which case posting it to one of the free pastebins
and then posting the URL to it would be best.

Bob

_______________________________________________
Rpm-list mailing list
Rpm-***@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
Stanley, Jon
2008-09-01 02:20:02 UTC
Permalink
Why not post the whole thing? I'm not sure what confidential information could be in a spec file.

________________________________

From: rpm-list-***@redhat.com
To: rpm-***@redhat.com
Sent: Sun Aug 31 21:03:06 2008
Subject: Re: File listed twice


I'd rather not post the whole thing, but ill send it to you directly or post a redacted version. I'm afraid that the redacted version will not have all the details you may need to see the problem.

Please advise best next steps. Thank you for the quick response.

Jeff.



----- Original Message -----
From: rpm-list-***@redhat.com <rpm-list-***@redhat.com>
To: rpm-***@redhat.com <rpm-***@redhat.com>
Sent: Sun Aug 31 21:44:05 2008
Subject: Re: File listed twice
Post by Jeffrey Sherwin
warning: File listed twice: [file name]
I see this repeatedly for each file (and there are many). I recognize
this may be the result of testing my build spec over and over again, but
how do I clear those errors out?
State isn't saved and so there isn't anything to clear out. Building
twice shouldn't be a problem.
Post by Jeffrey Sherwin
Where are the files being listed twice?
In the %files section.
Post by Jeffrey Sherwin
These files are not listed twice in the %files list.
I believe you. But can you post your spec file so that we can inspect
it? If you want a second set of eyes on it then we will need to be
able to see it. It is probably too large for the mailing list (4k
message limit) in which case posting it to one of the free pastebins
and then posting the URL to it would be best.

Bob

_______________________________________________
Rpm-list mailing list
Rpm-***@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list




______________________________________________________________________
This message contains information which may be confidential and/or privileged. Unless you are the intended recipient (or authorized to receive for the intended recipient), you may not read, use, copy or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail and delete the message and any attachment(s) thereto without retaining any copies.
______________________________________________________________________
Continue reading on narkive:
Loading...