[gentoo-commits] proj/gentoo-systemd-integration:master commit in: /

2020-12-14 Thread Mike Gilbert
commit: d54029ae3e1dee5421166395ce83a31d05f1661f
Author: Mike Gilbert  gentoo  org>
AuthorDate: Mon Dec 14 23:00:28 2020 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Mon Dec 14 23:02:00 2020 +
URL:
https://gitweb.gentoo.org/proj/gentoo-systemd-integration.git/commit/?id=d54029ae

Bump to v9

Signed-off-by: Mike Gilbert  gentoo.org>

 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 3d0fa37..19de4ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.60])
-AC_INIT([gentoo-systemd-integration], [8])
+AC_INIT([gentoo-systemd-integration], [9])
 AC_CONFIG_AUX_DIR([build-aux])
 AM_INIT_AUTOMAKE([1.6 foreign dist-bzip2 subdir-objects])
 



[gentoo-commits] proj/gentoo-systemd-integration:master commit in: /, tmpfiles.d/

2020-05-10 Thread Mike Gilbert
commit: 042e5b8d0e84bfa2ba592a04a1dc9d529a206b7b
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sun May 10 16:03:05 2020 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sun May 10 16:03:05 2020 +
URL:
https://gitweb.gentoo.org/proj/gentoo-systemd-integration.git/commit/?id=042e5b8d

Drop /run/lock tmpfiles snippet

We now enable sysv compat in >=sys-apps/systemd-245-r5.

Signed-off-by: Mike Gilbert  gentoo.org>

 Makefile.am| 2 --
 tmpfiles.d/gentoo-run.conf | 5 -
 2 files changed, 7 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 0d4c179..bb003c7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,8 +6,6 @@ DISTCHECK_CONFIGURE_FLAGS = \
 
 dist_sysctl_DATA = \
sysctl.d/60-gentoo.conf
-dist_tmpfiles_DATA = \
-   tmpfiles.d/gentoo-run.conf
 dist_systemdsystempreset_DATA = \
system-preset/99-default.preset
 dist_systemdsystemgenerator_SCRIPTS = \

diff --git a/tmpfiles.d/gentoo-run.conf b/tmpfiles.d/gentoo-run.conf
deleted file mode 100644
index bede9fa..000
--- a/tmpfiles.d/gentoo-run.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-# New OpenRC versions replace /var/lock with a symlink to /run/lock.
-# We just create that directory for now, just in case.
-# Of course, it's not guaranteed that'll satisfy all relevant packages.
-
-d /run/lock 0775 root uucp -



[gentoo-commits] proj/gentoo-systemd-integration:master commit in: /

2019-12-06 Thread Michał Górny
commit: bb19458eb84c23d98942f794ebbabdd97aa4db77
Author: Michał Górny  gentoo  org>
AuthorDate: Fri Dec  6 19:29:09 2019 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Dec  6 19:29:09 2019 +
URL:
https://gitweb.gentoo.org/proj/gentoo-systemd-integration.git/commit/?id=bb19458e

Bump to v8

Signed-off-by: Michał Górny  gentoo.org>

 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 0ba17a3..3d0fa37 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.60])
-AC_INIT([gentoo-systemd-integration], [7])
+AC_INIT([gentoo-systemd-integration], [8])
 AC_CONFIG_AUX_DIR([build-aux])
 AM_INIT_AUTOMAKE([1.6 foreign dist-bzip2 subdir-objects])
 



[gentoo-commits] proj/gentoo-systemd-integration:master commit in: /, system-environment-generators/

2019-12-06 Thread Michał Górny
commit: 96e0294f0892d355cf6f632b9848c06a2cd2578d
Author: Michał Górny  gentoo  org>
AuthorDate: Fri Dec  6 19:21:53 2019 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Dec  6 19:21:53 2019 +
URL:
https://gitweb.gentoo.org/proj/gentoo-systemd-integration.git/commit/?id=96e0294f

Add env gen to inject full Gentoo PATH to services

Bug: https://bugs.gentoo.org/651904
Signed-off-by: Michał Górny  gentoo.org>

 Makefile.am  | 5 +
 system-environment-generators/10-gentoo-path | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 4482c77..0d4c179 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,6 +13,11 @@ dist_systemdsystempreset_DATA = \
 dist_systemdsystemgenerator_SCRIPTS = \
system-generators/gentoo-local-generator
 
+# note: this needs to go into /usr, not /
+systemdsystemenvironmentgeneratordir = 
$(prefix)/lib/systemd/system-environment-generators
+dist_systemdsystemenvironmentgenerator_SCRIPTS = \
+   system-environment-generators/10-gentoo-path
+
 udevrulesdir = $(udevdir)/rules.d
 dist_udevrules_DATA = udev/40-gentoo.rules
 

diff --git a/system-environment-generators/10-gentoo-path 
b/system-environment-generators/10-gentoo-path
new file mode 100644
index 000..4976fb4
--- /dev/null
+++ b/system-environment-generators/10-gentoo-path
@@ -0,0 +1,3 @@
+#!/bin/sh
+. /etc/profile.env
+echo "PATH=${PATH}"



[gentoo-commits] proj/gentoo-systemd-integration:master commit in: m4/

2019-11-03 Thread Michał Górny
commit: 6db2c6295b31185a0ab5e5a41bea1a67be5b27bb
Author: Michał Górny  gentoo  org>
AuthorDate: Sun Nov  3 15:49:53 2019 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sun Nov  3 15:50:04 2019 +
URL:
https://gitweb.gentoo.org/proj/gentoo-systemd-integration.git/commit/?id=6db2c629

Inline systemd.m4

Signed-off-by: Michał Górny  gentoo.org>

 m4/.keep  |   0
 m4/systemd.m4 | 478 ++
 2 files changed, 478 insertions(+)

diff --git a/m4/.keep b/m4/.keep
deleted file mode 100644
index e69de29..000

diff --git a/m4/systemd.m4 b/m4/systemd.m4
new file mode 100644
index 000..ee7ebdf
--- /dev/null
+++ b/m4/systemd.m4
@@ -0,0 +1,478 @@
+# Copyright (c) 2011-2013, Michał Górny
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 
+# 1. Redistributions of source code must retain the above copyright notice,
+#this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+# 
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+
+# SYSTEMD_DIRECTORY_AC(directory-variable, directory-description)
+# ---
+#
+# A generic macro that obtains one of the systemd directories defined
+# in systemd.pc. It adds --with-$1 configure option and tries to
+# obtain the default from pkg-config.
+#
+# If any location was found or given, the name given as $1 will be
+# substituted with it. Otherwise, $with_[$1] will be set to 'no'.
+
+AC_DEFUN([SYSTEMD_DIRECTORY_AC], [
+   AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+
+   AC_ARG_WITH([$1],
+   AS_HELP_STRING([--with-$1=DIR],
+   [Directory for $2 (default: auto-detect through 
pkg-config)]))
+
+   AC_MSG_CHECKING([$2 directory])
+
+   AS_IF([test x"$with_$1" = x"yes" -o x"$with_$1" = x""], [
+   ac_systemd_pkgconfig_dir=`$PKG_CONFIG --variable=$1 systemd`
+
+   AS_IF([test x"$ac_systemd_pkgconfig_dir" = x""], [
+   AS_IF([test x"$with_$1" = x"yes"], [
+   AC_MSG_ERROR([systemd support requested but 
pkg-config unable to query systemd package])
+   ])
+   with_$1=no
+   ], [
+   with_$1=$ac_systemd_pkgconfig_dir
+   ])
+   ])
+
+   AC_MSG_RESULT([$with_$1])
+
+   AS_IF([test x"$with_$1" != x"no"], [
+   AC_SUBST([$1], [$with_$1])
+   ])
+])
+
+# SYSTEMD_DIRECTORY_AM(directory-variable)
+# ---
+#
+# Defines WITH_$1 automake macro if directory was set through
+# --with-$1 or obtained from pkg-config.
+
+AC_DEFUN([SYSTEMD_DIRECTORY_AM], [
+   m4_pushdef([AM_MACRO], WITH_[]m4_toupper([$1]))
+   AM_CONDITIONAL(AM_MACRO,
+   [test x"$with_$1" != x"no"])
+   m4_popdef([AM_MACRO])
+])
+
+# SYSTEMD_SYSTEMUNITDIR_AC
+# 
+#
+# A macro grabbing all information necessary to install systemd system
+# units. It adds --with-systemdsystemunitdir (with defaults from
+# pkg-config) and either gets the correct location for systemd system
+# units or the request not to install them.
+#
+# If installing system units was requested, systemdsystemunitdir will be
+# substituted with a correct location; otherwise,
+# $with_systemdsystemunitdir will be set to 'no'.
+#
+# This macro is intended for use only in specific projects not using
+# automake. Projects using automake should use the non-AC variant
+# instead.
+
+AC_DEFUN([SYSTEMD_SYSTEMUNITDIR_AC], [
+   SYSTEMD_DIRECTORY_AC([systemdsystemunitdir], [systemd system unit])
+])
+
+# SYSTEMD_SYSTEMUNITDIR
+# -
+#
+# An extended version of SYSTEMD_SYSTEMUNITDIR_AC with automake support.
+#
+# In addition to substituting systemdsystemunitdir, it creates
+# an automake conditional called 

[gentoo-commits] proj/gentoo-systemd-integration:master commit in: /

2017-04-28 Thread Mike Gilbert
commit: c2a21ba547d46413d23929f66f80deee4639f859
Author: Mike Gilbert  gentoo  org>
AuthorDate: Fri Apr 28 21:59:20 2017 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Fri Apr 28 21:59:20 2017 +
URL:
https://gitweb.gentoo.org/proj/gentoo-systemd-integration.git/commit/?id=c2a21ba5

Version 7

 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 366af30..0ba17a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.60])
-AC_INIT([gentoo-systemd-integration], [6])
+AC_INIT([gentoo-systemd-integration], [7])
 AC_CONFIG_AUX_DIR([build-aux])
 AM_INIT_AUTOMAKE([1.6 foreign dist-bzip2 subdir-objects])
 



[gentoo-commits] proj/gentoo-systemd-integration:master commit in: tmpfiles.d/

2017-04-28 Thread Mike Gilbert
commit: 0f7a75329c65ec87a7f03c67e421bbab32ca5e6c
Author: Mike Gilbert  gentoo  org>
AuthorDate: Fri Apr 28 21:58:33 2017 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Fri Apr 28 21:58:33 2017 +
URL:
https://gitweb.gentoo.org/proj/gentoo-systemd-integration.git/commit/?id=0f7a7532

Update mode/group on /run/lock to match OpenRC

 tmpfiles.d/gentoo-run.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tmpfiles.d/gentoo-run.conf b/tmpfiles.d/gentoo-run.conf
index 5b3bcab..bede9fa 100644
--- a/tmpfiles.d/gentoo-run.conf
+++ b/tmpfiles.d/gentoo-run.conf
@@ -2,4 +2,4 @@
 # We just create that directory for now, just in case.
 # Of course, it's not guaranteed that'll satisfy all relevant packages.
 
-d /run/lock 0755 root root -
+d /run/lock 0775 root uucp -



[gentoo-commits] proj/gentoo-systemd-integration:master commit in: mounts/, /

2016-04-09 Thread Mike Gilbert
commit: 97e3616a927367df8a3d96379f06b73aac39fbae
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sat Apr  9 22:31:16 2016 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sat Apr  9 22:31:59 2016 +
URL:
https://gitweb.gentoo.org/proj/gentoo-systemd-integration.git/commit/?id=97e3616a

Drop var-lock.mount and var-run.mount

 Makefile.am   | 11 ---
 configure.ac  |  5 -
 mounts/var-lock.mount | 19 ---
 mounts/var-run.mount  | 19 ---
 4 files changed, 54 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index c0bbe5e..4482c77 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,9 +8,6 @@ dist_sysctl_DATA = \
sysctl.d/60-gentoo.conf
 dist_tmpfiles_DATA = \
tmpfiles.d/gentoo-run.conf
-dist_systemdsystemunit_DATA = \
-   mounts/var-lock.mount \
-   mounts/var-run.mount
 dist_systemdsystempreset_DATA = \
system-preset/99-default.preset
 dist_systemdsystemgenerator_SCRIPTS = \
@@ -19,14 +16,6 @@ dist_systemdsystemgenerator_SCRIPTS = \
 udevrulesdir = $(udevdir)/rules.d
 dist_udevrules_DATA = udev/40-gentoo.rules
 
-install-data-hook: \
-   systemd-system-unit-install-hook
-
-systemd-system-unit-install-hook:
-   mkdir -p $(DESTDIR)$(systemdsystemunitdir)/sysinit.target.wants
-   $(LN_S) ../var-lock.mount ../var-run.mount \
-   $(DESTDIR)$(systemdsystemunitdir)/sysinit.target.wants/
-
 DISTCLEANFILES = \
$(systemdsystemunit_DATA)
 

diff --git a/configure.ac b/configure.ac
index d8d6b2a..abe9705 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,11 +9,6 @@ AC_PROG_SED
 # https://bitbucket.org/mgorny/systemd-m4/
 SYSTEMD_MISC
 
-SYSTEMD_SYSTEMUNITDIR
-if test -z "$systemdsystemunitdir"; then
-   AC_MSG_ERROR([systemdsystemunitdir must be set])
-fi
-
 SYSTEMD_SYSTEMGENERATORDIR
 if test -z "$systemdsystemgeneratordir"; then
AC_MSG_ERROR([systemdsystemgeneratordir must be set])

diff --git a/mounts/var-lock.mount b/mounts/var-lock.mount
deleted file mode 100644
index 07277ad..000
--- a/mounts/var-lock.mount
+++ /dev/null
@@ -1,19 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=Lock Directory
-Before=local-fs.target
-# skip mounting if the directory does not exist or is a symlink
-ConditionPathIsDirectory=/var/lock
-ConditionPathIsSymbolicLink=!/var/lock
-
-[Mount]
-What=/run/lock
-Where=/var/lock
-Type=bind
-Options=bind

diff --git a/mounts/var-run.mount b/mounts/var-run.mount
deleted file mode 100644
index ab4da42..000
--- a/mounts/var-run.mount
+++ /dev/null
@@ -1,19 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=Runtime Directory
-Before=local-fs.target
-# skip mounting if the directory does not exist or is a symlink
-ConditionPathIsDirectory=/var/run
-ConditionPathIsSymbolicLink=!/var/run
-
-[Mount]
-What=/run
-Where=/var/run
-Type=bind
-Options=bind



[gentoo-commits] proj/gentoo-systemd-integration:master commit in: /

2016-04-09 Thread Mike Gilbert
commit: ad1f2d8c20e3f56ac65784a43601785f905bb674
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sat Apr  9 22:33:23 2016 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sat Apr  9 22:33:23 2016 +
URL:
https://gitweb.gentoo.org/proj/gentoo-systemd-integration.git/commit/?id=ad1f2d8c

Version 6

 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index abe9705..366af30 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.60])
-AC_INIT([gentoo-systemd-integration], [5])
+AC_INIT([gentoo-systemd-integration], [6])
 AC_CONFIG_AUX_DIR([build-aux])
 AM_INIT_AUTOMAKE([1.6 foreign dist-bzip2 subdir-objects])
 



[gentoo-commits] proj/gentoo-systemd-integration:master commit in: system-preset/, /

2016-03-27 Thread Mike Gilbert
commit: 4250e383fe8c8ff946a709e23f90ea5deced3297
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sun Mar 27 18:28:31 2016 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sun Mar 27 18:28:31 2016 +
URL:
https://gitweb.gentoo.org/proj/gentoo-systemd-integration.git/commit/?id=4250e383

Install a system-preset to disable services by default

Bug: https://bugs.gentoo.org/578386

 Makefile.am | 2 ++
 configure.ac| 5 +
 system-preset/99-default.preset | 1 +
 3 files changed, 8 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 3a3d585..c0bbe5e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,6 +11,8 @@ dist_tmpfiles_DATA = \
 dist_systemdsystemunit_DATA = \
mounts/var-lock.mount \
mounts/var-run.mount
+dist_systemdsystempreset_DATA = \
+   system-preset/99-default.preset
 dist_systemdsystemgenerator_SCRIPTS = \
system-generators/gentoo-local-generator
 

diff --git a/configure.ac b/configure.ac
index abcd3a2..d8d6b2a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,6 +19,11 @@ if test -z "$systemdsystemgeneratordir"; then
AC_MSG_ERROR([systemdsystemgeneratordir must be set])
 fi
 
+SYSTEMD_SYSTEMPRESETDIR
+if test -z "$systemdsystempresetdir"; then
+   AC_MSG_ERROR([systemdsystempresetdir must be set])
+fi
+
 PKG_CHECK_VAR([udevdir], [udev], [udevdir], [], [udevdir=/lib/udev])
 
 AC_CONFIG_FILES([Makefile])

diff --git a/system-preset/99-default.preset b/system-preset/99-default.preset
new file mode 100644
index 000..1f29b50
--- /dev/null
+++ b/system-preset/99-default.preset
@@ -0,0 +1 @@
+disable *



[gentoo-commits] proj/gentoo-systemd-integration:master commit in: udev/

2016-03-06 Thread Mike Gilbert
commit: 8396b199a9dd51692f89ac55e688bdeae9831458
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sat Mar  5 18:44:45 2016 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sat Mar  5 18:44:45 2016 +
URL:
https://gitweb.gentoo.org/proj/gentoo-systemd-integration.git/commit/?id=8396b199

udev: Only apply device permissions on add

Bug: https://bugs.gentoo.org/571986

 udev/40-gentoo.rules | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/udev/40-gentoo.rules b/udev/40-gentoo.rules
index 5d77db0..6b96bd0 100644
--- a/udev/40-gentoo.rules
+++ b/udev/40-gentoo.rules
@@ -1,2 +1,3 @@
-# Gentoo specific usb group
-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
+# Gentoo specific groups
+ACTION=="add", SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy"
+ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"



[gentoo-commits] proj/gentoo-systemd-integration:master commit in: /

2016-03-06 Thread Mike Gilbert
commit: 2faeba94057bed57f021adb2a6ef945a20589515
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sat Mar  5 18:51:06 2016 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sat Mar  5 18:51:06 2016 +
URL:
https://gitweb.gentoo.org/proj/gentoo-systemd-integration.git/commit/?id=2faeba94

Bump version to 5

 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index fab76b9..abcd3a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.60])
-AC_INIT([gentoo-systemd-integration], [4])
+AC_INIT([gentoo-systemd-integration], [5])
 AC_CONFIG_AUX_DIR([build-aux])
 AM_INIT_AUTOMAKE([1.6 foreign dist-bzip2 subdir-objects])