#749070 dpkg-source cannot handle git generated patches which changes file permissions

#749070#5
Date:
2014-05-23 16:49:54 UTC
From:
To:
package: dpkg-dev
version: 1.17.9

dpkg-source cannot handle such patches, it applies them correctly though.

$ dpkg-source -b .
dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: applying engine-root.patch
dpkg-source: info: applying remove-bundler.patch
dpkg-source: info: applying remove-excecution-bit-from-fonts.patch
dpkg-source: warning: diff
`ruby-font-awesome-rails/debian/patches/remove-excecution-bit-from-fonts.patch'
doesn't contain any patch
dpkg-source: info: building ruby-font-awesome-rails using existing
./ruby-font-awesome-rails_4.0.3.1.orig.tar.gz
dpkg-source: info: building ruby-font-awesome-rails in
ruby-font-awesome-rails_4.0.3.1-1.debian.tar.gz
dpkg-source: info: building ruby-font-awesome-rails in
ruby-font-awesome-rails_4.0.3.1-1.dsc

http://anonscm.debian.org/gitweb/?p=pkg-ruby-extras/ruby-font-awesome-rails.git
has the packaging files.

pravi@savannah:~/forge/debian/git/pkg-ruby-extras/ruby-font-awesome-rails$
cat debian/patches/remove-excecution-bit-from-fonts.patch
pravi@savannah:~/forge/debian/git/pkg-ruby-extras/ruby-font-awesome-rails$
cat debian/patches/remove-excecution-bit-from-fonts.patch~
diff --git a/app/assets/fonts/fontawesome-webfont.eot
b/app/assets/fonts/fontawesome-webfont.eot
old mode 100755
new mode 100644
diff --git a/app/assets/fonts/fontawesome-webfont.svg
b/app/assets/fonts/fontawesome-webfont.svg
old mode 100755
new mode 100644
diff --git a/app/assets/fonts/fontawesome-webfont.ttf
b/app/assets/fonts/fontawesome-webfont.ttf
old mode 100755
new mode 100644
diff --git a/app/assets/fonts/fontawesome-webfont.woff
b/app/assets/fonts/fontawesome-webfont.woff
old mode 100755
new mode 100644

#749070#10
Date:
2014-05-23 21:52:13 UTC
From:
To:
Hi!

Hmm, this is more intricate than what meets the eye. I've a rough plan to
solve this somehow, which I'll be sending to debian-devel for some input
first.

Thanks,
Guillem

#749070#15
Date:
2025-03-27 06:06:04 UTC
From:
To:
This is also an issue with git-generated patches that rename (git diff
--find-renames) or copy (git diff --find-copies) a file.  For example:

diff --git a/README.md b/README-copy.md
similarity index 100%
copy from README.md
copy to README-copy.md
diff --git a/README.md b/README-rename.md
similarity index 100%
rename from README.md
rename to README-rename.md

I'm working on revising git-buildpackage to generate patches that rename
and copy files:
<https://salsa.debian.org/agx/git-buildpackage/-/merge_requests/48>.
No-change renames or copies such as the above example emit a warning,
but seem to apply correctly:

dpkg-source: warning: diff 'example/debian/patches/foo.patch' doesn't
contain any patch