Created
September 16, 2020 02:30
-
-
Save tadd/32a7f601ce9ca8eee58656a535e1f3cd to your computer and use it in GitHub Desktop.
Repack .deb from nodesource for Debian bullseye
This file contains hidden or 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
#!/bin/bash | |
set -e | |
ver=local1 | |
if [ $# != 1 ]; then | |
echo $0: one argument of .deb needed >&2 | |
exit 1 | |
fi | |
set -x | |
mkdir -p newpack oldpack/DEBIAN | |
dpkg-deb -x $1 oldpack | |
dpkg-deb -e $1 oldpack/DEBIAN | |
sed -i "s/\(Version:.*\)$/\1-$ver/; s/python-minimal/python2-minimal/" oldpack/DEBIAN/control | |
dpkg-deb -Z xz -b oldpack newpack | |
deb=$(echo newpack/*.deb) | |
mv $deb . | |
rm -rf newpack oldpack | |
set +x | |
echo repacked as $(basename $deb) |
Of course, you cannot use the official setup script https://deb.nodesource.com/setup_14.x directly for bullseye. Here is a patch:
--- setup_14.x.orig 2020-09-16 11:37:46.371570416 +0900
+++ setup_14.x 2020-09-16 11:38:34.824177549 +0900
@@ -270,6 +270,7 @@
check_alt "Pardus" "onyedi" "Debian" "stretch"
check_alt "Liquid Lemur" "lemur-3" "Debian" "stretch"
check_alt "Astra Linux" "orel" "Debian" "stretch"
+check_alt "Debian" "bullseye" "Debian" "buster"
if [ "X${DISTRO}" == "Xdebian" ]; then
print_status "Unknown Debian-based distribution, checking /etc/debian_version..."
Update: It seems that the official script of nodejs seems to support bullseye as is.
This hack is no more needed, now we're all happy ;)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cf. http://tuxdiary.com/2013/12/01/unpack-modify-and-repack-deb-files/