PPA - Failed to Build: Permission denied

Asked by vergarr

I'm trying to add a package to my PPA to provide The Havamal as fortunes (Source Code: https://code.launchpad.net/~moonsdad/+junk/fortunes-havamal). However, the build fails when trying to copy the data files to ${DESTDIR}/usr/share/games/fortunes/ (Latest Build Log: https://launchpadlibrarian.net/444944039/buildlog_ubuntu-xenial-amd64.fortunes-havamal_1.0.3~ubuntu16.04.1_BUILDING.txt.gz).

The relevant lines of the build log are:

make[1]: Entering directory '/<<PKGBUILDDIR>>'
strfile -c % havamal.txt havamal.dat
"havamal.dat" created
There were 164 strings
Longest string: 429 bytes
Shortest string: 87 bytes
mkdir -p /usr/share/games/fortunes/
cp havamal.dat /usr/share/games/fortunes/havamal.dat
cp: cannot create regular file '/usr/share/games/fortunes/havamal.dat': Permission denied
Makefile:3: recipe for target 'install' failed
make[1]: *** [install] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: make -j4 returned exit code 2

Corresponding with the Makefile targets:

install: havamal.dat
 mkdir -p ${DESTDIR}/usr/share/games/fortunes/
 cp havamal.dat ${DESTDIR}/usr/share/games/fortunes/havamal.dat
 cp havamal.txt ${DESTDIR}/usr/share/games/fortunes/havamal

havamal.dat: havamal.txt
 strfile -c % $< $@

I was having issues with mkdir, and added 'usr/share/games' and 'usr/share/games/fortunes' to debian/dirs. When this didn't help, I added fortunes as a build dependency. That got me to the point of realizing it was due to lacking permissions.

I don't understand: why there are permission issues with the install target directory? I thought maybe I'm supposed to add sudo to the install commands, but I've never had to do that before.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu evolution Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.