2
1

0002-Add-PREFIX-to-host-paths.patch 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. From a221304344b3f9db7e86d928cf97d77542bcf456 Mon Sep 17 00:00:00 2001
  2. From: Adam Duskett <Adamduskett@outlook.com>
  3. Date: Mon, 9 Oct 2017 16:47:19 -0400
  4. Subject: [PATCH] Add PREFIX to host paths
  5. Updates the remaining hardcoded host paths used in the build to be
  6. prefixed with a PREFIX path to allow cross compilation.
  7. Updated to work with version 2.5
  8. Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
  9. Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>
  10. Signed-off-by: Adam Duskett <AdamDuskett@outlook.com>
  11. ---
  12. load_policy/Makefile | 2 +-
  13. newrole/Makefile | 6 +++---
  14. run_init/Makefile | 6 +++---
  15. 3 files changed, 7 insertions(+), 7 deletions(-)
  16. diff --git a/load_policy/Makefile b/load_policy/Makefile
  17. index b85833c..6a45f31 100644
  18. --- a/load_policy/Makefile
  19. +++ b/load_policy/Makefile
  20. @@ -2,7 +2,7 @@
  21. PREFIX ?= $(DESTDIR)/usr
  22. SBINDIR ?= $(DESTDIR)/sbin
  23. MANDIR ?= $(PREFIX)/share/man
  24. -LOCALEDIR ?= /usr/share/locale
  25. +LOCALEDIR ?= $(PREFIX)/share/locale
  26. CFLAGS ?= -Werror -Wall -W
  27. override CFLAGS += $(LDFLAGS) -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
  28. diff --git a/newrole/Makefile b/newrole/Makefile
  29. index 196af92..896708f 100644
  30. --- a/newrole/Makefile
  31. +++ b/newrole/Makefile
  32. @@ -3,9 +3,9 @@ PREFIX ?= $(DESTDIR)/usr
  33. BINDIR ?= $(PREFIX)/bin
  34. MANDIR ?= $(PREFIX)/share/man
  35. ETCDIR ?= $(DESTDIR)/etc
  36. -LOCALEDIR = /usr/share/locale
  37. -PAMH ?= $(shell test -f /usr/include/security/pam_appl.h && echo y)
  38. -AUDITH ?= $(shell test -f /usr/include/libaudit.h && echo y)
  39. +LOCALEDIR = $(PREFIX)/share/locale
  40. +PAMH ?= $(shell test -f $(PREFIX)/include/security/pam_appl.h && echo y)
  41. +AUDITH ?= $(shell test -f $(PREFIX)/include/libaudit.h && echo y)
  42. # Enable capabilities to permit newrole to generate audit records.
  43. # This will make newrole a setuid root program.
  44. # The capabilities used are: CAP_AUDIT_WRITE.
  45. diff --git a/run_init/Makefile b/run_init/Makefile
  46. index 921f0b0..e1566fc 100644
  47. --- a/run_init/Makefile
  48. +++ b/run_init/Makefile
  49. @@ -4,9 +4,9 @@ PREFIX ?= $(DESTDIR)/usr
  50. SBINDIR ?= $(PREFIX)/sbin
  51. MANDIR ?= $(PREFIX)/share/man
  52. ETCDIR ?= $(DESTDIR)/etc
  53. -LOCALEDIR ?= /usr/share/locale
  54. -PAMH ?= $(shell test -f /usr/include/security/pam_appl.h && echo y)
  55. -AUDITH ?= $(shell test -f /usr/include/libaudit.h && echo y)
  56. +LOCALEDIR ?= $(PREFIX)/share/locale
  57. +PAMH ?= $(shell test -f $(PREFIX)/include/security/pam_appl.h && echo y)
  58. +AUDITH ?= $(shell test -f $(PREFIX)/include/libaudit.h && echo y)
  59. CFLAGS ?= -Werror -Wall -W
  60. override CFLAGS += -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
  61. --
  62. 2.13.6