#! /bin/bash # Bubblewrap # Source: https://github.com/projectatomic/bubblewrap/releases/download/v0.5.0/bubblewrap-0.5.0.tar.xz # # $BUILD = Directory to temporarily install # $PKGS = Directory to store built packages # # DEPS # Required: NONE # Recommended: NONE # Optional: NONE # If optimizing with GCC: export CFLAGS="-march=native -pipe " export CFLAGS+="-fno-lto -fstack-protector-strong -fzero-call-used-regs=used " export CXXFLAGS=$CFLAGS unset LDFLAGS NOCONFIGURE=1 ./autogen.sh ./configure --prefix=/usr --with-priv-mode=setuid $BUILDTRUPLE && read -p "Compile?" && make -j2 && sudo -S make DESTDIR=$BUILD install && sudo -S mkdir -pv /BMAN/install && \ sudo -S mkdir -pv /BMAN/usr && \ sudo -S mv $BUILD/usr/share /BMAN/usr/ && \ cd $BUILD && sudo -S mkdir -v ${BUILD}/install && cat > /tmp/slack-desc << "EOF" # HOW TO EDIT THIS FILE: # The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' # on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| bubblewrap: bubblewrap (unprivileged sandboxing tool) bubblewrap: bubblewrap: Many container runtimes focus on providing infrastructure for bubblewrap: system administrators and orchestration tools to run containers. bubblewrap: bubblewrap: Bubblewrap provides container runtime for unprivileged users, which bubblewrap: reduces the surface area for privilege escalation. bubblewrap: bubblewrap: bubblewrap: bubblewrap: EOF sudo -S mv -v /tmp/slack-desc install/ && sudo -S makepkg -l y -c n $PKGS/bubblewrap-0.5.0-$(uname -m)-mlfs.txz && cd /BMAN && \ cat > /tmp/slack-desc << "EOF" bubblewrap-doc: Manuals for (unprivileged sandboxing tool) bubblewrap-doc: bubblewrap-doc: Many container runtimes focus on providing infrastructure for bubblewrap-doc: system administrators and orchestration tools to run containers. bubblewrap-doc: bubblewrap-doc: Bubblewrap provides container runtime for unprivileged users, which bubblewrap-doc: reduces the surface area for privilege escalation. bubblewrap-doc: EOF sudo -S mv -v /tmp/slack-desc install/ && sudo -S makepkg -l y -c n $PKGS/bubblewrap-doc-0.5.0-noarch-mlfs.txz && \ sudo -S rm -rf ${BUILD}/* /BMAN/*