-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔖 release v0.6.1 - deb/rpm binary packages
- Loading branch information
Showing
10 changed files
with
150 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
target/ | ||
.config.toml |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,26 @@ | ||
FROM rust:1.54-slim | ||
WORKDIR . | ||
|
||
debian: | ||
RUN apt-get update | ||
RUN apt-get install -y gnulib | ||
RUN cargo install cargo-deb | ||
COPY Cargo.toml ./ | ||
COPY Cargo.lock ./ | ||
COPY src src | ||
COPY pkg pkg | ||
COPY README.md README.md | ||
RUN cargo deb | ||
SAVE ARTIFACT /target/debian /debian AS LOCAL target/debian | ||
|
||
rpm: | ||
RUN apt-get update | ||
RUN apt-get install -y rpm | ||
RUN cargo install --git https://github.com/iqlusioninc/cargo-rpm | ||
COPY Cargo.toml ./ | ||
COPY Cargo.lock ./ | ||
COPY src src | ||
COPY pkg pkg | ||
COPY README.md README.md | ||
RUN cargo rpm build | ||
SAVE ARTIFACT /target/release/rpmbuild /rpm AS LOCAL target/release/rpmbuild |
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 @@ | ||
# the presence of this file will break aeneid --init |
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,34 @@ | ||
# adapted from PostgreSQL postgresql-common.postinst | ||
if [ "$1" = configure ]; then | ||
# Make sure the administrative user exists | ||
if ! getent passwd aeneid > /dev/null; then | ||
adduser --system $quiet --home /etc/aeneid --no-create-home \ | ||
--shell /bin/bash --group --gecos "aeneid user" aeneid | ||
fi | ||
# if the user was created manually, make sure the group is there as well | ||
if ! getent group aeneid > /dev/null; then | ||
addgroup --system $quiet aeneid | ||
fi | ||
# make sure aeneid is in the aeneid group | ||
if ! id -Gn aeneid | grep -qw aeneid; then | ||
adduser $quiet aeneid aeneid | ||
fi | ||
|
||
# check validity of aeneid user and group | ||
if [ "`id -u aeneid`" -eq 0 ]; then | ||
echo "The aeneid system user must not have uid 0 (root). | ||
Please fix this and reinstall this package." >&2 | ||
exit 1 | ||
fi | ||
if [ "`id -g aeneid`" -eq 0 ]; then | ||
echo "The aeneid system user must not have root as primary group. | ||
Please fix this and reinstall this package." >&2 | ||
exit 1 | ||
fi | ||
|
||
# ensure config directory ownership | ||
mkdir -p /etc/aeneid | ||
su -s /bin/sh aeneid -c "test -O /etc/aeneid && | ||
test -G /etc/aeneid" || \ | ||
chown -R aeneid:aeneid /etc/aeneid | ||
fi |
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,42 @@ | ||
%define __spec_install_post %{nil} | ||
%define __os_install_post %{_dbpath}/brp-compress | ||
%define debug_package %{nil} | ||
|
||
Name: aeneid | ||
Summary: use GitHub as a free, zero-ops Identity Provider | ||
Version: @@VERSION@@ | ||
Release: @@RELEASE@@%{?dist} | ||
License: GPLv3 | ||
Group: Applications/System | ||
Source0: %{name}-%{version}.tar.gz | ||
URL: https://nikhiljha.com/projects/ | ||
|
||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | ||
|
||
%description | ||
%{summary} | ||
|
||
%prep | ||
%setup -q | ||
|
||
%install | ||
rm -rf %{buildroot} | ||
mkdir -p %{buildroot} | ||
cp -a * %{buildroot} | ||
|
||
%clean | ||
rm -rf %{buildroot} | ||
|
||
%files | ||
%defattr(-,root,root,-) | ||
%{_bindir}/* | ||
%config(noreplace) %{_sysconfdir}/aeneid/config.toml | ||
|
||
%post | ||
# create aeneid user | ||
groupadd -r aeneid >/dev/null 2>&1 || : | ||
useradd -M -n -g aeneid -r -d /etc/aeneid -s /bin/bash \ | ||
-c "aeneid user" aeneid >/dev/null 2>&1 || : | ||
# create directories so aeneid can store caches and read config files | ||
install -d -o aeneid -g aeneid /etc/aeneid | ||
chown -R aeneid:aeneid /etc/aeneid |
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