summarylogtreecommitdiffstats
path: root/0001-platform-add-Arch-Linux-platform.patch
blob: cdf92d8ceed1b170d6b757dc1cad75d4ea604705 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
From 57f997fefd917d9d8d13b1d94982c9a9b09156f6 Mon Sep 17 00:00:00 2001
From: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
Date: Wed, 16 Apr 2014 19:31:08 -0400
Subject: [PATCH] platform: add Arch Linux platform

This patch has been adapted from the patches provided with freeipa package
in the Arch User Repository (AUR).

Signed-off-by: Jan Cholasta <jcholast@redhat.com>
---
 client/man/ipa-client-automount.1  |  4 ++--
 client/man/ipa-client-install.1    |  4 ++--
 ipaplatform/archlinux/__init__.py  |  3 +++
 ipaplatform/archlinux/constants.py | 12 ++++++++++++
 ipaplatform/archlinux/paths.py     | 22 ++++++++++++++++++++++
 ipaplatform/archlinux/services.py  | 38 ++++++++++++++++++++++++++++++++++++++
 ipaplatform/archlinux/tasks.py     | 16 ++++++++++++++++
 ipaplatform/setup.py.in            |  1 +
 8 files changed, 96 insertions(+), 4 deletions(-)
 create mode 100644 ipaplatform/archlinux/__init__.py
 create mode 100644 ipaplatform/archlinux/constants.py
 create mode 100644 ipaplatform/archlinux/paths.py
 create mode 100644 ipaplatform/archlinux/services.py
 create mode 100644 ipaplatform/archlinux/tasks.py

diff --git a/client/man/ipa-client-automount.1 b/client/man/ipa-client-automount.1
index 5b60503f1304d0a0b03a8862708ba126c50c7eff..16ccbeadc6a453ad43343c68b4662c089a359aaa 100644
--- a/client/man/ipa-client-automount.1
+++ b/client/man/ipa-client-automount.1
@@ -29,7 +29,7 @@ The automount configuration consists of three files:
 .IP  o
 /etc/nsswitch.conf
 .IP  o
-/etc/sysconfig/autofs
+/etc/conf.d/autofs
 .IP  o
 /etc/autofs_ldap_auth.conf
 
@@ -79,7 +79,7 @@ Files that will be configured when SSSD is the automount client (default):
 .TP
 Files that will be configured when using the ldap automount client:
 
-/etc/sysconfig/autofs
+/etc/conf.d/autofs
 
 /etc/autofs_ldap_auth.conf
 
diff --git a/client/man/ipa-client-install.1 b/client/man/ipa-client-install.1
index 26c940721413a785068b6b79622a42a816c1ef77..468695cf06c76a899ca94af4f83f818f8afdc9f2 100644
--- a/client/man/ipa-client-install.1
+++ b/client/man/ipa-client-install.1
@@ -257,7 +257,7 @@ Files replaced if NTP is enabled:
 
 /etc/ntp.conf
 .br
-/etc/sysconfig/ntpd
+/etc/conf.d/ntpd.conf
 .br
 /etc/ntp/step\-tickers
 .TP
@@ -279,7 +279,7 @@ Files updated, existing content is maintained:
 .br
 /etc/krb5.keytab
 .br
-/etc/sysconfig/network
+/etc/hostname
 .SH "EXIT STATUS"
 0 if the installation was successful
 
diff --git a/ipaplatform/archlinux/__init__.py b/ipaplatform/archlinux/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..9da42e7b4d782ef596e8fda080b6c1994b901866
--- /dev/null
+++ b/ipaplatform/archlinux/__init__.py
@@ -0,0 +1,3 @@
+#
+# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
+#
diff --git a/ipaplatform/archlinux/constants.py b/ipaplatform/archlinux/constants.py
new file mode 100644
index 0000000000000000000000000000000000000000..148abd83f72d12263659f78326fdabd91bed5227
--- /dev/null
+++ b/ipaplatform/archlinux/constants.py
@@ -0,0 +1,12 @@
+#
+# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
+#
+
+from ipaplatform.redhat.constants import RedHatConstantsNamespace
+
+
+class ArchLinuxConstantsNamespace(RedHatConstantsNamespace):
+    pass
+
+
+constants = ArchLinuxConstantsNamespace()
diff --git a/ipaplatform/archlinux/paths.py b/ipaplatform/archlinux/paths.py
new file mode 100644
index 0000000000000000000000000000000000000000..a7b8ea7b4cc959c4237a16fd68e7422bf1a359a1
--- /dev/null
+++ b/ipaplatform/archlinux/paths.py
@@ -0,0 +1,22 @@
+#
+# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
+#
+
+from ipaplatform.redhat.paths import RedHatPathNamespace
+
+
+class ArchLinuxPathNamespace(RedHatPathNamespace):
+    AUTOFS_LDAP_AUTH_CONF = "/etc/autofs/autofs_ldap_auth.conf"
+    CERTMONGER_COMMAND_TEMPLATE = "/usr/lib/ipa/certmonger/%s"
+    SYSCONFIG_NFS = "/etc/conf.d/nfs-common.conf"
+    SYSCONFIG_NTPD = "/etc/conf.d/ntpd.conf"
+    SYSCONFIG_AUTOFS = "/etc/default/autofs"
+    DOGTAG_IPA_CA_RENEW_AGENT_SUBMIT = (
+        "/usr/lib/certmonger/certmonger/dogtag-ipa-ca-renew-agent-submit")
+    DOGTAG_IPA_RENEW_AGENT_SUBMIT = (
+        "/usr/lib/certmonger/certmonger/dogtag-ipa-renew-agent-submit")
+    IPA_SERVER_GUARD = "/usr/lib/certmonger/certmonger/ipa-server-guard"
+    LIB64_FIREFOX = "/usr/lib/firefox"
+
+
+paths = ArchLinuxPathNamespace()
diff --git a/ipaplatform/archlinux/services.py b/ipaplatform/archlinux/services.py
new file mode 100644
index 0000000000000000000000000000000000000000..c0fb6fb9403422f2699ef1a2e5521d7871dac3a0
--- /dev/null
+++ b/ipaplatform/archlinux/services.py
@@ -0,0 +1,38 @@
+#
+# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
+#
+
+from ipaplatform.redhat.services import (RedHatService,
+                                         redhat_service_class_factory,
+                                         RedHatServices,
+                                         RedHatSSHService,
+                                         redhat_system_units,
+                                         timedate_services)
+
+archlinux_system_units = dict(redhat_system_units)
+archlinux_system_units['messagebus'] = 'dbus.service'
+archlinux_system_units['rpcgssd'] = 'rpc-gssd.service'
+archlinux_system_units['rpcidmapd'] = 'rpc-idmapd.service'
+
+
+class ArchLinuxService(RedHatService):
+    system_units = archlinux_system_units
+
+
+class ArchLinuxSSHService(ArchLinuxService, RedHatSSHService):
+    pass
+
+
+def archlinux_service_class_factory(name):
+    if name == 'sshd':
+        return ArchLinuxSSHService(name)
+    return ArchLinuxService(name)
+
+
+class ArchLinuxServices(RedHatServices):
+    def service_class_factory(self, name):
+        return archlinux_service_class_factory(name)
+
+
+service = archlinux_service_class_factory
+knownservices = ArchLinuxServices()
diff --git a/ipaplatform/archlinux/tasks.py b/ipaplatform/archlinux/tasks.py
new file mode 100644
index 0000000000000000000000000000000000000000..cae3245c874bd42f326b379e6bb39573f0b52acb
--- /dev/null
+++ b/ipaplatform/archlinux/tasks.py
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
+#
+
+from ipaplatform.archlinux.paths import paths
+from ipaplatform.redhat.tasks import RedHatTaskNamespace
+
+
+class ArchLinuxTaskNamespace(RedHatTaskNamespace):
+    def restore_network_configuration(self, fstore, statestore):
+        filepath = paths.ETC_HOSTNAME
+        if fstore.has_file(filepath):
+            fstore.restore_file(filepath)
+
+
+tasks = ArchLinuxTaskNamespace()
diff --git a/ipaplatform/setup.py.in b/ipaplatform/setup.py.in
index 11bb7573fd8a5c72da1c40ba4fd222fdc1a872d3..2d355fc1765b83a8b5945ab7e0b08f8781408216 100644
--- a/ipaplatform/setup.py.in
+++ b/ipaplatform/setup.py.in
@@ -65,6 +65,7 @@ def setup_package():
             classifiers=[line for line in CLASSIFIERS.split('\n') if line],
             package_dir = {'ipaplatform': ''},
             packages = ["ipaplatform",
+                        "ipaplatform.archlinux",
                         "ipaplatform.base",
                         "ipaplatform.fedora",
                         "ipaplatform.redhat",
-- 
2.11.0