-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #268 from himmelblau-idm/dmulder/rpm_packaging
Add RPM packaging for EL9
- Loading branch information
Showing
8 changed files
with
133 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Use the official Rocky Linux 9 image as the base | ||
FROM rockylinux:9 | ||
|
||
# Set environment variables for non-interactive installs | ||
ENV YUM_VERSION=8 | ||
|
||
# Install epel-release (Extra Packages for Enterprise Linux) for utf8proc-devel | ||
#RUN yum update -y && yum install -y epel-release | ||
|
||
# Install essential build dependencies | ||
RUN yum update -y && yum install -y \ | ||
wget \ | ||
git \ | ||
gcc \ | ||
gcc-c++ \ | ||
make \ | ||
openssl-devel \ | ||
dbus-devel \ | ||
libtool \ | ||
pkgconfig \ | ||
autoconf \ | ||
pam-devel \ | ||
systemd-devel \ | ||
libcap-devel \ | ||
krb5-devel \ | ||
pcre2-devel \ | ||
clang \ | ||
gettext \ | ||
sqlite-devel \ | ||
utf8proc \ | ||
&& yum clean all | ||
|
||
# Fetch the utf8proc sources, since EL9 doesn't package the headers | ||
RUN if ! rpm -q utf8proc; then \ | ||
echo "utf8proc is not installed."; \ | ||
exit 1; \ | ||
else \ | ||
VERSION=$(rpm -q --queryformat '%{VERSION}' utf8proc); \ | ||
echo "Installed utf8proc version: $VERSION"; \ | ||
wget https://github.com/JuliaStrings/utf8proc/archive/refs/tags/v$VERSION.tar.gz -O utf8proc-$VERSION.tar.gz; \ | ||
fi && \ | ||
mkdir -p utf8proc-rocky9 && \ | ||
tar -xvf utf8proc-$VERSION.tar.gz -C utf8proc-rocky9 --strip-components=1 && \ | ||
cd utf8proc-rocky9 && \ | ||
make && \ | ||
make install | ||
|
||
# Install Rust (latest stable) | ||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
|
||
# 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 .deb 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,3 +60,31 @@ assets = [ | |
["target/release/broker", "usr/sbin/", "755"], | ||
["../../README.md", "usr/share/doc/himmelblau/README", "644"], | ||
] | ||
|
||
[package.metadata.generate-rpm] | ||
name = "himmelblau" | ||
maintainer = "David Mulder <[email protected]>" | ||
assets = [ | ||
{ source = "../../src/config/himmelblau.conf.example", dest = "/etc/himmelblau/himmelblau.conf", mode = "644" }, | ||
{ source = "target/release/aad-tool", dest = "/usr/bin/", mode = "755" }, | ||
{ source = "../../platform/opensuse/himmelblaud-tasks.service", dest = "/usr/lib/systemd/system", mode = "644" }, | ||
{ source = "../../platform/opensuse/himmelblaud.service", dest = "/usr/lib/systemd/system", mode = "644" }, | ||
{ source = "../../platform/opensuse/org.samba.himmelblau.conf", dest = "/usr/share/dbus-1/system.d/", mode = "644" }, | ||
{ source = "../../platform/opensuse/com.microsoft.identity.broker1.service", dest = "/usr/share/dbus-1/services/", mode = "644" }, | ||
{ source = "target/release/himmelblaud", dest = "/usr/sbin/", mode = "755" }, | ||
{ source = "target/release/himmelblaud_tasks", dest = "/usr/sbin/", mode = "755" }, | ||
{ source = "target/release/broker", dest = "/usr/sbin/", mode = "755" }, | ||
{ source = "../../README.md", dest = "/usr/share/doc/himmelblau/README", mode = "644" }, | ||
] | ||
|
||
[package.metadata.generate-rpm.requires] | ||
openssl-3 = "*" | ||
sqlite3 = "*" | ||
|
||
[package.metadata.generate-rpm.recommends] | ||
nss-himmelblau = "*" | ||
pam-himmelblau = "*" | ||
# These are labeled as recommends so there isn't a hard failure. SUSE uses | ||
# 'libutf8proc3', while EL uses 'utf8proc3'. One of these two is required. | ||
utf8proc3 = "*" | ||
libutf8proc3 = "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[package] | ||
name = "nss_himmelblau" | ||
description = "Himmelblau NSS Module" | ||
|
||
version = { workspace = true } | ||
authors = { workspace = true } | ||
|
@@ -28,3 +29,10 @@ maintainer = "David Mulder <[email protected]>" | |
assets = [ | ||
["target/release/libnss_himmelblau.so", "usr/lib/x86_64-linux-gnu/libnss_himmelblau.so.2", "755"], | ||
] | ||
|
||
[package.metadata.generate-rpm] | ||
name = "nss-himmelblau" | ||
maintainer = "David Mulder <[email protected]>" | ||
assets = [ | ||
{ source = "target/release/libnss_himmelblau.so", dest = "/usr/lib64/libnss_himmelblau.so.2", mode = "755" }, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[package] | ||
name = "pam_himmelblau" | ||
description = "Himmelblau PAM Module" | ||
links = "pam" | ||
|
||
version.workspace = true | ||
|
@@ -33,3 +34,10 @@ assets = [ | |
["../../platform/debian/apparmor.unix-chkpwd.local", "etc/apparmor.d/local/unix-chkpwd", "644"], | ||
] | ||
maintainer-scripts = "../../platform/debian/scripts" | ||
|
||
[package.metadata.generate-rpm] | ||
name = "pam-himmelblau" | ||
maintainer = "David Mulder <[email protected]>" | ||
assets = [ | ||
{ source = "target/release/libpam_himmelblau.so", dest = "/usr/lib64/security/pam_himmelblau.so", mode = "755" }, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters