* [meta-networking][PATCH] Samba: use only libsystemd
@ 2016-06-18 19:06 Gyorgy Szombathelyi
2016-06-20 14:08 ` Joe MacDonald
0 siblings, 1 reply; 4+ messages in thread
From: Gyorgy Szombathelyi @ 2016-06-18 19:06 UTC (permalink / raw)
To: openembedded-devel
This patch was disappeared while moved to 4.4.2
Signed-off-by: Gyorgy Szombathelyi <gyurco@freemail.hu>
---
.../samba/samba-4.4.2/10-use-only-libsystemd.patch | 81 ++++++++++++++++++++++
.../recipes-connectivity/samba/samba_4.4.2.bb | 1 +
2 files changed, 82 insertions(+)
create mode 100644 meta-networking/recipes-connectivity/samba/samba-4.4.2/10-use-only-libsystemd.patch
diff --git a/meta-networking/recipes-connectivity/samba/samba-4.4.2/10-use-only-libsystemd.patch b/meta-networking/recipes-connectivity/samba/samba-4.4.2/10-use-only-libsystemd.patch
new file mode 100644
index 0000000..81621ff
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba-4.4.2/10-use-only-libsystemd.patch
@@ -0,0 +1,81 @@
+diff -ur samba-4.4.2/lib/util/become_daemon.c samba-4.4.2/lib/util/become_daemon.c
+--- samba-4.4.2/lib/util/become_daemon.c 2016-05-08 18:33:24.000000000 +0200
++++ samba-4.4.2/lib/util/become_daemon.c 2016-05-08 18:26:50.275177918 +0200
+@@ -24,7 +24,7 @@
+ #include "includes.h"
+ #include "system/filesys.h"
+ #include "system/locale.h"
+-#if HAVE_LIBSYSTEMD_DAEMON
++#if HAVE_LIBSYSTEMD
+ #include <systemd/sd-daemon.h>
+ #endif
+ #include "lib/util/close_low_fd.h"
+@@ -69,9 +69,9 @@
+ if (do_fork) {
+ newpid = fork();
+ if (newpid) {
+-#if HAVE_LIBSYSTEMD_DAEMON
++#if HAVE_LIBSYSTEMD
+ sd_notifyf(0, "READY=0\nSTATUS=Starting process...\nMAINPID=%lu", (unsigned long) newpid);
+-#endif /* HAVE_LIBSYSTEMD_DAEMON */
++#endif /* HAVE_LIBSYSTEMD */
+ _exit(0);
+ }
+ }
+@@ -98,7 +98,7 @@
+
+ _PUBLIC_ void exit_daemon(const char *msg, int error)
+ {
+-#ifdef HAVE_LIBSYSTEMD_DAEMON
++#ifdef HAVE_LIBSYSTEMD
+ if (msg == NULL) {
+ msg = strerror(error);
+ }
+@@ -117,7 +117,7 @@
+ if (name == NULL) {
+ name = "Samba";
+ }
+-#ifdef HAVE_LIBSYSTEMD_DAEMON
++#ifdef HAVE_LIBSYSTEMD
+ sd_notifyf(0, "READY=1\nSTATUS=%s: ready to serve connections...", name);
+ #endif
+ DEBUG(0, ("STATUS=daemon '%s' finished starting up and ready to serve "
+@@ -129,7 +129,7 @@
+ if (name == NULL) {
+ name = "Samba";
+ }
+-#ifdef HAVE_LIBSYSTEMD_DAEMON
++#ifdef HAVE_LIBSYSTEMD
+ sd_notifyf(0, "\nSTATUS=%s: %s", name, msg);
+ #endif
+ DEBUG(0, ("STATUS=daemon '%s' : %s", name, msg));
+diff -ur samba-4.4.2/lib/util/debug.c samba-4.4.2/lib/util/debug.c
+--- samba-4.4.2/lib/util/debug.c 2016-05-08 18:33:24.000000000 +0200
++++ samba-4.4.2/lib/util/debug.c 2016-05-08 18:27:09.341481492 +0200
+@@ -102,7 +102,7 @@
+ .fd = 2 /* stderr by default */
+ };
+
+-#if defined(WITH_SYSLOG) || defined(HAVE_LIBSYSTEMD_JOURNAL)
++#if defined(WITH_SYSLOG) || defined(HAVE_LIBSYSTEMD)
+ static int debug_level_to_priority(int level)
+ {
+ /*
+@@ -179,7 +179,7 @@
+ }
+ #endif /* WITH_SYSLOG */
+
+-#ifdef HAVE_LIBSYSTEMD_JOURNAL
++#ifdef HAVE_LIBSYSTEMD
+ #include <systemd/sd-journal.h>
+ static void debug_systemd_log(int msg_level,
+ const char *msg, const char *msg_no_nl)
+@@ -251,7 +251,7 @@
+ },
+ #endif
+
+-#ifdef HAVE_LIBSYSTEMD_JOURNAL
++#ifdef HAVE_LIBSYSTEMD
+ {
+ .name = "systemd",
+ .log = debug_systemd_log,
diff --git a/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb b/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb
index 50c100e..b7ee730 100644
--- a/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb
+++ b/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb
@@ -13,6 +13,7 @@ ${SAMBA_MIRROR} http://www.mirrorservice.org/sites/ftp.samba.org \n \
SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
file://00-fix-typos-in-man-pages.patch \
+ file://10-use-only-libsystemd.patch \
file://16-do-not-check-xsltproc-manpages.patch \
file://20-do-not-import-target-module-while-cross-compile.patch \
file://21-add-config-option-without-valgrind.patch \
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [meta-networking][PATCH] Samba: use only libsystemd
2016-06-18 19:06 [meta-networking][PATCH] Samba: use only libsystemd Gyorgy Szombathelyi
@ 2016-06-20 14:08 ` Joe MacDonald
2016-06-20 17:49 ` Szombathelyi György
2016-07-04 19:51 ` Szombathelyi György
0 siblings, 2 replies; 4+ messages in thread
From: Joe MacDonald @ 2016-06-20 14:08 UTC (permalink / raw)
To: Gyorgy Szombathelyi; +Cc: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 4638 bytes --]
Hi Gyorgy,
[[oe] [meta-networking][PATCH] Samba: use only libsystemd] On 16.06.18 (Sat 21:06) Gyorgy Szombathelyi wrote:
> This patch was disappeared while moved to 4.4.2
I can't find this patch in the git history, but I'm happy to merge it if
you can provide a bit more detail on it. Is it always valid to assume
HAVE_LIBSYSTEMD will always mean HAVE_LIBSYSTEMD_JOURNAL and
HAVE_LIBSYSTEMD_DAEMON? Also, can you provide an upstream-status on
this?
Thanks.
-J.
>
> Signed-off-by: Gyorgy Szombathelyi <gyurco@freemail.hu>
> ---
> .../samba/samba-4.4.2/10-use-only-libsystemd.patch | 81 ++++++++++++++++++++++
> .../recipes-connectivity/samba/samba_4.4.2.bb | 1 +
> 2 files changed, 82 insertions(+)
> create mode 100644 meta-networking/recipes-connectivity/samba/samba-4.4.2/10-use-only-libsystemd.patch
>
> diff --git a/meta-networking/recipes-connectivity/samba/samba-4.4.2/10-use-only-libsystemd.patch b/meta-networking/recipes-connectivity/samba/samba-4.4.2/10-use-only-libsystemd.patch
> new file mode 100644
> index 0000000..81621ff
> --- /dev/null
> +++ b/meta-networking/recipes-connectivity/samba/samba-4.4.2/10-use-only-libsystemd.patch
> @@ -0,0 +1,81 @@
> +diff -ur samba-4.4.2/lib/util/become_daemon.c samba-4.4.2/lib/util/become_daemon.c
> +--- samba-4.4.2/lib/util/become_daemon.c 2016-05-08 18:33:24.000000000 +0200
> ++++ samba-4.4.2/lib/util/become_daemon.c 2016-05-08 18:26:50.275177918 +0200
> +@@ -24,7 +24,7 @@
> + #include "includes.h"
> + #include "system/filesys.h"
> + #include "system/locale.h"
> +-#if HAVE_LIBSYSTEMD_DAEMON
> ++#if HAVE_LIBSYSTEMD
> + #include <systemd/sd-daemon.h>
> + #endif
> + #include "lib/util/close_low_fd.h"
> +@@ -69,9 +69,9 @@
> + if (do_fork) {
> + newpid = fork();
> + if (newpid) {
> +-#if HAVE_LIBSYSTEMD_DAEMON
> ++#if HAVE_LIBSYSTEMD
> + sd_notifyf(0, "READY=0\nSTATUS=Starting process...\nMAINPID=%lu", (unsigned long) newpid);
> +-#endif /* HAVE_LIBSYSTEMD_DAEMON */
> ++#endif /* HAVE_LIBSYSTEMD */
> + _exit(0);
> + }
> + }
> +@@ -98,7 +98,7 @@
> +
> + _PUBLIC_ void exit_daemon(const char *msg, int error)
> + {
> +-#ifdef HAVE_LIBSYSTEMD_DAEMON
> ++#ifdef HAVE_LIBSYSTEMD
> + if (msg == NULL) {
> + msg = strerror(error);
> + }
> +@@ -117,7 +117,7 @@
> + if (name == NULL) {
> + name = "Samba";
> + }
> +-#ifdef HAVE_LIBSYSTEMD_DAEMON
> ++#ifdef HAVE_LIBSYSTEMD
> + sd_notifyf(0, "READY=1\nSTATUS=%s: ready to serve connections...", name);
> + #endif
> + DEBUG(0, ("STATUS=daemon '%s' finished starting up and ready to serve "
> +@@ -129,7 +129,7 @@
> + if (name == NULL) {
> + name = "Samba";
> + }
> +-#ifdef HAVE_LIBSYSTEMD_DAEMON
> ++#ifdef HAVE_LIBSYSTEMD
> + sd_notifyf(0, "\nSTATUS=%s: %s", name, msg);
> + #endif
> + DEBUG(0, ("STATUS=daemon '%s' : %s", name, msg));
> +diff -ur samba-4.4.2/lib/util/debug.c samba-4.4.2/lib/util/debug.c
> +--- samba-4.4.2/lib/util/debug.c 2016-05-08 18:33:24.000000000 +0200
> ++++ samba-4.4.2/lib/util/debug.c 2016-05-08 18:27:09.341481492 +0200
> +@@ -102,7 +102,7 @@
> + .fd = 2 /* stderr by default */
> + };
> +
> +-#if defined(WITH_SYSLOG) || defined(HAVE_LIBSYSTEMD_JOURNAL)
> ++#if defined(WITH_SYSLOG) || defined(HAVE_LIBSYSTEMD)
> + static int debug_level_to_priority(int level)
> + {
> + /*
> +@@ -179,7 +179,7 @@
> + }
> + #endif /* WITH_SYSLOG */
> +
> +-#ifdef HAVE_LIBSYSTEMD_JOURNAL
> ++#ifdef HAVE_LIBSYSTEMD
> + #include <systemd/sd-journal.h>
> + static void debug_systemd_log(int msg_level,
> + const char *msg, const char *msg_no_nl)
> +@@ -251,7 +251,7 @@
> + },
> + #endif
> +
> +-#ifdef HAVE_LIBSYSTEMD_JOURNAL
> ++#ifdef HAVE_LIBSYSTEMD
> + {
> + .name = "systemd",
> + .log = debug_systemd_log,
> diff --git a/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb b/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb
> index 50c100e..b7ee730 100644
> --- a/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb
> +++ b/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb
> @@ -13,6 +13,7 @@ ${SAMBA_MIRROR} http://www.mirrorservice.org/sites/ftp.samba.org \n \
>
> SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
> file://00-fix-typos-in-man-pages.patch \
> + file://10-use-only-libsystemd.patch \
> file://16-do-not-check-xsltproc-manpages.patch \
> file://20-do-not-import-target-module-while-cross-compile.patch \
> file://21-add-config-option-without-valgrind.patch \
> --
> 2.7.4
>
--
-Joe MacDonald.
:wq
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 484 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [meta-networking][PATCH] Samba: use only libsystemd
2016-06-20 14:08 ` Joe MacDonald
@ 2016-06-20 17:49 ` Szombathelyi György
2016-07-04 19:51 ` Szombathelyi György
1 sibling, 0 replies; 4+ messages in thread
From: Szombathelyi György @ 2016-06-20 17:49 UTC (permalink / raw)
To: Joe MacDonald; +Cc: openembedded-devel
On Monday, June 20, 2016 10:08:45 AM CEST Joe MacDonald wrote:
> Hi Gyorgy,
>
> [[oe] [meta-networking][PATCH] Samba: use only libsystemd] On 16.06.18 (Sat
21:06) Gyorgy Szombathelyi wrote:
> > This patch was disappeared while moved to 4.4.2
>
> I can't find this patch in the git history, but I'm happy to merge it if
> you can provide a bit more detail on it. Is it always valid to assume
> HAVE_LIBSYSTEMD will always mean HAVE_LIBSYSTEMD_JOURNAL and
> HAVE_LIBSYSTEMD_DAEMON? Also, can you provide an upstream-status on
> this?
Hi Joe,
I did not do a deep research, but without the patch, the systemd notify code
doesn't work, so a systemctl start smb will never succeed.
Seems some (older?) systemd installations had libsystemd-journal.so and
libsystemd-daemon.so, but now only libsystemd.so exists.
Br,
György
>
> Thanks.
> -J.
>
> > Signed-off-by: Gyorgy Szombathelyi <gyurco@freemail.hu>
> > ---
> >
> > .../samba/samba-4.4.2/10-use-only-libsystemd.patch | 81
> > ++++++++++++++++++++++ .../recipes-connectivity/samba/samba_4.4.2.bb
> > | 1 +
> > 2 files changed, 82 insertions(+)
> > create mode 100644
> > meta-networking/recipes-connectivity/samba/samba-4.4.2/10-use-only-libsy
> > stemd.patch>
> > diff --git
> > a/meta-networking/recipes-connectivity/samba/samba-4.4.2/10-use-only-libs
> > ystemd.patch
> > b/meta-networking/recipes-connectivity/samba/samba-4.4.2/10-use-only-libs
> > ystemd.patch new file mode 100644
> > index 0000000..81621ff
> > --- /dev/null
> > +++
> > b/meta-networking/recipes-connectivity/samba/samba-4.4.2/10-use-only-libs
> > ystemd.patch @@ -0,0 +1,81 @@
> > +diff -ur samba-4.4.2/lib/util/become_daemon.c
> > samba-4.4.2/lib/util/become_daemon.c +---
> > samba-4.4.2/lib/util/become_daemon.c 2016-05-08 18:33:24.000000000 +0200
> > ++++ samba-4.4.2/lib/util/become_daemon.c 2016-05-08 18:26:50.275177918
> > +0200 +@@ -24,7 +24,7 @@
> > + #include "includes.h"
> > + #include "system/filesys.h"
> > + #include "system/locale.h"
> > +-#if HAVE_LIBSYSTEMD_DAEMON
> > ++#if HAVE_LIBSYSTEMD
> > + #include <systemd/sd-daemon.h>
> > + #endif
> > + #include "lib/util/close_low_fd.h"
> > +@@ -69,9 +69,9 @@
> > + if (do_fork) {
> > + newpid = fork();
> > + if (newpid) {
> > +-#if HAVE_LIBSYSTEMD_DAEMON
> > ++#if HAVE_LIBSYSTEMD
> > + sd_notifyf(0, "READY=0\nSTATUS=Starting process...\nMAINPID=
%lu",
> > (unsigned long) newpid); +-#endif /* HAVE_LIBSYSTEMD_DAEMON */
> > ++#endif /* HAVE_LIBSYSTEMD */
> > + _exit(0);
> > + }
> > + }
> > +@@ -98,7 +98,7 @@
> > +
> > + _PUBLIC_ void exit_daemon(const char *msg, int error)
> > + {
> > +-#ifdef HAVE_LIBSYSTEMD_DAEMON
> > ++#ifdef HAVE_LIBSYSTEMD
> > + if (msg == NULL) {
> > + msg = strerror(error);
> > + }
> > +@@ -117,7 +117,7 @@
> > + if (name == NULL) {
> > + name = "Samba";
> > + }
> > +-#ifdef HAVE_LIBSYSTEMD_DAEMON
> > ++#ifdef HAVE_LIBSYSTEMD
> > + sd_notifyf(0, "READY=1\nSTATUS=%s: ready to serve connections...",
> > name); + #endif
> > + DEBUG(0, ("STATUS=daemon '%s' finished starting up and ready to serve
"
> > +@@ -129,7 +129,7 @@
> > + if (name == NULL) {
> > + name = "Samba";
> > + }
> > +-#ifdef HAVE_LIBSYSTEMD_DAEMON
> > ++#ifdef HAVE_LIBSYSTEMD
> > + sd_notifyf(0, "\nSTATUS=%s: %s", name, msg);
> > + #endif
> > + DEBUG(0, ("STATUS=daemon '%s' : %s", name, msg));
> > +diff -ur samba-4.4.2/lib/util/debug.c samba-4.4.2/lib/util/debug.c
> > +--- samba-4.4.2/lib/util/debug.c 2016-05-08 18:33:24.000000000 +0200
> > ++++ samba-4.4.2/lib/util/debug.c 2016-05-08 18:27:09.341481492 +0200
> > +@@ -102,7 +102,7 @@
> > + .fd = 2 /* stderr by default */
> > + };
> > +
> > +-#if defined(WITH_SYSLOG) || defined(HAVE_LIBSYSTEMD_JOURNAL)
> > ++#if defined(WITH_SYSLOG) || defined(HAVE_LIBSYSTEMD)
> > + static int debug_level_to_priority(int level)
> > + {
> > + /*
> > +@@ -179,7 +179,7 @@
> > + }
> > + #endif /* WITH_SYSLOG */
> > +
> > +-#ifdef HAVE_LIBSYSTEMD_JOURNAL
> > ++#ifdef HAVE_LIBSYSTEMD
> > + #include <systemd/sd-journal.h>
> > + static void debug_systemd_log(int msg_level,
> > + const char *msg, const char *msg_no_nl)
> > +@@ -251,7 +251,7 @@
> > + },
> > + #endif
> > +
> > +-#ifdef HAVE_LIBSYSTEMD_JOURNAL
> > ++#ifdef HAVE_LIBSYSTEMD
> > + {
> > + .name = "systemd",
> > + .log = debug_systemd_log,
> > diff --git a/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb
> > b/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb index
> > 50c100e..b7ee730 100644
> > --- a/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb
> > +++ b/meta-networking/recipes-connectivity/samba/samba_4.4.2.bb
> > @@ -13,6 +13,7 @@ ${SAMBA_MIRROR}
> > http://www.mirrorservice.org/sites/ftp.samba.org \n \>
> > SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
> >
> > file://00-fix-typos-in-man-pages.patch \
> >
> > + file://10-use-only-libsystemd.patch \
> >
> > file://16-do-not-check-xsltproc-manpages.patch \
> > file://20-do-not-import-target-module-while-cross-compile.patc
> > h \
> > file://21-add-config-option-without-valgrind.patch \
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [meta-networking][PATCH] Samba: use only libsystemd
2016-06-20 14:08 ` Joe MacDonald
2016-06-20 17:49 ` Szombathelyi György
@ 2016-07-04 19:51 ` Szombathelyi György
1 sibling, 0 replies; 4+ messages in thread
From: Szombathelyi György @ 2016-07-04 19:51 UTC (permalink / raw)
To: Joe MacDonald; +Cc: openembedded-devel
On Monday, June 20, 2016 10:08:45 AM CEST Joe MacDonald wrote:
> Hi Gyorgy,
>
Hi Joe,
> [[oe] [meta-networking][PATCH] Samba: use only libsystemd] On 16.06.18 (Sat
21:06) Gyorgy Szombathelyi wrote:
> > This patch was disappeared while moved to 4.4.2
>
> I can't find this patch in the git history, but I'm happy to merge it if
> you can provide a bit more detail on it. Is it always valid to assume
> HAVE_LIBSYSTEMD will always mean HAVE_LIBSYSTEMD_JOURNAL and
> HAVE_LIBSYSTEMD_DAEMON? Also, can you provide an upstream-status on
> this?
I found out the real history: since systemd-209, there's only one library
built, called libsystemd.so.
https://lists.freedesktop.org/archives/systemd-devel/2014-February/017146.html
* The APIs "sd-journal.h", "sd-login.h", "sd-id128.h" are no
longer found in individual libraries libsystemd-journal.so,
libsystemd-login.so, libsystemd-id128.so. Instead, we have
merged them into a single library, libsystemd.so, which
provides all symbols.
Seems others are noticed it, too :)
http://firstyear.id.au/blog/html/2016/05/23/systemd_is_not_monolithic.html
> Thanks.
> -J.
Br,
György
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-04 19:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-18 19:06 [meta-networking][PATCH] Samba: use only libsystemd Gyorgy Szombathelyi
2016-06-20 14:08 ` Joe MacDonald
2016-06-20 17:49 ` Szombathelyi György
2016-07-04 19:51 ` Szombathelyi György
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.