Skip to content

Commit

Permalink
Two flavours for AlmaLinux.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Jul 1, 2024
1 parent 443bd2b commit eead448
Show file tree
Hide file tree
Showing 29 changed files with 163 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dh_pub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- cron: '30 8 * * 5'
push:
branches: [ "main" ]
paths:
paths:
- "build_version"
- ".github/workflows/**_pub.yml"

Expand All @@ -28,7 +28,7 @@ jobs:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Log in to ${{ env.REGISTRY }}
uses: redhat-actions/podman-login@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion build_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024m05a
2024m27a
21 changes: 21 additions & 0 deletions src/alma/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ARG ALMA_CHANNEL=9

FROM docker.io/almalinux:${ALMA_CHANNEL}

# Set working environment up
WORKDIR /root

# Copy and run
COPY ./shared/etc/ /etc/
COPY ./shared/sh/ /root/gel/shared/sh
COPY ./etc/ /etc/
COPY ./sh/ /root/gel/distro/sh
RUN bash /root/gel/distro/sh/init.sh
RUN bash /root/gel/shared/sh/setup.sh
RUN bash /root/gel/distro/sh/setup.sh
RUN bash /root/gel/shared/sh/post.sh

# Run forever
EXPOSE 1122
CMD ["/sbin/init"]
#CMD ["sleep", "infinity"]
1 change: 1 addition & 0 deletions src/alma/docker-compose.yml
10 changes: 10 additions & 0 deletions src/alma/etc/dnf/dnf.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# see `man dnf.conf` for defaults and possible options

[main]
gpgcheck=True
installonly_limit=3
clean_requirements_on_remove=True
best=False
skip_if_unavailable=True
tsflags=nodocs
zchunk=False
1 change: 1 addition & 0 deletions src/alma/etc/zsh/.customShellName
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Alma
1 change: 1 addition & 0 deletions src/alma/sh/all
1 change: 1 addition & 0 deletions src/alma/sh/amd64
1 change: 1 addition & 0 deletions src/alma/sh/arm64
7 changes: 7 additions & 0 deletions src/alma/sh/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
dnf update -y
dnf install -y 'dnf-command(config-manager)'
dnf config-manager --set-enabled crb
dnf install -y epel-release
dnf install -y util-linux-user which zsh
exit
19 changes: 19 additions & 0 deletions src/alma/sh/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
echo "Pre-install..."
rm -f /etc/dnf/protected.d/sudo.conf
dnf remove -y sudo
echo "Installation stage 1..."
dnf install -y ca-certificates
echo "Installation stage 2..."
dnf install -y systemd gpg bash zsh openssh-server shadow-utils \
unzip zip tar bzip2 lzip brotli zopfli pigz lbzip2 xz \
net-tools bind-utils iputils traceroute tcptraceroute psmisc iptables-nft procps-ng dnsmasq \
nano tree netcat socat pv git screen htop sqlite
echo "Installation stage 3..."
dnf install -y libstdc++
bash raw.sh opendoas-6.8.2.rpm
echo "Removing unnecessary files..."
rm -fv /lib/systemd/system/anaconda.target.wants/*
echo "Post-install..."
mkdir -p /run/sshd
exit
1 change: 1 addition & 0 deletions src/alma/sh/raw.sh
12 changes: 12 additions & 0 deletions src/alma/sh/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
cd ~root/gel/distro/sh
sed -i "s/__FLAVOUR__/AlmaLinux/g" $PREFIX/etc/motd
#bash init.sh
bash install.sh
#dnf clean dbcache
dnf clean all
echo "Applying ZSH key fix..."
echo 'bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
bindkey "^[[3~" delete-char' >> $PREFIX/etc/skel/.zshrc
exit
1 change: 1 addition & 0 deletions src/alma/shared
21 changes: 21 additions & 0 deletions src/slimalma/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ARG ALMA_CHANNEL=9

FROM docker.io/almalinux:${ALMA_CHANNEL}

# Set working environment up
WORKDIR /root

# Copy and run
COPY ./shared/etc/ /etc/
COPY ./shared/sh/ /root/gel/shared/sh
COPY ./etc/ /etc/
COPY ./sh/ /root/gel/distro/sh
RUN bash /root/gel/distro/sh/init.sh
RUN bash /root/gel/shared/sh/setup.sh
RUN bash /root/gel/distro/sh/setup.sh
RUN bash /root/gel/shared/sh/post.sh

# Run forever
EXPOSE 1122
CMD ["/sbin/init"]
#CMD ["sleep", "infinity"]
1 change: 1 addition & 0 deletions src/slimalma/docker-compose.yml
10 changes: 10 additions & 0 deletions src/slimalma/etc/dnf/dnf.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# see `man dnf.conf` for defaults and possible options

[main]
gpgcheck=True
installonly_limit=3
clean_requirements_on_remove=True
best=False
skip_if_unavailable=True
tsflags=nodocs
zchunk=False
1 change: 1 addition & 0 deletions src/slimalma/etc/zsh/.customShellName
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rocky
1 change: 1 addition & 0 deletions src/slimalma/sh/all
1 change: 1 addition & 0 deletions src/slimalma/sh/amd64
1 change: 1 addition & 0 deletions src/slimalma/sh/arm64
1 change: 1 addition & 0 deletions src/slimalma/sh/cleanup.sh
7 changes: 7 additions & 0 deletions src/slimalma/sh/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
dnf update -y
dnf install -y 'dnf-command(config-manager)'
dnf config-manager --set-enabled crb
dnf install -y epel-release
dnf install -y util-linux-user which zsh
exit
23 changes: 23 additions & 0 deletions src/slimalma/sh/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
echo "Pre-install..."
rm -f /etc/dnf/protected.d/sudo.conf
dnf remove -y sudo
echo "Installation stage 1..."
dnf install -y ca-certificates
echo "Installation stage 2..."
dnf install -y systemd bash zsh openssh-server shadow-utils \
unzip zip tar bzip2 brotli xz \
net-tools bind-utils iputils psmisc iptables-nft procps-ng dnsmasq \
nano tree netcat pv sqlite
echo "Installation stage 3..."
dnf install -y libstdc++
#bash raw.sh bind9-next-license-9.19.11.rpm
#bash raw.sh bind9-next-libs-9.19.11.rpm
#bash raw.sh bind9-next-utils-9.19.11.rpm
#bash raw.sh lziprecover-1.23-3.rpm
bash raw.sh opendoas-6.8.2.rpm
echo "Removing unnecessary files..."
rm -fv /lib/systemd/system/anaconda.target.wants/*
echo "Post-install..."
mkdir -p /run/sshd
exit
1 change: 1 addition & 0 deletions src/slimalma/sh/raw.sh
13 changes: 13 additions & 0 deletions src/slimalma/sh/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
cd ~root/gel/distro/sh
sed -i "s/__FLAVOUR__/AlmaLinux Slim/g" $PREFIX/etc/motd
#bash init.sh
bash install.sh
#dnf clean dbcache
dnf clean all
bash cleanup.sh
echo "Applying ZSH key fix..."
echo 'bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
bindkey "^[[3~" delete-char' >> $PREFIX/etc/skel/.zshrc
exit
1 change: 1 addition & 0 deletions src/slimalma/shared
2 changes: 1 addition & 1 deletion src/slimrock/sh/setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
cd ~root/gel/distro/sh
sed -i "s/__FLAVOUR__/Rocky Linux/g" $PREFIX/etc/motd
sed -i "s/__FLAVOUR__/Rocky Linux Slim/g" $PREFIX/etc/motd
#bash init.sh
bash install.sh
#dnf clean dbcache
Expand Down
2 changes: 1 addition & 1 deletion src/slimsuse/sh/setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
cd ~root/gel/distro/sh
sed -i "s/__FLAVOUR__/openSUSE/g" $PREFIX/etc/motd
sed -i "s/__FLAVOUR__/openSUSE Slim/g" $PREFIX/etc/motd
bash install.sh
bash cleanup.sh
zypper clean -a
Expand Down

0 comments on commit eead448

Please sign in to comment.