Philipp Hahn
1638f3f48f
ci: Fix dput to Gitlab DPR
...
Extract package data during build.
Export via dot-env to following jobs.
2023-08-19 10:07:15 +02:00
Philipp Hahn
7503e7f705
ci: Compress with XZ
...
until <https://gitlab.com/gitlab-org/gitlab/-/issues/422584 > is fixed.
Automatically register Distribution/Codename.
2023-08-19 09:50:32 +02:00
Philipp Hahn
836cf6fa1b
ci: Do full Debian package build
...
including both source and binary packages.
Extract source-only .changes file required for PPA upload.
2023-08-18 10:49:46 +02:00
Philipp Hahn
7e334ffbd5
style: tab 2 spaces
...
find -name venv -prune -o -name \*.py -exec autopep8 --in-place {} +
2023-08-18 10:29:03 +02:00
Philipp Hahn
75cf638498
doc: Copyright 2023
2023-08-18 10:29:03 +02:00
Philipp Hahn
332b5392a7
doc(README): Hint --help
...
Bug #52245
2022-11-25 09:36:24 +01:00
Philipp Hahn
d66ae71d34
Update README.md
2022-11-15 13:51:37 +01:00
Philipp Hahn
d67bb654b2
ci: User python:3.10-bullseye image
...
including gcc required for compiling python-ldap and python-dbus
Also use ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}
2022-11-10 15:40:10 +01:00
Philipp Hahn
8558f5c7fe
refactor: Extract common ips2fqdn code
2022-11-10 15:34:43 +01:00
Philipp Hahn
8e884cf25d
ci: User python:3.10-bullseye image
...
including gcc required for compiling python-ldap and python-dbus
Also use ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}
2022-11-10 15:34:37 +01:00
Philipp Hahn
f48a580e36
doc: Declare compatibility with Python 3.7-11
2022-11-10 15:34:01 +01:00
Philipp Hahn
36c2fc48f7
Merge branch 'mjanssen/54775-ubuntu22.04' into 'ubuntu22.04'
...
Bug #54775 : Add Ubuntu 22.04 support
See merge request univention/univention-domain-join!2
2022-11-04 13:50:11 +01:00
Maximilian Janßen
11d20648bb
Bug #54775 : Add Ubuntu 22.04 support
2022-11-04 13:46:03 +01:00
Philipp Hahn
94e1cb7ae8
ci: Fix 🛍️ bug
...
`root`
2022-11-03 16:21:36 +01:00
Philipp Hahn
96a4a312cd
ci: Fix Vault secret paths
...
Strip prefix `secret/`
2022-11-03 16:18:06 +01:00
Philipp Hahn
16d0870977
churn: Dummy debian/changelog change
...
to trigger pipeline run
2022-11-03 14:29:27 +01:00
Philipp Hahn
2bf891d80d
ci: Test PPA uploading
2022-11-03 14:26:54 +01:00
Philipp Hahn
fc8ee3e396
doc: Fix resolving DC Primrary address
...
Bug #52726
Augments: 229cb6fd95
2022-10-27 16:18:57 +02:00
Philipp Hahn
c59844ff49
Merge branch 'phahn/ubuntu20.04' into 'ubuntu20.04'
...
Code cleanup and Gitlab-CI
See merge request univention/univention-domain-join!1
2022-10-27 15:22:21 +02:00
Philipp Hahn
49286dafd5
fix: seteuid() is not enough
...
`sshpass` opens a "pseudo tty" <man:pts(3) via `/dev/ptmx` using
<man:posix_openpt(3)>. The allocated PTY is owned by the *real* user ID,
not the *effective* user ID. Thus the following <man:grantpt(3)> fails.
> Failed to change pseudo terminal's permission
Set both real and effective UID.
2022-10-27 12:17:57 +02:00
Philipp Hahn
d5020d11bf
feat: Increase ntpdate timeout
...
from default 2 s to 5 s:
> ntpdate[…]: no server suitable for synchronization found
2022-10-17 17:36:57 +02:00
Philipp Hahn
728cab3774
feat: Add debug logging
...
to subprocess calls.
Use `subprocess.check_output(…, stderr=subprocess.STDOUT)` to get STDERR
captured in exception `CalledProcessError`.
Otherwise log STDERR to debug logger.
2022-10-17 17:14:59 +02:00
Philipp Hahn
8ef4b76372
feat: Return DN of computer entry
...
currently not required.
Add debug output.
2022-10-17 13:14:56 +02:00
Philipp Hahn
393915358a
refactor[LDAP]:. Merge get_machine_…()
...
Merge
get_machines_ldap_dn()
get_machines_udm_type()
into
def get_machines_udm()
to return (udm_type, dn).
The former was calling the later anyway.
The call-site requires both values anyway.
2022-10-17 13:14:56 +02:00
Philipp Hahn
c9e9ef257d
perf: Optimize LDAP access
...
Use `ldapwhoami` to get DN of administrator user.
Search for `univentionService=Samba 4` instead of doing it on the
return.
2022-10-17 13:14:56 +02:00
Philipp Hahn
ab02efbec8
refactor: Extract ssh code handling
...
Pass password via environment variable instead of STDIN.
Move quoting there.
Really disable using `$HOME/.ssh/known_hosts` file.
Disable local SSH configuration.
2022-10-17 13:14:56 +02:00
Philipp Hahn
13792516de
fix[gui]: Show correct log file path
2022-10-17 12:40:23 +02:00
Philipp Hahn
dac57d5ba3
refactor: Use subprocess.DEVNULL
...
instead of home made OUTPUT_SINK
2022-10-17 12:40:23 +02:00
Maximilian Janßen
035deaef6c
refactor: super()
...
from PEP-3135 since Python 3.0
2022-10-17 12:40:23 +02:00
Philipp Hahn
3052de6ff8
ci: Add Gitlab-CI
...
Automatic upload to PPA is untested!
2022-10-17 12:40:23 +02:00
Philipp Hahn
c317e11a0f
fix[gui]: IP and DNS lookup logic
...
Show error dialog if neither an IP or FQHN of the Primary is given.
2022-10-17 12:40:23 +02:00
Philipp Hahn
bd36c68ae2
style[gui]: Remove instance variables
...
as they complicate PEP-484 typing
2022-10-17 12:40:23 +02:00
Philipp Hahn
6f298e6b5b
style: Return empty string instead of None
...
to simplify typing and to also handle empty responses.
2022-10-17 12:40:23 +02:00
Philipp Hahn
4d040d5b98
refactor: Raise exception
...
instead of returning None if lookup fails
2022-10-17 12:40:23 +02:00
Philipp Hahn
1344a12648
fix[security]: No root for ssh
...
There is no need to execute the `ssh` command as `root` locally.
2022-10-17 12:40:23 +02:00
Philipp Hahn
c7a96d3ed7
refactor: use socket.gethostname()
...
instead of calling an external program
2022-10-17 12:40:23 +02:00
Philipp Hahn
636686e88d
fix: Use makedirs(exist_ok=True)
...
to handle cases where directories already exists or call order changed.
2022-10-17 12:40:23 +02:00
Philipp Hahn
bf1104dd4f
refactor[logging]: log file as argument
2022-10-17 12:40:23 +02:00
Philipp Hahn
cd1ec2303a
refactor[logging]: Remove global loggers
...
and use getLogger() anew to get singleton instance
2022-10-17 12:40:23 +02:00
Philipp Hahn
421ab15027
refactor[cli]: Extract ArgumentParser
...
into separate function and call it before enforcing run-as-root, so
normal users can also call `--help`.
2022-10-17 12:40:23 +02:00
Philipp Hahn
34168438d5
style[utils]: Use functools.wraps
...
to copy annotations from wrapped function to `root_wrapper`.
2022-10-17 12:40:23 +02:00
Philipp Hahn
1f37dfc46c
fix[dns]: Missing UTF-8 decoding
2022-10-17 12:40:23 +02:00
Philipp Hahn
72e0c580d6
style[dist]: common base class AbstractJoiner
...
to define interface for all distributions
2022-10-17 12:40:21 +02:00
Philipp Hahn
d61ad02e08
style[dns]: common base class BaseDnsConfigurator
...
to define interface for all DNS configuration.
2022-10-17 12:40:06 +02:00
Philipp Hahn
4a56539630
doc: Add PEP-484 type hints
2022-10-17 12:40:06 +02:00
Philipp Hahn
cc570eed1d
style: Convert to declarative style
...
using setup.cfg instead of code in setup.py
2022-10-17 12:40:06 +02:00
Philipp Hahn
7276a426c4
fix: Python 3 configparser
...
renamed from Python 2 ConfigParser
2022-10-17 12:40:06 +02:00
Philipp Hahn
9227de3164
style: isort
2022-10-17 12:40:05 +02:00
Philipp Hahn
d784c226db
style: flake8
2022-10-17 12:38:28 +02:00
Philipp Hahn
4af7396153
fix[deb]: Clean egg
2022-10-17 12:38:28 +02:00