I have the following structure:
./inst/opt/test/ls
: a copy of the /bin/ls
binary, just for the sake of simplicity.
./inst/DEBIAN/changelog
:
test (1) unstable; urgency=low
* test 1
-- test <test@test.com> April 28, 2020
./inst/DEBIAN/control
:
Package: test
Version: 1
Architecture: amd64
Section: unknown
Priority: optional
Maintainer: test <test@test.com>
Build-Depends: debhelper (>= 8.0.0)
Standards-Version: 3.9.4
Homepage: https://www.test.com/
Depends: libappindicator1
Description: Test
./inst/DEBIAN/compat
:
9
So far, so good.
What I'm trying to achieve is to make ls
owned by root
and with set setuid bit after installation. Here's one of my many attempts to do so:
./inst/DEBIAN/rules
:
#!/usr/bin/make -f
%:
dh $@
override_dh_fixperms:
dh_fixperms --exclude ls
find . -name ls -exec chmod +s {} \;
but the result with and without this file doesn't change at all.
Building the deb package with
dpkg-deb --build ~/test/inst/ ~/test/
I'm obviously missing something big. Can somebody tell me what?
Note, that postinst
is not an option in my case.
ls
binary, but for simplicity included the text file. Could be misleading, I agree (although you can technically executechmod +s <test_file>
. – Kiril Kirov Apr 28 '20 at 17:44ls
again, as it's indeed misleading. Also my bad about using 'sticky bit' instead of 'setuid' indeed – Kiril Kirov Apr 28 '20 at 20:26