Re: [systemd-devel] Disabling tomcat8

2017-12-19 Thread Reindl Harald



Am 19.12.2017 um 20:05 schrieb Lennart Poettering:

On Mo, 18.12.17 19:40, Cecil Westerhof (cldwester...@gmail.com) wrote:


There is a system with tomcat8 installed and enabled. At the moment it is
not used, so I thought it better to disable it.

When I enter:
 systemctl disable tomcat8.service

I get:
 tomcat8.service is not a native service, redirecting to
systemd-sysv-install.
 Executing: /lib/systemd/systemd-sysv-install disable tomcat8


This means the service in question is not a native systemd service,
but a legacy SysV service, that is only hooked in with distro-specific
shell glue. If that doesn't work it's not an upstream issue, you need
to contact your downstream distribution for help, as they put together
the shell script glue


in 2017 it shpuld be a native systemd-unit but from where comes the 
"vendor preset: enabled" in case of a generated unit?


Loaded: loaded (/etc/init.d/tomcat8; generated; vendor preset: enabled)

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Disabling tomcat8

2017-12-19 Thread Lennart Poettering
On Mo, 18.12.17 19:40, Cecil Westerhof (cldwester...@gmail.com) wrote:

> There is a system with tomcat8 installed and enabled. At the moment it is
> not used, so I thought it better to disable it.
> 
> When I enter:
> systemctl disable tomcat8.service
> 
> I get:
> tomcat8.service is not a native service, redirecting to
> systemd-sysv-install.
> Executing: /lib/systemd/systemd-sysv-install disable tomcat8

This means the service in question is not a native systemd service,
but a legacy SysV service, that is only hooked in with distro-specific
shell glue. If that doesn't work it's not an upstream issue, you need
to contact your downstream distribution for help, as they put together
the shell script glue.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Default reply to the mailing-list instead of sender

2017-12-19 Thread Reindl Harald



Am 19.12.2017 um 12:43 schrieb Michael Chapman:

On Tue, 19 Dec 2017, Cecil Westerhof wrote:
With most mailing-lists when replying with GMail a reply is default 
send to

the mailing-list, but with this mailing-list it is default send to the
sender. Would it be possible to change this?


Just use the "Reply all" functionality of your email client. I would be 
surprised if Gmail couldn't do this.


Recipients can elect to deduplicate the mail either on their local mail 
system or on the list server itself (by setting the "Avoid duplicate 
copies of messages?" option in their list preferences)


NO DAMNED
remove the personal copy target after press reply all

to fflist-copy typically is faster and then the later arriving is the 
killed duplicate - congratultions, the offlist copy has no list headers, 
no reply-list support in the client because of that and threading get 
completly messed up


but hey, why should anybody use a 25 years old technology like email 
proper when we have facebook and whatsapp

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Default reply to the mailing-list instead of sender

2017-12-19 Thread Reindl Harald



Am 19.12.2017 um 12:41 schrieb Lennart Poettering:

On Di, 19.12.17 10:30, Cecil Westerhof (cldwester...@gmail.com) wrote:


With most mailing-lists when replying with GMail a reply is default send to
the mailing-list, but with this mailing-list it is default send to the
sender. Would it be possible to change this?


Well, there's this:

http://www.unicom.com/pw/reply-to-harmful.html

I am not sure which side to take on this, I figure we currently just
use whatever is the default on fdo mailing lists...


it's all fine with the list

gmail as well Lennarts mail client seem to be crap otherwise you 
wouldn't use reply-all or reply to the sender because there is a header 
"List-Post: " and so there 
hould be a reply-list button or better the default behavior until click 
on "reply all" send the answer back to that adress

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] SD-Bus: Possible bug / lack of documentation causing memory leak (at exit?)

2017-12-19 Thread Pauli Sundberg
Hi!

I stumbled upon a memory leak with attached silly test program (attached
below), and while doing some testing i found out that i need to call the
'sd_bus_process' after
'sd_bus_release_name' to avoid memory leak

The leak shows up with valgrind, and looks like
==18842== 3,402 (1,800 direct, 1,602 indirect) bytes in 1 blocks are
definitely lost in loss record 11 of 12
==18842==at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_
memcheck-amd64-linux.so)
==18842==by 0x4E8AC2F: sd_bus_new (sd-bus.c:177)
==18842==by 0x4E8E5C1: sd_bus_open_user (sd-bus.c:1138)
==18842==by 0x108D47: Component::dbus_open() (in /XXX/sdtest)
==18842==by 0x108BCC: main (in /XXX/sdtest)


On the appendix there is the 'FIXME' marker with line that makes the memory
leak go away.

Is this lack of documentation or a bug? I found the issue with stock ubuntu
17.04 version -  234-2ubuntu12.1 -- and recompiled current git head
82a18dcfb23fe5f259a2eb555fb90e3a3475f12d and the issue seems to be in both
versions.

I was about to do man-page pull request, but started to hesitate, since the
code in the release looks like such that it would handle some messaging.


Cheers,
Pauli




=== Appendix A: test program ===

#include 
#include 
#include 
#include 

class Component
{
public:
Component(  const char* name ) : dbus( NULL )
{
   this->name = name;
}


~Component()
{
  if ( this->dbus )
  {
 printf("Destructor called!\n");
 assert( sd_bus_release_name( dbus, this->name ) >= 0 );

 loop(); // FIXME: Commenting this makes it leak memory
 sd_bus_flush(dbus);
 sd_bus_unref(dbus);
  }
}


  bool loop()
  {
  for ( ;; )
  {
 int ret =   sd_bus_process( dbus, NULL);
 assert ( ret >= 0 );

 if ( ret > 0 )
 continue;

 break;
  }
  return true;
  }

  bool dbus_open()
  {
  int r;
  r = sd_bus_open_user();
  if (r < 0)
  {
 printf( "Failed to connect to system bus: %s\n", strerror(-r) );
 return false;
  }


  // Take a well-known service name so that clients can find us
  r = sd_bus_request_name(dbus, this->name , 0);
  if (r < 0)
  {
printf("Failed to acquire service name: %s\n", strerror(-r));
return false;
  }

  return true;
  }

private:
sd_bus* dbus;
const char* name;
};


int main()
{
Component com{ "com.example.foobar" };
printf("Hello there!\n");
com.dbus_open();
com.loop();
printf("Bye then!\n");
}
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Default reply to the mailing-list instead of sender

2017-12-19 Thread Lennart Poettering
On Di, 19.12.17 22:43, Michael Chapman (m...@very.puzzling.org) wrote:

> It's not mentioned there, but one thing I find nice about lists implementing
> this policy is that in many cases it allows me to post to the list, and get
> replies, without needing to be subscribed. This is handy for those times
> when you only have a one-off question.

Well, to reduce spam a bit we do not allow non-members to post to this ML.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Environment File Question

2017-12-19 Thread Lennart Poettering
On Mo, 18.12.17 23:22, Boyce, Kevin P [US] (AS) (kevin.bo...@ngc.com) wrote:

> Good Day List,
> 
> This may be a noob question but I'm trying to understand how systemd works 
> with environment variables for system services in one place.  Reading various 
> sites and systemd documentation only seems to be confusing me at this point.
> 
> When I set in /etc/systemd/system.conf
> DefaultEnvironment="VAR1=Test" 'VAR2=TEST 2', my service reads the
> variables correctly, but why are these not inherited by the user
> when they login?  Isn't systemd the parent of all processes and
> shouldn't that environment I specify be preserved?

This depends on how the program the puts together the login
environment does it, i.e. sshd, login, gdm, whatever it is. More often
than not they tend to clean up the environment block fully. 

> Further, what if I need expansion of these variables like
> DefaultEnvironment="VAR1=$(readlink -f /path/to/symlink)" to work
> also which complicates things.  /etc/environment does not do this.

You could use "systemctl set-environment" to set env vars to be
inherited by system services programmatically. But of course, be
careful to not introduce races.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Default reply to the mailing-list instead of sender

2017-12-19 Thread Lennart Poettering
On Di, 19.12.17 10:30, Cecil Westerhof (cldwester...@gmail.com) wrote:

> With most mailing-lists when replying with GMail a reply is default send to
> the mailing-list, but with this mailing-list it is default send to the
> sender. Would it be possible to change this?

Well, there's this:

http://www.unicom.com/pw/reply-to-harmful.html

I am not sure which side to take on this, I figure we currently just
use whatever is the default on fdo mailing lists...

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Default reply to the mailing-list instead of sender

2017-12-19 Thread Michael Chapman

On Tue, 19 Dec 2017, Cecil Westerhof wrote:

With most mailing-lists when replying with GMail a reply is default send to
the mailing-list, but with this mailing-list it is default send to the
sender. Would it be possible to change this?


Just use the "Reply all" functionality of your email client. I would be 
surprised if Gmail couldn't do this.


Recipients can elect to deduplicate the mail either on their local mail 
system or on the list server itself (by setting the "Avoid duplicate 
copies of messages?" option in their list preferences).


Mailman-based lists default to keeping the sender's From and Reply-to 
headers intact. Some of the reasons are described at:


  http://www.unicom.com/pw/reply-to-harmful.html

It's not mentioned there, but one thing I find nice about lists 
implementing this policy is that in many cases it allows me to post to the 
list, and get replies, without needing to be subscribed. This is handy for 
those times when you only have a one-off question.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Disabling tomcat8

2017-12-19 Thread Cecil Westerhof
2017-12-19 2:58 GMT+01:00 Reindl Harald :

>
>
> Am 19.12.2017 um 02:23 schrieb Cecil Westerhof:
>
>> 2017-12-19 1:36 GMT+01:00 Reindl Harald  h.rei...@thelounge.net>>:
>>
>>
>>
>> Am 18.12.2017 um 19:40 schrieb Cecil Westerhof:
>>
>>   tomcat8.service is not a native service, redirecting to
>> systemd-sysv-install.
>>   Executing: /lib/systemd/systemd-sysv-install disable
>> tomcat8
>>
>> Other services I can enable and disable. I can stop (and start)
>> tomcat 8, but then I always have to stop tomcat8 after a reboot.
>>
>> What could be the problem?
>>
>>
>> your distribution / package
>>
>> as you can see it's not a systemd unit at all
>> /etc/init.d/tomcat8
>>
>> use "systemctl mask" instead "sytecmtl disable" if you *really* want
>> to disable stuff and ensue it never ever can be enabled again
>>
>>
>> ​That works. Not important at the moment, but is there a way to install
>> it correctly?​
>>
>
> just don't use legacy sysv-init scripts, no idea how much old cruft magic
> the tomcat ones contains which may be hard to port or not
>

​
​I found and used (with a few modifications):
http://unquietwiki.blogspot.nl/2015/05/the-simplest-way-
to-get-tomcat-as.html

That did not work.

I now found:
https://technet.sector19.net/linux/create-systemd-service-for-tomcat/

When I have a bit more time I am going to try that one.​
​


-- 
Cecil Westerhof
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Default reply to the mailing-list instead of sender

2017-12-19 Thread Cecil Westerhof
With most mailing-lists when replying with GMail a reply is default send to
the mailing-list, but with this mailing-list it is default send to the
sender. Would it be possible to change this?

-- 
Cecil Westerhof
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel