Skip to content

Commit

Permalink
Add apparmor profile
Browse files Browse the repository at this point in the history
  • Loading branch information
aaruni96 committed Dec 11, 2024
1 parent 548264d commit 6ebcdc8
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
prefix = /usr/local
sysconfdir=/etc

all:
echo "Python package doesn't need compiling!"

install:
install src/maps $(DESTDIR)$(prefix)/bin/maps
install --mode 644 src/completion.bash $(DESTDIR)$(prefix)/share/bash-completion/completions/maps
install --mode 644 src/usr.bin.maps $(DESTDIR)$(sysconfdir)/apparmor.d/usr.bin.maps

clean:
echo "nothing to compile, so nothing to clean!"
1 change: 1 addition & 0 deletions pkg/arch/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ pkgver() {
package(){
install -Dm 755 "$srcdir/maps/src/maps" "$pkgdir/usr/bin/maps"
install -Dm 644 "$srcdir/maps/src/completion.bash" "$pkgdir/usr/share/bash-completion/completions/maps"
install -Dm 644 "$srcdir/maps/src/usr.bin.maps" "$pkgdir/etc/apparmor.d/usr.bin.maps"
}
1 change: 1 addition & 0 deletions pkg/debian/maps.dirs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
usr/bin
usr/share/bash-completion/completions
etc/apparmor.d/
2 changes: 1 addition & 1 deletion pkg/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
dh $@

override_dh_auto_install:
$(MAKE) DESTDIR=$$(pwd)/debian/maps prefix=/usr install
$(MAKE) DESTDIR=$$(pwd)/debian/maps prefix=/usr sysconfdir=/etc install
6 changes: 4 additions & 2 deletions pkg/rpm/maps.spec
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ MaPS helps mathematicians create and publish software runtimes, as well as deplo
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_bindir} $RPM_BUILD_ROOT/%{_datadir}/bash-completion/completions
cp src/%{name} $RPM_BUILD_ROOT/%{_bindir}
cp src/completion.bash $RPM_BUILD_ROOT/%{_datadir}/bash-completion/completions/%{name}
install -Dm 755 src/%{name} $RPM_BUILD_ROOT/%{_bindir}
install -Dm 644 src/completion.bash $RPM_BUILD_ROOT/%{_datadir}/bash-completion/completions/%{name}
install -Dm 644 src/usr.bin.%{name} $RPM_BUILD_ROOT/%{_sysconfdir}/apparmor.d/usr.bin.%{name}


%files
%{_bindir}/%{name}
%{_datadir}/bash-completion/completions/%{name}
%{_sysconfdir}/apparmor.d/usr.bin.%{name}



Expand Down
7 changes: 7 additions & 0 deletions src/usr.bin.maps
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
abi <abi/4.0>
include <tunables/global>

profile maps /usr/bin/maps flags=(unconfined) {
userns,
include if exists <local/bwrap>
}

0 comments on commit 6ebcdc8

Please sign in to comment.