A few warnings while installing Packet tracer

hello
i just installed Packet Tracer from the AUR by following the instructions pinned there and with some help from this forum.
it seems to have installed well and opens up when launching it.(but i haven’t really used it yet)

i got these warnings when installing it:

warning: directory permissions differ on /opt/
filesystem: 755  package: 775
warning: directory permissions differ on /usr/
filesystem: 755  package: 775
warning: directory permissions differ on /usr/share/
filesystem: 755  package: 775
warning: directory permissions differ on /usr/share/applications/
filesystem: 755  package: 775
warning: directory permissions differ on /usr/share/icons/
filesystem: 755  package: 775
warning: directory permissions differ on /usr/share/icons/gnome/
filesystem: 755  package: 775
warning: directory permissions differ on /usr/share/icons/gnome/48x48/
filesystem: 755  package: 775
warning: directory permissions differ on /usr/share/icons/gnome/48x48/mimetypes/
filesystem: 755  package: 775
warning: directory permissions differ on /usr/share/mime/
filesystem: 755  package: 775
warning: directory permissions differ on /usr/share/mime/packages/
filesystem: 755  package: 775

is it “normal”?
should i leave it or-while looking around-i saw that maybe i should do chmod 755 for all these directories?(i saw this suggestion in posts not related to packet tracer,but in general)
oh and i got a ton of errors in journalctl -p 3 -xb

It happens from time to time.

The permissions already are 755 in your filesystem. The package is telling you that it wants 775 permissions instead, which is not advisable, as it would allow every process whose user account is a member of the root group to have write permission on those directories.

1 Like

Thanks Aragorn,

does/could this affect the proper functioning of the program?

Not normally, no, and as I said, 775 permissions on system-owned directories are less secure than 755. It was probably a typo by the packager.

then i won’t be changing the permission,and if needed I’ll run it in a windows vm.

that’s what I’ve found in the pkgbuild:

install -D -m755 "${srcdir}/packettracer.sh" "${pkgdir}/etc/profile.d/packettracer.sh"

That’s weird, because there it says to use 755 permissions, while the warning you got clearly states that the package wants 775. :thinking:

That’s only the binary, the warning are about directories. The PKGBUILD extracts the files from the .deb and places them without setting any permissions. That means the incorrect permissions were set upstream.

You can add this to the end of the package() function to set the proper directory permissions:

find "$pkgdir" -type d -exec chmod -v 0755 {} \;
2 Likes

hi Yochanan
-can i do it now after i already ran this PKGBUILD?
-should i,if packet tracer seems to work anyway? (i haven’t really used it yet)
-is the way to do it;is open a terminal and type:

find packettracer -type d -exec chmod -v 0755 {} \;

Technically, but that would be too much trouble. It’s better to do it via the PKGBUILD and build it again so the files are installed properly.

If you let the AUR maintainer know, he can update the PKGBUILD and you won’t have to worry about it next time.

No, as the files are installed in different directories, not a directory called packettracer.

2 Likes

so i should put your command after the last line ( install -D -m644... )with a space between them, and then put this sign } at the end?

Summary
# Maintainer: Runnytu < runnytu at gmail dot com >
# OldMaintainer: Alexey Kharlamov <der@2-47.ru>
# Contributor: David Dufberg Tøttrup <david at dufberg dot se>
# Contributor: Jordi De Groof <jordi(dot)degroof(at)gmail(dot)com>
# Contributor: pyther <pyther@pyther.net>
# Contributor: z3ntu <WEI16416@spengergasse.at>

pkgname=packettracer
pkgver=8.0
pkgrel=1
pkgdesc="Cisco PacketTracer 8.0 installation package"
arch=( 'x86_64' )
depends=('openssl>=1.0' 'dbus' 'icu' 'glib2' 'libxml2' 'libjpeg-turbo' 'nss' 'libxss')
options=('!strip' '!emptydirs')
url="https://www.netacad.com/courses/packet-tracer"
install=${pkgname}.install
license=('custom')

source=('local://PacketTracer_800_amd64_build212_final.deb'
	'packettracer.sh'
	'packettracer.install')
sha512sums=('3a56a369ae2028fa866ad2e27bbe07d1bee14fd0f16f82790c5f7ad9b7a7c3fc39b4b88d52aae652dccf1a21a3ae0f433e8b586ace4f48dfab7271524c5d163c'
	    '3246843441207d66ccffd0717aa85a7bf828842c2c337d1527597bdf57cc2f9966c75c764aa22f9cb6a331e6268dd64af0da7ce4cc89725d418fc54e163230f2'
	    'c0e894ff34e5e635574edcca9cd06dddc1706deef82032a964f779c1ac734e41ba328287ee7a8c989b9c4baf6a517e4d482465803f8f2dabd691616bf972cb7a')

package() {

	tar xf data.tar.xz -C "${pkgdir}"
	chown -R 0:0 ${pkgdir}
	mv ${pkgdir}/opt/pt/ ${pkgdir}/opt/packettracer/

	mkdir -p "${pkgdir}/usr/bin/"
	ln -s /opt/packettracer/packettracer "${pkgdir}/usr/bin/packettracer"

	ln -s /usr/lib/libdouble-conversion.so "${pkgdir}/opt/packettracer/bin/libdouble-conversion.so.1"

	sed 's/\/opt\/pt/\/opt\/packettracer/' -i "${pkgdir}/opt/packettracer/linguist"
	sed 's/\/opt\/pt/\/opt\/packettracer/' -i "${pkgdir}/opt/packettracer/packettracer"
	sed 's/\/opt\/pt/\/opt\/packettracer/' -i "${pkgdir}/usr/share/applications/cisco-pt.desktop"
	sed 's/\/opt\/pt/\/opt\/packettracer/' -i "${pkgdir}/usr/share/applications/cisco-ptsa.desktop"
	sed -e "\$aCategories=Application;Network;" -i "${pkgdir}/usr/share/applications/cisco-pt.desktop"
	sed -e "\$aCategories=Application;Network;" -i "${pkgdir}/usr/share/applications/cisco-ptsa.desktop"
	sed -e "\$aNoDisplay=true" -i "${pkgdir}/usr/share/applications/cisco-ptsa.desktop"

	install -D -m755 "${srcdir}/packettracer.sh" "${pkgdir}/etc/profile.d/packettracer.sh"

	install -D -m644 "${pkgdir}/opt/packettracer/saves/Switch/IE_2000/upgrade_downgrade_license_on_ie2000.pkt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	install -D -m644 "${pkgdir}/opt/packettracer/help/default/copyrights.htm" "${pkgdir}/usr/share/licenses/${pkgname}/COPYRIGHT"

}

also how should i uninstall a PKGBUILD;
through pamac,or “pacman -R, -Rs, -Rsn, packettracer” ?
do i even have to uninstall,or can i run the PKGBUILD again and it will sort itself and skip unnecessary/already done steps?

Yes.

	install -D -m644 "${pkgdir}/opt/packettracer/help/default/copyrights.htm" "${pkgdir}/usr/share/licenses/${pkgname}/COPYRIGHT"

	# Fix directory permissions
	find "$pkgdir" -type d -exec chmod -v 0755 {} \;
}

A PKGBUILD is a build script, it just tells makepkg (part of pacman) what to do to create a package.

You don’t need to uninstall anything, just edit the PKGBUILD when prompted during install by pamac or whatever AUR helper you’re using or build it manually.

i already installed Packettracer(and it’s running fine) and that’s when i saw those errors appear,
so i was wondering if i need to uninstall it and build it again with your command included this time,
or just run makepkg -is again with you line included?

Well, almost. There’s already a built package, so add the -f flag to overwrite it

1 Like

Thank you.
i’ll post a comment in the AUR asking about those errors,and provide your solution,
but i don’t see other persons mentioning it a part from two,and one of them is also using manjaro.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.