Skip to content

Commit

Permalink
Add overlayfs-tools back as submodule
Browse files Browse the repository at this point in the history
Now that the project is being actively maintained it makes more sense to
have it included as a submodule, rather than maintaining a separate copy
of the code for this project.

Signed-off-by: Ethan Dye <mrtops03@gmail.com>
  • Loading branch information
ecdye committed Jul 1, 2024
1 parent 054bdde commit ded9bb2
Show file tree
Hide file tree
Showing 18 changed files with 34 additions and 1,088 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup environment
id: setup
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "overlayfs-tools"]
path = overlayfs-tools
url = https://www.github.com/kmxz/overlayfs-tools
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Experimental Alpine support has also been added, other distributions may work bu

``` shell
sudo apt-get install git
git clone https://github.com/ecdye/zram-config
git clone --recurse-submodules https://github.com/ecdye/zram-config
sudo ./zram-config/install.bash
```

Expand Down
18 changes: 10 additions & 8 deletions install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ if [[ -s /usr/local/sbin/zram-config ]] || [[ -s /usr/sbin/zram-config ]]; then
exit 1
fi

if [[ $OS == "alpine" ]] && ! [[ "$(apk info 2> /dev/null | grep -E '^(gcc|make|fts-dev|linux-headers|util-linux-misc|musl-dev)' | tr '\n' ' ')" == "fts-dev gcc make util-linux-misc musl-dev linux-headers " ]]; then
echo "Installing needed packages (gcc, make, fts-dev, linux-headers, util-linux-misc, musl-dev)"
apk add gcc make fts-dev linux-headers util-linux-misc musl-dev || exit 1
elif ! dpkg -s 'gcc' 'make' 'libc6-dev' &> /dev/null; then
echo "Installing needed packages (gcc, make, libc6-dev)"
apt-get install --yes gcc make libc6-dev || exit 1
if [[ $OS == "alpine" ]] && ! [[ "$(apk info 2> /dev/null | grep -E '^(gcc|meson|fts-dev|linux-headers|util-linux-misc|musl-dev)' | tr '\n' ' ')" == "fts-dev gcc meson util-linux-misc musl-dev linux-headers " ]]; then
echo "Installing needed packages (gcc, meson, fts-dev, linux-headers, util-linux-misc, musl-dev)"
apk add gcc meson fts-dev linux-headers util-linux-misc musl-dev || exit 1
elif ! dpkg -s 'gcc' 'meson' 'libc6-dev' &> /dev/null; then
echo "Installing needed packages (gcc, meson, libc6-dev)"
apt-get install --yes gcc meson libc6-dev || exit 1
fi

UBUNTU_VERSION="$(grep -o '^VERSION_ID=.*$' /etc/os-release | cut -d'=' -f2 | tr -d '"')"
Expand All @@ -45,7 +45,10 @@ if [[ $OS == "ubuntu" ]] && [[ $(bc -l <<< "$UBUNTU_VERSION >= 21.10") -eq 1 ]];
fi
fi

make --always-make --directory="${BASEDIR}/overlayfs-tools"
rm -rf "$BASEDIR"/overlayfs-tools/builddir
meson setup "$BASEDIR"/overlayfs-tools/builddir "$BASEDIR"/overlayfs-tools || exit 1
meson compile -C "$BASEDIR"/overlayfs-tools/builddir || exit 1
meson install -C "$BASEDIR"/overlayfs-tools/builddir || exit 1

echo "Installing zram-config files"
if [[ "$OS" == "alpine" ]]; then
Expand All @@ -62,7 +65,6 @@ ln -s /usr/local/share/zram-config/log /var/log/zram-config
install -m 755 "$BASEDIR"/uninstall.bash /usr/local/share/zram-config/uninstall.bash
install -m 644 "$BASEDIR"/service/zram-config.logrotate /etc/logrotate.d/zram-config
mkdir -p /usr/local/lib/zram-config/
install -m 755 "$BASEDIR"/overlayfs-tools/overlay /usr/local/lib/zram-config/overlay

echo "Starting zram-config service"
if [[ "$OS" == "alpine" ]]; then
Expand Down
1 change: 1 addition & 0 deletions overlayfs-tools
Submodule overlayfs-tools added at 162a5b
42 changes: 0 additions & 42 deletions overlayfs-tools/README.md

This file was deleted.

Loading

0 comments on commit ded9bb2

Please sign in to comment.