Skip to content

Commit

Permalink
iputils: move from suid-bit to capabilities, see commit msg
Browse files Browse the repository at this point in the history
Note that recently pkgmk & pkgutils did not preserved packages xattrs.
This was fixed by pkgutils#455cde3 and pkgmk#cd35b68 commits.

Update pkgutils and pkgmk, check that your /etc/pkgmk.conf has the
following line:

	PKGMK_ARCHIVE_FORMAT="pax"

Hint: use rejmerge to alterate your /etc/pkgmk.conf file!

Finally, rebuild this (iputils) package if needed.
  • Loading branch information
sighook committed Jan 8, 2025
1 parent c1843c5 commit f4cf1f8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion iputils/.footprint
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
drwxr-xr-x root/root bin/
-rwsr-xr-x root/root bin/ping
-rwxr-xr-x root/root bin/ping
drwxr-xr-x root/root sbin/
-rwxr-xr-x root/root sbin/arping
drwxr-xr-x root/root usr/
Expand Down
17 changes: 10 additions & 7 deletions iputils/Pkgfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

name=iputils
version=20240905
release=1
release=2
source="https://github.com/$name/$name/archive/$version/$name-$version.tar.gz
https://archive.archlinux.org/packages/i/$name/$name-$version-1-x86_64.pkg.tar.zst"

Expand All @@ -16,17 +16,20 @@ build() {
-D b_pie=true \
-D BUILD_MANS=false \
-D USE_GETTEXT=false \
-D USE_CAP=true \

ninja -C build -j ${JOBS:-1} -v
#DESTDIR=$PKG ninja -C build install

install -m 755 -D build/ping/ping $PKG/bin/ping
install -m 755 -D build/arping $PKG/sbin/arping
install -m 755 -D build/tracepath $PKG/usr/sbin/tracepath
install -m 755 -D build/clockdiff $PKG/usr/sbin/clockdiff
install -m 0755 -D build/ping/ping $PKG/bin/ping
install -m 0755 -D build/arping $PKG/sbin/arping
install -m 0755 -D build/tracepath $PKG/usr/sbin/tracepath
install -m 0755 -D build/clockdiff $PKG/usr/sbin/clockdiff

install -m 644 -Dt $PKG/usr/share/man/man8/ \
install -m 0644 -Dt $PKG/usr/share/man/man8/ \
$SRC/usr/share/man/man8/*

chmod u+s $PKG/bin/ping
# cap_net_admin is needed for ping -m even on ICMP datagram socket
# (or cap_net_raw since Linux kernel 5.17).
setcap cap_net_admin,cap_net_raw+p $PKG/bin/ping
}

0 comments on commit f4cf1f8

Please sign in to comment.