Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 496134 - xattr pax-marking is erased when installing binary package
Summary: xattr pax-marking is erased when installing binary package
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: .tbz2 support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 427888 484436
  Show dependency tree
 
Reported: 2013-12-27 07:28 UTC by Nikoli
Modified: 2014-01-06 22:08 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikoli 2013-12-27 07:28:00 UTC
When installing files from binary packages all user.pax.flags are erased. So using binhosts is broken now. It is even worse then bug #465000
Is bug #382067 really fixed?

# emerge -1vba sys-auth/polkit
# paxctl-ng -v /usr/lib/polkit-1/polkitd
/usr/lib/polkit-1/polkitd:
        PT_PAX    : -e---
        XATTR_PAX : -emr-

# emerge -1vka sys-auth/polkit
# paxctl-ng -v /usr/lib/polkit-1/polkitd
/usr/lib/polkit-1/polkitd:
        PT_PAX    : -e---
        XATTR_PAX : not found


Used this guide https://wiki.gentoo.org/wiki/Hardened/PaX_flag_migration_from_PT_PAX_to_XATTR_PAX and migrated to PAX_MARKINGS="XT", kernel config has '# CONFIG_PAX_PT_PAX_FLAGS is not set'. Recompiled all packages which use pax-mark and reinstalled them in other system using binhost.
After reboot dmesg was full of 'grsec: denied RWX mmap of <anonymous mapping> by ' errors, polkitd failed to start, so desktop session was broken.
I think some fat warning about tar and bin packages should be added to this wiki page.

Portage 2.2.7 (hardened/linux/amd64, gcc-4.7.3, glibc-2.16.0, 3.12.6-hardened x86_64)
=================================================================
                        System Settings
=================================================================
KiB Mem:     4045044 total,    586352 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Fri, 27 Dec 2013 06:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r3
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo nikoli
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -O2 -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs cgroup collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/var/lib/layman/nikoli"
USE="X a52 aac acl acpi alsa amd64 amr audiofile bash-completion bzip2 cairo caps cdda cddb cdio cdparanoia cdr celt cli consolekit cracklib crypt css cups cxx dbus dc1394 djvu dri dts dv dvd dvdr encode exif fat ffmpeg flac fluidsynth fontconfig fortran gd geoip gif gimp gmp gnutls gphoto2 gpm graphviz gsm gstreamer gtk handbook hardened iconv icu id3tag idn ieee1394 ilbc imagemagick imap imlib ios ipod ipv6 jbig jpeg jpeg2k justify kde kipi lame laptop lcms libass libnotify libproxy libsamplerate lm_sensors lzma lzo mac mad matroska mikmod mmx mmxext modplug modules mp3 mp4 mpeg mtp mudflap multilib musepack musicbrainz ncurses networkmanager nls nptl nptlonly ntfs nvidia ogg openal openexr opengl openmp opus pam pango pax_kernel pcre pdf pg-intdatetime phonon plasma pm-utils png policykit postscript qt3support qt4 quicktime rar raw readline reiserfs replaygain rtmp sasl scanner session sid smp sndfile socks5 speex spell sqlite sse sse2 sse3 ssl ssse3 startup-notification svg symlink sysfs taglib theora threads thumbnail tiff truetype tta udev udisks unicode upnp upower usb v4l v4l2 vcd vorbis vpx wavpack webkit webp wifi wma wmf x264 xattr xcb xcomposite xface xinerama xml xmp xpm xscreensaver xv xvid xz zip zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="*" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-minimizer" LINGUAS="ru ru_RU en" NGINX_MODULES_HTTP="access auth_basic autoindex fastcgi gzip rewrite" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby20" USERLAND="GNU" VIDEO_CARDS="nouveau modesetting vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

app-arch/tar-1.26-r1 was built with the following:
USE="(multilib) nls test xattr -minimal -static" ABI_X86="64"
Comment 1 Alexander Tsoy 2013-12-27 11:30:23 UTC
(In reply to Nikoli from comment #0)
> Is bug #382067 really fixed?

May be portage doesn't pass --xattr option to tar?

This command returns nothing (portage-2.2.7):
$ qlist sys-apps/portage | xargs grep -l -- '--xattrs'
Comment 2 Anthony Basile gentoo-dev 2013-12-27 13:45:36 UTC
(In reply to Alexander Tsoy from comment #1)
> (In reply to Nikoli from comment #0)
> > Is bug #382067 really fixed?
> 
> May be portage doesn't pass --xattr option to tar?
> 
> This command returns nothing (portage-2.2.7):
> $ qlist sys-apps/portage | xargs grep -l -- '--xattrs'

That's correct and that is the cause of this bug.  We do have xattr support in tar, but portage isn't supplying it.

Bug #382067 is fixed.  Bug #465000 is almost fixed --- we have a python wrapper in there but it is too slow.  This needs to be rewritten in C.  But this is new.
Comment 3 Arfrever Frehtes Taifersar Arahesis 2013-12-27 18:09:03 UTC
Fix:
http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commitdiff;h=0331526698e485508a1040d24acca5f5eff1c3f3

xattr patch for tar-1.26 is broken, so >=tar-1.27 needs to be used.
Comment 4 Brian Dolbec gentoo-dev 2014-01-06 21:57:07 UTC
Released in portage-2.2.8