mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/2] systemd: install_alternative_tree /lib/systemd/system/
@ 2014-09-30  4:18 jon
  2014-09-30  4:18 ` [ptxdist] [PATCH 2/2] systemd: PTXCONF_SYSTEMD_COREDUMP jon
  2014-09-30  8:12 ` [ptxdist] [PATCH 1/2] systemd: install_alternative_tree /lib/systemd/system/ Michael Olbrich
  0 siblings, 2 replies; 6+ messages in thread
From: jon @ 2014-09-30  4:18 UTC (permalink / raw)
  To: ptxdist; +Cc: Jon Ringle

From: Jon Ringle <jringle@gridpoint.com>

This allows platform specific customizations to /lib/systemd/system/ to
be installed on the target

Signed-off-by: Jon Ringle <jringle@gridpoint.com>
---
 rules/systemd.make | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/systemd.make b/rules/systemd.make
index ff3d606..51ffcac 100644
--- a/rules/systemd.make
+++ b/rules/systemd.make
@@ -303,7 +303,7 @@ ifdef PTXCONF_SYSTEMD_NETWORK
 endif
 
 #	# units
-	@$(call install_tree, systemd, 0, 0, -, /lib/systemd/system/)
+	@$(call install_alternative_tree, systemd, 0, 0, /lib/systemd/system/)
 
 	@$(call install_alternative, systemd, 0, 0, 0644, /etc/vconsole.conf)
 
-- 
1.8.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH 2/2] systemd: PTXCONF_SYSTEMD_COREDUMP
  2014-09-30  4:18 [ptxdist] [PATCH 1/2] systemd: install_alternative_tree /lib/systemd/system/ jon
@ 2014-09-30  4:18 ` jon
  2014-09-30  8:20   ` Michael Olbrich
  2014-09-30  8:12 ` [ptxdist] [PATCH 1/2] systemd: install_alternative_tree /lib/systemd/system/ Michael Olbrich
  1 sibling, 1 reply; 6+ messages in thread
From: jon @ 2014-09-30  4:18 UTC (permalink / raw)
  To: ptxdist; +Cc: Jon Ringle

From: Jon Ringle <jringle@gridpoint.com>

Allow coredumpctl to be built and installed to debug crashing systemd
services

Signed-off-by: Jon Ringle <jringle@gridpoint.com>
---
 rules/systemd.in   | 6 ++++++
 rules/systemd.make | 6 ++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/rules/systemd.in b/rules/systemd.in
index ba69d8b..b6cdc1b 100644
--- a/rules/systemd.in
+++ b/rules/systemd.in
@@ -81,5 +81,11 @@ config SYSTEMD_TIMEDATE
 	help
 	  NTP client for time synchronization and local timezone handling.
 
+config SYSTEMD_COREDUMP
+	bool
+	prompt "enable generating coredumps"
+	help
+	  Enable this only if you need to debug a crashing systemd service
+
 endif
 
diff --git a/rules/systemd.make b/rules/systemd.make
index 51ffcac..7173812 100644
--- a/rules/systemd.make
+++ b/rules/systemd.make
@@ -102,7 +102,7 @@ SYSTEMD_CONF_OPT	:= \
 	--$(call ptx/endis,PTXCONF_SYSTEMD_TIMEDATE)-timedated \
 	--$(call ptx/endis,PTXCONF_SYSTEMD_TIMEDATE)-timesyncd \
 	--$(call ptx/endis,PTXCONF_SYSTEMD_LOCALES)-localed \
-	--disable-coredump \
+	--$(call ptx/endis,PTXCONF_SYSTEMD_COREDUMP)-coredump \
 	--disable-polkit \
 	--$(call ptx/endis,PTXCONF_SYSTEMD_NETWORK)-resolved \
 	--$(call ptx/endis,PTXCONF_SYSTEMD_NETWORK)-networkd \
@@ -170,6 +170,7 @@ SYSTEMD_HELPER := \
 	systemd-bootchart \
 	systemd-bus-proxyd \
 	systemd-cgroups-agent \
+	$(call ptx/ifdef, PTXCONF_SYSTEMD_COREDUMP,systemd-coredump,) \
 	systemd-fsck \
 	systemd-hostnamed \
 	systemd-initctl \
@@ -309,8 +310,9 @@ endif
 
 	@$(call install_copy, systemd, 0, 0, 0755, /var/lib/systemd)
 
-#	# systemd expects this directory to exist.
+ifdef PTXCONF_SYSTEMD_COREDUMP
 	@$(call install_copy, systemd, 0, 0, 0755, /var/lib/systemd/coredump)
+endif
 
 	@$(call install_alternative, systemd, 0, 0, 0644, /etc/profile.d/systemd.sh)
 
-- 
1.8.5.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 1/2] systemd: install_alternative_tree /lib/systemd/system/
  2014-09-30  4:18 [ptxdist] [PATCH 1/2] systemd: install_alternative_tree /lib/systemd/system/ jon
  2014-09-30  4:18 ` [ptxdist] [PATCH 2/2] systemd: PTXCONF_SYSTEMD_COREDUMP jon
@ 2014-09-30  8:12 ` Michael Olbrich
  2014-10-01 12:06   ` Jon Ringle
  1 sibling, 1 reply; 6+ messages in thread
From: Michael Olbrich @ 2014-09-30  8:12 UTC (permalink / raw)
  To: ptxdist

On Tue, Sep 30, 2014 at 12:18:43AM -0400, jon@ringle.org wrote:
> From: Jon Ringle <jringle@gridpoint.com>
> 
> This allows platform specific customizations to /lib/systemd/system/ to
> be installed on the target
> 
> Signed-off-by: Jon Ringle <jringle@gridpoint.com>
> ---
>  rules/systemd.make | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rules/systemd.make b/rules/systemd.make
> index ff3d606..51ffcac 100644
> --- a/rules/systemd.make
> +++ b/rules/systemd.make
> @@ -303,7 +303,7 @@ ifdef PTXCONF_SYSTEMD_NETWORK
>  endif
>  
>  #	# units
> -	@$(call install_tree, systemd, 0, 0, -, /lib/systemd/system/)
> +	@$(call install_alternative_tree, systemd, 0, 0, /lib/systemd/system/)

Are you sure, this is what you want? install_alternative_tree replaces the
entire tree, not individual files. You can overwrite individual files by
placing your copy in /etc/systemd/system/.

Michael

>  
>  	@$(call install_alternative, systemd, 0, 0, 0644, /etc/vconsole.conf)
>  
> -- 
> 1.8.5.4
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 2/2] systemd: PTXCONF_SYSTEMD_COREDUMP
  2014-09-30  4:18 ` [ptxdist] [PATCH 2/2] systemd: PTXCONF_SYSTEMD_COREDUMP jon
@ 2014-09-30  8:20   ` Michael Olbrich
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Olbrich @ 2014-09-30  8:20 UTC (permalink / raw)
  To: ptxdist

On Tue, Sep 30, 2014 at 12:18:44AM -0400, jon@ringle.org wrote:
> From: Jon Ringle <jringle@gridpoint.com>
> 
> Allow coredumpctl to be built and installed to debug crashing systemd
> services

Just one comment below. Looks good otherwise.

Michael

> Signed-off-by: Jon Ringle <jringle@gridpoint.com>
> ---
>  rules/systemd.in   | 6 ++++++
>  rules/systemd.make | 6 ++++--
>  2 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/rules/systemd.in b/rules/systemd.in
> index ba69d8b..b6cdc1b 100644
> --- a/rules/systemd.in
> +++ b/rules/systemd.in
> @@ -81,5 +81,11 @@ config SYSTEMD_TIMEDATE
>  	help
>  	  NTP client for time synchronization and local timezone handling.
>  
> +config SYSTEMD_COREDUMP
> +	bool
> +	prompt "enable generating coredumps"
> +	help
> +	  Enable this only if you need to debug a crashing systemd service
> +
>  endif
>  
> diff --git a/rules/systemd.make b/rules/systemd.make
> index 51ffcac..7173812 100644
> --- a/rules/systemd.make
> +++ b/rules/systemd.make
> @@ -102,7 +102,7 @@ SYSTEMD_CONF_OPT	:= \
>  	--$(call ptx/endis,PTXCONF_SYSTEMD_TIMEDATE)-timedated \
>  	--$(call ptx/endis,PTXCONF_SYSTEMD_TIMEDATE)-timesyncd \
>  	--$(call ptx/endis,PTXCONF_SYSTEMD_LOCALES)-localed \
> -	--disable-coredump \
> +	--$(call ptx/endis,PTXCONF_SYSTEMD_COREDUMP)-coredump \
>  	--disable-polkit \
>  	--$(call ptx/endis,PTXCONF_SYSTEMD_NETWORK)-resolved \
>  	--$(call ptx/endis,PTXCONF_SYSTEMD_NETWORK)-networkd \
> @@ -170,6 +170,7 @@ SYSTEMD_HELPER := \
>  	systemd-bootchart \
>  	systemd-bus-proxyd \
>  	systemd-cgroups-agent \
> +	$(call ptx/ifdef, PTXCONF_SYSTEMD_COREDUMP,systemd-coredump,) \
>  	systemd-fsck \
>  	systemd-hostnamed \
>  	systemd-initctl \
> @@ -309,8 +310,9 @@ endif
>  
>  	@$(call install_copy, systemd, 0, 0, 0755, /var/lib/systemd)
>  
> -#	# systemd expects this directory to exist.
> +ifdef PTXCONF_SYSTEMD_COREDUMP
>  	@$(call install_copy, systemd, 0, 0, 0755, /var/lib/systemd/coredump)
> +endif

Don;t do this. tmpfilesd tries to create this dir even if coredumps are
disabled.

>  
>  	@$(call install_alternative, systemd, 0, 0, 0644, /etc/profile.d/systemd.sh)
>  
> -- 
> 1.8.5.4
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 1/2] systemd: install_alternative_tree /lib/systemd/system/
  2014-09-30  8:12 ` [ptxdist] [PATCH 1/2] systemd: install_alternative_tree /lib/systemd/system/ Michael Olbrich
@ 2014-10-01 12:06   ` Jon Ringle
  2014-10-01 13:12     ` Michael Olbrich
  0 siblings, 1 reply; 6+ messages in thread
From: Jon Ringle @ 2014-10-01 12:06 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 1295 bytes --]

On Tue, Sep 30, 2014 at 4:12 AM, Michael Olbrich <m.olbrich@pengutronix.de>
wrote:

> On Tue, Sep 30, 2014 at 12:18:43AM -0400, jon@ringle.org wrote:
> > From: Jon Ringle <jringle@gridpoint.com>
> >
> > This allows platform specific customizations to /lib/systemd/system/ to
> > be installed on the target
> >
> > Signed-off-by: Jon Ringle <jringle@gridpoint.com>
> > ---
> >  rules/systemd.make | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/rules/systemd.make b/rules/systemd.make
> > index ff3d606..51ffcac 100644
> > --- a/rules/systemd.make
> > +++ b/rules/systemd.make
> > @@ -303,7 +303,7 @@ ifdef PTXCONF_SYSTEMD_NETWORK
> >  endif
> >
> >  #    # units
> > -     @$(call install_tree, systemd, 0, 0, -, /lib/systemd/system/)
> > +     @$(call install_alternative_tree, systemd, 0, 0,
> /lib/systemd/system/)
>
> Are you sure, this is what you want? install_alternative_tree replaces the
> entire tree, not individual files. You can overwrite individual files by
> placing your copy in /etc/systemd/system/.
>
>
Normally, systemd enable/disable will create/remove a symlink from
/etc/systemd/system/ to the corresponding file in /lib/systemd/system/. If
I put a real file in /etc/systemd/system/, how will systemd handle
enable/disable of a service?

Jon

[-- Attachment #1.2: Type: text/html, Size: 1939 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 1/2] systemd: install_alternative_tree /lib/systemd/system/
  2014-10-01 12:06   ` Jon Ringle
@ 2014-10-01 13:12     ` Michael Olbrich
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Olbrich @ 2014-10-01 13:12 UTC (permalink / raw)
  To: ptxdist

On Wed, Oct 01, 2014 at 08:06:42AM -0400, Jon Ringle wrote:
> On Tue, Sep 30, 2014 at 4:12 AM, Michael Olbrich <m.olbrich@pengutronix.de>
> wrote:
> 
> > On Tue, Sep 30, 2014 at 12:18:43AM -0400, jon@ringle.org wrote:
> > > From: Jon Ringle <jringle@gridpoint.com>
> > >
> > > This allows platform specific customizations to /lib/systemd/system/ to
> > > be installed on the target
> > >
> > > Signed-off-by: Jon Ringle <jringle@gridpoint.com>
> > > ---
> > >  rules/systemd.make | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/rules/systemd.make b/rules/systemd.make
> > > index ff3d606..51ffcac 100644
> > > --- a/rules/systemd.make
> > > +++ b/rules/systemd.make
> > > @@ -303,7 +303,7 @@ ifdef PTXCONF_SYSTEMD_NETWORK
> > >  endif
> > >
> > >  #    # units
> > > -     @$(call install_tree, systemd, 0, 0, -, /lib/systemd/system/)
> > > +     @$(call install_alternative_tree, systemd, 0, 0,
> > /lib/systemd/system/)
> >
> > Are you sure, this is what you want? install_alternative_tree replaces the
> > entire tree, not individual files. You can overwrite individual files by
> > placing your copy in /etc/systemd/system/.
> >
> >
> Normally, systemd enable/disable will create/remove a symlink from
> /etc/systemd/system/ to the corresponding file in /lib/systemd/system/. If
> I put a real file in /etc/systemd/system/, how will systemd handle
> enable/disable of a service?

enable/disable creates links in /etc/systemd/system/*.wants/, so that will
not clash. Only mask/unmask creates symlinks (to /dev/null) in
/etc/systemd/system/. But in my experience masking core systemd units
is rarely needed.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2014-10-01 13:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-30  4:18 [ptxdist] [PATCH 1/2] systemd: install_alternative_tree /lib/systemd/system/ jon
2014-09-30  4:18 ` [ptxdist] [PATCH 2/2] systemd: PTXCONF_SYSTEMD_COREDUMP jon
2014-09-30  8:20   ` Michael Olbrich
2014-09-30  8:12 ` [ptxdist] [PATCH 1/2] systemd: install_alternative_tree /lib/systemd/system/ Michael Olbrich
2014-10-01 12:06   ` Jon Ringle
2014-10-01 13:12     ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox