mokkka
Posts: 12
Joined: Sun Sep 10, 2017 2:46 pm

Permission problems while making xournal

Fri Sep 29, 2017 2:24 pm

Hi,

i just try to create a package for xournal.

After issuing make install you have to issue make desktop-install. I put this command in the package.yml.

Code: Select all

name       : xournal
version    : 0.4.8.2016
release    : 1
source     :
    - http://downloads.sourceforge.net/xournal/xournal-0.4.8.2016.tar.gz : b25898dbd7a149507f37a16769202d69fbebd4a000d766923bbd32c5c7462826
license    : GPL-1.0
component  : office.notes
summary    : Xournal is an application for notetaking, sketching, keeping a journal using a stylus.
description: |
    Xournal is an application for notetaking, sketching, keeping a journal using a stylus. It is free software (GNU GPL) and runs on Linux (recent distributions) and other GTK+/Gnome platforms. It is similar to Microsoft Windows Journal or to other alternatives such as Jarnal and Gournal.
builddeps  :
    - pkgconfig(libgnomecanvas-2.0)
    - pkgconfig(poppler)
    - pkgconfig(gtk+-2.0)
setup      : |
    %autogen
    %configure
build      : |
    %make
install    : |
    %make_install
    make desktop-install
but when i execute make i get the following error log for the command:

+ make desktop-install
if test "/usr/share" = "/usr/share"; then \
desktopdir=/usr/share; \
else \
desktopdir=/usr/local/share; \
fi; \
/bin/sh ./mkinstalldirs $desktopdir/icons/hicolor/scalable/apps; \
/bin/sh ./mkinstalldirs $desktopdir/icons/hicolor/scalable/mimetypes; \
/bin/sh ./mkinstalldirs $desktopdir/mime/packages; \
/bin/sh ./mkinstalldirs $desktopdir/applications; \
/bin/sh ./mkinstalldirs /usr/share/mimelnk/application; \
/usr/bin/install -c -m 644 ./pixmaps/xournal.svg $desktopdir/icons/hicolor/scalable/apps; \
/usr/bin/install -c -m 644 ./pixmaps/xoj.svg $desktopdir/icons/hicolor/scalable/mimetypes; \
if test ! -e $desktopdir/icons/hicolor/scalable/mimetypes/gnome-mime-application-x-xoj.svg; then \
ln -s xoj.svg $desktopdir/icons/hicolor/scalable/mimetypes/gnome-mime-application-x-xoj.svg; \
fi; \
if test ! -e $desktopdir/icons/hicolor/scalable/mimetypes/application-x-xoj.svg; then \
ln -s xoj.svg $desktopdir/icons/hicolor/scalable/mimetypes/application-x-xoj.svg; \
fi; \
/usr/bin/install -c -m 644 ./xournal.xml $desktopdir/mime/packages; \
/usr/bin/install -c -m 644 ./xournal.desktop $desktopdir/applications; \
/usr/bin/install -c -m 644 ./x-xoj.desktop /usr/share/mimelnk/application; \
if test -z ""; then \
echo "Updating desktop, mime, and icon databases."; \
update-desktop-database; \
update-mime-database $desktopdir/mime; \
gtk-update-icon-cache -f -t $desktopdir/icons/hicolor; \
else \
echo "*** Not updating desktop, mime, and icon databases. After install, run:"; \
echo "*** update-desktop-database"; \
echo "*** update-mime-database $desktopdir/mime"; \
echo "*** gtk-update-icon-cache -f -t $desktopdir/icons/hicolor"; \
fi
mkdir -p -- /usr/share/icons/hicolor/scalable/apps
mkdir: cannot create directory '/usr/share/icons': Permission denied
mkdir -p -- /usr/share/icons/hicolor/scalable/mimetypes
mkdir: cannot create directory '/usr/share/icons': Permission denied
mkdir -p -- /usr/share/applications
mkdir: cannot create directory '/usr/share/applications': Permission denied
mkdir -p -- /usr/share/mimelnk/application
mkdir: cannot create directory '/usr/share/mimelnk': Permission denied
/usr/bin/install: cannot create regular file '/usr/share/icons/hicolor/scalable/apps': No such file or directory
/usr/bin/install: cannot create regular file '/usr/share/icons/hicolor/scalable/mimetypes': No such file or directory
ln: failed to create symbolic link '/usr/share/icons/hicolor/scalable/mimetypes/gnome-mime-application-x-xoj.svg': No such file or directory
ln: failed to create symbolic link '/usr/share/icons/hicolor/scalable/mimetypes/application-x-xoj.svg': No such file or directory
/usr/bin/install: cannot create regular file '/usr/share/mime/packages/xournal.xml': Permission denied
/usr/bin/install: cannot create regular file '/usr/share/applications': Permission denied
/usr/bin/install: cannot create regular file '/usr/share/mimelnk/application': No such file or directory
Updating desktop, mime, and icon databases.
/bin/sh: line 23: update-desktop-database: command not found
I/O error : Permission denied
I/O error : Permission denied
Failed to write XML file; For permission problems, try rerunning as root
/bin/sh: line 25: gtk-update-icon-cache: command not found
make: *** [Makefile:834: desktop-install] Error 127
Command '['/bin/bash', '--norc', '--noprofile', '/tmp/ypkg-installSHjkRA']' returned non-zero exit status 2
[Build] install failed
ERRO[15:05:43] Failed to build package error="exit status 1"
ERRO[15:05:47] Failed to build packages
make[1]: Verzeichnis „/home/mbrueck/build/xournal“ wird verlassen
make abireport
make[1]: Verzeichnis „/home/mbrueck/build/xournal“ wird betreten
abireport -p abi_ -D `dirname package.yml` scan-packages `dirname package.yml`
Error locating packages: No packages in directory .

make[1]: *** [../Makefile.common:15: abireport] Fehler 1
make[1]: Verzeichnis „/home/mbrueck/build/xournal“ wird verlassen
make: *** [../Makefile.common:12: complete] Fehler 2
Any idea how to fix this?

I took the installation instructions from http://xournal.sourceforge.net/manual.html#installation

Thanks for any help.

User avatar
kyrios
Posts: 2075
Joined: Thu Sep 22, 2016 4:20 pm

Re: Permission problems while making xournal

Fri Sep 29, 2017 9:17 pm

mokkka wrote:
Fri Sep 29, 2017 2:24 pm

Any idea how to fix this?

I took the installation instructions from http://xournal.sourceforge.net/manual.html#installation

Thanks for any help.
try with

Code: Select all

make desktop-install DESTDIR="%installroot%"

mokkka
Posts: 12
Joined: Sun Sep 10, 2017 2:46 pm

Re: Permission problems while making xournal

Sat Sep 30, 2017 7:35 am

try with

Code: Select all

make desktop-install DESTDIR="%installroot%"
Wow thanks a lot it worked.

Can you explain, what DESTDIR="%installroot%" is doing?

User avatar
kyrios
Posts: 2075
Joined: Thu Sep 22, 2016 4:20 pm

Re: Permission problems while making xournal

Sat Sep 30, 2017 3:26 pm

mokkka wrote:
Sat Sep 30, 2017 7:35 am
try with

Code: Select all

make desktop-install DESTDIR="%installroot%"
Wow thanks a lot it worked.

Can you explain, what DESTDIR="%installroot%" is doing?
DESTDIR is the destination directory, and %installroot% is a macro that contains the installation directory.
More info on the help center: https://solus-project.com/articles/pack ... ge.yml/en/

Return to “Engagement”