Skip to content

Commit

Permalink
Merge pull request #285 from himmelblau-idm/dmulder/packaging
Browse files Browse the repository at this point in the history
Packaging additions
  • Loading branch information
dmulder authored Nov 8, 2024
2 parents 20d06b7 + c8b143e commit f91aa91
Show file tree
Hide file tree
Showing 8 changed files with 491 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ deb:
rpm:
mkdir -p ./packaging/
git submodule init; git submodule update
for v in rocky8 rocky9 tumbleweed; do \
for v in rocky8 rocky9 sle15sp6 tumbleweed rawhide fedora41; do \
echo "Building $$v RPM packages"; \
$(DOCKER) build -t himmelblau-$$v-build -f images/rpm/Dockerfile.$$v .; \
$(DOCKER) run --rm -it -v ./:/himmelblau himmelblau-$$v-build; \
Expand Down
40 changes: 40 additions & 0 deletions images/rpm/Dockerfile.fedora41
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Use the official Fedora 41 image as the base
FROM fedora:41

# Update the package list and install essential build dependencies
RUN dnf -y update && \
dnf -y install \
wget \
git \
gcc \
gcc-c++ \
make \
openssl-devel \
dbus-devel \
libtool \
pkg-config \
autoconf \
pam-devel \
systemd-devel \
krb5-devel \
pcre2-devel \
clang \
gettext \
sqlite-devel \
utf8proc-devel \
cargo && \
dnf clean all

# Set environment for Rust
ENV PATH="/root/.cargo/bin:${PATH}"

VOLUME /himmelblau

# Change directory to the repository
WORKDIR /himmelblau

# Install the cargo-deb tool
RUN cargo install cargo-generate-rpm

# Build the project and create the RPM package
CMD cargo clean && cargo build --release && strip -s target/release/*.so && strip -s target/release/aad-tool && strip -s target/release/himmelblaud && strip -s target/release/himmelblaud_tasks && strip -s target/release/broker && cargo generate-rpm -p src/daemon && cargo generate-rpm -p src/nss && cargo generate-rpm -p src/pam && cargo generate-rpm -p src/sshd-config
40 changes: 40 additions & 0 deletions images/rpm/Dockerfile.rawhide
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Use the official Fedora Rawhide image as the base
FROM fedora:rawhide

# Update the package list and install essential build dependencies
RUN dnf -y update && \
dnf -y install \
wget \
git \
gcc \
gcc-c++ \
make \
openssl-devel \
dbus-devel \
libtool \
pkg-config \
autoconf \
pam-devel \
systemd-devel \
krb5-devel \
pcre2-devel \
clang \
gettext \
sqlite-devel \
utf8proc-devel \
cargo && \
dnf clean all

# Set environment for Rust
ENV PATH="/root/.cargo/bin:${PATH}"

VOLUME /himmelblau

# Change directory to the repository
WORKDIR /himmelblau

# Install the cargo-deb tool
RUN cargo install cargo-generate-rpm

# Build the project and create the RPM package
CMD cargo clean && cargo build --release && strip -s target/release/*.so && strip -s target/release/aad-tool && strip -s target/release/himmelblaud && strip -s target/release/himmelblaud_tasks && strip -s target/release/broker && cargo generate-rpm -p src/daemon && cargo generate-rpm -p src/nss && cargo generate-rpm -p src/pam && cargo generate-rpm -p src/sshd-config
41 changes: 41 additions & 0 deletions images/rpm/Dockerfile.sle15sp6
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Use the official openSUSE Leap 15.6 image as the base
FROM opensuse/leap:15.6

# Update the package list and install essential build dependencies
RUN zypper --non-interactive refresh && zypper --non-interactive update && \
zypper --non-interactive install --no-recommends \
wget \
git \
gcc \
gcc-c++ \
make \
libopenssl-3-devel \
dbus-1-devel \
libtool \
pkg-config \
autoconf \
pam-devel \
systemd-devel \
libcap-progs \
krb5-devel \
pcre2-devel \
clang \
gettext-tools \
sqlite3-devel \
utf8proc-devel \
cargo \
&& zypper clean --all

# Set environment for Rust
ENV PATH="/root/.cargo/bin:${PATH}"

VOLUME /himmelblau

# Change directory to the repository
WORKDIR /himmelblau

# Install the cargo-deb tool
RUN cargo install cargo-generate-rpm

# Build the project and create the RPM package
CMD cargo clean && cargo build --release && strip -s target/release/*.so && strip -s target/release/aad-tool && strip -s target/release/himmelblaud && strip -s target/release/himmelblaud_tasks && strip -s target/release/broker && cargo generate-rpm -p src/daemon && cargo generate-rpm -p src/nss && cargo generate-rpm -p src/pam && cargo generate-rpm -p src/sshd-config
Loading

0 comments on commit f91aa91

Please sign in to comment.