Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 693296 - =sys-fs/xfsdump-3.1.8 emitting multiple warnings, fails to emerge with =sys-fs/xfsprogs-5.2.1 and sys-apps/util-linux-2.34-r2
Summary: =sys-fs/xfsdump-3.1.8 emitting multiple warnings, fails to emerge with =sys-f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://www.mail-archive.com/openembe...
Whiteboard:
Keywords: PATCH
: 692972 (view as bug list)
Depends on:
Blocks: 704336
  Show dependency tree
 
Reported: 2019-09-01 23:04 UTC by Jason Chan
Modified: 2020-02-14 13:55 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Preliminary patch for emerging =sys-fs/xfsdump-3.1.8 with >=sys-fs/xfsprogs-5.2.0 (ndef-uuid_str_len-xfs-5.2-compat-calloc-decl.patch,1.46 KB, patch)
2019-09-01 23:04 UTC, Jason Chan
Details | Diff
../xfsdump-3.1.8/temp/environment file (environment,115.93 KB, text/plain)
2019-09-01 23:05 UTC, Jason Chan
Details
Failed emerge log (xfsdump-3.1.8:build.log,67.12 KB, text/x-log)
2019-09-01 23:05 UTC, Jason Chan
Details
Successful emerge log (xfsdump-3.1.8:build-patched.log,97.97 KB, text/plain)
2019-09-01 23:06 UTC, Jason Chan
Details
sys-fs/xfsdump-3.1.8 (build.log,73.14 KB, text/x-log)
2019-09-10 21:10 UTC, Yuriy Dmitriev
Details
xfsdump-2019.5.20 ebuild (xfsdump-2019.5.20.ebuild,1.64 KB, text/plain)
2019-11-05 15:34 UTC, Jason Chan
Details
Make xfsdump compatible with newer versions of xfsprogs (xfsdump-2019.5.20-compat-with-xfsprogs-5.2.0-and-up.patch,966 bytes, patch)
2019-11-05 15:35 UTC, Jason Chan
Details | Diff
just refreshed the no-symlink.patch (xfsdump-2019.5.20-no-symlink.patch,1.58 KB, patch)
2019-11-05 15:38 UTC, Jason Chan
Details | Diff
refreshed and used web.archive.org to show issue since oss.sgi.com has been down (xfsdump-2019.5.20-prompt-overflow.patch,768 bytes, patch)
2019-11-05 15:39 UTC, Jason Chan
Details | Diff
xfsdump-2019.5.20-avoid-deprecated.patch (xfsdump-2019.5.20-avoid-deprecated.patch,23.89 KB, patch)
2019-12-13 17:34 UTC, Greg Turner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Chan 2019-09-01 23:04:32 UTC
Created attachment 588670 [details, diff]
Preliminary patch for emerging =sys-fs/xfsdump-3.1.8 with >=sys-fs/xfsprogs-5.2.0

I've created a preliminary patch to allow a successful emerge that fixes the following problems:
 * types.h:38: warning: "UUID_STR_LEN" redefined
 * fs.c:207:2: error: unknown type name ‘xfs_fsop_geom_v1_t’; did you mean ‘xfs_fsop_resblks_t’?
 * drive.c:112:27: warning: implicit declaration of function ‘calloc’ [-Wimplicit-function-declaration]

This patch still needs work because it needs to check against the current xfsprogs version.

For types.h, I've removed the defining of UUID_STR_LEN because Gentoo builds libuuid with util-linux, which is in our @system set. It also has a differing value, 36 vs 37, but I wasn't able to find out why. UUID_STR_LEN has been 37 in util-linux's git since 2011~.


For fs.c, xfsprogs has changed and xfsdump has yet to update to reflect that. In reference to: https://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg65431.html

'xfs_fsop_geom_v1_t geo' in common/fs.c has been redefined to 'struct xfs_fsop_geom_v1 geo' for >=xfsprogs-5.2.0.

Below shows the removal of 'xfs_fsop_geom_v1_t' in the newer xfsprogs.

blink /var/tmp/portage/sys-fs/xfsprogs-4.19.0/work/xfsprogs-4.19.0 # grep -s xfs_fsop_geom_v1_t */* */*/*
    fsr/xfs_fsr.c:int xfs_getgeom(int , xfs_fsop_geom_v1_t * );
    fsr/xfs_fsr.c:static xfs_fsop_geom_v1_t fsgeom; /* geometry of active mounted system */
    fsr/xfs_fsr.c:xfs_fsgeometry(int fd, xfs_fsop_geom_v1_t *geom)
    fsr/xfs_fsr.c:xfs_getgeom(int fd, xfs_fsop_geom_v1_t * fsgeom)
    libxfs/xfs_fs.h:} xfs_fsop_geom_v1_t;
    rtcp/xfs_rtcp.c:        xfs_fsop_geom_v1_t geo;


blink /var/tmp/portage/sys-fs/xfsprogs-5.2.1/work/xfsprogs-5.2.1 # grep -s xfs_fsop_geom_v1_t */* */*/*

blink /var/tmp/portage/sys-fs/xfsprogs-5.2.1/work/xfsprogs-5.2.1 # grep -s xfs_fsop_geom_v1 */* */*/*
    fsr/xfs_fsr.c:int xfs_getgeom(int , struct xfs_fsop_geom_v1 * );
    fsr/xfs_fsr.c:static struct xfs_fsop_geom_v1 fsgeom;    /* geometry of active mounted system */
    fsr/xfs_fsr.c:xfs_fsgeometry(int fd, struct xfs_fsop_geom_v1 *geom)
    fsr/xfs_fsr.c:xfs_getgeom(int fd, struct xfs_fsop_geom_v1 *fsgeom)
    libxfs/xfs_fs.h:struct xfs_fsop_geom_v1 {
    libxfs/xfs_fs.h:#define XFS_IOC_FSGEOMETRY_V1        _IOR ('X', 100, struct xfs_fsop_geom_v1)
    repair/xfs_repair.c:    struct xfs_fsop_geom_v1 geom = { 0 };
    rtcp/xfs_rtcp.c:        struct xfs_fsop_geom_v1 geo;
    man/man2/ioctl_xfs_fsop_geometry.2:.BI "int ioctl(int " fd ", XFS_IOC_FSOP_GEOMETRY_V1, struct xfs_fsop_geom_v1 *" arg );
    man/man2/ioctl_xfs_fsop_geometry.2:     /* struct xfs_fsop_geom_v1 stops here. */


For drive.c, <stdlib.h> was not included.
Comment 1 Jason Chan 2019-09-01 23:05:14 UTC
Created attachment 588672 [details]
../xfsdump-3.1.8/temp/environment file
Comment 2 Jason Chan 2019-09-01 23:05:42 UTC
Created attachment 588674 [details]
Failed emerge log
Comment 3 Jason Chan 2019-09-01 23:06:25 UTC
Created attachment 588676 [details]
Successful emerge log
Comment 4 Yuriy Dmitriev 2019-09-10 21:10:46 UTC
Created attachment 589672 [details]
sys-fs/xfsdump-3.1.8

Same error. uuid.h unusable
Comment 5 Yuriy Dmitriev 2019-09-10 21:12:12 UTC
Folks, I can confirm problem.
It related with https://bugs.gentoo.org/631594
I say about libuuid. I got same error as Jason Chan.
With best wishes - Y.D.
Comment 6 Greg Turner 2019-10-06 00:13:52 UTC
Yuriy's patch W4M to get xfsdump building.  But the build sure looks a mess... not at all sure I would want to rely on xfsdump in the first place, after seeing all those warnings :)
Comment 7 Greg Turner 2019-10-07 02:01:18 UTC
(In reply to Greg Turner from comment #6)
> Yuriy's patch

correction: Jason's patch.
Comment 8 Jason Chan 2019-11-05 15:34:21 UTC
Created attachment 595060 [details]
xfsdump-2019.5.20 ebuild

With these in ${FILESDIR}

xfsdump-2019.5.20-compat-with-xfsprogs-5.2.0-and-up.patch
xfsdump-2019.5.20-no-symlink.patch
xfsdump-2019.5.20-prompt-overflow.patch
xfsdump-3.1.6-linguas.patch
Comment 9 Jason Chan 2019-11-05 15:35:54 UTC
Created attachment 595062 [details, diff]
Make xfsdump compatible with newer versions of xfsprogs

The ebuild requires >=xfsprogs-5.2.0 so there's no check if it should be applied or not
Comment 10 Jason Chan 2019-11-05 15:38:08 UTC
Created attachment 595064 [details, diff]
just refreshed the no-symlink.patch
Comment 11 Jason Chan 2019-11-05 15:39:35 UTC
Created attachment 595066 [details, diff]
refreshed and used web.archive.org to show issue since oss.sgi.com has been down
Comment 12 Jason Chan 2019-11-05 15:43:56 UTC
Good to hear that it's actually working for other people!

Given that the last release was two years ago, I've made an ebuild of a 2019/05/20 snapshot from https://git.kernel.org/pub/scm/fs/xfs/xfsdump-dev.git/.

The only issue I had was xfsdumping/restoring a mounted filesystem; files that were open and modified during the backup (Firefox cache, text files) were missing, expected.
Comment 13 Greg Turner 2019-12-13 17:34:13 UTC
Created attachment 599356 [details, diff]
xfsdump-2019.5.20-avoid-deprecated.patch

This patch comes from https://lore.kernel.org/linux-xfs/a5dc4615-ed91-803e-56a2-1cf5637285d6@sandeen.net/t/ (I had to trivially tweak it by hand to avoid a duplicate hunk which could probably be avoided by dropping something from the ebuild patchset).  Gets xfsdump ebuild building again vs. latest and worstest ~amd64.
Comment 14 Fernando B. Nascimento 2020-01-06 01:00:18 UTC
From a fresh Gentoo install compiled this weekend I see that the file /usr/include/xfs/xfs_fs.h from sys-fs/xfsprogs-5.4.0 differs from the file of the last stable kernel sources, sys-kernel/gentoo-sources-4.19.86, that I am using /usr/src/linux-4.19.86-gentoo/fs/xfs/libxfs/xfs_fs.h.

Two of the relevant changes that I see are that the kernel has the names of types xfs_bstat_t and xfs_fsop_geom_v1_t for the structs xfs_bstat and xfs_fsop_geom_v1 respectively.

I saw that xfs_bstat_t was removed from linux sources https://github.com/torvalds/linux/commit/6f71fb683879c78ba356ca78f2972289443f26eb#diff-49d176a1f8b65915721068b08e59c642 and I beleave that xfs_fsop_geom_v1_t was removed in an older commit, but the 4.19 have them both https://github.com/torvalds/linux/blob/v4.19/fs/xfs/libxfs/xfs_fs.h

As the last stabe version of the gentoo-sources is now (2019-01-05 00:53 UTC) sys-kernel/gentoo-sources-4.19.86, may be the xfsprogs should have dependencies of the right kernel versions, and, as a consequence, would have ~x86 and ~amd64 keyworkds.

These changes, perhaps, won't cause any harm, but other that we didn't see may do. Or am I mistaken because these kind of differences would never cause problems?

Hmm, if this is true, may be other packages existst on the same situation?
Comment 15 Pacho Ramos gentoo-dev 2020-01-06 10:23:01 UTC
*** Bug 692972 has been marked as a duplicate of this bug. ***
Comment 16 Larry the Git Cow gentoo-dev 2020-02-14 13:55:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4995538f727b3fbea1b4628b72159c34e78598a1

commit 4995538f727b3fbea1b4628b72159c34e78598a1
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-02-14 13:47:44 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-02-14 13:55:09 +0000

    sys-fs/xfsdump: bump to v3.1.9
    
    Closes: https://bugs.gentoo.org/693296
    Package-Manager: Portage-2.3.88, Repoman-2.3.20
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 sys-fs/xfsdump/Manifest                            |  1 +
 sys-fs/xfsdump/files/xfsdump-3.1.9-fix-docs.patch  | 22 +++++++
 .../xfsdump/files/xfsdump-3.1.9-no-symlink.patch   | 26 ++++++++
 .../files/xfsdump-3.1.9-prompt-overflow.patch      | 14 +++++
 ...ump-3.1.9-skip-inventory-debian-subfolder.patch | 18 ++++++
 sys-fs/xfsdump/xfsdump-3.1.9.ebuild                | 69 ++++++++++++++++++++++
 6 files changed, 150 insertions(+)