libsemanage: Allow user to set SYSCONFDIR
PATCH 1/1 libsemanage: Allow user to set SYSCONFDIR
This change will allow a user to set the location of their sysconfdir, defaulted to /etc, if they are installing into nonstandard locations.
--- libsemanage/src/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
libsemanage/src/Makefile +2 -1
@@ -11,6 +11,7 @@ PKG_CONFIG ?= pkg-config PREFIX ?= /usr LIBDIR ?= $(PREFIX)/lib INCLUDEDIR ?= $(PREFIX)/include +SYSCONFDIR ?= /etc PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX)) PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX)) PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfig import *; print(get_python_lib(plat_specific=1, prefix='$(PREFIX)'))")
@@ -19,7 +20,7 @@ RUBYINC ?= $(shell $(RUBY) -e 'puts "-I" + RbConfig::CONFIG["rubyarchhdrdir"] + RUBYLIBS ?= $(shell $(RUBY) -e 'puts "-L" + RbConfig::CONFIG["libdir"] + " -L" + RbConfig::CONFIG["archlibdir"] + " " + RbConfig::CONFIG["LIBRUBYARG_SHARED"]') RUBYINSTALL ?= $(shell $(RUBY) -e 'puts RbConfig::CONFIG["vendorarchdir"]') -DEFAULT_SEMANAGE_CONF_LOCATION=/etc/selinux/semanage.conf +DEFAULT_SEMANAGE_CONF_LOCATION=$(SYSCONFDIR)/selinux/semanage.conf ifeq ($(DEBUG),1) export CFLAGS ?= -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror
Signature · 1 line
2.25.1
Quoted 22 lines · Matt Sheets
This change will allow a user to set the location of their sysconfdir, defaulted to /etc, if they are installing into nonstandard locations.
Signed-off-by Matt Sheets <[email protected]>--- libsemanage/src/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)libsemanage/src/Makefile +1
-0@@ -11,6 +11,7 @@ PKG_CONFIG ?= pkg-config PREFIX ?= /usr LIBDIR ?= $(PREFIX)/lib INCLUDEDIR ?= $(PREFIX)/include +SYSCONFDIR ?= /etc PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX)) PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX)) PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfig import *; print(get_python_lib(plat_specific=1, prefix='$(PREFIX)'))")
libsemanage/src/Makefile RUBYINC ?= $(shell $(RUBY) -e 'puts "-I" + RbConfig::CONFIG["rubyarchhdrdir"] + · line 26
Quoted 8 lines
libsemanage/src/Makefile +1
-1@@ -19,7 +20,7 @@ RUBYINC ?= $(shell $(RUBY) -e 'puts "-I" + RbConfig::CONFIG["rubyarchhdrdir"] + RUBYLIBS ?= $(shell $(RUBY) -e 'puts "-L" + RbConfig::CONFIG["libdir"] + " -L" + RbConfig::CONFIG["archlibdir"] + " " + RbConfig::CONFIG["LIBRUBYARG_SHARED"]') RUBYINSTALL ?= $(shell $(RUBY) -e 'puts RbConfig::CONFIG["vendorarchdir"]') -DEFAULT_SEMANAGE_CONF_LOCATION=/etc/selinux/semanage.conf +DEFAULT_SEMANAGE_CONF_LOCATION=$(SYSCONFDIR)/selinux/semanage.conf ifeq ($(DEBUG),1) export CFLAGS ?= -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror
That looks good thanks. Sorry, one last request. This is a generic yocto issue, right? Are you able to provide publicly visible links to the upstream yocto project in the git commit message to justify why using a nonstandard /etc is a normal/reasonable thing to do?
Daniel Burgener
Reviewed-byQuoted 25 lines · Daniel Burgener
Quoted 24 lines · Matt Sheets
This change will allow a user to set the location of their sysconfdir, defaulted to /etc, if they are installing into nonstandard locations.
Signed-off-by Matt Sheets <[email protected]>---
libsemanage/src/Makefile | 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)libsemanage/src/Makefile +0
-0@@ -11,6 +11,7 @@ PKG_CONFIG ?= pkg-configPREFIX ?= /usr
LIBDIR ?= $(PREFIX)/lib
INCLUDEDIR ?= $(PREFIX)/include
+SYSCONFDIR ?= /etc
PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX))
PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX))
PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfig import *;print(get_python_lib(plat_specific=1, prefix='$(PREFIX)'))")libsemanage/src/Makefile +0
-0@@ -19,7 +20,7 @@ RUBYINC ?= $(shell $(RUBY) -e 'puts "-I" +RbConfig::CONFIG["rubyarchhdrdir"] +
RUBYLIBS ?= $(shell $(RUBY) -e 'puts "-L" + RbConfig::CONFIG["libdir"] + " -L" + RbConfig::CONFIG["archlibdir"] + " " + RbConfig::CONFIG["LIBRUBYARG_SHARED"]')
Quoted 8 lines
Quoted 6 lines
RUBYINSTALL ?= $(shell $(RUBY) -e 'puts RbConfig::CONFIG["vendorarchdir"]')
libsemanage/src/Makefile +1
-1-DEFAULT_SEMANAGE_CONF_LOCATION=/etc/selinux/semanage.conf +DEFAULT_SEMANAGE_CONF_LOCATION=$(SYSCONFDIR)/selinux/semanage.confifeq ($(DEBUG),1)
export CFLAGS ?= -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -WerrorThat looks good thanks. Sorry, one last request. This is a generic yocto issue, right? Are you able to provide publicly visible links to the upstream yocto project in the git commit message to justify why using a nonstandard /etc is a normal/reasonable thing to do?
Oops, I'd been discussing this with Matt, and didn't realize this one hit the public list :) Just trying to improve the rationale/justification.
Regarding the actual change:
Just to provide more background about the yocto comment. The main reason I want to push this change is to then add support for yocto nativesdk builds for some of these packages(things like audit2allow and sesearch). In our situation our nativesdk root in not in standard location so we get packaging complaints that we have to kludge around. With this in place building for yocto nativesdk becomes easier because we can set the ENV variable.
Quoted 40 lines · Daniel Burgener
Quoted 25 lines · Daniel Burgener
Quoted 24 lines · Matt Sheets
This change will allow a user to set the location of their sysconfdir, defaulted to /etc, if they are installing into nonstandard locations.
Signed-off-by Matt Sheets <[email protected]>---
libsemanage/src/Makefile | 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)libsemanage/src/Makefile +0
-0@@ -11,6 +11,7 @@ PKG_CONFIG ?= pkg-configPREFIX ?= /usr
LIBDIR ?= $(PREFIX)/lib
INCLUDEDIR ?= $(PREFIX)/include
+SYSCONFDIR ?= /etc
PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX))
PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX))
PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfig import *;print(get_python_lib(plat_specific=1, prefix='$(PREFIX)'))")libsemanage/src/Makefile +0
-0@@ -19,7 +20,7 @@ RUBYINC ?= $(shell $(RUBY) -e 'puts "-I" +RbConfig::CONFIG["rubyarchhdrdir"] +
RUBYLIBS ?= $(shell $(RUBY) -e 'puts "-L" + RbConfig::CONFIG["libdir"] + " -L" + RbConfig::CONFIG["archlibdir"] + " " + RbConfig::CONFIG["LIBRUBYARG_SHARED"]')Quoted 8 lines
Quoted 6 lines
RUBYINSTALL ?= $(shell $(RUBY) -e 'puts RbConfig::CONFIG["vendorarchdir"]')
libsemanage/src/Makefile +1
-1-DEFAULT_SEMANAGE_CONF_LOCATION=/etc/selinux/semanage.conf +DEFAULT_SEMANAGE_CONF_LOCATION=$(SYSCONFDIR)/selinux/semanage.confifeq ($(DEBUG),1)
export CFLAGS ?= -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -WerrorThat looks good thanks. Sorry, one last request. This is a generic yocto issue, right? Are you able to provide publicly visible links to the upstream yocto project in the git commit message to justify why using a nonstandard /etc is a normal/reasonable thing to do?
Oops, I'd been discussing this with Matt, and didn't realize this one hit the public list :) Just trying to improve the rationale/justification.
Regarding the actual change:
Reviewed-by Daniel Burgener <[email protected]>
James Carter
Acked-byQuoted 8 lines · Daniel Burgener
Quoted 6 lines · Daniel Burgener
Quoted 5 lines · Matt Sheets
This change will allow a user to set the location of their sysconfdir, defaulted to /etc, if they are installing into nonstandard locations.
Signed-off-by Matt Sheets <[email protected]>
Quoted 41 lines
Quoted 26 lines
Quoted 26 lines
--- libsemanage/src/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)libsemanage/src/Makefile +1
-0@@ -11,6 +11,7 @@ PKG_CONFIG ?= pkg-config PREFIX ?= /usr LIBDIR ?= $(PREFIX)/lib INCLUDEDIR ?= $(PREFIX)/include +SYSCONFDIR ?= /etc PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX)) PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX)) PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfigimport *;
print(get_python_lib(plat_specific=1, prefix='$(PREFIX)'))")libsemanage/src/Makefile +0
-0@@ -19,7 +20,7 @@ RUBYINC ?= $(shell $(RUBY) -e 'puts "-I" +RbConfig::CONFIG["rubyarchhdrdir"] +
RUBYLIBS ?= $(shell $(RUBY) -e 'puts "-L" +
RbConfig::CONFIG["libdir"] + " -L" + RbConfig::CONFIG["archlibdir"] + " " + RbConfig::CONFIG["LIBRUBYARG_SHARED"]')
RUBYINSTALL ?= $(shell $(RUBY) -e 'puts
RbConfig::CONFIG["vendorarchdir"]')libsemanage/src/Makefile +1
-1-DEFAULT_SEMANAGE_CONF_LOCATION=/etc/selinux/semanage.conf +DEFAULT_SEMANAGE_CONF_LOCATION=$(SYSCONFDIR)/selinux/semanage.confQuoted 8 lines
Quoted 3 lines
ifeq ($(DEBUG),1)
export CFLAGS ?= -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall
-Wshadow -WerrorThat looks good thanks. Sorry, one last request. This is a generic yocto issue, right? Are you able to provide publicly visible links to the upstream yocto project in the git commit message to justify why using a nonstandard /etc is a normal/reasonable thing to do?
Oops, I'd been discussing this with Matt, and didn't realize this one hit the public list :) Just trying to improve the rationale/justification.
Regarding the actual change:
Reviewed-by Daniel Burgener <[email protected]>
Quoted 5 lines · James Carter
Quoted 2 lines · Daniel Burgener
On 9/22/2022 2:04 PM, Daniel Burgener wrote:
Quoted 9 lines
Quoted 6 lines
Quoted 6 lines · Matt Sheets
Quoted 5 lines
This change will allow a user to set the location of their sysconfdir, defaulted to /etc, if they are installing into nonstandard locations.
Signed-off-by Matt Sheets <[email protected]>Acked-by James Carter <[email protected]>
Merged.
Thanks,
Jim
Quoted 41 lines
Quoted 41 lines
Quoted 26 lines
Quoted 26 lines
--- libsemanage/src/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)libsemanage/src/Makefile +1
-0@@ -11,6 +11,7 @@ PKG_CONFIG ?= pkg-config PREFIX ?= /usr LIBDIR ?= $(PREFIX)/lib INCLUDEDIR ?= $(PREFIX)/include +SYSCONFDIR ?= /etc PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX)) PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX)) PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfigimport *;
print(get_python_lib(plat_specific=1, prefix='$(PREFIX)'))")libsemanage/src/Makefile +0
-0@@ -19,7 +20,7 @@ RUBYINC ?= $(shell $(RUBY) -e 'puts "-I" +RbConfig::CONFIG["rubyarchhdrdir"] +
RUBYLIBS ?= $(shell $(RUBY) -e 'puts "-L" +
RbConfig::CONFIG["libdir"] + " -L" + RbConfig::CONFIG["archlibdir"] + " " + RbConfig::CONFIG["LIBRUBYARG_SHARED"]')
RUBYINSTALL ?= $(shell $(RUBY) -e 'puts
RbConfig::CONFIG["vendorarchdir"]')libsemanage/src/Makefile +1
-1-DEFAULT_SEMANAGE_CONF_LOCATION=/etc/selinux/semanage.conf +DEFAULT_SEMANAGE_CONF_LOCATION=$(SYSCONFDIR)/selinux/semanage.confQuoted 8 lines
Quoted 3 lines
ifeq ($(DEBUG),1)
export CFLAGS ?= -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall
-Wshadow -WerrorThat looks good thanks. Sorry, one last request. This is a generic yocto issue, right? Are you able to provide publicly visible links to the upstream yocto project in the git commit message to justify why using a nonstandard /etc is a normal/reasonable thing to do?
Oops, I'd been discussing this with Matt, and didn't realize this one hit the public list :) Just trying to improve the rationale/justification.
Regarding the actual change:
Reviewed-by Daniel Burgener <[email protected]>