Re: [arch-general] [ Pacman -Syu ] Creating temporary files..., error: command failed to execute correctly
Dear Eli, Thank you! Question regarding status of the bug has been filed! Yours sincerely, Xianwen On 09/09/2019 00.47, Eli Schwartz via arch-general wrote: On 9/8/19 6:27 PM, Xianwen Chen (陈贤文) via arch-general wrote: For example, $ sudo pacrepairfile --uid --gid --mode --mtime /usr/lib/tmpfiles.d/colord.conf outputs /usr/lib/tmpfiles.d/colord.conf: set uid to 0 /usr/lib/tmpfiles.d/colord.conf: set gid to 0 warning: /usr/lib/tmpfiles.d/colord.conf: unable to set permissions (Operation not supported) /usr/lib/tmpfiles.d/colord.conf: set modification time to 111829 What happened with pacrepairfile? Ah, now I remember that https://github.com/andrewgregory/pacutils/issues/32 is a thing. :) The --mode option has some issues. Perhaps try asking for a status update there?
Re: [arch-general] [ Pacman -Syu ] Creating temporary files..., error: command failed to execute correctly
Dear Eli, Thank you. I wrote a regulation expression, which extracts file name and path from the output of paccheck: $ sudo paccheck --file-properties --quiet | grep -Po "(?<=\').*(?=\')" | sudo pacrepairfile --uid --gid --mode --mtime However, somehow pacrepairfile was not working. For example, $ sudo pacrepairfile --uid --gid --mode --mtime /usr/lib/tmpfiles.d/colord.conf outputs /usr/lib/tmpfiles.d/colord.conf: set uid to 0 /usr/lib/tmpfiles.d/colord.conf: set gid to 0 warning: /usr/lib/tmpfiles.d/colord.conf: unable to set permissions (Operation not supported) /usr/lib/tmpfiles.d/colord.conf: set modification time to 111829 What happened with pacrepairfile? Yours sincerely, Xianwen On 08/09/2019 22.53, Eli Schwartz via arch-general wrote: On 9/8/19 4:40 PM, Xianwen Chen (陈贤文) via arch-general wrote: Dear Eli, Thank you! Is there a way to ask paccheck to list only files that need to be fixed? For example, if I run sudo paccheck --file-properties --quiet I get list of files with package information and error information, such as screen: '/usr/lib/tmpfiles.d/screen.conf' permission mismatch (expected 644) Or maybe I need to write a regular expression to extract file name and path from such an output myself? No, paccheck does not have an option to do this. You could try submitting a feature request for it. :) You can extract everything between the '' though, which I think should handle any filenames since packaged filenames can contain spaces or single quotes but not newlines, and the paccheck output doesn't contain any more single quotes after the quoted filename.
Re: [arch-general] [ Pacman -Syu ] Creating temporary files..., error: command failed to execute correctly
Dear Eli, Thank you! Is there a way to ask paccheck to list only files that need to be fixed? For example, if I run sudo paccheck --file-properties --quiet I get list of files with package information and error information, such as screen: '/usr/lib/tmpfiles.d/screen.conf' permission mismatch (expected 644) Or maybe I need to write a regular expression to extract file name and path from such an output myself? Yours sincerely, Xianwen On 08/09/2019 19.14, Eli Schwartz via arch-general wrote: On 9/8/19 8:21 AM, Xianwen Chen (陈贤文) via arch-general wrote: Dear Ralph and Eli, Thank you. As Ralph suspected, there are quite many files on my system that had wrong permissions or GID's. Is there a way to automatically correct all the permissions and GID's? Once more from the pacutils package, comes the "pacrepairfile" command. Given a list of files and the (separate, additive) arguments --uid --gid --mode --mtime you can reset the file to what its mtree data specified. If the file size/contents differ, you will have to do a bit of manual work yourself, or reinstall the package.
Re: [arch-general] [ Pacman -Syu ] Creating temporary files..., error: command failed to execute correctly
Dear Ralph, Great! Thank you very much for the tips! Yours sincerely, Xianwen On 08/09/2019 15.11, Ralph Corderoy wrote: Dear Xianwen, there are quite many files on my system that had wrong permissions or GID's. Perhaps there's been an errant recursive chmod or chgrp in the past by root. Is there a way to automatically correct all the permissions and GID's? Others like Eli might know an mtree-specific way, but if there's a common feature, like lots of files under /usr/bin that are group xianwen instead of root, then find(1) could be used to first list what it would change, allowing the list to be checked by eye, and then correct. Something like find -xdev /usr/bin -group xianwen -ls find -xdev /usr/bin -group xianwen -exec chgrp root {} + https://mywiki.wooledge.org/UsingFind might help if you're not familiar with find(1). It has -user and -perm too. Or you could try and use the output of paccheck(1) to produce a script to execute, again after checking it by eye. sudo -i paccheck --quiet --file-properties | awk ' / permission mismatch / { print "chmod 0" substr($6, 1, length($6)-1), $2 } '
Re: [arch-general] [ Pacman -Syu ] Creating temporary files..., error: command failed to execute correctly
Dear Ralph and Eli, Thank you. As Ralph suspected, there are quite many files on my system that had wrong permissions or GID's. Is there a way to automatically correct all the permissions and GID's? Yours sincerely, Xianwen On 08/09/2019 11.28, Eli Schwartz via arch-general wrote: On 9/8/19 5:20 AM, Ralph Corderoy wrote: Dear Xianwen, After searching on-line, it seemed that similar problems were reported by other users of systemd. The fix is to set owner of / as root.root. I tried the solution and it worked! I'm glad you fixed it. / not being root:root is strange. You may wish to sudo -i pacman -Qqkk to check for other odd permissions, etc., in case they too cause problems later. Note, it seems normal for some packages to cause grumbles from the above command. If a package is listed, I then do sudo -i pacman -Qkk atop to see more detail of the problem. Though unfortunately not enough detail, i.e. warning: atop: /var/log/atop/dummy_after (Permissions mismatch) doesn't tell me what they should be. One has to grovel around in the mtree file for that. $ zcat /var/lib/pacman/local/atop-*/mtree | > grep '^./var/log/atop/dummy_after ' | > fmt ./var/log/atop/dummy_after time=1549485614.0 size=0 md5digest=d41d8cd98f00b204e9800998ecf8427e sha256digest=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 $ This entry doesn't have a ‘mode=...’ stating the desired permissions. mtree(5) doesn't say so, but I think it defaults to 0644 for files based on the other mode-less entries in that mtree file that don't cause pacman to complain. Not every error means the file on disk must be changed, perhaps it's a packaging problem, but it can be a useful aid. pacman -S pacutils && paccheck --file-properties
Re: [arch-general] [ Pacman -Syu ] Creating temporary files..., error: command failed to execute correctly
Dear Ralph, Thank you very much for the lecture! It seems that the issue may be permissions. $ sudo /usr/bin/systemd-tmpfiles --create /run/tmpfiles.d/kmod.conf Arch returns: Detected unsafe path transition / → /dev during canonicalization of /dev. Detected unsafe path transition / → /dev during canonicalization of /dev. Detected unsafe path transition / → /dev during canonicalization of /dev. Detected unsafe path transition / → /dev during canonicalization of /dev. Detected unsafe path transition / → /dev during canonicalization of /dev. $ cat /run/tmpfiles.d/kmod.conf c! /dev/fuse 0600 - - - 10:229 c! /dev/cuse 0600 - - - 10:203 c! /dev/btrfs-control 0600 - - - 10:234 c! /dev/nvram 0600 - - - 10:144 c! /dev/loop-control 0600 - - - 10:237 d /dev/net 0755 - - - c! /dev/net/tun 0600 - - - 10:200 c! /dev/ppp 0600 - - - 108:0 c! /dev/uinput 0600 - - - 10:223 d /dev/mapper 0755 - - - c! /dev/mapper/control 0600 - - - 10:236 d /dev/vfio 0755 - - - c! /dev/vfio/vfio 0600 - - - 10:196 c! /dev/userio 0600 - - - 10:240 c! /dev/vhci 0600 - - - 10:137 c! /dev/uhid 0600 - - - 10:239 c! /dev/vhost-net 0600 - - - 10:238 c! /dev/vhost-vsock 0600 - - - 10:241 d /dev/snd 0755 - - - c! /dev/snd/timer 0600 - - - 116:33 d /dev/snd 0755 - - - c! /dev/snd/seq 0600 - - - 116:1 There are more error messages of unsafe path transition if I run $ sudo /usr/bin/systemd-tmpfiles --create without specifying a tmpfile, then all tmpfiles are triggered. After searching on-line, it seemed that similar problems were reported by other users of systemd. The fix is to set owner of / as root.root. I tried the solution and it worked! Running $ sudo /usr/bin/systemd-tmpfiles --create no longers gives me error message! Yours sincerely, Xianwen On 07/09/2019 15.07, Ralph Corderoy wrote: Dear Xianwen, :: Running post-transaction hooks... ... (5/9) Creating temporary files... error: command failed to execute correctly (6/9) Reloading device manager configuration... Here's the path I trod to investigate this. $ cd /usr/share/libalpm/hooks $ grep 'Creating temporary files' * systemd-tmpfiles.hook:Description = Creating temporary files... $ $ cat systemd-tmpfiles.hook [Trigger] Type = File Operation = Install Operation = Upgrade Target = usr/lib/tmpfiles.d/*.conf [Action] Description = Creating temporary files... When = PostTransaction Exec = /usr/share/libalpm/scripts/systemd-hook tmpfiles $ $ file /usr/share/libalpm/scripts/systemd-hook /usr/share/libalpm/scripts/systemd-hook: POSIX shell script, ASCII text executable $ $ grep -1 tmpfiles /usr/share/libalpm/scripts/systemd-hook sysusers) /usr/bin/systemd-sysusers ;; tmpfiles) /usr/bin/systemd-tmpfiles --create ;; $ $ man systemd-tmpfiles ... DESCRIPTION systemd-tmpfiles creates, deletes, and cleans up volatile and temporary files and directories, based on the configuration file format and location specified in tmpfiles.d(5). $ man 5 tmpfiles.d ... SYNOPSIS /etc/tmpfiles.d/*.conf /run/tmpfiles.d/*.conf /usr/lib/tmpfiles.d/*.conf ~/.config/user-tmpfiles.d/*.conf $XDG_RUNTIME_DIR/user-tmpfiles.d/*.conf ~/.local/share/user-tmpfiles.d/*.conf ... /usr/share/user-tmpfiles.d/*.conf So one of the *.conf files in those directory is triggering that error. systemd-tmpfiles(8) says one or more *.conf files can be given after ‘--create’ so I suggest running it on each in turn to see if the error still occurs for one of them. This may required sudo(8).
[arch-general] [ Pacman -Syu ] Creating temporary files..., error: command failed to execute correctly
Dear list, When I upgrade the packages, from time to time I receive this error information: __Creating temporary files...,__ __error: command failed to execute correctly__ I checked on-line and it seems that I shall look for more error information in the log files. But I don't know where to start. Could you point me to the log files that I shall look into? Thank you. Yours sincerely, Xianwen PS: Below is the entire message from pacman / yaourt. :: Processing package changes... ( 1/20) installing python-html2text [] 100% ( 2/20) upgrading bookworm [] 100% ( 3/20) upgrading qpdf [] 100% ( 4/20) upgrading cups-filters [] 100% ( 5/20) upgrading foomatic-db [] 100% ( 6/20) upgrading foomatic-db-nonfree [] 100% ( 7/20) upgrading fvwm [] 100% ( 8/20) upgrading gap [] 100% ( 9/20) upgrading libkdegames [] 100% (10/20) upgrading kbreakout [] 100% (11/20) upgrading libnm [] 100% (12/20) upgrading libraw [] 100% (13/20) upgrading libreoffice-fresh [] 100% (14/20) upgrading libreoffice-fresh-en-gb [] 100% (15/20) upgrading libreoffice-fresh-nb [] 100% (16/20) upgrading libreoffice-fresh-nn [] 100% (17/20) upgrading libwbclient [] 100% (18/20) upgrading networkmanager [] 100% (19/20) upgrading smbclient [] 100% (20/20) upgrading samba [] 100% :: Running post-transaction hooks... (1/9) Reloading system bus configuration... (2/9) Compiling GSettings XML schema files... (3/9) Updating icon theme caches... (4/9) Reloading system manager configuration... (5/9) Creating temporary files... error: command failed to execute correctly (6/9) Reloading device manager configuration... (7/9) Arming ConditionNeedsUpdate... (8/9) Updating the desktop file MIME type cache... (9/9) Updating the MIME type database... No database errors have been found!