[opensuse] Problem installing an rpm that uses hardlinks.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, This is an old problem that I had on 13.1 and remains on Leap. YaST fails installing a certain package with an error message that explains nothing (sorry, I didn't copy it). Running rpm directly on it explains just a bit more: Telcontar:~ # rpm --install /var/cache/zypp/packages/OBS_Games/noarch/FlightGear-data-2016.2.1-2.1.noarch.rpm error: unpacking of archive failed on file /usr/share/doc/packages/FlightGear-data/COPYING;586ff82e: cpio: link error: FlightGear-data-2016.2.1-2.1.noarch: install failed Telcontar:~ # So I try trace. Telcontar:~ # strace -ff -o rpmtrace rpm --install --verbose /var/cache/zypp/packages/OBS_Games/noarch/FlightGear-data-2016.2.1-2.1.noarch.rpm ... It seems the problem is here: open("/usr/share/flightgear/Fonts/LiberationFonts/COPYING;586ffa1a", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 20 fcntl(20, F_SETFD, FD_CLOEXEC) = 0 umask(022) = 0777 write(20, "\t\t GNU GENERAL PUBLIC LICENSE"..., 17992) = 17992 close(20) = 0 link("/usr/share/flightgear/Fonts/LiberationFonts/COPYING;586ffa1a", "/usr/share/doc/packages/FlightGear-data/COPYING;586ffa1a") = -1 EXDEV (Invalid cross-device link) lstat("/usr/share/flightgear/Fonts/LiberationFonts/COPYING;586ffa1a", {st_mode=S_IFREG, st_size=17992, ...}) = 0 unlink("/usr/share/flightgear/Fonts/LiberationFonts/COPYING;586ffa1a") = 0 close(19) = 0 munmap(0x7f6916c58000, 4096) = 0 write(2, "error: ", 7) = 7 write(2, "unpacking of archive failed on f"..., 105) = 105 close(18) = 0 write(2, "error: ", 7) = 7 write(2, "FlightGear-data-2016.2.1-2.1.noa"..., 52) = 52 It is trying to link /usr/share/flightgear/Fonts/LiberationFonts/COPYING to /usr/share/doc/packages/FlightGear-data/COPYING or the other way round, and it happens that /usr/share/flightgear is a diferent filesystem here⁽¹⁾: /etc/fstab: LABEL=c_usr_gamedta /usr/gamedata reiserfs acl,user_xattr,barrier=flush,relatime 1 4 and /usr/share/flightgear was a symlink to /usr/gamedata/flightgear/ Seeing the problem, I changed to a bind mount: /etc/fstab: /usr/gamedata/flightgear/ /usr/share/flightgear none bind 0 0 with this 'mount' result: /dev/sdd12 on /usr/gamedata type reiserfs (rw,relatime,user_xattr,acl) /dev/sdd12 on /usr/share/flightgear type reiserfs (rw,relatime,user_xattr,acl) but it is not working. Perhaps I should instead make /usr/share/doc/packages/FlightGear-data/ a symlink or bind mount to somewhere in /usr/gamedata. Ideas? I need another view... (1) The reason to use a different filesystem for FlightGear is that the rpm is 1 GB of data consisting of a ton of very small files (and more that can be downloaded), so ideal for reiserfs. - -- Cheers Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlhwATkACgkQtTMYHG2NR9UlcQCcDIZ+PHauHYthqlri+HeSZBat sosAoJUY4okOcwWIQicPLcKCAqlpKmvD =1X/X -----END PGP SIGNATURE-----
Carlos E. R. wrote:
Hi,
This is an old problem that I had on 13.1 and remains on Leap.
....
It is trying to link /usr/share/flightgear/Fonts/LiberationFonts/COPYING to /usr/share/doc/packages/FlightGear-data/COPYING or the other way round, and it happens that /usr/share/flightgear is a diferent filesystem here⁽¹⁾:
TBH, I'd report this as an bug to the packager. Hardlinks across devices/partitions is never possible, and an RPM package should never run into trouble because of this, which means, one should at most use them within the same subdirectory. And in the case of the COPYING file I cannot even see any benefit from using hardlinks over softlinks...
Perhaps I should instead make /usr/share/doc/packages/FlightGear-data/ a symlink or bind mount to somewhere in /usr/gamedata.
Ideas? I need another view...
I don't think that having /usr/share/doc/packages/FlightGear-data a symlink would work, rpm would rather recreate the directory on installation. But maybe I'm wrong, so give it a try. I'd probably move the doc directory away temporarily (rname) and symlink doc to a directory on the flightgear partition, then install the rpm and move it back to the real doc after changing hardlinks to symlinks. But that would cause issues again with any later update. So I'd at least report it to the packager... Cheers, Pit -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-01-06 23:37, pit wrote:
Carlos E. R. wrote:
Hi,
This is an old problem that I had on 13.1 and remains on Leap.
....
It is trying to link /usr/share/flightgear/Fonts/LiberationFonts/COPYING to /usr/share/doc/packages/FlightGear-data/COPYING or the other way round, and it happens that /usr/share/flightgear is a diferent filesystem here⁽¹⁾:
TBH, I'd report this as an bug to the packager. Hardlinks across devices/partitions is never possible, and an RPM package should never run into trouble because of this, which means, one should at most use them within the same subdirectory.
But I did. It is bug 987206, closed WONTFIX So I need some hack that allows me to install that package. I can install the contents of the rpm, no problem, but the main flightgear package depends on this one, and if I can't install it YaST complains every time I start it. I can not make YaST ignore the conflict for ever and shut up.
And in the case of the COPYING file I cannot even see any benefit from using hardlinks over softlinks...
Perhaps I should instead make /usr/share/doc/packages/FlightGear-data/ a symlink or bind mount to somewhere in /usr/gamedata.
Ideas? I need another view...
I don't think that having /usr/share/doc/packages/FlightGear-data a symlink would work, rpm would rather recreate the directory on installation. But maybe I'm wrong, so give it a try.
I'd probably move the doc directory away temporarily (rname) and symlink doc to a directory on the flightgear partition, then install the rpm and move it back to the real doc after changing hardlinks to symlinks. But that would cause issues again with any later update. So I'd at least report it to the packager...
I have created these directories in /usr/gamedata: flightgear flightgear.FlightGear-data-doc They are in the same partition. Then I created these two symlinks: /usr/share/doc/packages/FlightGear-data --> /usr/gamedata/flightgear.FlightGear-data-doc /usr/share/flightgear --> /usr/gamedata/flightgear So files created in both will be in the same partition, and hardlinks could be created. [...] Huh, this did work, finally! Telcontar:~ # strace -ff -o rpmtrace2 rpm --install --verbose /var/cache/zypp/packages/OBS_Games/noarch/FlightGear-data-2016.2.1-2.1.noarch.rpm Preparing packages... FlightGear-data-2016.2.1-2.1.noarch Telcontar:~ # -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
07.01.2017 03:46, Carlos E. R. пишет:
On 2017-01-06 23:37, pit wrote:
Carlos E. R. wrote:
Hi,
This is an old problem that I had on 13.1 and remains on Leap.
....
It is trying to link /usr/share/flightgear/Fonts/LiberationFonts/COPYING to /usr/share/doc/packages/FlightGear-data/COPYING or the other way round, and it happens that /usr/share/flightgear is a diferent filesystem here⁽¹⁾:
TBH, I'd report this as an bug to the packager. Hardlinks across devices/partitions is never possible, and an RPM package should never run into trouble because of this, which means, one should at most use them within the same subdirectory.
But I did.
It is bug 987206, closed WONTFIX
That's wrong resolution in this case. This is the first package I see spec file that explicitly packages documentation paths in /usr/share/doc. It should be enough to simply use %doc COPYING ... and RPM will put *copy* of this file in /usr/share/doc automatically. So fix does not require any patch contrary to what is claimed in this bug report. P.S. It will also make spec file more portable because destination of %doc macro varies between distributions.
On 06/01/2017 22:42, Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
This is an old problem that I had on 13.1 and remains on Leap.
YaST fails installing a certain package with an error message that explains nothing (sorry, I didn't copy it).
Running rpm directly on it explains just a bit more:
Telcontar:~ # rpm --install /var/cache/zypp/packages/OBS_Games/noarch/FlightGear-data-2016.2.1-2.1.noarch.rpm error: unpacking of archive failed on file /usr/share/doc/packages/FlightGear-data/COPYING;586ff82e: cpio: link error: FlightGear-data-2016.2.1-2.1.noarch: install failed Telcontar:~ #
So I try trace.
Telcontar:~ # strace -ff -o rpmtrace rpm --install --verbose /var/cache/zypp/packages/OBS_Games/noarch/FlightGear-data-2016.2.1-2.1.noarch.rpm ...
It seems the problem is here:
open("/usr/share/flightgear/Fonts/LiberationFonts/COPYING;586ffa1a", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 20 fcntl(20, F_SETFD, FD_CLOEXEC) = 0 umask(022) = 0777 write(20, "\t\t GNU GENERAL PUBLIC LICENSE"..., 17992) = 17992 close(20) = 0 link("/usr/share/flightgear/Fonts/LiberationFonts/COPYING;586ffa1a", "/usr/share/doc/packages/FlightGear-data/COPYING;586ffa1a") = -1 EXDEV (Invalid cross-device link) lstat("/usr/share/flightgear/Fonts/LiberationFonts/COPYING;586ffa1a", {st_mode=S_IFREG, st_size=17992, ...}) = 0 unlink("/usr/share/flightgear/Fonts/LiberationFonts/COPYING;586ffa1a") = 0 close(19) = 0 munmap(0x7f6916c58000, 4096) = 0 write(2, "error: ", 7) = 7 write(2, "unpacking of archive failed on f"..., 105) = 105 close(18) = 0 write(2, "error: ", 7) = 7 write(2, "FlightGear-data-2016.2.1-2.1.noa"..., 52) = 52
It is trying to link /usr/share/flightgear/Fonts/LiberationFonts/COPYING to /usr/share/doc/packages/FlightGear-data/COPYING or the other way round, and it happens that /usr/share/flightgear is a diferent filesystem here⁽¹⁾:
/etc/fstab: LABEL=c_usr_gamedta /usr/gamedata reiserfs acl,user_xattr,barrier=flush,relatime 1 4
and /usr/share/flightgear was a symlink to /usr/gamedata/flightgear/
Seeing the problem, I changed to a bind mount:
/etc/fstab: /usr/gamedata/flightgear/ /usr/share/flightgear none bind 0 0
with this 'mount' result:
/dev/sdd12 on /usr/gamedata type reiserfs (rw,relatime,user_xattr,acl) /dev/sdd12 on /usr/share/flightgear type reiserfs (rw,relatime,user_xattr,acl)
but it is not working.
Perhaps I should instead make /usr/share/doc/packages/FlightGear-data/ a symlink or bind mount to somewhere in /usr/gamedata.
Ideas? I need another view...
(1) The reason to use a different filesystem for FlightGear is that the rpm is 1 GB of data consisting of a ton of very small files (and more that can be downloaded), so ideal for reiserfs.
- -- Cheers
Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar) AFAIK the file "COPYING" shouldn't be under /usr/share/[name] anyway and should be moved to /usr/share/doc/packages/[name] not linked. Give me a chance to examine the builds and maybe I can fix this. Dave P
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dave Plater wrote:
AFAIK the file "COPYING" shouldn't be under /usr/share/[name] anyway and should be moved to /usr/share/doc/packages/[name] not linked. Give me a chance to examine the builds and maybe I can fix this. Dave P
If you are not going trim the quoted text, please don't bottom post. It's rude to force people to scroll through the same text they just read. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/01/2017 14:27, L A Walsh wrote:
It's rude to force people to scroll through the same text they just read. Please accept my humblest apologies. Dave P
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dave Plater wrote:
On 06/01/2017 14:27, L A Walsh wrote:
It's rude to force people to scroll through the same text they just read. Please accept my humblest apologies. Dave P
---- I might have been a bit tired when I wrote that too... Just read Carlos's post, then Andrei reposted everything (which I don't need, since I just read Carlos's post), then you reposted it too. I was tired and trying to read the chain, but kept having to page all the way down to see what was being written. I know my opinion isn't universal, but if people need to include all the "sources" that they are responding to, it makes sense to treat it like a book or paper and put the detailed-sources in the "appendix" (at the end). Anyone who follows a thread will already have read the earlier text (as most email readers have the ability to display a conversation in a threaded style, including everything previous is really punishing those who read the entire thread for context. Those who "need" everything to be reposted from prior postings (who usually go off on those who put the important info first), are being rude to everyone else by not having read the earlier postings in the thread. It's like stepping into the middle of a conversation and expecting everyone to drop what they are doing and recount the prior information. Just rude, IMO. Sorry, if I came off a bit harsh... personal stuff and tiredness .. though not a good excuse... -l -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/01/2017 00:20, L A Walsh wrote:
Dave Plater wrote:
On 06/01/2017 14:27, L A Walsh wrote:
It's rude to force people to scroll through the same text they just read. Please accept my humblest apologies. Dave P
---- I might have been a bit tired when I wrote that too... Just read Carlos's post, then Andrei reposted everything (which I don't need, since I just read Carlos's post), then you reposted it too.
I was tired and trying to read the chain, but kept having to page all the way down to see what was being written. I know my opinion isn't universal, but if people need to include all the "sources" that they are responding to, it makes sense to treat it like a book or paper and put the detailed-sources in the "appendix" (at the end).
Anyone who follows a thread will already have read the earlier text (as most email readers have the ability to display a conversation in a threaded style, including everything previous is really punishing those who read the entire thread for context.
Those who "need" everything to be reposted from prior postings (who usually go off on those who put the important info first), are being rude to everyone else by not having read the earlier postings in the thread. It's like stepping into the middle of a conversation and expecting everyone to drop what they are doing and recount the prior information. Just rude, IMO.
Sorry, if I came off a bit harsh... personal stuff and tiredness .. though not a good excuse...
-l
No problem. Dave P -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (5)
-
Andrei Borzenkov
-
Carlos E. R.
-
Dave Plater
-
L A Walsh
-
pit