On Sat, 2011-03-05 at 11:58 +0300, Vasiliy G Tolstov wrote: > On Sat, 2011-03-05 at 11:55 +0300, Vasiliy G Tosltov wrote: > Sorry. Previous patch e-mailed inline. Copy in attched file
First patch adds git systemd socket service and allows pass options via /etc/conf.d/git-daemon.conf Second patch installs simple /etc/conf.d/git-daemon.conf -- Vasiliy G Tolstov <[email protected]> Selfip.Ru
>From cc2f52400e8c4ce4844ad9c54c7fc7cba88bedcd Mon Sep 17 00:00:00 2001 From: Vasiliy G Tosltov <[email protected]> Date: Sat, 5 Mar 2011 11:36:24 +0300 Subject: [PATCH] Add EnvironmentFile support to pass options for git-daemon. Add git inetd systemd-service --- .../dev-scm/git/files/systemd/git-daemon.service | 4 +++- .../dev-scm/git/files/systemd/git-daemon.socket | 14 ++++++++++++++ .../dev-scm/git/files/systemd/[email protected] | 16 ++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletions(-) create mode 100644 packages/dev-scm/git/files/systemd/git-daemon.socket create mode 100644 packages/dev-scm/git/files/systemd/[email protected] diff --git a/packages/dev-scm/git/files/systemd/git-daemon.service b/packages/dev-scm/git/files/systemd/git-daemon.service index b98f61e..cdc3e39 100644 --- a/packages/dev-scm/git/files/systemd/git-daemon.service +++ b/packages/dev-scm/git/files/systemd/git-daemon.service @@ -6,7 +6,9 @@ Description=git daemon After=syslog.target [Service] -ExecStart=/usr/bin/git daemon --pid-file=/var/run/git-daemon.pid --user=nobody --group=nobody --syslog /var/git +EnvironmentFile=/etc/conf.d/git-daemon.conf +PIDFile=/var/run/git-daemon.pid +ExecStart=/usr/bin/git daemon --pid-file=/var/run/git-daemon.pid --syslog --user=nobody --group=nobody $GIT_OPTS [Install] WantedBy=multi-user.target diff --git a/packages/dev-scm/git/files/systemd/git-daemon.socket b/packages/dev-scm/git/files/systemd/git-daemon.socket new file mode 100644 index 0000000..a3998d8 --- /dev/null +++ b/packages/dev-scm/git/files/systemd/git-daemon.socket @@ -0,0 +1,14 @@ +# Copyright 2010-2011 Wulf C. Krueger <[email protected]> +# Distributed under the terms of the GNU General Public License v2 + +[Unit] +Description=git daemon activation socket +Conflicts=git-daemon.service +After=syslog.target + +[Socket] +ListenStream=9418 +Accept=Yes + +[Install] +WantedBy=sockets.target diff --git a/packages/dev-scm/git/files/systemd/[email protected] b/packages/dev-scm/git/files/systemd/[email protected] new file mode 100644 index 0000000..069c186 --- /dev/null +++ b/packages/dev-scm/git/files/systemd/[email protected] @@ -0,0 +1,16 @@ +# Copyright 2010-2011 Wulf C. Krueger <[email protected]> +# Distributed under the terms of the GNU General Public License v2 + +[Unit] +Description=git daemon Per-connection server +After=syslog.target + +[Service] +User=nobody +Group=nobody +EnvironmentFile=/etc/conf.d/git-daemon.conf +PIDFile=/var/run/git-daemon.pid +ExecStart=/usr/bin/git daemon --pid-file=/var/run/git-daemon.pid --inetd $GIT_OPTS + +[Install] +WantedBy=multi-user.target -- 1.7.4.1
>From be4e98f03ff25ab56e625ee2b58db4d11215004c Mon Sep 17 00:00:00 2001 From: Vasiliy G Tosltov <[email protected]> Date: Sat, 5 Mar 2011 12:01:47 +0300 Subject: [PATCH] install systemd confd file --- packages/dev-scm/git/git.exlib | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/packages/dev-scm/git/git.exlib b/packages/dev-scm/git/git.exlib index 6cdddaa..8f27075 100644 --- a/packages/dev-scm/git/git.exlib +++ b/packages/dev-scm/git/git.exlib @@ -163,7 +163,11 @@ git_src_install() { insinto /etc/xinetd.d newins "${FILES}"/git-daemon.xinetd git-daemon fi - + if option systemd ; then + hereconfd ${PN}-daemon.conf <<EOF +GIT_OPTS="/var/git" +EOF + fi install_systemd_files keepdir /usr/share/${PN}/templates/branches -- 1.7.4.1
_______________________________________________ Exherbo-dev mailing list [email protected] http://lists.exherbo.org/mailman/listinfo/exherbo-dev
