Skip to content

Commit

Permalink
pack cgroups with debian image
Browse files Browse the repository at this point in the history
  • Loading branch information
rawalexe committed Feb 7, 2025
1 parent 169e3c4 commit 376c3f3
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 12 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ set(CPACK_PACKAGE_CONTACT

set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)

set(CPACK_DEBIAN_PACKAGE_DEPENDS "cgroup-tools (>= 2.0)")

set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
${CMAKE_CURRENT_SOURCE_DIR}/debian/postinst
${CMAKE_CURRENT_SOURCE_DIR}/debian/postrm
Expand Down
2 changes: 1 addition & 1 deletion debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ mkdir -p "${gg_workingdir}"

chown "${gg_user}":"${gg_group}" "${gg_workingdir}"

systemd-tmpfiles --create
systemctl restart systemd-tmpfiles-clean.service

systemctl enable greengrass-lite.target
systemctl enable ggl.aws_iot_tes.socket
Expand Down
1 change: 1 addition & 0 deletions debian/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ elif [ "$1" = "remove" ]; then

echo "Removing group ${ggc_group}..."
delete_group "${ggc_group}"

fi
2 changes: 1 addition & 1 deletion misc/buildtestcontainer/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apt-get update \
systemd systemd-sysv dbus ca-certificates sudo nano bash-completion \
build-essential pkg-config cmake git curl file gdb python3 \
libssl-dev libcurl4-openssl-dev libsqlite3-dev sqlite3 libyaml-dev \
libsystemd-dev liburiparser-dev uuid-dev libevent-dev libzip-dev \
libsystemd-dev liburiparser-dev uuid-dev libevent-dev cgroup-tools libzip-dev \
&& apt-get clean

COPY ./getty-override.conf \
Expand Down
11 changes: 1 addition & 10 deletions misc/container/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,12 @@ ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt-get -y install --no-install-recommends \
systemd systemd-sysv dbus ca-certificates sudo nano bash-completion cgroup-tools \
build-essential pkg-config cmake git curl file gdb python3 python3-pip python3-venv \
libssl-dev libcurl4-openssl-dev libsqlite3-dev sqlite3 libyaml-dev \
libsystemd-dev liburiparser-dev uuid-dev libevent-dev libzip-dev \
systemd systemd-sysv dbus ca-certificates sudo nano bash-completion \
&& apt-get clean

COPY ./getty-override.conf \
/etc/systemd/system/console-getty.service.d/override.conf

RUN groupadd gg_component && useradd -Ng gg_component gg_component

RUN groupadd ggcore && useradd -Ng ggcore ggcore

RUN echo "export MAKEFLAGS=-j" >> /root/.profile


Expand All @@ -24,5 +17,3 @@ CMD ["/lib/systemd/systemd"]
RUN mkdir -p /etc/greengrass/config.d
COPY ./01defaults.yaml \
/etc/greengrass/config.d/01defaults.yaml
RUN mkdir -p /var/lib/greengrass && \
chown ggcore:ggcore /var/lib/greengrass
1 change: 1 addition & 0 deletions misc/staticbuildtestcontainer/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ RUN apt-get update && apt-get -y install --no-install-recommends \
libevent-dev \
libsqlite3-dev \
libsystemd-dev \
cgroup-tools \
liburiparser-dev \
libyaml-dev \
sqlite3 \
Expand Down

0 comments on commit 376c3f3

Please sign in to comment.