Skip to content

droplet: remove obsolete attr/xattr.h include3#985

Merged
pstorz merged 2 commits intobareos:masterfrom
bruno-at-bareos:dev/b-at-bareos/Fix_libdroplet_xattr.h_include
Nov 18, 2021
Merged

droplet: remove obsolete attr/xattr.h include3#985
pstorz merged 2 commits intobareos:masterfrom
bruno-at-bareos:dev/b-at-bareos/Fix_libdroplet_xattr.h_include

Conversation

@bruno-at-bareos
Copy link
Contributor

@bruno-at-bareos bruno-at-bareos commented Nov 15, 2021

This PR update the way xattr.h is included in libdroplet by removing obsolete attr/xattr.h include.
see 2015 attr upstream commit https://git.savannah.nongnu.org/cgit/attr.git/commit/?id=7921157890d07858d092f4003ca4c6bae9fd2c38 and replace by sys/xattr.h

Thank you for contributing to the Bareos Project!

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

General
  • PR name is meaningful
  • Purpose of the PR is understood
  • Separate commit for this PR in the CHANGELOG.md, PR number referenced is same
  • Commit descriptions are understandable and well formatted
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
  • bareos-check-sources --since-merge does not report any problems
  • git status should not report modifications in the source tree after building and testing

@pstorz pstorz self-requested a review November 16, 2021 07:58
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, these changes do not build on CentOS7:

[2021-11-15T10:57:33.677Z] In file included from ../../../../../core/src/droplet/libdroplet/src/utils.c:36:
[2021-11-15T10:57:33.677Z] /usr/include/sys/xattr.h:31:3: error: expected identifier before numeric constant
[2021-11-15T10:57:33.677Z] XATTR_CREATE = 1, /* set value, fail if attr already exists. */
[2021-11-15T10:57:33.677Z] ^~~~~~~~~~~~

@bruno-at-bareos
Copy link
Contributor Author

Unfortunately, these changes do not build on CentOS7:

[2021-11-15T10:57:33.677Z] In file included from ../../../../../core/src/droplet/libdroplet/src/utils.c:36: [2021-11-15T10:57:33.677Z] /usr/include/sys/xattr.h:31:3: error: expected identifier before numeric constant [2021-11-15T10:57:33.677Z] XATTR_CREATE = 1, /* set value, fail if attr already exists. */ [2021-11-15T10:57:33.677Z] ^~~~~~~~~~~~

I've seen yesterday night, I've somewhat forget how rhel7 is archeological with a libc 2.17 and a 3x kernel :-)
I guess I will go to #ifdef path...

Copy link
Contributor Author

@bruno-at-bareos bruno-at-bareos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems we are not good.

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
- Replace obsoleted attr/xattr.h (removed upstream in 2015)
  by sys/xattr.h

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
@pstorz pstorz changed the title Fix libdroplet xattr.h include droiplet: remove obsoleteattr/xattr.h include Nov 18, 2021
@pstorz pstorz changed the title droiplet: remove obsoleteattr/xattr.h include droiplet: remove obsolete attr/xattr.h include Nov 18, 2021
@pstorz pstorz self-requested a review November 18, 2021 11:32
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good and short solution

@pstorz pstorz merged commit 5afc02e into bareos:master Nov 18, 2021
@bruno-at-bareos bruno-at-bareos changed the title droiplet: remove obsolete attr/xattr.h include droplet: remove obsolete attr/xattr.h include3 Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants