util-linux is a random collection of Linux utilities

Related tags

CLI util-linux
Overview
				  util-linux

		util-linux is a random collection of Linux utilities

     Note: for the years 2006-2010 this project was named "util-linux-ng".

COMPILE & INSTALL:

      See Documentation/howto-compilation.txt.

MAILING LIST:

      E-MAIL:  [email protected]
      URL:     http://vger.kernel.org/vger-lists.html#util-linux
      ARCHIVE: https://lore.kernel.org/util-linux/

      The mailing list will reject email messages that contain:
       - more than 100K characters
       - html
       - spam phrases/keywords
      See: http://vger.kernel.org/majordomo-info.html#taboo

IRC CHANNEL:

      #util-linux at freenode.net:

      irc://chat.freenode.net/util-linux

      The IRC channel and Mailing list are for developers and project
      maintainers. For end users it is recommended to utilize the
      distribution's support system.

BUG REPORTING:

      E-MAIL: [email protected]
      Web:    https://github.com/karelzak/util-linux/issues

      This project has no resources to provide support for distribution specific
      issues. For end users it is recommended to utilize the distribution's
      support system.

NLS (PO TRANSLATIONS):

      PO files are maintained by:
	  http://translationproject.org/domain/util-linux.html

VERSION SCHEMA:

      Standard releases:
	  .[.]
	     major = fatal and deep changes
	     minor = typical release with new features
	     maint = maintenance releases; bug fixes only

      Development releases:
	 .-rc

SOURCE CODE:

 Download archive:
	  https://www.kernel.org/pub/linux/utils/util-linux/

 See also:
     Documentation/howto-contribute.txt
     Documentation/howto-build-sys.txt
     Documentation/howto-pull-request.txt

 SCM (Source Code Management) Repository:

    Primary repository:
	  git clone git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git

    Backup repository:
	  git clone git://github.com/karelzak/util-linux.git

    Web interfaces:
	  http://git.kernel.org/cgit/utils/util-linux/util-linux.git
	  https://github.com/karelzak/util-linux

      Note: the GitHub repository may contain temporary development branches too.

      The kernel.org repository contains master (current development) and stable/*
      (maintenance) branches only. All master or stable/* changes are always pushed
      to both repositories at the same time.

    Repository Branches: 'git branch -a'
	  master branch
	   - current development
	   - the source for stable releases when deemed ready.
	   - day-to-day status is: 'it works for me'. This means that its
	     normal state is useful but not well tested.
	   - long-term development or invasive changes in active development are
	     forked into separate 'topic' branches from the tip of 'master'.

	  stable/ branches
	   - public releases
	   - branch name: stable/v..
	   - created from the 'master' branch after two or more release
	     candidates and the final public release. This means that the stable
	     releases are committed, tagged, and reachable in 'master'.
	   - these branches then become forked development branches. This means
	     that any changes made to them diverge from the 'master' branch.
	   - maintenance releases are part of, and belong to, their respective
	     stable branch. As such, they are tags(..) and
	     not branches of their own. They are not part of, visible in, or
	     have anything to do with the 'master' development branch. In git
	     terminology: maintenance releases are not reachable from 'master'.
	   - when initially cloned (as with the 'git clone' command given above)
	     these branches are created as 'remote tracking branches' and are
	     only visible by using the -a or -r options to 'git branch'. To
	     create a local branch use the desired tag with this command:
	     'git checkout -b v2.29.2 v2.29.2'

    Tags: 'git tag'
	   - a new tag object is created for every release.
	   - tag name: v.
	   - all tags are signed by the maintainer's PGP key.

    Known Bugs:
	- don't use tag v2.13.1 (created and published by mistake),
	  use v2.13.1-REAL instead.

WORKFLOW EXAMPLE:

 1) development (branch: )

 2) master release (tags: v2.29-rc1, v2.29-rc2, v2.29, branch: )

 3) development (work on v2.30, branch: )

 4) fork -- create a new branch  based on tag v2.29

     4a) new patches or cherry-pick patches from  (branch: )

     4b) stable release (tag: v2.29.1, branch: )

     4c) more patches; another release (tag: v2.29.2, branch: )

 5) master release v2.30 (branch: )
    ...

where 3) and 4) happen simultaneously.

Issues
  • CD cannot be mounted automatically (The cd was burned twice in Windows)

    CD cannot be mounted automatically (The cd was burned twice in Windows)

    A CD (DVD+R), formatted as udf file system. Burn the disc under the windows system for the first time, and the disc can be mounted normally under linux.

    Then burn the disc for the second time under windows (additional burn). At this time, the disc cannot be automatically mounted, and it can be used after manual mounting.

    Note that by changing the version of libblkid1, it is found that this problem does not exist in versions prior to 2.31.1-0.5 (including this version).

    You can test it through the Ubuntu system.

    The following is the blkid command information of the CD (Disc burned twice in the windos system) in the linux system.

    libblkid1_2.31.1-0.5:
    uos-PC:~$ blkid 
    ……
    /dev/sr0: UUID="0930121120554446" LABEL="kelu2" TYPE="udf"
    /dev/sdb1: LABEL_FATBOOT="UKNOWN" LABEL="UKNOWN" TYPE="vfat"
    
    uos-PC:~$ blkid -o list
    device        fs_type       label      mount                              point UUID
    ……   
    /dev/sr0   udf               kelu2    /media/uos/disk               0930121120554446
    
    libblkid1_2.32-0.1:
    uos-PC:~$ blkid
    ……
    /dev/sr0: UUID="0930121120554446" LABEL="kelu2" TYPE="udf"
    
    [email protected]:~$ blkid -o list
    device          fs_type      label              mount point                           UUID
    ……
    /dev/sr0       udf            kelu2           (not mounted)               0930121120554446
    

    udevinfo

    opened by HeroesLoveToRoujiamo 81
  • RFC: lsfd, a brand new Linux specific replacement for lsof

    RFC: lsfd, a brand new Linux specific replacement for lsof

    As you noticed at https://github.com/lsof-org/lsof/issues/89, I have developed lsfd. lsfd is a command like lsof. The critical differences are (1) lsfd is specialized to Linux, and (2) lsfd is based on libsmartcols.

    This pull request is for getting comments. Socket-related information is not extracted yet. The filtering feature that lsof is not implemented yet. Test cases are not available yet. The man page is not available yet. They are parts of future work.

    A quirk in this pull request is about POSIX threads. I assumed using multiple threads may improve the performance of listing. After implementing and measuring the execution time, I found the performance is not so improved as I expected. So I deleted the code for multi-threading.

    Anyway, I made so many commits. I would like to get comments before going ahead more.

    example output:
    $ sudo ./lsfd | grep -v mem | head -30
    COMMAND                                PID            USER  ASSOC MODE TYPE              DEVNAME MNTID      INODE NAME
    systemd                                  1            root    exe  ---  REG                 dm-0     0  201398717 /usr/lib/systemd/systemd
    systemd                                  1            root    cwd  ---  DIR                 dm-0     0         96 /
    systemd                                  1            root    rtd  ---  DIR                 dm-0     0         96 /
    systemd                                  1            root cgroup  ---  REG                  0:4     0 4026531835 cgroup:[4026531835]
    systemd                                  1            root    ipc  ---  REG                  0:4     0 4026531839 ipc:[4026531839]
    systemd                                  1            root    mnt  ---  REG                  0:4     0 4026531840 mnt:[4026531840]
    systemd                                  1            root    net  ---  REG                  0:4     0 4026532000 net:[4026532000]
    systemd                                  1            root    pid  ---  REG                  0:4     0 4026531836 pid:[4026531836]
    systemd                                  1            root  pid4c  ---  REG                  0:4     0 4026531836 pid:[4026531836]
    systemd                                  1            root   time  ---  REG                  0:4     0 4026531834 time:[4026531834]
    systemd                                  1            root time4c  ---  REG                  0:4     0 4026531834 time:[4026531834]
    systemd                                  1            root   user  ---  REG                  0:4     0 4026531837 user:[4026531837]
    systemd                                  1            root    uts  ---  REG                  0:4     0 4026531838 uts:[4026531838]
    ...
    

    check list taken from @karelzak's [comments](https://github.com/karelzak/util-linux/pull/1418#issuecomment-905455422):
    • [x] ~it would be nice to avoid generic struct names like "file", it would be better to have for example "struct lsfd_file", etc.~ the request for change is canceld
    • [ ] can we parse "name" and deduce TYPE rather than use UNKN? , for example...seems like we can use INOTIFY, SIGNAL, and TIMER there
    • [ ] Why the same file for the same task is printed more than once: ... it would be nice to add a hint about the difference to the output. Now it's confusing.
    • [ ] It would be nice to support more "views", the current output is huge, and add some aggregations to reduce it would be useful in some use-cases:
      • [ ] commands/tasks -- provides complete info; (the current implementation) the relation COMMAND:INODE:etc is unique
      • [ ] file - provide a list of used inodes; INODE is unique in output, COMMAND is not printed and replaced by the number of processes (aka NPROCS - see lsns where we do the same), USER is replaced by NUSERS, etc.
      • [ ] user - provide a list of users who has open something; UID is unique in output, INODE is replaced by NFILES and COMMAND by NPROCS, etc.
      • [x] summary - just two columns, description and value, something like:
      • [x] number of open files: 123
      • [x] number of processes: 567
      • [x] used types: REG,DIR,SOCK,INOTIFY, ....
      • [ ] used block devices: sda1, sdb2, ...
    • [x] add MAJ:MIN for major and minor numbers, remove DEVICE (we use MAJ:MIN in other tools)
    • [x] add DEVTYPE for blk, char, and nodev
    • [x] remove "nodev:" from DEVNAME
    • [x] maybe rename DEVNAME to SOURCE as we have here things like 'devtmpfs' etc.
    • [ ] add filters; yes I know, you can use grep, but for some use-cases like JSON or when you filter by data that is missing in the output it's better to have a basic filter in the command:
    • [ ] filters should be possible to use with "views" (lsfd --summary --command systemd)
    • [ ] man page
      • [x] cherry-pick @mariobl's work submitted to the utli-linux mailing list, https://lore.kernel.org/util-linux/[email protected]om/T/#u as the base version
      • [x] write about filtering
      • [x] add examples
      • [ ] write the details of columns

    my check list:
    • [x] -p/--pids filter working at information gathering time. This option works well with pidof as strace's -p option does.
    • [x] generic filtering engine
    • [x] regex pattern in filter expression
    • [ ] test cases
      • file type aspects
        • [x] regular file
        • [x] pipe
        • [x] directory
        • [x] symlink
        • [x] char dev
        • [x] blk dev
        • [ ] sockets
        • [x] socketpair (AF_UNIX, SOCK_STREAM, 0)
        • [ ] anon_inodes
      • column aspects
        • [ ] ASSOC
        • [x] CHRDRV
        • [x] COMMAND
        • [ ] DELETED
        • [x] DEV
        • [x] DEVTYPE
        • [x] FD
        • [x] FLAGS
        • [x] INODE
        • [x] MAJ:MIN
        • [ ] MAPLEN
        • [ ] MISCDEV
        • [x] MNTID
        • [x] MODE
        • [x] NAME
        • [x] NLINK
        • [ ] PARTITION
        • [x] PID
        • [x] POS
        • [x] PROTONAME
        • [x] RDEV
        • [x] SIZE
        • [x] SOURCE
        • [ ] TID
        • [x] TYPE
        • [x] UID
        • [x] USER
        • [ ] FUID
        • [ ] OWNER
    • [ ] various status about socket
    • [ ] IPC end points features like -E option implemented in lsof
      • [ ] file desciptor based IPC end points
        • [x] FIFOs
        • [ ] UNIX socket
        • [ ] PTY master/slave
        • [ ] INET socket used in localhost
        • [ ] posix_mqueue
        • [ ] eventfd
        • [ ] eventpoll?
      • [ ] sheme based IPC end points
    • [ ] more consideration about namespaces
    • [ ] collect more info from fdinfo
      • [ ] inotify
      • [ ] epoll
      • [ ] eventfd
      • [ ] pts
      • [ ] /dev/net/tun
    • [ ] cmdline completion rules for bash
    • [ ] --no-wrap option
    • [ ] whatever lsof supports
    opened by masatake 57
  • How to compile util-linux on mac?

    How to compile util-linux on mac?

    I got the following error when I run make on Mac OS X.

    Does anybody know what is wrong?

    $ make sys-utils/flock
    gcc -g -O2    sys-utils/flock.c   -o sys-utils/flock
    sys-utils/flock.c:42:10: fatal error: 'c.h' file not found
    #include "c.h"
             ^~~~~
    1 error generated.
    make: *** [sys-utils/flock] Error 1
    
    $ make
    ...
      CC       sys-utils/ipcrm.o
    sys-utils/ipcrm.c:246:17: error: variable has incomplete type 'struct seminfo'
            struct seminfo seminfo;
                           ^
    sys-utils/ipcrm.c:246:9: note: forward declaration of 'struct seminfo'
            struct seminfo seminfo;
                   ^
    sys-utils/ipcrm.c:253:21: error: use of undeclared identifier 'SHM_INFO'
                    maxid = shmctl(0, SHM_INFO, &shmseg);
                                      ^
    sys-utils/ipcrm.c:258:23: error: use of undeclared identifier 'SHM_STAT'
                            rm_me = shmctl(id, SHM_STAT, &shmseg);
                                               ^
    sys-utils/ipcrm.c:266:24: error: use of undeclared identifier 'SEM_INFO'
                    maxid = semctl(0, 0, SEM_INFO, arg);
                                         ^
    sys-utils/ipcrm.c:272:26: error: use of undeclared identifier 'SEM_STAT'
                            rm_me = semctl(id, 0, SEM_STAT, arg);
                                                  ^
    5 errors generated.
    make[2]: *** [sys-utils/ipcrm.o] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2
    
    opened by pengyu 27
  • enabling libcryptsetup dependency (for verity) causes conflicts with other libraries

    enabling libcryptsetup dependency (for verity) causes conflicts with other libraries

    Until recently, libmount was a low-level library with few dependencies, that could be safely depended on by things like GLib.

    The addition of the optional libcryptsetup dependency changes that somewhat. There seem to be two main problem areas causing crashes in distributions that have enabled it, such as recent development versions of Debian and Ubuntu:

    • The json-c library contains symbols that collide with other JSON libraries such as libjansson (akheron/jansson#523, json-c/json-c#621) and json-glib (json-glib#33), because it seems every implementation of JSON in C has chosen to use the json_ namespace. This is particularly troublesome for anything that depends on json-glib, which depends on GLib, which depends on libmount, which depends on libcryptsetup, which depends on json-c, almost guaranteeing symbol conflicts.

    • libcryptsetup's default/recommended OpenSSL backend for crypto has symbol conflicts with anything that statically links a different version of OpenSSL, which seems to be popular in the proprietary software world (Steam and Minecraft are known to be affected). ValveSoftware/steam-for-linux#7223 and ValveSoftware/steam-for-linux#6861 are examples of this.

    I don't know which project(s) should take action to solve this, but I'm trying to make sure all the upstreams involved in this collision are at least aware that there's a problem, so that whatever action is taken can be somewhat coordinated.

    One way that this might be solved within libmount (if that is considered to be a desirable place to solve it) would be to move the verity feature into a helper executable, or perhaps into a dlopened module that is loaded with RTLD_LOCAL to avoid it interfering with symbol resolution in the flat default ELF namespace.

    Another possible solution, if the verity feature is mostly of interest to embedded or special-purpose distributions, would be to recommend that general-purpose distributions disable that feature.

    opened by smcv 26
  • libblkid: improve identification of ISO9660 partition

    libblkid: improve identification of ISO9660 partition

    This addresses some feedback on https://github.com/karelzak/util-linux/pull/872 by ensuring (rather than assuming) that a partition table entry corresponds to the ISO9660 filesystem, and by only applying the logic to restrict the metadata to a partition device in cases where there is actually a device (which does not happen for CD/DVD /dev/sr0).

    As noted, the udev behaviour here is also questionable and indeed if it behaved differently I might not have put attention into modifying blkid. However, I think the information presented by blkid in the case of a combined ISO & partition setup (where a partition points at the ISO data too) is questionable, where it effectively reports the same filesystem on two devices, so I think this approach still makes sense for blkid. Separately I'll take another look at the udev side, but probably not until next week.

    opened by dsd 26
  • Fedora hardlink vs Debian hardlink

    Fedora hardlink vs Debian hardlink

    It seems you have merged the Fedora version of hardlink into util-linux. This is unfortunate, as Debian, Ubuntu, Arch, and others are shipping a different hardlink, developed my me, that has a lot more features:

    Usage: ./hardlink [options] directory|file ...
    Options:
      -V, --version         show program's version number and exit
      -h, --help            show this help message and exit
      -v, --verbose         Increase verbosity (repeat for more verbosity)
      -n, --dry-run         Modify nothing, just print what would happen
      -f, --respect-name    Filenames have to be identical
      -p, --ignore-mode     Ignore changes of file mode
      -o, --ignore-owner    Ignore owner changes
      -t, --ignore-time     Ignore timestamps (when testing for equality)
      -X, --respect-xattrs  Respect extended attributes
      -m, --maximize        Maximize the hardlink count, remove the file with
                            lowest hardlink cout
      -M, --minimize        Reverse the meaning of -m
      -O, --keep-oldest     Keep the oldest file of multiple equal files
                            (lower precedence than minimize/maximize)
      -x REGEXP, --exclude=REGEXP
                            Regular expression to exclude files
      -i REGEXP, --include=REGEXP
                            Regular expression to include files/dirs
      -s <num>[K,M,G], --minimum-size=<num>[K,M,G]
                            Minimum size for files. Optional suffix
                            allows for using KiB, MiB, or GiB
    
    Compatibility options to Jakub Jelinek's hardlink:
      -c                    Compare only file contents, same as -pot
    

    Switching to this version of hardlink would break things for a lot of users. Apart from the meaning of -f, mine is a superset option-wise.

    I'd argue given that my version is a superset of this version, we should probably consolidate on this one. I think I mentioned this to Jakub back in the day, but I'm not sure.

    ASSIGNED 
    opened by julian-klode 21
  • lscpu L3 cache size on Ryzen 5 1600

    lscpu L3 cache size on Ryzen 5 1600

    lscpu version 2.32 reports the CPU has 8 MiB cache, while the correct value is 16 MiB:

    $ lscpu
    Model name:          AMD Ryzen 5 1600 Six-Core Processor
    L3 cache:            8192K
    

    /sys (Linux 4.17.0) provides the correct cache IDs:

    $ cat /sys/devices/system/cpu/cpu0/cache/index3/id
    0
    $ cat /sys/devices/system/cpu/cpu6/cache/index3/id
    1
    $ cat /sys/devices/system/cpu/cpu0/cache/index3/size
    8192K
    

    It would be nice if lscpu printed the number of L1/L2/L3 caches, such as:

    L1d cache: 6*32K
    L1i cache: 6*64K
    L2 cache:  6*512K
    L3 cache:  2*8192K
    

    For comparison, lstopo version 1.11.2 (http://www.open-mpi.org/projects/hwloc/) works OK.

    TODO 
    opened by atomsymbol 20
  • [lsfd] tests failed

    [lsfd] tests failed

    Hello!

    @masatake

    sparc64 host:

    tests$ git describe
    v2.37-648-g1b44d0923
    
    tests$ ./run.sh --show-diff lsfd
    
    -------------------- util-linux regression tests --------------------
    
                        For development purpose only.
                     Don't execute on production system!
    
           kernel: 5.16.0-rc2
    
          options: --show-diff \
                   --srcdir=/1/mator/util-linux/tests/.. \
                   --builddir=/1/mator/util-linux/tests/..
    
             lsfd: directory                      ... SKIPPED (no root permissions)
             lsfd: directory                      ... OK
             lsfd: pipe, no fork                  ... OK
             lsfd: read-only regular file         ...
    diff-{{{
    --- /1/mator/util-linux/tests/expected/lsfd/mkfds-ro-regular-file       2021-11-26 16:29:39.397686937 +0300
    +++ /1/mator/util-linux/tests/output/lsfd/mkfds-ro-regular-file 2021-11-26 17:57:41.055617042 +0300
    @@ -13,4 +13,4 @@
     MNTID[RUN]: 0
     DEV[RUN]: 0
     FINDMNT[RUN]: 0
    -DEV[STR]: 0
    +DEV[STR]: 1
    }}}-diff
    
     FAILED (lsfd/mkfds-ro-regular-file)
             lsfd: character device with O_RDWR   ... OK
             lsfd: AF_UNIX socket pair created with socketpair(2) ...
    diff-{{{
    --- /1/mator/util-linux/tests/expected/lsfd/mkfds-socketpair    2021-11-26 16:29:39.397686937 +0300
    +++ /1/mator/util-linux/tests/output/lsfd/mkfds-socketpair      2021-11-26 17:57:41.831650266 +0300
    @@ -1,3 +1,3 @@
    -    3  rw- SOCK sockfs      UNIX
    -    4  rw- SOCK sockfs      UNIX
    +    3  rw- SOCK sockfs UNIX-STREAM
    +    4  rw- SOCK sockfs UNIX-STREAM
     ASSOC,MODE,TYPE,SOURCE,PROTONAME: 0
    }}}-diff
    
     FAILED (lsfd/mkfds-socketpair)
             lsfd: symbolic link itself opened with O_PATH ... OK
             lsfd: directory                      ... SKIPPED (no root permissions)
             lsfd: directory                      ... OK
    
    ---------------------------------------------------------------------
      2 tests of 9 FAILED
    ---------------------------------------------------------------------
    

    ppc64 host:

    tests$ ./run.sh --show-diff lsfd
    
    -------------------- util-linux regression tests --------------------
    
                        For development purpose only.
                     Don't execute on production system!
    
           kernel: 5.15.0-1-powerpc64
    
          options: --show-diff \
                   --srcdir=/home/mator/util-linux.git/tests/.. \
                   --builddir=/home/mator/util-linux.git/tests/..
    
             lsfd: directory                      ... SKIPPED (no root permissions)
             lsfd: directory                      ... OK
             lsfd: pipe, no fork                  ... OK
             lsfd: read-only regular file         ... OK
             lsfd: character device with O_RDWR   ...
    diff-{{{
    --- /home/mator/util-linux.git/tests/expected/lsfd/mkfds-rw-character-device    2021-11-26 18:08:03.405921213 +0300
    +++ /home/mator/util-linux.git/tests/output/lsfd/mkfds-rw-character-device      2021-11-26 19:08:30.724078893 +0300
    @@ -3,4 +3,4 @@
     MNTID[RUN]: 0
     DEV[RUN]: 0
     FINDMNT[RUN]: 0
    -DEV[STR]: 0
    +DEV[STR]: 1
    }}}-diff
    
     FAILED (lsfd/mkfds-rw-character-device)
             lsfd: AF_UNIX socket pair created with socketpair(2) ...
    diff-{{{
    --- /home/mator/util-linux.git/tests/expected/lsfd/mkfds-socketpair     2021-11-26 18:08:03.405921213 +0300
    +++ /home/mator/util-linux.git/tests/output/lsfd/mkfds-socketpair       2021-11-26 19:08:30.868079286 +0300
    @@ -1,3 +1,3 @@
    -    3  rw- SOCK sockfs      UNIX
    -    4  rw- SOCK sockfs      UNIX
    +    3  rw- SOCK sockfs UNIX-STREAM
    +    4  rw- SOCK sockfs UNIX-STREAM
     ASSOC,MODE,TYPE,SOURCE,PROTONAME: 0
    }}}-diff
    
     FAILED (lsfd/mkfds-socketpair)
             lsfd: symbolic link itself opened with O_PATH ... OK
             lsfd: directory                      ... SKIPPED (no root permissions)
             lsfd: directory                      ... OK
    
    ---------------------------------------------------------------------
      2 tests of 9 FAILED
    ---------------------------------------------------------------------
    
    opened by mator 19
  • mount -a fails to use UUID if /proc and /sys are to be mounted

    mount -a fails to use UUID if /proc and /sys are to be mounted

    I am using buildroot with mount from util-linux-2.37.2, libmount 2.37.2. When my fstab contains UUIDs, mount at boot fails to find them. After some experimenting, it seems that it would need /proc or /sys to find device by UUID. And the fact is, that exact "mount -a" at boot is used to mount /proc and /sys. So if they were already mounted, then UUID look-up succeeds. If they are to be mounted by the same "mount -a", then UUID fails.

    I don't think I've seen this problem on earlier versions. I suspect "mount -a" should delay the UUID/LABEL mounts to the last step, so that /proc and /sys are always mounted first.

    opened by stsp 17
  • libmount: Avoid triggering autofs in lookup_umount_fs_by_statfs

    libmount: Avoid triggering autofs in lookup_umount_fs_by_statfs

    Currently, umount /foo results in a statfs("/foo") call, which triggers autofs. This can create another mountpoint on /foo, which is then unmounted later instead of the actual /foo at the time umount was called.

    This is especially an issue for umount -R /bar, which just fails with -EBUSY as the accidental mountpoint is never accounted for and so it tries to umount /bar before /bar/someautofs.

    Replace the direct statfs call with open(path, O_PATH) + fstatfs, which sees the autofs mount directly, without triggering it.

    opened by Vogtinator 16
  • libblkid: Btrfs duplicate

    libblkid: Btrfs duplicate "filesystem" block devices for a single filesystem.

    Looking at changing the code on my system, just wanted to send a heads-up.

    Working on https://gitlab.gnome.org/GNOME/gvfs/-/issues/519

    Traced value for "usage" => "filesystem" coming from libblkid. When btrfs has multiple devices I plan on adding a check, along with the obvious magic number matches, that /dev/disk/by-uuid/%s(*follow symlinks) has the same device id as the current device. Idealy in that case usage would be "filesystem-part" with everything else the same.

    After working on this issue for several days, I feel this is for the best. RFC.

    opened by cheako 15
  • fstrim: Remove all skipped entries before de-duplication

    fstrim: Remove all skipped entries before de-duplication

    When processing fstab entries, de-duplication is performed based on the source before all tests on the target have been checked, resulting in some entries being skipped when a removed duplicate with a different target would not have been.

    The fix is to move all the target checks before the source de-duplication.

    Addresses: #1686 Signed-off-by: Scott Shambarger [email protected]

    opened by sshambar 0
  • fstrim -a fails to trim filesystems if an overlay is ordered before it in fstab

    fstrim -a fails to trim filesystems if an overlay is ordered before it in fstab

    When the fstrim.service was running on Fedora CoreOS 35 (util-linux-2.37.4), it wasn't actually trimming the root filesystem. However, if I ran 'fstrim -v /' it correctly trimmed the device.

    fstrim.service on coreos uses the standard '--listed-in /etc/fstab:/proc/self/mountinfo' and does not have /etc/fstab, so it parses the mountinfo, which for the root device has:

    /dev/vda4 /sysroot xfs ro,seclabel,relatime,... /dev/vda4 / xfs rw,seclabel,relatime,... /dev/vda4 /etc xfs rw,seclabel,relatime,... /dev/vda4 /usr xfs ro,seclabel,relatime,... /dev/vda4 /sysroot/ostree/deploy/fedora-coreos/var xfs rw,seclabel,relatime,... /dev/vda4 /var xfs rw,seclabel,relatime,...

    Adding a little debug output to the code showed the following behavior in fstrim.c:fstrim_all_from_file() related to the root device /dev/vda4:

    Remove useless entries loop

    • src: /dev/vda4 - tgt: /var
    • src: /dev/vda4 - tgt: /sysroot/ostree/deploy/fedora-coreos/var
    • src: /dev/vda4 - tgt: /usr
    • src: /dev/vda4 - tgt: /etc
    • src: /dev/vda4 - tgt: /
    • src: /dev/vda4 - tgt: /sysroot De-duplicate by source called Do FITRIM loop src: /dev/vda4 - tgt: /sysroot mountpoint: / SKIP: is overlay

    Clearly the de-duplication is removing the non-overlay entry, and then the actually trim loop skips the only remaining entry for the vda4 source.

    I re-coded the function to place all the tests that "skip an entry" into the first "remove useless entries" loop, and then everything worked as expected.

    The post-2.37 code changed to use the new function is_unwanted_fs() which would actually fix the case above as it checks for the "ro" mount option, but the real bug in overlay handling still exists (not to mention other cases when the access/directory check on the target might still lead to the wrong filesystem entry making it past the de-duplication). Moving all those checks to the first loop avoids those bugs.

    I will submit a pull request with my proposed patch...

    opened by sshambar 0
  • Feature idea: wipefs --recursive

    Feature idea: wipefs --recursive

    Intended behavior: wipefs --recursive would operate on the specified device and its subdevices, for example all the partitions of a disk.

    This would make it easier to get all unwanted signature.

    It would solve a problem I experienced, where wiping the partition table of disk lead to the provisioning tool recreating an identical one and then rediscovering the old filesystems.

    opened by t-8ch 1
  • po: No rule to make target 'all'.

    po: No rule to make target 'all'.

    Hi, I want to try out #1658 but while trying to build from source rather than release tarball, this happens:

    make  all-recursive
    make[1]: Entering directory '/build/source'
    Making all in po
    make[2]: Entering directory '/build/source/po'
    make[2]: *** No rule to make target 'all'.  Stop.
    make[2]: Leaving directory '/build/source/po'
    make[1]: *** [Makefile:14619: all-recursive] Error 1
    make[1]: Leaving directory '/build/source'
    make: *** [Makefile:6329: all] Error 2
    

    When I look into /build/source/po/, here's what's in it (excluding po files):

    $ ls -1 !(*.po)
    boldquot.sed
    [email protected]
    [email protected]
    insert-header.sin
    LINGUAS
    Makefile.in
    Makefile.in.in
    Makevars
    Makevars.template
    meson.build
    quot.sed
    remove-potcdate.sin
    Rules-quot
    update-potfiles
    util-linux.pot
    

    Notably absent from this list is a Makefile.

    Earlier in the log it says:

    ...
    Copying file m4/wint_t.m4
    Copying file m4/xsize.m4
    Copying file po/Makefile.in.in
    Copying file po/Makevars.template
    Copying file po/Rules-quot
    Copying file po/boldquot.sed
    Copying file po/[email protected]
    ...
    
    Full log
    @nix { "action": "setPhase", "phase": "unpackPhase" }
    unpacking sources
    unpacking source archive /nix/store/vkyrg2br8x9zwq52s3p8r0mn4s7mbw3v-source
    source root is source
    @nix { "action": "setPhase", "phase": "patchPhase" }
    patching sources
    applying patch /nix/store/1j9sp0yd6jbcbkwsc5a826rxqy3lk6vh-rtcwake-search-PATH-for-shutdown.patch
    patching file include/pathnames.h
    patching file sys-utils/rtcwake.c
    Hunk #1 succeeded at 601 (offset 14 lines).
    patching script interpreter paths in tests/run.sh
    tests/run.sh: interpreter directive changed from "#!/bin/bash" to "/nix/store/fcd0m68c331j7nkdxvnnpb8ggwsaiqac-bash-5.1-p16/bin/bash"
    @nix { "action": "setPhase", "phase": "autoreconfPhase" }
    autoreconfPhase
    autoreconf: export WARNINGS=
    autoreconf: Entering directory '.'
    autoreconf: running: autopoint --force
    Copying file ABOUT-NLS
    Copying file config/config.rpath
    Copying file m4/codeset.m4
    Copying file m4/extern-inline.m4
    Copying file m4/fcntl-o.m4
    Copying file m4/gettext.m4
    Copying file m4/glibc2.m4
    Copying file m4/glibc21.m4
    Copying file m4/iconv.m4
    Copying file m4/intdiv0.m4
    Copying file m4/intl.m4
    Copying file m4/intldir.m4
    Copying file m4/intlmacosx.m4
    Copying file m4/intmax.m4
    Copying file m4/inttypes-pri.m4
    Copying file m4/inttypes_h.m4
    Copying file m4/lcmessage.m4
    Copying file m4/lib-ld.m4
    Copying file m4/lib-link.m4
    Copying file m4/lib-prefix.m4
    Copying file m4/lock.m4
    Copying file m4/longlong.m4
    Copying file m4/nls.m4
    Copying file m4/po.m4
    Copying file m4/printf-posix.m4
    Copying file m4/progtest.m4
    Copying file m4/size_max.m4
    Copying file m4/stdint_h.m4
    Copying file m4/threadlib.m4
    Copying file m4/uintmax_t.m4
    Copying file m4/visibility.m4
    Copying file m4/wchar_t.m4
    Copying file m4/wint_t.m4
    Copying file m4/xsize.m4
    Copying file po/Makefile.in.in
    Copying file po/Makevars.template
    Copying file po/Rules-quot
    Copying file po/boldquot.sed
    Copying file po/[email protected]
    Copying file po/[email protected]
    Copying file po/insert-header.sin
    Copying file po/quot.sed
    Copying file po/remove-potcdate.sin
    autoreconf: running: aclocal --force -I m4
    autoreconf: configure.ac: tracing
    autoreconf: running: libtoolize --copy --force
    libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'.
    libtoolize: copying file 'config/ltmain.sh'
    libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
    libtoolize: copying file 'm4/libtool.m4'
    libtoolize: copying file 'm4/ltoptions.m4'
    libtoolize: copying file 'm4/ltsugar.m4'
    libtoolize: copying file 'm4/ltversion.m4'
    libtoolize: copying file 'm4/lt~obsolete.m4'
    autoreconf: configure.ac: not using Intltool
    autoreconf: running: gtkdocize --copy
    autoreconf: running: aclocal --force -I m4
    autoreconf: running: /nix/store/maf7lyrx7giba9i0rxzw2r6ad2ai1gkf-autoconf-2.71/bin/autoconf --force
    autoreconf: running: /nix/store/maf7lyrx7giba9i0rxzw2r6ad2ai1gkf-autoconf-2.71/bin/autoheader --force
    autoreconf: running: automake --add-missing --copy --force-missing
    configure.ac:18: installing 'config/ar-lib'
    configure.ac:13: installing 'config/compile'
    configure.ac:127: installing 'config/config.guess'
    configure.ac:127: installing 'config/config.sub'
    configure.ac:14: installing 'config/install-sh'
    configure.ac:14: installing 'config/missing'
    Makefile.am: installing 'config/depcomp'
    configure.ac: installing 'config/ylwrap'
    libmount/python/Makemodule.am:9: installing 'config/py-compile'
    Makefile.am:100:   'libmount/Makemodule.am' included from here
    libmount/Makemodule.am:4:   'libmount/python/Makemodule.am' included from here
    autoreconf: Leaving directory '.'
    @nix { "action": "setPhase", "phase": "configurePhase" }
    configuring
    fixing libtool script ./config/ltmain.sh
    configure flags: --disable-static --disable-dependency-tracking --prefix=/nix/store/bkmbz28wdkrgvzlckn687v9lb3hv2cd0-util-linux-minimal-2.37.4 --bindir=/nix/store/ivnx798k5yvdjag1xn9x75mmrz5c3798-util-linux-minimal-2.37.4-bin/bin --sbindir=/nix/store/ivnx798k5yvdjag1xn9x75mmrz5c3798-util-linux-minimal-2.37.4-bin/sbin --includedir=/nix/store/q22xiw4yi32vh8aiy38j57jgijrx8dgi-util-linux-minimal-2.37.4-dev/include --oldincludedir=/nix/store/q22xiw4yi32vh8aiy38j57jgijrx8dgi-util-linux-minimal-2.37.4-dev/include --mandir=/nix/store/d4p7s52hhah2vj8g77g46iszwnbkjvki-util-linux-minimal-2.37.4-man/share/man --infodir=/nix/store/ivnx798k5yvdjag1xn9x75mmrz5c3798-util-linux-minimal-2.37.4-bin/share/info --docdir=/nix/store/bkmbz28wdkrgvzlckn687v9lb3hv2cd0-util-linux-minimal-2.37.4/share/doc/util-linux --libdir=/nix/store/v19my1f4a1badxzll0p59cn4xxsxnj80-util-linux-minimal-2.37.4-lib/lib --libexecdir=/nix/store/v19my1f4a1badxzll0p59cn4xxsxnj80-util-linux-minimal-2.37.4-lib/libexec --localedir=/nix/store/v19my1f4a1badxzll0p59cn4xxsxnj80-util-linux-minimal-2.37.4-lib/share/locale --localstatedir=/var --enable-write --disable-use-tty-group --enable-fs-paths-default=/run/wrappers/bin:/run/current-system/sw/bin:/sbin --disable-makeinstall-setuid --disable-makeinstall-chown --disable-su --disable-nls --without-ncursesw --without-systemd --without-systemdsystemunitdir SYSCONFSTATICDIR=/nix/store/v19my1f4a1badxzll0p59cn4xxsxnj80-util-linux-minimal-2.37.4-lib/lib
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables... 
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether the compiler supports GNU C... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to enable C11 features... none needed
    checking whether gcc understands -c and -o together... yes
    checking for stdio.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for strings.h... yes
    checking for sys/stat.h... yes
    checking for sys/types.h... yes
    checking for unistd.h... yes
    checking for wchar.h... yes
    checking for minix/config.h... no
    checking whether it is safe to define __EXTENSIONS__... yes
    checking whether _XOPEN_SOURCE should be defined... no
    checking for a BSD-compatible install... /nix/store/hgl0ydlkgs6y6hx9h7k209shw3v7z77j-coreutils-9.0/bin/install -c
    checking whether build environment is sane... yes
    checking for a race-free mkdir -p... /nix/store/hgl0ydlkgs6y6hx9h7k209shw3v7z77j-coreutils-9.0/bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports the include directive... yes (GNU style)
    checking whether make supports nested variables... yes
    checking how to create a pax tar archive... gnutar
    checking dependency style of gcc... none
    checking whether make supports nested variables... (cached) yes
    checking the archiver (ar) interface... ar
    configure:   --runstatedir defaults to /run
    checking for gcc... (cached) gcc
    checking whether the compiler supports GNU C... (cached) yes
    checking whether gcc accepts -g... (cached) yes
    checking for gcc option to enable C11 features... (cached) none needed
    checking whether gcc understands -c and -o together... (cached) yes
    checking for bison... no
    checking for byacc... no
    checking build system type... x86_64-pc-linux-gnu
    checking host system type... x86_64-pc-linux-gnu
    checking for an ANSI C-conforming const... yes
    checking for working volatile... yes
    checking whether byte ordering is bigendian... no
    checking how to run the C preprocessor... gcc -E
    checking whether compiler handles -fno-common... yes
    checking whether compiler handles -Wall... yes
    checking whether compiler handles -Wextra... yes
    checking whether compiler handles -Waddress-of-packed-member... yes
    checking whether compiler handles -Wdiscarded-qualifiers... yes
    checking whether compiler handles -Wembedded-directive... no
    checking whether compiler handles -Wextra-semi... no
    checking whether compiler handles -Wformat-security... yes
    checking whether compiler handles -Wimplicit-function-declaration... yes
    checking whether compiler handles -Wmissing-declarations... yes
    checking whether compiler handles -Wmissing-parameter-type... yes
    checking whether compiler handles -Wmissing-prototypes... yes
    checking whether compiler handles -Wnested-externs... yes
    checking whether compiler handles -Wno-missing-field-initializers... yes
    checking whether compiler handles -Wpointer-arith... yes
    checking whether compiler handles -Wredundant-decls... yes
    checking whether compiler handles -Wsign-compare... yes
    checking whether compiler handles -Wstrict-prototypes... yes
    checking whether compiler handles -Wtype-limits... yes
    checking whether compiler handles -Wuninitialized... yes
    checking whether compiler handles -Wunused-but-set-parameter... yes
    checking whether compiler handles -Wunused-but-set-variable... yes
    checking whether compiler handles -Wunused-parameter... yes
    checking whether compiler handles -Wunused-result... yes
    checking whether compiler handles -Wunused-variable... yes
    checking whether compiler handles -Werror=sequence-point... yes
    checking whether compiler handles -Wno-clobbered... yes
    checking whether compiler handles -Wno-cast-function-type... yes
    checking whether compiler handles -Wno-unused-parameter... yes
    checking whether the compiler supports GNU C++... yes
    checking whether g++ accepts -g... yes
    checking for g++ option to enable C++11 features... none needed
    checking dependency style of g++... none
    checking how to print strings... printf
    checking for a sed that does not truncate output... /nix/store/1442kn5q9ah0bhhqm99f8nr76diczqgm-gnused-4.8/bin/sed
    checking for grep that handles long lines and -e... /nix/store/bqkx3pi50phcglv0l551jhp96bq8njl0-gnugrep-3.7/bin/grep
    checking for egrep... /nix/store/bqkx3pi50phcglv0l551jhp96bq8njl0-gnugrep-3.7/bin/grep -E
    checking for fgrep... /nix/store/bqkx3pi50phcglv0l551jhp96bq8njl0-gnugrep-3.7/bin/grep -F
    checking for ld used by gcc... ld
    checking if the linker (ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... nm
    checking the name lister (nm) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 1572864
    checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
    checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
    checking for ld option to reload object files... -r
    checking for file... file
    checking for objdump... objdump
    checking how to recognize dependent libraries... (cached) pass_all
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for archiver @FILE support... @
    checking for strip... strip
    checking for ranlib... ranlib
    checking command to parse nm output from gcc object... ok
    checking for sysroot... no
    checking for a working dd... /nix/store/hgl0ydlkgs6y6hx9h7k209shw3v7z77j-coreutils-9.0/bin/dd
    checking how to truncate binary pipes... /nix/store/hgl0ydlkgs6y6hx9h7k209shw3v7z77j-coreutils-9.0/bin/dd bs=4096 count=1
    checking for mt... no
    checking if : is a manifest tool... no
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... no
    checking for gcc option to produce PIC... -fPIC -DPIC
    checking if gcc PIC flag -fPIC -DPIC works... yes
    checking if gcc static flag -static works... no
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (ld -m elf_x86_64) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... no
    checking how to run the C++ preprocessor... g++ -E
    checking for ld used by g++... ld -m elf_x86_64
    checking if the linker (ld -m elf_x86_64) is GNU ld... yes
    checking whether the g++ linker (ld -m elf_x86_64) supports shared libraries... yes
    checking for g++ option to produce PIC... -fPIC -DPIC
    checking if g++ PIC flag -fPIC -DPIC works... yes
    checking if g++ static flag -static works... no
    checking if g++ supports -c -o file.o... yes
    checking if g++ supports -c -o file.o... (cached) yes
    checking whether the g++ linker (ld -m elf_x86_64) supports shared libraries... yes
    checking dynamic linker characteristics... (cached) GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking linker version script flag... --version-script
    checking if version scripts can use complex wildcards... yes
    checking pkg-config is at least version 0.9.0... yes
    checking for gtk-doc... yes
    checking for gtkdoc-check... gtkdoc-check.test
    checking for gtkdoc-check... /nix/store/nyjyqszwbyjh4gwv5v17gv16j1r3p1n0-gtk-doc-1.33.2/bin/gtkdoc-check
    checking for gtkdoc-rebase... /nix/store/nyjyqszwbyjh4gwv5v17gv16j1r3p1n0-gtk-doc-1.33.2/bin/gtkdoc-rebase
    checking for gtkdoc-mkpdf... /nix/store/nyjyqszwbyjh4gwv5v17gv16j1r3p1n0-gtk-doc-1.33.2/bin/gtkdoc-mkpdf
    checking whether to build gtk-doc documentation... no
    checking for glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0... no
    checking for xsltproc... no
    checking for special C compiler options needed for large files... no
    checking for _FILE_OFFSET_BITS value needed for large files... no
    checking whether to enable assertions... yes
    checking whether struct tm is in sys/time.h or time.h... time.h
    checking for gcc options needed to detect all undeclared functions... none needed
    checking for struct tm.tm_zone... yes
    checking whether NLS is requested... no
    checking for msgfmt... /nix/store/8iyqbjrrx3nsdah36wsk8q1bia7g5xfg-gettext-0.21/bin/msgfmt
    checking for gmsgfmt... /nix/store/8iyqbjrrx3nsdah36wsk8q1bia7g5xfg-gettext-0.21/bin/msgfmt
    checking for xgettext... /nix/store/8iyqbjrrx3nsdah36wsk8q1bia7g5xfg-gettext-0.21/bin/xgettext
    checking for msgmerge... /nix/store/8iyqbjrrx3nsdah36wsk8q1bia7g5xfg-gettext-0.21/bin/msgmerge
    checking for ld used by gcc... ld -m elf_x86_64
    checking if the linker (ld -m elf_x86_64) is GNU ld... yes
    checking for shared library run path origin... done
    checking for CFPreferencesCopyAppValue... no
    checking for CFLocaleCopyCurrent... no
    checking whether to use NLS... no
    checking for linux/compiler.h... no
    checking for linux/blkpg.h... yes
    checking for linux/major.h... yes
    checking for asm/io.h... no
    checking for byteswap.h... yes
    checking for endian.h... yes
    checking for err.h... yes
    checking for errno.h... yes
    checking for fcntl.h... yes
    checking for getopt.h... yes
    checking for inttypes.h... (cached) yes
    checking for lastlog.h... yes
    checking for libutil.h... no
    checking for linux/blkzoned.h... yes
    checking for linux/btrfs.h... yes
    checking for linux/capability.h... yes
    checking for linux/cdrom.h... yes
    checking for linux/falloc.h... yes
    checking for linux/fd.h... yes
    checking for linux/fiemap.h... yes
    checking for linux/kcmp.h... yes
    checking for linux/net_namespace.h... yes
    checking for linux/nsfs.h... yes
    checking for linux/pr.h... yes
    checking for linux/raw.h... no
    checking for linux/securebits.h... yes
    checking for linux/tiocl.h... yes
    checking for linux/version.h... yes
    checking for linux/watchdog.h... yes
    checking for linux/if_alg.h... yes
    checking for locale.h... yes
    checking for mntent.h... yes
    checking for net/if_dl.h... no
    checking for net/if.h... yes
    checking for netinet/in.h... yes
    checking for paths.h... yes
    checking for pty.h... yes
    checking for security/pam_appl.h... yes
    checking for shadow.h... yes
    checking for stdint.h... (cached) yes
    checking for stdio_ext.h... yes
    checking for stdlib.h... (cached) yes
    checking for sys/disk.h... no
    checking for sys/disklabel.h... no
    checking for sys/endian.h... no
    checking for sys/file.h... yes
    checking for sys/ioccom.h... no
    checking for sys/ioctl.h... yes
    checking for sys/io.h... yes
    checking for sys/mkdev.h... no
    checking for sys/mount.h... yes
    checking for sys/param.h... yes
    checking for sys/prctl.h... yes
    checking for sys/resource.h... yes
    checking for sys/sendfile.h... yes
    checking for sys/signalfd.h... yes
    checking for sys/socket.h... yes
    checking for sys/sockio.h... no
    checking for sys/stat.h... (cached) yes
    checking for sys/statfs.h... yes
    checking for sys/swap.h... yes
    checking for sys/syscall.h... yes
    checking for sys/sysmacros.h... yes
    checking for sys/time.h... yes
    checking for sys/timex.h... yes
    checking for sys/ttydefaults.h... yes
    checking for sys/types.h... (cached) yes
    checking for sys/ucred.h... no
    checking for sys/un.h... yes
    checking for sys/vfs.h... yes
    checking for sys/xattr.h... yes
    checking for unistd.h... (cached) yes
    checking for utmp.h... yes
    checking for utmpx.h... yes
    checking for linux/fs.h... no
    checking for linux/gsmmux.h... yes
    checking for security/pam_misc.h... yes
    checking whether BLK_ZONE_REP_CAPACITY is declared... yes
    checking whether PR_REP_CAPACITY is declared... no
    checking for security/openpam.h... no
    checking for langinfo.h... yes
    checking whether langinfo.h defines ALTMON_x constants... yes
    checking whether langinfo.h defines _NL_ABALTMON_x constants... yes
    checking for struct termios.c_line... yes
    checking for struct stat.st_mtim.tv_nsec... yes
    checking whether _NL_TIME_WEEK_1STDAY is declared... yes
    checking whether environ is declared... yes
    checking whether strsignal is declared... yes
    checking whether TIOCGLCKTRMIOS is declared... yes
    checking whether SOCK_CLOEXEC is declared... yes
    checking whether SOCK_NONBLOCK is declared... yes
    checking whether SO_PASSCRED is declared... yes
    checking for clearenv... yes
    checking for close_range... yes
    checking for eaccess... yes
    checking for err... yes
    checking for errx... yes
    checking for explicit_bzero... yes
    checking for __fpending... yes
    checking for __fpurge... yes
    checking for fpurge... no
    checking for fsync... yes
    checking for getdomainname... yes
    checking for getdtablesize... yes
    checking for getexecname... no
    checking for getmntinfo... no
    checking for getrandom... yes
    checking for getrlimit... yes
    checking for getsgnam... yes
    checking for getttynam... yes
    checking for inotify_init... yes
    checking for jrand48... yes
    checking for lchown... yes
    checking for lgetxattr... yes
    checking for llistxattr... yes
    checking for llseek... no
    checking for newlocale... yes
    checking for mempcpy... yes
    checking for mkostemp... yes
    checking for nanosleep... yes
    checking for ntp_gettime... yes
    checking for personality... yes
    checking for pidfd_open... no
    checking for pidfd_send_signal... no
    checking for posix_fadvise... yes
    checking for prctl... yes
    checking for qsort_r... yes
    checking for rpmatch... yes
    checking for scandirat... yes
    checking for sched_setattr... no
    checking for sched_setscheduler... yes
    checking for __secure_getenv... no
    checking for secure_getenv... yes
    checking for sendfile... yes
    checking for setprogname... no
    checking for setresgid... yes
    checking for setresuid... yes
    checking for sigqueue... yes
    checking for srandom... yes
    checking for strnchr... no
    checking for strndup... yes
    checking for strnlen... yes
    checking for strtod_l... yes
    checking for sysconf... yes
    checking for sysinfo... yes
    checking for timegm... yes
    checking for usleep... yes
    checking for uselocale... yes
    checking for utimensat... yes
    checking for vwarnx... yes
    checking for warn... yes
    checking for warnx... yes
    checking for _LARGEFILE_SOURCE value needed for large files... no
    checking for futimens... yes
    checking for getusershell... yes
    checking for inotify_init1... yes
    checking for ioperm... yes
    checking for iopl... yes
    checking for openat... yes
    checking for fstatat... yes
    checking for unlinkat... yes
    checking for open_memstream... yes
    checking for reboot... yes
    checking for updwtmpx... yes
    checking for updwtmpx... (cached) yes
    checking for syscall setns... SYS_setns
    checking for syscall pidfd_open... SYS_pidfd_open
    checking for syscall pidfd_send_signal... SYS_pidfd_send_signal
    checking for syscall close_range... SYS_close_range
    checking for isnan... yes
    checking for clock_gettime... yes
    checking for timer_create... yes
    checking for rtas_get_sysparm in -lrtas... no
    checking for struct sockaddr.sa_len... no
    checking for library containing socket... none required
    checking for dirfd... yes
    checking whether program_invocation_short_name is defined... yes
    checking whether __progname is defined... yes
    checking for asciidoctor... no
    configure: WARNING: asciidoctor not found; not building man pages
    checking whether the target supports thread-local storage... yes
    checking for openpty in -lutil... yes
    checking for union semun... no
    checking for loff_t... yes
    checking wchar_t support... yes
    checking for cpu_set_t... yes
    checking for sighandler_t... yes
    checking whether CPU_ALLOC is declared... yes
    checking for crypt.h... yes
    checking for udev_new in -ludev... no
    checking for ncurses6-config... no
    checking for ncurses5-config... no
    checking for ncurses... no
    checking for initscr in -lncurses... no
    checking for tinfo... no
    checking for tgetent in -ltinfo... no
    checking for readline in -lreadline... no
    configure: WARNING: ncursesw, ncurses or slang library not found; not building cfdisk
    checking for syscall fallocate... SYS_fallocate
    checking for valid fallocate() function... yes
    checking for valid posix_fallocate() function... yes
    checking for syscall unshare... SYS_unshare
    checking for valid unshare() function... yes
    checking for valid setns() function... yes
    checking for capng_apply in -lcap-ng... yes
    checking for crc32 in -lz... yes
    checking for magic_open in -lmagic... yes
    checking for syscall swapon... SYS_swapon
    checking for syscall swapoff... SYS_swapoff
    checking for swapon... yes
    checking for swapoff... yes
    checking for syscall prlimit64... SYS_prlimit64
    checking for valid prlimit() function... yes
    checking for syscall pivot_root... SYS_pivot_root
    configure: WARNING: ncursesw, ncurses or slang library not found; not building irqtop
    configure: WARNING: raw.h header file not found; not building raw
    checking for libuser >= 0.58... no
    configure: WARNING: ncursesw or ncurses libraries not found; not building ul
    configure: WARNING: ncursesw or ncurses libraries not found; not building more
    configure: WARNING: ncursesw or ncurses library not found; not building setterm
    checking for syscall ioprio_set... SYS_ioprio_set
    checking for syscall ioprio_get... SYS_ioprio_get
    checking for syscall sched_getaffinity... SYS_sched_getaffinity
    checking for syscall sched_setattr... SYS_sched_setattr
    checking for syscall sched_setattr... (cached) SYS_sched_setattr
    checking for libeconf... no
    checking for a Python interpreter with version >= 2... none
    configure: WARNING: python interpreter not found, do not build python bindings
    configure: WARNING: libpython not found; not building pylibmount
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating libblkid/docs/Makefile
    config.status: creating libblkid/docs/version.xml
    config.status: creating libblkid/src/blkid.h
    config.status: creating libfdisk/docs/Makefile
    config.status: creating libfdisk/docs/version.xml
    config.status: creating libfdisk/src/libfdisk.h
    config.status: creating libmount/docs/Makefile
    config.status: creating libmount/docs/version.xml
    config.status: creating libmount/src/libmount.h
    config.status: creating libsmartcols/docs/Makefile
    config.status: creating libsmartcols/docs/version.xml
    config.status: creating libsmartcols/src/libsmartcols.h
    config.status: creating po/Makefile.in
    config.status: creating po-man/Makefile
    config.status: creating config.h
    config.status: executing depfiles commands
    config.status: executing libtool commands
    config.status: executing po-directories commands
    
            util-linux  2.38
    
            prefix:                    /nix/store/bkmbz28wdkrgvzlckn687v9lb3hv2cd0-util-linux-minimal-2.37.4
            exec prefix:               ${prefix}
    
            bindir:                    /nix/store/ivnx798k5yvdjag1xn9x75mmrz5c3798-util-linux-minimal-2.37.4-bin/bin
            sbindir:                   /nix/store/ivnx798k5yvdjag1xn9x75mmrz5c3798-util-linux-minimal-2.37.4-bin/sbin
            libdir:                    /nix/store/v19my1f4a1badxzll0p59cn4xxsxnj80-util-linux-minimal-2.37.4-lib/lib
            usrbin_execdir:            ${exec_prefix}/bin
            usrsbin_execdir:           ${exec_prefix}/sbin
            usrlib_execdir:            ${exec_prefix}/nix/store/v19my1f4a1badxzll0p59cn4xxsxnj80-util-linux-minimal-2.37.4-lib/lib
    
            localstatedir:             /var
            runstatedir:               /run
            includedir:                /nix/store/q22xiw4yi32vh8aiy38j57jgijrx8dgi-util-linux-minimal-2.37.4-dev/include
            sysconfdir:                ${prefix}/etc
            sysconfstaticdir:          /nix/store/v19my1f4a1badxzll0p59cn4xxsxnj80-util-linux-minimal-2.37.4-lib/lib
    
            vendordir:                 
    
            Python:                    :
            Python version:            
            Python libs:               
    
            Bash completions:          ${datarootdir}/bash-completion/completions
            Systemd support:           no
            Systemd unitdir:           no
            libeconf support:          no
            Btrfs support:             yes
            Wide-char support:         yes
            libcryptsetup support:     
    
            Manual pages:              no
            Manual pages translated:   no
    
            compiler:                  gcc / g++
            suid cflags:               
            ldflags:                   
            suid ldflags:              
            ASAN enabled:              no
    
            cflags:                    -g -O2
    
            warnings:
    
     -fno-common -Wall -Wextra -Waddress-of-packed-member -Wdiscarded-qualifiers -Wformat-security -Wimplicit-function-declaration -Wmissing-declarations -Wmissing-parameter-type -Wmissing-prototypes -Wnested-externs -Wno-missing-field-initializers -Wpointer-arith -Wredundant-decls -Wsign-compare -Wstrict-prototypes -Wtype-limits -Wuninitialized -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-parameter -Wunused-result -Wunused-variable -Werror=sequence-point
    
     Type 'make' or 'make <utilname>' to compile.
    
    @nix { "action": "setPhase", "phase": "buildPhase" }
    building
    build flags: -j16 -l16 SHELL=/nix/store/fcd0m68c331j7nkdxvnnpb8ggwsaiqac-bash-5.1-p16/bin/bash usrbin_execdir=/nix/store/ivnx798k5yvdjag1xn9x75mmrz5c3798-util-linux-minimal-2.37.4-bin/bin usrlib_execdir=/nix/store/v19my1f4a1badxzll0p59cn4xxsxnj80-util-linux-minimal-2.37.4-lib/lib usrsbin_execdir=/nix/store/ivnx798k5yvdjag1xn9x75mmrz5c3798-util-linux-minimal-2.37.4-bin/sbin
    echo 2.38 > .version-t && mv .version-t .version
    make  all-recursive
    make[1]: Entering directory '/build/source'
    Making all in po
    make[2]: Entering directory '/build/source/po'
    make[2]: *** No rule to make target 'all'.  Stop.
    make[2]: Leaving directory '/build/source/po'
    make[1]: *** [Makefile:15075: all-recursive] Error 1
    make[1]: Leaving directory '/build/source'
    make: *** [Makefile:6471: all] Error 2
    

    (This is built via Nix using Atemu/[email protected], also happens on master)

    opened by Atemu 1
  • mount: support X-mount.idmap

    mount: support X-mount.idmap

    This adds a new mount option X-mount.idmap. This mount option can be used to create an idmapped mount.

    An idmapped mount allows to change ownership of all files located under a mount according to the ID-mapping associated with a user namespace.

    The ownership change is tied to the lifetime and localized to the relevant mount. The relevant ID-mapping can be specified in two ways:

    • A user can specify the ID-mapping directly. The ID-mapping must be specified using the syntax id-type:id-mount:id-host:id-range Specifying "u" as the id-type prefix creates a UID-mapping, "g" creates a GID-mapping and omitting id-type or specifying "b" creates both a UID- and GID-mapping. The id-mount parameter indicates the starting ID in the new mount. The id-host parameter indicates the starting ID in the filesystem. The id-range parameter indicates how many IDs are to be mapped. It is possible to specify multiple ID-mappings. The individual ID-mappings must be separated by spaces.

      For example, the ID-mapping X-mount.idmap=u:1000:0:1 g:1001:1:2 5000:1000:2 creates an idmapped mount where UID 0 is mapped to UID 1000, GID 1 is mapped to GUID 1001, GID 2 is mapped to GID 1002, UID and GID 1000 are mapped to 5000, and UID and GID 1001 are mapped to 5001 in the mount.

      When an ID-mapping is specified directly a new user namespace will be allocated with the requested ID-mapping. The newly created user namespace will be attached to the mount.

    • A user can specify a user namespace file. The user namespace will then be attached to the mount and the ID-mapping of the user namespace will become the ID-mapping of the mount. For example, X-mount.idmap=/proc/PID/ns/user will attach the user namespace of the process PID to the mount.

    Even more details about idmapped mounts can be found in the mount_setattr(2) manpage of the linux-manpage project.

    Signed-off-by: Christian Brauner (Microsoft) [email protected]

    TODO 
    opened by brauner 10
Collection of human friendly terminal interface for git.

A collection of human friendly terminal user interface for git.

Arthur Sonzogni 60 May 5, 2022
📖 A collection of pure bash alternatives to external processes.

NEW: pure sh bible ( ?? A collection of pure POSIX sh alternatives to external processes). pure bash bible A collection of pure bash alternatives to e

dylan 31k May 11, 2022
crypted admin shell: SSH-like strong crypto remote admin shell for Linux, BSD, Android, Solaris and OSX

crypted admin shell: SSH-like strong crypto remote admin shell for Linux, BSD, Android, Solaris and OSX

Sebastian 129 May 11, 2022
Graphs the activity of a chia harvester in a linux terminal.

Chia Harvest Graph Monitor for Chia Harvesting Introduction The chiaharvestgraph tool will graph Chia Harvesting activity in a linux terminal. Use a 2

Bram Stolk 219 May 2, 2022
a simple to use linux terminal

a simple to use linux terminal

notaweeb 7 Feb 17, 2022
Toybox: all-in-one Linux command line.

Toybox: all-in-one Linux command line.

Rob Landley 1.7k May 16, 2022
Free open-source modern C++17 / C++20 framework to create console, forms (GUI like WinForms) and unit test applications on Microsoft Windows, Apple macOS and Linux.

xtd Modern C++17/20 framework to create console (CLI), forms (GUI like WinForms) and tunit (unit tests like Microsoft Unit Testing Framework) applicat

Gammasoft 292 May 14, 2022
Linux Shell Implementation In C - Language

Linux-Shell ASSIGNMENT 2 Name : Naman Anand Roll no : 200101070 SUBJECT : CS242 ASSIGNMENT : 2 COMPILING AND FOR RUNNING COMMANDS :-> 1)gcc -o 2001010

Naman  Anand 17 Oct 30, 2021
A command-line tool to generate Linux manual pages from C source code.

mangen A command-line tool to generate Linux manual pages from C source code. Description mangen is, as said above, a program to generate Linux manual

null 2 Nov 15, 2021
Linux Shell Implementation In C - Language

Linux-Mini-Shell This is a C code for Linux Shell (a mini version). The code is designed to work properly in LINUX terminal. To compile the code and r

Akshat Mittal 2 Dec 1, 2021
FastReport.Cloud console tool for Linux and perhaps some other OSes

FastReport Cloud console shell This is a simple console shell to FastReport Cloud service. Prerequests GNU packages for build shell: curl-development

Aleksey Mandrykin 2 Feb 10, 2022
Minimal Linux Live (MLL) is a tiny educational Linux distribution, which is designed to be built from scratch by using a collection of automated shell scripts. Minimal Linux Live offers a core environment with just the Linux kernel, GNU C library, and Busybox userland utilities.

Minimal Linux Live (MLL) is a tiny educational Linux distribution, which is designed to be built from scratch by using a collection of automated shell scripts. Minimal Linux Live offers a core environment with just the Linux kernel, GNU C library, and Busybox userland utilities.

John Davidson 1.3k May 11, 2022
🎨 Modern 2D/3D - Importer • Exporter • Util - Library, also called (AssetIO)

Brand-new modern 3D asset importer, exporter library. This library will include common 3D utils funcs. It is written with C99 but C++ wrappers or othe

Recep Aslantas 142 May 10, 2022
🎨 Modern 2D/3D - Importer • Exporter • Util - Library, also called (AssetIO)

Brand-new modern 3D asset importer, exporter library. This library will include common 3D utils funcs. It is written with C99 but C++ wrappers or othe

Recep Aslantas 142 May 10, 2022
Parallel-util - Simple header-only implementation of "parallel for" and "parallel map" for C++11

parallel-util A single-header implementation of parallel_for, parallel_map, and parallel_exec using C++11. This library is based on multi-threading on

Yuki Koyama 26 Apr 24, 2022
A collection of single-file C libraries. (generic containers, random number generation, argument parsing and other functionalities)

cauldron A collection of single-file C libraries and tools with the goal to be portable and modifiable. Libraries library description arena-allocator.

Camel Coder 29 Apr 14, 2022
This is a collection of widgets and utilities for the immediate mode GUI (imgui) that I am developing for the critic2 GUI

ImGui Goodies This is a collection of widgets and utilities for the immediate mode GUI (imgui) that I am developing for the critic2 GUI. Currently, th

null 92 Apr 29, 2022
A personal collection of Windows CVE I have turned in to exploit source, as well as a collection of payloads I've written to be used in conjunction with these exploits.

This repository contains a personal collection of Windows CVE I have turned in to exploit source, as well as a collection of payloads I've written to

null 58 Apr 24, 2022
Random access array of tightly packed unsigned integers

PackedArray: random access array of tightly packed unsigned integers TLDR PackedArray comes to the rescue when you're in a desperate need for an uint9

Gregory Pakosz 130 Apr 16, 2022
Random for modern C++ with convenient API

Random for modern C++ with convenient API Design goals Supported compilers Integration Five-minute tutorial Number range Common type number range Char

Ilya Polishchuk 672 May 10, 2022
ThunderGBM: Fast GBDTs and Random Forests on GPUs

Documentations | Installation | Parameters | Python (scikit-learn) interface What's new? ThunderGBM won 2019 Best Paper Award from IEEE Transactions o

Xtra Computing Group 621 May 13, 2022
Rmaxcut finds an approximate solution to a weighted max-cut problem via random perturbation.

Rmaxcut finds an approximate solution to a weighted max-cut problem via random perturbation. Each line in an input file consists of the first nodeID, the second nodeID and an integer weight.

Heng Li 11 Apr 28, 2021
Random stuff about lower level iOS

Lower Level iOS Random stuff about lower level iOS Topics Macho Parser - study note of Mach-O format Dynamic Linking Exported Symbol - details of how

Qing Yang 71 Apr 30, 2022
null 4 Feb 25, 2022
Random for modern C++ with convenient API

Random for modern C++ with convenient API Design goals Supported compilers Integration Five-minute tutorial Number range Common type number range Char

Ilya Polishchuk 672 May 10, 2022
Guess a random number between your selected range within the chances you select to win the game!

Number-Guessing-Game Guess a random number between your selected range within the chances you select to win the game! This project was developed by Sa

Sampreet Roy 4 Feb 24, 2022
This repo is full with code from random c++ projects. Anyone can contribute

Randomcplusplus Learn c++ This repo is for random c++ code that can be used for any project Learn how to code in c++ by using and reading peoples exam

Thomas Kerby 2 Jan 30, 2022
Python random library for c++

Python random library for c++

tyson 1 Oct 28, 2021