whonix: Updated to Whonix 9.4 base. Removed all patches to Whonix code and installed grub and replaced update-grub with link to /bin/true
This commit is contained in:
parent
581529856c
commit
60ccebc8b7
@ -1,15 +0,0 @@
|
|||||||
Package: grub-pc
|
|
||||||
Pin: version *
|
|
||||||
Pin-Priority: -100
|
|
||||||
|
|
||||||
Package: grub-pc-bin
|
|
||||||
Pin: version *
|
|
||||||
Pin-Priority: -100
|
|
||||||
|
|
||||||
Package: grub-common
|
|
||||||
Pin: version *
|
|
||||||
Pin-Priority: -100
|
|
||||||
|
|
||||||
Package: grub2-common
|
|
||||||
Pin: version *
|
|
||||||
Pin-Priority: -100
|
|
@ -78,37 +78,6 @@ sudo ~/Whonix/whonix_build \
|
|||||||
popd
|
popd
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
# Pin grub so it won't install
|
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
read -r -d '' WHONIX_APT_PIN <<'EOF' || true
|
|
||||||
Package: grub-pc
|
|
||||||
Pin: version *
|
|
||||||
Pin-Priority: -100
|
|
||||||
|
|
||||||
Package: grub-pc-bin
|
|
||||||
Pin: version *
|
|
||||||
Pin-Priority: -100
|
|
||||||
|
|
||||||
Package: grub-common
|
|
||||||
Pin: version *
|
|
||||||
Pin-Priority: -100
|
|
||||||
|
|
||||||
Package: grub2-common
|
|
||||||
Pin: version *
|
|
||||||
Pin-Priority: -100
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
# Set defualts for apt not to install recommended or extra packages
|
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
read -r -d '' WHONIX_APT_PREFERENCES <<'EOF' || true
|
|
||||||
Acquire::Languages "none";
|
|
||||||
APT::Install-Recommends "false";
|
|
||||||
APT::Install-Suggests "false";
|
|
||||||
Dpkg::Options "--force-confold";
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Cleanup function
|
# Cleanup function
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@ -136,22 +105,16 @@ if ! [ -f "${INSTALLDIR}/tmp/.whonix_prepared" ]; then
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# Patch Whonix submodules
|
# Fake grub installation since Whonix has depends on grub-pc
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
|
mkdir -p "${INSTALLDIR}/boot/grub"
|
||||||
|
cp "${INSTALLDIR}/usr/lib/grub/i386-pc/"* "${INSTALLDIR}/boot/grub"
|
||||||
|
rm -f "${INSTALLDIR}/usr/sbin/update-grub"
|
||||||
|
chroot "${INSTALLDIR}" ln -s /bin/true /usr/sbin/update-grub
|
||||||
|
|
||||||
# Chekout a branch; create a branch first if it does not exist
|
# --------------------------------------------------------------------------
|
||||||
checkout_branch() {
|
|
||||||
branch=$(git symbolic-ref --short -q HEAD)
|
|
||||||
if ! [ "$branch" == "$1" ]; then
|
|
||||||
su $(logname) -c git checkout "$1" >/dev/null 2>&1 || \
|
|
||||||
{
|
|
||||||
su $(logname) -c git branch "$1"
|
|
||||||
su $(logname) -c git checkout "$1"
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# sed search and replace. return 0 if replace happened, otherwise 1
|
# sed search and replace. return 0 if replace happened, otherwise 1
|
||||||
|
# --------------------------------------------------------------------------
|
||||||
search_replace() {
|
search_replace() {
|
||||||
local search="$1"
|
local search="$1"
|
||||||
local replace="$2"
|
local replace="$2"
|
||||||
@ -159,57 +122,6 @@ if ! [ -f "${INSTALLDIR}/tmp/.whonix_prepared" ]; then
|
|||||||
sed -i.bak '/'"$search"'/,${s//'"$replace"'/;b};$q1' "$file"
|
sed -i.bak '/'"$search"'/,${s//'"$replace"'/;b};$q1' "$file"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Patch anon-meta-packages to not depend on grub-pc
|
|
||||||
pushd "${WHONIX_DIR}"
|
|
||||||
{
|
|
||||||
search_replace "grub-pc" "" "grml_packages" || :
|
|
||||||
}
|
|
||||||
popd
|
|
||||||
|
|
||||||
pushd "${WHONIX_DIR}/packages/anon-meta-packages/debian"
|
|
||||||
{
|
|
||||||
search1=" grub-pc,";
|
|
||||||
replace="";
|
|
||||||
|
|
||||||
#checkout_branch qubes
|
|
||||||
search_replace "$search1" "$replace" control && \
|
|
||||||
{
|
|
||||||
cd "${WHONIX_DIR}/packages/anon-meta-packages";
|
|
||||||
:
|
|
||||||
#sudo -E -u $(logname) make deb-pkg || :
|
|
||||||
#su $(logname) -c "dpkg-source --commit" || :
|
|
||||||
#git add .
|
|
||||||
#su $(logname) -c "git commit -am 'removed grub-pc depend'"
|
|
||||||
} || :
|
|
||||||
}
|
|
||||||
popd
|
|
||||||
|
|
||||||
pushd "${WHONIX_DIR}/packages/anon-shared-build-fix-grub/usr/lib/anon-dist/chroot-scripts-post.d"
|
|
||||||
{
|
|
||||||
search1="update-grub";
|
|
||||||
replace=":";
|
|
||||||
|
|
||||||
#checkout_branch qubes
|
|
||||||
search_replace "$search1" "$replace" 85_update_grub && \
|
|
||||||
{
|
|
||||||
cd "${WHONIX_DIR}/packages/anon-shared-build-fix-grub";
|
|
||||||
sudo -E -u $(logname) make deb-pkg || :
|
|
||||||
su $(logname) -c "EDITOR=/bin/true dpkg-source -q --commit . no_grub";
|
|
||||||
#git add . ;
|
|
||||||
#su $(logname) -c "git commit -am 'removed grub-pc depend'"
|
|
||||||
} || :
|
|
||||||
}
|
|
||||||
popd
|
|
||||||
|
|
||||||
pushd "${WHONIX_DIR}/build-steps.d"
|
|
||||||
{
|
|
||||||
search1=" check_for_uncommited_changes";
|
|
||||||
replace=" #check_for_uncommited_changes";
|
|
||||||
|
|
||||||
search_replace "$search1" "$replace" 1200_create-debian-packages || :
|
|
||||||
}
|
|
||||||
popd
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# Whonix system config dependancies
|
# Whonix system config dependancies
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
@ -222,10 +134,6 @@ if ! [ -f "${INSTALLDIR}/tmp/.whonix_prepared" ]; then
|
|||||||
chroot "${INSTALLDIR}" useradd -g user -G dialout,cdrom,floppy,sudo,audio,dip,video,plugdev -m -s /bin/bash user
|
chroot "${INSTALLDIR}" useradd -g user -G dialout,cdrom,floppy,sudo,audio,dip,video,plugdev -m -s /bin/bash user
|
||||||
}
|
}
|
||||||
|
|
||||||
# Pin grub packages so they will not install
|
|
||||||
echo "${WHONIX_APT_PIN}" > "${INSTALLDIR}/etc/apt/preferences.d/whonix_qubes"
|
|
||||||
chmod 0644 "${INSTALLDIR}/etc/apt/preferences.d/whonix_qubes"
|
|
||||||
|
|
||||||
# Install Whonix build scripts
|
# Install Whonix build scripts
|
||||||
echo "${WHONIX_BUILD_SCRIPT}" > "${INSTALLDIR}/home/user/whonix_build.sh"
|
echo "${WHONIX_BUILD_SCRIPT}" > "${INSTALLDIR}/home/user/whonix_build.sh"
|
||||||
chmod 0755 "${INSTALLDIR}/home/user/whonix_build.sh"
|
chmod 0755 "${INSTALLDIR}/home/user/whonix_build.sh"
|
||||||
@ -320,10 +228,6 @@ if [ -f "${INSTALLDIR}/tmp/.whonix_installed" ] && ! [ -f "${INSTALLDIR}/tmp/.wh
|
|||||||
sed -i "s/#alias/alias/g" "${INSTALLDIR}/home/user/.bashrc"
|
sed -i "s/#alias/alias/g" "${INSTALLDIR}/home/user/.bashrc"
|
||||||
sed -i "s/alias l='ls -CF'/alias l='ls -l'/g" "${INSTALLDIR}/home/user/.bashrc"
|
sed -i "s/alias l='ls -CF'/alias l='ls -l'/g" "${INSTALLDIR}/home/user/.bashrc"
|
||||||
|
|
||||||
# Fake that whonixsetup was already run
|
|
||||||
#mkdir -p "${INSTALLDIR}/var/lib/whonix/do_once"
|
|
||||||
#touch "${INSTALLDIR}/var/lib/whonix/do_once/whonixsetup.done"
|
|
||||||
|
|
||||||
# Fake that initializer was already run
|
# Fake that initializer was already run
|
||||||
mkdir -p "${INSTALLDIR}/root/.whonix"
|
mkdir -p "${INSTALLDIR}/root/.whonix"
|
||||||
touch "${INSTALLDIR}/root/.whonix/first_run_initializer.done"
|
touch "${INSTALLDIR}/root/.whonix/first_run_initializer.done"
|
||||||
|
@ -23,3 +23,6 @@ build-essential:native
|
|||||||
gcc
|
gcc
|
||||||
fakeroot
|
fakeroot
|
||||||
lintian
|
lintian
|
||||||
|
|
||||||
|
rsync
|
||||||
|
grub-pc
|
||||||
|
Loading…
Reference in New Issue
Block a user