summarylogtreecommitdiffstats
path: root/0001-platform-add-Arch-Linux-platform.patch
blob: 167445accbe9404799b9ca4ece9df22b3f2159a1 (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 466e2dde63b1247902de1bbfa28628f4b875c61e 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 1/3] 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 5b60503..16ccbea 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 7f490d1..5f0c379 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 0000000..9da42e7
--- /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 0000000..148abd8
--- /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 0000000..a7b8ea7
--- /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 0000000..c0fb6fb
--- /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 0000000..cae3245
--- /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 11bb757..2d355fc 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.7.4