logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

shadow-4.9-libsubid_oot_build.patch (2933B)


  1. From 537b8cd90be7b47b45c45cfd27765ef85eb0ebf1 Mon Sep 17 00:00:00 2001
  2. From: Serge Hallyn <serge@hallyn.com>
  3. Date: Fri, 23 Jul 2021 17:51:13 -0500
  4. Subject: [PATCH] Fix out of tree builds with respect to libsubid includes
  5. There's a better way to do this, and I hope to clean that up,
  6. but this fixes out of tree builds for me right now.
  7. Closes #386
  8. Signed-off-by: Serge Hallyn <serge@hallyn.com>
  9. ---
  10. lib/Makefile.am | 2 ++
  11. libmisc/Makefile.am | 2 +-
  12. libsubid/Makefile.am | 4 ++--
  13. src/Makefile.am | 6 ++++++
  14. 4 files changed, 11 insertions(+), 3 deletions(-)
  15. diff --git a/lib/Makefile.am b/lib/Makefile.am
  16. index ecf3ee25..5ac2e111 100644
  17. --- a/lib/Makefile.am
  18. +++ b/lib/Makefile.am
  19. @@ -10,6 +10,8 @@ if HAVE_VENDORDIR
  20. libshadow_la_CPPFLAGS += -DVENDORDIR=\"$(VENDORDIR)\"
  21. endif
  22. +libshadow_la_CPPFLAGS += -I$(top_srcdir)
  23. +
  24. libshadow_la_SOURCES = \
  25. commonio.c \
  26. commonio.h \
  27. diff --git a/libmisc/Makefile.am b/libmisc/Makefile.am
  28. index 9766a7ec..9f237e0d 100644
  29. --- a/libmisc/Makefile.am
  30. +++ b/libmisc/Makefile.am
  31. @@ -1,7 +1,7 @@
  32. EXTRA_DIST = .indent.pro xgetXXbyYY.c
  33. -AM_CPPFLAGS = -I$(top_srcdir)/lib $(ECONF_CPPFLAGS)
  34. +AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir) $(ECONF_CPPFLAGS)
  35. noinst_LTLIBRARIES = libmisc.la
  36. diff --git a/libsubid/Makefile.am b/libsubid/Makefile.am
  37. index 83051560..99308c1f 100644
  38. --- a/libsubid/Makefile.am
  39. +++ b/libsubid/Makefile.am
  40. @@ -20,8 +20,8 @@ MISCLIBS = \
  41. $(LIBPAM)
  42. libsubid_la_LIBADD = \
  43. - $(top_srcdir)/lib/libshadow.la \
  44. - $(top_srcdir)/libmisc/libmisc.la \
  45. + $(top_builddir)/lib/libshadow.la \
  46. + $(top_builddir)/libmisc/libmisc.la \
  47. $(MISCLIBS) -ldl
  48. AM_CPPFLAGS = \
  49. diff --git a/src/Makefile.am b/src/Makefile.am
  50. index 35027013..7c1a3491 100644
  51. --- a/src/Makefile.am
  52. +++ b/src/Makefile.am
  53. @@ -10,6 +10,7 @@ sgidperms = 2755
  54. AM_CPPFLAGS = \
  55. -I${top_srcdir}/lib \
  56. -I$(top_srcdir)/libmisc \
  57. + -I$(top_srcdir) \
  58. -DLOCALEDIR=\"$(datadir)/locale\"
  59. # XXX why are login and su in /bin anyway (other than for
  60. @@ -183,6 +184,7 @@ list_subid_ranges_LDADD = \
  61. list_subid_ranges_CPPFLAGS = \
  62. -I$(top_srcdir)/lib \
  63. -I$(top_srcdir)/libmisc \
  64. + -I$(top_srcdir) \
  65. -I$(top_srcdir)/libsubid
  66. get_subid_owners_LDADD = \
  67. @@ -194,11 +196,13 @@ get_subid_owners_LDADD = \
  68. get_subid_owners_CPPFLAGS = \
  69. -I$(top_srcdir)/lib \
  70. -I$(top_srcdir)/libmisc \
  71. + -I$(top_srcdir) \
  72. -I$(top_srcdir)/libsubid
  73. new_subid_range_CPPFLAGS = \
  74. -I$(top_srcdir)/lib \
  75. -I$(top_srcdir)/libmisc \
  76. + -I$(top_srcdir) \
  77. -I$(top_srcdir)/libsubid
  78. new_subid_range_LDADD = \
  79. @@ -210,6 +214,7 @@ new_subid_range_LDADD = \
  80. free_subid_range_CPPFLAGS = \
  81. -I$(top_srcdir)/lib \
  82. -I$(top_srcdir)/libmisc \
  83. + -I$(top_srcdir) \
  84. -I$(top_srcdir)/libsubid
  85. free_subid_range_LDADD = \
  86. @@ -220,6 +225,7 @@ free_subid_range_LDADD = \
  87. check_subid_range_CPPFLAGS = \
  88. -I$(top_srcdir)/lib \
  89. + -I$(top_srcdir) \
  90. -I$(top_srcdir)/libmisc
  91. check_subid_range_LDADD = \