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

feat(services): add service auto-enable in multiuser target #40197

Merged
merged 12 commits into from
Jan 23, 2025
5 changes: 4 additions & 1 deletion docker.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package:
name: docker
version: "27.5.1"
epoch: 0
epoch: 1
description: A meta package for Docker Engine and Docker CLI
copyright:
- license: Apache-2.0
Expand Down Expand Up @@ -188,9 +188,12 @@ subpackages:
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/lib/systemd/system/
mkdir -p ${{targets.subpkgdir}}/usr/lib/systemd/system-preset/
install -Dm644 contrib/init/systemd/docker.socket "${{targets.subpkgdir}}"/usr/lib/systemd/system/
install -Dm644 contrib/init/systemd/docker.service "${{targets.subpkgdir}}"/usr/lib/systemd/system/
sed -i "s|\[Service\]|[Service]\nEnvironment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"|g" "${{targets.subpkgdir}}"/usr/lib/systemd/system/docker.service
echo "enable docker.service" > "${{targets.subpkgdir}}/usr/lib/systemd/system-preset/81-docker.preset"
echo "enable docker.socket" >> "${{targets.subpkgdir}}/usr/lib/systemd/system-preset/81-docker.preset"

update:
enabled: true
Expand Down
4 changes: 3 additions & 1 deletion openssh.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package:
name: openssh
version: 9.9_p1
epoch: 3
epoch: 4
description: "the OpenBSD SSH implementation"
copyright:
- license: ISC
Expand Down Expand Up @@ -151,7 +151,9 @@ subpackages:
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/lib/systemd/system
mkdir -p ${{targets.subpkgdir}}/usr/lib/systemd/system-preset/
install -Dm644 sshd.service "${{targets.subpkgdir}}"/usr/lib/systemd/system
echo "enable sshd.service" > "${{targets.subpkgdir}}/usr/lib/systemd/system-preset/80-sshd.preset"
dependencies:
runtime:
- systemd
Expand Down
12 changes: 8 additions & 4 deletions systemd.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package:
name: systemd
version: "257.2"
epoch: 7
epoch: 8
description: The systemd System and Service Manager
copyright:
- license: LGPL-2.1-or-later AND GPL-2.0-or-later
Expand Down Expand Up @@ -369,17 +369,21 @@ subpackages:
runtime:
- ${{package.name}}
- tzdata
- agetty
- mount
- kbd
- agetty
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/etc ${{targets.subpkgdir}}/sbin
ln -s ../usr/lib/systemd/systemd ${{targets.subpkgdir}}/sbin/init
ln -sf ../usr/share/zoneinfo/UTC ${{targets.subpkgdir}}/etc/localtime
ln -s ../run/systemd/resolve/stub-resolv.conf "${{targets.subpkgdir}}/etc/resolv.conf"
echo "uninitialized" > "${{targets.subpkgdir}}/etc/machine-id"
test:
pipeline:
- runs: |
[ -f /sbin/init -a -x /sbin/init ]
[ -f /etc/localtime ]
grep "uninitialized" /etc/machine-id

- name: "systemd-default-network"
description: "Configure network to DHCP on default interfaces"
Expand Down Expand Up @@ -531,5 +535,5 @@ test:
rm test.c test_systemd
- name: "Verify stanalone binaries removed"
runs: |
STANDALONE_BINARIES=$(find / -name '*.standalone')
STANDALONE_BINARIES=$(find /usr -name '*.standalone' )
test -z "${STANDALONE_BINARIES}"
Loading