mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Add apparmor profile for pgAdmin when installing on Debian based OS
This commit is contained in:
parent
8cf15ea17c
commit
9544ce1d18
@ -68,6 +68,10 @@ fakeroot dpkg-deb --build "${SERVERROOT}" "${DISTROOT}/${APP_NAME}-server_${APP_
|
|||||||
echo "Creating the desktop package..."
|
echo "Creating the desktop package..."
|
||||||
mkdir "${DESKTOPROOT}/DEBIAN"
|
mkdir "${DESKTOPROOT}/DEBIAN"
|
||||||
|
|
||||||
|
cat << EOF > "${DESKTOPROOT}/DEBIAN/conffiles"
|
||||||
|
/etc/apparmor.d/pgadmin4
|
||||||
|
EOF
|
||||||
|
|
||||||
cat << EOF > "${DESKTOPROOT}/DEBIAN/control"
|
cat << EOF > "${DESKTOPROOT}/DEBIAN/control"
|
||||||
Package: ${APP_NAME}-desktop
|
Package: ${APP_NAME}-desktop
|
||||||
Version: ${APP_LONG_VERSION}
|
Version: ${APP_LONG_VERSION}
|
||||||
@ -79,6 +83,17 @@ Maintainer: pgAdmin Development Team <pgadmin-hackers@postgresql.org>
|
|||||||
Description: The desktop user interface for pgAdmin. pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.
|
Description: The desktop user interface for pgAdmin. pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
cat << EOF > "${DESKTOPROOT}/DEBIAN/postinst"
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
systemctl restart apparmor.service
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod 755 "${DESKTOPROOT}/DEBIAN/postinst"
|
||||||
|
|
||||||
|
mkdir -p "${DESKTOPROOT}/etc/apparmor.d"
|
||||||
|
cp "${SOURCEDIR}/pkg/debian/pgadmin4-aa-profile" "${DESKTOPROOT}/etc/apparmor.d/pgadmin4"
|
||||||
|
|
||||||
# Build the Debian package for the desktop
|
# Build the Debian package for the desktop
|
||||||
chmod -R u+rwX,go+rX,go-w "${DESKTOPROOT}"
|
chmod -R u+rwX,go+rX,go-w "${DESKTOPROOT}"
|
||||||
fakeroot dpkg-deb --build "${DESKTOPROOT}" "${DISTROOT}/${APP_NAME}-desktop_${APP_LONG_VERSION}_${OS_ARCH}.deb"
|
fakeroot dpkg-deb --build "${DESKTOPROOT}" "${DISTROOT}/${APP_NAME}-desktop_${APP_LONG_VERSION}_${OS_ARCH}.deb"
|
||||||
|
12
pkg/debian/pgadmin4-aa-profile
Normal file
12
pkg/debian/pgadmin4-aa-profile
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# This profile allows everything and only exists to give the
|
||||||
|
# application a name instead of having the label "unconfined"
|
||||||
|
|
||||||
|
abi <abi/4.0>,
|
||||||
|
include <tunables/global>
|
||||||
|
|
||||||
|
profile pgadmin4 /usr/pgadmin4/bin/pgadmin4 flags=(unconfined) {
|
||||||
|
userns,
|
||||||
|
|
||||||
|
# Site-specific additions and overrides. See local/README for details.
|
||||||
|
include if exists <local/pgadmin4>
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user