misc: improve patch and xargs default usage on helpers.

This commit is contained in:
Luis Guzmán 2023-10-07 07:55:41 +00:00
parent 4ad5d3ae6f
commit 11a7c33983
60 changed files with 109 additions and 106 deletions

View file

@ -22,7 +22,7 @@ VERSION=3
. ./config
# Patch trisquel feeds
patch src/akregator_part.cpp < $DATA/trisquel_feeds.patch
patch --no-backup-if-mismatch src/akregator_part.cpp < $DATA/trisquel_feeds.patch
#Prevent ppc64el arch since qtwebengine is not build for ppc64el either.
sed -i 's|Architecture: any|Architecture: amd64 arm64 armhf i386|g' debian/control

View file

@ -49,7 +49,7 @@ sed '/fonts-/d' -i debian/control
sed '/high_contrast_item/d' -i src/menubar.vala
# Fix selection highlight on toggle buttons
cat << EOF | patch -p1
cat << EOF | patch --no-backup-if-mismatch -p1
--- a/src/toggle-box.vala 2022-12-05 19:49:25.898324331 -0500
+++ b/src/toggle-box.vala 2022-12-05 19:54:51.347291025 -0500
@@ -99,6 +99,8 @@

View file

@ -22,8 +22,8 @@ VERSION=3
. ./config
patch -p1 < $DATA/asunder_2.9.5-acc.patch
patch -p1 < $DATA/asunder_2.9.5-monkey.patch
patch --no-backup-if-mismatch -p1 < $DATA/asunder_2.9.5-acc.patch
patch --no-backup-if-mismatch -p1 < $DATA/asunder_2.9.5-monkey.patch
changelog "Removed non-free formats. Closes #4061"

View file

@ -24,7 +24,7 @@ VERSION=1
# Remove helper once upstream version is 1.5.27 or later.
# Apply patch to fix volume change notification
patch -p1 < $DATA/fix_volume_change_notification.patch
patch --no-backup-if-mismatch -p1 < $DATA/fix_volume_change_notification.patch
changelog "Fix volume change notification on MATE and XFCE."

View file

@ -33,7 +33,7 @@ sed 's/archive.gpg/trisquel-archive-keyring.gpg/' -i ./debian/bootstrap-base.pos
sed 's/debian-archive-keyring/trisquel-archive-keyring/' -i ./debian/control
#Fix kernel detection
patch -p1 < $DATA/kernel_update_list.patch
patch --no-backup-if-mismatch -p1 < $DATA/kernel_update_list.patch
cat << EOF > kernel/tests/amd64/cittagazze.test
cpuinfo cittagazze.cpuinfo
majors 2.6

View file

@ -41,7 +41,7 @@ sed -si '/string/s|Thunderbird|Icedove|g' src/*.ui
cp -r $DATA/* src/res/
#Set path
cat << EOF | patch -p0
cat << EOF | patch --no-backup-if-mismatch -p0
--- src/utils.cpp 2022-09-08 03:46:23.713263610 -0500
+++ src/utils.cpp_fix 2022-09-08 03:48:19.925695988 -0500
@@ -195,13 +195,7 @@

View file

@ -22,7 +22,7 @@ VERSION=3
. ./config
patch -p1 < $DATA/bleachbit-FSDG.patch
patch --no-backup-if-mismatch -p1 < $DATA/bleachbit-FSDG.patch
# Non-free programs. Remove to avoid advertisement
for CLEANER in adobe_reader amsn chromium discord flash google_chrome google_earth google_toolbar internet_explorer microsoft_office opera paint realplayer safari secondlife_viewer silverlight skype smartftp teamviewer winamp windows_defender windows_explorer windows_media_player winrar winzip wordpad yahoo_messenger

View file

@ -21,7 +21,7 @@ VERSION=2
. ./config
# Rebrand and tweak
grep -rl 'font-name='|xargs sed -i '/font-name/s|Ubuntu 11|Sans 11|'
grep -rl 'font-name='|xargs -r sed -i '/font-name/s|Ubuntu 11|Sans 11|'
replace ubuntu trisquel
replace Ubuntu Trisquel
find -type d |xargs rename s/ubuntu/trisquel/g

View file

@ -23,7 +23,7 @@ VERSION=1
#Set default trisquel wallpaper
BUDGIE_WALLP="usr/share/backgrounds/budgie/ubuntu_budgie_wallpaper1.jpg"
TRISQUEL_WALLP="usr/share/backgrounds/$CODENAME.jpg"
grep -lr "$BUDGIE_WALLP" | xargs sed -i "s|$BUDGIE_WALLP|$TRISQUEL_WALLP|g"
grep -lr "$BUDGIE_WALLP" | xargs -r sed -i "s|$BUDGIE_WALLP|$TRISQUEL_WALLP|g"
#menu-icon
cp $DATA/logo-trisquel.svg distrologo/trisquel-logo.svg

View file

@ -23,7 +23,7 @@ REPOKEY=9BDB3D89CE49EC21
BACKPORTS=true
. ./config
grep -lr 'project_root.join(\".git\").is_dir()' | xargs sed -i '/project_root.join(\".git\").is_dir()/d'
grep -lr 'project_root.join(\".git\").is_dir()' | xargs -r sed -i '/project_root.join(\".git\").is_dir()/d'
changelog "Import as dependency of newer abrowser deb dependencies."

View file

@ -24,8 +24,8 @@ REPOKEY=0E98404D386FA1D9
NETINST=true
. ./config
patch -R -p1 < $DATA/rev_Makefile.patch
patch -R -p1 < $DATA/rev_choose-mirror-bin.templates-in.patch
patch --no-backup-if-mismatch -R -p1 < $DATA/rev_Makefile.patch
patch --no-backup-if-mismatch -R -p1 < $DATA/rev_choose-mirror-bin.templates-in.patch
sed -i '/oldstable/d;
/testing/d;

View file

@ -46,10 +46,10 @@ sed -i '/snapd/d' debian/control
rm update-from-web.sh
#Patch the test suite
patch -p1 < $DATA/fix_test.patch
patch --no-backup-if-mismatch -p1 < $DATA/fix_test.patch
#Do not recommend extra repositories
patch -p1 < $DATA/no_extra_repos.patch
patch --no-backup-if-mismatch -p1 < $DATA/no_extra_repos.patch
changelog "Removed references to non-free software"

View file

@ -23,7 +23,7 @@ VERSION=1
changelog "Connman compiled for Trisquel. Fixes #4239"
patch -p0 < $DATA/connman.4239.patch
patch --no-backup-if-mismatch -p0 < $DATA/connman.4239.patch
#BUG: https://trisquel.info/en/issues/4239
compile

View file

@ -35,7 +35,7 @@ sed 's/CHARMAP=ISO-8859-15/CHARMAP=UTF-8/' -i debian/console-setup.config
sed -i "s|cdebconf-newt-detect-keys, ||" debian/control
#Fix 20console-setup script patch.
patch -p2 < $DATA/modify_20console-setup.patch
patch --no-backup-if-mismatch -p2 < $DATA/modify_20console-setup.patch
changelog "Rebuild upstream to get udeb dependency for debian-installer. Default to UTF-8"
compile

View file

@ -23,7 +23,7 @@ BUILD_UNTIL=11.0
. ./config
#Apply patch to fix Debian's #1714264
patch -p1 < $DATA/0002-Fix-cwidget-and-aptitude-FTBFS.patch
patch --no-backup-if-mismatch -p1 < $DATA/0002-Fix-cwidget-and-aptitude-FTBFS.patch
changelog "Apply patch to fix Debian's #1015925 affecting aramo."

View file

@ -21,6 +21,7 @@ VERSION=1
EXTERNAL='deb-src http://ftp.debian.org/debian bookworm main'
REPOKEY=0E98404D386FA1D9
BACKPORT=true
BUILD_UNTIL=11.0
. ./config

View file

@ -43,7 +43,7 @@ deb $LOCALMIRROR $CODENAME-updates main
deb $LOCALMIRROR $CODENAME-security main
EOF
find build/pkg-lists -type f | xargs sed -i /media-retriever/d
find build/pkg-lists -type f | xargs -r sed -i /media-retriever/d
apt-get update -c ${LOCAL_APT}/etc/apt_${CODENAME}.conf
# Get available kernel at release/main packages.
LASTKERNEL="$(apt-cache madison -c ${LOCAL_APT}/etc/apt_${CODENAME}.conf linux-hwe-5.19-tools-common|\
@ -71,7 +71,7 @@ sed -i 's|-signed||' debian/control
sed -i '/win32-loader/d' debian/control
#use unsigned shim
grep -rl "efi\.signed" | xargs sed -i 's|efi\.signed|efi|g'
grep -rl "efi\.signed" | xargs -r sed -i 's|efi\.signed|efi|g'
#adjust path and name files from debian to trisquel | $arch-bin efi file (/usr/lib/grub/x86_64-efi/monolithic/grubx64.efi)
sed -i 's|\$platform-signed/grub|\$platform/monolithic/grub|' build/util/efi-image
sed -i 's|\$efi_name-installer.efi|\$efi_name.efi|' build/util/efi-image
@ -81,8 +81,8 @@ rm -r build/boot/artwork/11-homeworld
mkdir build/boot/artwork/trisquel/
cp $DATA/splash.svg build/boot/artwork/trisquel/trisquel.svg
sed -i 's|SPLASH_PNG=.*|SPLASH_PNG=boot/artwork/trisquel/trisquel.png|' build/config/x86.cfg
grep -rl 'vshift 8' build/boot | xargs sed -i '/vshift/s|8|12|g'
grep -rl 'rows 12' build/boot | xargs sed -i '/rows/s|12|10|g'
grep -rl 'vshift 8' build/boot | xargs -r sed -i '/vshift/s|8|12|g'
grep -rl 'rows 12' build/boot | xargs -r sed -i '/rows/s|12|10|g'
cat << EOF > build/sources.list.udeb.local
deb $LOCALMIRROR $CODENAME main/debian-installer
@ -126,7 +126,7 @@ rpl debian-archive-keyring-udeb trisquel-keyring-udeb . -R
rpl debian-ports-archive-keyring-udeb trisquel-keyring-udeb . -R
# build/config/common
grep -rl TRISQUEL_VERSION |xargs sed -i "s|TRISQUEL_VERSION =.*|TRISQUEL_VERSION = $REVISION ($CODENAME)|"
grep -rl TRISQUEL_VERSION |xargs -r sed -i "s|TRISQUEL_VERSION =.*|TRISQUEL_VERSION = $REVISION ($CODENAME)|"
# Disable proposed-updates patch
patch --no-backup-if-mismatch -p1 < $DATA/remove-proposed-updates.patch
@ -134,9 +134,9 @@ patch --no-backup-if-mismatch -p1 < $DATA/remove-proposed-updates.patch
echo "# Remove gtk related packages, not looking for graphical installer"
rm $(find build/pkg-lists -type f -path "*/gtk/*")
echo "Remove unused modules from d-i pkg-list"
grep -rl acpi-modules- build/pkg-lists/ |xargs sed -i '/acpi-modules-/d'
grep -rl cdrom-core-modules- build/pkg-lists/ |xargs sed -i '/cdrom-core-modules-/d'
grep -rl cdebconf-gtk-entropy build/config/ | xargs sed -i 's/cdebconf-gtk-entropy//'
grep -rl acpi-modules- build/pkg-lists/ |xargs -r sed -i '/acpi-modules-/d'
grep -rl cdrom-core-modules- build/pkg-lists/ |xargs -r sed -i '/cdrom-core-modules-/d'
grep -rl cdebconf-gtk-entropy build/config/ | xargs -r sed -i 's/cdebconf-gtk-entropy//'
# Ensure that ld-linux is executable
patch --no-backup-if-mismatch -p1 < $DATA/chmod_755_ld-linux2.patch

View file

@ -31,13 +31,13 @@ sed -i 's|,eol-server,eol-esm||' trisquel-distro-info.c
sed -i 's|Ubuntu|Trisquel GNU/Linux|' shell/ubuntu-distro-info.in
# distro-info-util.c
patch -p1 < $DATA/distro-info-util_c.patch
patch --no-backup-if-mismatch -p1 < $DATA/distro-info-util_c.patch
#test-ubuntu-distro-info
cp $DATA/test-trisquel-distro-info .
#python dir
patch -p1 < $DATA/distro_info_py.patch
patch --no-backup-if-mismatch -p1 < $DATA/distro_info_py.patch
replace Ubuntu Trisquel
replace ubuntu trisquel
#Maybe too much

View file

@ -21,9 +21,9 @@ VERSION=7
. ./config
patch -p0 < $DATA/add_trisquel_validate.patch
patch -p0 < $DATA/add_trisquel_tools_py.patch
patch -p0 < $DATA/README.Debian.patch
patch --no-backup-if-mismatch -p0 < $DATA/add_trisquel_validate.patch
patch --no-backup-if-mismatch -p0 < $DATA/add_trisquel_tools_py.patch
patch --no-backup-if-mismatch -p0 < $DATA/README.Debian.patch
cp $DATA/trisquel.csv ./

View file

@ -29,7 +29,7 @@ REPOKEY=0E98404D386FA1D9
NETINST=true
. ./config
patch -p1 < $DATA/fix_keyboard-configure-netinstall.patch
patch --no-backup-if-mismatch -p1 < $DATA/fix_keyboard-configure-netinstall.patch
changelog "Fetch and build as udeb dependency for debian-installer."
compile

View file

@ -394,13 +394,13 @@ echo ".warning{display: none!important; } .addon[notification=warning]{backgroun
for STRING in rights-intro-point-2 rights-intro-point-3 rights-intro-point-4 rights-intro-point-5 rights-intro-point-6 rights-webservices rights-safebrowsing
do
find -name aboutRights.ftl | xargs sed -i "s/^$STRING.*/$STRING = /"
find -name aboutRights.ftl | xargs -r sed -i "s/^$STRING.*/$STRING = /"
done
##Remove invalid policy for trisquel.
find -name aboutRights.ftl | xargs sed -i '/rights-intro-point-5/,$d'
find -name aboutRights.xhtml |xargs sed -i "/rights-intro-point-5/,/<\/li>/d"
find -name aboutRights.xhtml |xargs sed -i "/rights-intro-point-6/,/<\/li>/d"
find -name aboutRights-unbranded.xhtml |xargs sed -i "/rights-intro-point-5/,/<\/li>/d"
find -name aboutRights.ftl | xargs -r sed -i '/rights-intro-point-5/,$d'
find -name aboutRights.xhtml |xargs -r sed -i "/rights-intro-point-5/,/<\/li>/d"
find -name aboutRights.xhtml |xargs -r sed -i "/rights-intro-point-6/,/<\/li>/d"
find -name aboutRights-unbranded.xhtml |xargs -r sed -i "/rights-intro-point-5/,/<\/li>/d"
#EO about: mods.
sed -i 's/<a\ href\=\"http\:\/\/www.mozilla.org\/\">Mozilla\ Project<\/a>/<a\ href\=\"http\:\/\/www.trisquel.info\/\"\>Trisquel\ Project<\/a>/g' browser/base/content/overrides/app-license.html
@ -460,7 +460,7 @@ find browser/branding/ -name PrivateBrowsing_70.png | xargs -n1 cp $DATA/debug_b
find browser/branding/ -name PrivateBrowsing_150.png | xargs -n1 cp $DATA/debug_brand/PrivateBrowsing_150.png
# Replace addons placeholder for the gnuzilla mozzarella.
find l10n/ -name aboutAddons.ftl | xargs sed -i '/.placeholder/s|addons.mozilla.org|gnuzilla.gnu.org|g'
find l10n/ -name aboutAddons.ftl | xargs -r sed -i '/.placeholder/s|addons.mozilla.org|gnuzilla.gnu.org|g'
#Fixes by patch on source, see DATA/firefox/patches for more info.
for patch in $(ls -v ${DATA}/patch_changes/*.patch)

View file

@ -25,7 +25,7 @@ VERSION=1
for patch in $(ls -v ${DATA}/*.patch)
do
echo "Applying $patch"
patch -Np1 < $patch
patch --no-backup-if-mismatch -Np1 < $patch
done
changelog "Build from Trisquel repos - Delete support for non-free hardware and emulators"

View file

@ -60,7 +60,7 @@ sed /fulloptions.free/d dia_fulloptions.inc -i
# This hack adds parameters to the kernel if the timeout reaches 0, used to enable a11y
#sed 's:\(.*\)120\(.*\):\181\2\n/timeout.time.x timeout.x 550 add def:' timeout.inc -i
cat << EOF | patch -p1
cat << EOF | patch --no-backup-if-mismatch -p1
diff -ru gfxboot-theme-ubuntu-0.13.3.orig/common.inc gfxboot-theme-ubuntu-0.13.3/common.inc
--- gfxboot-theme-ubuntu-0.13.3.orig/common.inc 2012-05-14 23:53:21.000000000 +0000
+++ gfxboot-theme-ubuntu-0.13.3/common.inc 2012-11-10 22:00:04.000000000 +0000

View file

@ -21,7 +21,7 @@ VERSION=1
. ./config
cat << EOF |patch -p1
cat << EOF |patch --no-backup-if-mismatch -p1
diff -ru glibc-2.35/debian/debhelper.in/libc-udeb.install glibc-2.35/debian/debhelper.in/libc-udeb.install
There is no file containing "-" (dash) on their udeb name pattern. Also debian

View file

@ -50,7 +50,7 @@ cat << recommended-os > data/recommended-downloads.xml
recommended-os
# Remove gnome recommendation.
grep -rl "<url>.*.iso.*</url>" data/osinfo/|xargs sed -i "/.iso/d"
grep -rl "<url>.*.iso.*</url>" data/osinfo/|xargs -r sed -i "/.iso/d"
changelog "Replace recommended downloads."

View file

@ -23,7 +23,7 @@ BUILD_UNTIL=11.0
. ./config
# Apply patch to drop deprecated scripts running on trisquel-mini
patch -p1 < $DATA/drop_gnome-shell-overrides-migration.patch
patch --no-backup-if-mismatch -p1 < $DATA/drop_gnome-shell-overrides-migration.patch
sed -i "/gnome-shell-overrides-migration.desktop/d" debian/gnome-shell.install
changelog "Drop deprecated scripts running on trisquel-mini."

View file

@ -29,7 +29,7 @@ replace grub-efi-amd64-signed grub-efi-amd64
sed 's/shim-signed/shim/' -i grub-installer
cat << EOF | patch -p1
cat << EOF | patch --no-backup-if-mismatch -p1
diff -ru a/grub-installer b/grub-installer
--- a/grub-installer 2022-11-25 19:04:53.765346384 -0500
+++ b/grub-installer 2022-11-25 19:16:10.042175329 -0500

View file

@ -29,7 +29,7 @@ DEPENDS=base-files
## updated to 2.04-1 on https://aur.archlinux.org/packages/grub-luks-keyfile/
for i in $DATA/*.patch; do
echo Applying patch $i
patch -p1 < $i
patch --no-backup-if-mismatch -p1 < $i
done
#apt-get remove -y --force-yes dosfstools

View file

@ -35,7 +35,7 @@ sed -i '/Package: grub-common/,/Built-Using:/s|Architecture: any|Architecture: a
## updated to 2.04-1 on https://aur.archlinux.org/packages/grub-luks-keyfile/
for i in $DATA/*.patch; do
echo Applying patch $i
patch -p1 < $i
patch --no-backup-if-mismatch -p1 < $i
done
#apt-get remove -y --force-yes dosfstools

View file

@ -94,7 +94,7 @@ replace_rxs=( # ASSERT: aligns with '$match_rxs'
for (( rx_n = 0 ; rx_n < ${#match_rxs[@]} ; ++rx_n ))
do sed -i "s|${match_rxs[$rx_n]}|${replace_rxs[$rx_n]}|" $(grep -rlI "${match_rxs[$rx_n]}")
done
patch -Np0 -i ${DATA}/disable_upgrade.patch
patch --no-backup-if-mismatch -Np0 -i ${DATA}/disable_upgrade.patch
# verify libre patching
patch_msg='HPLIP auto-upgrade is disabled by Trisquel for security reasons.'

View file

@ -26,8 +26,8 @@ VERSION=1
# Add missing file on tarball (1.5.26)
cp $DATA/denylist.txt engine/
# Apply patch to fix removal of Latin American Spanish
patch -p1 < $DATA/fix_latam_spanish_blacklist.patch
patch -p1 < $DATA/simple.xml.in_1.5.27.patch
patch --no-backup-if-mismatch -p1 < $DATA/fix_latam_spanish_blacklist.patch
patch --no-backup-if-mismatch -p1 < $DATA/simple.xml.in_1.5.27.patch
changelog "Fix missing latam keyboard layout."

View file

@ -20,7 +20,7 @@
VERSION=0
. ./config
patch -p1 < $DATA/fix_invalid_lines_from_resolved_integration.patch
patch --no-backup-if-mismatch -p1 < $DATA/fix_invalid_lines_from_resolved_integration.patch
changelog "Manually apply LP: #1907878 on aramo"
compile

View file

@ -24,7 +24,7 @@ COMPONENT=main
# Fixes https://bugs.launchpad.net/indicator-applet/+bug/965953
cat << EOF | patch -p0
cat << EOF | patch --no-backup-if-mismatch -p0
--- src/indicator-applet.c 2020-04-09 06:09:47.000000000 -0500
+++ src.mod/indicator-applet.c 2021-08-11 19:21:12.914141219 -0500
@@ -305,6 +305,24 @@

View file

@ -24,7 +24,7 @@ BACKPORT=true
. ./config
patch -p1 < $DATA/debian-rules_7.3.patch
patch --no-backup-if-mismatch -p1 < $DATA/debian-rules_7.3.patch
changelog "Backport libreoffice fresh into Trisquel"

View file

@ -191,7 +191,7 @@ family='trisquel'
EOF
rename s/ubuntu/trisquel/ debian.*/config/config.common.ubuntu
grep -lr config.common.ubuntu debian*/ | xargs sed -i 's|config.common.ubuntu|config.common.trisquel|g'
grep -lr config.common.ubuntu debian*/ | xargs -r sed -i 's|config.common.ubuntu|config.common.trisquel|g'
find debian* -type f -name *control* -exec sed 's/ with Ubuntu patches//; s/Linux/Linux-libre/g' -i {} \;

View file

@ -161,7 +161,7 @@ rm zfs spl debian/scripts/misc/update-zfs.sh -rf
# Remove nvidia
rm -rf debian/scripts/dkms-build--nvidia-N
grep -l dkms-build--nvidia-N debian.*/reconstruct|xargs sed -i '/dkms-build--nvidia-N/d'
grep -l dkms-build--nvidia-N debian.*/reconstruct|xargs -r sed -i '/dkms-build--nvidia-N/d'
#/bin/sed '/do_dkms_nvidia = true/d' -i debian.master/abi/*/*/*.modules \
# debian/rules \
@ -195,7 +195,7 @@ family='trisquel'
EOF
rename s/ubuntu/trisquel/ debian.*/config/config.common.ubuntu
grep -lr config.common.ubuntu debian*/ | xargs sed -i 's|config.common.ubuntu|config.common.trisquel|g'
grep -lr config.common.ubuntu debian*/ | xargs -r sed -i 's|config.common.ubuntu|config.common.trisquel|g'
find debian* -type f -name *control* -exec sed 's/ with Ubuntu patches//; s/Linux/Linux-libre/g' -i {} \;

View file

@ -143,7 +143,7 @@ grep -lr zfs debian.{master,hwe-$HWEKR}/reconstruct \
debian.{master,hwe-$HWEKR}/rules.d/ \
debian/rules \
debian.hwe-$HWEKR/d-i/modules/fs-core-modules \
debian.{master,hwe-$HWEKR}/control.d/ | xargs sed -i '/zfs/d'
debian.{master,hwe-$HWEKR}/control.d/ | xargs -r sed -i '/zfs/d'
#/bin/sed 's/spl-dkms, zfs-dkms//' -i debian/control \
# debian.master/control.d/vars.generic \
@ -161,14 +161,14 @@ grep -lr v4l2loopback debian.{master,hwe-$HWEKR}/reconstruct \
debian.{master,hwe-$HWEKR}/rules.d/ \
debian/rules \
debian.hwe-$HWEKR/d-i/modules/fs-core-modules \
debian.{master,hwe-$HWEKR}/control.d/ | xargs sed -i '/v4l2loopback/d'
debian.{master,hwe-$HWEKR}/control.d/ | xargs -r sed -i '/v4l2loopback/d'
#/bin/sed -i '/ifeq ($(do_v4l2loopback),false)/,/endif$/d' debian/rules
#/bin/sed -i '/do_v4l2loopback/d' debian.master/rules.d/*
# Remove nvidia driver
rm -rf debian/scripts/dkms-build--nvidia-N
grep -l dkms-build--nvidia-N debian.{master,hwe-$HWEKR}/reconstruct|xargs sed -i '/dkms-build--nvidia-N/d'
grep -l dkms-build--nvidia-N debian.{master,hwe-$HWEKR}/reconstruct|xargs -r sed -i '/dkms-build--nvidia-N/d'
# Remove wireguard
grep -lr wireguard debian.{master,hwe-$HWEKR}/reconstruct \
@ -177,7 +177,7 @@ grep -lr wireguard debian.{master,hwe-$HWEKR}/reconstruct \
debian.{master,hwe-$HWEKR}/rules.d/ \
debian/rules \
debian.hwe-$HWEKR/d-i/modules/fs-core-modules \
debian.{master,hwe-$HWEKR}/control.d/ | xargs sed -i '/wireguard/d'
debian.{master,hwe-$HWEKR}/control.d/ | xargs -r sed -i '/wireguard/d'
#/bin/sed '/ifeq ($(do_dkms_wireguard),false)/,/endif$/d' -i debian/rules
#sed '/do_dkms_wireguard/d' -i debian/rules.d/2-binary-arch.mk
@ -204,7 +204,7 @@ family='trisquel'
EOF
rename s/ubuntu/trisquel/ debian.*/config/config.common.ubuntu
grep -lr config.common.ubuntu debian*/ | xargs sed -i 's|config.common.ubuntu|config.common.trisquel|g'
grep -lr config.common.ubuntu debian*/ | xargs -r sed -i 's|config.common.ubuntu|config.common.trisquel|g'
find debian* -type f -name *control* -exec sed 's/ with Ubuntu patches//; s/Linux/Linux-libre/g' -i {} \;

View file

@ -31,7 +31,7 @@ sed 's/, intel-microcode \[amd64\]//; s/, amd64-microcode \[amd64\]//;' -i debia
# Remove wireguard dependencies.
sed -i '/gencontrol_flags += -Vdkms:wireguard-linux-compat-modules/d' debian/rules
grep -rl dkms:wireguard-linux-compat-modules | xargs sed -i '/^Provides: ${dkms:wireguard-linux-compat-modules}$/d'
grep -rl dkms:wireguard-linux-compat-modules | xargs -r sed -i '/^Provides: ${dkms:wireguard-linux-compat-modules}$/d'
changelog "Removed linux-firmware dependency, renamed release for Trisquel"

View file

@ -30,10 +30,10 @@ NETINST=true
. ./config
#Enable udeb path by default
patch -p1 < $DATA/enable_udeb_build.patch
patch --no-backup-if-mismatch -p1 < $DATA/enable_udeb_build.patch
#Fix udeb path usr/lib... instead of lib/...
patch -p1 < $DATA/fix_path_on_udeb_files.patch
patch --no-backup-if-mismatch -p1 < $DATA/fix_path_on_udeb_files.patch
# dmsetup is needed for lvm work, the installer hangs without it
sed '/Package: lvm2-udeb/,/^$/s/^Depends:/Depends: dmsetup-udeb,/' -i debian/control

View file

@ -23,7 +23,7 @@ VERSION=0
. ./config
#Apply path for handle open with, fix LP:#1714264
patch -p1 < $DATA/mtpaint-desktop.patch
patch --no-backup-if-mismatch -p1 < $DATA/mtpaint-desktop.patch
changelog "Remove nvidia-settings dependency."

View file

@ -21,7 +21,7 @@ VERSION=1
. ./config
patch -p1 < $DATA/1946.patch
patch --no-backup-if-mismatch -p1 < $DATA/1946.patch
changelog "Adding ASC-II trisquel logo update, thanks to @LegoLeprechaun"

View file

@ -28,7 +28,7 @@ NETINST=true
for patch in $(ls -v ${DATA}/*.patch)
do
echo "Applying $patch"
patch -Np1 < $patch
patch --no-backup-if-mismatch -Np1 < $patch
done
changelog "Rebranded and adapted for Trisquel"

View file

@ -41,8 +41,8 @@ do
mv data/os/$i $TMPDIR || true
done
# Remove iso url for non-recommended distros, along with manjaro using custom url.
grep -rl "<url>.*.iso.*</url>" data/os/|xargs sed -i "/.iso/d"
grep -rl '<url>' data/os/manjaro.org/|xargs sed -i "/<url>/d"
grep -rl "<url>.*.iso.*</url>" data/os/|xargs -r sed -i "/.iso/d"
grep -rl '<url>' data/os/manjaro.org/|xargs -r sed -i "/<url>/d"
mv $TMPDIR/* data/os/
# Remove tests that will fail from previos iso url removal.
rm tests/test_isoinfo.py tests/test_schema.py

View file

@ -21,7 +21,7 @@ VERSION=1
. ./config
patch -p0 < $DATA/supported-versions-trisquel.patch
patch --no-backup-if-mismatch -p0 < $DATA/supported-versions-trisquel.patch
changelog "Imported into Trisquel"

View file

@ -24,7 +24,7 @@ VERSION=1
sed '/libxnvctrl-dev/d' -i debian/control
#Apply fix ftbfs patch
patch -p1 < $DATA/fix-ftbfs-debian-patch.patch
patch --no-backup-if-mismatch -p1 < $DATA/fix-ftbfs-debian-patch.patch
changelog "Removed libxnvctrl0 dependency not present in Trisquel"

View file

@ -21,6 +21,7 @@ VERSION=1
EXTERNAL='deb-src http://ftp.debian.org/debian trixie main'
REPOKEY=6ED0E7B82643E131
BACKPORT=true
BUILD_UNTIL=11.0
. ./config
changelog "Imported into trisquel backports as part of jami dependency."

View file

@ -91,7 +91,7 @@ _Description: Unsupported updates
EOF
# Fix locale issues that break ubiquity install
cat << EOF | patch -p1
cat << EOF | patch --no-backup-if-mismatch -p1
diff -ru source.orig/apt/progress/base.py source/apt/progress/base.py
--- source.orig/apt/progress/base.py 2015-11-26 11:33:29.000000000 -0500
+++ source/apt/progress/base.py 2017-01-07 14:33:29.879872269 -0500

View file

@ -21,7 +21,7 @@ VERSION=1
. ./config
patch -p2 < $DATA/ddeb.patch
patch --no-backup-if-mismatch -p2 < $DATA/ddeb.patch
#https://github.com/ionos-cloud/reprepro
changelog "Adds support for ddeb files"

View file

@ -21,6 +21,7 @@ VERSION=1
EXTERNAL='deb-src http://ftp.debian.org/debian trixie main'
REPOKEY=6ED0E7B82643E131
BACKPORT=true
BUILD_UNTIL=11.0
. ./config
changelog "Imported into trisquel backports as part of jami dependency."

View file

@ -53,14 +53,14 @@ done
# Removing ffmpeg time_base feature req. from jami so it builds
# against libavutil56 (ffmpeg 4.4). Can be removed on Trisquel 12
remove_patch fc975f0cacde4b06c6adde3d7f0c02f71abfb38c.patch
patch -R -p1 < $DATA/ffmpeg_time_base_frame.patch
patch --no-backup-if-mismatch -R -p1 < $DATA/ffmpeg_time_base_frame.patch
# Backport latest changes required at experimental - Remove once package
# keep up with changes at testing or unstable release.
for patch in $(ls -v ${DATA}/debian_backport/*.patch)
do
echo "Applying $patch"
patch -Np1 < $patch
patch --no-backup-if-mismatch -Np1 < $patch
done
changelog "Backport ring/jammi to aramo from debian sid"

View file

@ -21,7 +21,7 @@ VERSION=1
. ./config
patch -p1 < $DATA/screenfetch_3.9.patch
patch --no-backup-if-mismatch -p1 < $DATA/screenfetch_3.9.patch
changelog "Adding ASC-II trisquel logo update, thanks to @LegoLeprechaun"

View file

@ -23,7 +23,7 @@ EXTERNAL='deb-src http://archive.ubuntu.com/ubuntu kinetic universe'
. ./config
# https://github.com/sugarlabs/sugar/issues/962
cat << EOF | patch -p1
cat << EOF | patch --no-backup-if-mismatch -p1
--- a/src/jarabe/main.py 2022-04-23 02:53:15.000000000 -0400
+++ b/src/jarabe/main.py 2022-12-02 09:08:53.666508572 -0500
@@ -297,10 +297,6 @@

View file

@ -27,17 +27,17 @@ sed -i '/raspi/d' metapackage-map
sed -i '/budgie-desktop-raspi/,/it not be removed./d' debian/control
# Remove deprecated packages
grep -l ubuntu-drivers-common desktop*| xargs sed -i '/ubuntu-drivers-common/d'
grep -l snapd desktop*| xargs sed -i '/snapd/d'
grep -l whoopsie desktop* | xargs sed -i '/whoopsie/d'
grep -l apport desktop* | xargs sed -i '/apport/d'
grep -l ubuntu-budgie desktop*| xargs sed -i 's|ubuntu-budgie|trisquel-budgie|g'
grep -l ubuntu-drivers-common desktop*| xargs -r sed -i '/ubuntu-drivers-common/d'
grep -l snapd desktop*| xargs -r sed -i '/snapd/d'
grep -l whoopsie desktop* | xargs -r sed -i '/whoopsie/d'
grep -l apport desktop* | xargs -r sed -i '/apport/d'
grep -l ubuntu-budgie desktop*| xargs -r sed -i 's|ubuntu-budgie|trisquel-budgie|g'
sed -i 's|ubuntu-budgie|trisquel-budgie|' metapackage-map
# Add custom trisquel packages
grep -l thunderbird desktop* | xargs sed -i "/thunderbird/a abrowser"
grep -l thunderbird desktop* | xargs sed -i "s|thunderbird|icedove|"
grep -l gnome-software desktop* | xargs sed -i "s|gnome-software|trisquel-app-install|g"
grep -l thunderbird desktop* | xargs -r sed -i "/thunderbird/a abrowser"
grep -l thunderbird desktop* | xargs -r sed -i "s|thunderbird|icedove|"
grep -l gnome-software desktop* | xargs -r sed -i "s|gnome-software|trisquel-app-install|g"
replace 'ubuntu-release-upgrader-gtk' 'trisquel-release-upgrader-gtk'
replace 'fonts-ubuntu' 'fonts-trisquel'

View file

@ -30,8 +30,8 @@ sed -i '/Before.*17.10/,/\ ./d' debian/control
sed -i '/after the 17.04 release/,/not be removed./d' debian/control
# Remove deprecated packages
grep -l ubuntu-drivers-common desktop*| xargs sed -i '/ubuntu-drivers-common/d'
grep -l snapd desktop*| xargs sed -i '/snapd/d'
grep -l ubuntu-drivers-common desktop*| xargs -r sed -i '/ubuntu-drivers-common/d'
grep -l snapd desktop*| xargs -r sed -i '/snapd/d'
replace 'ubuntu-release-upgrader-gtk' 'trisquel-release-upgrader-gtk'
replace 'fonts-ubuntu' 'fonts-trisquel'

View file

@ -22,14 +22,14 @@ VERSION=5
rm_pkg_line(){
#find and remove everywhere found.
grep -rl $1 | xargs sed -i "/$1/d"
grep -rl $1 | xargs -r sed -i "/$1/d"
}
# Remove deprecated packages
grep -l ubuntu-drivers-common desktop* | xargs sed -i '/ubuntu-drivers-common/d'
grep -l snapd desktop* | xargs sed -i '/snapd/d'
grep -l kylin-docs desktop* | xargs sed -i '/ubuntu-kylin-docs/d'
grep -l whoopsie desktop* | xargs sed -i '/whoopsie/d'
grep -l apport desktop* | xargs sed -i '/apport/d'
grep -l ubuntu-drivers-common desktop* | xargs -r sed -i '/ubuntu-drivers-common/d'
grep -l snapd desktop* | xargs -r sed -i '/snapd/d'
grep -l kylin-docs desktop* | xargs -r sed -i '/ubuntu-kylin-docs/d'
grep -l whoopsie desktop* | xargs -r sed -i '/whoopsie/d'
grep -l apport desktop* | xargs -r sed -i '/apport/d'
rm_pkg_line xul-ext-ubufox
rm_pkg_line branding-ubuntu
rm_pkg_line ubuntu-advantage-tools
@ -50,14 +50,14 @@ replace 'firefox' 'abrowser'
replace 'thunderbird' 'icedove'
replace 'fonts-ubuntu' 'fonts-trisquel'
replace 'ubuntu-release-upgrader-gtk' 'trisquel-release-upgrader-gtk'
grep -rl plymouth-theme | xargs sed -i '/plymouth-theme/s|ubuntu|trisquel|g'
grep -rl sounds | xargs sed -i '/sounds/s|ubuntu|trisquel|g'
grep -rl ubuntu-keyring | xargs sed -i 's|ubuntu-keyring|trisquel-keyring|g'
grep -rl plymouth-theme | xargs -r sed -i '/plymouth-theme/s|ubuntu|trisquel|g'
grep -rl sounds | xargs -r sed -i '/sounds/s|ubuntu|trisquel|g'
grep -rl ubuntu-keyring | xargs -r sed -i 's|ubuntu-keyring|trisquel-keyring|g'
grep -l ubuntu-kylin-software-center desktop* | \
xargs sed -i "s|ubuntu-kylin-software-center|trisquel-app-install|g"
xargs -r sed -i "s|ubuntu-kylin-software-center|trisquel-app-install|g"
# Keep an eye on later versions as wayland might replace X.org dependencies.
grep -l brltty desktop* | \
xargs sed -i "s|brltty|brltty\nbrltty-x11|g"
xargs -r sed -i "s|brltty|brltty\nbrltty-x11|g"
# Remove raspimeta package components
rm update.cfg

View file

@ -24,7 +24,7 @@ COMPONENT=main
# Origin:
# http://lists.nongnu.org/archive/html/gnu-linux-libre/2011-09/msg00001.html
patch -p0 < $DATA/match.patch
patch --no-backup-if-mismatch -p0 < $DATA/match.patch
changelog "Compiled for Trisquel"

View file

@ -84,7 +84,7 @@ sed -i 's|changelogs.ubuntu.com/|archive.trisquel.org/trisquel/|' UpdateManager/
# l10n patch fixes
## es.po
patch -p0 < $DATA/l10n/es_po_rev032023.patch
patch --no-backup-if-mismatch -p0 < $DATA/l10n/es_po_rev032023.patch
changelog "Compiled for Trisquel"

View file

@ -28,14 +28,14 @@ sed '/update-manager/s/--no-update/--no-update", "--no-check-screen/' -i data/ba
# Actually install all upgrades in "Install all upgrades" menu entry
sed '/client.upgrade_system/s/safe_mode=True/safe_mode=False/' -i data/backend_helper.py
# Check updates with update-notifier instead of aptdaemon
patch -p1 < $DATA/check_updates_with_update_manager.patch
patch --no-backup-if-mismatch -p1 < $DATA/check_updates_with_update_manager.patch
# Shorter check times for apt task ending
sed '/TIMEOUT_APT_RUN/s/600/60/g' -i src/update-notifier.c
# Use update-manager to checks for dist-upgrades.
sed '/RELEASE_UPGRADE_CHECKER/s|/usr/lib/ubuntu-release-upgrader/check-new-release-gtk|sleep 5; nice ionice -c3 /usr/lib/update-notifier/backend_helper.py reminder_check|' -i src/update-notifier.h
# Reduce the timeout to refresh the status of the tray icon
patch -p1 < $DATA/improve_responsiveness.patch
patch --no-backup-if-mismatch -p1 < $DATA/improve_responsiveness.patch
#Use custom apt-check to fix motd update notification by striping esm stuff.
cp $DATA/apt_check.py data/apt_check.py
@ -55,7 +55,7 @@ sed '/Update-Package-Lists/s/1/0/' -i debian/10periodic
sed '/NotShowIn=KDE/d' -i data/update-notifier.desktop.in
# Actually show the indicator icon
cat << EOF | patch -p1
cat << EOF | patch --no-backup-if-mismatch -p1
diff --git a/src/update.c b/src/update.c
index 588fa66..951a24f 100644
--- a/src/update.c
@ -81,7 +81,7 @@ sed '/usr\/share\/icons\/hicolor\/..x../d' -i debian/update-notifier.install
sed '/livepatch/d' -i debian/update-notifier.install
# Wayland compatibility
cat << EOF | patch -p1
cat << EOF | patch --no-backup-if-mismatch -p1
--- a/src/update-notifier.c 2023-01-20 13:50:39.000000000 -0500
+++ b/src/update-notifier.c 2023-02-07 11:08:58.883996715 -0500
@@ -168,7 +168,13 @@
@ -102,7 +102,7 @@ cat << EOF | patch -p1
EOF
# Removal of whoopsie & apport
cat << EOF | patch -p1
cat << EOF | patch --no-backup-if-mismatch -p1
--- a/debian/control 2023-04-06 12:43:17.147156435 -0600
+++ b/debian/control 2023-04-06 12:46:32.883071182 -0600
@@ -34,11 +34,9 @@

View file

@ -21,7 +21,7 @@ VERSION=1
COMPONENT=main
. ./config
cat << EOF | patch -p1
cat << EOF | patch --no-backup-if-mismatch -p1
From 221dc7d785352a532264341785a779a3d3467f68 Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik@redhat.com>
Date: Fri, 24 Mar 2017 14:26:57 +0100

View file

@ -22,7 +22,7 @@ VERSION=1
COMPONENT=main
. ./config
cat << EOF | patch -p1
cat << EOF | patch --no-backup-if-mismatch -p1
--- a/man/zip.1 2012-12-01 07:18:11.156374313 +0100
+++ b/man/zip.1 2012-12-01 07:36:43.570167358 +0100
@@ -49,8 +49,7 @@