Message ID | 20220922180255.2923-1-masheets@linux.microsoft.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 01b5ef48dcc3 |
Headers | show |
Series | libsemanage: Allow user to set SYSCONFDIR | expand |
On 9/22/2022 2:02 PM, Matt Sheets wrote: > 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 <masheets@linux.microsoft.com> > --- > libsemanage/src/Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile > index 71c2a1d2..01df0181 100644 > --- a/libsemanage/src/Makefile > +++ b/libsemanage/src/Makefile > @@ -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 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?
On 9/22/2022 2:04 PM, Daniel Burgener wrote: > On 9/22/2022 2:02 PM, Matt Sheets wrote: >> 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 <masheets@linux.microsoft.com> >> --- >> libsemanage/src/Makefile | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile >> index 71c2a1d2..01df0181 100644 >> --- a/libsemanage/src/Makefile >> +++ b/libsemanage/src/Makefile >> @@ -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 > > 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? 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 <dburgener@linux.microsoft.com>
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. On 9/22/2022 11:06 AM, Daniel Burgener wrote: > On 9/22/2022 2:04 PM, Daniel Burgener wrote: >> On 9/22/2022 2:02 PM, Matt Sheets wrote: >>> 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 <masheets@linux.microsoft.com> >>> --- >>> libsemanage/src/Makefile | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile >>> index 71c2a1d2..01df0181 100644 >>> --- a/libsemanage/src/Makefile >>> +++ b/libsemanage/src/Makefile >>> @@ -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 >> >> 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? > > 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 <dburgener@linux.microsoft.com>
On Thu, Sep 22, 2022 at 2:16 PM Daniel Burgener <dburgener@linux.microsoft.com> wrote: > > On 9/22/2022 2:04 PM, Daniel Burgener wrote: > > On 9/22/2022 2:02 PM, Matt Sheets wrote: > >> 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 <masheets@linux.microsoft.com> Acked-by: James Carter <jwcart2@gmail.com> > >> --- > >> libsemanage/src/Makefile | 3 ++- > >> 1 file changed, 2 insertions(+), 1 deletion(-) > >> > >> diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile > >> index 71c2a1d2..01df0181 100644 > >> --- a/libsemanage/src/Makefile > >> +++ b/libsemanage/src/Makefile > >> @@ -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 > > > > 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? > > 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 <dburgener@linux.microsoft.com>
On Wed, Sep 28, 2022 at 11:48 AM James Carter <jwcart2@gmail.com> wrote: > > On Thu, Sep 22, 2022 at 2:16 PM Daniel Burgener > <dburgener@linux.microsoft.com> wrote: > > > > On 9/22/2022 2:04 PM, Daniel Burgener wrote: > > > On 9/22/2022 2:02 PM, Matt Sheets wrote: > > >> 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 <masheets@linux.microsoft.com> > > Acked-by: James Carter <jwcart2@gmail.com> > Merged. Thanks, Jim > > >> --- > > >> libsemanage/src/Makefile | 3 ++- > > >> 1 file changed, 2 insertions(+), 1 deletion(-) > > >> > > >> diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile > > >> index 71c2a1d2..01df0181 100644 > > >> --- a/libsemanage/src/Makefile > > >> +++ b/libsemanage/src/Makefile > > >> @@ -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 > > > > > > 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? > > > > 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 <dburgener@linux.microsoft.com>
diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile index 71c2a1d2..01df0181 100644 --- a/libsemanage/src/Makefile +++ b/libsemanage/src/Makefile @@ -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
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 <masheets@linux.microsoft.com> --- libsemanage/src/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)