Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some build and package improvements #45

Merged
merged 7 commits into from
Sep 8, 2020

Conversation

spali
Copy link
Contributor

@spali spali commented Sep 4, 2020

Have done some build and package improvements.
Hope you like it.
Tested it as you did with Ubuntu 20 with WSL2.
Last commit includes even support for building in docker or podman.
I had in mind to potentially in the future build on the UDM itself which in theory could already work with these changes... but not tested yet.

Let me know if I should change something you not agree, of if a specific change need's more explanation.
i.e. the version number of the package... removed the "-1" behind, because this package is a native debian package, which means has it's own sources included.

Next plan is to support the external disk in the UDMP #43 .
I also play with the idea to use systemd in a "controller"-container and only start this container with this package.
This would allow to not only use scripts that get started, we could put systemd service files inside boot.d or similar to have the full control an flexibility of a systemd service like schedule, logs etc. For each container or just for simple scripts, including dependencies etc.
But not a systemd expert yet... so needs some research first.

@spali
Copy link
Contributor Author

spali commented Sep 5, 2020

e77d038 makes the installation a lot less verbose but still get the output of the ssh command (which would be supressed when -q would be used)

root@UDMP:/# dpkg -i /data/udm-boot_1.0.2_all.deb
Selecting previously unselected package udm-boot.
(Reading database ... 64884 files and directories currently installed.)
Preparing to unpack /data/udm-boot_1.0.2_all.deb ...
Unpacking udm-boot (1.0.2) ...
Setting up udm-boot (1.0.2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/udm-boot.service → /lib/systemd/system/udm-boot.service.
#-> ubnt-dpkg-cache install
udm-boot: action=install, package=/data/dpkg-cache/stretch/packages/udm-boot_1.0.2_all.deb mark=manual
<-# ubnt-dpkg-cache install

@boostchicken
Copy link
Member

@spali dont have time to test this atm, would love to merge it. Do you have nay more test evidence or are you confident it works.

Also, can you add support for cron files and bump the version to 1.1.0

@spali
Copy link
Contributor Author

spali commented Sep 6, 2020

Currently have not more evidence, I'm confident it works, but maybe someone else has time to prove that just to be sure.
I will also add the readme changes to the new package to this pull request.

@spali
Copy link
Contributor Author

spali commented Sep 6, 2020

Also, can you add support for cron files and bump the version to 1.1.0

I first thought about using systemd in a container that manages all the custom services or scripts. But you will anyway have to use the ssh_proxy to start everything one level heigher.
With this approach, I don't see an advantage to have an own systemd container, we could just use the already existing systemd process of the unifi-os container.
Except someone has an idea without every systemd unit file has to call the ssh_proxy.
I don't know a simple way to execute automatically everything through the ssh_proxy.
Ideas would be welcome 🤠

@spali
Copy link
Contributor Author

spali commented Sep 6, 2020

just made a issue to discuss the "service management" topic independent from this.
#46

@spali spali force-pushed the build_improvements branch from c52809a to 7df47b8 Compare September 6, 2020 10:19
@boostchicken boostchicken merged commit 282b9bd into unifi-utilities:master Sep 8, 2020
@spali spali deleted the build_improvements branch September 8, 2020 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants