docker-systemctl-replacement 1.7.1063__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ Metadata-Version: 2.2
2
+ Name: docker_systemctl_replacement
3
+ Version: 1.7.1063
4
+ Summary: allows to deploy to systemd-controlled containers without starting an actual systemd daemon
5
+ Author-email: "Guido U. Draheim" <Guido.Draheim@gmx.de>
6
+ License-Expression: EUPL-1.2
7
+ Project-URL: homepage, https://github.com/gdraheim/docker-systemctl-replacement
8
+ Project-URL: repository, https://github.com/gdraheim/docker-systemctl-replacement.git
9
+ Project-URL: issues, https://github.com/gdraheim/docker-systemctl-replacement/issues
10
+ Classifier: Operating System :: POSIX :: Linux
11
+ Classifier: Environment :: Console
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: System :: Systems Administration
14
+ Classifier: Typing :: Typed
15
+ Description-Content-Type: text/markdown
16
+ License-File: EUPL-LICENSE.md
17
+ Provides-Extra: dev
18
+ Requires-Dist: build; extra == "dev"
19
+ Dynamic: license-file
@@ -0,0 +1,14 @@
1
+ docker_systemctl_replacement-1.7.1063.dist-info/licenses/EUPL-LICENSE.md,sha256=Z-a15PP0xrPE-8pH8CAoI_ODRPA_G1Tj3Omu8XQGsKE,14024
2
+ systemctl3/__main__.py,sha256=JzNYDc16JCg7JhUMY6FI3yJaXnxekV9EaJYQ7B05km8,81
3
+ systemctl3/journalctl.py,sha256=Aev09ZAWkjk_b0A6LaH5dpA3z0AZDgoQkrQPvTRG3jY,1487
4
+ systemctl3/journalctl.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ systemctl3/journalctl3.py,sha256=FqUv5ITXwPykZMgqVt5YmARANilCSCwNH7xCTmn4-DM,1445
6
+ systemctl3/py.typed,sha256=cAFBtJD0bQgXdrnRblLmKBX9S4GW7JkLLyPtknI5Y64,7
7
+ systemctl3/systemctl.py,sha256=cNGxzwCmtKNieqXESwuBEZ0gDygJy7fYbjmvhSclE6Y,327129
8
+ systemctl3/systemctl.pyi,sha256=P-LXQc5kb1PPwqRIzvjZ9qeckHVXtJb5sP0m6eQGs3w,39445
9
+ systemctl3/systemctl3.py,sha256=ILM3pXuz774a8B2sMJ00SHVYtp-ka3gyYJwwN-hXoGM,342183
10
+ docker_systemctl_replacement-1.7.1063.dist-info/METADATA,sha256=Gigk-xx5bGM8v3SZpvNHw-1qMjTofcjsyBglZnMcxBc,873
11
+ docker_systemctl_replacement-1.7.1063.dist-info/WHEEL,sha256=YCfwYGOYMi5Jhw2fU4yNgwErybb2IX5PEwBKV4ZbdBo,91
12
+ docker_systemctl_replacement-1.7.1063.dist-info/entry_points.txt,sha256=IfuMUzxDei8UT6MxCBucPDO34SZfZghnR1_4IuS1SHM,190
13
+ docker_systemctl_replacement-1.7.1063.dist-info/top_level.txt,sha256=Q8u3yU-qljVJMpMUlSiP4QoJ-rFAbpOuZNivRnpPdY0,11
14
+ docker_systemctl_replacement-1.7.1063.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,5 @@
1
+ [console_scripts]
2
+ journalctl.py = systemctl3.journalctl:main
3
+ journalctl3.py = systemctl3.journalctl3:main
4
+ systemctl.py = systemctl3.systemctl:main
5
+ systemctl3.py = systemctl3.systemctl3:main
@@ -0,0 +1,304 @@
1
+ ## EUROPEAN UNION PUBLIC LICENCE v. 1.2
2
+
3
+ EUPL (C) the European Union 2007, 2016
4
+
5
+ This European Union Public Licence (the EUPL) applies to the Work (as
6
+ defined below) which is provided under the terms of this Licence. Any
7
+ use of the Work, other than as authorised under this Licence is
8
+ prohibited (to the extent such use is covered by a right of the
9
+ copyright holder of the Work).
10
+
11
+ The Original Work is provided under the terms of this Licence when
12
+ the Licensor (as defined below) has placed the following notice
13
+ immediately following the copyright notice for the Original Work:
14
+
15
+ Licensed under the EUPL
16
+
17
+ or has expressed by any other means his willingness to license under
18
+ the EUPL.
19
+
20
+ ### 1.Definitions
21
+
22
+ In this Licence, the following terms have the following meaning:
23
+
24
+ - 'The Licence': this Licence.
25
+ - 'The Original Work': the work or software distributed or
26
+ communicated by the Licensor under this Licence, available as Source
27
+ Code and also as Executable Code as the case may be.
28
+ - 'Derivative Works': the works or software that could be created by
29
+ the Licensee, based upon the Original Work or modifications thereof.
30
+ This Licence does not define the extent of modification or
31
+ dependence on the Original Work required in order to classify a work
32
+ as a Derivative Work; this extent is determined by copyright law
33
+ applicable in the country mentioned in Article 15.
34
+ - 'The Work': the Original Work or its Derivative Works.
35
+ - 'The Source Code': the human-readable form of the Work which is the
36
+ most convenient for people to study and modify.
37
+ - 'The Executable Code': any code which has generally been compiled
38
+ and which is meant to be interpreted by a computer as a program.
39
+ - 'The Licensor': the natural or legal person that distributes or
40
+ communicates the Work under the Licence.
41
+ - 'Contributor(s)': any natural or legal person who modifies the Work
42
+ under the Licence, or otherwise contributes to the creation of a
43
+ Derivative Work.
44
+ - 'The Licensee or You': any natural or legal person who makes any
45
+ usage of the Work under the terms of the Licence.
46
+ - 'Distribution or Communication': any act of selling, giving,
47
+ lending, renting, distributing, communicating, transmitting, or
48
+ otherwise making available, online or offline, copies of the Work
49
+ or providing access to its essential functionalities at the disposal
50
+ of any other natural or legal person.
51
+
52
+ ### 2. Scope of the rights granted by the Licence
53
+
54
+ The Licensor hereby grants You a worldwide, royalty-free,
55
+ non-exclusive, sublicensable licence to do the following, for the
56
+ duration of copyright vested in the Original Work:
57
+
58
+ - use the Work in any circumstance and for all usage,
59
+ - reproduce the Work,
60
+ - modify the Work, and make Derivative Works based upon the Work,
61
+ - communicate to the public, including the right to make available
62
+ or display the Work or copies thereof to the public and perform
63
+ publicly, as the case may be, the Work,
64
+ - distribute the Work or copies thereof,
65
+ - lend and rent the Work or copies thereof,
66
+ - sublicense rights in the Work or copies thereof.
67
+
68
+ Those rights can be exercised on any media, supports and formats,
69
+ whether now known or later invented, as far as the applicable law
70
+ permits so.
71
+
72
+ In the countries where moral rights apply, the Licensor waives his
73
+ right to exercise his moral right to the extent allowed by law in
74
+ order to make effective the licence of the economic rights here above
75
+ listed.
76
+
77
+ The Licensor grants to the Licensee royalty-free, non-exclusive usage
78
+ rights to any patents held by the Licensor, to the extent necessary
79
+ to make use of the rights granted on the Work under this Licence.
80
+
81
+ ### 3. Communication of the Source Code
82
+
83
+ The Licensor may provide the Work either in its Source Code form, or
84
+ as Executable Code. If the Work is provided as Executable Code, the
85
+ Licensor provides in addition a machine-readable copy of the Source
86
+ Code of the Work along with each copy of the Work that the Licensor
87
+ distributes or indicates, in a notice following the copyright notice
88
+ attached to the Work, a repository where the Source Code is easily
89
+ and freely accessible for as long as the Licensor continues to
90
+ distribute or communicate the Work.
91
+
92
+ ### 4. Limitations on copyright
93
+
94
+ Nothing in this Licence is intended to deprive the Licensee of the
95
+ benefits from any exception or limitation to the exclusive rights of
96
+ the rights owners in the Work, of the exhaustion of those rights or
97
+ of other applicable limitations thereto.
98
+
99
+ ### 5. Obligations of the Licensee
100
+
101
+ The grant of the rights mentioned above is subject to some
102
+ restrictions and obligations imposed on the Licensee. Those
103
+ obligations are the following:
104
+
105
+ **Attribution right**: The Licensee shall keep intact all copyright,
106
+ patent or trademarks notices and all notices that refer to the
107
+ Licence and to the disclaimer of warranties. The Licensee must
108
+ include a copy of such notices and a copy of the Licence with every
109
+ copy of the Work he/she distributes or communicates. The Licensee
110
+ must cause any Derivative Work to carry prominent notices stating
111
+ that the Work has been modified and the date of modification.
112
+
113
+ **Copyleft clause**: If the Licensee distributes or communicates
114
+ copies of the Original Works or Derivative Works, this Distribution
115
+ or Communication will be done under the terms of this Licence or of a
116
+ later version of this Licence unless the Original Work is expressly
117
+ distributed only under this version of the Licence for example by
118
+ communicating EUPL v. 1.2 only. The Licensee (becoming Licensor)
119
+ cannot offer or impose any additional terms or conditions on the
120
+ Work or Derivative Work that alter or restrict the terms of the
121
+ Licence.
122
+
123
+ **Compatibility clause**: If the Licensee Distributes or Communicates
124
+ Derivative Works or copies thereof based upon both the Work and
125
+ another work licensed under a Compatible Licence, this Distribution
126
+ or Communication can be done under the terms of this Compatible
127
+ Licence. For the sake of this clause, Compatible Licence refers to
128
+ the licences listed in the appendix attached to this Licence.
129
+ Should the Licensee's obligations under the Compatible Licence
130
+ conflict with his/her obligations under this Licence, the
131
+ obligations of the Compatible Licence shall prevail.
132
+
133
+ **Provision of Source Code**: When distributing or communicating
134
+ copies of the Work, the Licensee will provide a machine-readable
135
+ copy of the Source Code or indicate a repository where this Source
136
+ will be easily and freely available for as long as the Licensee
137
+ continues to distribute or communicate the Work.
138
+
139
+ **Legal Protection**: This Licence does not grant permission to use
140
+ the trade names, trademarks, service marks, or names of the Licensor,
141
+ except as required for reasonable and customary use in describing
142
+ the origin of the Work and reproducing the content of the copyright
143
+ notice.
144
+
145
+ ### 6. Chain of Authorship
146
+
147
+ The original Licensor warrants that the copyright in the Original
148
+ Work granted hereunder is owned by him/her or licensed to him/her
149
+ and that he/she has the power and authority to grant the Licence.
150
+
151
+ Each Contributor warrants that the copyright in the modifications
152
+ he/she brings to the Work are owned by him/her or licensed to him/her
153
+ and that he/she has the power and authority to grant the Licence.
154
+
155
+ Each time You accept the Licence, the original Licensor and
156
+ subsequent Contributors grant You a licence to their contributions
157
+ to the Work, under the terms of this Licence.
158
+
159
+ ### 7.Disclaimer of Warranty
160
+
161
+ The Work is a work in progress, which is continuously improved by
162
+ numerous Contributors. It is not a finished work and may therefore
163
+ contain defects or bugs inherent to this type of development.
164
+
165
+ For the above reason, the Work is provided under the Licence on an
166
+ as is basis and without warranties of any kind concerning the Work,
167
+ including without limitation merchantability, fitness for a
168
+ particular purpose, absence of defects or errors, accuracy,
169
+ non-infringement of intellectual property rights other than
170
+ copyright as stated in Article 6 of this Licence.
171
+
172
+ This disclaimer of warranty is an essential part of the Licence and
173
+ a condition for the grant of any rights to the Work.
174
+
175
+ ### 8. Disclaimer of Liability
176
+
177
+ Except in the cases of wilful misconduct or damages directly caused
178
+ to natural persons, the Licensor will in no event be liable for any
179
+ direct or indirect, material or moral, damages of any kind, arising
180
+ out of the Licence or of the use of the Work, including without
181
+ limitation, damages for loss of goodwill, work stoppage, computer
182
+ failure or malfunction, loss of data or any commercial damage, even
183
+ if the Licensor has been advised of the possibility of such damage.
184
+ However, the Licensor will be liable under statutory product
185
+ liability laws as far such laws apply to the Work.
186
+
187
+ ### 9. Additional agreements
188
+
189
+ While distributing the Work, You may choose to conclude an additional
190
+ agreement, defining obligations or services consistent with this
191
+ Licence. However, if accepting obligations, You may act only on your
192
+ own behalf and on your sole responsibility, not on behalf of the
193
+ original Licensor or any other Contributor, and only if You agree
194
+ to indemnify, defend, and hold each Contributor harmless for any
195
+ liability incurred by, or claims asserted against such Contributor by
196
+ the fact You have accepted any warranty or additional liability.
197
+
198
+ ### 10. Acceptance of the Licence
199
+
200
+ The provisions of this Licence can be accepted by clicking on an icon
201
+ I agree placed under the bottom of a window displaying the text of
202
+ this Licence or by affirming consent in any other similar way, in
203
+ accordance with the rules of applicable law. Clicking on that icon
204
+ indicates your clear and irrevocable acceptance of this Licence and
205
+ all of its terms and conditions.
206
+
207
+ Similarly, you irrevocably accept this Licence and all of its terms
208
+ and conditions by exercising any rights granted to You by Article 2
209
+ of this Licence, such as the use of the Work, the creation by You of
210
+ a Derivative Work or the Distribution or Communication by You of
211
+ the Work or copies thereof.
212
+
213
+ ### 11. Information to the public
214
+
215
+ In case of any Distribution or Communication of the Work by means
216
+ of electronic communication by You (for example, by offering to
217
+ download the Work from a remote location) the distribution channel
218
+ or media (for example, a website) must at least provide to the public
219
+ the information requested by the applicable law regarding the
220
+ Licensor, the Licence and the way it may be accessible, concluded,
221
+ stored and reproduced by the Licensee.
222
+
223
+ ### 12. Termination of the Licence
224
+
225
+ The Licence and the rights granted hereunder will terminate
226
+ automatically upon any breach by the Licensee of the terms of the
227
+ Licence.
228
+
229
+ Such a termination will not terminate the licences of any person
230
+ who has received the Work from the Licensee under the Licence,
231
+ provided such persons remain in full compliance with the Licence.
232
+
233
+ ### 13. Miscellaneous
234
+
235
+ Without prejudice of Article 9 above, the Licence represents the
236
+ complete agreement between the Parties as to the Work.
237
+
238
+ If any provision of the Licence is invalid or unenforceable under
239
+ applicable law, this will not affect the validity or enforceability
240
+ of the Licence as a whole. Such provision will be construed or
241
+ reformed so as necessary to make it valid and enforceable.
242
+
243
+ The European Commission may publish other linguistic versions or
244
+ new versions of this Licence or updated versions of the Appendix,
245
+ so far this is required and reasonable, without reducing the scope
246
+ of the rights granted by the Licence. New versions of the Licence
247
+ will be published with a unique version number.
248
+
249
+ All linguistic versions of this Licence, approved by the European
250
+ Commission, have identical value. Parties can take advantage of
251
+ the linguistic version of their choice.
252
+
253
+ ### 14. Jurisdiction
254
+
255
+ Without prejudice to specific agreement between parties,
256
+
257
+ - any litigation resulting from the interpretation of this License,
258
+ arising between the European Union institutions, bodies, offices
259
+ or agencies, as a Licensor, and any Licensee, will be subject to
260
+ the jurisdiction of the Court of Justice of the European Union, as
261
+ laid down in article 272 of the Treaty on the Functioning of the
262
+ European Union,
263
+ - any litigation arising between other parties and resulting from
264
+ the interpretation of this License, will be subject to the
265
+ exclusive jurisdiction of the competent court where the Licensor
266
+ resides or conducts its primary business.
267
+
268
+ ### 15. Applicable Law
269
+
270
+ Without prejudice to specific agreement between parties,
271
+
272
+ - this Licence shall be governed by the law of the European Union
273
+ Member State where the Licensor has his seat, resides or has his
274
+ registered office,
275
+ - this licence shall be governed by Belgian law if the Licensor
276
+ has no seat, residence or registered office inside a European
277
+ Union Member State.
278
+
279
+
280
+ ## Appendix
281
+
282
+ Compatible Licences according to Article 5 EUPL are:
283
+
284
+ - GNU General Public License (GPL) v. 2, v. 3
285
+ - GNU Affero General Public License (AGPL) v. 3
286
+ - Open Software License (OSL) v. 2.1, v. 3.0
287
+ - Eclipse Public License (EPL) v. 1.0
288
+ - CeCILL v. 2.0, v. 2.1
289
+ - Mozilla Public Licence (MPL) v. 2
290
+ - GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3
291
+ - Creative Commons Attribution-ShareAlike v. 3.0 Unported
292
+ (CC BY-SA 3.0) for works other than software
293
+ - European Union Public Licence (EUPL) v. 1.1, v. 1.2
294
+ - Qubec Free and Open-Source Licence Reciprocity (LiLiQ-R)
295
+ or Strong Reciprocity (LiLiQ-R+).
296
+
297
+ The European Commission may update this Appendix to later versions
298
+ of the above licences without producing a new version of the EUPL,
299
+ as long as they provide the rights granted in Article 2 of this
300
+ Licence and protect the covered Source Code from exclusive
301
+ appropriation.
302
+
303
+ All other changes or additions to this Appendix require the
304
+ production of a new EUPL version.
systemctl3/__main__.py ADDED
@@ -0,0 +1,4 @@
1
+ #! /usr/bin/env python3
2
+ import sys
3
+ from .systemctl3 import main
4
+ sys.exit(main())
@@ -0,0 +1,36 @@
1
+ #! /usr/bin/env python
2
+ import argparse
3
+ import os
4
+ import sys
5
+ parser = argparse.ArgumentParser()
6
+ parser.add_argument('-u', '--unit', metavar='unit', type=str, required=True, help='Systemd unit to display')
7
+ parser.add_argument('-f', '--follow', default=False, action='store_true', help='Follows the log')
8
+ parser.add_argument('-n', '--lines', metavar='num', type=int, help='Num of lines to display')
9
+ parser.add_argument('--no-pager', default=False, action='store_true', help='Do not pipe through a pager')
10
+ parser.add_argument('--system', default=False, action='store_true', help='Show system units')
11
+ parser.add_argument('--user', default=False, action='store_true', help='Show user units')
12
+ parser.add_argument('--root', metavar='path', type=str, help='Use subdirectory path')
13
+ parser.add_argument('-x', default=False, action='store_true', help='Switch on verbose mode')
14
+ args = parser.parse_args()
15
+ systemctl_py = 'systemctl3.py'
16
+ path = os.path.dirname(sys.argv[0])
17
+ systemctl = os.path.join(path, systemctl_py)
18
+ cmd = [systemctl, 'log', args.unit]
19
+ if args.follow:
20
+ cmd += ['-f']
21
+ if args.lines:
22
+ cmd += ['-n', str(args.lines)]
23
+ if args.no_pager:
24
+ cmd += ['--no-pager']
25
+ if args.system:
26
+ cmd += ['--system']
27
+ elif args.user:
28
+ #! /usr/bin/env python3
29
+ #pylint: disable=multiple-statements,line-too-long,missing-module-docstring,invalid-name
30
+ # drops the -u
31
+ cmd += ['--user']
32
+ if args.root:
33
+ cmd += ['--root', args.root]
34
+ if args.x:
35
+ cmd += ['-vvv']
36
+ os.execvp(cmd[0], cmd)
File without changes
@@ -0,0 +1,32 @@
1
+ #! /usr/bin/env python3
2
+ #pylint: disable=multiple-statements,line-too-long,missing-module-docstring,invalid-name
3
+
4
+ import argparse
5
+ import os
6
+ import sys
7
+
8
+ parser = argparse.ArgumentParser()
9
+ parser.add_argument('-u', '--unit', metavar='unit', type=str, required=True, help='Systemd unit to display')
10
+ parser.add_argument('-f', '--follow', default=False, action='store_true', help='Follows the log')
11
+ parser.add_argument('-n', '--lines', metavar='num', type=int, help='Num of lines to display')
12
+ parser.add_argument('--no-pager', default=False, action='store_true', help='Do not pipe through a pager')
13
+ parser.add_argument('--system', default=False, action='store_true', help='Show system units')
14
+ parser.add_argument('--user', default=False, action='store_true', help='Show user units')
15
+ parser.add_argument('--root', metavar='path', type=str, help='Use subdirectory path')
16
+ parser.add_argument('-x', default=False, action='store_true', help='Switch on verbose mode')
17
+ args = parser.parse_args()
18
+
19
+ systemctl_py = "systemctl3.py"
20
+ path = os.path.dirname(sys.argv[0])
21
+ systemctl = os.path.join(path, systemctl_py)
22
+
23
+ cmd = [ systemctl, "log", args.unit ] # drops the -u
24
+ if args.follow: cmd += [ "-f" ]
25
+ if args.lines: cmd += [ "-n", str(args.lines) ]
26
+ if args.no_pager: cmd += [ "--no-pager" ]
27
+ if args.system: cmd += [ "--system" ]
28
+ elif args.user: cmd += [ "--user" ]
29
+ if args.root: cmd += [ "--root", args.root ]
30
+ if args.x: cmd += [ "-vvv" ]
31
+
32
+ os.execvp(cmd[0], cmd)
systemctl3/py.typed ADDED
@@ -0,0 +1 @@
1
+ PEP561