Monday, May 6, 2024
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 7737  / 1 Year ago, fri, january 6, 2023, 8:43:46

Adding modified or new text files to my PPA package is simple enough:



Step 1:



apt-get source [foo-package]
cd [foo-package]


Step 2:
add or modify new text files containing the changes



Step 3 - update the changelog:



dch -i


Step 4 - create a patch



dpkg-source --commit


Step 5 - create a source package



debuild -S 


Step 6 - upload to launchpad



cd ..
dput [myppa]/[foo_source.changes]





However, I now need to add a new icon file (a .png file) to the existing package.



So at step 2 - just copied into the [foo-package]



At step 4 - I get the following errors:



dpkg-source: error: cannot represent change to foo-package/foo-icon.png: binary file contents changed
dpkg-source: error: unrepresentable changes to source


If I attempt to move to step 5 I get the following additional errors to the above:



dpkg-source: error: add foo-package/foo-icon.png in debian/source/include-binaries if you want to store the modified binary in the Debian tar-ball
...
dpkg-buildpackage -rfakeroot -d -us -uc -S failed


Any ideas how do I add a binary icon file to my existing PPA package?






More information



By running:



debuild -S --source-option=--include-binaries


This then allows for the source package to be built and step 6 is possible.



However this isnt really the answer - because I subsequently cannot then make further code changes (step 2) because I'm still getting the same errors.



It doesnt look like I can do dpkg-source --commit --source-option=--include-binaries because this just gives errors:



dpkg-source --commit --source-option=--include-binaries
dpkg-source: warning: --source-option=--include-binaries is not a valid option for Dpkg::Source::Package::V3::quilt
dpkg-source: error: cannot represent change to foo-package/foo-icon.png: binary file contents changed
dpkg-source: error: unrepresentable changes to source

More From » package-management

 Answers
3

What I did:



apt-get source rhythmbox-plugin-llyrics
cd rhythmbox-plugin-llyrics-0.1/
echo '#Junk commit' >> llyrics/ChartlyricsParser.py
sed -i 's/Maintainer: fossfreedom <[email protected]>/Maintainer: Andrew King (No comment) <[email protected]>/g' debian/control
sed -i 's/fossfreedom <[email protected]>/Andrew King (No comment) <[email protected]>/g' debian/changelog
dpkg-source --commit

debuild -S -sa
mkdir debian/icons
cp ~/Pictures/awesome-cat.jpg ./debian/icons/
echo 'debian/icons/awesome-cat.jpg' > debian/source/include-binaries
cd ..
dpkg-source --include-binaries -b rhythmbox-plugin-llyrics-0.1
cd -
debuild -S

echo '#Junk commit' >> llyrics/ChartlyricsParser.py
dpkg-source --commit

#so now it's still allowing commits and in the deb-src...add it to install
echo 'debian/icons/* /usr/share/icons/hicolor/' >> debian/install
echo '' >> debian/install
debuild -S

#note that you should have the proper subfolders here e.g. 32x32/myicon.png or whatever
#also note that per packaging guidelines it should be one entry per file, not a wildcard


Confirmed that it correctly pushes and builds on Launchpad
fossfreedom


[#36795] Saturday, January 7, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mouedi

Total Points: 420
Total Questions: 109
Total Answers: 116

Location: Philippines
Member since Wed, Aug 19, 2020
4 Years ago
mouedi questions
Mon, Mar 28, 22, 20:06, 2 Years ago
Sat, Dec 3, 22, 15:04, 1 Year ago
Thu, Mar 10, 22, 05:12, 2 Years ago
Wed, Jul 20, 22, 15:05, 2 Years ago
;