All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libsemanage: Allow user to set SYSCONFDIR
@ 2022-09-22 18:02 Matt Sheets
  2022-09-22 18:04 ` Daniel Burgener
  0 siblings, 1 reply; 6+ messages in thread
From: Matt Sheets @ 2022-09-22 18:02 UTC (permalink / raw)
  To: selinux; +Cc: dburgener

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
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] libsemanage: Allow user to set SYSCONFDIR
  2022-09-22 18:02 [PATCH] libsemanage: Allow user to set SYSCONFDIR Matt Sheets
@ 2022-09-22 18:04 ` Daniel Burgener
  2022-09-22 18:06   ` Daniel Burgener
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Burgener @ 2022-09-22 18:04 UTC (permalink / raw)
  To: Matt Sheets, selinux

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?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] libsemanage: Allow user to set SYSCONFDIR
  2022-09-22 18:04 ` Daniel Burgener
@ 2022-09-22 18:06   ` Daniel Burgener
  2022-09-22 18:24     ` Matthew Sheets
  2022-09-28 15:48     ` James Carter
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Burgener @ 2022-09-22 18:06 UTC (permalink / raw)
  To: Matt Sheets, selinux

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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] libsemanage: Allow user to set SYSCONFDIR
  2022-09-22 18:06   ` Daniel Burgener
@ 2022-09-22 18:24     ` Matthew Sheets
  2022-09-28 15:48     ` James Carter
  1 sibling, 0 replies; 6+ messages in thread
From: Matthew Sheets @ 2022-09-22 18:24 UTC (permalink / raw)
  To: Daniel Burgener, selinux

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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] libsemanage: Allow user to set SYSCONFDIR
  2022-09-22 18:06   ` Daniel Burgener
  2022-09-22 18:24     ` Matthew Sheets
@ 2022-09-28 15:48     ` James Carter
  2022-10-05 14:39       ` James Carter
  1 sibling, 1 reply; 6+ messages in thread
From: James Carter @ 2022-09-28 15:48 UTC (permalink / raw)
  To: Daniel Burgener; +Cc: Matt Sheets, selinux

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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] libsemanage: Allow user to set SYSCONFDIR
  2022-09-28 15:48     ` James Carter
@ 2022-10-05 14:39       ` James Carter
  0 siblings, 0 replies; 6+ messages in thread
From: James Carter @ 2022-10-05 14:39 UTC (permalink / raw)
  To: Daniel Burgener; +Cc: Matt Sheets, selinux

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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-05 14:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22 18:02 [PATCH] libsemanage: Allow user to set SYSCONFDIR Matt Sheets
2022-09-22 18:04 ` Daniel Burgener
2022-09-22 18:06   ` Daniel Burgener
2022-09-22 18:24     ` Matthew Sheets
2022-09-28 15:48     ` James Carter
2022-10-05 14:39       ` James Carter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.